0

I have a prototype react app which was generated using create-react-app. The app will be rendering a blend of 3d panoramic scenes with content overlays/links/etc as well as some 2d spaces.

I was initially thinking of Panellum to handle the 3d scenes and then using Pixi for any complexity in the 2d space but am now reconsidering the use of React VR for the 3d walkthroughs.

So, to the chase: can I add React VR to an existing react app? I tried just doing an npm i on it but get module not found errors if I try to do anything with it. My need is less about supporting VR and more around a set of connected 3d walkthroughs but I love the component model that has been built in React VR and can see some real positives in taking that approach.

Andrew Rutter
  • 1,257
  • 2
  • 18
  • 34
  • I dont mind rebuilding the app under React-VR but that opens up a lot of related questions when looking from a pure web perspective - routing, server side rendering, redux etc – Andrew Rutter Apr 27 '18 at 00:59

3 Answers3

0

I only know about React Native and React VR, but I suppose it is the same for React and React VR. For React Native it is not possible because the runtimes are not compatible...

https://github.com/facebook/react-vr/issues/225

But you can reuse parts of the code like from React to React Native:

https://medium.com/@gwen_faraday/converting-a-react-app-to-react-native-d7df17968fc6

Jan F.
  • 1,681
  • 2
  • 15
  • 27
0

The official statement on this type of integration is to use an iFrame:

https://facebook.github.io/react-vr/docs/publishing.html

If you are looking to pull your other functionality into React VR def take a look at native modules:

https://facebook.github.io/react-vr/docs/native-modules.html

React VR runs in a web worker context so external interaction with it can be a bit tricky but native modules can usually provide the control you are looking for.

cidicles
  • 351
  • 2
  • 8
0

If you're still looking, check out our product Viro React: https://viromedia.com/viroreact

Which is a React Native library that supports Cardboard, Daydream and GearVR on Android and Cardboard for iOS.

We also support both ARKit and ARCore if you also want to build AR apps too!

ACVM
  • 1,497
  • 8
  • 14