skia
    Preparing search index...

    Interface SkottieAnimation

    CanvasKit is built with Emscripten and Embind. Embind adds the following methods to all objects that are exposed with it. This _type field is necessary for the TypeScript compiler to differentiate between opaque types such as Shader and ColorFilter. It doesn't exist at runtime.

    interface SkottieAnimation {
        _type: "SkottieAnimation";
        delete(): void;
        deleteLater(): void;
        duration(): number;
        fps(): number;
        isAliasOf(other: any): boolean;
        isDeleted(): boolean;
        render(canvas: Canvas, dstRect?: InputRect): void;
        seek(t: number, damageRect?: Rect): Rect;
        seekFrame(frame: number, damageRect?: Rect): Rect;
        size(outputSize?: Point): Point;
        version(): string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    _type: "SkottieAnimation"

    Methods

    • Returns the animation duration in seconds.

      Returns number

    • Returns the animation frame rate (frames / second).

      Returns number

    • [deprecated] - use seekFrame

      Parameters

      • t: number

        value from [0.0, 1.0]; 0 is first frame, 1 is final frame.

      • OptionaldamageRect: Rect

        will copy damage frame into this if provided.

      Returns Rect

    • Update the animation state to match |t|, specified as a frame index i.e. relative to duration() * fps().

      Returns the rectangle that was affected by this animation.

      Parameters

      • frame: number

        Fractional values are allowed and meaningful - e.g. 0.0 -> first frame 1.0 -> second frame 0.5 -> halfway between first and second frame

      • OptionaldamageRect: Rect

        will copy damage frame into this if provided.

      Returns Rect

    • Return the size of this animation.

      Parameters

      • OptionaloutputSize: Point

        If provided, the size will be copied into here as width, height.

      Returns Point