0
此代碼爲我工作過一次,但不再執行。我想弄清楚如何旋轉一個實體來包裝場景中的幾個元素。如何返回Aframe實體的當前旋轉
var entityEl = document.querySelector('#rotate');
console.log(entityEl.components);//returns components object
var entityRotY = entityEl.components.rotation.attrValue.y;//rotation is undefined
function rotate(){
entityEl.setAttribute('rotation', {x: 0, y: entityRotX + 1, z: 0});
entityRotY++;
}