xxxxxxxxxx
var rows = 10;
var cols = 10;
var distanceX = 30;
var distanceY = 30;
function setup() {
createCanvas(300, 300);
//you can call the function to automatically trigger one random
mousePressed();
}
function mousePressed() {
background(0);
rectMode(CENTER);
noStroke();
for (var r = 1; r < rows; r++) {
for (var c = 1; c < cols; c++) {
fill("#44b4a8");
var size = random(10,20);
print(size);
rect(c*distanceX, r*distanceY, size, size);
}
}
}