Homebrewed Multi-Touch Screen Input using Processing.js

Check out this demo of using Processing.js to get multi-touch screen input:

Using Multi-Touch Events in Firefox

The usage for multi-touch Javascript events goes a little something like this. document.multitouchData = true;, which I am guessing turns on the touch listeners ;) one that’s active, you will need to add event listeners.

      document.multitouchData = true;

      document.addEventListener( "MozTouchDown", function( e ){
        console.log( e );
      }, false );

But you’re not limited to “MozTouchDown”, you can also use “MozTouchUp” and “MozTouchMove”. More information on touch Events for Firefox can be found here: Multitouch Polish DOM Events and you can download Felipe’s javaScript touch demos from: Felipe’s Demos from Video.Hooking It All Together

Armed with my new toys, I added some real basic multi-touch event handling for Processing.js. I am sure this code will change a lot once I have had more time to develop and try out other devices with more points and pressure sensors. Here is the code I added to Processing.js which ( in theory ) should be able to automatically expand to handle infinite touch points:”

Click through to read more and see the code.  Here’s a video of this hack in action:

Comment Icon

No Comments

Leave a Comment

No comments yet.

Comment Icon

Leave a comment

If you want a cool icon, get a Gravatar

RSS feed for comments on this post. TrackBack URI