xxxxxxxxxx
// This template can be used to create sketches for FXHASH.
// Create your sketch as usual. When ready, download your sketch zip file from top right, and upload to FXHASH.
function setup() {
createCanvas(windowWidth, windowHeight);
pixelDensity(2);
let seed = floor(fxrand()*9999999);
randomSeed(seed);
noiseSeed(seed);
rectMode(CENTER);
colorMode(HSB);
// circle(fxrand()*width, fxrand()*height, fxrand()*100);
for(let col=0; col<height; col +=20){
for(let row=0; row<width; row += 20){
fill(random(20, 40), 100, 100);
rect(col, row, random(2, 10), random(2, 10));
}
}
}
function reset(){
background(255);
}
function draw() {
}
function keyPressed() {
if (key.toLowerCase() === "s") save(); //to save screenshot
if (key === " ") reset(); //to generate variations
}