front_idill/extern/fajran-npTuioClient/example/paint.html
changeset 28 9ccef81f02ab
parent 21 e4e5f02787a1
--- a/front_idill/extern/fajran-npTuioClient/example/paint.html	Thu Apr 12 13:09:46 2012 +0200
+++ b/front_idill/extern/fajran-npTuioClient/example/paint.html	Thu Apr 12 15:33:25 2012 +0200
@@ -24,48 +24,48 @@
 }
 
 function tuio_cursor_update(sid, fid, x, y) {
-	var px = x * w;
-	var py = y * h;
+    var px = x * w;
+    var py = y * h;
 
-	ctx.beginPath();
-	ctx.fillStyle = "rgba(0, 0, 200, 0.2)";
-	ctx.arc(px, py, 5, 0, 2*Math.PI, true);
-	ctx.fill();
+    ctx.beginPath();
+    ctx.fillStyle = "rgba(0, 0, 200, 0.2)";
+    ctx.arc(px, py, 5, 0, 2*Math.PI, true);
+    ctx.fill();
 }
 
 function tuio_cursor_remove(sid, fid, x, y) {
 }
 
 function tuio_callback(type, sid, fid, x, y, a) {
-	if (type == 0) {
-		tuio_object_add(sid, fid, x, y, a);
-	}
-	else if (type == 1) {
-		tuio_object_update(sid, fid, x, y, a);
-	}
-	else if (type == 2) {
-		tuio_object_remove(sid, fid, x, y, a);
-	}
-	else if (type == 3) {
-		tuio_cursor_add(sid, fid, x, y);
-	}
-	else if (type == 4) {
-		tuio_cursor_update(sid, fid, x, y);
-	}
-	else if (type == 5) {
-		tuio_cursor_remove(sid, fid, x, y);
-	}
+    if (type == 0) {
+        tuio_object_add(sid, fid, x, y, a);
+    }
+    else if (type == 1) {
+        tuio_object_update(sid, fid, x, y, a);
+    }
+    else if (type == 2) {
+        tuio_object_remove(sid, fid, x, y, a);
+    }
+    else if (type == 3) {
+        tuio_cursor_add(sid, fid, x, y);
+    }
+    else if (type == 4) {
+        tuio_cursor_update(sid, fid, x, y);
+    }
+    else if (type == 5) {
+        tuio_cursor_remove(sid, fid, x, y);
+    }
 }
 
 function ol() {
-	canvas = document.getElementById('c');
-	ctx = canvas.getContext('2d');
+    canvas = document.getElementById('c');
+    ctx = canvas.getContext('2d');
 }
 
 </script>
 </head>
 <body onload="ol()">
-	
+    
 <canvas id="c" 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>