Javascript TextLoader未在进程或OneError上触发(three.js 75)

Javascript TextLoader未在进程或OneError上触发(three.js 75),javascript,three.js,loader,Javascript,Three.js,Loader,我正在尝试制作一个预加载程序,在最终的可视化加载之前向查看器显示有用的信息。为此,我尝试使用三个.js内置的纹理加载函数。下面是我的版本,下面是文档中的示例。。。不知道为什么这不起作用 // add the earth function addEarth(){ loadText.textContent = "Creating Earth"; var planetTexture = loader.load( "earthmap4k_optimized.jpg", function

我正在尝试制作一个预加载程序,在最终的可视化加载之前向查看器显示有用的信息。为此,我尝试使用三个.js内置的纹理加载函数。下面是我的版本,下面是文档中的示例。。。不知道为什么这不起作用

// add the earth
function addEarth(){
    loadText.textContent = "Creating Earth";

    var planetTexture = loader.load( "earthmap4k_optimized.jpg", function(){
        var planetBump = loader.load( "earthbump4k_optimized.jpg" , function(){
            var planetSpecular = loader.load( "earthspec4k_optimized.jpg", function(){

                var earthTexture =  new THREE.MeshPhongMaterial( {
                    map: planetTexture,
                    bumpMap: planetBump,
                    bumpScale: 0.5,
                    specularMap: planetSpecular
                }),
                earth = new THREE.Mesh(spGeo, earthTexture);
                worldObj.add(earth);
                scene.add(worldObj);
                earthLoaded = true;

            }, function(xhr){loadText.textContent = "Earth Specular Map "+ (xhr.loaded / xhr.total * 100) + "%"},
            function(xhr){loadText.textContent = "Error Loading Earth Specular Map";});

        }, function(xhr){loadText.textContent = "Earth Bump Map "+ (xhr.loaded / xhr.total * 100) + "%"},
        function(xhr){loadText.textContent = "Error Loading Earth Bump Map";});
    }, 
    function(xhr){loadText.textContent = "Earth Texture Map "+ (xhr.loaded / xhr.total * 100) + "%"},
    function(xhr){loadText.textContent = "Error Loading Earth Texture Map";});

}
这是文档中的示例

loader.load(
    // resource URL
    'textures/land_ocean_ice_cloud_2048.jpg',
    // Function when resource is loaded
    function ( texture ) {
        // do something with the texture
        var material = new THREE.MeshBasicMaterial( {
            map: texture
         } );
    },
    // Function called when download progresses
    function ( xhr ) {
        console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
    },
    // Function called when download errors
    function ( xhr ) {
        console.log( 'An error happened' );
    }
);

TextureLoader不会触发进度事件。请参阅问题将其包含在文档中而不是一个工作特性有点令人困惑。谢谢你的提醒。