Module

x/canvas/mod.ts>SkottieAnimation

Canvas API for Deno, ported from canvaskit-wasm (Skia).
Go to Latest
interface SkottieAnimation
import { type SkottieAnimation } from "https://deno.land/x/canvas@v1.0.0/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