1.0.3 • Published 3 years ago

@rodikh/particle-lines v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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:

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

5 years ago

1.0.0

5 years ago