MozillaReality / WebXR-emulator-extension

INACTIVE - WebXR emulator extension
Mozilla Public License 2.0
463 stars 55 forks source link

Disable window.requestAnimationFrame when presenting #234

Closed fernandojsg closed 2 months ago

fernandojsg commented 4 years ago

When using WebXR, if you are in immersive mode window.rAF is not being called. I was testing a game and I was dealing with this issue because window.rAF was being called as well as session.rAF.

I suggest to hook window.rAF when the page is loaded and when you are presenting just replace it with a NOP, and replace with the original function back when you exit VR.

takahirox commented 4 years ago

Thanks for the report. It may be webxr-polyfill.js side issue. I'll investigate.