A THREE.js-based starting point for VR experiences that work well in both Google Cardboard and other VR headsets. Also provides a fallback for experiencing the same content without requiring a VR device.
Projects that use the webvr-polyfill or webvr-boilerplate
- A-Frame - Building blocks for the virtual reality web
- Archilogic - Floor plans into 3D virtual tours
- Vizor - Create and share VR in your browser
Assorted real-world examples:
- Breakthrough - Cutting-edge science that will change our lives in the very near future (by National Geographic)
- Chinese New Year - Create a virtual lantern and share your wishes (by Google)
- Discovering Gale Crater - A virtual reality audio tour of the Gale Crater (by LA Times)
- Sechelt - A visualization of an inlet near the town of Sechelt, BC (by Mozilla)
- WebVR 1.0 Samples - Simple example applications to demonstrate various aspects of the WebVR API
As of WebVR 1.0, this project relies on the polyfill for even more. Core features like lens distortion and device detection have moved into the polyfill. This project now acts as a getting started example, and provides a reasonable user experience for getting in and out of Virtual Reality and Magic Window modes.
As a convenience, the WebVRManager emits certain
modechange events, which can
be subscribed using
The easiest way to start is to fork this repository or copy its contents into a new directory.
The boilerplate is also available via npm. Easy install:
npm install webvr-boilerplate