React VR is a framework for the creation of VR applications that run in your web browser. It pairs modern APIs like WebGL and WebVR with the declarative power of React, producing experiences that can be consumed through a variety of devices. Please note that this project is currently an alpha release, and APIs are subject to change.

There’s no code here yet — we’re only releasing a very early preview for now — but we want to gather community feedback as well soon as possible. We’re actively working to solidify APIs and prepare for external contributions prior to open-sourcing.

Prerequisites

You must have npm installed and the version must be 3.0 or above.

You can check your npm version by running:

npm -v
Copy the code

If your version number is less than 3.0, you can update by running:

npm update npm -g
Copy the code

Getting Started with React VR

Your first project

You must now install the react-vr-cli

npm install -g react-vr-cli
Copy the code

Once installed, use the cli to create a new VR project by running

react-vr init PROJECT_NAME
Copy the code

where PROJECT_NAME is the name of your new application. Once it’s been created and the dependencies are installed, change your working directory to PROJECT_NAME and start the application server by running

npm start
Copy the code

When the server has booted, you can access your application by navigating to http://localhost:8081/vr/ in your web browser. Your application’s code can be found in index.vr.js, and you can learn more about available framework features by diving into our documentation.

Opening Issues

If you encounter a bug with React VR we would like to hear about it. Search the existing issues and try to make sure your problem doesn’t already exist before opening a new issue. It’s helpful if you include the version of React VR, Browser, and OS you’re using. Please include a stack trace and reduced repro case when appropriate.

Will My Web Browser Support My VR Headset?

The WebVR spec is currently in development, and it will be some time before browsers like Chrome, Firefox, and Edge begin supporting it in stable releases. In the meantime, you can download the Carmel Developer Preview from Oculus on a Samsung device supporting Gear VR or an experimental build of Chrome or Firefox on your Windows PC.