0
Plz help fix the bug
3 Answers
0
The problem is that u are change the canvas width/height on every loop inside setInterval(). This causes it to clear it everytime, effectively allowing only one rect to be shown since the other gets cleared.
Move ur canvas/ctx initialization to the onload() so u only do this once.
Also i would suggest to use requestAnimationFrame() instead of setInterval() for animating things
0
Giorgos Dim can I have example code
Hot today
What's wrong? :(
1 Votes
Why won't my image display
0 Votes
How the answer is 50?
0 Votes
Number of Ones ( C++ ) question!
1 Votes