Replies: 1 comment 2 replies
-
useloader is cached. and normally you would clone it. but i don't think you can clone skinnedmeshes due to threejs not supporting it. you can try, maybe they have it now but i dont think so. so there's nothing you can do other than loading and parsing the model twice without the comfort of useloader, just like you do it in threejs const [model, set] = useState()
useEffect(() => void (new GLTFLoader().load(url, set)), [url])
return model ? <... /> : null |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
A tricky issue I'm trying to figure out. I'm trying to load two instances of the same .glb model. Only the second one is visible and animated. I believe the other one is there, although it's not visible and somehow it has identified the second model as sharing the same meshes (I know this through testing with select boxes, e.g. if I select the "ghost" first instance, the second one changes).
Here's an example: https://codesandbox.io/s/react-three-fiber-loading-gtlf-issue-ew59s?file=/src/Soldier.js:48-55
Any idea what I'm doing wrong? Appreciate the help.
Beta Was this translation helpful? Give feedback.
All reactions