Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 6f0a0a0 Mar 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public Update readme and add note on environment variables Mar 14, 2019
.gitignore
.python-version
app.json
index.html
package-lock.json
package.json
readme.md
screenshot.jpeg
server.js

readme.md

Background

A simple Node.js Express application that allows users to send their browser's deviceOrientation data using WebSockets. Other Websocket connected clients (e.g. an OpenFrameWorks application or Processing sketch) can then receive a collection of those orientation values for input use.

Try it out

Deploy

The original version of this repository that forwarded the WebSocket data as OSC messages can be found on the osc-server branch.

screenshot

Getting Started

  1. Clone the repo

  2. Install dependencies

npm install
  1. Check (and if needed change) the UDP_PORT and WEB_SOCKET_PORT values in app.js

  2. Start the server

npm start
  1. Visit the site on localhost:3000 in your web browser (note*: the Firefox desktop browser has deprecated the deviceorientation sensor)

  2. Start moving!

Variables

The interval at which the store of user device data is emitted back can be changed through an environment variable when starting the application:

USERS_INTERVAL=150 npm start

The interval at which a client (e.g. phone web browser) sends the orientation data to the server can be changed by changing the DEVICE_INTERVAL variable in public/browser.js.

You can’t perform that action at this time.