是否可以在ThreeJs中执行此操作。
var materials = [
new THREE.MeshPhongMaterial({ map: texture, side: THREE.FrontSide }),
new THREE.MeshPhongMaterial({ color: 0xffffff, side: THREE.BackSide })
];
var mesh = new THREE.Mesh(geometry, materials);
目前,只有当我使用其中一种材料时才能渲染。我还渲染对象的法线,并在对象外部正确计算它们。这是否意味着我内部不能有纹理或颜色?
编辑(临时解决方案可能???):
const front = new Mesh(geometry, new MeshPhongMaterial({ map: texture, side: FrontSide, visible: true }));
const back = new Mesh(geometry, new MeshPhongMaterial({ map: texture, side: BackSide, visible: true }));
front.name = 'front';
back.name = 'back';
const group = new Group();
group.add(front);
group.add(back);
observer.next(group);