Skip to content

1681-engine / postfx / FxAnimation

Interface: FxAnimation ​

Defined in: src/postfx/fxAnimator.ts:4

One running change of a number over time.

Properties ​

done? ​

ts
optional done?: () => void;

Defined in: src/postfx/fxAnimator.ts:12

Runs once after the last set.

Returns ​

void


ease ​

ts
ease: EaseFn;

Defined in: src/postfx/fxAnimator.ts:10


elapsed ​

ts
elapsed: number;

Defined in: src/postfx/fxAnimator.ts:13


from ​

ts
from: number;

Defined in: src/postfx/fxAnimator.ts:7


key? ​

ts
optional key?: string;

Defined in: src/postfx/fxAnimator.ts:15

A key that cancels whatever animation already holds it (one flash at a time, say).


ms ​

ts
ms: number;

Defined in: src/postfx/fxAnimator.ts:9


set ​

ts
set: (value) => void;

Defined in: src/postfx/fxAnimator.ts:6

Called with the eased value every frame, and with to at the end.

Parameters ​

ParameterType
valuenumber

Returns ​

void


to ​

ts
to: number;

Defined in: src/postfx/fxAnimator.ts:8

Released under the MIT License.