1
當我將collada從meshbasic轉換爲meshphong時,collada的某些部分消失了。這是爲什麼?當我將collada從meshbasic轉換爲meshphong時,collada的某些部分消失了。這是爲什麼?
var setMaterial = function(node) {
node.material = new THREE.MeshBasicMaterial({color: 0xff0000});
console.log(node);
if (node.children) {
for (var i=0, thelength=node.children.length; i < thelength ; i++) {
setMaterial(node.children[i]);
}
}
}
setMaterial(dae);
這工作,但後來這使得它的一半消失......
var setMaterial = function(node) {
node.material = new THREE.MeshBasicPhong({color: 0xff0000});
console.log(node);
if (node.children) {
for (var i=0, thelength=node.children.length; i < thelength ; i++) {
setMaterial(node.children[i]);
}
}
}
setMaterial(dae);
如果答案是有用的,請不要忘記接受答案。謝謝。 – user2089677