gpt4 book ai didi

css - A-Frame WebVR - 设备方向中断

转载 作者:太空宇宙 更新时间:2023-11-04 07:31:55 25 4
gpt4 key购买 nike

enter image description here查看此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

最佳答案

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

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

快速测试似乎可以在我的手机上进行横屏和竖屏:

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

关于css - A-Frame WebVR - 设备方向中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49310779/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com