07.13 · Ambient & Background
Particle Constellation
Drifting dots link up with lines whenever they come close. Best for tech sites.
Watch it
It moves by itself, and the dots gather toward your pointer or finger. Pause it to look closely, or turn on slow motion.
Inside, the ring around one dot shows how far it reaches: any dot inside gets a line, brighter the closer it is. The arrow shows which way that dot drifts.
Hard lines joins close dots at full strength, so lines blink on and off. Fading lines dims each line as its dots part, so the web forms and breaks smoothly.
Try it
Change a setting and see the difference as it moves.
Number of dots
More dots, more links; phones show at most 60.
Link distance
How close two dots must be to link up.
Speed
Slow drifting stays calm.
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 constellation background to [the section you want it behind]. Scatter dots on a canvas, let each drift slowly in its own direction and bounce off the edges, and on every frame join any two dots that are close with a thin line that fades as they move apart, so a network keeps forming and breaking. When the settings include it, let the dots drift toward the pointer, or toward a finger on touch screens. Checking every pair of dots gets slow fast, so use fewer dots on phones. If the visitor has reduced motion turned on, show one still frame. 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.