Replies: 1 comment
-
gltf is a container, it contains n groups, meshes, materials, there is no one thing with a definitive material. the result of vanilla GLTFLoader is a black box. exchanging things would require you to traverse which is possible but dirty (put a ref on it, traverse it in useLayoutEffect). in vanilla that's their one and only option, but in react you want to use GLTFJSX which is the clean solution to your problem. ps, since <Gltf
/** Children will be placed within the object, or within the group that holds arrayed objects */
children?: React.ReactNode
/** Can either spread over props or fill in JSX children, applies to every mesh within */
inject?: MeshProps | React.ReactNode | ((object: THREE.Object3D) => React.ReactNode) but better take a look at gltfjsx still. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does anybody know how to a custom material on the component? I cant find any examples or documentation on the subject and dont see any revelavant parameters.
Beta Was this translation helpful? Give feedback.
All reactions