springer
springer copied to clipboard
Tension and friction
Hello,
Thank you very much for your work.
I was wondering if it was possible to convert the tension and wobble with values from the other tools (Android's StringForce, Framer's tension and friction...)
Tension is like stiffness but Wobble is different from damping?
I try to reproduce the same animations with your code.
Thanks
Sorry I wrote too fast :-)
These two lines answer my question:
const stiffness = Math.min(Math.max(350 * tension, 20), 350)
const damping = Math.min(Math.max(40 - (40 * wobble), 1), 40)
So I have to do:
const spring = springer(curveOptions.tension / 350, 1 - (curveOptions.friction / 40));
Thank you again for your work.