A-Frame WebVR - 设备方向中断

时间:2018-03-15 23:15:34

标签: css aframe device-orientation

enter image description here在纵向设备上查看此Codepen Demo时,它会按预期工作。当设备方向锁定并转向横向时,它会填满屏幕的一半。

CODE

<html>

  <head>
    <script src="https://aframe.io/releases/0.2.0/aframe.min.js"></script>
  </head>

<body>

  <a-scene>
    <a-sky src="https://ucarecdn.com/e1c757bc-73ee-4efe-b068-4f778ce212a3/" rotation="0 -20 0"></a-sky>
  </a-scene>

</body>

</html>

我尝试过这个元标记但没有成功:

<meta http-equiv="ScreenOrientation" content="autoRotate:disabled">

这里是“我的笔”

Codepen Code

1 个答案:

答案 0 :(得分:1)

您是否尝试过使用最新版本的a-frame?

<script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script>

快速测试似乎在我的手机上以横向和纵向工作:

https://a-frame-device-orientation-test.glitch.me/