Particle Network Animation In JavaScript

Category: Animation , Javascript | March 17, 2021
Author:abjt14
Views Total:612 views
Official Page:Go to website
Last Update:March 17, 2021
License:MIT

Preview:

Particle Network Animation In JavaScript

Description:

A JavaScript-powered, interactive particle network animation with randomly generated particles, connectors, and background colors.

See Also:

How to use it:

1. Create an HTML5 canvas element on which you want to render the particle network animation.

<canvas>Your browser does not support the HTML5 Canvas API.</canvas>
/* make it fullscreen */
canvas {
  border: 1px solid rgb(211, 211, 211);
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

2. Load the main JavaScript in the document.

<script src="main.js"></script>

3. Initialize the animation. That’s it.

document.addEventListener('DOMContentLoaded', (event) => {
  canvasInit();
});

You Might Be Interested In:


Leave a Reply