xxxxxxxxxx
22
let angle = 0;
function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
}
function draw() {
background(0);
push();
translate(200, 200);
scale(-1,1); //this makes the rotation go counter-clockwise
rotate(angle);
// scale(1,1); //this is to make the rotation go clockwise
stroke(255);
fill(100);
rect(0, 0, 100, 50);
pop();
angle = angle + 2;
}