xxxxxxxxxx
var timeInterval;
function setup() {
createCanvas(windowWidth, windowHeight);
background(255);
frameRate(60);
strokeWeight(20);
lastTimeCheck = millis();
timeInterval = 2000;
}
function strokeChange(){
if (millis() > lastTimeCheck + timeInterval){
lastTimeCheck = millis();
stroke(random(255), random(255), random(255));
}
}
function draw() {
strokeChange();
noFill();
var x = width/2
ellipse(x, height/2, 100, 100);
noStroke();
fill(255, 0, 120);
ellipse(mouseX, mouseY, 40, 40);
}