What's the best way to use useThree hook outside the Canvas ? (to display information in UI) #2438
Unanswered
fgarrec0397
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
Uh oh!
There was an error while loading. Please reload this page.
-
I already saw this discussion, but it is not for the same purpose #2334
I'm currently building a game engine with R3F which requires a lot of UI and since we cannot use useThree hook outside the Canvas context, I would like to know what is the best approach when we want to access the ThreeJs information outside the Canvas?
A work around I found was to use custom events that are listened inside the Canvas, but it's clearly not a good approach.
What is the official way to achieve this ?
Note that I use Redux and I don't want to store unserialized information in it.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions