Skip to content

Kiln API / kiln / TransitionSpec

Interface: TransitionSpec<S, P, T> ​

An edge of the graph. All of when, trigger and exitTime that are given must hold.

Type Parameters ​

Type ParameterDefault type
S extends stringstring
P extends stringstring
T extends stringstring

Properties ​

PropertyTypeDescription
from"*" | S | readonly S[]A state, a list of states, or '*' for any state other than to.
toS-
when?{ readonly [K in string]?: ParamTest }Parameter tests: { speed: { gt: 0.1 }, grounded: true }.
trigger?TFires when this trigger was set (and consumes it).
exitTime?numberOnly once the current clip's normalized time reached this (1 = one full play, the end of a 'once' clip).
fade?numberCrossfade seconds (skeletal; sprites switch at once). Default: the graph's fade.