1
0
Fork 0
forked from wry/wry

Add custom animation curve config

This commit is contained in:
atagen 2026-05-21 17:19:46 +10:00
parent fa5c28ca3d
commit cf61c080b6
10 changed files with 281 additions and 57 deletions

View file

@ -221,10 +221,15 @@ Initial TOML shape:
enabled = false
duration-ms = 160
curve = "ease-out"
# or:
curve = [0.25, 0.1, 0.25, 1.0]
```
Bezier curves should be analyzed at configuration time and stored in a form that
is cheap to evaluate during rendering.
Bezier curves are analyzed when configuration is applied and stored as a
piecewise curve that is cheap to evaluate during rendering. Custom curves use
CSS cubic-bezier semantics: `(0, 0)` and `(1, 1)` are implicit, while the four
configured numbers are `x1`, `y1`, `x2`, and `y2`. The x control points must be
between `0` and `1`.
## Existing Note