Skip to content

Commit 2dde668

Browse files
author
Don McCurdy
committed
GLTFLoader: Clean up.
1 parent 6f99ac8 commit 2dde668

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

examples/js/loaders/GLTFLoader.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -549,11 +549,7 @@ THREE.GLTFLoader = ( function () {
549549

550550
}
551551

552-
GLTFTextureTransformExtension.prototype.extendTexture = function ( texture, mapDef ) {
553-
554-
var transform = mapDef.extensions !== undefined ? mapDef.extensions[ this.name ] : undefined;
555-
556-
if ( transform === undefined ) return texture;
552+
GLTFTextureTransformExtension.prototype.extendTexture = function ( texture, transform ) {
557553

558554
texture = texture.clone();
559555

@@ -2120,7 +2116,13 @@ THREE.GLTFLoader = ( function () {
21202116

21212117
if ( parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] ) {
21222118

2123-
texture = parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ].extendTexture( texture, mapDef );
2119+
var transform = mapDef.extensions !== undefined ? mapDef.extensions[ this.name ] : undefined;
2120+
2121+
if ( transform ) {
2122+
2123+
texture = parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ].extendTexture( texture, transform );
2124+
2125+
}
21242126

21252127
}
21262128

0 commit comments

Comments
 (0)