added some formatting

This commit is contained in:
Jürg Hallenbarter
2026-04-13 07:07:35 +00:00
parent 3f9de9c266
commit 5259410d77
7 changed files with 40 additions and 40 deletions

View File

@@ -5,13 +5,13 @@ var mouseIndex = 0
function setup() {
createCanvas(500, 500);
background(255,255,255)
background(255, 255, 255)
noFill();
for (i = 0; i < 30; i++){
size = random(0, 15)*i;
randomX = random(-width/10, width/10);
randomY = random(-height/10, height/10);
square(width/2 +randomX - size/2, height/2 +randomY- size/2, size);
for (i = 0; i < 30; i++) {
size = random(0, 15) * i;
randomX = random(-width / 10, width / 10);
randomY = random(-height / 10, height / 10);
square(width / 2 + randomX - size / 2, height / 2 + randomY - size / 2, size);
}
}
@@ -20,10 +20,10 @@ function draw() {
}
function mousePressed(){
function mousePressed() {
mouseIndex++
size = random(0, 15)*i;
randomX = random(-width/10, width/10);
randomY = random(-height/10, height/10);
square(width/2 +randomX - size/2, height/2 +randomY- size/2, size);
size = random(0, 15) * i;
randomX = random(-width / 10, width / 10);
randomY = random(-height / 10, height / 10);
square(width / 2 + randomX - size / 2, height / 2 + randomY - size / 2, size);
}