File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -579,11 +579,7 @@ THREE.GLTFLoader = ( function () {
579579
580580 }
581581
582- GLTFTextureTransformExtension . prototype . extendTexture = function ( texture , mapDef ) {
583-
584- var transform = mapDef . extensions !== undefined ? mapDef . extensions [ this . name ] : undefined ;
585-
586- if ( transform === undefined ) return texture ;
582+ GLTFTextureTransformExtension . prototype . extendTexture = function ( texture , transform ) {
587583
588584 texture = texture . clone ( ) ;
589585
@@ -2212,7 +2208,13 @@ THREE.GLTFLoader = ( function () {
22122208
22132209 if ( parser . extensions [ EXTENSIONS . KHR_TEXTURE_TRANSFORM ] ) {
22142210
2215- texture = parser . extensions [ EXTENSIONS . KHR_TEXTURE_TRANSFORM ] . extendTexture ( texture , mapDef ) ;
2211+ var transform = mapDef . extensions !== undefined ? mapDef . extensions [ EXTENSIONS . KHR_TEXTURE_TRANSFORM ] : undefined ;
2212+
2213+ if ( transform ) {
2214+
2215+ texture = parser . extensions [ EXTENSIONS . KHR_TEXTURE_TRANSFORM ] . extendTexture ( texture , transform ) ;
2216+
2217+ }
22162218
22172219 }
22182220
You can’t perform that action at this time.
0 commit comments