Questions tagged [react-360]

React VR lets you build VR apps using only JavaScript. It uses the same design as React, letting you compose a rich VR world and UI from declarative components.

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 , producing experiences that can be consumed through a variety of devices. Leveraging web technologies and the existing React ecosystem, React VR aims to simplify the construction of 360 experiences and democratize the creation of VR content. If you're familiar with React, you can now build in VR – learn once, write anywhere. React VR takes heavy inspiration from .

It was built and open sourced by Facebook in cooperation with Oculus and was first released on December 13th 2016.

While React VR is available as a standalone npm package, it's much easier to set up a new project by using the React VR CLI tool.

npm install -g react-vr-cli

Once installed, the CLI can be used to create a new project by running:

react-vr init PROJECT_NAME

Below is the starter template that your new project will contain:

import React from 'react';
import {AppRegistry, Pano, Text, View} from 'react-vr';

class WelcomeToVR extends React.Component {
  render() {
    // Displays "hello" text on top of a loaded 360 panorama image.
    // Text is 0.8 meters in size and is centered three meters in front of you.
    return (
      <View>
        <Pano source={asset('chess-world.jpg')}/>
        <Text
          style={{
            fontSize: 0.8,
            layoutOrigin: [0.5, 0.5],
            transform: [{translate: [0, 0, -3]}],
          }}>
          hello
        </Text>
      </View>
    );
  }
};

AppRegistry.registerComponent('WelcomeToVR', () => WelcomeToVR);

Official links

119 questions
11
votes
3 answers

How to use react React Router with React VR?

I'm trying to figure out how to plug React Router with React VR. First, should I use react-router dom / native? it's not clear since React VR builds on top of React Native, but runs in the browser. This is the code I'm having issues with. import…
Guy
  • 540
  • 5
  • 14
9
votes
1 answer

How To Configure React 360 for Google Cardboard

I'm doing some tests with React 360 and the only hardware I have at the moment is a Google Cardboard. I'm using VR Browser on iOS to view the content I've uploaded and it's working, but the stereoscopic image seems to be too far apart resulting in a…
Cmaxster
  • 1,035
  • 2
  • 11
  • 18
9
votes
1 answer

How could I create gaze buttons using React VR?

I'm writing an VR application using React VR and would make gaze buttons with a progress bar (or something) to show the user how long he must watch to that button. How could I do that? I'm thinking to use this pseudocode (may be there are some bug's…
H. Pauwelyn
  • 13,575
  • 26
  • 81
  • 144
9
votes
1 answer

shininess, emissive and specular are not a property of this material in React VR

I'm developing an application with React VR and I've created an 3D pokeball with blender. I've export this as Wavefront .obj file and use it in my React VR application. In the console I see this warnings: THREE.MeshBasicMaterial: shininess,…
H. Pauwelyn
  • 13,575
  • 26
  • 81
  • 144
6
votes
0 answers

With ReactVR, are you able to use a live camera feed for the VideoPano?

https://facebook.github.io/react-vr/docs/videopano.html I would like to make this support Augmented Reality. Is that possible with this library? There are other libraries out there such as ar.js, but those required WebRTC, which is a showstopper…
Shane
  • 4,185
  • 8
  • 47
  • 64
5
votes
1 answer

Why was React 360 formerly React VR deprecated/stopped?

I've been searching the internet for a couple of hours and couldn't find anything related. So far, I just found that the GitHub project is archived. Also, there are several posts about the rebranding made in 2018, but none mention that they will…
yamilelias
  • 305
  • 2
  • 16
4
votes
1 answer

What is the difference in layout positioning of react-vr and react-360?

I had started creating a project with react-vr and had laid out the object in a spherical manner around the user. Or for example, the 3 objects had positions (1, 1, 1), (2, 2, 2) and (3, 3, 3). style: { transform: [{ translate: [1,1,1] }] } On…
pnk6
  • 276
  • 3
  • 15
4
votes
1 answer

React-360 camera position in view

I want to set my camera view higher compared to a rendered view. But I don't know where I could set the intial camera position when rendering a view. My component is mounted like this: import {ReactInstance} from 'react-360-web'; function…
bear
  • 663
  • 1
  • 14
  • 33
4
votes
1 answer

Access React Object from within page JS?

I have a ReactVr object which I am rendering with the code below. After React is initialised I am periodically receiving server updates which I want to pass into React as props, how can I do this? Can props in the React object be set from my…
cal
  • 470
  • 1
  • 7
  • 27
4
votes
1 answer

React-VR iFrame Fullscreen

Creating a React-VR app that I need to iFrame into an existing app. My question is regarding the fullscreen button. How can i either hide this button and manage within my other app or send a message to the parent that the button was clicked?
4
votes
1 answer

How do I detect Gear VR inputs in React VR scene?

I am trying to create a web app using React VR and run it using Samsung Gear VR. I could not see the default white dot (VR pointer) while in VR mode in my scene. Consequently methods such as "onInput" and "onClick" are not working. The same methods…
Debojyoti Ghosh
  • 375
  • 1
  • 2
  • 17
4
votes
2 answers

How to convert full screen Mobile VR into split screen to use with google daydream or oculusrift?

Right now I see full screen version of VR on my mobile browser. I want to convert into 2 split screen so that one can use it with google daydream or any other VR headset.
3
votes
2 answers

how to Communicate between react-native webView and a React web-app?

i'm trying to create a communication between a webView in react-native and a web-app created with React-360 (and of course React). I'm using the react-native-webview and I follow this guide at this link to create a…
3
votes
1 answer

How to prevent Oculus Home taking over Cordova+React VR app when inserted to Gear VR

I have a React VR app which is wrapped with Cordova to have it available as an actual app on Android device. However, when ever I insert my device into the Gear VR Oculus Home launches and takes over from the app. There appears to be something in…
crappish
  • 2,688
  • 3
  • 28
  • 42
3
votes
1 answer

Event handling in ReactVR

Been experimenting with ReactVR and i have few doubts in handling events.As per the documentation in Cusors and Input,finding out the type of event is as easy as reading type of the event. Events coming into onInput can be further filtered by…
semuzaboi
  • 4,972
  • 5
  • 20
  • 35
1
2 3 4 5 6 7 8