-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sound Listener ignores the autoRender property #7406
Comments
It is not technically rendering, but we want to stop any kind of application updates without destroying the app, as it is not in the view. Wish there would be some sort of a paused property guard at the very beginning of the tick function. |
If we ship over the update part, the scripts would not execute, and it'd be tricky to wake up your application again. That would need some special callback maybe or something. |
If we add
engine/src/framework/app-base.js Lines 2000 to 2009 in bf80c95
|
I mean, how would you set this AppBase.paused to true? Your scripts would not execute, so not from a script. maybe we need call back at the start of tick, where you supply true of false to pause the current frame .. so this callback would execute always, the rest of the frame skipped based on what this evaluates to. |
Ah, I see what you mean. Right, we don't do it from the application script assets, but externally. |
Our app has multiple views. In some views, the app is only temporarily hidden. In such views we do need |
Doesn't |
No, as requestAnimationFrame is bound to window. It only stops triggering if the browser is minified or tab is hidden. It is a valid case when Application needs to be completely paused, and usually it is an external need. With some callbacks and up to a user to wake it up in the way they feel needed. While complete pause of application is useful for external needs, when whole app needs to be paused. When app is paused, and then resumed, |
I was looking at why we keep losing frame time in our app when the application is paused from rendering (hidden from view). We pause it using
app.autoRender = false
. However it looks like Sound Listener is ignoring the property, because its update is triggered before that, whenapplication.update(dt)
is called:engine/src/framework/app-base.js
Lines 2066 to 2071 in bf80c95
The text was updated successfully, but these errors were encountered: