front_idill/extern/fajran-tuiojs/examples/processingjs/paint.html
author bastiena
Fri, 06 Apr 2012 18:36:40 +0200
changeset 26 858e90c7cbaa
parent 25 a7b0e40bcab0
child 28 9ccef81f02ab
permissions -rw-r--r--
Front IDILL : JS TUIO module modified to receive 3D Points


<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>