【问题标题】:Aframe a-cursor has gone when entering VR mode on mobile在移动设备上进入 VR 模式时,Aframe a-cursor 消失了
【发布时间】:2020-01-17 03:57:16
【问题描述】:

Aframe 版本:1.0.3

平台:安卓

浏览器:chrome 和 firefox

进入VR模式后,手机上的光标(a-cursor标签)消失了。

有没有办法在 VR 模式下启用/添加光标?或

为什么当我进入 VR 模式时光标消失了。

    <a-assets style="display:none;visibility: hidden;opacity: 0;" ></a-assets>

    <a-sky id="sky" radius="90" src="" rotation="-3.7000000000000006 192.27000000000004 -3.58" material="" geometry=""
    animation__fadeIn="property: material.color; type:color; from:#ffffff; to:#000000; dur: 500; dir: normal; easing: easeInSine; startEvents:fadeIn"
    animation__fadeOut="property: material.color; type:color; from:#000000; to:#ffffff; dur: 500; dir: normal; easing: easeInSine; startEvents:fadeOut"></a-sky>


    <a-camera wasd-controls-enabled="false" mouse-cursor="" active="true" look-controls="" wasd-controls="" data-aframe-inspector-original-camera="" device-orientation-permission-ui="">

        <a-cursor id="cursorBlack" fuse="true" fuse-timeout="2000" raycaster="objects: .clickable" geometry="radiusOuter: 0.04; radiusInner: 0.00001" material="color: black" position="0 0 -2" opacity="0.5" visible="" cursor=""></a-cursor>

        <a-cursor id="mouseCursor"  raycaster="objects: .clickable; useWorldCoordinates: true" cursor="rayOrigin: mouse"></a-cursor>

        <a-entity id="cursorBlue" position="0 0 -2" geometry="primitive: ring; radiusInner: 0.09; radiusOuter: 0.1; thetaStart: 90" material="color: #439DC2" visible="false"
        animation__loadCursor="property: geometry.thetaLength;  from:360; to:1; dur: 2000; dir: normal; easing: easeInSine; startEvents:loadCursor">
        </a-entity>
    </a-camera>

    <a-entity style="display:none; visibility: hidden;opacity: 0;" id = "sceneContainer" visible = "true"></a-entity>

</a-scene>

【问题讨论】:

    标签: aframe virtual-reality


    【解决方案1】:

    这是一个已修复的已知错误,将在即将发布的 1.0.4 版本中发布。您可以同时使用主构建:

    https://cdn.jsdelivr.net/gh/aframevr/aframe@2c5c131dccaab9d449fcd0383e98d027a5bc07f6/dist/aframe-master.min.js

    【讨论】:

    • 很高兴听到。将答案标记为正确将不胜感激。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-23
    • 1970-01-01
    • 1970-01-01
    • 2017-12-26
    • 2018-11-11
    • 2018-08-28
    相关资源
    最近更新 更多