MCPcopy Index your code
hub / github.com/ekryski/caress-client

github.com/ekryski/caress-client @v0.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.1 ↗ · + Follow
293 symbols 631 edges 17 files 100 documented · 34% updated 13y ago★ 334 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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="https://github.com/ekryski/caress-client/raw/v0.1.1/socket.io-0.9.10.min.js"></script>
<script type="text/javascript" src="https://github.com/ekryski/caress-client/raw/v0.1.1/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:

  • Boris Smus (https://github.com/borismus/MagicTouch)
  • Fajran Iman Rusadi (https://github.com/fajran/npTuioClient)
  • Andy Smith (https://github.com/termie/node-osc)
  • fe9lix (https://github.com/fe9lix/Tuio.js)
  • Esteban Ginez (https://github.com/eginez/MultitouchWebSockets)

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.

Core symbols most depended-on inside this repo

Shape

Function 293

Languages

TypeScript100%

Modules by API surface

test/resources/mocha.js65 symbols
examples/common/js/jquery-1.8.1.min.js59 symbols
examples/touch-toy/js/touch-toy.js40 symbols
test/resources/chai.js39 symbols
examples/common/js/socket.io-0.9.10.min.js34 symbols
lib/lodash.custom.js28 symbols
examples/common/js/hammer.js17 symbols
examples/common/js/underscore-1.3.3.min.js7 symbols
test/resources/mocha-helper.js2 symbols
test/test-caress.js1 symbols
server.js1 symbols

For agents

$ claude mcp add caress-client \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page