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
Hi there! We're trying to generate a new Node animation model (AnimationTransaction's does not fit 100% our needs).
The approach so far is:
Set ViroView's setFrameListener
On each frame, update each Node's position, rotation, scale and opacity
For this we've created a component-oriented approach. From a design point of view everything is working as expected.
The problem we're having is when we call each Node's native setPosition/setRotation/setScale methods. Each call takes around 300ms (on a Samsung Galaxy S8).
Taking a look a bit further at Node's setPosition (for example):
Hey @fzaiatz, could you explain what you are trying to do? Are you trying to call setPosition and then getPositionRealtime immediately? (Which is why you ran into this case)
Hi @dthian :)
Well, not exactly. I need a way to animate a Node’s position frame by frame, and by calling setPosition we can’t make it work (around 300ms each call)
Hi there! We're trying to generate a new Node animation model (
AnimationTransaction
's does not fit 100% our needs).The approach so far is:
ViroView
'ssetFrameListener
Node
's position, rotation, scale and opacityFor this we've created a component-oriented approach. From a design point of view everything is working as expected.
The problem we're having is when we call each
Node
's nativesetPosition
/setRotation
/setScale
methods. Each call takes around 300ms (on a Samsung Galaxy S8).Taking a look a bit further at
Node
'ssetPosition
(for example):Where
nativeSetPosition
callssetPositionAtomic
(Node_JNI.cpp). Is there any way this could be changed, in order to update Node's props immediately?Thanks!
The text was updated successfully, but these errors were encountered: