Leap motion controller

Hello,

I know this is mentioned in the Space Challenge topic, but I thought it’d be nice to have a dedicated one for it.

What are the plans to get the motion controller to work with Cesium app (never really know what you mean with ‘app’ but presume it’s what we can see in the sandbox)?

Cheers

Hi Toby,

As you mentioned, we quickly coded support for the Leap Motion controller for the EarthKAM Explorer app. The source is on github:

https://github.com/AnalyticalGraphicsInc/EarthKAMExplorer

It’s a bit dated at this point and not flushed out, but would be a good starting point if you want to experiment.

As far as official support for Leap Motion, this is something we want to do, but I don’t expect any of the core contributors will get to it in the next several months. We, of course, welcome pull requests.

Regards,

Patrick

Hey Patrick,

We have developed some basic LEAP motion capability based off of the project you mentioned, but slightly improved. It’s not perfect, but its certainly useful. Can we chat about how you’d like it incorporated into Cesium? The Leap motion js library is obviously a third party lib but also around 79kB minified, so i’m not sure you’d want it adding to the size of Cesium out of the box. Also, most of your third party libs in the project seem to build tools. Do you want it included inside Cesium or as a plugin? Just some of the random questions popping around in my head. Do you have a contributors guide or ideas on plugins like this? Anyway, happy to help, just would like some guidance. :slight_smile:

Mike Macaulay

Hi Mike,

Thanks for wanting to contribute. We have a Contributor’s Guide but it sounds like you already know most of it. We’ll also need a CLA, see CONTRIBUTING.md.

As for including third-party libraries, there’s a good discussion here. The Leap Motion license looks good, but at 79KB minified, it is not central enough to Cesium for us to include it in a standard Cesium build so I agree with your plugin approach. Leaflet has done this with great success.

I could see us doing something like adding a new Plugins directory to the project’s root directory and having build options to include various plugins in Cesium.js. AMD users would already be OK. There are a lot details to consider like does each plugin have its own third-parties directory, where do the examples go, do plugins really live in the main repo, etc. We’re not going to be able to flush this out this month since several of us are helping out with NORAD Tracks Santa again.

I suggest just adding support for Leap Motion as part of core Cesium and opening a pull request into the leapmotion branch, instead of master, which will allow us to review and merge your code without slowing you down while we work out the other details. You’ll also want to key an eye on pull requests #1331, which may affect you.

Patrick

Hey Patrick,

I thought about it a little more and really liked Leaflet’s route. So I went ahead and made a separate plugin project here. It’s hopefully both AMD compatible as well as global. It might need a little testing still (I left my Leap Motion at the office over the break), but I’ve been using a version of it for about a month now. I plan to test it out hopefully on Friday and confirm it’s good to go.

Mike

Hi Mike,

Are you able to confirm this is good to go? I started a separate thread on plugins, where we would provide a list of projects like this on cesiumjs.org to promote your work. Please chime in there with ideas.

Regards,

Patrick

Hey Patrick,

Sorry, I forgot to check the “email updates to me” box!

Yes, it wasn’t for awhile, but it should now be good to go. It works locally for me, I’d love someone else to try it out if they’ve got a Leap controller of their own. Also the location has changed, it’s now at a different location. I’ll chime in with ideas on the other thread as well. :slight_smile:

Mike

Thanks Mike.

Dan has a Leap Motion. Dan - could you give this a try: https://github.com/Aviture/cesium-leap

Patrick

Hi Mike,

I tried out your plugin. It works great and its definitely an improvement over the EarthKAM Explorer.

Dan