File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 22912291 }
22922292
22932293 const URL = self . URL || self . webkitURL ;
2294- let sourceURI = source . uri ;
2294+ let sourceURI = source . uri || '' ;
22952295 let isObjectURL = false ;
22962296 let hasAlpha = true ;
2297- if ( source . mimeType === 'image/jpeg' ) hasAlpha = false ;
2297+ const isJPEG = sourceURI . search ( / \. j p e ? g ( $ | \? ) / i ) > 0 || sourceURI . search ( / ^ d a t a \: i m a g e \/ j p e g / ) === 0 ;
2298+ if ( source . mimeType === 'image/jpeg' || isJPEG ) hasAlpha = false ;
22982299
22992300 if ( source . bufferView !== undefined ) {
23002301
Original file line number Diff line number Diff line change @@ -2548,11 +2548,13 @@ class GLTFParser {
25482548
25492549 const URL = self . URL || self . webkitURL ;
25502550
2551- let sourceURI = source . uri ;
2551+ let sourceURI = source . uri || '' ;
25522552 let isObjectURL = false ;
25532553 let hasAlpha = true ;
25542554
2555- if ( source . mimeType === 'image/jpeg' ) hasAlpha = false ;
2555+ const isJPEG = sourceURI . search ( / \. j p e ? g ( $ | \? ) / i ) > 0 || sourceURI . search ( / ^ d a t a \: i m a g e \/ j p e g / ) === 0 ;
2556+
2557+ if ( source . mimeType === 'image/jpeg' || isJPEG ) hasAlpha = false ;
25562558
25572559 if ( source . bufferView !== undefined ) {
25582560
You can’t perform that action at this time.
0 commit comments