xxxxxxxxxx
// funzione che viene eseguita una sola volta quando si esegue lo sketch
function setup() {
createCanvas(windowWidth, windowHeight);
//background(255);
}
//funzione eseguita circa 30 volte al secondo
function draw() {
background(255, 0, 255);
for (let x = 0; x < width; x = x + 20) {
fill(0, 255, 0);
stroke(255, 0, 0);
circle(random(0, windowWidth), random(0, windowHeight), random(150, 255));
}
/*
strokeWeight(50)
stroke(255,0,0)
line(mouseX,mouseY,0,0)
line(mouseX,mouseY,0,height)
line(mouseX,mouseY,width,0)
line(mouseX,mouseY,width,height)
strokeWeight(200)
stroke(255,0,255)
point(mouseX,mouseY)
strokeWeight(100)
stroke(255,255,0)
point(mouseX,mouseY)
*/
}