mwg API
    Preparing search index...

    Interface ActorAnimatorOptions

    import type { ActorAnimatorOptions } from '@datamoc/mw_games/two-d/render';

    const options: ActorAnimatorOptions = {
    animationName: (state, facing) => `${state}-${facing}`,
    variant: 'down',
    };
    interface ActorAnimatorOptions {
        animationName: (state: ActorAnimationState, variant: string) => string;
        variant?: string;
    }
    Index
    animationName: (state: ActorAnimationState, variant: string) => string

    Names a state's animation, given whatever varies it - a facing direction for a grid character, an empty string for one that does not need it. Looked up through AnimatedSprite.has, so a state with nothing registered for the current variant is silently skipped rather than throwing - the same degrade-to-nothing GridMover already relies on for a sprite with no walk cycle at all.

    variant?: string

    the variant to start in; defaults to the empty string