bouncing-ball

0.0.6 • Public • Published

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

/bouncing-ball/

    Package Sidebar

    Install

    npm i bouncing-ball

    Weekly Downloads

    1

    Version

    0.0.6

    License

    none

    Last publish

    Collaborators

    • patmooney