← Back to CORPUS

How it's made

One geometry,
four destinies.

CORPUS is a single THREE.Points mesh — 45,000 vertices, one draw call — that believes it is four different objects. Nothing is ever rebuilt. The body just changes its mind.

Formations live in attributes

Every particle carries all four destinations at once: aT0…aT3 vertex attributes holding its seat in a (2,3) torus knot, a three-armed spiral galaxy, a 36³ lattice, and the word itself. A morph is just two uniforms — uFrom, uTo — and a progress float. The vertex shader does mix(pick(uFrom), pick(uTo), e) per particle, per frame. The CPU sleeps.

The ripple

Each particle also stores aDelay, derived from a golden-ratio sequence (fract(i·φ)) that doubles as the structural coordinate of every formation — position along the knot, radius in the galaxy, letter order in the word. So one attribute makes every morph travel: down the thread, out from the core, left to right through the type. The delay window is quintic-eased in GLSL, with a sine-arc detour so particles curl mid-flight instead of tracing straight lines.

Typography as geometry

The SIGIL formation waits for document.fonts.load('800 240px Syne'), rasterises CORPUS on an offscreen 2D canvas, then harvests every opaque pixel from getImageData and lifts them into world space with a little z-thickness. On phones it re-samples as two stacked lines so the word fills the portrait frame.

The well, and the release

The pointer is a gravity well: the closest point on the camera ray to the origin becomes uWellPos, and the shader shoves particles along an inverse-square falloff. Hold, and the power uniform eases from a whisper to a shout. Let go, and a shockwave fires — a gaussian ring exp(-((d − t·24)/2.3)²) racing out from the release point, shoving and over-lighting everything it passes while the camera recoils, rattles, and blooms +30% exposure for a beat. Sprites are round because the fragment shader discards outside gl_PointCoord radius — squared-smoothstep alpha, additive blending, no textures anywhere. The galaxy never sits still either: a vertex-stage swirl() adds solid-body spin plus a differential shear that winds and unwinds the arms on a ~57-second breath.

Staying at 60

devicePixelRatio is capped at 2, the loop halts on visibilitychange, and an FPS watchdog steps setDrawRange down (never below 30k on desktop) if the average dips — safe to truncate, because the golden-ratio ordering means any prefix of the buffer still covers the whole shape uniformly. Depth-test is off; additive light doesn't need sorting. Fog is a hand-rolled exp(-d²) in the vertex stage. With prefers-reduced-motion, the orbit freezes, the auto-cycle stops, and drift amplitude drops to zero — the universe holds still but stays lit.

Three passes

The build made the engine; three screenshot-driven passes made the site — and each one only found what it did by looking, not by re-reading the code. Pass one was art direction: the additive core summed to pure white, so an exposure uniform and a designed ice→violet→pink gradient riding u gave the body back its hue and its topology. Pass two was motion: choreography moved onto a wall-paced clock (a slow GPU used to stretch the 3-second intro to fifty), the release shockwave got its camera recoil, the galaxy got its shear, phones got swipe nav.

Pass three was finish, and it meant navigating to every formation instead of judging the site from its fresh-load frame. That turned up two real problems a first screenshot never shows: the galaxy's outer arm was sitting under the headline — a pixel crop caught the "n" of billion inside a cluster of particles — so the camera now eases to a per-formation clearance, blended by the same quintic progress that drives the morph, and pulls back for the wide shot without shrinking the galaxy itself. And the sigil, the concept's punchline formation, rendered thin next to the round, voluminous knot and galaxy; it's scaled up and gets a shader-side size-and-brightness swell keyed to uFrom/uTo while the word is on screen, so CORPUS now lands with the weight the line "the body spells its own name" is asking for. Contrast, focus rings, and the reduced-motion diff got re-checked by hand, not assumed. Judgement by eye, every time.