Appearance
Kiln API / kiln / AnimationGraphSpec
Interface: AnimationGraphSpec<S, P, T>
An animation graph as data. See animationGraph.
Type Parameters
| Type Parameter | Default type |
|---|---|
S extends string | string |
P extends Record<string, number | boolean> | Record<string, number | boolean> |
T extends string | string |
Properties
| Property | Type | Description |
|---|---|---|
initial | NoInfer<S> | The state entered on spawn. |
params? | P | Parameters and their defaults: numbers or booleans, set from systems with anim.set(name, value). |
triggers? | readonly T[] | Trigger names, set with anim.trigger(name); they last one animation step unless a transition uses them. |
fade? | number | Default crossfade seconds for transitions and play(). Default 0. |
states | { readonly [K in string]: AnimationStateSpec } | - |
transitions? | readonly TransitionSpec<NoInfer<S>, NoInfer<keyof P & string>, NoInfer<T>>[] | Checked in order every step; the first that holds fires. |