我已经设法将一个 gltf 对象加载到我的 react-three-fiber 场景中。现在我想将材料附加到我的模型上。是否可以在此模型上使用标准材料?这是我尝试过的:
const Shape = (props) => { const gltf = useLoader(GLTFLoader, GLTFfe)
const material = new THREE.MeshStandardMaterial({
color: 0xff0000,
transparent: false, opacity: 0.5
});
const object = new THREE.Mesh(gltf, material)
return <primitive object={object.scene} position={[0, 0, 0]} />
}