← All work
Project

Splatter

Procedural ink and blood brushes for the DOM and Canvas. Seeded and dependency free, so the same inputs always paint the same mark.

2026 Maturity: Prototype

Overview

Splatter is a TypeScript library of painterly marks: wipe, smear, splatter, fractal and stroke. Each brush generates a mask from a seed, and that mask can clip an element, fill a background, animate a reveal or run a full page transition. It is for interfaces that want a hand-painted mark that stays put across re-renders.

A dark red splatter with a dense center and rings of droplets on a cream panel, above a row of five brush marks and beside brush, material and parameter controls.
The Splatter brush in the blood material, with all five brushes painted from the same seed underneath.

My role

Wrote the library and the playground.

The problem

Single-scale noise looks like a shader. A hand-painted mark has structure at several sizes: one strong mass, torn areas around it, small imperfections and a few long accents.

A mark generated at runtime has a second job. It has to hold still. If its randomness changes on every render, the mark jumps whenever the interface redraws. Splatter makes painterly marks that read as painted and come out identical for identical inputs.

How it works

  • Five brushes: Wipe is a directional brush body with torn edges, dry-brush and bristle streaks, for headers and page transitions. Smear is a dragged smudge that tapers to a point. Splatter is a flicked burst with a branching central blot, beaded trails and fine mist. Fractal is recursive branching, like Lichtenberg figures or ink running through fibers. Stroke is a calligraphic mark whose width swells and tapers.
  • Ink and blood: Ink is near-black and mostly opaque. Blood has a dark center, a saturated mid-tone, a brown-red outer stain and optional glossy highlights. A paper-absorption halo bleeds pigment just past the solid edge.
  • One mask, shared passes: Every brush produces a grayscale coverage mask, from 0 to 1 at each pixel. The background shows where coverage is 0 and the wipe color where it is 1. Shading, paper bleed and the reveal are shared passes.
  • Layered structure: Coverage combines by taking the larger value rather than adding, so overlapping marks read as one connected mass. Noise is expressed relative to the mark's size, so a small chip and a full-page wipe get the same painterly scale.
  • Seeded output: Every value derives from a seed, typically built from the element's label or index. The same brush, seed and options produce byte-identical output. The core has no dependency on the DOM or on any package, so it also runs in a worker or in Node.
  • Animation: The coverage mask is built once. Each frame copies it, re-applies a noisy advancing reveal front and re-shades it. That costs less than painting the mark again.
  • Ways to use a mark: Clip an element to the brush shape, set the render as a background, export a PNG, run a canvas reveal, or cover the viewport for a page transition that lets the page swap content while it is covered.

The playground

The playground lets you pick a brush, switch between ink and blood, set the direction and tune the parameters. Animate runs the reveal and Full-page fires the transition.

Its limits

Canvas 2D suits static marks, PNG export and seeded variants. Many animated full-screen brushes at once would need the same passes ported to a fragment shader. The parameter model would stay the same, but that port has not been done. The library is a prototype with a single commit behind it.

Status

Prototype, started September 28, 2026. It has an interactive playground and no published package.