Skip to content

Commit

Permalink
fully working
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Borenstein committed Oct 26, 2011
1 parent 39989d0 commit a5732b6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
34 changes: 19 additions & 15 deletions node/index.html
@@ -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>
Expand All @@ -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,
Expand Down Expand Up @@ -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 );

Expand Down
5 changes: 3 additions & 2 deletions skelestreamer.pde
Expand Up @@ -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!
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit a5732b6

Please sign in to comment.