The Leap Motion

Field.21 (Mac) and above has support for the Leap Motion. Some example code:

var Hands = Java.type("auw.misc.Hands")

// a 3d layer with camera control
var l = _.stage.withName("myFantasticLayer")
l.is3D  = true
l.makeKeyboardCamera()

// every frame in our animation loop
while(_.stage.frame())
{
	
    // we'll draw a line
	var f = new FLine()
	
    // this odd for syntax iterates over
    // every entry in 'Hands.joints'
	for(var j of Hands.joints)
	{
        // two parts to 'j'
		var name = j[0]
		var at = j[1]

        // at is a vec(x,y,z)
		f.lineTo(at.x, at.y, at.z)
	}

    // remember to set the color
	f.color = vec(1,1,1,1)

    // scale everything down so we stand a better chance of seeing it
	l.lines.f = f * 0.2
	
}

You might need run some of Leaps own demo / intro / welcome / orientation tools before Field (or anybody else) will recognize that the device has been plugged in. If it’s working, you should be able to see some red lights on it.