diff --git a/examples/js/loaders/ColladaLoader.js b/examples/js/loaders/ColladaLoader.js index 5a4c59878f959a67ed88993ee89572cbcca75b3f..b81b8a993741796a365a0716fea882f54daf6117 100644 --- a/examples/js/loaders/ColladaLoader.js +++ b/examples/js/loaders/ColladaLoader.js @@ -3676,13 +3676,8 @@ THREE.ColladaLoader = function () { } else { texture = new THREE.Texture(); - loader = new THREE.ImageLoader(); - loader.load( url, function ( image ) { - texture.image = image; - texture.needsUpdate = true; - - } ); + loadTextureImage( texture, url ); } @@ -5154,6 +5149,19 @@ THREE.ColladaLoader = function () { }; + function loadTextureImage ( texture, url ) { + + loader = new THREE.ImageLoader(); + + loader.load( url, function ( image ) { + + texture.image = image; + texture.needsUpdate = true; + + } ); + + }; + function extractDoubleSided( obj, element ) { obj.doubleSided = false;