Ease Steps
Turns a lerp's t into equal steps, like CSS steps().
Node id math/ease-steps
The Ease Steps node turns a t from 0 to 1 into steps equal jumps, like
CSS steps(). With the default 4 steps, t is rounded down to 0, 0.25,
0.5 or 0.75, and is 1 only at t = 1. Connected to a Lerp's t, the blend
moves in jumps instead of smoothly.
Parameters
| Name | Type | Default |
|---|---|---|
| position | StepPosition | "end" |
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| t | number | 0.5 | |
| steps | number | 4 |
Outputs
| Name | Type | Notes |
|---|---|---|
| t | number |
Behaviour
position(StepPosition, a parameter):end(the default, CSSjump-end) holds 0 until the first jump;start(CSSjump-start) jumps at once, so 4 steps give 0.25, 0.5, 0.75 and 1.- Both reach 1 at
t= 1. - Clamped. A
tbelow 0 counts as 0, above 1 as 1.tdefaults to 0.5.
Errors
stepsmust be a whole number, 1 or more.
Example
As for Ease: with Ease Steps (steps 3)
before Lerp Point, the eight points land on only four places along the
line, in groups.
Related nodes
- Ease and Ease Bézier: smooth curves.
- Floor: rounds down to whole numbers.
- Lerp: the blend that
tdrives.