当作为HTML模板导入时,Frame Web VR会阻止从引导程序滚动

dnh*_*yde 5 html javascript twitter-bootstrap aurelia aframe

在Aurelia框架应用程序中导入aframe a-scene作为模板时,我目前面临一个问题.

我试图在相关的stackoverflow问题上找到帮助,但没有一个将点连接在一起:因为AFrame基于Three.js,这是我能找到的最相似的问题,但它没有被回答(https://github.com /mrdoob/three.js/issues/3091).

我在我的home.html文件中集成了AFrame场景,如下所示:

<template>
    <a-scene>
        <a-sphere position="0 1.25 -1" radius="1.25" color="#EF2D5E"></a-sphere>

        <a-sky color="#000000"></a-sky>
        <a-entity position="0 0 3.8">
            <a-camera></a-camera>
        </a-entity>
    </a-scene>
</template>
Run Code Online (Sandbox Code Playgroud)

从我的home.js导入aframe,否则场景不呈现: import 'aframe';

现在似乎这个导入覆盖了一些引导滚动功能,但我无法理解为什么.

注意:Google Material design lite和aurelia材质插件(https://github.com/genadis/aurelia-mdl)也发生了一些意想不到的行为,在这种情况下,AFrame场景被缩放,但页面滚动仍然有效.

这里是完整代码的github项目:https://github.com/dnhyde/aframe-aurelia.git

ngo*_*vin 5

使用该embedded组件删除 A-Frame 全屏和position: fixed样式。https://aframe.io/docs/master/components/embedded.html

<style>a-scene { width: 600px; height: 300px; }></style>

<body>
  <!-- ... -->
    <a-scene embedded></a-scene>
  <!-- ... -->
</body>
Run Code Online (Sandbox Code Playgroud)