FPS limit

Coroutines are stopped currently when the component becomes inactive

That’s different to Unity I was told (I wasnt aware of that when implementing it - so it may be actually cooler to have them stay alive even when the component is inactive)

Maybe both for active and inactive could be interesting.

by user 615280976855171083

By passing in an argument? Yeah maybe :slightly_smiling_face:

Hi @totjoss I’ve added a first test of targetFrameRate to the context in the latest release. Maybe you can try this ? :slightly_smiling_face:

@ROBYER1 it should be number in fps, the main loop will try to clamp to this framerate. Leave it undefined to run as before.

Awesome ! :sparkles: Does it affect the update() loop rate ? Or it should only affect the render loop ?

by user 615280976855171083

It does affect update.

Alright ! :+1:

by user 615280976855171083

I’ve realized that the update/render framerate seems lower than the targetFrameRate value. :eyes: For instance if I set it to 60, I get an overall framerate at 50. And if I set it to 75, I get an overall framerate at 60.
I’m using context.time.smoothedFps to know the FPS counter, which seems pretty relevant to what I’m seeing.

by user 615280976855171083