Configuration for creating an animation state machine.
const config: AnimationMachineConfig = { id: 'character-animation', initial: 'idle', states: { idle: { animation: 'Idle', loop: true }, walk: { animation: 'Walk', loop: true, speed: 1.0 }, run: { animation: 'Run', loop: true, speed: 1.2 } }, transitions: [ { from: 'idle', to: 'walk', event: 'MOVE' }, { from: 'walk', to: 'run', event: 'SPRINT' } ]}; Copy
const config: AnimationMachineConfig = { id: 'character-animation', initial: 'idle', states: { idle: { animation: 'Idle', loop: true }, walk: { animation: 'Walk', loop: true, speed: 1.0 }, run: { animation: 'Run', loop: true, speed: 1.2 } }, transitions: [ { from: 'idle', to: 'walk', event: 'MOVE' }, { from: 'walk', to: 'run', event: 'SPRINT' } ]};
Optional
Blend tree configurations by name
Default cross-fade duration for all transitions
Unique machine identifier
Initial state name
Map of state names to configurations
Transition definitions
Configuration for creating an animation state machine.
Example