0

I want to make React360 split scene work on an ios device, I have tried to use webvr-polyfill , but I dont know how to use it

sorry for my language, I am not a native speaker

Chandrika Joshi
  • 1,211
  • 11
  • 24

1 Answers1

0

How exactly did you try to use the webvr-polyfill? You will need this since iOS does not natively support it.

Simply include the webvr-polyfill in your index.html. Add the webvr-polyfill bevor you run any kind of react-360 code. Example:

<script src='PATH_TO_YOU_POLYFILL_FILE/webvr-polyfill.min.js'></script>
<script>var polyfill = new WebVRPolyfill();</script>

<script src="./client.bundle?platform=vr"></script>
<script>
    // Initialize the React 360 application
    WebVR.init(
        'index.bundle?platform=vr&dev=true',
        document.getElementById('container'),
        {
            assetRoot: 'static_assets/',
        }
    );
</script>
PinkyTV
  • 118
  • 2
  • 14
  • I have the same problem, but I used the npm version of the library ```> npm install --save webvr-polyfill``` ```import WebVRPolyfill from 'webvr-polyfill'; const polyfill = new WebVRPolyfill();``` But I have this error Uncaught ReferenceError: mimeType is not defined Here the example: https://danilodelfio.github.io/MeVR/ – Danilo Del Fio Feb 05 '20 at 04:56
  • I am having same problem included webvr-polyfill.min.js but it is not working for me. Do we have any other way deal with? – Vishal Tanna Dec 12 '22 at 14:15