xxxxxxxxxx
22
// figure out how to update angle to rotate 1deg/frame
// then, move angle = 45; to the end of draw()
// what happens? how is this different from having it in setup()?
let angle;
function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
rectMode(CENTER);
angle = 45;
}
function draw() {
background(0);
noStroke();
fill(128);
translate(200,200);
rotate(angle);
square(0,0,100);
angle = ?;
}