Making a square canvas
createCanvas(min(window.innerWidth,window.innerHeight), min(window.innerWidth,window.innerHeight));
Saving an image with a timestamp
function keyTyped() {
const d = new Date();
let stamp = `${d.getFullYear()}-${d.getMonth()}-${d.getDate()}_${d.getHours()}_${d.getMinutes()}_${d.getSeconds()}`
if (key === 's') {
save('project-name-' + stamp + '.png');
}
}
Grid of shapes
function grid() {
let numShapes = int(random(2,10));
let size = (8*width/10)/numShapes;
ellipseMode(CORNER);
rectMode(CORNER);
let randSpace = random(8,20);
for (y=0; y