3D opening title crawl

I wanted to know if one ElementGL WebGL 2 canvas could project a live editable HTML article onto a receding 3D cinema crawl over a starfield, fade far lines cleanly into space, and keep tilted buttons and inputs clickable with updateElementGeometry().

A galaxy of live DOM elements

The live DOM strikes back

It is a period of GPU experimentation. Rebel <canvas> nodes striking from a layoutsubtree have won their first victory against static pixel screenshots.

ACT I · PLAYING

Act II · Edit this transmission

Act III · Vanishing horizon

Pursued by the hit-test cache, the tilted plane carries headings, inputs, and live buttons upward toward distant nebula haze using updateElementGeometry().

starting...

Edit the yellow episode heading or transmission text directly on the receding plane, or switch to Flat 0° (Edit) and scrub Progress to inspect any act head-on. Click Jump to Act II or Pause crawl inside the crawl to drive playback from the tilted DOM.

Show the code ElementGL mipmapped upload, 3D perspective crawl shader, projective DOMMatrix and 2D trapezoid fallback
  1. The live drawable crawl article. One <article drawable> holds cinema-yellow semantic HTML, an editable <input>, a <textarea> and interactive buttons inside <canvas content="drawable" layoutsubtree>.
  2. One ElementGL context with premultiplied uploads and mipmaps. Sets UNPACK_PREMULTIPLY_ALPHA_WEBGL to true, calls stage.begin() before stage.upload() inside paint, and builds trilinear anisotropic mipmaps after texElementSubImage2D().
  3. Deep space starfield and anti-shimmer horizon fade shader. Pass 0 draws layered stars and nebula haze; Pass 1 samples the mipmapped DOM texture with distance LOD softening and a smooth screen-space fade near the top horizon.
  4. True 3D camera, tilt and scroll travel matrix. Builds the 4x4 uMvp matrix mapping unit DOM UVs onto the tilted receding plane across 0° to 68° and 0% to 100% progress.
  5. Calibrated projective updateElementGeometry(). Maps element CSS pixels through the same perspective matrix, scales by geometryUnit() and toggles dataset.hitTick so tilted buttons and fields stay clickable.
  6. Five-argument drawElementImage() trapezoid 2D fallback. When WebGL 2 is absent, draws horizontal clipped strips scaled by perspective depth over a 2D starfield.

How it works

Live checks

Each check builds an isolated fixture on testStage() so the live crawl above isn't disturbed.

ResultExperimentDetail

Findings

Measured in headless Google Chrome 160.0.8188.0 canary on 2026-11-27 at 412 px and 2.625 DPR (SwiftShader WebGL). Chrome 157, Playwright check:jank and Chrome 159 on Android stay not verified.