xxxxxxxxxx
21
let angle = 0;
let angle2 = 75;
function setup() {
createCanvas(400, 400, WEBGL);
}
function draw() {
background(220);
// Rotate the cube around the Y-axis
rotateY(angle);
rotateX(angle2);
// Draw the cube
box(200);
// Increment the angle for continuous rotation
angle += 0.001;
}