-
What is happening under the hood when you do something like this when animating with react-spring (from the example).
Is this the same thing as using position.set() on an object in useFrame? Is it running in three's render loop or reacts? I know react-spring animates outside of react, and it seems to be working as expected, only re-rending the component when state changes. Just trying to get a better understanding, thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yes, react-spring internally does exactly the same thing you would do in use frame - but with spring physics -, actually calling the host's (line) position vector's set method ( It will do so every animation frame (in a raf loop) |
Beta Was this translation helpful? Give feedback.
Yes, react-spring internally does exactly the same thing you would do in use frame - but with spring physics -, actually calling the host's (line) position vector's set method (
line.position.set(newValue)
)It will do so every animation frame (in a raf loop)