Sfoglia il codice sorgente

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 anni fa
parent
commit
72611a26fd
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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 );
 
 	}