diff --git a/examples/js/loaders/MMDLoader.js b/examples/js/loaders/MMDLoader.js index 529b46a8124ae78474e0d100dff38d6cffe855d7..f558f8a978ea8c0abba1cc6531bb3d2776dcdaf0 100644 --- a/examples/js/loaders/MMDLoader.js +++ b/examples/js/loaders/MMDLoader.js @@ -947,12 +947,6 @@ THREE.MMDLoader.prototype.createMesh = function ( model, texturePath, onProgress t.wrapS = THREE.RepeatWrapping; t.wrapT = THREE.RepeatWrapping; - if ( params.sphericalReflectionMapping === true ) { - - t.mapping = THREE.SphericalReflectionMapping; - - } - for ( var i = 0; i < texture.readyCallbacks.length; i++ ) { texture.readyCallbacks[ i ]( texture ); @@ -963,6 +957,12 @@ THREE.MMDLoader.prototype.createMesh = function ( model, texturePath, onProgress }, onProgress, onError ); + if ( params.sphericalReflectionMapping === true ) { + + texture.mapping = THREE.SphericalReflectionMapping; + + } + texture.readyCallbacks = []; textures[ fullPath ] = texture; @@ -1258,13 +1258,6 @@ THREE.MMDLoader.prototype.createMesh = function ( model, texturePath, onProgress m.envMap = getTexture( p.envMap, textures ); m.combine = p.envMapType; - // TODO: WebGLRenderer should automatically update? - m.envMap.readyCallbacks.push( function ( t ) { - - m.needsUpdate = true; - - } ); - } m.opacity = p.opacity;