prior

prior gesture is activated when you swipe the arm to the left when the arm is raised. It resembles the action which happens when you click on the mouse and swipe which can be used for instance for selecting the previous image in a slideshow.

Let’s see a simple example to understand how it works!

We are going to create a simple application which changes the text on the screen when next gesture is actioned.

In order to trigger the function from Javascript we are going to create a message called “msg” in the HTML code, this by default is set to show on the top left of  the screen the text ‘Press prior!’ and will change when the action is captured by the sensors.

 

HTML

<html>

<head>
</head>

<body>
     <h1 id="msg">Press Prior!</h1>
  <canvas id="skeletonsCanvas" width="640" height="480"></canvas>


</body>

</html>

Now, within the prior function on JAVASCRIPT we are going to add the line which calls “msg” created on the HTML code, and will show on the screen the message “Prior Pressed!” when an action is captured by the sensors.

JAVASCRIPT

function prior() {
  console.debug('Prior');
  //sendToArduino('1');
  document.getElementById("msg").innerHTML = "Prior Pressed!";
}

If you are not using the uboxPlayer on the PC with the Kinect sensor you can test it out on the web. For doing so, open the following link, right click on the mouse and select “Prior” from the dropdown menu. It will change as mentioned.

Prior App link