facebookarchive / react-360

Create amazing 360 and VR content using React
https://facebook.github.io/react-360
Other
8.73k stars 1.23k forks source link

react-native WebView inside react 360 #593

Open DevDaoud opened 6 years ago

DevDaoud commented 6 years ago

Hi everyone i was playing with react 360 recently and i was wondering if we could put a webview inside a view there. is it possible ? i did it like this but i've got no error and nothing is shown there

import { WebView } from 'react-native';
...

<View style={styles.panel}>
      <WebView
        source={{uri: 'https://github.com/facebook/react-native'}}
        style={styles.greetingBox}
      />
 </View>

And second is possible to configure react 360 in order to have a spliiten screen (one for each eye) where a user could put his phone in a headset and play with it ? Thanks in advance for your answer !

andrewimm commented 6 years ago

The first thing is not possible. There is no way to render a web page to a WebGL texture, so we cannot view it inside the 3D world.

The second thing is supported, but not by us. We provide VR functionality through native browser APIs called WebVR. If you're on a browser like Chrome Android that supports WebVR mode, you'll see a "View in VR" button that will allow you to put your phone into a headset. For unsupported phones like iPhone, there is a polyfill that gives you WebVR capabilities (https://github.com/immersive-web/webvr-polyfill) and people have said they got it working with React 360, but we don't support it directly.