npm.io
0.0.6 • Published 8 years ago

bouncing-ball

Licence
Version
0.0.6
Deps
0
Vulns
0
Weekly
0

BouncingBall

A pure JS loading animation


    var BouncingBall = require('bouncing-ball');
    
    var myBalls = new BouncingBall(
        document.getElementById('container'),
        {
            maxTop: 80, // max height in px
            numberOfBalls: 3,
            ballColour: ["pink","green","#00ffee"], // scalar or array
            ballRadius: 10 // px
        }
    );
    
    myBalls.bounce(); // start animation

    // ... some time later ...

    myBalls.unbounce(); // stop animation

Example

Developers

To build

npm install
webpack

Keywords