From 78bb5bae75e45e8a8b9484f6313af0ca61b79f1d Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Sun, 9 Mar 2014 01:14:40 -0500 Subject: [PATCH] Fixed more bad inheritance usage code. --- examples/js/loaders/BinaryLoader.js | 4 +++- examples/js/loaders/ctm/CTMLoader.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/js/loaders/BinaryLoader.js b/examples/js/loaders/BinaryLoader.js index f7b8a46c25..d9c56e72af 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 84a3458d19..54436f4f1b 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 ); } -- GitLab