vogdb / webvr-polyfill

Use WebVR today, without requiring a special browser build.

Home Page:http://smus.com/responsive-vr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebVR Polyfill

This project provides a JavaScript implementation of the WebVR spec.

The goal of this project is two fold:

  1. Use WebVR today, without requiring a special browser build.
  2. View (mono) content without a virtual reality headset.

Implementation

CardboardHMDVRDevice provides default parameters for Cardboard's interpupillary distance and headset.

GyroPositionSensorVRDevice uses the DeviceMotionEvents (which map roughly to the gyroscope) to polyfill head-tracking on mobile devices. This is used both in Cardboard, and for Spotlight Stories-style experiences. This input device also implements head tracking with prediction, which greatly improves head tracking quality.

MouseKeyboardPositionSensorVRDevice uses mouse events to allow you to do the equivalent of mouselook. It also uses keyboard arrows and WASD keys to look around the scene with the keyboard.

Experimental WebcamPositionSensorVRDevice uses your laptop's webcam in order to introduce translational degrees of freedom.

About

Use WebVR today, without requiring a special browser build.

http://smus.com/responsive-vr/

License:Apache License 2.0


Languages

Language:JavaScript 99.8%Language:Makefile 0.2%