0.1.2 • Published 8 years ago

particler v0.1.2

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

Particler

Lightweight JavaScript canvas animation library for particles animation.

Installation

npm install particler --save
<!-- create canvas tag -->
<canvas id="particler-instance"></canvas>
<!-- define proper styles if needed -->

<!-- include particler.js library -->
<script src="node_modules/particler/dist/particler.js"></script>

<script type="text/javascript">
    // define your configuration (optional)
    var particlerOptions = {
        quantity: 50,
        fillColor: "#000"
    };

    // create particler instance
    var particlerExample = new Particler("particler-instance", particlerOptions);
</script>

Configuration

propertiestypedefault valuenotes
backgroundColorstring"transparent"Canvas background color
fillColorstring"#000000"Dots and lines color
frameDurationnumber20Frame update time
lineWidthnumber0.05Lines width
minimalLineLengthnumber250The minimum height to draw lines beetwen dots
minSizenumber1Minimal dot size
maxSizenumber3Maximal dot size
quantitynumber20Amount of dots in animation
speednumber25Distance of dot movement during frames