<krpano>

	<include url="%VIEWER%/plugins/contextmenu.xml" />
	<include url="%VIEWER%/plugins/webvr.xml" />
	<include url="%VIEWER%/plugins/depthmap_navigation.xml" />
	<include url="%VIEWER%/plugins/iphone_fullscreen_swipe.xml" />
	
	<scene name="depthmap_8bit" autoload="true">
		<image>
			<sphere url="pano.jpg" />
			<depthmap url="depthmap_8bit_gray.png" waitforload="true" />
		</image>
		
		<!-- example out-of-center view for better illustration -->
		<view hlookat="234" vlookat="50" fov="90" tx="-65" ty="0" tz="74" />
		
	</scene>
	
	<scene name="depthmap_16bit">
		<image>
			<sphere url="pano.jpg" />
			<depthmap url="depthmap_16bits_rgb.png" encoding="rgb24" />
		</image>
	</scene>
	
	<scene name="depthmap_24bit">
		<image>
			<sphere url="pano.jpg" />
			<depthmap url="depthmap_24bits_rgb.png" encoding="rgb24" />
		</image>
	</scene>
	
	<style name="info" type="text" css="color:#FFFFFF;text-align:center;" bg="false" txtshadow="0 1 4 0x000000 1.0" enabled="false" />
	<style name="button" type="text" css="text-align:center;" padding="4 8" mergedalpha="false" bgborder="0 0xFFFFFF 1" bgroundedge="1" bgshadow="0 1 4 0x000000 1.0" ondown="set(bgcolor, 0xDDDDDD);" onup="set(bgcolor, 0xFFFFFF);" />
	
	<layer name="exampleinfo" style="info" keep="true" html="Depthmap-Image Bit-Depth / Precision Comparison" align="center" y="-25%" />
	
	<layer name="depthmap_8bit"  style="button" keep="true" html="8-bit Grayscale Depthmap" width="110" align="bottom" x="-120" y="55" onclick="loadscene(depthmap_8bit, null,MERGE|KEEPMOVING,BLEND(1));" />
	<layer name="depthmap_16bit" style="button" keep="true" html="16-bit RG Depthmap"       width="110" align="bottom" x="0"    y="55" onclick="loadscene(depthmap_16bit,null,MERGE|KEEPMOVING,BLEND(1));" />
	<layer name="depthmap_24bit" style="button" keep="true" html="24-bit RGB Depthmap"      width="110" align="bottom" x="+120" y="55" onclick="loadscene(depthmap_24bit,null,MERGE|KEEPMOVING,BLEND(1));" />
	
	<layer name="resetview" style="button" keep="true" html="Reset View" width="80" align="bottom" y="20" onclick="resetview();" />
	
	<action name="resetview">
		set(control.invert,false);
		tween(view.tx|view.ty|view.tz|view.ox|view.oy|view.oz|view.fisheye, calc(''+image.ox+'|'+image.oy+'|'+image.oz+'|0|0|0|0'), 0.5, default);
	</action>
	
	<!-- adjust the UI layout from the depthmap_navigation.xml -->
	<events name="walkinfo_touch" keep="true" devices="mobile"
		onresize="if(stagewidth GT stageheight,
					set(layer[walkinfo_touch], align=rightbottom, x=45, y=35);
					set(layer[moveup], x=20, y=50);
				  ,
					set(layer[walkinfo_touch], align=bottom, x=0, y=100);
					set(layer[moveup], x=60, y=20);
				);
				" 
		/>

</krpano>
