Saul Bass geometric paper-cutout credits

I wanted to know if one ElementGL WebGL 2 canvas can take live HTML title credits and chop, slide and mask them across Saul Bass geometric construction-paper cutouts, diagonal knife shutters and fibrous paper grain while keeping the inputs editable and the act pills clickable. Switch cutout motifs, edit the title or director, or tap the paper stage to wipe between acts.

ACT I · PROLOGUE REEL 01
ANATOMY OF A CUT
starting...
Show the code cutout fragment shader, paint-gated upload, hit-test geometry sync and 2D clip-path fallback
  1. Live credits slate inside one drawable canvas. The act pills, condensed display title and editable Title and Director inputs sit inside <canvas content="drawable" layoutsubtree>.
  2. Saul Bass geometric paper cutout shader. Samples the premultiplied DOM texture over crossed paper fibres and deckled edges across three cutout modes: diagonal knife shutters, staggered segmented blocks and a concentric spiral iris.
  3. Paint-gated upload after stage.begin(). Uploads only after hasPainted becomes true inside the paint listener, calling stage.begin() before stage.upload() with UNPACK_PREMULTIPLY_ALPHA_WEBGL turned on.
  4. Aligned hit testing across tilted paper. Multiplies the slate DOMMatrix by geometryUnit(), calls updateElementGeometry() and toggles dataset.hitTick so clicks and focus land on the drawn pills and inputs.
  5. Five-argument 2D clip-path and plain-HTML fallbacks. Clips 5-argument drawElementImage() through Canvas 2D cutout paths when WebGL 2 is missing, or moves the slate into plain HTML if a context is lost.

How it works

A single <section id="credits-slate" drawable> sits inside <canvas content="drawable" layoutsubtree>. I chose one WebGL 2 context through ElementGL so the entire 1950s paper stage, cast drop shadows and DOM texture composite in one pass without opening extra contexts. At context startup and in onRestored, the page sets gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true) so anti-aliased type blends cleanly over off-white construction paper.

Texture uploads never run outside a real browser paint. The paint listener sets hasPainted = true, calls stage.begin() to size the backing store first, and only runs stage.upload(slateEl) when the slate changed or hasn't uploaded yet. Scrubbing Cutout wipe % or spinning the spiral iris updates shader uniforms alone with zero re-uploads.

BASS_FRAG builds three cutout compositions on top of crossed paper-fibre noise, ink flecks and scissor-cut deckled edges. Shutters slices opposing diagonal knife blades across 54 px bands with cast shadows onto the slate below. Segmented blocks splits the slate into six asymmetric horizontal strips that snap cleanly into alignment when you hover, tap or focus an input, then fracture again across acts. Spiral iris frames the readable title inside an off-centre rotating aperture surrounded by alternating charcoal and terracotta spiral turns.

When Segmented blocks is aligned or Shutters tilts the slate by -1.4 deg, syncSlateGeometry() multiplies the CSS transform matrix by geometryUnit(), calls canvas.updateElementGeometry() and flips dataset.hitTick to clear Chromium's hit-test cache. If WebGL 2 isn't available, the 2D fallback builds matching Path2D cutout clips and calls 5-argument drawElementImage(); if the context is lost, the slate moves into #plain-host as readable HTML.

Live checks

These checks run on isolated fixtures on the test stage without scrolling or touching the demo above. Tap the button below to run them in this browser.

Findings