Leap!
notes
X

Menu
http://media.tojicode.com/webvr-test/
this.get("Slider1").addScript(function onValueChange(val) {
var cubeArray = this.get("webvrMorph").renderState.cubeArray;
cubeArray.pluck("scale").invoke("set", val+.5,val+.5, val+.5);
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
vi
X

Menu
// This workspace is tied to the following webVR morph (select the line and press CMD+d):
morph.show();
// The render state is defined below. Note that it is required to have the
// function initialize and animate defined.
// You can rebuild the entire scene when you press CMD+s. To execute individual
// expressions select it and press CMD+d. CMD+p will also print the result.
// The "show vars" button on the top left will reveal all definitions in this workspace.
// Click on a definition to jump to its source.
// Here is the code for scene "my new scene":
var logger = $morph("webvrLogger");
var morph = this;
var ex = morph.getExtent();
var morphWidth = ex.x;
var morphHeight = ex.y;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#hands: 0
hand screenPosition 0: 1274.1456,389.43152,-352.76784000000004
hand roll 0: -0.21070214946527926
hand screenPosition 1: 1385.9472,294.09439999999995,259.93056
hand roll 1: 0.044196520682296674
index finger 0: 1127.08032,631.29056,-351.66816
index finger 1: 1299.1152000000002,397.00208,-180.82368
valOnDomain: 32.756988
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
clear!
This world shows how to interact with a Leap Motion sensor. See the scripts in the World morph for loading the Leap library and setting up morphic to listen to Leap events. The two morphs "rightIndexFinger" and "leftIndexFinger" will be used for drawing. See http://leapmotion.github.io/leapjs-plugins/docs/ and https://developer.leapmotion.com/leapjs/welcome for more info.