We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe I'm missing something but by using the generated JSX as is you can't create multiple instances of the same model.
This will just pick the last and render that one (the one with key 3), but not the others:
3
export const ModelViewer = () => { return ( <> <OrbitControls /> <group> {[1, 2, 3].map((i) => ( <MyModel key={i} position={[i, i, i]} /> ))} </group> </> ); };
Could be fixed by just changing these lines in the generated file:
const group = useRef<THREE.Group>(); const { materials, animations, scene } = useGLTF( "/mymodel.glb" ) as GLTFResult; const clone = useMemo(() => SkeletonUtils.clone(scene), [scene]); const { nodes } = useGraph(clone) as GLTFResult;
I don't know if this wasn't included for some reason, but shouldn't it be a built-in option in the CLI?
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Maybe I'm missing something but by using the generated JSX as is you can't create multiple instances of the same model.
This will just pick the last and render that one (the one with key
3
), but not the others:Could be fixed by just changing these lines in the generated file:
I don't know if this wasn't included for some reason, but shouldn't it be a built-in option in the CLI?
Thanks
The text was updated successfully, but these errors were encountered: