26/May 2015
1 min. read
Skelton is a skeleton for a Node-RED UI (with apologies to fans of the late great Red). Star Fork
26/May 2015
3 min. read
Experiments with TUIO and NodeJS using Express Star Fork Project Description This work demonstrates one possible use of osc.js in the browser, extending their udp-browser example found here to reflect TUIO messages. The project is a proof of concept client-server pair meant to demonstrate the viability of: Defining a TUIO implementation in the browser Improving reconnects by means of socket.io Supporting multiple distinct TUIO sources through a single server Supporting a variety of TUIO message types Server The server performs the following roles: provides client-side static resources (JavaScript and HTML) listens for raw TUIO bundles over UDP wraps bundles to add sender identity (many devices lack “source” packets) forwards wrapped UDP packets over socket.io Client The browser-based clients perform the bulk of the work with respect to TUIO: interprets raw binary into JavaScript-legible bundles maps OSC bundles into packets and then infers operations from packet types maintains cache of TUIO objects by sender and type retires defunct objects no longer appearing in ‘alive’ packets raises events for downstream applications Architecture Diagram UDP HTTP | | PHYSICAL DEVICES | SERVER | WEB CLIENTS | | | Raw TUIO packets | | forwarded over | | socket.io with a | +-------------+ | thin wrapper for | +---------------+ | | | device identity | | | | TUIO Device | ------+ | | + -- | osc.js client | | | | | +--------------+ | | | | +-------------+ | | | Express | | | +---------------+ +--> | --> | and | --> | ---+ +-------------+ | | | socket.io | | | +---------------+ | | | | +--------------+ | | | | | TUIO Device | ------+ | | + -- | osc.js client | | | | | | | | | +-------------+ | | | | +---------------+ | | | | ...