aframe - Does Z point up or does Y point up? -
the documentation on rotation tag says z vertical (yaw rotation around vertical) https://aframe.io/docs/0.6.0/components/rotation.html example https://codepen.io/bryik/pen/gzloqv
<!-- y-roll or "yaw" --> <a-plane id="yaw" material="color: #4cc3d9; side: double" position="0 2 0" rotation="0 45 0" width="2" height="2"></a-plane>
shows y points up, not z. there bug in documentation?
the docs bugged, depends on orientation. (z yaw)
<script src="https://aframe.io/releases/0.6.1/aframe.min.js"></script> <a-scene> <a-text value="pitch (x)" color="#333" position="-0.5 5.5 -5"></a-text> <a-plane position="0 4 -5" rotation="0 0 0" width="2" height="2" color="blue"><a-animation attribute="rotation" dur="800" fill="none" to="360 0 0" repeat="forwards" ></a-animation></a-plane> <a-text value="yaw (y)" color="#333" position="-3.5 3.5 -5"></a-text> <a-plane position="-3 2 -5" rotation="0 0 0" width="2" height="2" color="green"><a-animation attribute="rotation" dur="800" fill="none" to="0 360 0" repeat="forwards" ></a-animation></a-plane> <a-text value="roll (z)" color="#333" position="2.5 3.5 -5"></a-text> <a-plane position="3 2 -5" rotation="0 0 0" width="2" height="2" color="red"><a-animation attribute="rotation" dur="800" fill="none" to="0 0 360" repeat="forwards" ></a-animation></a-plane> </a-scene>
Comments
Post a Comment