0.0.2 • Published 5 months ago

impetus-fp v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Impetus.js

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

Check out the demos on the home page.

Impetus will probably never support anything other than simple momentum. If you need scrolling or touch carousels or anything like that, this probably isn't the tool you're looking for.

Usage

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

You give it an area to listen to for touch or mouse events, and it gives you the x and y values with some momentum.

Impetus will register itself as an AMD module if it's available.

Constructor Options

Methods

Browser Support

Chrome, Firefox, Safari, Opera, IE 9+, iOS, Android. Support for IE 8 can be achieved by adding a polyfill for addEventListener.

0.0.2

5 months ago

0.0.1

5 months ago