where the anchor currently stands
where the bob currently stands
shove the bob by a delta without touching its velocity: an impact, a pluck, a shove
how far the bob currently lags behind the anchor
the bob minus the anchor: the lag a follower draws
put a display object where the bob stands; a SpriteMotion target qualifies
move the anchor; the bob follows through the dynamics, which is the whole effect
true once the lag and the velocity both fit inside tolerance
put the bob at the anchor with no velocity
Advance the bob by dt seconds. Under reduced motion a decorative spring snaps to
its anchor instead of swinging, the same collapse SpriteMotion applies. Keep dt
small (a FixedStepper at 60 Hz): past roughly two radians of natural frequency per
step, semi-implicit Euler blows up instead of settling. A zero dt holds still; a
negative or non-finite one throws a RangeError.
A damped chase spring for secondary motion: one bob pulled toward a moving anchor, the spring-damper complement to
SpriteMotion(roadmap 424). Hair, hems, accessories and interface panels follow their anchor with lag, overshoot on a stop and settle; the anchor teleports (a head bone, a pointer, a panel edge) and the dynamics supply the lag, so reacting to an acceleration, a stop or an impact is onesetAnchorcall.Renderer-free arithmetic: semi-implicit Euler, no randomness, no engine, deterministic for a fixed
update(dt)sequence. One update is O(1), about a dozen flops, which is the frame budget stated rather than hoped for.Example