The particles.js library really only does one thing (and the name is a pretty big giveaway), but it does that one thing well. If you want to create a really awesome looking demo involving randomly roaming particles — with or without connecting lines — well, then look no further. This is absolutely the library for you.
The demo below gives you a good feel for what this library is all about:
See the Pen particles.js by Vincent Garreau (@VincentGarreau) on CodePen.
If you look at the demo’s JavaScript, they’re setting a bunch of values in an object, but I’ve got a pro tip for you. The library comes with a bunch of defaults pre-set and the demo above is setting almost all of the variables to their defaults.
To get started SUPER simply, you’d only need this JS:
particlesJS();
Yup. That’s it. Edit the demo above to read that, and it’ll still work. So, assuming you have this somewhere in your HTML:
<div id="particles-js"></div>
You’re up and running.
Now, if you’re looking for a lot of documentation, it doesn’t really exist yet. This is a fairly new project, so maybe it’s forthcoming (and maybe not).
Hi Im actually very curious how you got particles.js to display in the background and the body content of the page in the foreground?
Hi! How add this script to wordpress background, like on yours site?