Leap integration with JRuby, with easy access to Leap’s events.
-
Clone this directory (gem not setup yet)
-
Install JRuby. My favorite way is:
rvm install jruby
-
Get the latest version of the Leap SDK (0.7.0).
-
Copy the necessary files:
cp /path/to/Leap/lib/{libLeap.dylib,lib_LeapJava.dylib,LeapJava.jar} .
-
Run the Leap background application
Run rake
to test the connection of your Leap (it will output simple info about each frame, and demonstrates how to listen for Leap events). It should look like this:
Initialized
Press Enter to quit
Frame: 744531 Timestamp: 9970919044 Hands: 1 Fingers: 3 Tools: 0 Frame: 744544 Timestamp: 9971038006 Hands: 1 Fingers: 4 Tools: 0 Frame: 744545 Timestamp: 9971047247 Hands: 1 Fingers: 4 Tools: 0 Frame: 744548 Timestamp: 9971074568 Hands: 1 Fingers: 5 Tools: 0 Frame: 744549 Timestamp: 9971083662 Hands: 1 Fingers: 5 Tools: 0 Exit
This is just a proof-of-concept _Hello World_ that mimics the Sample.*
files in Leap SDK.
-
Tieg Zaharia (github)