Is frameloop="demand" with react-spring the most performant way to animate? #1884
-
Was just looking at the docs a bit, trying to wrap my head around how to use frameloop="demand", and noticed it mentioned that "If you use react-spring to animate your scene then it will also take care of it.", in regard to (as far as I understand it) triggering frames manually with the invalidate function. Does this mean that using spring is more performant than other methods of animating? and if so, does this mean if you set frameloop="demand" and use spring, it will call the invalidate function behind the scenes whenever an animation needs to be rendered? I have asked a somewhat related question in the past, but thought this question was unique enough to start a new discussion. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
react-spring will invalidate when it must render. frameloop=demand generally means that threejs only renders when it must. this is less about performance and more about saving battery. something like lerp or damp for sure is more performant than a spring. |
Beta Was this translation helpful? Give feedback.
react-spring will invalidate when it must render. frameloop=demand generally means that threejs only renders when it must. this is less about performance and more about saving battery. something like lerp or damp for sure is more performant than a spring.