TypeId, UserId improperly set
Check if they are always properly set.
TypeId and UserId are swapped: the protocol specifies that "the first two bytes of the type/user attribute are therefore encoding the User ID, while the second half of the attribute encode the actual Type ID resulting in two 16bit unsigned integer values."
In TuioComponent.js - setTypeUserId, change
this.typeId = bufferView.getUint16(0);
this.userId = bufferView.getUint16(2);
to
this.typeId = bufferView.getUint16(2);
this.userId = bufferView.getUint16(0);
Thanks. There are I think other issues with it, but I didn't have time to check it out. In general, I developed this for something else, where in the end I didn't use Tuio2. I actually never had a device with Tuio2 and it was never tested with anything real, just with the simulator.
I hope to have the things that are supposed be implemented bug-free at one point, but I'm not sure what the long term status of this project is.