Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JavaScript client to translate TUIO to browser touches
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
dist
examples
lib
test
.gitignore
LICENSE
README.md
grunt.js
index.html
package.json
server.js

README.md

Caress Client

Caress Client is a JavaScript library that converts TUIO events to native browser touches as proposed by the W3C Touch Events version 2.

Background

Thus far touch events have mainly only been supported on some mobile browsers. Firefox (as of version 4) is an exception in the desktop department and supports a mode where you can enable touch support (however it is a bit of a secret). Chrome's emulation of touch support, frankly just doesn't work.

For most of us this doesn't really cut it. I want multi-touch support on my desktop dammit! And across all browsers! This is what the aim of this library is. Using Caress Client + Caress Server + some hardware that spits out TUIO, you too can have multi-touch support in your browser!

Getting Started

Client

You need to include a few client side libraries in your html file. They are:

<script type="text/javascript" src="socket.io-0.9.10.min.js"></script>
<script type="text/javascript" src="caress-0.1.0.js"></script>

Then just add the code below and start binding regular touch events at will:

<script>
  $(function() {
      window.client = new Caress.Client({
          host: 'localhost',
          port: 5000
      });
      client.connect();
  });
</script>

Server

Grab the Caress Server and follow the instructions on the README.

Examples

  • Option A: See the examples folder
  • Option B:
    • Download or clone the repo
    • cd caress-client
    • npm install
    • npm start
    • Go to http://localhost:5000/
    • Start up your TUIO device with port 3333 and play with the examples!

Contributing

I am open to pull requests but make sure you include unit tests with your code.

Credits

Although I did not collaborate with these individuals their work inspired me to create this project:

MIT Licensed

Copyright 2012 Eric Kryski

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.