mwg API
    Preparing search index...

    Interface FreeMoverOptions

    interface FreeMoverOptions {
        idleAnimation?: (facing: number) => string;
        speed?: number;
        walkAnimation?: (facing: number) => string;
    }
    Index
    idleAnimation?: (facing: number) => string

    an animation to play while standing still, given the current facing in radians

    speed?: number

    world units crossed per second

    walkAnimation?: (facing: number) => string

    An animation to play while moving, given the current facing in radians (0 along +x, increasing clockwise in screen space). Bucketing that into however many directions a sprite sheet actually has (4, 8, whatever) is the game's own job - this stays unopinionated about how many facings exist, the same way GridMover's callbacks are unopinionated about animation names.