如何在 A-FRAME 中强制禁用陀螺仪

How to force disable Gyroscope in A-FRAME

我想知道我们可以用最少的代码禁用移动设备中的陀螺仪吗?我试图禁用其中的一些 属性 https://aframe.io/docs/1.0.0/components/look-controls.html 但 none 用于禁用陀螺仪。我真的需要创建自己的外观 - controls.js 吗?如果那是真的,我需要更改什么才能禁用陀螺仪。

有一个新的 magicWindowTrackingEnabled property in the look-controls component you can use. It's now available in master builds 和即将推出的 A-Frame 1.1.0 版本。

使用主构建的工作示例:

https://glitch.com/edit/#!/cliff-light-glasses?path=index.html%3A18%3A55