interface TokenAnimationContext {
    chain: {
        options: Omit<TokenAnimationOptions, "duration"> & { duration: number };
        promise: Promise<void>;
        reject: (error: Error) => void;
        resolve: () => void;
        to: Partial<TokenAnimationData>;
    }[];
    duration: number;
    name: string
    | symbol;
    onAnimate: (context: TokenAnimationContext) => void[];
    postAnimate: (context: TokenAnimationContext) => void[];
    preAnimate: (context: TokenAnimationContext) => Promise<void>[];
    promise: Promise<void>;
    time: number;
    to: Partial<TokenAnimationData>;
}

Properties

chain: {
    options: Omit<TokenAnimationOptions, "duration"> & { duration: number };
    promise: Promise<void>;
    reject: (error: Error) => void;
    resolve: () => void;
    to: Partial<TokenAnimationData>;
}[]

The animation chain.

duration: number

The duration of the animation.

name: string | symbol

The name of the animation.

onAnimate: (context: TokenAnimationContext) => void[]

Synchronous functions that are executed each frame after ontick and before foundry.canvas.placeables.Token#_onAnimationUpdate.

postAnimate: (context: TokenAnimationContext) => void[]

Synchronous functions that are executed after the animation ended. They may be executed before the preAnimate functions have finished if the animation is terminated.

preAnimate: (context: TokenAnimationContext) => Promise<void>[]

Asynchronous functions that are executed before the animation starts

promise: Promise<void>

The promise of the animation that resolves once it completes or is terminated.

time: number

The current time of the animation.

to: Partial<TokenAnimationData>

The final animation state.