Skip to content

No.193 · Backgrounds

Fluted Glass

Slow colour seen through reeded glass: every reed squeezes and mirrors the strip behind it, catches a thin highlight and falls into shadow at the groove, and your pointer slides a warm light along behind them.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Amber

Write a WebGL1 fragment-shader background that looks like a panel of reeded (fluted) glass in front of soft drifting colour. Behind the glass: a base colour with three large Gaussian blobs of colour drifting on slow, unrelated sine paths, in aspect-corrected space, plus a warm blob that follows the pointer (eased) and fades in and out as it enters and leaves. The glass: divide the width into reeds of a fixed CSS width (default 54px). Within each reed let s run from −0.5 to 0.5. Each reed is a cylinder lens, so sample the field at x = (cell + 0.5 − 1.8·s) / N — a squeezed, mirrored slice slightly wider than the reed — and bend y very slightly with s². Sample red, green and blue at tiny opposite offsets proportional to s for a faint chromatic edge. Shade with 0.8 + 0.2·cos(πs), add a crisp highlight on one shoulder and a softer one on the other, and darken the groove where |s| > 0.44. Finish with a soft vignette and one-step dither against banding. Render near full resolution (reed edges must stay crisp), at ~60fps on desktop and ~30 on touch, stop requesting frames entirely when offscreen or the tab is hidden, and draw one frame under reduced motion. Fall back to a CSS radial-gradient approximation without WebGL. Colours are a prop: [base, blob 1, blob 2, blob 3, pointer blob]. Selected variant — Amber (amber): Colours [#140c08 base, #d9733a, #8a3b2a, #f0b37a, #ffd7a0 pointer]: warm orange and rust behind the reeds, a pale apricot glow under the cursor. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: A warm light follows the pointer behind the glass, breaking into strips across the reeds. Motion: Colour blobs drift on 17–37s sine paths; the pointer light eases at 6% per frame and fades in over about half a second. Accessibility: The canvas is aria-hidden and decorative; content renders above it. Reduced motion draws one still frame. Responsive behavior: Reeds keep their CSS width, so a phone shows fewer, the same size. The canvas follows its container. Touch: No pointer light on touch; the colour still drifts behind the reeds. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
A warm light follows the pointer behind the glass, breaking into strips across the reeds.
Motion
Colour blobs drift on 17–37s sine paths; the pointer light eases at 6% per frame and fades in over about half a second.
Accessibility
The canvas is aria-hidden and decorative; content renders above it. Reduced motion draws one still frame.
Responsive
Reeds keep their CSS width, so a phone shows fewer, the same size. The canvas follows its container.
On touch
No pointer light on touch; the colour still drifts behind the reeds.