What?

A mouse gesture library written soley in javascript with power and flexiblity to mould itself for you. Implemented on Mootools following the Object Oriented standards. Library is aimed to set out a future framework for mouse guesters for any browser including modern mobile devices. Check out the video below showing moousture working on iPad:

How?

Its based on simplicity. Three major concepts.

Easy yet powerful

Each class allows you to tune the way gestures for yourself. For example:

new Moousture.Monitor(20, 2);

Creates Monitor which polls probe position after every 20ms and allows error of 2px to be ignored (not causing to trigger any event)

new Moousture.MouseProbe($(document));

Creates a mouse probe for entire document. Note the power you have to probe any DOM object

new Moousture.Recorder({maxSteps: 20, minSteps: 8});

Creates a Moousture event class that can keep track of maxSteps mouse movements at maximum. A gesture movment with movements less that minSteps would be simply ignored.

To start probing and recieve gesture events one can simply call .start(probeObj, mooustureObj) of StabilityMonitor. Notice that the gestures must be registered with callback functions first for recieving gesture completion events.

More demos

Tutorial

Its super easy!

Create your own gestures

Above image gives you all the power to make your own gestures. So for example one can make a gesture for letter W as [1, 7, 1, 7]. This gesture registration is even more simple.

matcherObj= new Moousture.ReducedLevenMatcher();
function wGuessed(error){
...
}

matcherObj.addGesture([1, 7, 1, 7], wGuessed);

Download

Moousture 1.0


Moousture 2.0 Pre-beta


Issues

In case of bugs, wishlist, issues please report to Issue tracker

Copyright MaXPert (Zohaib Sibt-e-Hassan).