front_idill/extern/fajran-tuiojs/examples/processingjs/paint.html
changeset 25 a7b0e40bcab0
child 28 9ccef81f02ab
equal deleted inserted replaced
24:2bdf5d51d434 25:a7b0e40bcab0
       
     1 
       
     2 <html><head>
       
     3 <script type="text/javascript" src="../../src/tuio.js"></script>
       
     4 <script type="text/javascript" src="../../connector/npTuioClient/tuiojs.npTuioClient.js"></script>
       
     5 <script type="text/javascript" src="processing.js"></script>
       
     6 <script type="text/javascript" src="tuio.processing.js"></script>
       
     7 <script type="text/javascript" src="init.js"></script>
       
     8 </head>
       
     9 <body>
       
    10 
       
    11 <script type="application/processing">
       
    12 // All Examples Written by Casey Reas and Ben Fry
       
    13 // unless otherwise stated.
       
    14 var client;
       
    15 
       
    16 void setup() {
       
    17   size(200, 200);
       
    18   background(102);
       
    19   client = new tuio.TuioProcessing(this);
       
    20 }
       
    21 
       
    22 void draw() {
       
    23   stroke(255);
       
    24   var list = client.getTuioCursors();
       
    25   int i, len = list.length();
       
    26   for (i=0; i<len; i++) {
       
    27 	var o = list[i];
       
    28 	arc(o.getScreenX(width), o.getScreenY(height), 15, 15, 0, 2*PI);
       
    29   }
       
    30 }
       
    31 
       
    32 </script><canvas width="300" height="300"></canvas>
       
    33 
       
    34 </body></html>