I have managed to load a gltf object into my react-three-fiber scene. Now I want to attach a material to my model. Is it possible to use standard material on this model? Here's what I tried:
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]} />
}