theatre-js / theatre

Motion design editor for the web
https://www.theatrejs.com
Apache License 2.0
10.82k stars 337 forks source link

Animation does not work in WebXR #466

Open patrickkeenan opened 6 months ago

patrickkeenan commented 6 months ago

Animation works on quest when the browser is open, but not when its closed. This makes me thing there's a check for window, to make sure its valid. However, WebXR sessions do not have a window object. I can understand that its important to check for a server side rendered component, but maybe there's another way to check rather than using window == "undefined".

A couple example lines

https://github.com/theatre-js/theatre/blob/9083186c0012b4a19631784064b1e6edaec57694/theatre/core/src/sequences/TheatreSequence.ts#L352

https://github.com/theatre-js/theatre/blob/9083186c0012b4a19631784064b1e6edaec57694/theatre/core/src/coreTicker.ts#L25

jerryhou77 commented 4 months ago

did you find the way to solve this problem, we found theatr.js animation will frozen when enter AR or VR mode on quest browser.

patrickkeenan commented 4 months ago

No resolution, ended up writing my own animation UI. Ideally this is addressed in the next version.

jerryhou77 commented 3 months ago

do you use rafDriver ?

patrickkeenan commented 3 months ago

I've tried to use it yeah, couldn't get it working

jerryhou77 commented 3 months ago

I just made a simple demo using aframe, it works on quest browser https://[jerryhou77.github.io/aframe/](https://jerryhou77.github.io/aframe/)