I have a simple ellipse moving back and forth and I keep getting this sort of "burn in" or "ghost trail" effect. What might be causing this?
Here is the code:
let x = 50;
let y = 50;
function setup() {
createCanvas(500, 500);
}
function draw() {
background(0);
ellipse(x, y, 70, 70);
x += 1 + (50 * sin(y));
y += 2;
if (x >= 500 || y >= 500) {
x = 50;
y = 50;
}
}