No description, website, or topics provided.
CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
src
test
.gitignore
README.md
package.json

README.md

HAPPY HANDS 🙌 👏 👊

Happy Hands is a client side javascript library which helps you detect physical gestures coming from a mobile device.

Planned Sample Usage:

script(src = '/HappyHands.js')

punch = [[20, 50, 15, 9, 3, 6, 80, 5 ,1], [20, 50, 15, 9, 3, 6, 80, 5 ,1]]
kick  = [[20, 50, 15, 9, 3, 6, 80, 5 ,1], [20, 50, 15, 9, 3, 6, 80, 5 ,1]]
slap  = [[20, 50, 15, 9, 3, 6, 80, 5 ,1], [20, 50, 15, 9, 3, 6, 80, 5 ,1]]

hands = new HappyHands(
    accuracy    : 5
    poll_speed  : 3
)

Single Events

hands.on punch, ->
    alert 'FACE PUNCH'

hands.on slap, ->
    alert 'KICK'

Sequential Events

hands.on punch, ->
    hands.on slap, ->
        alert 'PUNCH SLAP'

Passing Options to Events

hands.on punch, (->
    alert 'PUNCH'
),
kill_on_complete    : true
accuracy            : 10

Generating "Records"

Records can be created from going to the happy hands web site and recording a gesture.

Compiling

coffee -c -w -o lib/ src/

Testing

mocha --compilers coffee:coffee-script -R spec