+ 1

Canvas is not cleaned properly

when drawing a circle it does not clear help https://code.sololearn.com/W3T0uR0z91pu/?ref=app

5th Jul 2020, 8:07 AM
Aparty
Aparty - avatar
2 odpowiedzi
+ 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.
5th Jul 2020, 1:17 PM
RKK
RKK - avatar
0
problem still exists
6th Jul 2020, 7:23 AM
Aparty
Aparty - avatar