Impetus.js

Add momentum to anything. It's like iScroll, except not for scrolling. Supports mouse and touch events. Less than 1.5KB gzipped.

View on GitHub Download

Impetus is meant to be used as a part of other components — these simple demos just demonstrate the momentum. For an example of a practical implementation, take a look at Spherical.js.

Usage

new Impetus({
    source: myNode,
    update: function(x, y) {
        // whatever you want to do with the values
    }
});

For more usage details, see the API on GitHub.