Game dev
Saved & recent

Easing

Related terms: tween, ease in, ease out, animation curve

Changes the pacing between two values. Linear motion moves at constant speed and feels mechanical. An ease-in-out starts slow, speeds up, then slows down, the way real objects with weight move.

It works by bending t before it goes into a lerp. A tween is a short animation built this way, common in UI.

smooth = t * t * (3 - 2 * t)

Further reading
MDN: animation-timing-function
linear ease-in-out 0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1 time t lerp weight linear ease-in-out
Ticks mark eleven frames at equal steps of t. Linear moves the same distance every frame; ease-in-out (smoothstep) moves least near both ends and most in the middle. The red line and the knobs show one moment of the tween.

View in the full Game dev collection