Navigation between immersive WebXR scenes. (Nav Text A)
Labs 005 and 006 are a simple test of navigation between scenes. I tried using the router built into Nuxt, but that did nothing. Setting the window location works though.
// navigate to lab 006 using Nuxt 3 router - failed in WebXR navigateTo("/labs/lab006"); // use window location to navigate to lab 006 - works in WebXR, but freezes the current scene while loading the new page window.location.href = "/labs/lab006";
A few caveats
- This won’t work in on the vrhermit site because I’m embedding the labs in iframes. If you want to try it out, open the lab in a new window or tab.
- There is a slight delay after starting navigation. The current scene will freeze while the new page loads. I might be able to work around this by blacking out the camera prior to starting the navigation.
- Navigation between WebXR pages is an experimental feature and must be turned on with a future flag.
This lab is part of a project called Canvatorium, an experimental design lab for spatial computing. Learn more.