gest.js is a webcam based gesture recognition library that helps developers make webpages more immersive
This is a short presentation I gave at MelbJS that summarises gest.js: http://hadimichael.github.io/gestjs-presentation/
Air2048 Tile Game http://bennettfeely.com/air2048/ - thanks to @bennettfeely
The University of Connecticut are using gest.js on a large-screen lobby display http://grad.uconn.edu/lobbydisplay/winter/ - thanks to @joelsalisbury
Stop the Elves - Christmas game http://stoptheelves.thirststudios.com/ - thanks again to @LochieAxo
Gesture game http://thirst-staging.com/experiments/gest/ - thanks to @LochieAxo
Are you using gest.js? Please get in touch @hadi_michael
A simple gest.js demo that displays the gesture direction on screen: https://hadi.io/gest.js/demos/simple/index.html
Using gest.js to control Nathan Searles’ SlidesJS: https://hadi.io/gest.js/demos/slidesjs/index.html
You will need to include the ‘gest.js’ library using something like:
<script type=“text/javascript” src=“gest.min.js”></script>
You can start gest.js by calling:
gest.start();
Use the .options.subscribeWithCallback(…)
function to listen for gestures:
gest.options.subscribeWithCallback(function(gesture) {
//handle gesture .direction .up .down .left .right .error
});
This method is recommended because it will automatically handle cross-browser event handling.
You can register an event listener on the document
for gest
using:
document.addEventListener('gest', function(gesture) {
//handle gesture .direction .up .down .left .right .error
}, false);
On every event, you will be passed a gesture
object that contains:
.direction
the recognised gesture in words as a string.up
boolean, true if the recognised gesture is up.down
boolean, true if the recognised gesture is down.left
boolean, true if the recognised gesture is left.right
boolean, true if the recognised gesture is right.error
an error object with…
.code
a code as an int.message
and a message as a stringYou can stop gest.js at any time by calling:
gest.stop();
You can specify the degree of colour change that should be used to determine whether or not a pixel has changed. The specified value should range from 0-100, with 100 implying that the slightest change should be enough. You can specify sensitivity using: gest.options.sensitivity(85);
To improve recognition in bright lighting conditions, you can enable HSV skin filtering using: gest.options.skinFilter(true);
In order to view the video stream and enable console.log(…)
messages, you will need to toggle debugging using: gest.options.debug(true);
.options.subscribeWithCallback(…)
functiongest.js is an extension of work started by William Wu https://github.com/willy-vvu.
Copyright © 2013, Hadi Michael (http://hadi.io)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.