Feature Library

Circuit board from text

5.71 GPU · 0.15 CPU ms
A still of the Circuit board from text demo
Still
The live demo starts when it’s in view.Drag or use the arrow keys to turn the board · Enter to power it up again

Any word becomes a real-looking circuit board.

What it costs a frame

5.71 ms
0.15 ms
GPU
5.71 ms
CPU, median
0.15 ms
CPU, 95th pct
0.23 ms
Draw calls
0
Weight
Heavy

Measured 11 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: The word "Hello" (about 70 parts, 40 LEDs) powering up over 9 s, framed on the word, medium quality (1080p, 4× MSAA), the camera drifting, then held lit for a second and run again: the board quad, its edges, the instanced parts, a five-level bloom and the tone map; timed with its own timestamp queries. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring tool5.710.150.23
apple · Apple A19 Proin a browser tab · 16 November 20266.890.400.50
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 20261.700.290.52

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
WebGPUNeeds WebGPU: current Chrome and Edge, Safari 26+, Firefox 141+ on Windows.
Your browser
Checking…Looking for WebGPU
Depends on
NothingNo other packages

What it’s for

  1. Title cards and splash screens
  2. A stage moment that powers up a name
  3. Hardware, maker and engineering pages
  4. Loading moments with a progress to show
  5. Hero sections and event intros

Pitfalls, in brief

  1. Designing a board is CPU work (thinning, tracing and placing: about 20–80 ms for a word): do it once per word, not per frame, and debounce typing.
  2. The mask must be big enough: the letters are sampled at a 56th of their capitals’ height, so give textMask 100 px or more (default 120).
  3. Thin or script fonts make wandering centrelines; a heavy sans (weight 700–900) strings the cleanest LEDs.
  4. A long word makes a long board (the controller and the socket sit left of it, a chip right of it): with frame ‘board’ the letters get small.
  5. Draw at the canvas’s own width and height: size it (CSS size × devicePixelRatio) before drawing, or it draws at 300 × 150.
2 more in brief
  1. draw returns false when the last frame is still on the GPU: keep the view marked dirty and draw again next frame, or a final moment can be missed.
  2. Without WebGPU createCircuitBoard returns null: draw drawCircuitStill on a 2D canvas instead (the same board, from above, at the same power).
7 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From SpaciousPro. Fully custom code.

T. Y. Zhang & C. Y. Suen, A Fast Parallel Algorithm for Thinning Digital Patterns (1984): The letters are thinned to one-pixel centrelines by their two-pass algorithm before they are traced into lines.

Gunilla Borgefors, Distance Transformations in Digital Images (1986): The 3-4 chamfer distance gives each centreline point the stroke’s width there, which decides which spurs to prune.

Edsger W. Dijkstra, A Note on Two Problems in Connexion with Graphs (1959): Each letter’s distances along its lines from where the current enters are shortest paths.

Mark Jarzynski & Marc Olano, Hash Functions for GPU Rendering (2020): Their PCG hash (from Melissa O’Neill’s PCG family) seeds the board’s design and the shaders’ noise and dither, in place of the source’s generators.

Walter et al., Microfacet Models for Refraction through Rough Surfaces (2007); Christophe Schlick (1994): The GGX distribution with a Smith visibility, and Schlick’s Fresnel approximation, light the copper, the gold, the mask’s coat and the parts.

Marius Bjørge, Bandwidth-Efficient Rendering (SIGGRAPH 2015): The bloom is his dual filter: five-tap halvings, then eight-tap tents back up.

circuit boardpcbtext effectskeletonthinningproceduralledsglowwgslraw webgpuinstancingbloomdeterministic

Near it in the frame