Skip to content

Intermact API Reference / @intermact/react / exportCanvasGif

Function: exportCanvasGif()

exportCanvasGif(canvas, player, options?): Promise<Blob>

Defined in: react/src/export/gif.ts:217

Deterministically export an animated GIF by seeking the player frame by frame, reading back the canvas pixels, and encoding (design.md §17). The canvas must be created with preserveDrawingBuffer: true for WebGL readback to work.

Parameters

canvas

HTMLCanvasElement

player

Player

options?

ExportGifOptions = {}

Returns

Promise<Blob>

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)