diff options
-rw-r--r-- | web/slam-bang.html | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/web/slam-bang.html b/web/slam-bang.html index 73bceb9..716b773 100644 --- a/web/slam-bang.html +++ b/web/slam-bang.html @@ -3,10 +3,10 @@ <script type="text/javascript" src="jquery-1.7.1.js"></script> <script type="text/javascript"> var sp_position = function(position) { - return (position.x + ', ' + position.y + ', ' + position.z); + return ('Position: ' + position.x + ', ' + position.y + ', ' + position.z); }; var sp_orientation = function(orientation) { - return (orientation.x + ', ' + orientation.y + ', ' + orientation.z + ', ' + orientation.w); + return ('Orientation: ' + orientation.x + ', ' + orientation.y + ', ' + orientation.z + ', ' + orientation.w); }; var update = function() { $.getJSON("http://notk.org/~adrien/slam-bang.json", function(data) { @@ -18,8 +18,9 @@ p.push(s); } $("#placeholder").html('<ul>' + p + '</ul>'); + if (data) + setTimeout(update, 1000); }); - setTimeout(update, 1000); }; $(document).ready(function() { update(); |