I have a very simple function that I would like to fire anytime the mouse is idle for around 10 seconds and disappears when the Mouse is moved. I have had a look but finding it difficult to figure out ( I am new to this) thanks in advance!
the animation id like to trigger is this:
function setup() {
createCanvas(800, 800);
frameRate(0.8);
strokeWeight(30);
}
function draw() {
stroke(random(500),random(195),random(150));
// strokeweight(random(4,50));
point (random(800), random(800));
}
I have tried using setTimeout but I seem to be doing something wrong.