xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(150,200,255);
var abstand;
var kreis;
}
function draw() {
background(150,200,255);
if (mouseIsPressed){
map (mouseY,0,windowHeight,5,50)
abstand = mouseY;
//map (mouseX,0,windowWidth,5,30)
kreis = mouseX/5;
}
else {
abstand = 30;
kreis = 20;
}
for(y=30;y<height;y+=abstand)
{
for(x=30;x<width;x+=abstand)
{
noStroke();
fill (80);
ellipse (x,y,kreis,kreis);
}
}
}