0
Dieser Code funktionierte für mich einmal aber nicht mehr. Ich versuche herauszufinden, wie man eine Entity dreht, die einige Elemente in einer Szene umschließt.Wie man die aktuelle Rotation von Aframe Einheit zurückgibt
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++;
}