Peek, pop and scrubbable lightbox

I wanted to know if one WebGL canvas can bridge six live HTML tiles, long-press Peek-and-Pop circular bokeh blur, and a 1:1 finger-scrubbed inspector that throws back with spring velocity into its originating slot. Tap a heart or pin button directly, tap Peek or long-press (240 ms) to lift with optical bokeh, or tap any card body to pop it open and edit its live caption.

Grid · t=0.00 · bokeh 0.0 px
OPTICS

Sunset Bay

Slot 1 · drag down to scrub and fling back

BOKEH

Neon Rain

Slot 2 · drag down to scrub and fling back

SHADER

Prism Lab

Slot 3 · drag down to scrub and fling back

SPRING

Spring Rig

Slot 4 · drag down to scrub and fling back

HIT-TEST

Aurora Arc

Slot 5 · drag down to scrub and fling back

FALLBACK

Darkroom

Slot 6 · drag down to scrub and fling back

Initialising ElementGL WebGL 2 stage...
Show the code 6 drawable cards, 28-tap bokeh shader, throw-back spring and hit sync
  1. Six live cards inside one drawable canvas. Each <article drawable> lays out at inspector resolution and scales into its grid cell, keeping live buttons and a caption <input> inside the same DOM tree.
  2. Two-pass circular optical bokeh shader. Renders the five background tiles plus a recessed originating socket into an offscreen RGBA8 framebuffer, then blurs with 28 golden-angle Vogel disk samples scaled from 0 to 18 px.
  3. Continuous pose interpolation and throw-back spring. Maps t across Grid (0), Peek lift (0.5 at 1.08x scale) and Popped inspector (1.0), tracking 1:1 finger drags with velocity Z-tilt and damped spring return.
  4. Hit-box calibration and background isolation. Scales each card's DOMMatrix by geometryUnit() for updateElementGeometry(), toggles dataset.hitTick, marks background tiles inert and sends them offstage while popped.
  5. Five-argument 2D and plain-HTML fallbacks. Falls back to drawElementImage(card, 0, 0, w, h) if WebGL 2 isn't available, or moves all six cards to a CSS grid on context loss.

How it works

Snapshot-based View Transitions freeze the outgoing and incoming states as static compositor textures, so you can't stop halfway through a pop, tilt a card under your finger, or scrub it back into its grid slot with release velocity. Here all six <article drawable> cards stay live inside one <canvas content="drawable" layoutsubtree> managed by a single ElementGL WebGL 2 context.

Each card lays out at full inspector dimensions (cardW by cardH, matching the grid cell aspect ratio) and only re-uploads via gl.texElementSubImage2D() when its DOM changes or a paint event arrives. At rest (t = 0), all six tiles render directly to the default framebuffer at full device DPI with zero offscreen passes.

When you tap Peek or hold for 240 ms, t lifts toward 0.5: the chosen card rises to 1.08x its tile scale with pointer tilt and a rounded drop shadow while the other five cards render into a half-resolution RGBA8 framebuffer behind a recessed socket outline. A 28-tap golden-angle Vogel disk shader samples that framebuffer with circular aperture weighting and highlight bloom as blur radius grows continuously from 0 to 18 px.

Tapping a card body pops it to t = 1, unlocking its caption <input> and Close button while marking the five background cards inert and moving their hit boxes offstage. Dragging vertically or diagonally tracks 1:1 with your finger and tilts the card by horizontal pointer velocity (rotZ = vx * k) while un-blurring the grid beneath; flinging past 90 px or 480 px/s seeds a damped spring straight back into that card's grid slot.

Live checks

These checks wait for a tap so the page opens with one WebGL context. Each check runs on isolated fixtures on the test stage without moving focus or scrolling the demo above.

Findings