Git Product home page Git Product logo

tlay-touch's Introduction

TLay Touch 1.0.0

Copyright (c) 2013 Daniel Bugl, TouchLay. All rights reserved. See the LICENSE file for more information.

TLay Touch is a UDP protocol that allows you to add multitouch support to programs. The protocol itself is pretty much just a specification, this repository contains the main implementation of TLay Touch, which is C++ and mainly used in our software.

Specification

This is done in a JSON example and explained with C-like comments because the protocol is using JSON and an example is always easier to understand. :

{
  "s": "example", // source - this can be anything, but there is a structure below
  "a": 1,         // action - this is an integer, see below for more information
  "id": 80,       // id of the event (session id)
  "xp": 0.501,    // x position
  "yp": 0.123,    // y position
  "xv": 0.192,    // x velocity
  "yv": 0.831,    // y velocity
  "an": 0.921,    // angle
  "ms": 0.213,    // motion speed
  "ma": 0.864     // motion acceleration
}

The "s" variable (source) can be set to any string, however there is a standardised structure you should use. :

"s": "client@ip%interfaceX/sourcetype/inputtype"

And an example: :

"s": "TUIOdroid@fe80::646:dead:beef:cafe%wlan0/tuio/2Dcur"

The "a" variable (action) can be set to the following integers:

  • 0 - undefined action
  • 1 - add cursor/object
  • 2 - update cursor/object
  • 3 - remove cursor/object

License

The TLay Touch protocol specification and the implementation are both licensed under the BSD license. For further information please consult the LICENSE file.

tlay-touch's People

Contributors

omnidan avatar

Stargazers

Georg Schelkshorn avatar  avatar

Watchers

 avatar Georg Schelkshorn avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.