Multitouch monitor/overlay support in your browser! In ClojureScript!
Clojure
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/cljs_multitouch
test/cljs_multitouch/test
.gitignore
README.md
project.clj

README.md

cljs-multitouch

Multitouch monitor/overlay support in your browser! In ClojureScript!

How it Works

cljs-multitouch is an interface to the npTuioClient browser plugin. The plugin supports Firefox, Chrome and Safari (any browser that supports NPAPI plugins).

The plugin expects a TUIO server at the standard port (localhost:3333). Almost all touchscreens have a way of exposing their touch data over this protocol. We normally use screens from PQ Labs which have a TUIO server built into the driver software.

On page load the plugin connects to the TUIO server and routes incoming data to cljs-multitouch, which converts it into standard browser touch events (touchstart, touchmove, touchend).

Usage

Step 1.) Install the plugin. Firefox, Chrome and Safari are supported.

Step 2.) Add a tag to your HTML to load the plugin:

<object id="tuio" type="application/x-tuio">Plugin FAILED to load</object>

Step 3.) Add cljs-multitouch to your project.clj and then run lein deps.

[cljs-multitouch "1.0"]

Step 4.) In your clojurescript app:

(ns my-awesome-touchscreen-app
  (:require [cljs-multitouch.core :as multitouch]))

(multitouch/init)

That's it! Your app will now receive standard touchdown, touchmove and touchend events.

License

Copyright (C) 2012 VaryWell

Distributed under the Eclipse Public License, the same as Clojure.