Răsfoiți Sursa

Fixed more bad inheritance usage code.

Mr.doob 11 ani în urmă
părinte
comite
78bb5bae75

+ 3 - 1
examples/js/loaders/BinaryLoader.js

@@ -68,6 +68,8 @@ THREE.BinaryLoader.prototype.loadAjaxJSON = function ( context, url, callback, t
 
 THREE.BinaryLoader.prototype.loadAjaxBuffers = function ( json, callback, binaryPath, texturePath, callbackProgress ) {
 
+	var scope = this;
+
 	var xhr = new XMLHttpRequest(),
 		url = binaryPath + json.buffers;
 
@@ -96,7 +98,7 @@ THREE.BinaryLoader.prototype.loadAjaxBuffers = function ( json, callback, binary
 
 		}
 
-		THREE.BinaryLoader.prototype.createBinModel( buffer, callback, texturePath, json.materials );
+		scope.createBinModel( buffer, callback, texturePath, json.materials );
 
 	}, false );
 

+ 1 - 1
examples/js/loaders/ctm/CTMLoader.js

@@ -57,7 +57,7 @@ THREE.CTMLoader.prototype.loadParts = function( url, callback, parameters ) {
 
 				for ( var i = 0; i < jsonObject.materials.length; i ++ ) {
 
-					materials[ i ] = THREE.Loader.prototype.createMaterial( jsonObject.materials[ i ], basePath );
+					materials[ i ] = scope.createMaterial( jsonObject.materials[ i ], basePath );
 
 				}