Search code examples
aframewebvr

WebVR A-frame: Recommended way to build scenes


I have a requirement to build multiple scenes in web VR A-frame. Each scene will have a button which when clicked, will load a new scene with different background. What is the recommended way to build scenes in A-frame?

  1. Create just one scene and swap the entities at runtime. Each entity can correspond to a button, background, etc.
  2. Create multiple pages(eg. index.html), each having its own scene and load each page on click event.

Approach (1) seems to be the preferred one as the second approach would mean that 'Back' button in browser will be enabled on loading new pages, which is undesirable and affects the user experience in VR.

Can anyone confirm that approach (1) is preferred?


Solution

  • Definitely a better experience if you can keep everything in a "single-page app" (1) and swap out entities. Especially if you are doing something as simple as swapping a background. Only a couple browsers have implemented proper in-VR link traversal, and the link traversal UX at the moment is non-existent.

    https://aframe.io/docs/0.6.0/guides/building-a-360-image-gallery.html