meo-canvas - v8.1.0
    Preparing search index...

    Function spring

    • Position of a damped spring at time t, in seconds.

      Solved in closed form rather than integrated step by step, which is what makes it usable from a page builder: any page can be evaluated on its own, in any order, and asking twice gives the same answer. A stepwise simulation would need every earlier frame first.

      The three regimes are genuinely different solutions of the same equation, not a single formula with edge cases — underdamped motion oscillates, critically damped is the fastest approach that does not, and overdamped crawls in without ever crossing.

      Parameters

      Returns number

      spring(0.2, { from: 0, to: 100, stiffness: 190, damping: 12 }) // position at 200ms