Deterministic
f(scene, t) → ComputedFrame. Given a scene document and a time value, the output is always identical. No global state, no side effects.
Headless, isomorphic XML scene-graph for spatial overlays and compositing. Zero dependencies. Pure determinism.
A spatial scene-graph format for rendering layered visual overlays — title cards, film credits, lower thirds, motion graphics — into any rendering target.
For AI coding agents: llms.txt · llms-full.txt · llms-api.txt
| Package | Purpose | Environment |
|---|---|---|
@wity/scene-core | Parse, evaluate, serialize, validate — the full headless engine | Browser + Node.js |
@wity/scene-headless | Authoring state — selection, history, undo, snap, timeline | Browser + Node.js |
@wity/scene-player | HeadlessPlayer — drives evaluate() at playback rate via RAF | Browser + Node.js |
@wity/scene-to-video | Graphics compiler — ws-rect/ws-text/ws-image → MP4 via node-canvas + FFmpeg | Node.js / Lambda |
@wity/scene-compose | Full compositor — ws-video + ws-audio + graphics overlay → final MP4 | Node.js / Lambda |
@wity/scene-to-pdf | Document renderer — scene snapshot → PDF (standard or print-ready) | Node.js / Lambda |
@wity/scene-to-pptx | Presentation renderer — scene snapshots → PowerPoint / Keynote / Google Slides | Node.js / Lambda |
@wity/scene | Convenience re-export of scene-core | Browser + Node.js |
Standalone Lambda services that are not published as npm packages.
| Service | Purpose | Environment |
|---|---|---|
witySceneRender | Render gateway — single public entry point for all scene rendering (mp4, pdf, pptx) | Node.js / Lambda |
wityAudioProfile | Measure windowed RMS loudness over time — per-element and power-mixed, in dBFS | Node.js / Lambda |
import { parse, evaluate } from '@wity/scene-core';
const xml = `
<wity-scene version="1.0" width="1920" height="1080" dur="6.0">
<ws-layer id="overlay" z="10">
<ws-text x="50%" y="40%" anchor="center"
font-size="5%" color="#ffffff"
animate-in="fade-up" animate-dur="0.6">
Opening Night
</ws-text>
</ws-layer>
</wity-scene>`;
const scene = parse(xml);
const frame = evaluate(scene, 1.0); // t = 1 second
for (const el of frame.elements) {
if (el.visible) {
console.log(el.tag, el.x, el.y, el.opacity, el.content);
}
}