【问题标题】:A-Frame WebVR - Device Orientation breaksA-Frame WebVR - 设备方向中断
【发布时间】:2018-03-15 23:15:34
【问题描述】:

在设备上纵向查看此Codepen Demo 时,它按预期工作。关闭设备方向锁定并切换到横向时,它会填满一半的屏幕。

代码

<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

【问题讨论】:

    标签: css aframe device-orientation


    【解决方案1】:

    您是否偶然尝试过最新版本的 a-frame?

    &lt;script src="https://aframe.io/releases/0.8.0/aframe.min.js"&gt;&lt;/script&gt;

    我的手机横向和纵向似乎都可以进行快速测试:

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

    【讨论】:

      猜你喜欢
      • 2018-11-11
      • 1970-01-01
      • 1970-01-01
      • 2018-03-07
      • 2018-08-12
      • 1970-01-01
      • 1970-01-01
      • 2016-07-17
      • 2017-10-21
      相关资源
      最近更新 更多