Skip to content

Architecture ​

UberScene is six npm packages and one experimental native binary. How it fits together shows the path from a file to a picture. This page goes one level down: what each package holds, where it runs, what it depends on, and where in the repository to make a change. Read it before you change UberScene itself.

The packages ​

PackageHoldsRuns in
@uberscene/kitWhat a file imports: the elements, the ready-made components, the free-code hooks and helpers, the theme, and the vocabulary as data (@uberscene/kit/schema). It doesn't place, edit or draw anything.anywhere
@uberscene/sdkWhat a tool imports: loadModule, the resolver, the Executor and its actions, the patch log, foldToSource and the lint.browser or Node, no DOM
@uberscene/playerPlays a resolved file: decoders, compositor, painter, overlays, sound and clock. @uberscene/player/engine is the part without a DOM.browser
@uberscene/graphicsthree.js and Motion on the video's clock, for <Three>, <Motion> and free code.browser
@uberscene/renderThe export: loads the file in Node, serves it to headless Chrome, runs the player there and joins what it encodes. The command line lives here too (@uberscene/render/cli).Node and Chrome
ubersceneThe command line people install, a thin wrapper over @uberscene/render/cli (CLI).Node
native/uberscene-codec, a Rust codec process the export can use instead of Chrome's codecs (Native codecs). Not on npm yet.native

What depends on what ​

text
kit ◄── sdk ◄── player ◄── render ◄── uberscene
 ▲                           │
 └──────── graphics ◄────────┘

Dependencies run one way. The SDK and graphics build on the kit, the player on the SDK, and the export on the player and graphics. The kit and the SDK never touch the DOM, so a server can resolve, lint and edit a file without a browser. Only drawing needs one, which is why the export brings its own.

Where to make a change ​

To changeLook in
What a file may write: a prop, an element, an effectpackages/kit/src/jsx/schemas, packages/kit/src/components
Where an element lands in timepackages/sdk, the resolver
An edit an editor runspackages/sdk, the actions
How a frame is drawnpackages/player/src/model (the plan) and packages/player/src/render (the painter)
How sound is mixedpackages/player/src/model/audio-plan.ts and packages/player/src/audio
How the export runspackages/render
The native codecsnative/ and native/PROTOCOL.md

Next ​

MIT licensed.