xxxxxxxxxx
let lapse = 0; // mouse timer
function setup() {
createCanvas(1112, 834);
colourMode(HSB, 255);
}
function draw() {
noStroke();
fill(random(255), 255, 200);
repeat(0, 1112, 1, 0, 834, 1, noisy_dot);
noLoop();
}
function noisy_dot(x, y) {
var x2 = x + (100 * noise(x/50, y/50)) - 50;
var y2 = y + (100 * noise(y/50, x/50)) - 50;
circle (x2, y2, 1);
}
function mousePressed(){
// prevents mouse press from registering twice
if (millis() - lapse > 500){
save('pix.jpg');
lapse = millis();
}
}