Lab

Fun experiments

Things I'm trying out before they find a home on the site: shaders, effects and other ideas, each on its own page. They're rough on purpose, and some of them may end up on the desk one day.

  • Optical padding

    /lab/optical-padding

    Padding that looks the same on every side of a button or a callout, measured from the capital letters instead of the line box with CSS's lh and cap units. A short tutorial on Haz's technique, pill buttons included, with live demos and an overlay that measures the real gaps in your browser.

    • CSS lh and cap units
    • calc()
    • Custom properties
    • React
  • Pixel Splats

    /lab/splats

    Little 3D scenes sculpted from simple shapes, scattered with tens of thousands of Gaussian splats and drawn as pixel art you can turn around. All of them in one place, and how one is made, from the clay to the last pixel.

    • WebGL 2
    • Signed distance fields
    • Gaussian splats
    • Bayer dither
  • Sunbeam: Take Two

    /lab/sunbeam-2/

    The Sunbeam brief again, drawn from a blank page to see what comes out different: a 48-second anime short in code. Old Fry sleeps in a sunbeam on the windowsill and dreams he is young, running through summer grass after a dragonfly.

    • Canvas 2D
    • WebGL 2
    • Procedural gouache
    • Cel animation
  • Sunbeam

    /lab/sunbeam/

    A 45-second anime short, drawn and painted entirely in code. Old Fry dozes in a sunbeam on the windowsill and dreams of being young: chasing a red dragonfly through summer grass under enormous clouds.

    • Canvas 2D
    • WebGL 2
    • Procedural gouache
    • Cel animation
  • Eye Contact

    /lab/eye-contact/

    Mark on an old TV, watching your cursor. It isn't a video: a face model tagged where he's looking in each frame of him rolling his eyes, and the page shows the one that points at you, dithered and run through a CRT shader.

    • MediaPipe
    • Canvas 2D
    • Bayer dither
    • WebGL 2
  • View Transitions

    /lab/view-transitions

    Eight small demos of React 19's <ViewTransition>: photos that morph into their page, cards that fly between lists, a leaderboard that reorders itself, tabs, Suspense reveals and a spring you can tune. Slow motion shows what each one does.

    • React 19.3
    • View Transitions API
    • Web Animations
  • Fry Chase

    /lab/fry-chase/

    A pixel Fry who follows your cursor, crouches and wiggles when you hold still, then pounces. Leave him alone and he curls up for a nap; tap him for a purr.

    • Canvas 2D
    • Pixel art
    • State machine
  • Stretchy Fry

    /lab/stretchy-fry/

    Grab Fry the cat's face and stretch it. He's a soft 3D mesh: every point you pull springs back with a wobble, and his eyes follow you around.

    • WebGL
    • Spring physics
    • Canvas 2D
  • Pixel Synth

    /lab/pixel-synth/

    A chiptune step sequencer with NES-style pulse, triangle and noise voices. Paint notes on a 16-step grid and each one blooms in a dithered light show; the tune lives in the URL so you can share it.

    • Web Audio
    • Canvas 2D
    • Bayer dither
  • CRT Playground

    /lab/crt-playground/

    Knobs for an old television: scanlines, a phosphor mask, a curved tube, bloom and channel flicker, drawn over the live desk. Reach through the glass to pet Fry, or tune in the test card, your camera or a file.

    • WebGL 2
    • GLSL
    • Live iframe capture
  • Falling Sand

    /lab/falling-sand/

    A falling sand sandbox in 1-bit dither. Pour sand, water, oil and lava, build with stone and wood, then set it on fire and watch it smolder, steam and turn to glass.

    • Canvas 2D
    • Cellular automata
    • Bayer dither
  • Pixel Aquarium

    /lab/aquarium/

    A tank of pixel fish that school like boids. Fry's paw is the cursor: wave it in and they scatter, take it away and they swim back together. Tap the glass or drop in some food.

    • Canvas 2D
    • Boids
    • Bayer dither
  • Dither Waves

    /lab/dither-waves/

    A 1-bit dithered ocean for a page header, drawn by a WebGL shader. Pick the dither pattern, the ink and the pixel size, or run your own video through it.

    • WebGL 2
    • GLSL
    • Bayer dither
  • Intersection Observer

    /lab/intersection-observer

    The browser's Intersection Observer API with sliders on it. Change the root margin, threshold and box size, scroll the list, and watch which boxes count as visible.

    • React
    • Intersection Observer