Skip to main content
Module

x/canvas/mod.ts>SkottieAnimation

Canvas API for Deno, ported from canvaskit-wasm (Skia).
Latest
interface SkottieAnimation
import { type SkottieAnimation } from "https://deno.land/x/canvas@v1.4.1/mod.ts";

Methods

duration(): number

Returns the animation duration in seconds.

fps(): number

Returns the animation frame rate (frames / second).

render(canvas: Canvas, dstRect?: InputRect): void

Draws current animation frame. Must call seek or seekFrame first.

seek(t: number, damageRect?: Rect): Rect

[deprecated] - use seekFrame

seekFrame(frame: number, damageRect?: Rect): 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.

size(outputSize?: Point): Point

Return the size of this animation.

version(): string