xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
frameRate(10)
}
function draw() {
background(51, 0, 153, 20);
stroke(255, 255, 102);
noFill();
translate(mouseX, mouseY);
rotate( random (7));
if (mouseIsPressed) {
if (mouseButton == LEFT)
//Zeichnet Ellipse
ellipse (0, 0, 40, 40);
r = random(height);
ellipse(width/4, height/2, r, r);
}
for(y=10; y<height; y+=30)
{
for(x=10; x<width; x+=30)
{
r = random(10);
fill(204, random(153), 255);
stroke(random(255), 0, 255);
translate(x,y);
rotate( cos(millis()/1000) );
rect(0, 0, r, r);
}
}
}