Easing Bench
ProNewAudition Bézier curves on a plotted control polygon and replay each curve on a measured track.
Installation
pnpm dlx shadcn@latest add @viewport/easing-bench
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| curves* | Curve[]Named cubic Bézier control points [x1, y1, x2, y2], with x coordinates in the unit interval. | — |
| durationMs | numberTravel time of the playback marker in milliseconds. | 800 |
| onSelect | (curve: Curve) => voidReceives the curve chosen by the user. | — |
Accessibility
- Preset buttons expose selection. Reduced-motion users see the curve and the final marker position.