You are not logged in.

1

Saturday, October 24th 2015, 12:16pm

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

2

Monday, October 26th 2015, 6:59pm

fixed!

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);

">