xxxxxxxxxx
26
let h;
function setup() {
createCanvas(600, 120);
rectMode(CENTER);
colorMode(HSB, 360, 100, 100);
h = 60;
}
function draw() {
background(220);
noStroke();
//for(initialize;condition;increment)
for (let x = 50; x <= width; x = x + 100) {
for (let w = 70; w >= 1 ; w = w -10){
fill(map(w, 70, 1, 0, 360), 100, 100);
rect(x, h, w, w)
// h = h +0.1;
}
}
}