-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Describe the problem
Within a browser environment, it's not always guaranteed that window.requestAnimationFrame
will be driving the rendering animation loop. For example, when a user enters into an immersive XR session, window.requestAnimationFrame
will not run, and instead another requestAnimationFrame function on the XRSession
object takes over.
In the @threlte/xr
package we're currently doing this hack to get around the problem, but depending on an internals export for the package to work correctly with svelte/motion
doesn't seem sustainable.
Describe the proposed solution
There are lot of use cases for using svelte/motion
in an XR environment - and the package itself uses it internally (example) - so I'd love to see a way for it to be supported in a less fragile way.
Importance
would make my life easier