Package Exports
- @ui2v/engine
Readme
@ui2v/engine
Browser rendering engine for ui2v. It renders projects to Canvas and supports browser-native MP4 export through WebCodecs.
Install
npm install @ui2v/engineUsage
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
Ui2vEnginefor browser Canvas rendering.TemplateCanvasAdapterfor runtime-core adapter integration.CustomCodeRendererforcustom-codetemplate layers.CanvasDrawCommandExecutorfor runtime draw command streams.WebCodecsExporterfor 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