浏览代码

GLTFLoader: Fix ‘this’ error.

nqdy666 5 年之前
父节点
当前提交
a6e7747e89
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      examples/jsm/loaders/GLTFLoader.js

+ 2 - 2
examples/jsm/loaders/GLTFLoader.js

@@ -2036,9 +2036,9 @@ var GLTFLoader = ( function () {
 
 
 				if ( transform ) {
 				if ( transform ) {
 
 
-					var gltfReference = this.associations.get( texture );
+					var gltfReference = parser.associations.get( texture );
 					texture = parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ].extendTexture( texture, transform );
 					texture = parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ].extendTexture( texture, transform );
-					this.associations.set( texture, gltfReference );
+					parser.associations.set( texture, gltfReference );
 
 
 				}
 				}