Splitting text lines and inline shader reveal

I saw Yousuf Soomro's Slot Field and Manoela Ilic's Inline Hover Reveals and wanted to know if one live HTML essay inside an ElementGL canvas can slide neighbouring lines apart vertically on the GPU without reflowing the DOM. Hover, tap or select an anchor word, edit the inline phrase, or switch between pixel blocks and the optical GLSL ribbon.

Slot field essay · 4 anchors · 0 DOM reflow rest · click or hover

When Chrome draws DOM into a texture, every glyph stays crisp inside one live element. I slice that picture along the anchor line bounds so surrounding prose parts vertically while or pixel noise opens behind the chosen word.

Keeping honest takes a second step because WebGL texture uploads leave Chromium's click boxes at rest. Here the anchored line stays unshifted while neighbouring strips glide outward, and across the opened slot stay readable and selectable.

Type inside this editable inline phrase to trigger a fresh paint event and watch the cached Range line rectangles update without layout shift.

Anchor line holds at dy = 0 px while outer strips slide ±gap / 2.
Anchors:

Starting canvas…

Show the code cached Range line slicing, 3-strip WebGL shader, hit mapping and 2D 9-arg fallback
  1. One live essay inside the canvas. Semantic paragraphs with inline <button> and <a> anchors, a contenteditable span and a Pin slot toggle sit inside a single drawable article.
  2. Cached line slicing with Range.getClientRects(). Reads each anchor's box and full line band relative to #slot-article at resize or input time, so the animation loop never forces layout.
  3. Three-strip WebGL fragment shader. Shifts aboveAnchor up and belowAnchor down by gap / 2, keeps the chosen anchor word steady in place, and fills the cavity with 8 px pixel blocks or an optical GLSL ribbon.
  4. Geometry sync and inverse pointer mapping. Scales updateElementGeometry() by geometryUnit() with dataset.hitTick, and maps clicks on slid strips back to rest coordinates.
  5. Nine-argument 2D slice fallback. Cuts the same three horizontal bands with 9-argument drawElementImage() and restores the article's full hit region with an empty-clip 5-argument draw.

How it works

This page puts Yousuf Soomro's Slot Field (post) together with Manoela Ilic's Inline Hover Reveals (demo) on a single <canvas content="drawable" layoutsubtree>. Instead of cloning text into separate DOM spans and animating margins or transforms per line, the essay stays one plain <article drawable> inside the canvas.

Live checks

Each check builds an isolated fixture on testStage() and retires its canvas when finished. The visible essay above isn't touched.

ResultExperimentDetail

Findings

Not verified in Chrome Canary or Chrome 159 for Android yet. Press "Run these 5 checks" above to measure this browser.