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
0
votes
0 answers

How Do I Track An Event With No CSS Selector

I'm currently using Adobe DTM to track events on our sites. Right now I'm dealing with a site that's coded mostly with ReactVR and then slapped onto a regular HTML page through ECMA6. Now I'm trying to track an event using the following code but…
Leo_Taco
  • 45
  • 10
0
votes
1 answer

use a gif as pano source in react-vr

I have an animated gif that I would like to use as the source for a 'pano' element or similar. Is this possible? I guess an alternative may be to create a simple looping movie but as I have the gif already I thought I'd ask.
Thomas Powell
  • 115
  • 1
  • 12
0
votes
1 answer

ReactVR how properly set pointer (raycaster)

I used code (installing it wasn't working for me) from simple-raycaster to display pointer on my VR screen, it works but with some problem - 'behind' me there is square space where this pointer disappears and didn't work. Any idea how can I fix…
Alan Wołejko
  • 442
  • 2
  • 5
  • 20
0
votes
1 answer

Creating 2D scene in ReactVR

Can I create a 2D scene in ReactVR? I mean displaying elements on a screen like in normal React, for example, classical web menu which will be always displayed in the same place on screen. Or something like HUD in 3D games.
Alan Wołejko
  • 442
  • 2
  • 5
  • 20
0
votes
1 answer

RawText "; }" must be wrapped in an explicit

I'm new to React and getting this error : RawText "; }" must be wrapped in an explicit When I try to map my JSON array. This is happening everytime I try to map something. I've read that it has something to do with space characters but I cant…
Steven
  • 1
0
votes
1 answer

No enter vr mode button in react-vr cordova app

I'm currently trying to build a small vr app using the react-vr framework. On my desktop PC in Chrome, I get the "Enter VR Mode" Button to toggle from 360 degree view to real VR mode after enabling the WebVR option via chrome://flags. Now I want…
exedriver
  • 13
  • 6
0
votes
1 answer

Image component uri Cross origin

I want to show a photo from an external url: But I get the following error: XMLHttpRequest cannot load ...
Sepehr
  • 314
  • 5
  • 21
0
votes
1 answer

reactVR model texture how to load local resource?

I am new to reactVR, and I want to load local resource on my Model texture, here is the code: and I get a empty…
Perry Chen
  • 50
  • 4
0
votes
1 answer

react-vr items with fixed position

I'm developing a react vr application. I want to show buttons at the bottom of the page with fixed position. that means if the camera rotates, the position of this button does not change.
Sepehr
  • 314
  • 5
  • 21
0
votes
2 answers

How to display cursor (Reticle) in VR - mode using React-vr?

https://facebook.github.io/react-vr/docs/input.html Based on this documentation I have done sample. In browser I can see the mouse pointer which is default. In Android chrome I don't see any cursor or pointer. But touch works and colour of the text…
Ganesh Kanna
  • 2,269
  • 1
  • 19
  • 29
0
votes
1 answer

Is it possible to link to external images / videos with React-VR?

According to the documentation, there doesn't seem to be any examples of using external images or external videos (i.e. from YouTube). I was wondering if anyone knew if it was possible (like this)
-1
votes
1 answer

Can i use React360 to create a 360 view tour, on a project that i'm trying to develop using Angular front-end?

so I'm trying to create a project/website using angular for the front-end and node.js for the back-end. i need to create 360° panorama for multiple images just like what you see on google street map, where you are able to look at some places of the…
-1
votes
1 answer

how can I exactly create 360 video with react 360?

Today, I started a project that requires 3D objects, 360 Images, and 360 videos on the frontend. So I decided to use the react 360 library since I am fairly knowledgable at react and javascript. Fortunately, I managed to easily make 360 images, but…
Shawn
  • 367
  • 4
  • 13
-1
votes
1 answer

React360-Redux:Communication between 2 roots components via redux

I have 2 root components in react360.I have the main panel with information and my products and i have my 3d model.I want to communicate one another.Μore specifically I just want to click on the product then the color from my 3d model changes.At…
xristlxcv
  • 41
  • 1
  • 5
1 2 3 4 5 6 7
8