+ 1
Canvas is not cleaned properly
when drawing a circle it does not clear help https://code.sololearn.com/W3T0uR0z91pu/?ref=app
2 Respuestas
+ 2
function animate() {
requestAnimationFrame(animate);
c.clearRect(0, 0,innerWidth, innerHeight);
for (var i = 0; i < circleArray.length; i++)
circleArray[i].update();
}
do something like this.
clearRect clears the screen.
And call this animate() inside onload.
0
problem still exists