【问题标题】:A-frame building scene "inside cube"A字型建筑场景“立方体内”
【发布时间】:2016-09-15 12:58:45
【问题描述】:

我只是想使用 A-frame 库创建一个可视化,其中用户位于“立方体内部”,并且在侧面嵌入了画布图像。我已经开始使用飞机准备场景。这就是我所取得的成就。 http://codepen.io/LuoXiahong/pen/LRNJNb

    <a-scene>
      <a-assets>
      </a-assets>
      <!-- Basic plane. -->
      <a-plane color="#ff0000" height="2" width="2" position="0 0 0" rotation="-90 0 0"></a-plane>
      <!-- Front-->
      <a-plane color="#00ff00" height="2" width="2" position="0 1 -1" rotation="0 0 90"></a-plane>
      <!--Back - does not display-->
      <a-plane color="#0000ff" height="2" width="2" position="0 1 1" rotation="0 0 90"></a-plane>
      <!-- Left-->
      <a-plane color="#ffff00" height="2" width="2" position="-1 1 0" rotation="0 90 0"></a-plane>
      <!-- Right-->
      <a-plane color="#ff00ff" height="2" width="2" position="1 1 0" rotation="0 -90 0"></a-plane>
      <!--Top plane - does not display -->
      <a-plane color="#00ffff" height="2" width="2" position="0 2 0" rotation="-90 0 0"></a-plane>
    </a-scene>

我在显示立方体的顶部和背面时遇到问题。有没有人可以帮帮我?

【问题讨论】:

    标签: aframe


    【解决方案1】:

    默认情况下,在 THREE.js(因此也是 A-Frame)中,面只渲染一侧或另一侧。您的顶部平面只是以错误的方式旋转,因此只能从顶部看到。您可以将其旋转更改为90 0 0 以解决该问题,或将side="back"side="double" 添加到您的&lt;a-plane /&gt; 以更改显示平面的哪一侧。更多详情here.

    【讨论】:

    • 可能是side="double"
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-11-08
    • 1970-01-01
    • 1970-01-01
    • 2015-02-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多