Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fireworks on pure 2D canvas without any dependencies

License

Notifications You must be signed in to change notification settings

PixxxeL/js-fireworks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Javascript Fireworks

Usage on your HTML page:

<canvas width="640" height="480" id="fireworks-canvas" style="background:#000;"></canvas>
<script src="js/fireworks.js"></script>
<script>
window.onload = function () {
    var firework = JS_FIREWORKS.Fireworks({
        id : 'fireworks-canvas',
        hue : 120,
        particleCount : 50,
        delay : 0,
        minDelay : 20,
        maxDelay : 40,
        boundaries : { // of respawn and target
            top: 50,
            bottom: 240,
            left: 50,
            right: 590
        },
        fireworkSpeed : 2,
        fireworkAcceleration : 1.05,
        particleFriction : .95,
        particleGravity : 1.5
    });
    firework.start();
};
</script>

Example: http://www.pixel-tyumen.ru/works/js-firework/

About

Fireworks on pure 2D canvas without any dependencies

Topics

Resources

License

Stars

Watchers

Forks