Build notes
Making my logo
multiplayer.
The H on my homepage used to be a picture. Now it's a board of 3D pins that ripple when you tap them. If anyone else is on the page at the same time, they see your tap too, in your colour. Here's how it works, and what caught me out along the way.
The idea
From a picture to a pin board
The logo panel was a still image: an H on an offset black tile, with a grid of small crosses behind it and a gentle 2D ripple running through the crosses every few seconds.
I wanted something you could play with. A pin-art board, the desk toy you press your hand into, fitted well: the crosses already looked like pin heads.
Now, moving over the board lifts the pins towards your pointer. Pressing lifts them higher, and a quick tap sends a ripple out from that spot. When nobody is touching it, a small ripple runs out from the tile every few seconds on its own.
The board
Thousands of pins, one drawing
The board is built with Three.js, a JavaScript library for 3D graphics in the browser. Each pin is a small plus-shaped column. Drawing them one at a time would be slow, so the board uses an instanced mesh: the graphics card draws one pin shape thousands of times in a single go, each copy with its own position, height and colour. That's about 3,600 pins on a laptop screen and 1,800 on a phone.
The H isn't modelled in 3D. It's drawn in black and white on a hidden 2D canvas, and each pin checks how bright its patch of that drawing is. Brighter patches stand taller. The tile, the tile behind it and the H all come from that one drawing, so changing the logo means changing a few rectangles.
Pins move on springs. Each frame pulls a pin towards its target height and slows it a little, which gives the small overshoot and settle. The physics runs in fixed, small time steps, so a slow phone still moves at the right speed, just in fewer frames.
A ripple is a ring that grows outwards. Pins near the ring lift and twist slightly as it passes, then settle back.
Speed
Fast first, fancy second
The homepage has to stay quick, so the board is an extra, not the page. The still image shows first. Three.js only downloads once the panel is close to the screen and the browser has nothing else to do, then the board fades in over the image.
Devices without a real graphics chip get the original 2D ripple instead. That includes the test browsers behind Lighthouse and PageSpeed Insights, Google's speed checks, which draw 3D without a graphics chip. In one early test the board kept their main thread busy for nearly three minutes.
The board also watches its own frame rate for its first couple of seconds. If it can't manage about 20 frames a second, it swaps itself for the 2D ripple. With reduced motion turned on, you get the still image.
One surprise came from Firefox. The 2D ripple used to find the tile by reading pixel colours back from its canvas. Firefox's fingerprinting protection adds tiny random changes to those reads, so the colours never matched and the tile went missing. It now draws the tile straight from the image instead.
Multiplayer
Taps, not hovers
Then I wondered what would happen if everyone on the page shared one board. My rule was taps only. Sharing every pointer movement would turn into a storm of ripples; a tap is a deliberate hello.
It runs on Ably, a hosted service for passing small messages between browsers in real time. Every visitor joins the same channel, and a tap sends three numbers: across, down, and your colour.
Screens differ, so a position can't be in pixels. Taps are measured against the H tile instead: its centre is 0,0 and it's 1 wide. A tap on the top-left corner of the tile on a phone lands on the top-left corner of the tile on a laptop, whether that laptop is showing the 3D board or the 2D ripple.
Everyone gets one of six colours, picked so that nobody else on the page has it while there are enough to go round. Your own taps stay purple while you're alone, and switch to your colour once someone joins, a small signal that the board is shared. Ably's presence feature, a live list of who's connected, drives the "3 here now" label in the corner.

Safety
Keeping the key off the page
Ably needs a secret key, and anything in a web page is public. So the browser never sees it. A small Netlify Function, code that runs on the server when a URL is requested, signs a token for each visitor instead. The token lasts an hour and only allows sending, receiving and presence on the one channel.
The function only answers this site's own pages, and limits how often one address can ask. The page treats incoming taps with suspicion too: anything that isn't the right shape is ignored, and each visitor can only start a few ripples a second, so one noisy visitor can't flood everyone else.
A tab that's been in the background for 30 seconds hangs up, and reconnects when you come back. Ably only loads for visitors who are using the board, so speed checks like Lighthouse never load it at all.
Launch day
Two things I didn't see coming
The first deploy didn't connect at all. My Ably account is billed by monthly active users (MAU), and MAU accounts reject Ably's older browser library with an error pointing to their newer one for devices. Switching was a small change, and I tested it against the real service before it went live.
The billing model mattered in a second way. Each tab made up a new random ID, so every visit counted as another monthly user. Now the browser keeps its random ID, so a return visit counts once. The ID isn't linked to anything else, and the privacy page says so.
Testing
Pretend visitors
Testing something multiplayer on your own is awkward. I wrote a stand-in Ably server that runs inside the test browser and speaks Ably's protocol, so the real Ably library could connect to it.
Three pretend visitors, on a laptop and two phones, in Chrome and Firefox, joined, tapped, left, hid a tab for 30 seconds and came back, and were sent junk messages. Each step checked the counts, the colours and where the ripples landed. Before the fix went live, two visitors also tested against the real Ably service, with tokens from the live function.
Go on
Tap it
It's a small thing, but it's the kind of small thing I enjoy building: a toy on the surface, and underneath, the same questions as any real system. How does it fail? Who could abuse it? What does it cost? How do you know it works?
Tap the H on the homepage, and send this to someone so you can tap it together.