0
我在THREE.js中通過Object Loader加載樹的模型,但沒有加載它的任何紋理,它只是一個簡單的樹,上面有白光。代碼是THREE.js中的Object Loader對象的紋理
var loader = new THREE.OBJMTLLoader();
loader.addEventListener('load', function (event) {
var object = event.content;
object.position.y = 0;
object.position.x = 500;
object.position.z = 500;
object.rotation.x = -(Math.PI/2);
object.scale.set(5, 5, 2);
scene.add(object);
});
loader.load('obj/Palm_Tree.obj', 'obj/Palm_Tree.mtl');
我該怎麼做加載樹紋理。