skia
    Preparing search index...

    Interface ManagedSkottieAnimation

    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 ManagedSkottieAnimation {
        _type: "SkottieAnimation";
        attachEditor(id: string, index: number): boolean;
        delete(): void;
        deleteLater(): void;
        dispatchEditorKey(key: string): boolean;
        dispatchEditorPointer(
            x: number,
            y: number,
            state: EmbindEnumEntity,
            modifier: EmbindEnumEntity,
        ): boolean;
        duration(): number;
        enableEditor(enable: boolean): void;
        fps(): number;
        getColorProps(): ColorProperty[];
        getColorSlot(key: string): Color | null;
        getMarkers(): AnimationMarker[];
        getOpacityProps(): OpacityProperty[];
        getScalarSlot(key: string): number | null;
        getSlotInfo(): SlotInfo;
        getTextProps(): TextProperty[];
        getTextSlot(key: string): SlottableTextProperty | null;
        getTransformProps(): TransformProperty[];
        getVec2Slot(key: string): Point | null;
        isAliasOf(other: any): boolean;
        isDeleted(): boolean;
        render(canvas: Canvas, dstRect?: InputRect): void;
        seek(t: number, damageRect?: Rect): Rect;
        seekFrame(frame: number, damageRect?: Rect): Rect;
        setColor(key: string, color: InputColor): boolean;
        setColorSlot(key: string, color: InputColor): boolean;
        setEditorCursorWeight(w: number): void;
        setImageSlot(key: string, assetName: string): boolean;
        setOpacity(key: string, opacity: number): boolean;
        setScalarSlot(key: string, scalar: number): boolean;
        setText(key: string, text: string, size: number): boolean;
        setTextSlot(key: string, text: SlottableTextProperty): boolean;
        setTransform(
            key: string,
            anchor: InputPoint,
            position: InputPoint,
            scale: InputPoint,
            rotation: number,
            skew: number,
            skew_axis: number,
        ): boolean;
        setVec2Slot(key: string, vec2: InputPoint): boolean;
        size(outputSize?: Point): Point;
        version(): string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    _type: "SkottieAnimation"

    Methods

    • Parameters

      • id: string
      • index: number

      Returns boolean

    • Parameters

      • key: string

      Returns boolean

    • Parameters

      • enable: boolean

      Returns void

    • Parameters

      • key: string

      Returns number | null

    • [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

    • Parameters

      • w: number

      Returns void

    • Parameters

      • key: string
      • assetName: string

      Returns boolean

    • Parameters

      • key: string
      • opacity: number

      Returns boolean

    • Parameters

      • key: string
      • scalar: number

      Returns boolean

    • Parameters

      • key: string
      • text: string
      • size: number

      Returns boolean