Skip to content

joelongstreet/HappyHands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages