three.js fbx静态模型贴图方法

texturePlante = THREE.ImageUtils.loadTexture("assets/planeOut/master_1024.png",null,function(t){});//模型贴图
var loader =  new THREE.FBXLoader();
loader.load('assets/planeOut/777X-9-exteriorOnly.fbx', function ( object) { //fbx模型


    object.traverse( function ( child ) {
        
        var material = new THREE.MeshPhongMaterial({
            map:texturePlante
        });
        child.material=material;
        if ( child.isMesh ) {
            child.castShadow = true;
            child.receiveShadow = true;

        };

    });
  
});

你可能感兴趣的:(three.js)