Runway 0.1a for Leap Motion
Runway also includes a Flash based polyfill for older browsers that lack native WebSockets support, so that JavasScript applications can also use the data from a Leap device.
See a short video of Runway in action here: http://rhall.s3.amazonaws.com/runway_leapmotion_demo/runway_bridge_demo.mp4
Humbled by Victor Norgren's (@logotype) LeapMotion AS3 lib here:
I officially concede to the maxim that there is always someone out there smarter, faster and more motivated than yourself. For the record, Victor even dropped me an email offering to collaborate on making something really special together, so he is also a gentleman. My hat is off to you kind sir. So, forthwith, I humbly suggest any and all interested parties, please peruse his library as a superior implementation. I plan on forking it for my own use and with that burden lifted, refocus my efforts on actual applications and demonstrations on how the Leap Motion device can be used with Flash. This repository will remain for further examples applications, historical purposes an to serve as a constant reminder to always do good and acknowledge that the best way to learn is from others smarter than yourself. :)
1. Removed dependency on Flex SDK, instead now includes mx.utils.Base64Encoder.as, also included source for the as3corlib in addition to binary .swc for anyone having problems compiling. (Thanks to Todd Greco @mrballistic for the improvement!)
1. Refactored to proper package class structure for ease of use, and diff/change tracking in github 2. Prepped to decouple Leap to AS3 websocket communications completely from demonstration code portion showing finger/pointable position - for ease of use - End goal is a simple exposure of the Leap frame data via an event or callback - then developer can act on however they see fit - coming in next commit probably 3. Change approach to removing pointables from stage in demo (to refine further later) - prepped to decouple demonstration usage from core communications for ease of use - see #2 above - coming in next commit probably
1. Made some quick revisions to support the new json structure introduced with Leap Motion SDK 0.7.1 2. (Not included but coming soon - breaking apart .fla's to proper document class structure for better tracking of revisions on github, and compilation via mxmlc so no Flash IDE is required to compile)
1. Added new polyfill shim .SWF and example in the JS folder. Allows Flash to act as a WebSocket polyfill for browsers that don't natively support Web Sockets
1. Changed the fingertip rendering to be driven by enter_frame instead of the ondata websocket event, to avoid unneccessary drawing/code execution 2. Removed setting visibility, and moved to add or remove child model - need to fine tune this 3. Prepped for making a standalone SWF to act as polyfill for browsers that lack support for WebSockets to allow JS access to Leap data
1. Leap SDK 0.6.6 now includes its own WebSocket server on 6437, serving JSON based info on the data captured by the device - fantastic! 2. Removed old Python socketserver that was not a full WebSocket server implementation - it is now in the deprecated folder for reference/archival purposes 3. Include as3corelib and Worlize WebSocket implementation class dependencies see: AS3_REQUIREMENTS_README.txt document in AS3 folder. 4. Also requires free Flex 4.6.0 SDK libs - not included here due to size - AS3_REQUIREMENTS_README.txt has download links for all libs. 5. Completed support for two hands and all finger tip data 6. Now has a nice connect/disconnect button since the WebSocket server is more robust 7. Linked activate/deactivate handlers to connecting/disconnecting from socket server to avoid garbage, etc. when Flash throttles down when focus is lost to avoid issues with sockets 8. Core communications is now complete - can focus on leveraging data for various uses
11/29/2012 (Initial public release against Leap SDK 0.6.5):
1. Functioning Python Socket server "Runway" to collect data from LeapMotion device, format into JSON and push out over a local socket port 8888. 2. Functioning Flash library to connect via sockets to Runway Socket Server and collect/push JSON data for use in ActionScript 3 3. Demo Flash file showing interaction, finger tip data rendering
Pre 0.6.6 SDK (Deprecated Version) USAGE:
1. Drop the python/Runway.py python script in with your Leap libs in the Leap SDK folder 2. Launch it with: python Runway.py - App will start accepting connections 3. Publish the leap_test1.fla or open the leap_test1.swf - wiggle your fingers over your Leap and watch the fun 4. Observe output from terminal Runway.py app and Flash trace statements 5. Extend, modify, improve and enjoy!
1. The Leap Motion SDK is in a state of flux as they refine things, expect changes an improvements there as they release updates.
So there you have it - all comments, criticisms welcome! Please log issues, pull requests, etc. Enjoy!