소스 검색

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 ++ ) {
 
-		loadHDRData( i, onLoad, onProgress, onError );
+		loadHDRData.call( this, i, onLoad, onProgress, onError );
 
 	}