UNPKG

modern-canvas

Version:

A JavaScript WebGL rendering engine. only the ESM.

19 lines (18 loc) 653 B
import type { Fonts } from 'modern-font'; import type { EngineData, EngineProperties } from './Engine'; import { Engine } from './Engine'; export interface RenderOptions extends Partial<EngineProperties> { data: EngineData; width: number; height: number; debug?: boolean; fonts?: Fonts; keyframes?: number[]; onBefore?: (engine: Engine) => void | Promise<void>; onKeyframe?: (frame: Uint8ClampedArray<ArrayBuffer>, ctx: { currentTime: number; duration: number; progress: number; }) => void | Promise<void>; } export declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;