Skip to content

Commit

Permalink
GLTFLoader: Add KTX2 mime type support in getImageURIMimeType (#29746)
Browse files Browse the repository at this point in the history
  • Loading branch information
puxiao authored Oct 25, 2024
1 parent 3f7243b commit 40367cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/jsm/loaders/GLTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2525,6 +2525,7 @@ function getImageURIMimeType( uri ) {

if ( uri.search( /\.jpe?g($|\?)/i ) > 0 || uri.search( /^data\:image\/jpeg/ ) === 0 ) return 'image/jpeg';
if ( uri.search( /\.webp($|\?)/i ) > 0 || uri.search( /^data\:image\/webp/ ) === 0 ) return 'image/webp';
if ( uri.search( /\.ktx2($|\?)/i ) > 0 || uri.search( /^data\:image\/ktx2/ ) === 0 ) return 'image/ktx2';

return 'image/png';

Expand Down

0 comments on commit 40367cd

Please sign in to comment.