Move your mouse. A glowing rope follows it with real physics. The faster you move, the hotter it burns.
A canvas toy that simulates a neon chain using physics. It reacts to your mouse speed in real time. Slow movement looks like a cool laser. Fast circles and whips create loops, spirals, and heat.
Each dot in the chain remembers where it was one frame ago. Instead of storing velocity directly, the simulation subtracts the previous position from the current one to compute motion. This stays stable even with lots of forces applied.
After every physics step, a constraint solver runs six times. It checks the distance between each pair of neighboring dots and corrects them until they sit exactly one segment length apart. This stops the chain from stretching or bunching.
The chain is drawn three times per frame. A wide faint pass, a tighter mid-glow, and a sharp bright core. Together they fake neon bloom without CSS blur filters, keeping performance smooth.
At rest the chain is deep blue. As speed increases the color interpolates toward hot pink. This is linear interpolation on the RGB channels separately. The value is smoothed across frames so transitions feel fluid.
Instead of clearing the canvas each frame, a semi-transparent dark rectangle is painted over it. Old lines fade out slowly, creating the glowing trail behind the chain head.