Ease Bézier
Shapes a lerp's t with a cubic Bézier curve, like CSS cubic-bezier().
Node id math/ease-bezier
The Ease Bézier node eases a t from 0 to 1 along a cubic Bézier curve
from (0, 0) to (1, 1), shaped by two control points (x1, y1) and
(x2, y2). It works like CSS cubic-bezier(), so curves made for web
animations can be reused.
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| t | number | 0.5 | |
| x1 | number | 0.25 | |
| y1 | number | 0.1 | |
| x2 | number | 0.25 | |
| y2 | number | 1 |
Outputs
| Name | Type | Notes |
|---|---|---|
| t | number |
Behaviour
- Defaults. The control points default to CSS
ease: (0.25, 0.1) and (0.25, 1). (0.42, 0, 1, 1) is CSSease-in, (0, 0, 0.58, 1)ease-out, and (0.42, 0, 0.58, 1)ease-in-out. - Ends are kept.
t= 0 gives 0 andt= 1 gives 1. Since the control points stay from 0 to 1, the result does too: the curve never overshoots. - Clamped. A
tbelow 0 counts as 0, above 1 as 1.tdefaults to 0.5.
Errors
- Each of
x1,y1,x2andy2must be from 0 to 1. Unlike in CSS,y1andy2can't go outside it either.
Example
As for Ease: send the t of each point
through Ease Bézier before Lerp Point. With (0.7, 0, 0.3, 1) the points
crowd at both ends of the line.
Related nodes
- Ease: named curves (sine, cubic, bounce…).
- Ease Steps: jumps in equal steps.
- Lerp: the blend that
tdrives.