

<krpano>

	
		<!-- compass (the one on the right side) -->


		<!-- compass with rotating pointer -->
		<plugin name="compass" url="compass.png" keep="true" zorder="1" children="false"
		        align="righttop" x="10" y="10"
		        scale="0.8" scalechildren="true"		
		        heading="0"
		        />

		<!-- compass pointer, the rotation will be changed in the "onviewchange" action -->
		<plugin name="compass_pointer" url="compass_pointer.png" keep="true" handcursor="false"
				parent="compass" zorder="1"
				align="center"
				/>

		<!-- compass glass cap (flash only, because there is no blendmode in html5) -->
		<plugin name="glass" devices="flash"  url="glass.jpg" keep="true" enabled="false"
		        blendmode="screen" alpha="0.5"
		        parent="compass" zorder="2"
		        align="center"
		        />





		<!-- compass direction hotspots, created dynamically -->

		<action name="addhotspot">
			addhotspot(%1);
			set(hotspot[%1].url,%CURRENTXML%/hotspots.png);
			set(hotspot[%1].crop,%3);
			add(hotspot[%1].ath,%2,heading);
			set(hotspot[%1].atv,0);
			set(hotspot[%1].scale,%4);
			set(hotspot[%1].scale1,%4);
			mul(hotspot[%1].scale2,%4,2);
			set(hotspot[%1].zoom,true);
			set(hotspot[%1].onover,tween(scale,get(scale2)));
			set(hotspot[%1].onout,tween(scale,get(scale1)));
			set(hotspot[%1].onclick,lookto(%2,0,90,smooth(),true,true));
		</action>

		<action name="add_compass_spots">
			action(addhotspot, n,  0,     0|0| 76|76, 1.0);
			action(addhotspot, no, 45,   78|0|118|76, 0.5);
			action(addhotspot, o,  90,  202|0| 71|76, 1.0);
			action(addhotspot, so, 135, 281|0|109|76, 0.5);
			action(addhotspot, s,  180, 400|0| 69|76, 1.0);
			action(addhotspot, sw, 225, 469|0|134|76, 0.5);
			action(addhotspot, w,  270, 603|0| 86|76, 1.0);
			action(addhotspot, nw, 315, 689|0|141|76, 0.5);
		</action>

</krpano>

