我想让React360 拆分场景在 ios 设备上工作,我尝试使用webvr-polyfill,但我不知道如何使用它
对不起我的语言,我不是母语人士
我想让React360 拆分场景在 ios 设备上工作,我尝试使用webvr-polyfill,但我不知道如何使用它
对不起我的语言,我不是母语人士
您究竟是如何尝试使用 webvr-polyfill 的?您将需要它,因为 iOS 本身并不支持它。
只需在 index.html 中包含webvr-polyfill。在运行任何类型的 react-360 代码之前添加 webvr-polyfill。例子:
<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>