immersive-web / webxr

Repository for the WebXR Device API Specification.
https://immersive-web.github.io/webxr/
Other
2.95k stars 375 forks source link

Explicitly spec when inline animation frame loops are suspended #1115

Open alcooper91 opened 3 years ago

alcooper91 commented 3 years ago

It is implied in the Example at the end of https://immersive-web.github.io/webxr/#animation-frames that "inline" animation frame loops should be suspended while there is an active immersive session:

Applications which use "inline" sessions for rendering to the HTML document do not need to take any special steps to coordinate the animation loops, since the user agent will automatically suspend the animation loops of any "inline" sessions while an immersive session is active.

However, there is no clear spec text around exactly when this should happen.

The most reasonable approach for re-starting the inline session would be after the page has been notified that the immersive session has ended (as a page may want to request a new inline session at such time), and likely the page should stop servicing inline session animation frames once it receives updated inline viewer data and there is an active immersive session.

Manishearth commented 3 years ago

This makes sense