tuioZones - An open MT library for Processing

The tuioZones library for Processing receives and processes TUIO messages to manipulate screen zones set in the processing sketch. It is intended to make simple touch interactions easier to code--like drag, scale, press, and toggle.

Here is a summary of how it works today. In the Processing sketch a tuioZone is set with a position and size. The zone can then be set as “draggable”, “scalable”, “swipeable”, or left static. Displayed objects (e.g. images or shapes) can then be positioned and sized using the zone attributes. If a zone is dragged (one finger motion) the object will then be dragged along with it. If a zone is scaled (two finger pinch) the object will then shrink and grow accordingly. Also, a zone’s toggle state can be returned through a function call, and another function call can return wether the zone is being pressed or not. Other raw data, such as cursor positions and trails, can be returned as well.

This library only handles cursor (finger) events and not objects. It requires a tracker, like tbeta or touchlib, and the oscP5 library must be imported into the sketch. Other interactions, like rotation, are in the works; but any suggestions, critiques, or bug-findings are fully welcome. I hope others find it useful.

Project's Page   |   Join the Discussion

Responses

Nice work. Too bad you beat me with the idea. I had something very similar in mind to resolve which window is the receiver of touch input.

Nice, processing needs more ‘event based’ libraries like this!

Leave a response

Click here to register an account.

Categories