Turning Off the Lights
I was working late last night, updating some fuscripts projects and writing posts about fuscalendar and fuscauth, when I noticed something obvious: my website was burning my retinas. Pure white background, dark room. Not great.
I'm not one of those devs who disintegrates if anything brighter than #1a1a1a shows up on their screen. I actually like the minimalistic black-and-white feel of fuscripts. But staring at a flashbang at midnight made me think — maybe a dark mode wouldn't hurt. Literally.
The idea
The thing is, I didn't want a boring toggle. A sun/moon icon in the corner? A switch in a settings menu? That's fine for most apps, but fuscripts has this whimsical personality baked into it. I wanted the dark mode to feel less like a "theme preference" and more like literally turning the lights off.
What turns lights off? A lamp switch. And not just any switch — one of those old-school beaded pull chains you'd find hanging from a ceiling fan or a desk lamp. You grab it, pull down, hear the click, and the room goes dark. I've never seen anyone do this on the web, and I didn't bother checking if someone had. I just wanted to build it.
So I fired up Claude Code — this time using the new Opus 4.6 model — and described what I wanted: a beaded chain hanging from the top corner of the page, with real physics. Gravity, swinging, the works. When you pull it past a threshold, it should get progressively harder to pull (like a real switch mechanism), then click, snap back slightly, and toggle the lights. With actual sound.
The first result was honestly impressive. Opus nailed the physical representation of the chain on the first try — Verlet integration for the particle physics, distance constraints to keep the beads connected, canvas rendering with metallic gradients. The whole surrounding UI came in one shot too.
You can check it out:
You can also see it live here:
Reality Check
The only things that needed fixing were related to the physical feel of the interaction.
The click sound, which initially sounded like a space laser gun. A couple of iterations later, swapping oscillators for shaped white noise bursts, and it sounded like an actual mechanical click.
The chain would explode if you held it at weird angles — turned out the physics engine was fighting the drag interaction, injecting velocity through the constraint solver. The fix was elegant: pin the dragged particle and zero out its implicit velocity by syncing both position vectors.
I built a debug panel with sliders for every physics parameter — gravity, damping, constraint iterations, pull resistance curve — so I could fine-tune the feel in real time.
Chasing the whimsy
How do I know when one of these ideas feels right? I don't have a rule. There's this pressure-like sensation that pushes me toward what needs improvement, and I keep tweaking until it stops. Then I look at the result, and if it makes me smile, that's a good sign. If I show it to my wife or friends and they smile too, even better.
The chain is now hanging in the top corner of a playground page, ready to be integrated into fuscripts proper. Pull it down and the lights go off. Pull again and they come back.
It's not the most practical dark mode toggle in the world, but every time I use it, it makes me grin.