Animation · function

springSettleSec

How long until the spring's memory of an input is negligible.

Explained in Animation.

function springSettleSec(settings: SpringSettings): number
import { springSettleSec } from '@driftengine/animation';

Parameters

ParameterTypeDescription
settingsSpringSettings

In depth

This is the lookback, and it is derived rather than dialled. The envelope of a damped oscillator decays as e^(-ζωt), so reaching a factor EPSILON takes -ln(EPSILON) / (ζω). Everything older than that contributes less than a thousandth of the anchor's own motion, which is well under a pixel on anything this drives.

Damping of zero has no answer here and is refused at the sampler. An undamped spring rings forever, so no lookback is long enough and there is no honest value to return — the whole argument for sampling this purely is the decay, and at ζ = 0 there is none.