-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
Cannot read properties of undefined (reading 'primitive') #2895
Comments
I stumbled upon the same issue, issue is gone when downgrading fiber to 8.13.0 |
This pattern unfortunately isn't very well supported atm, the work-around being to declare |
Thanks for explaining. So if I understand it correctly it's probably best to wait for v9 because in v8 it probably won't be supported? |
Maybe, I'd have to cc @drcmda if this is a pattern we can support, but I doubt our ability to use graph structures when neither React or three.js support them. In your case, you can specify |
I'm fixing related crash behavior in #2906 which unblocks this use case. It's not very stable if you then specify props or remount it, so not quite solved, but it's a best effort attempt at clearing things up here. |
Thank you for looking into it. I actually realised that a lot of use cases of primitive in my code base can simply be replaced by specifying it as a prop on the parent, so that solved a lot of my problems already. But I appreciate you're looking into this and looking forward to v9 :) |
Issue: have two meshes that share the same geometry with a primitive. Remove one mesh and then add the mesh again. You'll then get the error:
Codesandbox: https://codesandbox.io/s/falling-rain-pr3nlj?file=/src/App.js
To reproduce the issue:
The issue was introduced in 64c1b2f by @CodyJasonBennett
I am not entirely sure if this is a bug. I think it is, because I believe that in vanilla three.js you can use the same geometry for multiple meshes, but let me know if you think otherwise.
The text was updated successfully, but these errors were encountered: