Permalink
Browse files

fully working

  • Loading branch information...
1 parent 39989d0 commit a5732b6d683393e220a08efc0ff3b8b7e507eceb Greg Borenstein committed Oct 26, 2011
Showing with 22 additions and 17 deletions.
  1. +19 −15 node/index.html
  2. +3 −2 skelestreamer.pde
View
@@ -1,6 +1,6 @@
<html>
<head>
- <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
+ <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="for_each.js"></script>
<script src="assets/Three.js"></script>
@@ -13,20 +13,24 @@
var joints = {};
- //$(function(){
-
- //$("#start").click(function(){
- var socket = io.connect('http://localhost:5000');
- socket.on('data', function (data) {
- $.forEach(data, function(value, key, i){
- if(key == "session"){
- $("#" + key).html(value);
- } else{
- jointData[key] = value;
- }
+ $(document).ready(function(){
+
+ $("#start").click(function(){
+ var socket = io.connect('http://localhost:5000');
+ socket.on('data', function (data) {
+ $.forEach(data, function(value, key, i){
+ if(key == "session"){
+ $("#" + key).html(value);
+ } else{
+ jointData[key] = value;
+ }
+ });
});
+
+ return false;
});
- //});
+ });
+
var camera, scene, renderer,
@@ -91,8 +95,8 @@
});
- var headVec = new THREE.Vector3(jointData.head.x, jointData.head.y,jointData.head.z)
- camera.lookAt(headVec);
+ var torsoVec = new THREE.Vector3(jointData.torso.x, jointData.torso.y,jointData.torso.z)
+ camera.lookAt(torsoVec);
renderer.render( scene, camera );
View
@@ -27,6 +27,7 @@ void setup() {
kinect = new SimpleOpenNI(this);
kinect.enableDepth();
kinect.enableUser(SimpleOpenNI.SKEL_PROFILE_ALL);
+ kinect.setMirror(true);
userList = new IntVector();
enterSetup(); // FSM Bug: it should start by firing off the enter function for the starting state!
@@ -66,11 +67,11 @@ void doSetup() {
text("Ready to stream.\nUUID: " + recordingUUID, 5, 25);
}
else {
- text("Waiting for user calibration.\tUUID: "+ recordingUUID, 5, 25);
+ text("Waiting for user calibration.\nUUID: "+ recordingUUID, 5, 25);
}
}
else {
- text("Waiting for user.\tUUID: " + recordingUUID, 5, 25);
+ text("Waiting for user.\nUUID: " + recordingUUID, 5, 25);
}
}

0 comments on commit a5732b6

Please sign in to comment.