A bill-pay dashboard that arrives as emerald pixels

I wanted to know if one ElementGL fragment shader can make a live <form> and bill-pay <table> arrive cell by cell as coarse glowing emerald blocks that cascade down the card and sharpen into crisp text, with every pay button clickable even while it's still pixels. It rests mid-sweep. Type a prompt, tap a preset, or drag Sweep.

55% arrived
Incard · bill pay utilities due this month

Utilities, December

PayeeDueAmount
Left to pay £0.00

Starting the ElementGL pixel shader...

Show the code cell delays, block sizes and hit sync
  1. One drawable card. The prompt <form>, preset buttons, the <table> of bills and the <output> total are ordinary elements inside the canvas, sized from JS with --card-w and --card-h.
  2. Cell-by-cell arrival. Each 24 px cell gets a diagonal delay plus jitter. Its local time picks a block size (24, 12, 6, 3, then sharp) and fades the emerald tint out.
  3. The sweep and the pay flash. A prompt rebuilds the rows, then the progress uniform runs from 0 to 1. Paying a bill re-pixelates just that row.
  4. Hit boxes. The card is measured from the canvas box, and updateElementGeometry() is called with geometryUnit() only when the size changes.

How it works

The idea comes from Anagram's Incard App Builder, where a prompt produces a dashboard that shows up as big green pixels before it settles. That version is a picture. Here the dashboard is a live <article> inside one <canvas layoutsubtree>, uploaded to a texture with texElementSubImage2D() on each paint event, and the pixels come from the fragment shader that draws it.

The shader splits the card into 24 px cells. Each cell's delay is 0.2x + 0.8y plus up to 0.15 of hash jitter, so the wave runs down and slightly across, and cells near each other arrive out of step. The cell's local time chooses a block size: a 24 px block whose emerald brightness is the average of nine texture taps, then 12, 6 and 3 px blocks in the card's own colours tinted green, then the sharp texture with the tint fading out. Nothing is read back. The DOM never changes during the sweep, so after the first upload the animation is only a uniform per frame.

The page loads with the sweep held at 55%, so the top of the card is sharp and the lower rows are still blocks. The pay buttons down there work anyway: hit testing comes from the element's layout and updateElementGeometry(), not from what the shader drew. Paying a bill updates the <output>, and a second rectangle uniform makes that one row fall back to blocks and re-arrive.

Live checks

These wait for a tap, because they make WebGL contexts and read pixels. Each pixel check runs on its own fixture on the test stage and retires the canvas afterwards. The hit check reads the visible card's geometry and scrolls it into view for one task to call elementsFromPoint(), then puts the scroll back before anything is painted.

Findings