xxxxxxxxxx
let squareAngle = 0
let circleAngle = 0
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
angleMode(DEGREES);
}
function draw() {
background(0);
fill(255,255,255);
// Drawing and rotating a square
translate(500,250);
rectMode(CENTER);
fill(255,0,0); //Red
rotate(squareAngle);
rect(0,0,200,200);
squareAngle ++;
// Draw and rotate circle
fill(0,0,255); // Blue
rotate(circleAngle);
//scale(squareAngle / 200);
ellipse(250,0,50,50);
circleAngle = circleAngle - 5;
}