Skip to content

JavaScript client to translate TUIO to browser touches

License

Notifications You must be signed in to change notification settings

MadDeveloper/caress-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Requirements

You should use this library with caress-server.

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>
    window.client = new Caress.Client({
        host: 'localhost',
        port: 5000
    });
    client.connect();
</script>

Server

d 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 https://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.

About

JavaScript client to translate TUIO to browser touches

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%