JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 63
  • Score
    100M100P100Q79756F
  • License MIT

Browser Canvas and WebCodecs rendering engine for ui2v video projects

Package Exports

  • @ui2v/engine

Readme

@ui2v/engine

Chinese

Browser rendering engine for ui2v. It renders projects to Canvas and supports browser-native MP4 export through WebCodecs.

Install

npm install @ui2v/engine

Usage

import { Ui2vEngine } from '@ui2v/engine';
import type { AnimationProject } from '@ui2v/core';

const canvas = document.querySelector('canvas')!;
const engine = new Ui2vEngine(canvas);

await engine.loadProject(project as AnimationProject);
await engine.renderFrameAsync(1.25);
engine.dispose();

Key Exports

  • Ui2vEngine for browser Canvas rendering.
  • TemplateCanvasAdapter for runtime-core adapter integration.
  • CustomCodeRenderer for custom-code template layers.
  • CanvasDrawCommandExecutor for runtime draw command streams.
  • WebCodecsExporter for browser-native MP4 encoding.

Notes

  • This package expects browser APIs such as DOM, Canvas, and WebCodecs.
  • The standalone CLI path does not require Electron, FFmpeg, or node-canvas.
  • Some compatibility exports remain for older ui2v integration paths.

License

MIT