@rodikh/particle-lines
v1.0.3
Published
particle-lines ============== Inspired by Topaz's Particle Lines http://www.topaz1008.com/
Downloads
3
Readme
particle-lines
Inspired by Topaz's Particle Lines http://www.topaz1008.com/
Particle Lines is an interactive animation built with using HTML5 Canvas and no other third party runtime libraries.
It implements a particle engine that creates random moving particles, and draws colorful lines between close neighbours.
It is enclosed in a module for easy usage within any HTML.
Usage
Instantiate the ParticleLines class and pass a canvas element to it's constructor.
<body>
<canvas id="main"></canvas>
<script type="module">
import ParticleLines from 'particle-lines'
const canvas = document.getElementById('main');
new ParticleLines(canvas, {particlesAmount: 100, maxDistance: 150});
</script>
</body>
Options
You can pass an options object to the constructor: