Draw a line to bend a neon tube, tap a tube to switch it
Neon
Bend your own neon sign: draw a line and it becomes a glowing glass tube that hums and flickers on.
Neon is a sign workshop on a brick wall at night. Draw a line and it becomes a glass tube that strikes up with a stutter and a buzz, the way a cold tube does. Tap a tube to switch it off and on, pick another colour for the next one, undo, or put the whole sign out and watch it come back. It opens with a pink "open" in a blue frame.
How it works
Your stroke is cleaned up and smoothed into a tube. Unlit, it is clear glass with a grey core. Lit, it is drawn in layers: a wide wash of its colour across the bricks, a soft halo, the coloured glass and a hot near-white core, all added together as light, so overlapping tubes brighten each other the way real neon does. New tubes flicker a few times before they hold, and now and then an old one stutters on its own.
The hum is synthesised from the 50 Hz mains and its harmonics, and gets louder the more glass is lit. Each tube that strikes up adds a crackle and a small glassy tick.
Built with
- Canvas 2D with additive blending for the glow and the wash on the wall
- Chaikin smoothing for hand-drawn tubes
- Web Audio API for the transformer hum and crackle