Skip to content

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

Notifications You must be signed in to change notification settings

jhickner/cljs-multitouch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages