2016-09-15 45 views
1

我只是想創建一個使用A框架庫的可視化,其中用戶是「在一個立方體內」,並且在兩側嵌入了畫布圖像。我已經開始使用飛機準備現場了。這是我已經完成的。 http://codepen.io/LuoXiahong/pen/LRNJNbA框架建築場景「立方體內」

<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

默認情況下,THREE.js(因此A幀),面只渲染一面或另一面。您的頂級飛機旋轉方式錯誤,因此只能從頂部看到。您可以將其旋轉更改爲90 0 0以解決該問題,或將side="back"side="double"添加到您的<a-plane />以更改飛機的哪一側顯示。更多詳情here

+1

可能是'side =「double」' – ngokevin

+0

固定 - 謝謝。 –