在 IOS 下,解决方案不再对运动使用react。
我的解决方案已经奏效,现在不再有效。
此外,带有 Glitsch 源代码的“hello world”示例(见下文)不再起作用,但如果您从 a-frame 起始页 ( https://aframe.io/examples/showcase/helloworld/ ) 调用该示例,它就起作用了。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello, WebVR!Test VR</title>
<meta name="description" content="Test VR">
<script src="https://aframe.io/aframe/dist/aframe-master.min.js" ></script>
</head>
<body>
<a-scene background="color: yellow">
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9" shadow></a-box>
<a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E" shadow></a-sphere>
<a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D" shadow></a-cylinder>
<a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4" shadow></a-plane>
</a-scene>
</body>
</html>
有什么不同?我必须做什么才能使我的解决方案再次在 IOS 下工作?
最佳答案
不幸的是,Chrome (m74+) 和 Safari (iOS 12.2+) 现在默认禁用传感器访问。用户必须手动启用设置:
chrome://flags/#enable-generic-sensor
在 Chrome Settings -> Safari -> Motion & Orientation Access
在 Safari iOS 内容也必须通过 https 提供。
更多信息:https://github.com/aframevr/aframe/issues/3976
关于ios - ios 上没有移动 - aframe.io 示例运行,相同(?)代码不是?有什么不同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56322681/