front_idill/extern/fajran-npTuioClient/example/tracker.html
changeset 28 9ccef81f02ab
parent 21 e4e5f02787a1
--- a/front_idill/extern/fajran-npTuioClient/example/tracker.html	Thu Apr 12 13:09:46 2012 +0200
+++ b/front_idill/extern/fajran-npTuioClient/example/tracker.html	Thu Apr 12 15:33:25 2012 +0200
@@ -17,55 +17,55 @@
 var updateStarted = false;
 
 function update() {
-	if (updateStarted) return;
-	updateStarted = true;
+    if (updateStarted) return;
+    updateStarted = true;
 
-	var nw = window.innerWidth;
-	var nh = window.innerHeight;
+    var nw = window.innerWidth;
+    var nh = window.innerHeight;
 
-	if ((w != nw) || (h != nh)) {
-		w = nw;
-		h = nh;
-		canvas.style.width = w+'px';
-		canvas.style.height = h+'px';
-		canvas.width = w;
-		canvas.height = h;
-	}
+    if ((w != nw) || (h != nh)) {
+        w = nw;
+        h = nh;
+        canvas.style.width = w+'px';
+        canvas.style.height = h+'px';
+        canvas.width = w;
+        canvas.height = h;
+    }
 
-	ctx.clearRect(0, 0, w, h);
+    ctx.clearRect(0, 0, w, h);
 
-	var i, len = tuio.cursors.length;
-	for (i=0; i<len; i++) {
-		var obj = tuio.cursors[i];
-		var x = obj.x;
-		var y = obj.y;
-		var px = x * w;
-		var py = y * h;
+    var i, len = tuio.cursors.length;
+    for (i=0; i<len; i++) {
+        var obj = tuio.cursors[i];
+        var x = obj.x;
+        var y = obj.y;
+        var px = x * w;
+        var py = y * h;
 
-		ctx.beginPath();
-		ctx.arc(px, py, 20, 0, 2*Math.PI, true);
+        ctx.beginPath();
+        ctx.arc(px, py, 20, 0, 2*Math.PI, true);
 
-		ctx.fillStyle = "rgba(0, 0, 200, 0.2)";
-		ctx.fill();
+        ctx.fillStyle = "rgba(0, 0, 200, 0.2)";
+        ctx.fill();
 
-		ctx.lineWidth = 2.0;
-		ctx.strokeStyle = "rgba(0, 0, 200, 0.8)";
-		ctx.stroke();
-	}
+        ctx.lineWidth = 2.0;
+        ctx.strokeStyle = "rgba(0, 0, 200, 0.8)";
+        ctx.stroke();
+    }
 
-	updateStarted = false;
+    updateStarted = false;
 }
 
 function ol() {
-	canvas = document.getElementById('canvas');
-	ctx = canvas.getContext('2d');
-	timer = setInterval(update, 15);
+    canvas = document.getElementById('canvas');
+    ctx = canvas.getContext('2d');
+    timer = setInterval(update, 15);
 };
 
 </script>
 </head>
 <body onload="ol()">
-	
+    
 <canvas id="canvas" width="300" height="300" style="top:0px; left:0px; width: 300px; height: 300px;"></canvas>
 <object id="tuio" type="application/x-tuio">Plugin FAILED to load</object>