Pass Muster Media My Social Feed

The Tech

The circuit board on our front page

The dark board behind our front-page headline is one canvas, one tiny SVG chip and about 130 lines of code, and almost none of it moves unless you are looking.

4 min read

Open our front page on a big screen and you'll see a dark circuit board. In the middle of it sits a small chip with a hand-drawn flower inside. Every half second to a second a petal lights up and a spark runs out along the board. Here is how that works.

Two layers

The picture is two things stacked on top of each other.

The canvas is hidden from screen readers; it's decoration. The chip is a normal drawing the page lays over it.

The board draws itself, the same way every time

The traces aren't a stored image. The page draws them when it loads, on a 24-pixel grid, as lines that run in eight directions and bend at corners, the way real board traces do. The number of traces scales with the size of the hero (one for every 7,000 square pixels, roughly).

Randomness would normally make a different board each visit. We used a seeded random generator instead: a recipe that starts from a fixed number (ours is 11) and always produces the same "random" sequence. So the board is the same on every load. That let us design it on a separate page, choose the look we loved from several options, and have the live page match exactly.

The chip's twelve pins each get a trace, and they're drawn first so they always connect. If the hero is resized, the board is rebuilt to fit.

The flower and the sparks

Every 0.45 to 1.05 seconds, the page picks one of the chip's traces. It lights the petal nearest that pin (there's a small lookup that says which petal goes with which pin), pulses the flower's center, and then sends a spark from the pin. The spark is a glowing dot that travels along the trace at about 105 pixels per second.

When it reaches the end, one of two things happens. On a plain pad, the pad blinks for about a half second. On three special traces, it lights up something hidden: a small heart, a sprout or a sun, drawn like pen sketches (each line is traced twice with a slightly different width so it looks hand-inked). The icon glows and fades back over about two seconds. About a third of the sparks are aimed at those icons, so you'll find them if you watch for a bit.

The rest of the board has its own quiet traffic: roughly 30 percent of the other traces carry a slow dot running along them, just so the whole thing feels alive.

Manners

An animation that never stops can be tiring, and costs battery. So there are three rules:

  1. Reduced motion means a still picture. If your device says you prefer less motion, the board is drawn once and never animates. The petals don't flicker and no sparks fly.
  2. Only while it's on screen. The animation runs only while the hero is actually in view. Scroll past it and the drawing loop stops; scroll back and it picks up again.
  3. Sharp, but not wasteful. We draw at your screen's pixel density for crispness, but cap it at twice normal, so a very sharp screen doesn't make the canvas bigger than it needs to be.

On phones, the layout changes so the chip sits low in the hero, and the hidden icons stay below the buttons, never behind the text.

Small traps we left notes about

Seeded randomness is delicate. Our notes warn that the code calls the generator twice after each pin trace, only to keep the sequence identical to the design page. Remove those two calls and the whole board redraws differently. The notes also say that if the flower ever changes, the petal lookup must be redone. We'd rather leave a signpost than make the next person rediscover it.

The idea behind it: a hero that earns its motion. It's calm when you ask for calm, still when you're not looking, and a little rewarding if you stay.

The same logo shows up everywhere in our tools, including My Social Feed. Now you know what's going on inside it.

← All posts