xxxxxxxxxx
27
class Box {
constructor(x, y, angle) {
this.x = x;
this.y = y;
this.angle = angle;
}
displayBox(a) {
// stroke(255, 100);
// strokeWeight(0.5);
noStroke();
fill(255, 100);
push();
translate(this.x, this.y);
this.moveBox(a);
box(size - size/4, size - size/4);
pop();
}
moveBox(a) {
rotateX(a + this.angle);
rotateY(a + this.angle);
// rotateZ(a + this.angle);
// this.angle += 1;
}
}