Running render loop on demand

Is there a way I can call the engine.runRenderLoop only when there is an update on the screen (eg. based on some event)?

Hello, it depends on the event :slight_smile:
We have a fairly long list of events on the scene when something is added or removed (like meshes, textures, etc…)

If you want to control the renderloop you can only call scene.render() when you want.

What kind of events are you looking for?

I guess manually calling scene.render() should work in my case where there are bunch of sprites (upto 1000, no mesh) in the scene created based on data from json and some camera zoom in/out. Thanks, will it a try.

1 Like