座標の中心に「cylinder」を呈示する

四角形を呈示するには,<a-cylinder>要素で指定します。

<a-cylinder position="0 0 0" rotation="0 45 0" color="#4CC3D9" radius="1" height="3" width="0.5"></a-cylinder>

position: x座標(右側が+),y座標(上側が+),z座標(手前側が+)

rotation: x軸の回転,y軸の回転,z軸の回転

color: 色の指定です。rgb(XXX,XXX,XXX)でRGB値で指定が可能です。

radius: 円柱の半径

height: 円柱の高さ

width: 円柱の幅

以下のように円柱が表示されます。

Untitled

その他のパラメータは以下をご確認ください。

- A-Frame

ここまでのプログラムのファイルです。

a-frame-cylinder-2021-09-23--14 51.study.json