<?xml version="1.0" encoding="UTF-8"?>
<krpano version="1.19-pr16">

    
  <!-- Spot Style - Default Point Spot Style -->


  <style name="IconDefaultPointSpotStyle"
         url="%FIRSTXML%/spots/logo_tour_torres_1_user_defaultpoint0_user_defaultpoint0.png"
         visible="false"
         edge="center"
         onloaded="showPermanentTooltip(all);"


         />



<!-- ********** -->
<!-- Button -->
<!-- id : button -->
<!-- ********** -->
  <!-- EMPTY BUTTON : no image file -->
<!-- ********** -->
<!-- Botón WebVR -->
<!-- id : webvrbutton -->
<!-- ********** -->


	<layer name="webvrbutton"
		keep="true"
		blocked="false"
		alpha="1"
		url="%FIRSTXML%/graphics/webvrbutton/btn_webvr.png"
		align="topright"
		x="10"
		y="10"
		zorder="2"
		visible="false"
		onclick="if(scene[get(xml.scene)].full360 AND disableCurrentSceneVrConservation !== true,
    js(accessWebVr(get(xml.scene),get(videoscenestarttime)));
,
    js(accessWebVr(null));
);"

		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>