Possible to reload tour without page reload?

  • what is the problem with a reload?


    Nothing crucial. The extra time of loading the HTML page. The visually jarring loss of all the HTML elements before redrawing the page.

    At the moment I'm developing a headset interface for a tourist center. When one person is done I want the tour to automatically reset to its initial state for the next user. For instance, taking off a GearVR headset causes it to jump out of VR (using a web browser). I can use the onexitvr event to reset the tour. However, it doesn't actually execute until the next person puts on the headset. If I do a page reload using location.reload(), you first see the pano last viewed by the previous user, then everything goes to black and reloads. Tolerable but not elegant. If I could simply do something like loadxml(tour.xml); -- which doesn't work -- it might be more elegant. So looks like reloading the initial scene and explicitly resetting everything is the way to go. A bit more work but nothing too taxing.

  • it really depends on the tour...
    if it is something simple loading the first scene, and restoring a few backuped variables (mainly the view) would do it

    the 2nd thing you could do is alter the vtourskin:
    in the action skin_webvr_setup the skin_settings.loadscene_flags are set up for vr mode
    what you need is maybe just a loadscene() call of your first scene
    without MERGE|KEEPVIEW|KEEPMOVING

  • It has been proving problematic. In Gear VR and GO the tour drops out of VR shortly after taking off the headset. I use a custom splash screen to start VR and being a layer it disappears in VR but shows when you drop out of VR. On the Go I just click it and reenter VR. On Gear VR I have to hit it at least twice and sometimes only a page reload works. I've used both the webvr_onexitvr event and the button click to do the start scene reload and reinitialize certain variables. Still nothing perfect.

    Ah, the joys of programming...

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!