Using duration config property with spring animations #1670
Unanswered
Patrick-DS
asked this question in
Support
Replies: 1 comment
-
Hello, interesting idea. But is it actually possible? To do that you'd have to change the parameters of the spring to create the length which would then mean the spring config you're using is effectively void? It does revert to linear by default, you can pass an Easing function via the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been guessing for a long time that the duration property in the springs config was for deciding how long the animation should take. Basically, I believe the natural way someone would interpret this configuration is that "it's gonna do this spring (with this tension, mass, friction, etc.) and the animation is going to be calculated so that it lasts exactly duration milliseconds". Why hasn't it been done this way, and it reverts to a linear animation instead? (Unless this has been changed in subsequent versions of the react-spring repository, please correct me if it is.) If working out the physics of it to determine duration as a function of the physical parameters is the issue, I'm willing to contribute.
Beta Was this translation helpful? Give feedback.
All reactions