JSPM

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

Runtime core for ui2v scene graphs, timelines, frame plans, and adapters

Package Exports

  • @ui2v/runtime-core

Readme

@ui2v/runtime-core

Chinese

DOM-free runtime foundation for ui2v compositions.

Runtime Core owns scene graph normalization, timeline evaluation, deterministic frame plans, dependency metadata, adapter routing, multi-adapter coordination, and renderer-neutral draw commands. It does not draw pixels.

Install

npm install @ui2v/runtime-core

Frame Plans

import { createVideoFramePlan } from '@ui2v/runtime-core';

const frames = createVideoFramePlan({ duration: 4, fps: 30 });

Exporters should render frame.renderTime and encode with frame.timestampUs and frame.durationUs.

Adapter Routing

import { createAdapterRoutingPlan, createRenderPlan } from '@ui2v/runtime-core';

const routing = createAdapterRoutingPlan(createRenderPlan(frame));

Routing metadata lets Canvas, Three.js, Pixi, Lottie, DOM, and future adapters share one timeline.

Draw Commands

import { createDrawCommandStream } from '@ui2v/runtime-core';

const stream = createDrawCommandStream(routing, {
  backgroundColor: composition.backgroundColor,
  size: composition.resolution,
});

The initial command set includes clear, save, restore, setTransform, setOpacity, drawLayer, and custom.

License

MIT