path-rite

Springs

Physics-based spring animation primitives. These functions implement a damped harmonic oscillator that you drive from a requestAnimationFrame loop on the JS side.

Functions

  • springStep — Advance a spring simulation by one time step.
  • springSettled — Check if a spring has settled close enough to its target.