Strata - v1.4.10
    Preparing search index...

    Interface AnimationMachineConfig

    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' }
    ]
    };
    interface AnimationMachineConfig {
        blendTrees?: Record<string, BlendTreeConfig>;
        defaultCrossFadeDuration?: number;
        id: string;
        initial: string;
        states: Record<AnimationStateName, Omit<AnimationStateConfig, "name">>;
        transitions?: AnimationTransitionConfig[];
    }
    Index

    Properties

    blendTrees?: Record<string, BlendTreeConfig>

    Blend tree configurations by name

    defaultCrossFadeDuration?: number

    Default cross-fade duration for all transitions

    id: string

    Unique machine identifier

    initial: string

    Initial state name

    states: Record<AnimationStateName, Omit<AnimationStateConfig, "name">>

    Map of state names to configurations

    Transition definitions