console
let a=-0.1;
let b=0.5;
let c=0.8;
function setup(){
createCanvas(500,500);
background(255);
}
function draw(){
background(100,10);
a+=9;
b+=15
c+=0.3;
noFill();
push();
stroke(0);
translate(250,250);
rotate(a);
translate(-100,-100);
rect(0,0,250,250);
pop();
push();
stroke(0,60);
translate(20,20);
rotate(b);
rect(0,0,50,50);
pop();
push();
stroke(0);
translate(50,50);
rotate(c);
rect(50,30,30,30);
pop();
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.min.js"></script>