Slopcamera
Browse documentationReference · HTML render profiles: Motion, p5.js, Two.js, Paper Shaders, Three.js, vgpu

Reference

HTML render profiles: Motion, p5.js, Two.js, Paper Shaders, Three.js, vgpu

The seven locked browser render profiles, their shared deterministic contract, and the html catalog, scaffold, and render commands.

Slopcamera renders an authored HTML document to frames and video through slopcamera html. Seven named profiles admit exactly one tested library lock each; every profile shares the same deterministic render contract, so the choice is which substrate owns the visible surface. Rendering ships in the verified release and needs the admitted local Chrome runtime plus FFmpeg and FFprobe.

The shared render contract

Every profile runs under host-owned invariants that a library cannot replace:

  • One absolute clock. SlopcameraOverlay.onFrame receives a frozen frame carrying frame, timeMs, deltaMs, progress, width, and height. The page never sees a wall clock, and a renderer can request any frame independently.
  • Declared assets only. SlopcameraOverlay.asset(name) resolves resources named in the request; authored URLs and CDN specifiers are not fetched, and ambient network access is denied during the render.
  • Seeded entropy. SlopcameraOverlay.randomFor(key) returns stable keyed values, so a frame produces the same pixels whether it is requested first, last, or twice.
  • Exact locks. Each admitted module is one exact version with a verified digest, served through the overlay's private origin. A later upstream release changes nothing until it passes admission.
  • Async readiness. SlopcameraOverlay.ready(promise) holds the first frame until declared preparation settles.

Each adapter disables its library's own loop: Motion animations are paused and seeked, p5 runs noLoop() with one awaited redraw() per frame, Two.js keeps autostart: false with one manual render(), Three.js derives scene state from absolute time before rendering once, and Paper Shaders receives setFrame(timeMs).

The seven profiles

ProfileLocked librarySubstratePrimary job
plainnoneDOM, CSS, SVG, native CanvasTitles, cards, lower thirds, interface-like composition
motionMotion 12.42.2DOM and SVGSeekable entrances, transitions, and choreography
p5p5.js 2.3.2, instance modeImmediate-mode Canvas 2DGenerative drawings recomputed per frame
twoTwo.js 0.8.24, WebGL rendererRetained vector 2DNamed shapes an agent moves between frames
paper-shadersPaper Shaders 0.0.77WebGL shader mountConfigured treatments: gradients, grain, procedural fields
threeThree.js 0.185.1WebGL2 scene graphCameras, lighting, materials, geometry, and models
vgpuvgpu 0.3.1WebGPUAn explicit WGSL pass graph as the authored object

Choose the first profile whose primary job matches the work. Choose an HTML authoring surface explains the editing trade-offs behind the table.

Commands

slopcamera html catalog --json
slopcamera html scaffold <profile> --output <file.html>
slopcamera html render --input <scene.json> --dry-run --json
slopcamera html render --input <scene.json> --json

catalog lists the admitted profiles in recommendation order. scaffold writes a starter document for one profile and never replaces an existing file. render takes a request JSON naming the document, canvas, timing, library selection, and declared resources; --dry-run validates without rendering. A completed render retains the document, assets, request, and an editable project, and exports H.264 video with optional 48 kHz stereo AAC trimmed or padded to the declared duration, keeping a lossless RGB intermediate.

Limits

  • Only the exact tested locks execute. p5.js is LGPL-2.1, so conveying its cached artifact carries license obligations; Paper Shaders is Apache-2.0 with notice preservation.
  • Determinism is partly the author's job: visible state must derive from absolute time, declared parameters and assets, and keyed randomness. A deltaMs update loop is not absolute seek.
  • The vgpu overlay profile does not share GPU textures with the spatial renderer's WebGL2 and Spark profiles. A separate vgpu 0.4.1 native example uses its own provisioned Node and Dawn runtime and is not a registered studio engine.
  • macOS browser verification uses SwiftShader to prove availability, clock control, transparency, and offline behavior. It makes no claim about hardware GPU throughput.

To walk a complete render, use Render motion graphics from HTML or Make a music video from an HTML scene. Capabilities records what the installed host supports.