Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
interface SkottieAnimation
import { type SkottieAnimation } from "https://deno.land/x/canvaseno@v1.0.2/mod.ts";

Methods

duration(): number

Returns the animation duration in seconds.

fps(): number

Returns the animation frame rate (frames / second).

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

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

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

[deprecated] - use seekFrame

seekFrame(frame: number, damageRect?: SkRect): SkRect

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(): SkPoint
version(): string