Open fzaiatz opened 4 years ago
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!