export class Element { constructor() { this.data = undefined; } /** * Rotate the element */ rotate = () => { if (this.data) { this.data.rotation.x += 0.01; this.data.rotation.y += 0.01; } }; }