Skip to content
This repository has been archived by the owner on Mar 2, 2019. It is now read-only.
/ oculus-bridge Public archive

A utility and javascript library to link the Oculus Rift with the web

License

Notifications You must be signed in to change notification settings

Instrument/oculus-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oculus-bridge

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.

Requirements

  • 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);
	}
});

bridge.connect();

Documentation

Credits

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

About

A utility and javascript library to link the Oculus Rift with the web

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages