Switching off engine.renderEvenInBackground in Sandbox?

From a quick look at the source code, my understanding is that renderEvenInBackground defaults to true.

I have a number of browser tabs hosting BJS content opened, and I’d like to ease the load on my poor computer when I am not actively working in those tabs :slight_smile:
I can switch off renderEvenInBackground in my own code and in the PGs, but I’m not sure if I can do that in the sandbox, and if so, how.

Side question: what is the rationale behind defaulting to true?
Thanks!

For the sandbox, you can do in the browser console:

BABYLON.Engine.LastCreatedEngine.renderEvenInBackground = false

I think it’s true by default because as soon as a tab looses the focus it freezes the window if renderEvenInBackground = false and I don’t think it’s what we want in general: in dual screen working, often you have a tab of the browser opened on one screen and something else on the 2nd screen, and you want the scene to render even if the tab hasn’t the focus.

1 Like

Amazing trick! Many thanks!

I guess that makes sense. I just have the bad habit of opening a bunch of tabs with more or less heavy PGs in it, so that, combined with a couple of scenes being reviewed in the sandbox, plus the app in development… Fine on a good pc. Less fine on the cute laptop that I have to use right now :slight_smile:

Would it make sense to have some sort of user settings for the Playground and the Sandbox, that would systematically overrides the apps’ defaults?