front_idill/extern/fajran-tuiojs/examples/dump.html
author bastiena
Fri, 06 Apr 2012 18:32:13 +0200
changeset 25 a7b0e40bcab0
permissions -rw-r--r--
Front IDILL : Basic JS TUIO lib loaded
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
     1
<html><head>
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
     2
<script type="text/javascript" src="log.js"></script>
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
     3
<script type="text/javascript" src="../src/tuio.js"></script>
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
     4
<script type="text/javascript" src="../connector/npTuioClient/tuiojs.npTuioClient.js"></script>
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
     5
<script type="text/javascript">
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
     6
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
     7
tuio.object_add(function(data) {
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
     8
	log('[object] add: sid=' + data.sid + ', fid=' + data.fid + ', x=' + data.x + ', y=' + data.y + ', angle=' + data.angle);
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
     9
});
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    10
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    11
tuio.object_update(function(data) {
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    12
	log('[object] update: sid=' + data.sid + ', fid=' + data.fid + ', x=' + data.x + ', y=' + data.y + ', angle=' + data.angle);
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    13
});
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    14
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    15
tuio.object_remove(function(data) {
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    16
	log('[object] remove: sid=' + data.sid + ', fid=' + data.fid + ', x=' + data.x + ', y=' + data.y + ', angle=' + data.angle);
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    17
});
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    18
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    19
tuio.cursor_add(function(data) {
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    20
	log('[cursor] add: sid=' + data.sid + ', fid=' + data.fid + ', x=' + data.x + ', y=' + data.y);
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    21
});
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    22
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    23
tuio.cursor_update(function(data) {
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    24
	log('[cursor] update: sid=' + data.sid + ', fid=' + data.fid + ', x=' + data.x + ', y=' + data.y);
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    25
});
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    26
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    27
tuio.cursor_remove(function(data) {
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    28
	log('[cursor] remove: sid=' + data.sid + ', fid=' + data.fid + ', x=' + data.x + ', y=' + data.y);
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    29
});
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    30
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    31
function init() {
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    32
	tuio.start();
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    33
}
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    34
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    35
</script>
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    36
<body onload="init()">
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    37
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    38
<script type="text/javascript">
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    39
	if (console.log) {
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    40
		document.write("Open your Firebug's console to see multi-touch events.");
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    41
	}
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    42
	else {
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    43
		document.write('<h1>Multi-touch events</h2>');
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    44
		document.write('<pre id="log"></pre>');
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    45
	}
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    46
</script>
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    47
a7b0e40bcab0 Front IDILL :
bastiena
parents:
diff changeset
    48
</body></html>