0.0.0-alpha.1 • Published 3 years ago

implosion v0.0.0-alpha.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Implosion.js

Fork of the excellent impetus.js by Chris Bateman.

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.

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

Installation

yarn add implosion
# or npm install implosion

Usage

import Implosion from 'implosion';
// const Implosion = require('implosion');

let myImplosion = new Implosion({
    source: myNode,
    update(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.

Implosion 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.0-alpha.1

3 years ago

0.10.1

4 years ago

0.10.0

4 years ago

0.9.0

4 years ago