-
Notifications
You must be signed in to change notification settings - Fork 140
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
Access Node properties? #189
Comments
@Secretmapper not yet, but that might make sense for that. usually you "control" all node properties from react, but in this case, its computed. Are there any more properties that should be readable? |
@macrozone for something like position or rotation being updated at 60fps, would it be better to access the native objects this way and avoid RN re-renders for performance reasons ? |
you cannot access it directly anyway. it always involves serialisation. in case of rotation, this is what happens:
so the scenekit nodes will reflect whats in your react-tree. But in case the scenekit nodes gets rotated by something else (e.g. physics), then we have a problem, because you no longer know its real rotation (or even position). In this case, you would need some mechanism to get the new properties from scenekit: either a callback Some more thoughts:
And some more tipps about rotation or changing properties quickly:
|
Is there a way to access node properties (like
textNode.boundingBox
) perhaps through refs?The text was updated successfully, but these errors were encountered: