06.04 · 3D & Advanced
Canvas Particle Effect
Dots drift, link up when close, and dodge your pointer. Best for tech sites.
Watch it
It moves by itself, and the dots move away from your pointer or finger. Pause it to look closely, or turn on slow motion.
Inside, each dot drifts its own way and joins every dot inside its dashed ring with a line. The pointer pushes away dots inside its own ring; point at the box to move it.
Dots only and With links are the same dots moving the same way. Only the lines differ: they join dots that come close, which turns the dots into a network.
Try it
Change a setting and see the difference as it moves.
Pointer effect
What your pointer or finger does to nearby dots.
Number of particles
More dots make more links; phones and tablets draw fewer.
Link distance
How close two dots must be to join with a line.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a particle background to [the section you want it behind]. Draw small dots on a canvas, give each its own direction, and bounce them off the edges. When the settings include lines, join any two dots that come close with a thin line that fades as they move apart, so a network keeps forming and breaking. Dots near the pointer, or a finger on touch screens, can be pushed away or pulled in. Checking every pair of dots gets slow quickly, so draw far fewer dots on phones and tablets, and stroke the lines in a few batches rather than one at a time. If the visitor has reduced motion turned on, show the dots still. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.