xxxxxxxxxx
function setup() {
createCanvas(600, 600);
background(100);
rectMode(CENTER)
noStroke()
colorMode(HSB,width,100,100)
}
function draw() {
fill(0,10,0); // rect(width/2, height/2, width, height)
myShape(mouseX,mouseY,50,120);
myShape(mouseY, mouseX,50,50);
}
function myShape(cX,cY,Sz,SqHue) {
//let cX = 400;
//let cY = mouseY;
//let Sz = 100;
//let SqHue = 100;
fill(SqHue,25,100)
rect(cX,cY,Sz,Sz);
fill(SqHue,50,100)
rect(cX,cY,0.75*Sz,0.75*Sz)
fill(SqHue,75,100)
rect(cX,cY,0.50*Sz,0.50*Sz)
fill(SqHue,100,100)
rect(cX,cY,0.25*Sz,0.25*Sz)
}