Programming in javascript / p5.js
I'm trying to use the setTimeout function, but the image, when fired, flashes on the screen, not fixed. The idea is that the ellipse appears after a certain time, and remains. First I thought it was a bug in my code, so I cleaned everything up until it was just the setTimeout function and still exhibited the same behavior. Is this a p5.js problem or what?
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw(){
background(25);
function ball(){
stroke(255);
noFill();
ellipse(200, 200, 50, 50);
}
setTimeout(ball, 2000);
}
Thank you.