A框架建筑场景“内部立方体”

时间:2016-09-15 12:58:46

标签: aframe

我只想使用A帧库创建可视化,其中用户“在多维数据集内”,并且在侧面有嵌入的画布图像。我已经开始使用a-plane准备场景了。这就是我实现的目标。 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>

我在显示多维数据集的顶部和背面时遇到问题。有没有人可以帮助我?

1 个答案:

答案 0 :(得分:2)

默认情况下,THREE.js(以及A-Frame)中的面只会渲染一侧或另一侧。你的顶层飞机只是以错误的方式旋转,所以它只能从顶部看到。您可以将其轮换更改为90 0 0以进行修正,或将side="back"side="double"添加到<a-plane />以更改平面的哪一侧。更多详情here