You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A logic value coming from the useSharedValue so I do not use the state value which will have a wrong value cause the frames are executing super fast compared to the React life cycle.
By doing that, it is working but I am not sure if it is the best way.
React state is much slower than shared values. Only need it if you don't expect it to change often, like hasFacesInView or something like that. That's fine.
For some realtime stuff, use Skia or SharedValues instead.
Question
Hey! I am wondering what is the best way to do what I am asking on the title. Which is the right worklet function or hook I should use?
What I tried
I am executing this on the frame processor:
And inside that function I am using a
sharedValue
from the the worklet library.I mean, I have things like this around all the code:
A logic value coming from the
useSharedValue
so I do not use the state value which will have a wrong value cause the frames are executing super fast compared to the React life cycle.By doing that, it is working but I am not sure if it is the best way.
VisionCamera Version
3
Additional information
The text was updated successfully, but these errors were encountered: