Skip to content

garrettallen/fireflies

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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>

About

Javascript fireflies effect for your wedsitez

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published