Skip to content

v1.1.0

Choose a tag to compare

@pshycodr pshycodr released this 30 Sep 11:57
· 15 commits to main since this release

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 OffscreenCanvas owned 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

  • Viewport no longer runs useFrameLoop. It creates the canvas and worker on mount, then a small frame pump hands camera frames to the worker. useFrameLoop is no longer used by Viewport.
  • 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/height on 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