xxxxxxxxxx
28
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(255);
drawForeground()
drawBackground()
}
function drawForeground(){
var x = 0;
let dia=map(mouseX,0,width,50,250)
while (x <= width) {
fill("#A5FF00");
noStroke();
rect (x,windowHeight/3,20,200);
x=x+40;
}
}
function drawBackground(){
fill("purple")
square(random(width),random(height),10)
}