Feature Library

Voxel dissolve

<0.01 GPU · 0.14 CPU ms
A still of the Voxel dissolve demo
Still
The live demo starts when it’s in view.Dismiss a card with ×, bring it back from its place · Show a toast · Archive the week

An element dissolves, or assembles, cell by cell: a CSS Paint Worklet masks it, WAAPI drives a registered property, and the calls return promises.

What it costs a frame

<0.01 ms
0.14 ms
GPU
<0.01 ms
CPU, median
0.14 ms
CPU, 95th pct
0.59 ms
Draw calls
0
Weight
Light

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: Measured with the demo running itself: every 40 frames a card dissolves or assembles (16 px cells, about 300 cubes), a toast comes and goes, and the dialog opens and closes, so the worklet repaints and the cubes fly most of the time. GPU time is the cube pass alone, from its 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 tool<0.010.140.59
apple · Apple A19 Proin a browser tab · 16 November 2026not timed<0.010.02
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 20260.070.180.57

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.68 ms
1% low ?
53 fps
Varies by ?
±0.48 ms
All metricsIntel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258V · in a browser tab
p50p95p9916.00 ms18.41 ms +
How long each frame took. Most frames sit in the tall bars; a long tail to the right is hitching.

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.68 ms
p95 ?
17.57 ms
p99 ?
18.02 ms
Slowest ?
21.38 ms
Mean ?
16.75 ms
Standard deviation ?
0.48 ms
1% low ?
53 fps
0.1% low ?
47 fps
Hitches ?
0 of 600
Over budget ?
0 of 600

Main thread

Long tasks ?
0
Long frames ?
0
Event-loop delay ?
0.0 / 0.5 / 1.3 ms

Input

No input during this run. A browser-tab run plays none.

Memory

JavaScript heap ?
89.8 → 95.8 MB
Growth ?
+6.09 MB

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. Dismissing a card, a row or a panel
  2. Toasts and notices that arrive and leave
  3. Dialogs and sheets opening and closing
  4. Archiving or clearing a board
  5. Revealing content after it loads
  6. Game and sci-fi menus

Pitfalls, in brief

  1. The worklet loads by URL and must be same-origin under a strict Content Security Policy: never a blob: or data: URL.
  2. Paint worklets run in Chrome and Edge only (2026): Firefox and Safari get the fade, and so does a run that starts before the worklet has loaded.
  3. Keep dissolve-paint.js and cells.ts in step: the mask and the cubes agree only while both compute the same moment.
  4. The mask covers the border box and a pad round it (24 px), so a shadow wider than the pad is cut while it runs.
  5. The lit front is drawn by the element’s ::after while it runs: an element that uses its own ::after loses it for that time.
4 more in brief
  1. A run sets position: relative on a static element (taken off afterwards), so the front sits on it; elements under a CSS transform (a scale-in) get cubes at their untransformed box.
  2. A dissolve makes the element inert at once and hidden (visibility) at the end: move focus out first, as the demo does, or it falls to the body.
  3. One WAAPI animation drives a registered property, which repaints the worklet each frame on the main thread: fine for cards and dialogs (a few thousand cells), not for a full-page element at small cells. fitCell() grows the cell past 12 000 cells.
  4. The cubes’ canvas has pointer-events: none and is hidden while nothing flies.
9 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From My other apps. Fully custom code.

Matthias Teschner et al., Optimized Spatial Hashing for Collision Detection of Deformable Objects (VMV 2003): The three large primes the cell hash multiplies i, j and the seed by.

Thomas Mueller, integer hash finaliser (0x45d9f3b): The two multiply-xorshift rounds that mix the cell hash, as published in his answer.

CSS Painting API (CSS Houdini, W3C): registerPaint and paint() as a mask image; the progress is a registered custom property (@property) so WAAPI can animate it.

css paint worklethoudinimaskweb animationsregistered custom property@propertyraw webgpuwgslinteger hashparticlestransitionsdom + gpureduced motiondraw on demandno dependencies

Near it in the frame