是否可以在我的Focus Plus耳机的本地主机上运行A-Frame应用程序?

问题描述 投票:0回答:1

我正在使用我的HTC Vive Focus Plus的文件标题中的src中的src中包含脚本的文件运行a index.html文件,该脚本文件包含aframe-master.min.js库。

我已经在SD卡上保存了一个简单的.html文件,我可以通过单击它在耳机内部查看它,但是无法在浏览器中打开它。

有人知道我如何在耳机内运行本地主机,以便我可以打开aframe应用程序吗?

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Sky High</title>
    <meta name="description" content="Virtual Reality Experience">
    <script src="aframe-master.min.js"></script>
  </head>
  <body>
    <a-scene >

        <a-assets>
            <img id="sky" src="textures/sky2-blur.jpg">
            <audio id="track" src="sounds/track.mp3" preload="auto"></audio>
        </a-assets>

        <a-sky rotation="0 270 0" src="#sky"></a-sky>
        <a-sound loop="true" src="#track" autoplay="true" positional="false"></a-sound>
        <a-entity vive-focus-controls></a-entity>
        <a-entity laser-controls line="color: red; opacity: 0.75"></a-entity>
        <a-entity light="type: ambient; color: #e6f3ff; intensity: 0.6"></a-entity>
        <a-entity light="type: directional; color: #fff0b3; intensity: .5" position="0 .3 -1"></a-entity>

        <a-entity
        position="-9 1.6 -40"
        text-geometry="value: Sky High; font: #optimerBoldFont; size: 3; align: center"
        material="color: white; transparent: true; opacity: 0.6"
        ></a-entity>


        <a-text mixin="start" position="0 0 0" size: .5 rotation="-90 0 0" wrap-count="20"></a-text>

        <a-text mixin="finish" position="0 0 -4" size: .5 rotation="-90 0 0" wrap-count="20"></a-text>

        <!--Objects-->

        <a-cylinder position="-.9 0 .4" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position="-.7 0 .4" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position="-.5 0 .4" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position="-.3 0 .4" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position="-.1 0 .4" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position=".1 0 .4" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position=".3 0 .4" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position=".5 0 .4" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position=".7 0 .4" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position=".9 0 .4" color="#e6e6e6" height="2" radius=".02"></a-cylinder>

        <a-cylinder position=".9 0 .2" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position=".9 0 0" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position=".9 0 -.2" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position=".9 0 -.4" color="#e6e6e6" height="2" radius=".02"></a-cylinder>

        <a-cylinder position="-.9 0 .2" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position="-.9 0 0" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position="-.9 0 -.2" color="#e6e6e6" height="2" radius=".02"></a-cylinder>
        <a-cylinder position="-.9 0 -.4" color="#e6e6e6" height="2" radius=".02"></a-cylinder>

        <a-box position="0 1 .42" color="#e6e6e6" width="2" height=".03" depth=".16"></a-box>
        <a-box position="-.92 1 0" color="#e6e6e6" width=".16" height=".03" depth="1"></a-box>
        <a-box position=".92 1 0" color="#e6e6e6" width=".16" height=".03" depth="1"></a-box>



        <a-box position="0 -5000 0" color="#e6e6e6" width="2" height="10000" depth="1"></a-box>

        <a-cylinder
            color="fff" height=".1" radius=".25" position="0 -.05 -1"
            animation="property: position; to: -1 -.1 -1; dir: alternate; dur: 4000; easing: easeInOutElastic; loop: true;"
        ></a-cylinder>
        <a-cylinder
            color="fff" height=".1" radius=".25" position="0 -.05 -1"
            animation="property: position; to: 1 -.1 -1; dir: alternate; dur: 4000; easing: easeInOutElastic; loop: true;"
        ></a-cylinder>

        <a-cylinder
            color="fff" height=".1" radius=".5" position="0 -.05 -2"
        ></a-cylinder>

        <a-cylinder
            color="fff" height=".1" radius=".25" position="-1 -.05 -3"
            animation="property: position; to: 0 -.1 -3; dir: alternate; dur: 4000; easing: easeInOutElastic; loop: true;"
        ></a-cylinder>
        <a-cylinder
            color="fff" height=".1" radius=".25" position="1 -.05 -3"
            animation="property: position; to: 0 -.1 -3; dir: alternate; dur: 4000; easing: easeInOutElastic; loop: true;"
        ></a-cylinder>

        <a-box position="0 -5000 -4" color="#e6e6e6" width="2" height="10000" depth="1"></a-box>

    </a-scene>
  </body>
</html>
localhost aframe virtual-reality
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.