xxxxxxxxxx
28
let spin1 = 0;
let spin2 = 0;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(0, 4);
noStroke();
fill(255);
push();
translate(100, 100);
rotate(spin1);
rectMode(CENTER);
rect(0, 0, 100, 5);
spin1 -= 0.03;
pop();
push();
translate(250, 250);
rotate(spin2);
rectMode(CORNER);
rect(0, 0, 100, 50, 50, 0, 0, 0);
spin2 += 0.05;
pop();
}