Pārlūkot izejas kodu

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 gadi atpakaļ
vecāks
revīzija
72611a26fd
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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 );
 
 	}