Time step in milliseconds since the last call. Must be small for the returned values to be meaningful.
Optional
l?: numberCurrent position (starting or one returned by previous call).
Lag in milliseconds (how long it should take for it to reach the final position). Must be positive.
Target final position.
Optional
precision?: numberNumber of decimal places to round position to in order to determine when it's "done".
Optional
v?: numberCurrent velocity (returned by previous call).
Updated position and velocity
Returns the new position and velocity for a critically damped user-driven spring state toward a current target position.
Since
v1.2.0