diff --git a/examples/js/MD2Character.js b/examples/js/MD2Character.js index 291e705c16f6292601c4c1f41164f5295b56c15f..329966a2abddd21bf1efa3014f1f097d12708253 100644 --- a/examples/js/MD2Character.js +++ b/examples/js/MD2Character.js @@ -223,13 +223,13 @@ THREE.MD2Character = function () { function loadTextures( baseUrl, textureUrls ) { - var mapping = THREE.UVMapping; + var textureLoader = new THREE.TextureLoader(); var textures = []; for ( var i = 0; i < textureUrls.length; i ++ ) { - textures[ i ] = new THREE.TextureLoader().load( baseUrl + textureUrls[ i ], checkLoadingComplete ); - textures[ i ].mapping = mapping; + textures[ i ] = textureLoader.load( baseUrl + textureUrls[ i ], checkLoadingComplete ); + textures[ i ].mapping = THREE.UVMapping; textures[ i ].name = textureUrls[ i ]; } diff --git a/examples/js/MD2CharacterComplex.js b/examples/js/MD2CharacterComplex.js index 35f34ecdc342a5f2ebf9a7d04ba34676965c19ae..e5f32bdd46e6036e78acaad2d4ba73ae8e8ef52b 100644 --- a/examples/js/MD2CharacterComplex.js +++ b/examples/js/MD2CharacterComplex.js @@ -506,13 +506,13 @@ THREE.MD2CharacterComplex = function () { function loadTextures( baseUrl, textureUrls ) { - var mapping = THREE.UVMapping; + var textureLoader = new THREE.TextureLoader(); var textures = []; for ( var i = 0; i < textureUrls.length; i ++ ) { - - textures[ i ] = new THREE.TextureLoader().load( baseUrl + textureUrls[ i ], checkLoadingComplete ); - textures[ i ].mapping = mapping; + + textures[ i ] = textureLoader.load( baseUrl + textureUrls[ i ], checkLoadingComplete ); + textures[ i ].mapping = THREE.UVMapping; textures[ i ].name = textureUrls[ i ]; } diff --git a/examples/js/UCSCharacter.js b/examples/js/UCSCharacter.js index 2f2669419e62ae0cb888090b3d904c94ee5826a1..70e70f1e361da0eada5ff9388388977f4c0c0b9b 100644 --- a/examples/js/UCSCharacter.js +++ b/examples/js/UCSCharacter.js @@ -91,13 +91,13 @@ THREE.UCSCharacter = function() { function loadTextures( baseUrl, textureUrls ) { - var mapping = THREE.UVMapping; + var textureLoader = new THREE.TextureLoader(); var textures = []; for ( var i = 0; i < textureUrls.length; i ++ ) { - textures[ i ] = new THREE.TextureLoader().load( baseUrl + textureUrls[ i ], scope.checkLoadingComplete ); - textures[ i ].mapping = mapping; + textures[ i ] = textureLoader.load( baseUrl + textureUrls[ i ], scope.checkLoadingComplete ); + textures[ i ].mapping = THREE.UVMapping; textures[ i ].name = textureUrls[ i ]; }