浏览代码

Make HDRCubeTextureLoader work in strict mode.

If 'use strict' is set in this scope, calling the funtion loadHDRData at line 180 in HDRCubeTextureLoader will leave "this" undefined , and line 111 inside the function loadHDRData will throw expection when accessing "this.manager".
Peng Liu 7 年之前
父节点
当前提交
72611a26fd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/js/loaders/HDRCubeTextureLoader.js

+ 1 - 1
examples/js/loaders/HDRCubeTextureLoader.js

@@ -177,7 +177,7 @@ THREE.HDRCubeTextureLoader.prototype.load = function ( type, urls, onLoad, onPro
 
 
 	for ( var i = 0; i < urls.length; i ++ ) {
 	for ( var i = 0; i < urls.length; i ++ ) {
 
 
-		loadHDRData( i, onLoad, onProgress, onError );
+		loadHDRData.call( this, i, onLoad, onProgress, onError );
 
 
 	}
 	}