diff --git a/examples/js/loaders/BinaryLoader.js b/examples/js/loaders/BinaryLoader.js index f7b8a46c25e1ccd0ee92087c2e25b5bdf717c614..d9c56e72af109cd199d9ee499d4cbffcd1e3263a 100644 --- a/examples/js/loaders/BinaryLoader.js +++ b/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 ); diff --git a/examples/js/loaders/ctm/CTMLoader.js b/examples/js/loaders/ctm/CTMLoader.js index 84a3458d19ca011b724e5d73392614b399653f08..54436f4f1be9dd9f637e5fbd11b39fae58745b14 100755 --- a/examples/js/loaders/ctm/CTMLoader.js +++ b/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 ); }