Skip to content

bereziuk/particler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

properties type default value notes
backgroundColor string "transparent" Canvas background color
fillColor string "#000000" Dots and lines color
frameDuration number 20 Frame update time
lineWidth number 0.05 Lines width
minimalLineLength number 250 The minimum height to draw lines beetwen dots
minSize number 1 Minimal dot size
maxSize number 3 Maximal dot size
quantity number 20 Amount of dots in animation
speed number 25 Distance of dot movement during frames

About

JavaScript library for creating particles animation.

Resources

Stars

Watchers

Forks

Packages

No packages published