Strata - v1.4.10
    Preparing search index...

    Interface AnimationMachineReturn

    Return type for useAnimationMachine hook.

    interface AnimationMachineReturn {
        context: AnimationContext;
        currentState: string;
        isInState: (state: string) => boolean;
        pause: () => void;
        resume: () => void;
        send: (event: AnimationEvent) => void;
        setSpeed: (speed: number) => void;
        transitionTo: (state: string, duration?: number) => void;
    }
    Index

    Properties

    Current animation context

    currentState: string

    Current state name

    isInState: (state: string) => boolean

    Check if machine is in a specific state

    pause: () => void

    Pause the current animation

    resume: () => void

    Resume the current animation

    send: (event: AnimationEvent) => void

    Send an event to the machine

    setSpeed: (speed: number) => void

    Set playback speed

    transitionTo: (state: string, duration?: number) => void

    Transition to a specific state