How to find out if there is a render loop running?

Our scene is kind of static most of the time. Users click something, we render. No need for a render loop to run.

So we have different extensions that start and stop render loops on demand.

My question is - is there a way to find out if there currently is a render loop running?
I need this for a spec.
In the spec we start the extension and we test that the extension does not start a render loop when certain parameters are received.

Is there a way I could test no render loop was added to the engine and there are no other loops currently running?


A not supported way (meaning it could break in future releases) is to check engine._activeRenderLoops.length: if it is 0, then no render loops is running.


Thanks. I will try it.

I can’t make the case and ask for a supported way as I understand that this is extremely specific, but nevertheless It will be great if there is an API in the future.

Adding @Deltakosh to decide if/how we should handle that.

no problem to add a new get accessor


1 Like