Webvr plugin - best way to show/hide 'enter vr' button

  • I have a tour which has some pano's which are not full 360's, I use hlookatmin/max to limit the view. Obviously I can't do this in vr.

    Therefore is there an easy way to control whether the 'enter vr' button appears on a scene by scene basis?

    Thanks
    Tim

  • Solved it...

    Modified webvr_enterbutton in webvr.xml as below:

    <layer name="webvr_enterbutton" keep="true" vr="true"
    style="webvr_button_style"
    parent="group5"
    html="ENTER VR"
    align="top" y="0"
    autoalpha="true" alpha="0.0"
    onclick="webvr.enterVR();"
    />

    Then created a group in my xml file as below:

    <plugin name="group5"
    url="../hotspots/transparent-45x45.png"
    align="top" x="0" y="0"
    keep="true"
    />

    I can then control if the vr button appears for each scene using the onstart function:

    <scene name="pano2" title="pano2 " onstart="showname(); set (plugin[group5].visible,true);

    ">

    or

    <scene name="pano2" title="pano2 " onstart="showname(); set (plugin[group5].visible,false);

    ">

Jetzt mitmachen!

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