front_idill/extern/fajran-tuiojs/examples/processingjs/paint.html
changeset 25 a7b0e40bcab0
child 28 9ccef81f02ab
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/front_idill/extern/fajran-tuiojs/examples/processingjs/paint.html	Fri Apr 06 18:32:13 2012 +0200
@@ -0,0 +1,34 @@
+
+<html><head>
+<script type="text/javascript" src="../../src/tuio.js"></script>
+<script type="text/javascript" src="../../connector/npTuioClient/tuiojs.npTuioClient.js"></script>
+<script type="text/javascript" src="processing.js"></script>
+<script type="text/javascript" src="tuio.processing.js"></script>
+<script type="text/javascript" src="init.js"></script>
+</head>
+<body>
+
+<script type="application/processing">
+// All Examples Written by Casey Reas and Ben Fry
+// unless otherwise stated.
+var client;
+
+void setup() {
+  size(200, 200);
+  background(102);
+  client = new tuio.TuioProcessing(this);
+}
+
+void draw() {
+  stroke(255);
+  var list = client.getTuioCursors();
+  int i, len = list.length();
+  for (i=0; i<len; i++) {
+	var o = list[i];
+	arc(o.getScreenX(width), o.getScreenY(height), 15, 15, 0, 2*PI);
+  }
+}
+
+</script><canvas width="300" height="300"></canvas>
+
+</body></html>