A utility and javascript library to link the Oculus Rift with the web
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



A simple desktop app and javaScript library to link the Oculus Rift with the web.

Important Bits:

The goal of this project is to provide a flexible, simple way to access the tracking data and display configuration for the Oculus Rift for use with webGL or any other browser-based content. This is not the first websocket based utility for the Oculus Rift, but the cross platform code base and modularity of the JavaScript has been built to support changes in the hardware and ease of integration on the JavaScript side.


  • An Oculus Rift
  • A browser that supports websockets
  • The OculusBrige host application : Windows | Mac OSX

Basic Usage

The order in which these things occur isn't important. The app and JavaScript are built to handle loosing connectivity, having the hardware connected and disconnected randomly at runtime, etc.

Browser/Platform Support

JavaScript library

The JavaScript library has been tested with the following browsers:

  • Chrome 28
  • Safari 6
  • Firefox 22

Example content is currently using THREE.js r59

OculusBridge Application

The bridge application has been compiled for MacOS Mountain Lion and Windows 7.

Using the JavaScript Library

To add Oculus Rift support to your web project, download and include OculusBridge.min.js in your HTML. The bridge is purely a way to access data from the rift hardware and does not make any assumptions about the renderer. It is especially easy to use the bridge with THREE.js but there is no specific dependancy on THREE.js at this time. Check out the documentation and example code for more detailed explaination.

// rotate a THREE.js object based on the orientation of the Oculus Rift

var bridge = new OculusBridge({
	"onOrientationUpdate" : function(quatValues) {
		giantSquid.quaternion.set(quatValues.x, quatValues.y, quatValues.z, quatValues.w);




Thanks to the following libraries and people who make this project possible. Credit and copyright belong to the respective parties: