Question on quirks of loop() and noLoop() and control of draw() iterations

Hi all,

An elementary question but it has me puzzled, after all this time using p5.js.

There seem to some odd quirks of loop() and noLoop(). Please see p5.js Web Editor

It seems that loop() can force one, or two, runs of draw() (but no more).

Is there any sense that loop() calls are stacked ? If so, can isLooping() return the number of iterations remaining that draw() is going to do.

I tried to search the p5.js code about this but couldn’t find the real implementation code of loop(), noLoop(), isLooping(). If you can point me to that I’d be grateful.

Cheers.

2 Likes

Thanks @GoToLoop, that’s very helpful. Don’t know why I didn’t find the real loop() / noLoop() code. Will check more better. Ciao for now.