MultiTouch
Using Jmol with Multi-Touch Panels
..very rough draft yet..
(introduction)
(versions)
(details)
An adaptation of SparshUI to work with the Jmol application (either stand-alone or embedded) and the Jmol applet.
Custom gestures: SinglePointGesture and TwoPointGesture
Ports: 5946 for clients and 5947 for a single driver
Implemented gestures include:
- single touch up/down/move (standard mouse down,drag,up -- model rotation) - single-touch click (standard mouse click) - single-touch long click (model translation) - two-finger slide (model translation) - two-finger stretch (zoom in) - two-finger pinch (zoom out)
On the HP TouchSmart one first starts the device connection -- JmolMultiTouchDriver.exe. Then you start the Jmol application using the -Msparshui flag or, for the embedded application, initialize it with the command option -multitouch-sparshui. For the applet, include the JavaScript command:
 JmolSetCallback("multiTouchSparshUI", "true")
prior to
 JmolApplet(...)
Or, with my latest version of Jmol.js, you can add parameters to the URL line, so with that you can adapt any page to work with multi-touch. For example, if you have JmolMultiTouchDriver.exe running on your HP TouchSmart, the following should work:
The driver will cycle while waiting for a connection, and the first Jmol application or applet that loads will start a gesture server that connects with it. If additional applets or applications load, then their gesture server will not connect, but they will find the other gesture server.
The problem of multiple overlapping windows was solved easily by only allowing SparshUI action within a window if that window has the focus. So one needs to first click on a model to activate SparshUI action within that window.
There might be a problem if one applet starts a server and then closes while another is using it. In addition, multiple applets on the same page are no problem, but applets on different pages within the same tabbed browser system probably cause problems. Just closing a page doesn't necessarily work. I've been using File|Close Tab in Firefox.
Terminology
swipe: put finger on surface, drag in a single direction, while continuing the drag motion lift finger from surface
flick: swipe but done must faster