Repository navigation
v1.1.0
Release Notes: Off-Main-Thread Rendering
2026-09-30
Highlights
- Rendering now runs in a Web Worker. All five render modes (ASCII, dither, halftone, voxel, lines) and the full effects pipeline draw on an
OffscreenCanvasowned by a worker, so the UI (sliders, buttons, panels) no longer competes with the render loop. - Same renderers, same settings. Existing renderers were adapted rather than rewritten. Rendering logic, settings, and the registry are unchanged.
- Added: footer in the settings panel.
Added
- Footer in the settings panel.
src/worker/render.worker.ts: owns the canvas and runs the render pipeline.src/worker/renderWorkerController.ts: the only main-thread object that talks to the worker (canvas transfer, frame back-pressure, settings sync, capture and text-export requests, stats).src/worker/protocol.ts: typed messages shared by both sides.
Changed
Viewportno longer runsuseFrameLoop. It creates the canvas and worker on mount, then a small frame pump hands camera frames to the worker.useFrameLoopis no longer used byViewport.- The canvas is created inside an effect instead of JSX. A canvas can only be transferred to a worker once, so this keeps React StrictMode's double mount from throwing
InvalidStateError. - Canvas resizing goes through the worker. The main thread can no longer set
width/heighton the transferred canvas. - Performance stats (fps, render time) are posted by the worker every ~20 frames instead of being sampled with
Math.random().
Full Changelog
url: v1.0.1...v1.1.0