xxxxxxxxxx
var controller
function setup() {
controller = new Leap.Controller({enableGestures: true});
// Note that this means Leap is connected, but not streaming. Use streamingStarted for that.
var state = 'play';
controller.loop(function(frame) {
if (state == 'paused') return;
if (state == 'pausing') {
console.log( frame)
state = 'paused';
}else{
console.log( frame)
}
});
createCanvas(windowWidth, windowHeight);
background(100);
}
function draw() {
ellipse(mouseX, mouseY, 20, 20);
}