--- a/front_idill/extern/fajran-tuiojs/examples/processingjs/tuio.processing.js Fri Apr 06 18:32:13 2012 +0200
+++ b/front_idill/extern/fajran-tuiojs/examples/processingjs/tuio.processing.js Fri Apr 06 18:36:40 2012 +0200
@@ -13,6 +13,9 @@
var tuio = this.tuio;
+/*
+* Modifié par alexandre.bastien@iri.centrepompidou.fr
+*/
function wrapPath(d) {
var i, len = d.path.length;
var res = [];
@@ -21,6 +24,7 @@
res.push({
getX: function() { return pos[0]; },
getY: function() { return pos[1]; },
+ getZ: function() { return pos[2]; },
getScreenX: function(width) { return width * pos[0]; },
getScreenY: function(height) { return height * pos[1]; },
@@ -44,17 +48,33 @@
};
}
+/*
+* Modifié par alexandre.bastien@iri.centrepompidou.fr
+*/
function wrapCursor(d) {
return {
getSessionID: function() { return d.sid; },
getCursorId: function() { return d.fid; },
getX: function() { return d.x; },
getY: function() { return d.y; },
+ getZ: function() { return d.z; },
getScreenX: function(width) { return width * d.x; },
getScreenY: function(height) { return height * d.y; },
getPath: function() { return wrapPath(d); },
+ getPosition: function() { return wrapPosition(d); },
+ };
+}
+
+/*
+* Ajouté par alexandre.bastien@iri.centrepompidou.fr
+*/
+function wrapPosition(d) {
+ return {
+ getX: function() { return d.x; },
+ getY: function() { return d.y; },
+ getZ: function() { return d.z; },
};
}