Feature Library

Passages that reveal as you read

<0.01 GPU · 0.10 CPU ms
A still of the Passages that reveal as you read demo
Still
The live demo starts when it’s in view.Scroll the memo: each bar burns as it comes into view, and the archive thaws · Reveal all, or Again

A passage hidden under a material until the reader reaches it.

What it costs a frame

<0.01 ms
0.10 ms
GPU
<0.01 ms
CPU, median
0.10 ms
CPU, 95th pct
0.41 ms
Draw calls
0
Weight
Light

Measured 14 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.01–<0.01, CPU 0.09–0.10 ms). What ran: Measured with the demo running itself from its first frame: every 1.8 s the passages in view are hidden and revealed again, turn about at the top of the memo (bars burning in reading order, with their embers) and at the archive (three slabs thawing). The controller is driven from the demo’s update(), so CPU time is its frame (starting passages, reading rects, the thaw) and GPU time the overlay’s pass (slabs and embers), from its timestamp queries. The bars’ masks themselves are CSS animations, outside both. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring tool<0.010.100.41
apple · Apple A19 Proin a browser tab · 16 November 20260.640.802.08
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 20260.070.150.55

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 ?
54 fps
Varies by ?
±0.37 ms
All metricsIntel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258V · in a browser tab
p50p95p9916.02 ms18.42 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.31 ms
p99 ?
17.86 ms
Slowest ?
19.13 ms
Mean ?
16.70 ms
Standard deviation ?
0.37 ms
1% low ?
54 fps
0.1% low ?
52 fps
Hitches ?
0 of 600
Over budget ?
0 of 600

Main thread

Long tasks ?
0
Long frames ?
0
Event-loop delay ?
0.0 / 1.4 / 2.1 ms

Input

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

Memory

JavaScript heap ?
92.6 → 86.1 MB
Growth ?
-6.58 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. Reports, briefs and long reads that hand out their findings as you reach them
  2. Spoilers, answers and punchlines held back until the reader gets there
  3. Quizzes and lessons that show the answer on demand
  4. Archives and changelogs where older notes feel older
  5. Onboarding that reveals each step as it scrolls in

Pitfalls, in brief

  1. This hides nothing. The words are in the page from the start, for screen readers, search and copy: never use it for anything that must stay secret.
  2. A bar must be one box.
  3. The bar is the element’s ::before and the glowing edge its ::after while it burns: an element that uses its own pseudo-elements loses them for that time.
  4. Ice is drawn over the passage on the overlay canvas, so the canvas must cover the scroller without scrolling with it: put it in the scroller’s parent (container), not in the scroller.
  5. An ice passage’s words must sit in child elements: the faint words under the slab and the frost’s fade are set on its children.
4 more in brief
  1. Without WebGPU, a bar still burns (the mask and edge are CSS) but sheds no embers, and ice frosts in CSS and fades.
  2. Bars reached together go one after another, a beat (gap) apart; a bar scrolled away before its turn waits for the reader to come back. reveal() and revealAll() go whatever is in view.
  3. Masks and edges are data: URLs in custom properties: fine under a Content Security Policy that allows img-src data:, as this library’s does.
  4. Forced colours drop the bars and the frost and show the words: the system’s colours would otherwise paint the bar away and leave transparent text.
9 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From HaTac. Fully custom code.

Mark Jarzynski and Marc Olano, Hash Functions for GPU Rendering (JCGT 2020): The PCG hash every random number comes from, the same in JavaScript and WGSL.

CSS Properties and Values API (CSS Houdini, W3C): @property registers --rr-burn as a number, so a CSS animation can slide the mask.

revealredactionburnicethawscrollIntersectionObserversvg mask@propertyraw webgpuwgslembersreadingstorytellingreduced motionseededdom + gpuno dependencies

Near it in the frame