Loading deck

React VR

Joseph Khan

Apr 24, 2019

Building 360 immersive apps with React

About Me

Joseph Khan

Senior Developer

Author of Adobe Edge Inspect Starter

Technical reviewer of Sencha Touch Cookbook

Let's get started..

What is React VR?

React VR aims to allow web developers to author virtual reality (VR) applications using the declarative approach of React and, in particular, React Native

React VR uses JSX syntax


VR is being used in many industries

Besides games, it is being used in the field of  medicines, education, movies etc

Provides immersive experience in a scene

360 tours and views because you can interact with a scene

React VR structure

React VR

React + React Native



WebVR & WebGL

Getting Started

npm install -g react-vr-cli


react-vr init GettingStarted

Create a Project:

cd GettingStarted

Get inside the project root:

npm run start

Launch/Run the project:

react-vr -v

Optional: Check Version

Project Structure

Let's see in the code

Basic Components

  • View
  • Text
  • Images
  • Pano
  • Model

Pano Images

  • Equirectangular
  • Cube Maps

A pano image allows you to see the image from every angle including above, below, behind and next to you, that's the reason they are also called 360 images or spherical panoramas.


An equirectangular pano consists of a single image with an aspect ratio of 2:1, meaning that the width must be twice the height.

These images are created with a special 360 camera.

source={ {uri:'../static_assets/sample_pano.jpg'} }/>

Cube Maps

Cubemaps are the other format of 360 panoramas. This format uses six images for the six faces of a cube that will fill the sphere around us. It's also known as a skybox.

<Pano source={
          uri: [
} />

React VR coordinate system

React VR uses the same right-handed coordinate system that OpenGL uses, with positive X pointing to the right, positive Y pointing up, and positive Z pointing forwards towards the user

FlexBox Layout

column layout









row layout

* column by default

3D Model

React VR has a Model component that supports the Wavefront .obj file format to represent 3D models.

A .obj file is a plain text file that contains coordinates of geometric vertices, texture coordinates, vertex normals and polygonal face elements, among other things.

Typically, a .obj file references an external .mtl file where the materials (or textures) that describe the visual aspect of the polygons are stored.

There's also a lot of sites where you can download 3D models either for free or at a cost. The following are three of the best ones:

Hands On

Lets build a VR app..

Final Demo

Enhancing the Tajawal Hotels App

Build for production

npm run bundle


Thank You!

Will be Happy to Answer!

Code repo: