TypologySienna Chen
MotionLightweight

Easing & spring

The shape of a movement between two states.

The shape of a movement between two states. An ease is a curve chosen in advance; a spring is physics that overshoots and settles. Springs feel alive because you can interrupt them mid-flight.

Breaks when
frame-rate-dependent lerp jitters on 120Hz
Also called
lerp, damp, react-spring, easings.net

Prompts

One motion vocabulary for a whole site
Define the motion tokens for a product site and implement them as CSS custom properties and a JS helper: three eases (out: cubic-bezier(.2,.8,.2,1); in-out: cubic-bezier(.65,0,.35,1); snap: cubic-bezier(.3,1.2,.4,1)), three durations (120, 240, 480 ms), and one spring (stiffness 170, damping 22, mass 1) for anything the pointer drags. Show each on a demo row with a click-to-replay. Reduced motion collapses every duration to 0 except opacity.
Frame-rate-independent damping
Replace every `x += (target − x) × 0.1` in this codebase with an exponential damp: x = target + (x − target) × exp(−λ × dt), λ = 8. Explain in a comment why the old form breaks at 120 Hz and on dropped frames, and show a 60 vs 120 Hz comparison in a small canvas.
Interruptible spring for a pointer follower
A cursor-following element driven by a real spring (semi-implicit Euler, stiffness 120, damping 14, mass 1) that can be retargeted every frame without restarting, plus a velocity-based squash: scale the element by 1 + |v| × 0.002 along the velocity direction. Stop the rAF loop when velocity and displacement both fall below 0.01.

Related

Resources · 2