UI & interactionPanels as living cells that divide
A page’s panels drawn as living cells, in raw WebGPU (WebGL2 where it is missing).
What it costs a frame
- GPU
- 0.20 ms
- CPU, median
- 0.17 ms
- CPU, 95th pct
- 0.34 ms
- Draw calls
- 0
- Weight
- Light
Measured 13 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged GPU 0.20–0.20, CPU 0.17–0.17 ms). What ran: The three screens in turn, a screen change every 1.6 s (each cell pinching in two, the halves migrating, the leftovers fusing), membranes wobbling and a cell hovered; one full-screen pass over up to 12 cells, timed with its own timestamp queries. Phones: tiers are being measured next.
| Machine | GPU ms | CPU ms | CPU p95 |
|---|---|---|---|
| RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring tool | 0.20 | 0.17 | 0.34 |
| apple · Apple A19 Proin a browser tab · 16 November 2026 | 6.72 | 0.18 | 0.66 |
| Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026 | 0.26 | 0.24 | 0.48 |
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.
How steadily it runs on Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258V · in a browser tab
- Typical frame ?
- 16.66 ms
- 1% low ?
- 52 fps
- Varies by ?
- ±0.53 ms
All metricsIntel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258V · in a browser tab
Frames run on a 60 Hz timer (a page demo), so most frames take about one tick, 16.7 ms: the spread around it is what matters.
Frames
- Median (p50) ?
- 16.66 ms
- p95 ?
- 17.45 ms
- p99 ?
- 18.00 ms
- Slowest ?
- 24.50 ms
- Mean ?
- 16.72 ms
- Standard deviation ?
- 0.53 ms
- 1% low ?
- 52 fps
- 0.1% low ?
- 41 fps
- Hitches ?
- 0 of 600
- Over budget ?
- 0 of 600
Main thread
- Long tasks ?
- 0
- Long frames ?
- 0
- Event-loop delay ?
- 0.1 / 0.6 / 1.4 ms
Input
Memory
- JavaScript heap ?
- 83.3 → 83.1 MB
- Growth ?
- -0.13 MB
What it needs
- Renders with
- WebGPU or WebGLWebGPU where there is one, WebGL2 where there is not.
- Your browser
- Runs hereNo WebGPU needed
- Depends on
- NothingNo other packages
What it’s for
- A screen or tab change that shows where each panel went
- An organic, biological theme for a dashboard or a science app
- Panels that merge and split as a layout changes
- Cards that liven on hover and focus without moving
- Teaching cell division
Pitfalls, in brief
- Measure the new screen before it shows: lay it out with its content transparent (opacity 0, not display: none), read the cells’ rects, then fade the content in when the halves arrive.
- A change during a change must start from where the halves are, not from the old screen’s panels: take mitosisAt’s current rects and plan with split: false from PINCH, or every click doubles the cells and they jump.
- The union radius must be smaller than the gap the halves pull apart (20 against 30 px), or the neck never parts and the two halves stay one blob.
- The field is a loop over every cell per pixel.
- Text sits on the cytoplasm, which is thin near the membrane: keep content padded well inside (about 1.5 rem) and the cytoplasm dense in the middle (fill), and give the text the look’s own ink colour, since the canvas sets the colour under it.
6 more in brief
- The canvas is premultiplied, and an additive glow can exceed its alpha: clamp the colour to the alpha (the shader does), or the rim shows bright fringes over a light page.
- Under reduced motion swap the division for a short fade and hold the membranes still (wobble 0, no clock): the panels change at once and nothing moves.
- Without WebGPU the membranes draw with WebGL2 from membranes-glsl.ts, a line-for-line twin of the WGSL with the cells in a uniform array: change one shader and change the other.
- The WebGPU device can be lost (a driver reset, a sleeping laptop): frame() then returns false for good.
- splitRect keeps the source’s shape: the first half moves out by half the gap and the second stays at the cell’s far edge, so the halves end 1.5 gaps apart (45 px for the default 30), a little to the first side.
- Hide the old screen’s content at once when the change starts: two screens of text over dividing cells is unreadable, and the pinch reads as the change by itself.
Where it comes from
From HaTac. Fully custom code.
Inigo Quilez, Smooth minimum: The polynomial smooth minimum (smin) that joins two cells with a neck, kept with this credit.
Inigo Quilez, 2D distance functions: sdRoundBox, the shape of every cell.
Ken Perlin, An Image Synthesizer (1985): Gradient noise, the wobble of each membrane (written here with a PCG hash).
Mark Jarzynski & Marc Olano, Hash Functions for GPU Rendering (2020): The PCG2D hash under the noise and the organelles (it replaces the mock-up’s shared hash).
WAI-ARIA Authoring Practices Guide (W3C): The tabs pattern for the screens (automatic activation, arrows, Home and End).


