diff -r 2bdf5d51d434 -r a7b0e40bcab0 front_idill/extern/fajran-tuiojs/connector/npTuioClient/tuiojs.npTuioClient.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/front_idill/extern/fajran-tuiojs/connector/npTuioClient/tuiojs.npTuioClient.js Fri Apr 06 18:32:13 2012 +0200 @@ -0,0 +1,31 @@ + +tuio.setConnector({ + _failmsg: "Unable to initialize npTuioClient plugin.", + _id: "__tuiojs_connector_npTuioClient", + + start: function() { + var el = document.getElementById(this._id); + if (el == undefined) { + var el = document.createElement('object'); + el.setAttribute('id', this._id); + el.setAttribute('type', 'application/x-tuio'); + el.appendChild(document.createTextNode(this._failmsg)); + document.body.appendChild(el); + } + + // TODO: check if the plugin can be loaded. + // if so, hide the plugin (display:none). + }, + + stop: function() { + var el = document.getElementById(this._id); + if (el != undefined) { + document.body.removeChild(el); + } + } +}); + +function tuio_callback(type, sid, fid, x, y, angle) { + tuio.callback(type, sid, fid, x, y, angle); +} +