Skip to content

Commit

Permalink
Zoom is added, convert websocket msg to json request
Browse files Browse the repository at this point in the history
  • Loading branch information
joewashear007 committed Jan 20, 2014
1 parent d5a67b6 commit eae99a7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions index.temp
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@
<p>Use the Buttons To Control The Blender Object</p>
<table>
<tr><td></td><td>
<button id=ButtonUp>/\</button>
<button id=RotateUp>/\</button>
</td><td></td></tr>
<tr><td>
<button id=ButtonLeft><</button></td><td></td><td>
<button id=ButtonRight>></button>
<button id=RotateLeft><</button></td><td></td><td>
<button id=RotateRight>></button>
</td></tr>
<tr><td></td><td>
<button id=ButtonDown>\/</button>
<button id=RotateDown>\/</button>
</td><td></td></tr>
<tr><td colspan=3>
<button id=ButtonIn>+</button><button id=ButtonOut>-</button>
<button id=ZoomIn>+</button><button id=ZoomOut>-</button>
</td></tr>
</table>
</div>
Expand Down
6 changes: 5 additions & 1 deletion res/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ $(document).ready(function(){
}
$("button").click( function () {
if( $(this).attr("id") == "Status") { s.close(1000, "Try to Close"); }
else { s.send($(this).attr("id")); }
else {
var data = {"Actuator":$(this).attr("id"), };
console.log(data);
s.send(JSON.stringify(data));
}
});
$("#DebugTitle").click( function() {
$(".debug").toggle();
Expand Down
Binary file modified test.blend
Binary file not shown.

0 comments on commit eae99a7

Please sign in to comment.