Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Interface TokenMovementOptions

    interface TokenMovementOptions {
        animate?: boolean;
        animation?: {
            duration?: number;
            easing?: CanvasAnimationEasingFunction;
            linkToMovement?: boolean;
            movementSpeed?: number;
        };
        autoRotate?: boolean;
        constrainOptions?: Omit<
            TokenConstrainMovementPathOptions,
            "preview"
            | "history"
            | "measureOptions",
        >;
        measureOptions?: Omit<TokenMeasureMovementPathOptions, "preview">;
        method?: TokenMovementMethod;
        pan?:
            | boolean
            | { duration?: number; force?: boolean; transitionType?: string };
        planned?: boolean;
        showRuler?: boolean;
        terrainOptions?: Omit<TokenCreateTerrainMovementPathOptions, "preview">;
    }
    Index

    Properties

    animate?: boolean

    Animate movement. Default: true.

    animation?: {
        duration?: number;
        easing?: CanvasAnimationEasingFunction;
        linkToMovement?: boolean;
        movementSpeed?: number;
    }

    The animation options.

    Type Declaration

    • Optionalduration?: number

      The duration of the animation in milliseconds (nonnegative).

    • Optionaleasing?: CanvasAnimationEasingFunction

      The easing function of the animation of non-movement properties. Default: undefined (linear).

    • OptionallinkToMovement?: boolean

      Set the duration of non-movement properties to the animation.

    • OptionalmovementSpeed?: number

      The base movement speed in grid size per second (positive).

    autoRotate?: boolean

    Automatically rotate the token in the direction of movement? Default: game.settings.get("core", "tokenAutoRotate") if method is "dragging" or "keyboard" otherwise false.

    constrainOptions?: Omit<
        TokenConstrainMovementPathOptions,
        "preview"
        | "history"
        | "measureOptions",
    >

    The options to constrain movement.

    measureOptions?: Omit<TokenMeasureMovementPathOptions, "preview">

    The options to measure movement.

    The method of movement. Default: "api".

    pan?: boolean | { duration?: number; force?: boolean; transitionType?: string }

    Pan the canvas (with transition animation) to the destination if the token is controlled? Default: true.

    planned?: boolean

    Don't start the movement yet? Default: false.

    showRuler?: boolean

    Show the ruler during the movement animation of the token? Default: true if method is "dragging" otherwise false. duration of movement. Default: false.

    terrainOptions?: Omit<TokenCreateTerrainMovementPathOptions, "preview">

    The terrain movement options.