← Back to Work
Web HTML Canvas Solo

Lightning

🗓 2026

Live Demo Click to interact

An interactive lightning system that generates randomised bolt paths using recursive branching segments. Bolts strike between two points with jittered midpoints, glow via layered shadow blur, and spawn 2-4 secondary branches at random angles. A purple rain layer falls continuously behind the strikes. Includes a screen flash on each strike and responds to mouse clicks to fire targeted bolts.

How to use

Source Code