Skip to content

1681-engine / index / AnimTransition

Interface: AnimTransition<State, P> ​

Defined in: src/anim/animStateTypes.ts:26

Type Parameters ​

Type Parameter
State extends string
P extends AnimParams

Properties ​

exitTime? ​

ts
optional exitTime?: number;

Defined in: src/anim/animStateTypes.ts:35

Only once this share of the clip has played (0.5 is half way; 2 is two loops).


from ​

ts
from: State | "*" | readonly State[];

Defined in: src/anim/animStateTypes.ts:28

The state it leaves, several, or '*' for any state (an any-state transition).


onEnd? ​

ts
optional onEnd?: boolean;

Defined in: src/anim/animStateTypes.ts:33

Only once the clip has played through once (a non-looping clip has finished, a looping one has looped).


priority? ​

ts
optional priority?: number;

Defined in: src/anim/animStateTypes.ts:37

Checked before lower ones; ties in the order written. Default 0.


self? ​

ts
optional self?: boolean;

Defined in: src/anim/animStateTypes.ts:39

An any-state transition may re-enter the state it is already in (default false: it would restart every update).


to ​

ts
to: State;

Defined in: src/anim/animStateTypes.ts:29


when? ​

ts
optional when?: { readonly [K in string | number | symbol]?: AnimCondition };

Defined in: src/anim/animStateTypes.ts:31

Every condition must hold. Triggers it names are used up when it is taken.

Released under the MIT License.