1681-engine / postfx / FxAnimator
Class: FxAnimator ​
Defined in: src/postfx/fxAnimator.ts:24
Advances numbers over time for the post effects: a flash fading, a shockwave growing, a vignette breathing. Pure, so it is tested without a renderer; PostFx steps it on every frame.
Constructors ​
Constructor ​
ts
new FxAnimator(): FxAnimator;Returns ​
FxAnimator
Accessors ​
size ​
Get Signature ​
ts
get size(): number;Defined in: src/postfx/fxAnimator.ts:27
Returns ​
number
Methods ​
finishAll() ​
ts
finishAll(): void;Defined in: src/postfx/fxAnimator.ts:62
Ends everything at once, each at its last value.
Returns ​
void
run() ​
ts
run(a): void;Defined in: src/postfx/fxAnimator.ts:32
Starts an animation; one with the same key as a running one replaces it (the old one's done still runs).
Parameters ​
| Parameter | Type |
|---|---|
a | Omit<FxAnimation, "ease" | "elapsed"> & object |
Returns ​
void
step() ​
ts
step(ms): void;Defined in: src/postfx/fxAnimator.ts:48
Moves every animation on by ms; finished ones set their last value, call done and are dropped.
Parameters ​
| Parameter | Type |
|---|---|
ms | number |
Returns ​
void