Thomas Fuchs
Hi, I'm Thomas Fuchs. I'm the author of the script.aculo.us user interface JavaScript library, a member of the Prototype core team and a Ruby on Rails core alumnus. You're using my work every day, even if you're not aware of it (sounds creepy, I know!). Need JS foo? Hire me.

Pinch, Twist, Zoom: Bringing Multitouch to a Browser Near You

October 15th, 2009 by Thomas Fuchs, 9 comments »

I’ve been working this past year together with Nokia to bring multitouch APIs to a browser near you, and this is how it looks and feels like, in a little demo of just about 50 lines of JavaScript code:

Nokia’s new technology is the Starlight browser, a browser based on the Qt port of WebKit, and they’re working with the Mozilla community on the specifications. If you have the hardware/software needed (Windows 7 Multitouch-PC with latest drivers), grab the Starlight browser, and try for yourself. And it’s all open-source, so visit the Starlight open source project page to learn more about the modifications and enhancements to WebKit and grab the source.

scripty2 supports multiple API vendors for Multitouch events, and even provides a desktop emulation (click+drag to pan, shift+click+drag to scale and rotate)– so you can try this out even without having multitouch hardware at your disposal.

Currently the scripty2 API abstraction event supports Desktop emulation, Nokia Starlight and Apple iPhone Mobile Safari. With just one API, you can now multi-touch enable any web application easily, just check out the demos.

manipulate

In a recent update to scripty2, I’ve also introduced automatic support for WebKit CSS transitions, so whenever scripty2 effects are used and CSS transitions are available, the effects engine will automatically do the right thing for you.

All in all, using this in your web sites or apps boils down to just a couple of lines of code:

$('element').observe('manipulate:update', function(event){
  $('element').transform(event.memo).setStyle({
    left: event.memo.panX+'px', top: event.memo.panY+'px'
  });
});

Note the manipulate:update event and the new Element#transform method.

It’s really exiciting to finally get this technology out, and I’d love your feedback, patches and of course see your demos or real-world apps that you build with it! And big thanks to the Team at Nokia for making this possible!

Again, here’s the demos, the scripty2 Multitouch documentation and more videos!

Post to Twitter Tweet This Post Post to Digg Digg This Post Post to Facebook Share on Facebook

9 comments »

JavaScript Rocks! Peformance ebook
Do you run a web site or web application? Do your users a favor, and grab our ebook on JavaScript performance. Profit from our knowledge gathered in over 15 years of working with the Web and JavaScript and make your sites ultra-fast and your users ultra-happy.

9 Comments on “Pinch, Twist, Zoom: Bringing Multitouch to a Browser Near You”

  1. 1 Samo said at 2:57 pm on October 15th, 2009:

    Awesome, looks great!

  2. 2 Jeff C said at 4:46 pm on October 15th, 2009:

    It’s too bad that Javascript “isn’t useful for anything.”

    Looks awesome man, look forward to some apps/demos.

  3. 3 Noor said at 5:21 pm on October 15th, 2009:

    WOW! Awesomerrific!

  4. 4 Radoslav Stankov said at 7:41 pm on October 15th, 2009:

    Amazing :)

  5. 5 Damien said at 11:16 pm on October 16th, 2009:

    This is freaking cool, good job!

  6. 6 Dylan Oudyk said at 11:36 pm on October 16th, 2009:

    Whoah! Awesome effects, nice.

  7. 7 ta2edchimp said at 2:00 pm on October 19th, 2009:

    too bad the badbrowserclIquE doesn’t make the things scale . . . but kinda WOWish ;-)

  8. 8 mir.aculo.us with Thomas Fuchs » Blog Archive » Sneak preview on scripty2 UI controls said at 9:12 am on December 3rd, 2009:

    [...] to the big chunks for the effects engine which has been stable for quite a while now, and the support for multi-touch input (hat tip to Nokia), several additions are queued up, the most important being the “UI [...]

  9. 9 S2.enableMultitouchSupport = true; // Getting touchy feely with scripty - Wasif Hafeez said at 12:10 pm on January 25th, 2010:

    [...] Fuchs has been working with Nokia on their multi-touch API for Qt/WebKit: scripty2 supports multiple API vendors for Multitouch events, and even provides a desktop [...]


Leave a Reply