Javascript fireflies effect for your wedsitez
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
.gitignore
README.md
fireflies.js
package.json

README.md

Javascript Fireflies

Add fireflies to your website or wedsite. Inspired by the JQuery Fireflies, but using CSS3 for animations.

Examples

See the demos and the gh-pages branch for working demos.

Configuration settings:

number_flies - the number of fireflies to use
color - the color of the fireflies
elem -  the selector of the DOM element to contain the fireflies

Use defaults

<html>
<body style="background: #333; width: 100%; height: 100%;">
    <script src='fireflies.js'></script>
    <script>
        (function() {
            fireFlies();
        })();
    </script>
</body>
</html>

Custom settings

<html>
<body>
    <div id="fireflies-container" style="width: 800px; height: 400px; background: #333;"></div>
    <script src='fireflies.js'></script>
    <script>
        (function() {
            fireFlies({
                "number_flies": 100,
                "color": "#fff",
                "elem": "#fireflies-container"
            });
        })();
    </script>
</body>
</html>