Suspense breaks onClick events on instancedMesh - Why? #3404
Unanswered
hwoarang09
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am rendering more than 7000 instances of a Buildings component using instancedMesh. Here's my setup:
<Suspense fallback={null}> <Buildings buildingData={buildingData} /> </Suspense>
When I render the Buildings component without Suspense, everything works perfectly:
However, when i wrap the Building components with Suspense, the OnClick events behave inconsitently. Sometimes the events works, sometimes the events not works. Refreshing the page changes the behavior unpredictably.
Additionally, I've observed that reducing the number of instances(from 7000 to 100 or 1000) seems to improve the consistency, and the onClick events ar e more likely to work correctly in those cases.
Removing Suspense resolves the issue entirely, but I would like to understand why this happens and how I can fix it while keeping Suspense.
Any help or insights would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions