<?xml version="1.0" encoding="UTF-8"?>
<krpano version="1.19">

  
  <!-- Spot Style - Default Polygon Spot Style -->
  <style name="PolygonDefaultPolygonSpotStyle"
           visible="false"
           bordercolor="0xffffff"
           fillcolor="0xffffff"
           borderwidth="1"
           borderalpha="1"
           fillalpha="0.40000000000000002"
           capture="false"
           onhover="onhoverPolygonDefaultPolygonSpotStyle"
           onover="onoverPolygonDefaultPolygonSpotStyle"
           onout="onoutPolygonDefaultPolygonSpotStyle"
           />
  <action name="onhoverPolygonDefaultPolygonSpotStyle">
    showTooltip('hotspot');
  </action>

  <action name="onoverPolygonDefaultPolygonSpotStyle">
    set(borderwidth, 1);
  </action>

  <action name="onoutPolygonDefaultPolygonSpotStyle">

    set(borderwidth, 1);
    hideTooltip();
  </action>



<!-- ********** -->
<!-- WebVR Button -->
<!-- id : webvrbutton -->
<!-- ********** -->

	<layer name="webvrbutton"
		keep="true"
		blocked="false"
		alpha="1"
		url="%FIRSTXML%/graphics/webvrbutton/btn_webvr.png" 
		align="center"
		x="10"
		y="10"
		zorder="1"
		visible="false"
		onclick="js(accessWebVr());
"

		crop="0|0|100|63"
		/>

	<events name="webvrbuttonevents"
		onvrunavailable="hidewebvrbutton(true);"
		onTourStart="showwebvrbutton();"
		hidetourcontrols="hidewebvrbutton();" 
		showtourcontrols="showwebvrbutton();" 
		keep="true" />
	<action name="hidewebvrbutton">if(%1 == true,set(layer[webvrbutton].blocked, true););set(layer[webvrbutton].visible, false);</action>
	<action name="showwebvrbutton">if(tour_displaycontrols,if(layer[webvrbutton].blocked == false,set(layer[webvrbutton].visible, true););,hidewebvrbutton(););</action>


	<!-- WebVR plugin for VR availability tests -->

	<plugin name="ptpvrmode" devices="html5" keep="true"
		url="%FIRSTXML%/graphics/webvr.js"
		mobilevr_support="true"
		mobilevr_fake_support="false"
		vr_cursor=""
		vr_cursor_enabled="false"
		onavailable="delayedcall(1, checkVrAvailability(););"
		onunavailable="checkVrUnavailable();"
		/>
	<action name="checkVrAvailability">
		if(plugin[ptpvrmode],
			if (plugin[ptpvrmode].isavailable,
				set(tour_vrdevices, true);
				events.dispatch(onvravailable);
			,
				set(tour_vrdevices, false);
			);
		,
			checkVrUnavailable();
		);
	</action>
	<action name="checkVrUnavailable">
		set(tour_vrdevices, false);
		events.dispatch(onvrunavailable);
	</action>
</krpano>