I have a loop like this using <canvas>
:
for (i = 0; i < 1000; i++) {
draw_something(); // clears canvas at start of function
}
When this runs, nothing happens on the canvas until the loop finishes. The function draw_something
is confirmed to work and displays something different each time.
Is there a way to make this draw to the canvas 1000 times? I don't want to use setInterval
because I can't know how long draw_something
will take.