The prototype was meant to de-risk the renderer. It replaced it.

Orbit is this site drawn as a court of blocks you can turn, pick up and put down. Seven pieces, one per destination. It was specified as a Three.js build.


It lives at /hub, and it is one way in rather than the way in. Every page it points at is a normal page with its own address.

An isometric court of cream blocks on a dark field: a thin standing slab, a large cube, a wide flat slab, a stack of three cubes, a four-by-four grid of small cubes on a dark plinth, and two further cubes, each labelled with its destination.
fig 1 · Writing is a thin standing slab, Parley a wide flat one, Bookflow a cube, the design system a stack of three. The shapes come from the frames, and so do the proportions.

Three functions, not a library

The brief set the order: settle what it is for, build the 2D layer from the kit, draw the key moments as stills, then build a throwaway prototype, and no Three.js until that is signed off.

I followed it, and the prototype answered a bigger question than the one it was built for.

The court is axis-aligned boxes in three flat tones. That does not need a renderer. It needs a projection, a painter’s sort and one Lambert term. Three functions, and I was about to install a library that does all three alongside several hundred things I would never call.

The court is 4.9 kB of JavaScript, against roughly 150 kB for plain Three.js and over 200 for React Three Fiber. The whole route is 9.6, with the site’s chat panel and analytics on it like every other page.

The same picture with the script off

The weight is the least interesting part. Because the projection is a pure function, the page can run it at build time. Every piece, every shadow and all seven destinations are real links sitting in the HTML.

The capture script takes the court twice at 1280, once as the page runs and once with JavaScript disabled, then hashes both. They are the same file, byte for byte. That is not graceful degradation, it is the same picture.

One function, two views

The same court seen from directly overhead: flat cream rectangles on a dark field, no shadows and no shading, each still labelled.
fig 2 · Reduced motion gets this. Same projector, 90 degrees of elevation, so it cannot drift out of agreement with the isometric view.

Elevation is measured from the ground rather than from the vertical. I had it the wrong way round for an afternoon, which culled every top face and drew the blocks as chevrons. It looked like a maths error. It was a definition error.

Measuring from the ground is also what hands over the reduced-motion view for free. At 90 degrees the height term drops out of the same expression and you are looking straight down. The plan view is the first drawing at a different number, not a second one kept in step with it.

The same court with the Writing slab lifted up and to the right of where it stood, its label travelled with it, every other piece unmoved.
fig 3 · One piece moved and six did not. That is what the test asserts, because the failure here is not nothing happening. It is one gesture quietly doing the other’s job.

That function is also why a piece can be picked up. A projection is not invertible in general, but it is invertible for a point constrained to a plane, and the ground is a plane. So a drag turns back into a position on the court, which is the whole reason a piece can be carried, and the reason a carried piece can only be put down on the ground.

A page that lies to a screenshot

This is the part worth writing down.

A page that server-renders its own interactive surface looks identical when the script does nothing at all. The hash above proves how identical. So every screenshot I took was evidence of the drawing and no evidence of the page, and three bugs lived comfortably behind that.

The label list ate every pointer event. Labels are HTML over the drawing, in a list covering the whole court so a label can sit anywhere. An element with no background still takes hits. Nothing reached a block, and the page photographed perfectly throughout.

Rebuilding the drawing each frame made it unclickable. Pressing triggered a repaint, the node under the cursor was replaced, and the release landed on a different element, so no click ever completed. Build the nodes once and move them.

A cancelled gesture is not a completed one. pointercancel fires when the browser takes a gesture over for its own scrolling. Running the same code for it as for pointerup is how the court opened a panel every time somebody dragged a piece on a phone: the interrupted drag arrived with almost no travel recorded and was read as a tap. That one only surfaced on a real phone, after I had called the feature finished.

So the tests drive the page rather than photograph it. Five claims: that the court draws and every destination is a working link with JavaScript off, that hover and focus light a piece and stay separate from selecting it, that dragging the ground turns the court while dragging a piece moves one and leaves the rest, that the locked project opens a passcode prompt and never a page, and that reduced motion gets the plan, flat, with nothing moving.

The phone took one more idea

The hub on a phone with the court expanded to fill the screen, labels pushed to the edges, a collapse control in the top corner and the tour and numbers buttons below.
fig 4 · Expanded, because the point of it on a phone is moving pieces around, and that needs more court than a list leaves room for.

The court was cramped at 390 and my instinct was to make the box wider, which does nothing. Width was never the constraint. The wide frame is 580 units tall and the court only had 370 of them. A frame shaped like the screen made the same court 86 per cent bigger with no other change.

Still open

Two labels collide in the plan view. The rule that places them pushes each one outward from the centre, and that stops separating pieces once depth is gone, when they are far apart in space and close together on screen.

The expanded court is sized for the worst yaw rather than the current one. It is as large as it can be while still turning freely, which means it is smaller than it could be at most angles.


Live at /hub.