Impulsion.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

Impulsion is meant to be used as a part of other components — these simple demos just demonstrate the momentum.

Usage

new impulsion({
    source: myNode,
    onUpdate: function(x, y, previousX, previousY) {
        // whatever you want to do with the values
    }
});

For more usage details, see the API on GitHub.