block by mbostock 5743979

Custom Easing

Full Screen

An example of how to implement a custom easing function, here a parameterized bounce. Custom easing functions must return 1 when t ≥ 1, or else transitions will not end on the desired value.

(Warning: many people believe “bounce” easing is gimmicky, and recommend you use the default “cubic-in-out” instead!)

index.html