Leap Motion


Allows user to interact with Cylon.js devices using a Leap Motion controller. The Leap Motion uses its built in cameras to track the user's hand motions, and translations those to events that Cylon.js can use to trigger actions or control hardware.

For more information click here.

How To Connect

Cylon.robot({
  connections: {
    leapmotion: { adaptor: 'leapmotion' }
  },

  devices: {
    leapmotion: { driver: 'leapmotion' }
  },

});

How To Use

Example receiving hand gesture events from a Leap Motion.

var Cylon = require('cylon');

Cylon.robot({
  connections: {
    leapmotion: { adaptor: 'leapmotion' }
  },

  devices: {
    leapmotion: { driver: 'leapmotion' }
  },

  work: function(my) {
    my.leapmotion.on('hand', function(hand) {
      console.log(hand);
    });
  }
}).start();

Events

frame

Emitted when the Leap Motion has finished processing a new frame

Values

  • data

hand

Emitted per frame when the Leap Motion sees a hand

Values

  • data

gesture

Emitted per frame when the Leap Motion sees a gesture

Values

  • data

Compatibility