Skip to content

useFBX primitive change color #843

Answered by PaganViking
PaganViking asked this question in Q&A
Discussion options

You must be logged in to vote

You can how ever change the material on the first run:
const BasicMaterial = new MeshBasicMaterial({color: new THREE.Color("#520B3E")})

const fbx = useFBX("models/kurvStrait.fbx");
const model = useMemo(() => fbx.clone(true), []);

model.children.forEach((mesh, i) => { mesh.material = BasicMaterial; });

<primitive object={model} scale={[0.35,1,0.4]} />

But i can't seem to be able to update the material after the first run !

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@drcmda
Comment options

Answer selected by PaganViking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants