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
2
votes
1 answer

React VR - is it possible to implement real-time objects via socket.io?

I'm working on a project to showcase active RFID tracking of multiple devices in real-time. I've been looking at React VR as a possible way of showing users in remote locations the real-time positioning of the devices within a static, predefined…
ugotchi
  • 1,003
  • 1
  • 12
  • 32
2
votes
1 answer

Can I preload and cache images using React VR?

I'm making a virtual tour in a house using React VR and would preload next panorama image when the user transport from room. After preload I would use the image from the local disk cache. I've tried this code below
H. Pauwelyn
  • 13,575
  • 26
  • 81
  • 144
2
votes
0 answers

How to link to external and internal pages in React-VR?

I would like the ability for the user to click a button using the React-VR cursor and be able to go to external and internal pages like this onEnter={() => Linking.openURL("https://www.google.com").catch(err => console.error('An error occurred',…
Yoni Binstock
  • 241
  • 4
  • 19
2
votes
0 answers

Building fontue tool to generate font set for ReactVR - path_utils.h missing

From the React VR Docs: https://facebook.github.io/react-vr/docs/fonts.html It is also possible to generate your own font set textures using the fontue tool in the Oculus Mobile SDK. The tool has a dependency on FreeType, and can be found in…
2
votes
2 answers

Is it possible to link to a 360 YouTube video with ReactVR?

In the documentation for ReactVR for VideoPano it demonstrates pointing to a video in the code base. Is it possible to link to an external link (aka Youtube)? So instead of video.mp4, it would link to…
Yoni Binstock
  • 241
  • 4
  • 19
2
votes
1 answer

React VR "jest-haste-map: @providesModule naming collision"

I am using React VR Command Line Interface Version 0.3.0. I downloaded the react-vr through a package manager. When I run "npm start" command in my DemoApp folder, I got this error: Loading dependency graph... React packager…
1
vote
0 answers

Is it possible to make virtual tours using images in react native expo

I am trying to build a feature in my app that takes couple of images of a place and transfer them into a virtual tour but I couldn't figure out how to do it using react native expo, I saw some examples they were using react-360 but I'm not sure if I…
DEV
  • 65
  • 9
1
vote
1 answer

React360 npm install stuck at Loading dependency graph

I have to do some work with VR for a uni project and I installed the React360 cli for this. I then ran react-360 init Hello360, cd Hello360. The files are all installed and fine The issue is when I try to start the local server with npm start. Once…
Jegs
  • 579
  • 1
  • 6
  • 14
1
vote
0 answers

window.DeviceOrientationEvent is undefined in Safari on iOS (React web-app)

I have a React app running on a server that uses some React 360 components. One of the components has a button with an onClick event which points to a method askPermission(). I'm trying to have the method ask permission to use the…
Yuri van Geffen
  • 853
  • 1
  • 7
  • 21
1
vote
0 answers

How to drag & drop objects in react360?

After placing a react component in react 360 surface, how to add "drag & drop" on this component in react360? Is this even possible with react 360?
kwny
  • 96
  • 5
1
vote
1 answer

React360 Entity example

I am trying to use a 3d object in a react360 project. I followed the steps in setup docs. Created a project with react-360 init Hello360 command and started the server with npm start. Also, downloaded this obj model, and put it into static_assets…
Alperen
  • 3,772
  • 3
  • 27
  • 49
1
vote
1 answer

onInput for React 360/React Vr does not function

I am creating a a bare bones react 360 app in order to get familiar with input handling from a variety of sources. Here is the web page for the documentation Input Handling React 360. After reading the page, I can't get the input to work at all and…
Dan Rubio
  • 4,709
  • 10
  • 49
  • 106
1
vote
2 answers

How to create a 360 panorama image in Gatsby/React?

I am trying to understand how to create a basic 360 Panorama image in react/gatsbyjs where the user is able to infinite scroll the image horizontally. Here is the result I'm trying to achieve: sample site I could easily achieve this result with the…
York Wang
  • 1,909
  • 5
  • 15
  • 27
1
vote
1 answer

React 360 HTML doesn't show anything in React Native WebView

I'm trying to combine React 360 into React Native by showing the HTML file in a WebView. The React 360's HTML itself doesn't seems to have any issue since I can open it in a web browser, but when I tried to open it in React Native WebView, it only…
rabbit87
  • 3,165
  • 2
  • 20
  • 29
1
vote
0 answers

Open a website form a react-vr app contained in a iframe in the parent of the iframe

I have created a react-vr application and I want to integrate the vr app in a react website. As recommended I used a iframe to integrate the react-vr app in my website. As the following code depicts: export class LabyrinthPage extends…
luki
  • 31
  • 4