浏览代码

dfsjfdhdjf

lateri 4 年之前
父节点
当前提交
b8558493a9
共有 100 个文件被更改,包括 3550 次插入1246 次删除
  1. 2 1
      .gitignore
  2. 0 119
      jingqu.html
  3. 0 1
      jingqu.min.js
  4. 0 1
      jingqu4k.min.js
  5. 5 0
      plugins/bingmaps.js
  6. 二进制
      plugins/bingmaps.swf
  7. 522 0
      plugins/combobox.xml
  8. 48 0
      plugins/doubleclick_style.xml
  9. 28 0
      plugins/fps.xml
  10. 5 0
      plugins/googlemaps.js
  11. 5 0
      plugins/gyro2.js
  12. 5 0
      plugins/pp_blur.js
  13. 5 0
      plugins/pp_light.js
  14. 5 0
      plugins/pp_sharpen.js
  15. 19 0
      plugins/scrollarea.js
  16. 二进制
      plugins/scrollarea.swf
  17. 214 0
      plugins/showtext.xml
  18. 5 0
      plugins/soundinterface.js
  19. 二进制
      plugins/soundinterface.swf
  20. 5 0
      plugins/videoplayer.js
  21. 二进制
      plugins/videoplayer.swf
  22. 5 0
      plugins/webvr.js
  23. 923 0
      plugins/webvr.xml
  24. 二进制
      plugins/webvr_handcursor.png
  25. 二进制
      plugins/webvr_laser.png
  26. 二进制
      plugins/webvr_light.png
  27. 二进制
      plugins/webvr_vrcursor.png
  28. 二进制
      skin/rotate_device.png
  29. 二进制
      skin/vtourskin.png
  30. 1333 0
      skin/vtourskin.xml
  31. 28 0
      skin/vtourskin_design_117.xml
  32. 31 0
      skin/vtourskin_design_117round.xml
  33. 71 0
      skin/vtourskin_design_black.xml
  34. 42 0
      skin/vtourskin_design_flat_light.xml
  35. 40 0
      skin/vtourskin_design_glass.xml
  36. 58 0
      skin/vtourskin_design_ultra_light.xml
  37. 二进制
      skin/vtourskin_hotspot.png
  38. 二进制
      skin/vtourskin_light.png
  39. 二进制
      skin/vtourskin_mapspot.png
  40. 二进制
      skin/vtourskin_mapspotactive.png
  41. 12 0
      tour.js
  42. 二进制
      tour.swf
  43. 113 0
      tour.xml
  44. 二进制
      tour_testingserver.exe
  45. 二进制
      tour_testingserver_macos
  46. 二进制
      yaoimages/auto_rotation.png
  47. 二进制
      yaoimages/auto_rotation@2x.png
  48. 二进制
      yaoimages/auto_rotation_click.png
  49. 二进制
      yaoimages/auto_rotation_click@2x.png
  50. 二进制
      yaoimages/bg1280.jpg
  51. 二进制
      yaoimages/direction.png
  52. 二进制
      yaoimages/direction_board.png
  53. 二进制
      yaoimages/direction_board@2.png
  54. 二进制
      yaoimages/direction_bottom.png
  55. 二进制
      yaoimages/direction_bottom@2x.png
  56. 二进制
      yaoimages/direction_bottom_disable.png
  57. 二进制
      yaoimages/direction_bottom_disable@2x.png
  58. 二进制
      yaoimages/direction_left.png
  59. 二进制
      yaoimages/direction_left@2x.png
  60. 二进制
      yaoimages/direction_left_disable.png
  61. 二进制
      yaoimages/direction_left_disable@2x.png
  62. 二进制
      yaoimages/direction_right.png
  63. 二进制
      yaoimages/direction_right@2x.png
  64. 二进制
      yaoimages/direction_right_disable.png
  65. 二进制
      yaoimages/direction_right_disable@2x.png
  66. 二进制
      yaoimages/direction_top.png
  67. 二进制
      yaoimages/direction_top@2x.png
  68. 二进制
      yaoimages/direction_top_disable.png
  69. 二进制
      yaoimages/direction_top_disable@2x.png
  70. 二进制
      yaoimages/direction_walk.png
  71. 二进制
      yaoimages/direction_walk@2x.png
  72. 二进制
      yaoimages/play4.png
  73. 二进制
      yaoimages/play4@2x.png
  74. 二进制
      yaoimages/play4@3x.png
  75. 二进制
      yaoimages/play_click.png
  76. 二进制
      yaoimages/play_click@2x.png
  77. 二进制
      yaoimages/play_click@3x.png
  78. 二进制
      yaoimages/rang_1201.png
  79. 二进制
      yaoimages/rang_1201@2x.png
  80. 二进制
      yaoimages/rangle.png
  81. 二进制
      yaoimages/rangle@2x.png
  82. 二进制
      yaoimages/yao0.png
  83. 二进制
      yaoimages/zoomin.png
  84. 二进制
      yaoimages/zoomin@2x.png
  85. 二进制
      yaoimages/zoomin_click.png
  86. 二进制
      yaoimages/zoomin_click@2x.png
  87. 二进制
      yaoimages/zoomout.png
  88. 二进制
      yaoimages/zoomout@2x.png
  89. 二进制
      yaoimages/zoomout_click.png
  90. 二进制
      yaoimages/zoomout_click@2x.png
  91. 21 118
      yaoli.html
  92. 0 1
      yaoli.min.js
  93. 0 119
      yaoli/jingqu.html
  94. 0 1
      yaoli/jingqu.min.js
  95. 0 885
      yaoli/js/tvSysBtnBind.v2.1.js
  96. 二进制
      yaoli/yaoimages/auto_rotation.png
  97. 二进制
      yaoli/yaoimages/auto_rotation@2x.png
  98. 二进制
      yaoli/yaoimages/auto_rotation_click.png
  99. 二进制
      yaoli/yaoimages/auto_rotation_click@2x.png
  100. 0 0
      yaoli/yaoimages/bg1280.jpg

+ 2 - 1
.gitignore

@@ -1,2 +1,3 @@
 panos
-yao
+yao
+tourpanos

+ 0 - 119
jingqu.html

@@ -1,119 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-
-<head>
-    <title>瑶里景区</title>
-    <script src="./js/tvSysBtnBind.v2.1.js"></script>
-
-    <meta charset="utf-8">
-    <link rel="stylesheet" href="yaostyle.css">
-
-    <style>
-        #debug{
-            display: none;
-            position: absolute;
-            top: 20px;
-            left: 10px;
-            color: #ffff00;
-        }
-
-    </style>
-</head>
-
-<script>
-    var deviceWidth = parseInt(window.screen.width);  //获取当前设备的屏幕宽度
-    var deviceScale = deviceWidth / 1280;  //得到当前设备屏幕与640之间的比例,之后我们就可以将网页宽度固定为640px
-    var ua = navigator.userAgent;
-    //获取当前设备类型(安卓或苹果)
-    if (/Android (\d+\.\d+)/.test(ua)) {
-        var version = parseFloat(RegExp.$1);
-        if (version > 2.3) {
-            document.write('<meta name="viewport" content="width=1280,initial-scale=' + deviceScale + ', minimum-scale = ' + deviceScale + ', maximum-scale = ' + deviceScale + ', target-densitydpi=device-dpi">');
-        } else {
-            document.write('<meta name="viewport" content="width=1280,initial-scale=0.75,maximum-scale=0.75,minimum-scale=0.75,target-densitydpi=device-dpi" />');
-        }
-    } else {
-        document.write('<meta name="viewport" content="width=1280, user-scalable=no">');
-    }
-</script>
-
-<body id="Jdoc">
-
-    <!-- 用来保存输出结果 -->
-    <div id="container">
-    </div>
-
-    <!-- <div class="navigation">
-        <div style="position:relative">
-            <div id='map'><img id="map_img" class="map_img" src="panos/HomeHouseMap.png"/></div>
-            <div id='cam'><img class="cam_img" src="panos/HomePoint.png"/></div>
-            <div id='redPoints'>
-            </div>
-        </div>
-            
-    </div> -->
-
-
-
-    <!-- <div id="tip">Walking...</div> -->
-
-    <div id="menuTip"> 单击“OK”键,唤起菜单 </div>
-    <div id="menuTitle">fff</div>
-
-    <div id="menuControl"> 
-        <div class="menu_control_item">
-            <img id="auto_rotation" src="yaoimages/auto_rotation.png" />
-            <div id="rotation_title">自动旋转</div>
-        </div>
-        <div class="menu_control_item">
-            <img id="zoom" src="yaoimages/zoomin.png" />
-            <div id="zoom_title" >放大</div>
-        </div>
-    </div>
-
-    <div id="wholeDirection">
-        <div id="directionTop">阳台</div>
-        <div class="directionCenter">
-            <div id="directionLeft">房间</div>
-            <div id="directionControl"> 
-                <div id='direct_top'><div><img id='direct_top_img' src='yaoimages/direction_top.png'></div><div>1</div></div>
-                <div class="direct_center">
-                    <div id='direct_left'><div><img id='direct_left_img' src='yaoimages/direction_left.png'></div><div>2</div></div>
-                    <div id='direct_right'><div>4</div><div><img id='direct_right_img' src='yaoimages/direction_right.png'></div></div>
-                </div>
-                <div id='direct_bottom'><div>3</div><div><img id='direct_bottom_img' src='yaoimages/direction_bottom.png'></div></div>
-            </div>
-            <div id="directionRight">花园</div>
-        </div>
-
-        
-        <div id="directionBottom">露台</div>
-    </div>
-    
-
-    <!-- <div id='direction_top_tip'><img id='direct_top_tip_img' src='yaoimages/direction_top.png'></div> -->
-
-    
-    <div id='menu'>
-        <div class="pano">
-            <div class="title"></div>
-            <div class="thumb"><img src='yao/chenyiju4k_b.jpg' /></div>
-        </div>
-    </div>
-
-    <div id='debug'></div>
-    <canvas id='textCanvas' />
-
-
-
-    <div class="ctrlBtn"></div>
-
-    <script src="jingqu.min.js"></script> 
-
-    <script type="text/javaScript">
-
-    </script>
-</body>
-
-</html>

文件差异内容过多而无法显示
+ 0 - 1
jingqu.min.js


文件差异内容过多而无法显示
+ 0 - 1
jingqu4k.min.js


文件差异内容过多而无法显示
+ 5 - 0
plugins/bingmaps.js


二进制
plugins/bingmaps.swf


+ 522 - 0
plugins/combobox.xml

@@ -0,0 +1,522 @@
+<krpano>
+
+	<!--
+		krpano 1.20.9 combobox.xml Plugin
+		https://krpano.com/plugins/combobox/
+
+		- This plugin converts <combobox> elements in the current xml
+		  into <layer> container, scrollarea and textfield elements.
+		- Additionally it's also possible to add and remove combobox
+		  elements also dynamically.
+		- The full xml implementation allows many ways of customizing
+		  for own needs - custom designs/styles, custom functionality.
+		- The plugin works automatically the same for HTML5 and Flash.
+		- It's possible to use this plugin as replacement for the old
+		  combobox.swf/combobox.js plugins, the action interfaces are
+		  the same.
+
+
+		Syntax for Static XML Code:
+
+			<combobox name="..." design="..." ...any layer settings...>
+				<item name="..." caption="..." onclick="..." />
+				<item name="..." caption="..." onclick="..." />
+			</combobox>
+
+		Syntax for Dynamic XML Code:
+
+		 - Global Actions:
+
+			addComboboxLayer(cbname, design*)
+			removeComboboxLayer(cbname);
+
+		 - Combobox Layer Actions:
+
+			layer[cbname].addItem(caption, onclick)
+			layer[cbname].addNamedItem(name, caption, onclick)
+			layer[cbname].addIdItem(name, caption, onclick);       same as addNamedItem (for combobox.js compatibility)
+			layer[cbname].selectItem(caption)
+			layer[cbname].selectItemByName(name_or_index)
+			layer[cbname].selectIdItem(name_or_index)              same as selectItemByName (for combobox.js compatibility)
+			layer[cbname].removeAll()
+			layer[cbname].openList()
+			layer[cbname].closeList()
+
+		 - Events/Callbacks:
+
+			layer[cbname].onChange
+
+		- Combobox Layer Attributes:
+
+			layer[cbname].item              - krpano Array of the items
+			layer[cbname].selecteditemindex - current selected item index
+	-->
+
+	<!-- path to the scrollarea plugin -->
+	<combobox_scrollareaplugin
+		url.html5="%VIEWER%/plugins/scrollarea.js"
+		url.flash="%VIEWER%/plugins/scrollarea.swf"
+		/>
+
+	<!-- core internal layer styles -->
+	<style name="combobox_container_style" type="container" maskchildren="true" bgcapture="true" visible="false" onclick="combobox_onclick_event();" mergedalpha="false" alpha="1.0" />
+	<style name="combobox_marker_style" type="text" align="righttop" edge="center" html="▼" havemarkersize="false" onautosized="set(havemarkersize,true);" mergedalpha="false" alpha="1.0" />
+	<style name="combobox_item_style" type="text" wordwrap="false" vcenter="true" align="lefttop" onover="if(!combbox_item_pressed,onoveritem());asyncloop(hovering,,if(!combbox_item_pressed,onoutitem()));" ondown="onoveritem(); set(combbox_item_pressed,true);" onup="onoutitem(); set(combbox_item_pressed,false);" onoveritem="set(bg,true);" onoutitem="set(bg,false);" mergedalpha="false" alpha="1.0" />
+
+	<!-- several pre-defined designs -->
+	<combobox_design name="default" margin="2" open_close_speed="0.25">
+		<!-- default design - white box with black text and blue selection -->
+		<style name="combobox_container_style" bgalpha="1.0" bgcolor="0xFFFFFF" bgborder="1 0xFFFFFF 0.5" bgroundedge="1" bgshadow="0 1 3 0x000000 1.0" />
+		<style name="combobox_marker_style" css="color:#FFFFFF;" bg="false" txtshadow="0 0 2 0x000000 1" />
+		<style name="combobox_item_style" css="color:#222222;" padding="4 4" bg="false" bgcolor="0xC7E4FC" bgalpha="1.0" bgroundedge="1" txtshadow="0 0 1 0xFFFFFF 1.0" />
+	</combobox_design>
+
+	<combobox_design name="vtour" margin="4" open_close_speed="0.25">
+		<!-- default vtourskin.xml design -->
+		<style name="combobox_container_style" bgalpha="0.8" bgcolor="0x2D3E50" bgborder="0" bgroundedge="1" bgshadow="0 4 10 0x000000 0.3" />
+		<style name="combobox_marker_style" css="color:#FFFFFF;" bg="false" txtshadow="0 0 2 0x000000 1" />
+		<style name="combobox_item_style" css="color:#FFFFFF;" padding="4 4" bg="false" bgcolor="0xFFFFFF" bgalpha="0.5" bgroundedge="0" txtshadow="0 0 2 0x000000 1" />
+	</combobox_design>
+
+
+	
+	
+
+	<!-- internal events -->
+	<events name="combobox_xml_plugin_events" keep="true"
+	        onresize="combobox_closelist();"
+	        />
+
+	<!-- krpano version check -->
+	<action name="combobox_versioncheck" autorun="preinit">
+		if(build LT '2020-11-01',
+			error('combobox.xml - too old krpano version!');
+			set(events[combobox_xml_plugin_events].name, null);
+			set(action[addComboboxLayer].content, '');
+			set(action[removeComboboxLayer].content, '');
+		  ,
+			combobox_xml_init();
+		);
+	</action>
+
+	<action name="combobox_xml_init">
+		<!-- set auto call again on next xml load -->
+		set(action[combobox_xml_init].autorun, onload);
+		
+		combobox_parse_xml_elements();
+	</action>
+	
+
+	<!-- convert all <combobox> elements to layers -->
+	<action name="combobox_parse_xml_elements" scope="localonly">
+		if(global.combobox,
+			copy(combobox_src, global.combobox);
+			delete(global.combobox);
+			def(i, integer, 0);
+			def(cnt, integer, get(combobox_src.count));
+			if(cnt GT 0, loop(i LT cnt,
+				copy(cb, combobox_src[get(i)]);
+				if(cb AND cb.name AND cb.parsed != true,
+					set(cb.parsed, true);
+					addComboboxLayer(get(cb.name), get(cb.design));
+					copy(ly, global.layer[get(cb.name)]);
+					copyattributes(get(ly), get(cb));
+					set(ly.keep, true);
+					def(item_cnt, integer, get(cb.item.count));
+					if(item_cnt GT 0,
+						def(item_i, integer, 0);
+						loop(item_i LT  item_cnt,
+							combobox_additem(get(ly.name), get(cb.item[get(item_i)].name), get(cb.item[get(item_i)].caption), get(cb.item[get(item_i)].onclick), get(cb.item[get(item_i)].oninit));
+							inc(item_i);
+						);
+					);
+				);
+				inc(i);
+			));
+		);
+	</action>
+
+
+	<!-- dynamically add a combobox layer -->
+	<action name="addComboboxLayer" scope="localonly" args="cbname, design">
+		<!-- create the layer -->
+		addlayer(get(cbname));
+		copy(cb, global.layer[get(cbname)]);
+		set(cb.keep, true);
+		
+		<!-- copy the design settings (or set defaults) -->
+		if(!global.combobox_design[get(design)].name, set(design,'default'));
+		copy(cb.cbdesign, global.combobox_design[get(design)]);
+		calc(cb.margin, cb.cbdesign.margin !== null ? cb.cbdesign.margin : 2);
+		calc(cb.open_close_speed, cb.cbdesign.open_close_speed !== null ? cb.cbdesign.open_close_speed : 0.25);
+		<!-- load the styles and copy the design style settings -->
+		cb.loadstyle(combobox_container_style);
+		copyattributes(get(cb), get(cb.cbdesign.style[combobox_container_style]));
+
+		<!-- add/build/map actions -->
+		calc(cb.addItem,          'combobox_additem(' + cbname + ', null, "%%1", "%%2");');
+		calc(cb.addNamedItem,     'combobox_additem(' + cbname + ', "%%1", "%%2", "%%3");');
+		calc(cb.addIdItem,        'combobox_additem(' + cbname + ', "%%1", "%%2", "%%3");');
+		calc(cb.selectItem,       'combobox_finditem(' + cbname + ', "%%1", __cb_fi); if(__cb_fi GE 0, combobox_selectitem(' + cbname + ', get(__cb_fi))); delete(__cb_fi);');
+		calc(cb.selectItemByName, 'combobox_selectitem(' + cbname + ', "%%1");');
+		calc(cb.selectIdItem,     'combobox_selectitem(' + cbname + ', "%%1");');
+		calc(cb.removeAll,        'combobox_removeitems(' + cbname + ');');
+		calc(cb.openList,         'combobox_openlist(' + cbname + ');');
+		calc(cb.closeList,        'combobox_closelist(' + cbname + ');');
+
+		<!-- create sub-layers -->
+		calc(saname, 'combobox_' + cbname + '_scrollarea');
+		addlayer(get(saname));
+		copy(sa, global.layer[get(saname)]);
+		copy(sa.parent, cbname);
+		copy(sa.url, global.combobox_scrollareaplugin.url);
+		copy(sa.keep, true);
+		copy(sa.align, lefttop);
+		set(sa.direction, v);
+		set(sa.enabled, false);
+		set(sa.width, 100%);
+		set(sa.height, 100%);
+		copy(cb.scrollarea, sa);
+
+		calc(mkname, 'combobox_' + cbname + '_marker');
+		addlayer(get(mkname));
+		copy(mk, global.layer[get(mkname)]);
+		copy(mk.parent, saname);
+		copy(mk.keep, true);
+		mk.loadstyle(combobox_marker_style);
+		copyattributes(get(mk), get(cb.cbdesign.style[combobox_marker_style]));
+		copy(cb.marker, mk);
+
+		<!-- item data array -->
+		cb.createarray('item');
+
+		<!-- item autosizing information -->
+		set(cb.autosize_i, 0);
+		set(cb.autosize_cnt, 0);
+		set(cb.autosize_max_w, 0);
+		set(cb.autosize_max_h, 0);
+
+		set(cb.lastselecteditemindex, 0);
+		set(cb.selecteditemindex, 0);
+	</action>
+
+
+	<!-- dynamically remove a combobox element -->
+	<action name="removeComboboxLayer" scope="localonly" args="cbname">
+		if(global.layer[get(cbname)],
+			copy(cb, global.layer[get(cbname)]);
+			if(cb === global.openedcombobox, delete(global.openedcombobox));
+			if(cb,
+				removelayer(get(cbname), true);
+			);
+		);
+	</action>
+
+
+	<!-- default onclick event for combobox elements: open the list -->
+	<action name="combobox_onclick_event">
+		combobox_openlist(get(name));
+	</action>
+
+
+	<!-- dynamically add items -->
+	<action name="combobox_additem" scope="localonly" args="cbname, itemname, itemcaption, itemonclick, itemoninit">
+		copy(cb, global.layer[get(cbname)]);
+		
+		<!-- when no item name is set, generate an automatic one -->
+		if(itemname === null, calc(itemname, 'autoname_' + cb.item.count); );
+		
+		<!-- save the item caption and onclick event -->
+		copy(cb.item[get(itemname)].caption, itemcaption);
+		copy(cb.item[get(itemname)].onclick, itemonclick);
+
+		inc(cb.autosize_cnt);
+
+		<!-- create the item layer/textfield -->
+		calc(itemlayername, 'comboboxitem_' + cbname + '_' + itemname);
+		addlayer(get(itemlayername));
+		copy(li, global.layer[get(itemlayername)]);
+		li.loadstyle(combobox_item_style);
+		copyattributes(get(li), get(cb.cbdesign.style[combobox_item_style]));
+		copy(li.parent, cb.scrollarea.name);
+		copy(li.keep, true);
+		copy(li.cblayername, cb.name);
+		copy(li.itemname, itemname);
+		copy(li.html, itemcaption);
+		set(li.onautosized, delayedcall(0,combobox_item_autosize_update()) );
+		set(li.onclick, combobox_item_onclick() );
+		if (isset(itemoninit), callwith(li, itemoninit));
+
+		copy(cb.item[get(itemname)].itemlayername, itemlayername);
+		copy(cb.item[get(itemname)].itemlayer, li);
+	</action>
+
+
+	<!-- onautosized callback from the item textfield -->
+	<action name="combobox_item_autosize_update" scope="localonly">
+		copy(cb, global.layer[get(caller.cblayername)]);
+		inc(cb.autosize_i);
+		Math.max(cb.autosize_max_w, caller.width);
+		Math.max(cb.autosize_max_h, caller.height);
+		if(cb.autosize_i == cb.autosize_cnt, combobox_align_items(get(cb.name)); );
+	</action>
+
+
+	<!-- align the image and set the combobox size -->
+	<action name="combobox_align_items" scope="localonly" args="cbname">
+		copy(cb, global.layer[get(cbname)]);
+		if(cb.marker.havemarkersize == false OR cb.scrollarea.loaded == false,
+			<!-- wait until everything is ready -->
+			delayedcall(calc(cb.name + '_waitformarkersize'), 0.01, combobox_align_items(get(cbname)) );
+		  ,
+			<!-- set the item positions and the combobox size -->
+			if(global.openedcombobox === cb, combobox_closelist() );
+			copy(sa, cb.scrollarea);
+			calc(itemwidth, cb.margin GT 0 ? -2 * cb.margin : '100%');
+			copy(mk_w, cb.marker.width);
+			copy(item_cnt, cb.autosize_cnt);
+
+			for(def(item_i, integer, 0), item_i LT item_cnt, inc(item_i),
+				copy(li, global.layer[get(cb.item[get(item_i)].itemlayername)]);
+				set(li.x, get(cb.margin));
+				copy(li.width, itemwidth);
+				copy(li.height, cb.autosize_max_h);
+				calc(li.y, cb.margin + item_i * (cb.autosize_max_h + cb.margin));
+			);
+
+			if(cb.width == null OR cb.width == cb.lastautosizedwidth,
+				<!-- no combobox width (or an autosized width) set - set the largest item width -->
+				calc(cb.width, cb.margin + cb.autosize_max_w + 2 + mk_w + cb.margin);
+				copy(cb.lastautosizedwidth, cb.width);
+			);
+
+			calc(cb.height, 2*cb.margin + cb.autosize_max_h);
+			calc(sa.height, cb.margin + item_cnt*(cb.margin+cb.autosize_max_h));
+			calc(sa.y, -(cb.selecteditemindex * (cb.autosize_max_h + cb.margin)));
+			calc(cb.marker.x, cb.margin + mk_w/2);
+			tween(global.layer[get(cb.name)].marker.y, calc(cb.margin + cb.selecteditemindex*(cb.autosize_max_h + cb.margin) + cb.autosize_max_h/2), 0.1);
+
+			<!-- when all is done, show the combobox -->
+			delayedcall(0.1, set(global.layer[get(cb.name)].visible,true); );
+		);
+	</action>
+
+
+	<!-- helper action for calling a plugin event-code with 'global' and 'caller' scope -->
+	<action name="combobox_do_event_call" scope="local" args="cb, eventcode">
+		if(eventcode !== null, callwith(cb, get(eventcode) ); );
+	</action>
+	
+
+	<!-- default onclick event for items: select the current item, close the list and call the item onclick event -->
+	<action name="combobox_item_onclick" scope="localonly">
+		copy(cb, global.layer[get(caller.cblayername)]);
+		copy(itemname, caller.itemname);
+		combobox_selectitem(get(cb.name), get(itemname));
+
+		if(global.openedcombobox === cb, combobox_closelist() );
+
+		if(cb.item[get(itemname)].onclick,
+			if(cb.callonclickafterclose === false,
+				<!-- call instantly -->
+				combobox_do_event_call(get(cb), get(cb.item[get(itemname)].onclick));
+			  ,
+				<!-- call the onclick event after the combobox has closed -->
+				delayedcall(get(cb.open_close_speed),
+					copy(cb.curitem, cb.item[get(itemname)]);
+					combobox_do_event_call(get(cb), get(cb.item[get(itemname)].onclick));
+				);
+			);
+		);
+	</action>
+
+
+	<!-- select an item -->
+	<action name="combobox_selectitem" scope="localonly" args="cbname, itemname">
+		if(global.combbox_item_pressed != true,
+			copy(cb, global.layer[get(cbname)]);
+			copy(cb.lastselecteditemindex, cb.selecteditemindex);
+			copy(cb.selecteditemindex, cb.item[get(itemname)].index);
+			<!-- call onchange event on selection change -->
+			if(cb.lastselecteditemindex != cb.selecteditemindex AND cb.onchange,
+				combobox_do_event_call(get(cb), get(cb.onchange));
+			);
+			if(global.openedcombobox === cb,
+				<!-- when opened, just close to the selected item -->
+				combobox_closelist();
+			  ,
+				if(global.layer[get(cbname)].scrollarea.loaded,
+					global.layer[get(cbname)].scrollarea.stopscrolling();
+					calc(offset, cb.selecteditemindex*(cb.autosize_max_h + cb.margin));
+					tween(global.layer[get(cbname)].marker.y, calc(cb.margin + offset + cb.autosize_max_h/2), 0);
+					tween(global.layer[get(cbname)].scrollarea.y, calc(-offset), 0, default, global.layer[get(cbname)].scrollarea.update(); );
+				);
+			);
+		);
+	</action>
+
+
+	<!-- find an item by its caption, the global variable defined in 'returnvariable' will contain the index  -->
+	<action name="combobox_finditem" scope="localonly" args="cbname, itemcaption, returnvariable">
+		copy(cb, global.layer[get(cbname)]);
+		copy(item_cnt, cb.item.count);
+		set(calc('global.' + returnvariable), -1);
+		for(def(item_i, integer, 0), item_i LT  item_cnt, inc(item_i),
+			if(cb.item[get(item_i)].caption == itemcaption,
+				copy(calc('global.' + returnvariable), item_i);
+				copy(item_i, item_cnt);
+			);
+		);
+	</action>
+
+
+	<!-- remove all items (to be able to add new ones) -->
+	<action name="combobox_removeitems" scope="localonly" args="cbname">
+		copy(cb, global.layer[get(cbname)]);
+		if(global.openedcombobox === cb, combobox_closelist() );
+
+		<!-- remove all item layers -->
+		calc(item_i, cb.item.count - 1);
+		loop(item_i GE 0,
+			removelayer(get(cb.item[get(item_i)].itemlayername));
+			dec(item_i);
+		);
+
+		<!-- reset the item information -->
+		set(cb.item.count, 0);
+		set(cb.autosize_i,0);
+		set(cb.autosize_cnt, 0);
+		set(cb.autosize_max_w, 0);
+		set(cb.autosize_max_h, 0);
+		set(cb.selecteditemindex, 0);
+		set(cb.lastselecteditemindex, 0);
+		if(cb.width == cb.lastautosizedwidth, set(cb.width, null));
+	</action>
+
+
+	<!-- open the combobox list -->
+	<action name="combobox_openlist" scope="localonly" args="cbname">
+		<!-- if another combobox is already open, close that one first -->
+		if(global.openedcombobox !== null, combobox_closelist() );
+
+		copy(cb, global.layer[get(cbname)]);
+		copy(global.openedcombobox, cb);
+		
+		<!-- move to top -->
+		copy(cb.backupzorder, cb.zorder);
+		set(cb.zorder, 999);
+
+		<!-- find the available screen space above or below the combobox -->
+		calc(cbheight, 2*cb.margin + cb.autosize_max_h);
+		set(lx1, 0);
+		set(ly1, 0);
+		copy(lx2, cb.pixelwidth);
+		copy(ly2, cbheight);
+		layertoscreen(get(cbname), lx1,ly1, lx1,ly1);
+		layertoscreen(get(cbname), lx2,ly2, lx2,ly2);
+		calc(space_above, ly1 - global.area.pixely);
+		calc(space_below, global.area.pixelheight - (ly2 - global.area.pixely));
+
+		<!-- the required space for full opening: -->
+		calc(openheight, cb.margin + cb.autosize_cnt*(cb.margin+cb.autosize_max_h) );
+
+		<!-- vertical centered alignment? -->
+		calc(cb_edge, cb.edge ? cb.edge : cb.align);
+		calc(iscentered, cb_edge == 'left' OR cb_edge == 'center' OR cb_edge == 'right');
+		if(iscentered,
+			calc(openheight_max, space_above + space_below);
+		  ,
+			Math.max(openheight_max, space_above, space_below);
+		);
+
+		<!-- limit the height to the available space (minus some margin) -->
+		Math.min(openheight, calc(openheight_max + cbheight - 20));
+
+		<!-- need vertical offset? (depending on the available space and the align/edge setting) -->
+		set(yoffset, null);
+		calc(top_overflow, -ly1 + global.area.pixely + openheight/2);
+		calc(bottom_overflow, ly2 - global.area.pixely + openheight/2 - global.area.pixelheight);
+		if(cb.parent,
+			<!-- no vertical offset inside other layers, do only a height clipping -->
+			Math.max(max_overflow, top_overflow, bottom_overflow, 0);
+			sub(openheight, max_overflow);
+		  ,
+			if(iscentered,
+				if(openheight GE (global.area.pixelheight - 20),
+					set(yoffset,0);
+				  ,
+					if(top_overflow GT 0, calc(yoffset, cb.y + top_overflow); );
+					if(bottom_overflow GT 0, calc(yoffset, cb.y - bottom_overflow); );
+				);
+			,
+				indexoftxt(isbottomalign, get(cb_edge), 'bottom');
+				if(space_above GT space_below,
+					if(isbottomalign LT 0, calc(yoffset, cb.y - openheight + cbheight); );
+				  ,
+					if(isbottomalign GE 0, calc(yoffset, cb.y - openheight + cbheight); );
+				);
+			);
+		);
+		if(yoffset != null,
+			copy(cb.ybackup, cb.y);
+			tween(global.layer[get(cbname)].y, calc(yoffset), get(cb.open_close_speed));
+		);
+
+		<!-- center the opened list at the selected item -->
+		calc(centeritem_y, -1 * (cb.margin + cb.selecteditemindex*(cb.margin+cb.autosize_max_h) + cb.autosize_max_h/2 - openheight/2));
+		clamp(centeritem_y, calc(openheight - cb.scrollarea.height), 0);
+
+		<!-- apply the changes now -->
+		tween(global.layer[get(cbname)].height, get(openheight), get(cb.open_close_speed));
+		tween(global.layer[get(cbname)].scrollarea.y, get(centeritem_y), get(cb.open_close_speed), default, global.layer[get(cbname)].scrollarea.update(); );
+
+		<!-- special html5/flash case:
+			 rotating textfields (the marker symbol here) are not possible in
+			 flash (a flashplayer limitation), so use a rotated symbol instead.
+		-->
+		if(global.device.html5,
+			tween(global.layer[get(cbname)].marker.rotate, 90, get(cb.open_close_speed));
+		  ,
+			set(global.layer[get(cbname)].marker.html, '◀');
+		);
+
+		<!-- enable the scrollarea to allow the user to drag it -->
+		set(cb.scrollarea.enabled, true);
+
+		<!-- install a global onmousedown event to close the list when clicking at the pano -->
+		set(global.events[combobox_xml_plugin_events].onmousedown, combobox_closelist() );
+	</action>
+
+
+	<!-- close the current open list -->
+	<action name="combobox_closelist" scope="localonly">
+		if(global.openedcombobox !== null,
+			copy(cb, global.openedcombobox);
+			delete(global.openedcombobox);
+			
+			<!-- restore zorder -->
+			copy(cb.zorder, cb.backupzorder);
+			
+			<!-- clear the global onmousedown event -->
+			set(global.events[combobox_xml_plugin_events].onmousedown, null);
+
+			<!-- disable the dragging -->
+			set(cb.scrollarea.enabled, false);
+
+			<!-- closing animations -->
+			calc(offset, cb.selecteditemindex*(cb.autosize_max_h + cb.margin));
+			if(cb.ybackup !== null, tween(cb.y, get(cb.ybackup), get(cb.open_close_speed)));
+			global.layer[get(cb.name)].scrollarea.stopscrolling();
+			tween(global.layer[get(cb.name)].height, calc(2*cb.margin + cb.autosize_max_h), get(cb.open_close_speed));
+			tween(global.layer[get(cb.name)].scrollarea.y, calc(-offset), get(cb.open_close_speed), default, global.layer[get(cb.name)].scrollarea.update(); );
+			tween(global.layer[get(cb.name)].marker.y, calc(cb.margin + offset + cb.autosize_max_h/2), get(cb.open_close_speed));
+			<!-- special html5/flash case: rotate marker or change symbol -->
+			if(global.device.html5,
+				tween(global.layer[get(cb.name)].marker.rotate, 0, get(cb.open_close_speed));
+			  ,
+				set(global.layer[get(cb.name)].marker.html, '▼');
+			);
+		);
+	</action>
+
+</krpano>

+ 48 - 0
plugins/doubleclick_style.xml

@@ -0,0 +1,48 @@
+<krpano>
+	
+	<!--
+		doubleclick_style.xml
+		krpano 1.20
+	
+		A helper style for single/double click detection for layer and hotspot elements.
+		
+		Example:
+		
+		<layer ...
+		       style="doubleclick"
+		       onsingleclick="trace('-single click-');"
+		       ondoubleclick="trace('-double click-');"
+		       />
+	-->
+	
+	<style name="doubleclick"
+	       downx="0"
+	       downy="0"
+	       clicks="0"
+	       onsingleclick=""
+	       ondoubleclick=""
+	       onclick="doubleclick_style_onclick();"
+	       />
+
+	<action name="doubleclick_style_onclick">
+	    inc(clicks);
+	    if(clicks == 2,
+	        set(clicks,0); 
+	        stopdelayedcall(doubleclickdetector);
+	        if((((mouse.x-downx)^2 + (mouse.y-downy)^2)^0.5) LT (device.touch ? 10 : 2),
+	            ondoubleclick();
+	          ,
+	            onsingleclick();
+	            onsingleclick();
+	        );
+	      ,
+	        copy(downx, mouse.x); 
+	        copy(downy, mouse.y);
+	        delayedcall(doubleclickdetector, 0.3, 
+	            set(clicks,0); 
+	            onsingleclick();
+	        );
+	    );
+	</action>
+	
+</krpano>

+ 28 - 0
plugins/fps.xml

@@ -0,0 +1,28 @@
+<krpano>
+
+	<!--
+		fps (frames per second) xml plugin
+		- this plugin shows the current average rendering frame-rate
+	-->
+
+	<action name="fps_install" autorun="preinit" scope="local">
+		delayedcall(0.5,
+			addlayer(fps_display);
+			set(layer[fps_display],
+				type=text,
+				keep=true,
+				align='lefttop',
+				css=calc('font-size:'+(device.mobile AND stagescale LT 1.0 ? 24 : 12)+'px; color:#FFFFFF;'),
+				txtshadow='0 0 1 0x000000 1.0',
+				bg=false,
+				parent=STAGE,
+				vr=true,
+				enabled=false
+			);
+			setinterval(fps_plugin, 0.5,
+				calc(layer[fps_display].html, 'FPS: ' + ((display.currentfps+0.5) BOR 0));
+			);
+		);
+	</action>
+
+</krpano>

文件差异内容过多而无法显示
+ 5 - 0
plugins/googlemaps.js


文件差异内容过多而无法显示
+ 5 - 0
plugins/gyro2.js


文件差异内容过多而无法显示
+ 5 - 0
plugins/pp_blur.js


文件差异内容过多而无法显示
+ 5 - 0
plugins/pp_light.js


文件差异内容过多而无法显示
+ 5 - 0
plugins/pp_sharpen.js


文件差异内容过多而无法显示
+ 19 - 0
plugins/scrollarea.js


二进制
plugins/scrollarea.swf


+ 214 - 0
plugins/showtext.xml

@@ -0,0 +1,214 @@
+<krpano>
+	<!--
+		showtext() xml plugin
+		- showtext() and <textstyle> support for HTML5
+		- extended <textstyle> functionality compared to the build-in showtext() action
+		- just include this xml file via: <include url="showtext.xml" />
+		- docu: https://krpano.com/plugins/showtext/
+		- krpano 1.20
+	-->
+
+
+	<!-- predefine a DEFAULT textstyle element -->
+	<textstyle name="DEFAULT" />
+	
+	
+
+
+	<!-- the automatic running (autorun=preinit) install action -->
+	<action name="showtext_install" autorun="preinit" scope="private:showtext">
+		<!-- remove the build-in 'showtext' function to use the 'showtext' <action> instead: -->
+		delete(global.showtext);
+
+		<!-- initialize internal variables -->
+		set(showtext_style, DEFAULT);
+		set(showtext_prevstyle, null);
+		set(showtext_text, '');
+		set(showtext_prevtext, '');
+		set(showtext_timeout, 0.1);
+		set(showtext_fadeout, 0.0);
+		set(showtext_clipping, false);
+	</action>
+	
+
+	<action name="showtext" scope="private:showtext" args="text, style">
+		if(!style, set(style, DEFAULT));
+		
+		if(global.textstyle[get(style)], 
+			copy(showtext_style, style);
+		  ,
+			warning("showtext() - there is no textstyle '", style, "' defined!");
+			global.textstyle.createarrayitem(get(style));
+		);
+
+		copy(showtext_text, text);
+		
+		if(showtext_text != showtext_prevtext,
+			copy(showtext_prevtext, showtext_text);
+			showtext_createnewtext();
+		  ,
+			delayedcall(showtext_timer, get(showtext_timeout), showtext_hide() );
+		  );
+	</action>
+	
+
+	<action name="showtext_createnewtext" scope="private:showtext">
+		<!-- stop running mouse and alpha update calls -->
+		stopdelayedcall(showtext_mouseupdates);
+		stoptween(global.layer[showtext_tf].alpha);
+
+		<!-- remove the old textfield when the style has changed -->
+		if(showtext_style != showtext_prevstyle,
+			copy(showtext_prevstyle, showtext_style);
+			removelayer(showtext_tf);
+		  );
+		  
+		<!-- create a new textfield plugin layer -->
+		addlayer(showtext_tf);
+
+		<!-- create 'shortcut' variables (tf,ts) for faster access -->
+		copy(tf, global.layer[showtext_tf]);
+		copy(ts, global.textstyle[get(showtext_style)]);
+
+		<!-- get the position settings -->
+		if(ts.origin  !== null, copy(ts_origin,  ts.origin),  set(ts_origin, 'cursor'));
+		if(ts.edge    !== null, copy(ts_edge,    ts.edge),    set(ts_edge, 'bottom'));
+		if(ts.xoffset !== null, copy(ts_xoffset, ts.xoffset), set(ts_xoffset, 0));
+		if(ts.yoffset !== null, copy(ts_yoffset, ts.yoffset), set(ts_yoffset, -3));
+
+		<!-- set the position settings -->
+		if(ts_origin == 'cursor',
+			set(tf.align, 'lefttop');
+			showtext_movetomouse();
+		  ,
+			copy(tf.align, ts_origin);
+		  );
+		copy(tf.edge, ts_edge);
+		copy(tf.ox, ts_xoffset);
+		copy(tf.oy, ts_yoffset);
+
+		<!-- get the font settings -->
+		if(ts.font      !== null, copy(ts_font,      ts.font),      set(ts_font, 'Times'));
+		if(ts.fontsize  !== null, copy(ts_fontsize,  ts.fontsize),  set(ts_fontsize, 12.0));
+		if(ts.bold      !== null, copy(ts_bold,      ts.bold),      set(ts_bold, true));
+		if(ts.italic    !== null, copy(ts_italic,    ts.italic),    set(ts_italic, false));
+		if(ts.textcolor !== null, copy(ts_textcolor, ts.textcolor), set(ts_textcolor, 0x000000));
+		if(ts.textalign !== null, copy(ts_textalign, ts.textalign), set(ts_textalign, 'left'));
+
+		<!-- use the font settings to build the CSS style -->
+		set(tf_css, '');
+		tohex(ts_textcolor, '#', 6);
+		txtadd(tf_css, 'font-family:',get(ts_font),'; font-size:',get(ts_fontsize),'px; color:',get(ts_textcolor),'; ');
+		if(ts_textalign != 'none', txtadd(tf_css, get(tf_css), 'text-align:',get(ts_textalign),'; '));
+		if(ts_bold,   txtadd(tf_css, 'font-weight:bold; '));
+		if(ts_italic, txtadd(tf_css, 'font-style:italic; '));
+		if(ts.css !== null, txtadd(tf_css, get(ts.css)));
+		copy(tf.css, tf_css);
+
+		<!-- size settings -->
+		if(ts.width   !== null AND ts.width   !== '', copy(tf.width,   ts.width));
+		if(ts.height  !== null AND ts.height  !== '', copy(tf.height,  ts.height));
+		if(ts.vcenter !== null AND ts.vcenter !== '', copy(tf.vcenter, ts.vcenter));
+		if(ts.padding !== null AND ts.padding !== '', copy(tf.padding, ts.padding), set(tf.padding,1));
+
+		<!-- background, border, shadow settings -->
+		if(ts.background      !== null, copy(tf.background,      ts.background));
+		if(ts.backgroundcolor !== null, copy(tf.backgroundcolor, ts.backgroundcolor));
+		if(ts.backgroundalpha !== null, copy(tf.backgroundalpha, ts.backgroundalpha));
+		if(ts.border          !== null, copy(tf.border,          ts.border), set(tf.border,true));
+		if(ts.bordercolor     !== null, copy(tf.bordercolor,     ts.bordercolor));
+		if(ts.borderalpha     !== null, copy(tf.borderalpha,     ts.borderalpha));
+		if(ts.borderwidth     !== null, copy(tf.borderwidth,     ts.borderwidth));
+		if(ts.roundedge       !== null, copy(tf.roundedge,       ts.roundedge));
+		if(ts.shadow          !== null, copy(tf.shadow,          ts.shadow));
+		if(ts.shadowrange     !== null, copy(tf.shadowrange,     ts.shadowrange));
+		if(ts.shadowangle     !== null, copy(tf.shadowangle,     ts.shadowangle));
+		if(ts.shadowcolor     !== null, copy(tf.shadowcolor,     ts.shadowcolor));
+		if(ts.shadowalpha     !== null, copy(tf.shadowalpha,     ts.shadowalpha));
+		if(ts.textshadow      !== null, copy(tf.textshadow,      ts.textshadow));
+		if(ts.textshadowrange !== null, copy(tf.textshadowrange, ts.textshadowrange));
+		if(ts.textshadowangle !== null, copy(tf.textshadowangle, ts.textshadowangle));
+		if(ts.textshadowcolor !== null, copy(tf.textshadowcolor, ts.textshadowcolor));
+		if(ts.textshadowalpha !== null, copy(tf.textshadowalpha, ts.textshadowalpha));
+
+		<!-- showing settings -->
+		if(ts.alpha      !== null, copy(ts_alpha,      ts.alpha),      set(ts_alpha, 1.0));
+		if(ts.showtime   !== null, copy(ts_showtime,   ts.showtime),   set(ts_showtime, 0.1));
+		if(ts.fadetime   !== null, copy(ts_fadetime,   ts.fadetime),   set(ts_fadetime, 0.0));
+		if(ts.fadeintime !== null, copy(ts_fadeintime, ts.fadeintime), set(ts_fadeintime, 0.0));
+		copy(showtext_timeout, ts_showtime);
+		copy(showtext_fadeout, ts_fadetime);
+		if(ts_fadeintime GT 0,
+			set(tf.alpha, 0.0);
+			tween(global.layer[showtext_tf].alpha, get(ts_alpha), get(ts_fadeintime), linear);
+		  ,
+			copy(tf.alpha, ts_alpha);
+		  );
+
+		if(ts.noclip !== null, copy(showtext_clipping,ts.noclip), set(showtext_clipping, true));
+		
+		if(showtext_clipping,
+			set(tf.onloaded,    showtext_do_clipping() );
+			set(tf.onautosized, showtext_do_clipping() );
+		  );
+
+		<!-- special flash-only settings -->
+		if(ts.embeddedfonts !== null, copy(tf.embeddedfonts, ts.embeddedfonts));
+		if(ts.effect        !== null, copy(tf.effect,        ts.effect));
+		if(ts.blendmode     !== null, copy(tf.blendmode,     ts.blendmode));
+
+		<!-- set the text and the basic settings to start showing the textfield -->
+		copy(tf.html, showtext_text);
+		set(tf.enabled, false);
+		set(tf.zorder, 999999);
+		if(ts.parent, copy(tf.parent, ts.parent) );
+		set(tf.type, 'text');
+
+		<!-- start the text-hiding timer -->
+		delayedcall(showtext_timer, get(showtext_timeout), showtext_hide() );
+	</action>
+
+
+	<action name="showtext_do_clipping" scope="private:showtext">
+		if(showtext_clipping,
+			global.layer[showtext_tf].updatepos();
+			copy(tf_px, global.layer[showtext_tf].pixelx);
+			copy(tf_py, global.layer[showtext_tf].pixely);
+			if(tf_px LT 0,
+				sub(global.layer[showtext_tf].x, tf_px);
+			  ,
+				add(tf_rightedge, tf_px, global.layer[showtext_tf].pixelwidth);
+				if(tf_rightedge GE global.stagewidth, sub(tf_rightedge,global.stagewidth); sub(global.layer[showtext_tf].x,tf_rightedge); );
+			  );
+			if(tf_py LT 0,
+				sub(global.layer[showtext_tf].y,  tf_py);
+			  ,
+				add(tf_bottomedge, tf_py, global.layer[showtext_tf].pixelheight);
+				if(tf_bottomedge GE global.stageheight, sub(tf_bottomedge,global.stageheight); sub(global.layer[showtext_tf].y,tf_bottomedge); );
+			  );
+		  );
+	</action>
+
+
+	<action name="showtext_movetomouse" scope="private:showtext">
+		copy(global.layer[showtext_tf].x, global.mouse.stagex);
+		copy(global.layer[showtext_tf].y, global.mouse.stagey);
+
+		showtext_do_clipping();
+
+		delayedcall(showtext_mouseupdates, 0, showtext_movetomouse() );
+	</action>
+
+
+	<action name="showtext_hide" scope="private:showtext">
+		if(global.layer[showtext_tf],
+			tween(global.layer[showtext_tf].alpha, 0.0, get(showtext_fadeout), linear,
+					stopdelayedcall(showtext_mouseupdates);
+					removelayer(showtext_tf);
+					set(showtext_text, '');
+					set(showtext_prevtext, '');
+				);
+		  );
+	</action>
+
+</krpano>

文件差异内容过多而无法显示
+ 5 - 0
plugins/soundinterface.js


二进制
plugins/soundinterface.swf


文件差异内容过多而无法显示
+ 5 - 0
plugins/videoplayer.js


二进制
plugins/videoplayer.swf


文件差异内容过多而无法显示
+ 5 - 0
plugins/webvr.js


+ 923 - 0
plugins/webvr.xml

@@ -0,0 +1,923 @@
+<krpano>
+	<!--
+		webvr.xml
+		- krpano 1.20.9
+		
+		https://krpano.com/plugins/webvr/
+	-->
+
+	<!-- load the WebVR plugin and assign it to a global 'webvr' variable -->
+	<plugin name="webvr" devices="html5" keep="true"
+	        url="webvr.js"
+	        mobilevr_support="true"
+	        mobilevr_touch_support="true"
+	        mobilevr_fake_support="true"
+	        mobilevr_profile.normal="90|60|42|0|0|0"
+	        mobilevr_profile.mobile="80|60|42|35|0.441|0.156"
+	        mobilevr_wakelock="true"
+	        fullscreen_mirroring="false"
+	        mouse_pointerlock="true"
+	        vr_cursor_onover="if(handcursor, tween(hotspot[vr_cursor].scale,0.4,0.1); vr_auto_click(get(vr_timeout)); );"
+	        vr_cursor_onout="tween(hotspot[vr_cursor].scale,0.3,0.1);"
+	        onavailable="webvr_onavailable();"
+	        onunavailable=""
+	        onunknowndevice="webvr_onunknowndevice();"
+	        onvrcontrollers="webvr_onvrcontrollers();"
+	        onentervr="webvr_onentervr();"
+	        onexitvr="webvr_onexitvr();"
+	        />
+
+
+
+	<!-- the VR cursor hotspot -->
+	<style name="vr_cursor_style" 
+		url="webvr_vrcursor.png"
+		visible="false"
+		enabled="false"
+		distorted="true"
+		crop="0|0|80|80"
+		scale="0.3"
+		depth="120"
+		/>
+	
+	<action name="webvr_load_vr_cursor_hs" scope="local">
+		addhotspot('vr_cursor', hs);
+		hs.loadstyle(vr_cursor_style);
+		set(hs.keep, true);
+		set(webvr.vr_cursor, 'hotspot[vr_cursor]');
+	</action>
+	
+	<action name="webvr_load_vr_controller_hs" scope="private:VRCONTROLLERS" args="controllerstyle">
+		removehotspot('vr_controller_l');
+		removehotspot('vr_controller_r');
+		addhotspot('vr_controller_l', vr_ctrl_l);
+		addhotspot('vr_controller_r', vr_ctrl_r);
+		set(vr_ctrl_l.keep, true);
+		set(vr_ctrl_r.keep, true);
+		vr_ctrl_l.loadstyle(calc(controllerstyle ? controllerstyle : 'vrcontroller_light_and_point'));
+		vr_ctrl_r.loadstyle(calc(controllerstyle ? controllerstyle : 'vrcontroller_light_and_point'));
+
+		<!-- optional: vibrate the controllers on hovering:
+		vr_ctrl_l.addevent('onover', pulse(1.0, 0.25) );
+		vr_ctrl_r.addevent('onover', pulse(1.0, 0.25) ); -->
+		if(!global.webvr.iswebxr,
+			vr_ctrl_l.addevent('onvrcontrollerbutton', 'if(vrbuttonindex == 3 AND vrbuttonstate == "up", vrsetup_open(); );' );
+			vr_ctrl_r.addevent('onvrcontrollerbutton', 'if(vrbuttonindex == 3 AND vrbuttonstate == "up", vrsetup_open(); );' );
+		);
+		
+		set(global.webvr.vr_controller, 'vr_controller_l,vr_controller_r');
+		set(global.have_vr_controllers, true);
+		
+		if(global.webvr.isvrbrowser AND global.webvr.vrcontrollers[0].buttons.length LE 2,
+			<!-- when there are only two buttons on the VR controller (e.g. Oculus Go) use an extra hotspot for the VR-setup -->
+			addhotspot('webvr_vrsetup', vr_setup_hs);
+			vr_setup_hs.loadstyle('webvr_button_style');
+			set(vr_setup_hs, keep=true, ath=0, atv=90, depth=160, zorder=999, torigin=view, html='VR SETUP', oversampling=3, scale=0.2, onclick='vrsetup_open();', onloaded='renderloop( copy(ath,view.hlookat); );');
+		);
+	</action>
+	
+	<action name="webvr_onvrcontrollers" scope="private:VRCONTROLLERS">
+		if(!global.have_vr_controllers, webvr_load_vr_controller_hs(); );
+	</action>
+		
+	<style name="vrcontroller_laser" 
+			url="webvr_laser.png"
+			distorted="true"
+			enabled="false"
+			visible="false"
+			width="0.5" height="1000" edge="bottom" oref="1" oy="0"
+			torigin="world" tx="0" ty="0" tz="0" depth="0"
+			zorder="99999"
+			depthbuffer="true"
+			onloaded="asyncloop(loaded, 
+				calc(height, (target AND target.hitd GT 0 ? target.hitd : 1000) / display.hotspotworldscale); 
+				);"
+			/>
+			
+	<style name="vrcontroller_light_and_point" 
+			url="webvr_light.png"
+			distorted="true"
+			enabled="false"
+			visible="false"
+			width="0.5" height="18" edge="bottom" oref="1" oy="0"
+			torigin="world" tx="0" ty="0" tz="0" depth="0"
+			zorder="99999"
+			depthbuffer="true"
+			onloaded="vrcontroller_target_point();"
+			/>
+	
+	<style name="vrcontroller_handcursor_and_point" 
+			url="webvr_handcursor.png"
+			distorted="true"
+			enabled="false"
+			visible="false"
+			width="10" height="10" edge="center" oref="1" oy="-1"
+			torigin="world" tx="0" ty="0" tz="0" depth="0"
+			zorder="99999"
+			depthbuffer="true"
+			onloaded="vrcontroller_target_point();"
+			/>
+	
+	<action name="vrcontroller_target_point" scope="localonly">
+		addhotspot(auto, hs);
+		set(hs, keep=true, type=text, bgcolor=0xFFFFFF, bgalpha=1.0, width=10, height=10, bgroundedge=5, bgborder='1 0x000000 1.0', oversampling=2,
+			scale=0.4, torigin=world, depth=0, distorted=false, zoom=true, zorder=99998, enabled=false
+		  );
+		renderloop(
+			if(!caller.loaded,
+				removehotspot(get(hs.name));
+				stoprenderloop();
+			  ,
+				if(global.display.havedepthmap,
+					<!-- use the laser for depthmap panos -->
+					removehotspot(get(hs.name));
+					stoprenderloop();
+					webvr_load_vr_controller_hs('vrcontroller_laser');
+				  ,
+					calc(hs.bgcolor, caller.pressed ? 0x049AFF : (caller.hovering ? 0x00FF00 : 0xFFFFFF));
+					calc(distance, (caller.target AND caller.target.hitd GT 0 ? caller.target.hitd : 1000));
+					calc(hs.scale, 0.4 * (distance GT 1000 ? distance / 1000 : (distance LT 200 ? 0.25 : (0.25 + (distance - 200)/800 * 0.75))));
+					calc(hs.tx, caller.tx + caller.dx * distance);
+					calc(hs.ty, caller.ty + caller.dy * distance);
+					calc(hs.tz, caller.tz + caller.dz * distance);
+				);
+			);
+		);
+	</action>
+	
+
+
+
+	<!-- vr_auto_click() - call this action in the onover event of a
+	     hotspot to trigger automatically a click after some time.  -->
+	<action name="vr_auto_click" scope="local" args="vr_aclk_timeout">
+		if(webvr.isenabled,
+			if(vr_aclk_timeout == null, set(vr_aclk_timeout, 2000));
+			copy(vr_aclk_t1, timertick);
+			set(vr_aclk_waiting, true);
+			copy(webvr.vr_aclk_hotspot, caller.name);
+			set(hotspot[vr_cursor].crop,'0|0|80|80');
+
+			asyncloop(vr_aclk_waiting AND webvr.vr_aclk_hotspot == caller.name,
+				sub(dt, timertick, vr_aclk_t1);
+
+				if(!caller.hovering,
+					set(vr_aclk_waiting, false);
+					set(hotspot[vr_cursor].crop,'0|0|80|80');
+				  ,
+					div(f, dt, vr_aclk_timeout);
+					mul(f, 16);
+					roundval(f);
+					Math.min(f, 16);
+					mul(f, 80);
+
+					txtadd(hotspot[vr_cursor].crop,get(f),'|0|80|80');
+
+					<!-- wait another 100ms delay after finishing the animation before doing the click -->
+					sub(dt, 100);
+					if(dt GT vr_aclk_timeout,
+						set(vr_aclk_waiting,false);
+						set(hotspot[vr_cursor].crop,'0|0|80|80');
+						<!-- call onclick -->
+						callwith(caller, scope(global, ondown();onup();onclick(); ); );
+					);
+				);
+			);
+		);
+	</action>
+
+
+	<!-- by pressing SPACE the headset could be re-centered -->
+	<events name="webvr_events" devices="html5" keep="true"
+	        onmousedown="if(webvr AND webvr.isenabled, webvr_showbuttons() );"
+	        />
+
+
+
+	<!-- when WebVR support is available show an EnterVR button -->
+	<action name="webvr_onavailable">
+		webvr.loadsettings();
+		if(layer[webvr_enterbutton], delayedcall(0.5, tween(layer[webvr_enterbutton].alpha,1.0); ); );
+	</action>
+	
+	
+	<action name="webvr_onunknowndevice">
+		if(webvr.isfake AND device.desktop AND webvr.havesettings == false,
+			<!-- set the 'no distortion' headset for fake desktop usage -->
+			set(webvr.mobilevr_lens_overlap, 1.0);
+			set(webvr.mobilevr_lens_fov, 96.0);
+			set(webvr.mobilevr_lens_dist, 0.0);
+			set(webvr.mobilevr_lens_dist2, '1|0|0|0');
+			set(webvr.mobilevr_lens_ca, 0.0);
+			set(webvr.mobilevr_lens_vign, 100);
+		  );
+	</action>
+
+
+	<action name="webvr_onentervr">
+		if(layer[webvr_enterbutton], tween(layer[webvr_enterbutton].alpha,0,0); );
+
+		webvr_showbuttons();
+		webvr_hide_all_non_vr_layers();
+
+		if(webvr.isfake, webvr_show_fakemode_info(true); );
+		
+		webvr_load_vr_cursor_hs();
+	</action>
+
+
+	<action name="webvr_onexitvr">
+		removehotspot('vr_cursor');
+		removehotspot('vr_controller_l');
+		removehotspot('vr_controller_r');
+		set(have_vr_controllers, false);
+		
+		stopdelayedcall(vr_button_fadeout);
+
+		if(layer[webvr_enterbutton], tween(layer[webvr_enterbutton].alpha,1); );
+		tween(layer[webvr_exitbutton].alpha,0);
+		tween(layer[webvr_setupbutton].alpha,0);
+		
+		webvr_show_fakemode_info(false);
+
+		webvr_restore_layers();
+	</action>
+
+
+	<action name="webvr_hide_all_non_vr_layers" scope="local">
+		for(set(i,0), i LT layer.count, inc(i),
+			copy(lr, layer[get(i)]);
+			if(lr.vr !== true,
+				copy(lr.vr_backup_visible, lr.visible);
+				set(lr.visible, false);
+			);
+		);
+	</action>
+
+	<action name="webvr_restore_layers" scope="local">
+		for(set(i,0), i LT layer.count, inc(i),
+			copy(lr, layer[get(i)]);
+			if(lr.vr_backup_visible,
+				copy(lr.visible, lr.vr_backup_visible);
+				delete(lr.vr_backup_visible);
+			);
+		);
+	</action>
+	
+	<action name="webvr_show_fakemode_info" scope="local" args="show">
+		if(show == true,
+			addlayer(webvr_fakemode_info);
+			set(layer[webvr_fakemode_info],
+				type='text',
+				keep=true,
+				align='bottom',
+				y=80,
+				bg=false,
+				css='color:#FFFFFF;text-align:center;',
+				html='[i][u]Simulated WebVR Mode![/u][br]For real WebVR with headset tracking use a [a href="http://webvr.info" target="_blank" style="color:#FFFFFF;"]WebVR-capable[/a] browser or a mobile device and a VR headset.[/i]'
+			);
+		  ,
+			removelayer(webvr_fakemode_info);
+		);
+	</action>
+	
+	
+	<!-- ensure the same scaling on mobiles (regardless if mobilescale is 0.5 or 1.0) -->
+	<krpano webvr_setup_scale="calc:(1.0 + 1.0*(device.mobile AND stagescale LT 1.0)) / (1.0 + 1.0*device.mobile)"
+	        webvr_button_scale.normal="1.0"
+	        webvr_button_scale.mobile="1.6"
+	        />
+
+	
+	<!-- the EnterVR/ExitVR and SetupVR buttons -->
+	<style name="webvr_button_style"
+	       type="text"
+	       bgcolor="0x000000"
+	       bgalpha="0.5"
+	       bgroundedge="0"
+	       css="calc:'color:#FFFFFF;font-size:' + 20*webvr_setup_scale*webvr_button_scale + 'px;'"
+	       padding="calc:6*webvr_setup_scale*webvr_button_scale + ' ' + 10*webvr_setup_scale*webvr_button_scale"
+	       />
+	
+	<layer name="webvr_enterbutton" keep="true" vr="true"
+	       style="webvr_button_style"
+	       html="Enter VR"
+	       align="top" y="24"
+	       autoalpha="true" alpha="0.0"
+	       onclick="webvr.enterVR();"
+	       />
+
+	<layer name="webvr_exitbutton" keep="true" vr="true"
+	       style="webvr_button_style"
+	       html="Exit VR"
+	       align="top" y="24"
+	       autoalpha="true" alpha="0.0"
+	       onclick="webvr.exitVR();"
+	       />
+
+	<layer name="webvr_setupbutton" keep="true" vr="true"
+	       style="webvr_button_style"
+	       html="VR Setup"
+	       align="bottom" y="24"
+	       autoalpha="true" alpha="0.0"
+	       onclick="vrsetup_open();"
+	       />
+
+
+	<action name="webvr_showbuttons">
+		stopdelayedcall(vr_button_fadeout);
+		tween(layer[webvr_exitbutton].alpha|layer[webvr_setupbutton].alpha, 1.0|1.0, 0.25);
+		delayedcall(vr_button_fadeout, 3.0, tween(layer[webvr_exitbutton].alpha|layer[webvr_setupbutton].alpha, 0.0|0.0, 1.0); );
+	</action>
+
+	
+		
+	<!-- VR SETUP -->
+	
+	
+	<mobilevr_presets>
+		<headset name="cbv1" caption="Cardboard V1"  profile="80|60|42|35|0.441|0.156" />
+		<headset name="cbv2" caption="Cardboard V2"  profile="120|64|39|35|0.34|0.55" />
+		<headset name="dydm" caption="Daydream"      profile="104|60|41|35|0.42|0.51" />
+		<headset name="nodt" caption="No Distortion" profile="90|60|42|0|0|0" />
+	</mobilevr_presets>
+
+	<action name="vrsetup_open">
+		if(!vrsetup_open_js, vrsetup_init(); );
+		vrsetup_open_js();
+	</action>
+		
+
+	<action name="vrsetup_init" type="Javascript"><![CDATA[
+		
+		var webvr = krpano.webvr;
+		var padding = 20;
+		
+		function vrsetup_dlg_create(type)
+		{
+			var dlg = {type:type, bg:null, y:0, scale:1, elements:[]};
+		
+			if (type == 'layer')
+			{
+				dlg.bg = krpano.addlayer();
+				dlg.bg.keep = true;
+				dlg.bg.type = 'container';
+				dlg.bg.align = 'center';
+			}
+			else	// 'hotspot'
+			{
+				dlg.scale = 0.15;
+				dlg.bg = krpano.addhotspot();
+				dlg.bg.keep = true;
+				dlg.bg.type = 'text';
+				dlg.bg.distorted = true;
+				dlg.bg.ath = krpano.view.hlookat;
+				dlg.bg.atv = 0;
+				dlg.bg.depth = 150;
+				dlg.bg.torigin = 'world';
+				dlg.bg.tx = krpano.view.tx;
+				dlg.bg.ty = krpano.view.ty;
+				dlg.bg.tz = krpano.view.tz;
+			}
+			
+			dlg.bg.bgcolor = 0x000000;
+			dlg.bg.bgalpha = 0.5;
+			dlg.bg.bgcapture = true;
+			dlg.bg.handcursor = false;
+			dlg.bg.capture = false;
+			dlg.bg.zorder = 100;
+			dlg.bg.visible = false;
+			
+			dlg.y = 0;
+			
+			return dlg;
+		}
+		
+		function vrsetup_dlg_addline(dlg, linetext, customcss, onclick)
+		{
+			var txt;
+			
+			if (dlg.type == 'layer')
+			{
+				txt = krpano.addlayer();
+				txt.keep = true;
+				txt.type = 'text';
+				txt.align = 'center';
+				txt.zorder = 101;
+			}
+			else	// 'hotspot'
+			{
+				txt = krpano.addhotspot();
+				txt.keep = true;
+				txt.type = 'text';
+				txt.distorted = true;
+				txt.zorder = 101;
+				txt.ath = dlg.bg.ath;
+				txt.atv = dlg.bg.atv;
+				txt.depth = dlg.bg.depth - 1;
+				txt.oversampling = 2;
+				txt.scale = dlg.scale;
+				txt.torigin = dlg.bg.torigin;
+				txt.tx = dlg.bg.tx;
+				txt.ty = dlg.bg.ty;
+				txt.tz = dlg.bg.tz;
+			}
+			
+			txt.onautosized = function()
+			{
+				txt.havesize = true;
+			}
+			
+			txt.edge = 'top';
+			txt.visible = false;
+			txt.bg = false;
+			txt.html = "" + linetext;
+			txt.css = 'font-size:32px;font-weight:bold;color:#FFFFFF; line-height:90%;' + (customcss || '');
+			
+			if (onclick)
+			{
+				txt.onclick = onclick;
+			}
+			else
+			{
+				txt.enabled = false;
+			}
+			
+			dlg.elements.push( txt );
+			
+			return txt;
+		}
+		
+		function vrsetup_dlg_addctrl(dlg, changedelay, callback)
+		{
+			var txt = vrsetup_dlg_addline(dlg, callback(0) );
+			
+			var inc;
+			var dec;
+			
+			if(dlg.type == 'layer')
+			{
+				inc = krpano.addlayer();
+				inc.keep = true;
+				inc.type = 'text';
+				inc.align = 'center';
+				inc.zorder = 101;
+				
+				dec = krpano.addlayer();
+				dec.keep = true;
+				dec.type = 'text';
+				dec.align = 'center';
+				dec.zorder = 101;
+			}
+			else	// 'hotspot'
+			{
+				inc = krpano.addhotspot();
+				inc.keep = true;
+				inc.type = 'text';
+				inc.distorted = true;
+				inc.zorder = 101;
+				inc.ath = dlg.bg.ath;
+				inc.atv = dlg.bg.atv;
+				inc.depth = dlg.bg.depth - 1;
+				inc.oversampling = 2;
+				inc.scale = dlg.scale;
+				inc.torigin = dlg.bg.torigin;
+				inc.tx = dlg.bg.tx;
+				inc.ty = dlg.bg.ty;
+				inc.tz = dlg.bg.tz;
+				
+				dec = krpano.addhotspot();
+				dec.keep = true;
+				dec.type = 'text';
+				dec.distorted = true;
+				dec.zorder = 101;
+				dec.ath = dlg.bg.ath;
+				dec.atv = dlg.bg.atv;
+				dec.depth = dlg.bg.depth - 1;
+				dec.oversampling = 2;
+				dec.scale = dlg.scale;
+				dec.torigin = dlg.bg.torigin;
+				dec.tx = dlg.bg.tx;
+				dec.ty = dlg.bg.ty;
+				dec.tz = dlg.bg.tz;
+			}
+			
+			inc.edge = 'top';
+			inc.visible = false;
+			inc.bg = false;
+			inc.html = '&#62;';
+			inc.css = 'font-size:32px;font-weight:bold;color:#FFFFFF; line-height:90%;';
+			inc.padding = '0 10';
+					
+			dec.edge = 'top';
+			dec.visible = false;
+			dec.bg = false;
+			dec.html = '&#60;';
+			dec.css = 'font-size:32px;font-weight:bold;color:#FFFFFF; line-height:90%;';
+			dec.padding = '0 10';
+			
+			inc.vr_timeout = changedelay * 1000;
+			dec.vr_timeout = changedelay * 1000;
+			inc.ondown = function(){ txt.html = ""+callback(+1); inc.enabled = false; setTimeout(function(){ inc.enabled = true; },0); };
+			dec.ondown = function(){ txt.html = ""+callback(-1); dec.enabled = false; setTimeout(function(){ dec.enabled = true; },0); };
+			
+			txt.ctrlchilds = [inc,dec];
+			
+			txt.updateControl = function()
+			{
+				txt.html = callback(0);
+			}
+			
+			return txt;
+		}
+		
+		function vrsetup_dlg_addspace(dlg, customspace)
+		{
+			dlg.elements.push(customspace|| padding);
+		}
+		
+		function vrsetup_dlg_finish(dlg)
+		{
+			var i, w=0, h=0;
+			var waitforsizes=false;
+			
+			for (i=0; i < dlg.elements.length; i++)
+			{
+				var e = dlg.elements[i];
+				if ( isNaN(e) )
+				{
+					if ( e.havesize )
+					{
+						w = Math.max( w, e.width * 1);
+						h += e.height * 1;
+					}
+					else
+					{
+						waitforsizes = true;
+						break;
+					}
+				}
+				else
+				{
+					h += e;
+				}
+			}
+			
+			if (waitforsizes)
+			{
+				setTimeout( function(){ vrsetup_dlg_finish(dlg); }, 16 ); 
+			}
+			else
+			{
+				var y = 0;
+				
+				dlg.bg.width = Math.ceil((w + padding*2)*dlg.scale);
+				dlg.bg.height = Math.ceil((h + padding*2)*dlg.scale);
+					
+				for (i=0; i < dlg.elements.length; i++)
+				{
+					var e = dlg.elements[i];
+					if ( isNaN(e) )
+					{
+						e.oy = Math.round((-h/2 + y) * dlg.scale);
+						e.visible = true;
+						
+						y += e.height * 1;
+						
+						if (e.ctrlchilds )
+						{
+							for (var j=0; j < e.ctrlchilds.length; j++)
+							{
+								var sube = e.ctrlchilds[j];
+								sube.ox = Math.round(((j&1)-0.5) * (-w) * dlg.scale);
+								sube.oy = e.oy;
+								sube.visible = true;
+							}
+						}
+					}
+					else
+					{
+						y += e;
+					}
+				}
+				
+				dlg.bg.visible = true;
+			}
+		}
+		
+		function vrsetup_dlg_remove(dlg)
+		{
+			var removefu = dlg.type == 'layer' ? krpano.removelayer : krpano.removehotspot;
+			
+			var i,j;
+			for (i=0; i < dlg.elements.length; i++)
+			{
+				var e = dlg.elements[i];
+				if ( isNaN(e) )
+				{
+					if (e.ctrlchilds )
+					{
+						for (j=0; j < e.ctrlchilds.length; j++)
+						{
+							var sube = e.ctrlchilds[j];
+							removefu(sube.name);
+						}
+					}
+					
+					removefu(e.name);
+				}
+			}
+			
+			removefu(dlg.bg.name);
+		}
+		
+		
+		function vrsetup_webvr_dialog()
+		{
+			// WebVR API rendering
+			var dlg = vrsetup_dlg_create('hotspot');
+			vrsetup_dlg_addline(dlg, 'WebVR Setup');
+			vrsetup_dlg_addspace(dlg);
+			
+			vrsetup_dlg_addline(dlg, 'Oversampling:', 'font-size:16px;')
+			var ctrl_ss = vrsetup_dlg_addctrl(dlg, 1.0, function(change)
+			{
+				var p = webvr.oversampling;
+				
+				if (change < 0) { p = Math.max(0.2, Number(p) - 0.1); webvr.oversampling = p;  } else 
+				if (change > 0) { p = Math.min(4.0, Number(p) + 0.1); webvr.oversampling = p;  }
+				
+				krpano.actions.delayedcall(0.3, function()
+				{
+					renderres.html = webvr.renderwidth + "x" + webvr.renderheight;
+				});
+				
+				return p.toFixed(1);
+			});
+			vrsetup_dlg_addspace(dlg,8);
+			vrsetup_dlg_addline(dlg, 'Rendering Resolution:', 'font-size:16px;');
+			var renderres = vrsetup_dlg_addline(dlg, '');
+			vrsetup_dlg_addspace(dlg);
+			vrsetup_dlg_addline(dlg, 'CLOSE', '', vrsetup_close);
+			vrsetup_dlg_finish(dlg);
+			
+			return dlg;
+		}
+		
+		function vrsetup_mobilevr_dialog()
+		{
+			// MobileVR / Cardboard rendering
+			var dlg = vrsetup_dlg_create(0 ? 'hotspot' : 'layer');
+			vrsetup_dlg_addline(dlg, 'MobileVR SETUP');
+			vrsetup_dlg_addspace(dlg);
+			vrsetup_dlg_addline(dlg, 'Screensize (inch):', 'font-size:16px;')
+			vrsetup_dlg_addctrl(dlg, 1.0, function(change){ var ss = Number(webvr.mobilevr_screensize); if (isNaN(ss)) ss = 5.0; if (change < 0) { ss = Math.max(4.0, ss - 0.1); webvr.mobilevr_screensize = ss; } else if (change > 0) { ss = Math.min(10.0, ss + 0.1); webvr.mobilevr_screensize = ss; } return ss.toFixed(1); });
+			vrsetup_dlg_addspace(dlg);
+			vrsetup_dlg_addline(dlg, 'VR Headset Preset:', 'font-size:16px;')
+			var ctrl_ps = vrsetup_dlg_addctrl(dlg, 1.0, function(change)
+			{
+				var preset_index = -1;
+				var i;
+				
+				var profile = webvr.mobilevr_profile;
+				var presets = krpano.get("mobilevr_presets.headset");
+				if (presets)
+				{
+					presets = presets.getArray();
+					
+					for (i=0; i < presets.length; i++)
+					{
+						if ( profile == presets[i].profile )
+						{
+							preset_index = i;
+							break;
+						}
+					}
+					
+					if (change < 0)
+					{
+						preset_index--;
+						if (preset_index < 0)
+							preset_index = presets.length - 1;
+								
+						webvr.mobilevr_profile = presets[preset_index].profile;
+					}
+					else if (change > 0)
+					{
+						preset_index++;
+						if (preset_index >= presets.length)
+							preset_index = 0;
+						
+						webvr.mobilevr_profile = presets[preset_index].profile;
+					}
+				}
+					
+				if (preset_index >= 0)
+				{
+					return presets[preset_index].caption;
+				}
+				
+				return 'Custom';
+			});
+			vrsetup_dlg_addspace(dlg);
+			vrsetup_dlg_addline(dlg, 'Customize Headset', 'font-size:25px;', function()
+			{
+				vrsetup_dlg_remove(dlg); 
+				dlg=null; 
+				
+				vrsetup_dialog = vrsetup_mobilevr_interactive_dialog();
+				
+			});
+			vrsetup_dlg_addline(dlg, '(Interactive Adjustment in VR)', 'font-size:12px;');
+			vrsetup_dlg_addspace(dlg);
+			vrsetup_dlg_addline(dlg, 'CLOSE', '', vrsetup_close);
+			vrsetup_dlg_finish(dlg);
+			
+			return dlg;
+		}
+		
+		function vrsetup_mobilevr_interactive_dialog()
+		{
+			// MobileVR / Cardboard rendering
+			var ctrl_preset, ctrl_fov, ctrl_ild, ctrl_stl, ctrl_ttl, ctrl_k1, ctrl_k2, ctrl_os;
+			
+			var dlg = vrsetup_dlg_create('hotspot');
+			vrsetup_dlg_addline(dlg, 'MobileVR SETUP');
+			vrsetup_dlg_addspace(dlg);
+			vrsetup_dlg_addline(dlg, 'Preset:', 'font-size:16px;')
+			
+			ctrl_preset = vrsetup_dlg_addctrl(dlg, 1.0, function(change)
+			{
+				var preset_index = -1;
+				var i;
+				
+				var profile = webvr.mobilevr_profile;
+				var presets = krpano.get("mobilevr_presets.headset");
+				if (presets)
+				{
+					presets = presets.getArray();
+					
+					for (i=0; i < presets.length; i++)
+					{
+						if ( profile == presets[i].profile )
+						{
+							preset_index = i;
+							break;
+						}
+					}
+					
+					if (change < 0)
+					{
+						preset_index--;
+						if (preset_index < 0)
+							preset_index = presets.length - 1;
+								
+						webvr.mobilevr_profile = presets[preset_index].profile;
+					}
+					else if (change > 0)
+					{
+						preset_index++;
+						if (preset_index >= presets.length)
+							preset_index = 0;
+						
+						webvr.mobilevr_profile = presets[preset_index].profile;
+					}
+					
+					if (change != 0)
+					{
+						ctrl_fov.updateControl();
+						ctrl_ild.updateControl();
+						ctrl_stl.updateControl();
+						if (ctrl_ttl) ctrl_ttl.updateControl();
+						ctrl_k1.updateControl();
+						ctrl_k2.updateControl();
+					}
+				}
+			
+				if (preset_index >= 0)
+				{
+					return presets[preset_index].caption;
+				}
+				
+				return 'Custom';
+			});
+			
+			vrsetup_dlg_addspace(dlg);
+			vrsetup_dlg_addline(dlg, 'Lens-Field-of-View:', 'font-size:16px;');
+			ctrl_fov = vrsetup_dlg_addctrl(dlg, 0.25, function(change){ var p = webvr.mobilevr_profile.split("|"); if (change < 0) { p[0] = Number(p[0]) - 1.0; webvr.mobilevr_profile = p.join("|"); } else if (change > 0) { p[0] = Number(p[0]) + 1.0; webvr.mobilevr_profile = p.join("|"); } if (change != 0) ctrl_preset.updateControl(); return Number(p[0]).toFixed(0); });
+			vrsetup_dlg_addspace(dlg, 8);
+			vrsetup_dlg_addline(dlg, 'Inter-Lens-Distance (mm):', 'font-size:16px;');
+			ctrl_ild = vrsetup_dlg_addctrl(dlg, 0.25, function(change){ var p = webvr.mobilevr_profile.split("|"); if (change < 0) { p[1] = Number(p[1]) - 1.0; webvr.mobilevr_profile = p.join("|"); } else if (change > 0) { p[1] = Number(p[1]) + 1.0; webvr.mobilevr_profile = p.join("|"); } if (change != 0) ctrl_preset.updateControl(); return Number(p[1]).toFixed(0); });
+			vrsetup_dlg_addspace(dlg, 8);
+			vrsetup_dlg_addline(dlg, 'Screen-to-Lens-Distance (mm):', 'font-size:16px;');
+			ctrl_stl = vrsetup_dlg_addctrl(dlg, 0.25, function(change){ var p = webvr.mobilevr_profile.split("|"); if (change < 0) { p[2] = Number(p[2]) - 1.0; webvr.mobilevr_profile = p.join("|"); } else if (change > 0) { p[2] = Number(p[2]) + 1.0; webvr.mobilevr_profile = p.join("|"); } if (change != 0) ctrl_preset.updateControl(); return Number(p[2]).toFixed(0); });
+			vrsetup_dlg_addspace(dlg, 8);
+			if (!webvr.isfake)
+			{
+				vrsetup_dlg_addline(dlg, 'Tray-to-Lens-Center-Distance: (mm):', 'font-size:16px;');
+				ctrl_ttl = vrsetup_dlg_addctrl(dlg, 0.25, function(change){ var p = webvr.mobilevr_profile.split("|"); if (change < 0) { p[3] = Number(p[3]) - 1.0; webvr.mobilevr_profile = p.join("|"); } else if (change > 0) { p[3] = Number(p[3]) + 1.0; webvr.mobilevr_profile = p.join("|"); } if (change != 0) ctrl_preset.updateControl(); return Number(p[3]).toFixed(0); });
+				vrsetup_dlg_addspace(dlg, 8);
+			}
+			vrsetup_dlg_addline(dlg, 'Lens-Distortion Coefficients:', 'font-size:16px;');
+			ctrl_k1 = vrsetup_dlg_addctrl(dlg, 0.1, function(change){ var p = webvr.mobilevr_profile.split("|"); if (change < 0) { p[4] = Number(p[4]) - 0.01; webvr.mobilevr_profile = p.join("|"); } else if (change > 0) { p[4] = Number(p[4]) + 0.01; webvr.mobilevr_profile = p.join("|"); } if (change != 0) ctrl_preset.updateControl(); return Number(p[4]).toFixed(3); });
+			ctrl_k2 = vrsetup_dlg_addctrl(dlg, 0.1, function(change){ var p = webvr.mobilevr_profile.split("|"); if (change < 0) { p[5] = Number(p[5]) - 0.01; webvr.mobilevr_profile = p.join("|"); } else if (change > 0) { p[5] = Number(p[5]) + 0.01; webvr.mobilevr_profile = p.join("|"); } if (change != 0) ctrl_preset.updateControl(); return Number(p[5]).toFixed(3); });
+			vrsetup_dlg_addspace(dlg);
+			vrsetup_dlg_addline(dlg, 'Oversampling:', 'font-size:16px;');
+			ctrl_os = vrsetup_dlg_addctrl(dlg, 0.25, function(change){ var p = webvr.oversampling; if (change < 0) { p = Math.max(0.2, Number(p) - 0.1); webvr.oversampling = p;  } else if (change > 0) { p = Math.min(4.0, Number(p) + 0.1); webvr.oversampling = p;  } return p.toFixed(1); });
+			vrsetup_dlg_addspace(dlg);
+			vrsetup_dlg_addline(dlg, 'CLOSE', '', vrsetup_close);
+			vrsetup_dlg_finish(dlg);
+			
+			return dlg;
+		}
+		
+		var vrsetup_dialog = null;
+		var vrsetup_events = null;
+		
+		function vrsetup_close()
+		{
+			if (vrsetup_dialog)
+			{
+				webvr.savesettings();
+			
+				vrsetup_dlg_remove(vrsetup_dialog); 
+				vrsetup_dialog = null;
+			}
+		
+			if (vrsetup_events)
+			{
+				krpano.events.removeItem(vrsetup_events.name);
+				vrsetup_events = null;
+			}
+		}
+		
+		krpano.vrsetup_close = function()
+		{
+			vrsetup_close();
+		}
+		
+		krpano.vrsetup_open_js = function()
+		{
+			if (vrsetup_dialog != null)
+			{
+				// already open...
+				return;
+			}
+				
+			if (webvr.iswebvr)
+			{
+				vrsetup_dialog = vrsetup_webvr_dialog();
+			}
+			else
+			{
+				vrsetup_dialog = vrsetup_mobilevr_dialog();
+			}
+			
+			vrsetup_events = krpano.events.createItem("auto");
+			vrsetup_events.keep = true;
+			
+			vrsetup_events.webvr_onexitvr = function()
+			{
+				vrsetup_close();
+			}
+		}
+		
+	]]></action>
+	
+
+	<!-- A list of devices and their screensize -->
+	<mobilevr_device_database>
+		<device name="iPhone 5/5S/SE" screen="320x568x2" size="4.0" bevel="3" />
+		<device name="iPhone 6/6S/7/8" screen="375x667x2" size="4.7" />
+		<device name="iPhone 6/6S/7/8 Plus" screen="414x736" size="5.5" />
+		<device name="iPhone 6/6S/7/8 Plus (zoomed)" screen="375x667x3" size="5.5" />
+		<device name="iPhone X/XS/11Pro" screen="375x812x3" size="5.85|5.33" />
+		<device name="iPhone XS/11Pro Max" screen="414x896x3" size="6.46|5.95" />
+		<device name="iPhone XR/11" screen="414x896x2" size="6.06|5.58" />
+		<device name="iPhone 12/12Pro" screen="390x844" size="6.1" />
+		<device name="iPhone 12Pro Max" screen="428x926" size="6.7" />
+		<device name="Samsung S6" ua="sm-g930" size="5.1" />
+		<device name="Samsung S6 Edge" ua="sm-g925" size="5.1" />
+		<device name="Samsung S6 Edge Plus" ua="sm-g928" size="5.7" />
+		<device name="Samsung S7" ua="sm-g930" size="5.1" />
+		<device name="Samsung S7 Edge" ua="sm-g935" size="5.5" />
+		<device name="Samsung S8" ua="sm-g950" size="5.8" />
+		<device name="Samsung S8+" ua="sm-g955" size="6.2" />
+		<device name="Samsung S9" ua="sm-g960" size="5.8" />
+		<device name="Samsung S9+" ua="sm-g965" size="6.2" />
+		<device name="Samsung S10e" ua="sm-g970" size="5.8" />
+		<device name="Samsung S10" ua="sm-g973" size="6.1" />
+		<device name="Samsung S10+" ua="sm-g975" size="6.4" />
+		<device name="Samsung S10 5G" ua="sm-g977" size="6.7" />
+		<device name="Samsung Note 7" ua="sm-n930" size="5.7" />
+		<device name="Samsung Note 8" ua="sm-n950" size="6.3" />
+		<device name="Samsung Note 9" ua="sm-n960" size="6.4" />
+		<device name="Samsung Note 10" ua="sm-n970" size="6.3" />
+		<device name="Samsung Note 10 5G" ua="sm-n971" size="6.3" />
+		<device name="Samsung Note 10+" ua="sm-n975" size="6.8" />
+		<device name="Samsung Note 10+ 5G" ua="sm-n976" size="6.8" />
+		<device name="Huawei P10 Lite" ua="HUAWEIWAS-TL10" size="5.2" />
+		<device name="Huawei P20 Lite" ua="HUAWEIANE-LX1" size="5.84" />
+	</mobilevr_device_database>
+
+</krpano>

二进制
plugins/webvr_handcursor.png


二进制
plugins/webvr_laser.png


二进制
plugins/webvr_light.png


二进制
plugins/webvr_vrcursor.png


二进制
skin/rotate_device.png


二进制
skin/vtourskin.png


文件差异内容过多而无法显示
+ 1333 - 0
skin/vtourskin.xml


+ 28 - 0
skin/vtourskin_design_117.xml

@@ -0,0 +1,28 @@
+<krpano>
+
+	<!-- Version 1.17 Design -->
+
+	<skin_settings layout_width="100%"
+	               layout_maxwidth=""
+	               controlbar_width="100%"
+	               controlbar_height.normal="40"
+	               controlbar_height.mobile="38"
+	               controlbar_offset.normal="20"
+	               controlbar_offset.mobile="0"
+	               controlbar_offset_closed="-2"
+	               controlbar_overlap="0"
+	               design_skin_images="vtourskin.png"
+	               design_bgcolor="0x000000"
+	               design_bgalpha="0.5"
+	               design_bgborder="1,0 0xFFFFFF 1"
+	               design_bgroundedge.no-ios="0"
+	               design_bgroundedge.ios="1"
+	               design_bgshadow="0 0 20 0x000000 1.0"
+	               design_thumbborder_bgborder="4 0xFFFFFF 1.0"
+	               design_thumbborder_padding="2"
+	               design_thumbborder_bgroundedge="3"
+	               design_text_css="color:#FFFFFF; font-family:Arial; font-weight:bold;"
+	               design_text_shadow="1"
+	               />
+
+</krpano>

+ 31 - 0
skin/vtourskin_design_117round.xml

@@ -0,0 +1,31 @@
+<krpano>
+
+	<!-- Version 1.17 Round Design -->
+
+	<skin_settings layout_width="100%"
+	               layout_maxwidth.normal="900"
+	               layout_maxwidth.mobile=""
+	               controlbar_width.normal="-44"
+	               controlbar_width.mobile="100%"
+	               controlbar_height.normal="38"
+	               controlbar_height.mobile="34"
+	               controlbar_offset.normal="22"
+	               controlbar_offset.mobile="0"
+	               controlbar_offset_closed="-40"
+	               controlbar_overlap.normal="7"
+	               controlbar_overlap.mobile="2"
+	               design_skin_images="vtourskin.png"
+	               design_bgcolor="0x000000"
+	               design_bgalpha="0.5"
+	               design_bgborder="0 0xFFFFFF 1.0"
+	               design_bgroundedge.normal="9"
+	               design_bgroundedge.mobile="1"
+	               design_bgshadow="0 0 9 0xFFFFFF 0.5"
+	               design_thumbborder_bgborder="4 0xFFFFFF 1.0"
+	               design_thumbborder_padding="2"
+	               design_thumbborder_bgroundedge="5"
+	               design_text_css="color:#FFFFFF; font-family:Arial; font-weight:bold;"
+	               design_text_shadow="1"
+	               />
+
+</krpano>

+ 71 - 0
skin/vtourskin_design_black.xml

@@ -0,0 +1,71 @@
+<krpano>
+
+	<!-- Flat Light Design -->
+
+	<!-- modify the <skin_settings> values -->
+	<skin_settings layout_width="100%"
+	               layout_maxwidth="100%"
+	               controlbar_width="100%"
+	               controlbar_height="40"
+	               controlbar_offset.normal="0"
+	               controlbar_offset.mobile="0"
+	               controlbar_offset_closed="-40"
+	               controlbar_overlap.no-fractionalscaling="0"
+	               controlbar_overlap.fractionalscaling="0"
+	               design_skin_images="vtourskin.png"
+	               design_bgcolor="0x000000"
+	               design_bgalpha="1.0"
+	               design_bgborder="0"
+	               design_bgroundedge="0"
+	               design_bgshadow="0 4 10 0xFFFFFF 0.3"
+	               design_thumbborder_bgborder="3 0xB2B2B2 1.0"
+	               design_thumbborder_padding="2"
+	               design_thumbborder_bgroundedge="0"
+	               design_text_css="color:#FFFFFF; font-family:Arial;"
+	               design_text_shadow="0"
+	               />
+
+	<!-- adjust the design of some skin elements  -->
+	<layer name="skin_layer">
+		<layer name="skin_loadingtext" width="100%" css="calc:skin_settings.design_text_css + ' text-align:center; font-size:20px;'" padding="4 6" textshadow="calc:2.0" textshadowrange="1.0" textshadowangle="90" textshadowcolor="0x2D3E50" textshadowalpha="1.0" />
+		<layer name="skin_control_bar" alpha="0.7" />
+	</layer>
+
+
+	<!-- use a fullscreen map -->
+	<action name="skin_showmap">
+		if(%1 == null, if(layer[skin_map].state == 'closed', set(show,true), set(show,false)); , set(show,%1); );
+		mul(mh, layer[skin_scroll_layer].pixelheight, -1);
+		if(show,
+			tween(layer[skin_thumbs_container].alpha, 0.0, 0.25, default, set(layer[skin_thumbs_container].visible,false));
+			set(layer[skin_map].visible, true);
+			tween(layer[skin_map].alpha, 1.0, 0.25);
+			set(layer[skin_map].state, 'opened');
+			sub(hh,area.pixelheight,skin_settings.controlbar_offset);
+			sub(hh,layer[skin_control_bar].height);
+			sub(hh,0);
+			add(mh,hh);
+			sub(hh,skin_settings.controlbar_overlap);
+			copy(layer[skin_map].height, hh);
+			tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint);
+		  ,
+		  	if(layer[skin_map].state != 'closed',
+				set(layer[skin_map].state, 'closed');
+				add(mh, layer[skin_scroll_layer].y_offset);
+				tween(layer[skin_map].alpha, 0.0, 0.5, easeOutQuint);
+				tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint, set(layer[skin_map].visible,false) );
+			  );
+		  );
+	</action>
+
+
+	<!-- webvr button style (adjust to match skin style) -->
+	<style name="webvr_button_style"
+	       border="false"
+	       roundedge="calc:1.0"
+	       backgroundcolor="get:skin_settings.design_bgcolor" backgroundalpha="get:skin_settings.design_bgalpha"
+	       shadow="0.01" shadowrange="10.0" shadowangle="90.0" shadowcolor="0x30261B" shadowalpha="0.50"
+	       css="calc:skin_settings.design_text_css + ' font-size:' + 20*webvr_setup_scale*webvr_button_scale + 'px;'"
+	       />
+
+</krpano>

+ 42 - 0
skin/vtourskin_design_flat_light.xml

@@ -0,0 +1,42 @@
+<krpano>
+
+	<!-- Flat Light Design -->
+
+	<!-- modify the <skin_settings> values -->
+	<skin_settings layout_width="100%"
+	               layout_maxwidth="814"
+	               controlbar_width="-24"
+	               controlbar_height="40"
+	               controlbar_offset.normal="20"
+	               controlbar_offset.mobile="20"
+	               controlbar_offset_closed="-40"
+	               controlbar_overlap.no-fractionalscaling="10"
+	               controlbar_overlap.fractionalscaling="0"
+	               design_skin_images="vtourskin_light.png"
+	               design_bgcolor="0x2D3E50"
+	               design_bgalpha="0.8"
+	               design_bgborder="0"
+	               design_bgroundedge="1"
+	               design_bgshadow="0 4 10 0x000000 0.3"
+	               design_thumbborder_bgborder="2 0xFFFFFF 0.8"
+	               design_thumbborder_padding="2"
+	               design_thumbborder_bgroundedge="0"
+	               design_text_css="color:#FFFFFF; font-family:Arial; font-weight:lighter;"
+	               design_text_shadow="1"
+	               />
+
+	<!-- adjust the design of some skin elements  -->
+	<layer name="skin_layer">
+		<layer name="skin_loadingtext" width="100%" css="calc:skin_settings.design_text_css + ' text-align:center; font-size:20px;'" padding="4 6" textshadow="calc:2.0" textshadowrange="1.0" textshadowangle="90" textshadowcolor="0x2D3E50" textshadowalpha="1.0" />
+	</layer>
+
+	<!-- webvr button style (adjust to match skin style) -->
+	<style name="webvr_button_style"
+	       border="false"
+	       roundedge="calc:1.0"
+	       backgroundcolor="get:skin_settings.design_bgcolor" backgroundalpha="get:skin_settings.design_bgalpha"
+	       shadow="0.01" shadowrange="10.0" shadowangle="90.0" shadowcolor="0x30261B" shadowalpha="0.50"
+	       css="calc:skin_settings.design_text_css + ' font-size:' + 20*webvr_setup_scale*webvr_button_scale + 'px;'"
+	       />
+
+</krpano>

+ 40 - 0
skin/vtourskin_design_glass.xml

@@ -0,0 +1,40 @@
+<krpano>
+
+	<!-- Glass Design -->
+
+	<!-- modify the <skin_settings> values -->
+	<skin_settings thumbs_scrollindicator="true"
+	               layout_width="100%"
+	               layout_maxwidth="680"
+	               xcontrolbar_width="-44"
+	               controlbar_width="-20"
+	               controlbar_height="36"
+	               controlbar_offset.normal="40"
+	               controlbar_offset.mobile="12"
+	               controlbar_offset_closed="-40"
+	               controlbar_overlap="10"
+	               design_skin_images="vtourskin.png"
+	               design_bgcolor="0xFFFFFF"
+	               design_bgalpha="0.25"
+	               design_bgborder="2 0xFFFFFF 0.1"
+	               design_bgroundedge="13"
+	               design_bgshadow="0"
+	               design_thumbborder_bgborder="3 0xFFFFFF 1.0"
+	               design_thumbborder_padding="2"
+	               design_thumbborder_bgroundedge="5"
+	               design_text_css="color:#FFFFFF; font-family:Arial; font-weight:bold;"
+	               design_text_shadow="0"
+	               />
+
+	<!-- webvr button style (adjust to match default skin style) -->
+	<style name="webvr_button_style"
+	       border="true" borderwidth="2" bordercolor="0xFFFFFF" borderalpha="0.25"
+	       backgroundcolor="get:skin_settings.design_bgcolor" backgroundalpha="get:skin_settings.design_bgalpha"
+	       shadow="0"
+	       css="calc:skin_settings.design_text_css + ' color:#FFFFFF; font-weight:normal; font-size:' + 20*webvr_setup_scale*webvr_button_scale + 'px;'"
+	       />
+
+	<!-- contextmenu style (adjust to match skin style) -->
+	<contextmenu customstyle="default|default|default|0x77AAAAAA|0xFFFFFF|0xBBBBBB|2|0x7FFFFFFF|13|0|0|0|0xFFFFFF|0|0|4|6|7|0xAAFFFFFF|none|3|0|0|0|3|0xAAFFFFFF|0xAAFFFFFF|0xFFFFFF|12|8" />
+
+</krpano>

+ 58 - 0
skin/vtourskin_design_ultra_light.xml

@@ -0,0 +1,58 @@
+<krpano>
+
+	<!-- Ultra Light Design -->
+
+	<!-- modify the <skin_settings> values -->
+	<skin_settings title="false"
+	               layout_width="100%"
+	               layout_maxwidth="814"
+	               controlbar_width="-24"
+	               controlbar_height="40"
+	               controlbar_offset.normal="30"
+	               controlbar_offset.mobile="20"
+	               controlbar_offset_closed="-40"
+	               controlbar_overlap="0"
+	               design_skin_images="vtourskin_light.png"
+	               design_bgcolor="0x2D3E50"
+	               design_bgalpha="0.0"
+	               design_bgborder="0,0,1,0 0xFFFFFF 1"
+	               design_bgroundedge="0"
+	               design_bgshadow="0"
+	               design_thumbborder_bgborder="1 0xFFFFFF 0.8"
+	               design_thumbborder_padding="0"
+	               design_thumbborder_bgroundedge="0"
+	               design_text_css="color:#FFFFFF; font-family:Arial; font-weight:lighter;"
+	               design_text_shadow="0"
+	               />
+
+	<!-- webvr button style (adjust to match skin style) -->
+	<style name="webvr_button_style"
+	       border="false"
+	       roundedge="calc:1.0"
+	       backgroundcolor="get:skin_settings.design_bgcolor" backgroundalpha="get:skin_settings.design_bgalpha"
+	       shadow="0.01" shadowrange="10.0" shadowangle="90.0" shadowcolor="0x30261B" shadowalpha="0.50"
+	       css="calc:skin_settings.design_text_css + ' font-size:' + 20*webvr_setup_scale*webvr_button_scale + 'px;'"
+	       />
+
+	<!-- adjust video controls to match skin style -->
+	<layer name="skin_layer">
+		<layer name="skin_scroll_window">
+			<layer name="skin_scroll_layer">
+				<layer name="skin_video_controls">
+					<layer name="skin_video_seekbar_container">
+						<layer name="skin_video_seekbar" height="1" y="4">
+							<layer name="skin_video_loadbar" height="1" />
+							<layer name="skin_video_seekpos" bgroundedge="2" width="6" height="6" />
+						</layer>
+					</layer>
+					<layer name="skin_video_time" y="-4" />
+				</layer>
+			</layer>
+		</layer>
+	</layer>
+					
+
+	<!-- contextmenu style (adjust to match skin style) -->
+	<contextmenu customstyle="default|default|default|0x7F000000|0xFFFFFF|0xBBBBBB|0|0x20FFFFFF|1|0|0|0|0xFFFFFF|0|0xFFFFFF|4|6|7|0xAAFFFFFF|none|3|0|0|0|3|0xFFFFFF|0xFFFFFF|0x000000|12|8" />
+
+</krpano>

二进制
skin/vtourskin_hotspot.png


二进制
skin/vtourskin_light.png


二进制
skin/vtourskin_mapspot.png


二进制
skin/vtourskin_mapspotactive.png


文件差异内容过多而无法显示
+ 12 - 0
tour.js


二进制
tour.swf


+ 113 - 0
tour.xml

@@ -0,0 +1,113 @@
+<krpano version="1.20.9" title="Virtual Tour">
+
+	<include url="skin/vtourskin.xml" />
+
+	<!-- customize skin settings: maps, gyro, webvr, thumbnails, tooltips, layout, design, ... -->
+	<skin_settings maps="false"
+	               maps_type="google"
+	               maps_bing_api_key=""
+	               maps_google_api_key=""
+	               maps_zoombuttons="false"
+	               maps_loadonfirstuse="true"
+	               gyro="true"
+	               gyro_keeplookingdirection="false"
+	               webvr="true"
+	               webvr_keeplookingdirection="true"
+	               webvr_prev_next_hotspots="true"
+	               autotour="false"
+	               littleplanetintro="false"
+	               followmousecontrol="false"
+	               title="true"
+	               thumbs="true"
+	               thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
+	               thumbs_opened="false"
+	               thumbs_text="false"
+	               thumbs_dragging="true"
+	               thumbs_onhoverscrolling="false"
+	               thumbs_scrollbuttons="false"
+	               thumbs_scrollindicator="false"
+	               thumbs_loop="false"
+	               tooltips_buttons="false"
+	               tooltips_thumbs="false"
+	               tooltips_hotspots="false"
+	               tooltips_mapspots="false"
+	               deeplinking="false"
+	               loadscene_flags="MERGE"
+	               loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
+	               loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
+	               loadscene_blend_next="SLIDEBLEND(0.5,   0, 0.75, linear)"
+	               loadingtext=""
+	               layout_width="100%"
+	               layout_maxwidth="814"
+	               controlbar_width="-24"
+	               controlbar_height="40"
+	               controlbar_offset="20"
+	               controlbar_offset_closed="-40"
+	               controlbar_overlap.no-fractionalscaling="10"
+	               controlbar_overlap.fractionalscaling="0"
+	               design_skin_images="vtourskin.png"
+	               design_bgcolor="0x2D3E50"
+	               design_bgalpha="0.8"
+	               design_bgborder="0"
+	               design_bgroundedge="1"
+	               design_bgshadow="0 4 10 0x000000 0.3"
+	               design_thumbborder_bgborder="3 0xFFFFFF 1.0"
+	               design_thumbborder_padding="2"
+	               design_thumbborder_bgroundedge="0"
+	               design_text_css="color:#FFFFFF; font-family:Arial;"
+	               design_text_shadow="1"
+	               />
+
+	<!--
+	    For an alternative skin design either change the <skin_settings> values 
+	    from above or optionally include one of the predefined designs from below.
+	-->
+	<!-- <include url="skin/vtourskin_design_flat_light.xml"  /> -->
+	<!-- <include url="skin/vtourskin_design_glass.xml"       /> -->
+	<!-- <include url="skin/vtourskin_design_ultra_light.xml" /> -->
+	<!-- <include url="skin/vtourskin_design_117.xml"         /> -->
+	<!-- <include url="skin/vtourskin_design_117round.xml"    /> -->
+	<!-- <include url="skin/vtourskin_design_black.xml"       /> -->
+
+
+	<!-- startup action - load the first scene -->
+	<action name="startup" autorun="onstart">
+		if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
+		loadscene(get(startscene), null, MERGE);
+		if(startactions !== null, startactions() );
+	</action>
+
+
+	
+	<scene name="scene_chengshicitang" title="chengshicitang" onstart="" thumburl="tourpanos/chengshicitang.tiles/thumb.jpg" lat="" lng="" heading="">
+		
+		<control bouncinglimits="calc:image.cube ? true : false" />
+
+		<view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
+
+		<preview url="tourpanos/chengshicitang.tiles/preview.jpg" />
+
+		<image>
+			<cube url="tourpanos/chengshicitang.tiles/%s/l%l/%0v/l%l_%s_%0v_%0h.jpg" multires="512,1024,1792,3584,7168" />
+		</image>
+		<hotspot name="spot1" style="skin_hotspotstyle" ath="2.119" atv="26.551" linkedscene="scene_chenyiju" />
+		<hotspot name="spot2" style="skin_hotspotstyle" ath="-79.408" atv="16.105" linkedscene="scene_chenyiju" />
+
+	</scene>
+
+	<scene name="scene_chenyiju" title="chenyiju" onstart="" thumburl="tourpanos/chenyiju.tiles/thumb.jpg" lat="" lng="" heading="">
+		
+		<control bouncinglimits="calc:image.cube ? true : false" />
+
+		<view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
+
+		<preview url="tourpanos/chenyiju.tiles/preview.jpg" />
+
+		<image>
+			<cube url="tourpanos/chenyiju.tiles/%s/l%l/%0v/l%l_%s_%0v_%0h.jpg" multires="512,1024,1792,3584,7168" />
+		</image>
+
+	</scene>
+
+
+</krpano>

二进制
tour_testingserver.exe


二进制
tour_testingserver_macos


二进制
yaoimages/auto_rotation.png


二进制
yaoimages/auto_rotation@2x.png


二进制
yaoimages/auto_rotation_click.png


二进制
yaoimages/auto_rotation_click@2x.png


二进制
yaoimages/bg1280.jpg


二进制
yaoimages/direction.png


二进制
yaoimages/direction_board.png


二进制
yaoimages/direction_board@2.png


二进制
yaoimages/direction_bottom.png


二进制
yaoimages/direction_bottom@2x.png


二进制
yaoimages/direction_bottom_disable.png


二进制
yaoimages/direction_bottom_disable@2x.png


二进制
yaoimages/direction_left.png


二进制
yaoimages/direction_left@2x.png


二进制
yaoimages/direction_left_disable.png


二进制
yaoimages/direction_left_disable@2x.png


二进制
yaoimages/direction_right.png


二进制
yaoimages/direction_right@2x.png


二进制
yaoimages/direction_right_disable.png


二进制
yaoimages/direction_right_disable@2x.png


二进制
yaoimages/direction_top.png


二进制
yaoimages/direction_top@2x.png


二进制
yaoimages/direction_top_disable.png


二进制
yaoimages/direction_top_disable@2x.png


二进制
yaoimages/direction_walk.png


二进制
yaoimages/direction_walk@2x.png


二进制
yaoimages/play4.png


二进制
yaoimages/play4@2x.png


二进制
yaoimages/play4@3x.png


二进制
yaoimages/play_click.png


二进制
yaoimages/play_click@2x.png


二进制
yaoimages/play_click@3x.png


二进制
yaoimages/rang_1201.png


二进制
yaoimages/rang_1201@2x.png


二进制
yaoimages/rangle.png


二进制
yaoimages/rangle@2x.png


二进制
yaoimages/yao0.png


二进制
yaoimages/zoomin.png


二进制
yaoimages/zoomin@2x.png


二进制
yaoimages/zoomin_click.png


二进制
yaoimages/zoomin_click@2x.png


二进制
yaoimages/zoomout.png


二进制
yaoimages/zoomout@2x.png


二进制
yaoimages/zoomout_click.png


二进制
yaoimages/zoomout_click@2x.png


+ 21 - 118
yaoli.html

@@ -1,125 +1,28 @@
-<!DOCTYPE html>
-
+<!DOCTYPE html>
 <html>
-
 <head>
-    <title>瑶里景区</title>
-
-    <script src="./js/tvSysBtnBind.v2.1.js"></script>
-    <meta charset="utf-8">
-    <meta name="page-view-size" content="1280*720" />
-    <link rel="stylesheet" href="yaostyle.css">
-
-
-
-    <style>
-
-        body {
-            /* set margin to 0 and overflow to hidden, to go fullscreen */
-            margin: 0;
-            overflow: hidden;
-            background: url('./yaoimages/bg1280.jpg') center no-repeat;
-            background-size:100% 100%;
-            color:#ffffff;
-            font-family:  "Microsoft YaHei";  
-            width: 1280px;
-            height:720px;
-            /* background-repeat:no-repeat; */
-            /* width: 120vw; */
-            
-}
-
-/*
-        .navigation{
-            display: flex;
-            flex-direction: column;
-            margin-left: 30px;
-            margin-top: 30px;
-        }
-        
-        */
-
-        #debug{
-            display: none;
-            position: absolute;
-            top: 20px;
-            left: 10px;
-            color: #ffff00;
-        }
-
-
-    </style>
+	<title>krpano - chenyiju</title>
+	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, viewport-fit=cover" />
+	<meta name="apple-mobile-web-app-capable" content="yes" />
+	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
+	<meta name="mobile-web-app-capable" content="yes" />
+	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+	<meta http-equiv="x-ua-compatible" content="IE=edge" />
+	<style>
+		html { height:100%; }
+		body { height:100%; overflow:hidden; margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:16px; color:#FFFFFF; background-color:#000000; }
+	</style>
 </head>
+<body>
 
-<script>
-    var deviceWidth = parseInt(window.screen.width);  //获取当前设备的屏幕宽度
-    var deviceScale = deviceWidth / 1280;  //得到当前设备屏幕与640之间的比例,之后我们就可以将网页宽度固定为640px
-    var ua = navigator.userAgent;
-    //获取当前设备类型(安卓或苹果)
-    if (/Android (\d+\.\d+)/.test(ua)) {
-        var version = parseFloat(RegExp.$1);
-        if (version > 2.3) {
-            document.write('<meta name="viewport" content="width=1280,initial-scale=' + deviceScale + ', minimum-scale = ' + deviceScale + ', maximum-scale = ' + deviceScale + ', target-densitydpi=device-dpi">');
-        } else {
-            document.write('<meta name="viewport" content="width=1280,initial-scale=0.75,maximum-scale=0.75,minimum-scale=0.75,target-densitydpi=device-dpi" />');
-        }
-    } else {
-        document.write('<meta name="viewport" content="width=1280, user-scalable=no">');
-    }
-</script>
+<script src="tour.js"></script>
 
-<body id="Jdoc">
+<div id="pano" style="width:100%;height:100%;">
+	<noscript><table style="width:100%;height:100%;"><tr style="vertical-align:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript>
+	<script>
+		embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano", html5:"auto", mobilescale:1.0, passQueryParameters:true});
+	</script>
+</div>
 
-    <!-- 用来保存输出结果 -->
-    <div id="container">
-    </div>
-
-    <div class="home">
-        <div class="preview">
-            <div class="detail">
-                <div class="detailtitle">
-                    <div class="titlelogo"></div>
-                    <div class="title">内容详情</div>
-                </div>
-                <div class='thumb'><img id="cover" data-id='0' src="./yaoimages/yao0.png"/></div>
-            </div>
-
-            <div class="descript">
-                <div class="content">
-                    <div id="descriptTitle">圣彼得堡</div>
-                    <div id="descriptContent">简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸...</div>
-                </div>
-                
-                <div id="play" class='play'>
-                    <!-- <div class='playlogo'></div>
-                    播放 -->
-                    
-                </div>
-            </div>
-        </div>
-
-    </div>
-
-   <div id="listTitle">剧集列表(11集全)</div>
-    <div id='listContent'>
-        <div class="pano">
-            <div class="title"></div>
-            <div class="thumb"><img  src='yao/chenyiju4k_b.jpg' /></div>
-        </div>
-            -
-        </div>
-
-    </div>
-
-    <div id='debug'></div>
-
-    <div class="ctrlBtn"></div>
-
-    <script src="yaoli.min.js"></script> 
-
-    <script type="text/javaScript">
-
-    </script>
 </body>
-
-</html>
+</html>

文件差异内容过多而无法显示
+ 0 - 1
yaoli.min.js


+ 0 - 119
yaoli/jingqu.html

@@ -1,119 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-
-<head>
-    <title>瑶里景区</title>
-    <script src="./js/tvSysBtnBind.v2.1.js"></script>
-
-    <meta charset="utf-8">
-    <link rel="stylesheet" href="yaostyle.css">
-
-    <style>
-        #debug{
-            display: none;
-            position: absolute;
-            top: 20px;
-            left: 10px;
-            color: #ffff00;
-        }
-
-    </style>
-</head>
-
-<script>
-    var deviceWidth = parseInt(window.screen.width);  //获取当前设备的屏幕宽度
-    var deviceScale = deviceWidth / 1280;  //得到当前设备屏幕与640之间的比例,之后我们就可以将网页宽度固定为640px
-    var ua = navigator.userAgent;
-    //获取当前设备类型(安卓或苹果)
-    if (/Android (\d+\.\d+)/.test(ua)) {
-        var version = parseFloat(RegExp.$1);
-        if (version > 2.3) {
-            document.write('<meta name="viewport" content="width=1280,initial-scale=' + deviceScale + ', minimum-scale = ' + deviceScale + ', maximum-scale = ' + deviceScale + ', target-densitydpi=device-dpi">');
-        } else {
-            document.write('<meta name="viewport" content="width=1280,initial-scale=0.75,maximum-scale=0.75,minimum-scale=0.75,target-densitydpi=device-dpi" />');
-        }
-    } else {
-        document.write('<meta name="viewport" content="width=1280, user-scalable=no">');
-    }
-</script>
-
-<body id="Jdoc">
-
-    <!-- 用来保存输出结果 -->
-    <div id="container">
-    </div>
-
-    <!-- <div class="navigation">
-        <div style="position:relative">
-            <div id='map'><img id="map_img" class="map_img" src="panos/HomeHouseMap.png"/></div>
-            <div id='cam'><img class="cam_img" src="panos/HomePoint.png"/></div>
-            <div id='redPoints'>
-            </div>
-        </div>
-            
-    </div> -->
-
-
-
-    <!-- <div id="tip">Walking...</div> -->
-
-    <div id="menuTip"> 单击“OK”键,唤起菜单 </div>
-    <div id="menuTitle">fff</div>
-
-    <div id="menuControl"> 
-        <div class="menu_control_item">
-            <img id="auto_rotation" src="yaoimages/auto_rotation.png" />
-            <div id="rotation_title">自动旋转</div>
-        </div>
-        <div class="menu_control_item">
-            <img id="zoom" src="yaoimages/zoomin.png" />
-            <div id="zoom_title" >放大</div>
-        </div>
-    </div>
-
-    <div id="wholeDirection">
-        <div id="directionTop">阳台</div>
-        <div class="directionCenter">
-            <div id="directionLeft">房间</div>
-            <div id="directionControl"> 
-                <div id='direct_top'><div><img id='direct_top_img' src='yaoimages/direction_top.png'></div><div>1</div></div>
-                <div class="direct_center">
-                    <div id='direct_left'><div><img id='direct_left_img' src='yaoimages/direction_left.png'></div><div>2</div></div>
-                    <div id='direct_right'><div>4</div><div><img id='direct_right_img' src='yaoimages/direction_right.png'></div></div>
-                </div>
-                <div id='direct_bottom'><div>3</div><div><img id='direct_bottom_img' src='yaoimages/direction_bottom.png'></div></div>
-            </div>
-            <div id="directionRight">花园</div>
-        </div>
-
-        
-        <div id="directionBottom">露台</div>
-    </div>
-    
-
-    <div id='direction_top_tip'><img id='direct_top_tip_img' src='yaoimages/direction_top.png'></div>
-
-    
-    <div id='menu'>
-        <div class="pano">
-            <div class="title"></div>
-            <div class="thumb"><img src='yao/chenyiju4k_b.jpg' /></div>
-        </div>
-    </div>
-
-    <div id='debug'></div>
-
-
-
-    <div class="ctrlBtn"></div>
-
-
-
-    <script src="jingqu.min.js"></script> 
-    <script type="text/javaScript">
-
-    </script>
-</body>
-
-</html>

文件差异内容过多而无法显示
+ 0 - 1
yaoli/jingqu.min.js


+ 0 - 885
yaoli/js/tvSysBtnBind.v2.1.js

@@ -1,885 +0,0 @@
-try {
-    (function(arr) {
-        arr.forEach(function(item) {
-            if (item.hasOwnProperty('remove')) {
-                return
-            }
-            Object.defineProperty(item, 'remove', {
-                configurable: true,
-                enumerable: true,
-                writable: true,
-                value: function remove() {
-                    this.parentNode.removeChild(this)
-                }
-            })
-        })
-    })([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
-    if (!("classList" in document.documentElement)) {
-        Object.defineProperty(HTMLElement.prototype, 'classList', {
-            get: function() {
-                var self = this;
-
-                function update(fn) {
-                    return function(value) {
-                        var classes = self.className.split(/\s+/g),
-                            index = classes.indexOf(value);
-                        fn(classes, index, value);
-                        self.className = classes.join(" ")
-                    }
-                }
-                return {
-                    add: update(function(classes, index, value) {
-                        if (!~index) classes.push(value)
-                    }),
-                    remove: update(function(classes, index) {
-                        if (~index) classes.splice(index, 1)
-                    }),
-                    toggle: update(function(classes, index, value) {
-                        if (~index) classes.splice(index, 1);
-                        else classes.push(value)
-                    }),
-                    contains: function(value) {
-                        return !!~self.className.split(/\s+/g).indexOf(value)
-                    },
-                    item: function(i) {
-                        return self.className.split(/\s+/g)[i] || null
-                    }
-                }
-            }
-        })
-    }
-
-    function fireKeyEvent(el, evtType, keyCode) {
-        var doc = el.ownerDocument,
-            win = doc.defaultView || doc.parentWindow,
-            evtObj;
-        if (doc.createEvent) {
-            if (win.KeyEvent) {
-                evtObj = doc.createEvent('KeyEvents');
-                evtObj.initKeyEvent(evtType, true, true, win, false, false, false, false, keyCode, 0)
-            } else {
-                evtObj = doc.createEvent('UIEvents');
-                Object.defineProperty(evtObj, 'keyCode', {
-                    get: function() {
-                        return this.keyCodeVal
-                    }
-                });
-                Object.defineProperty(evtObj, 'which', {
-                    get: function() {
-                        return this.keyCodeVal
-                    }
-                });
-                evtObj.initUIEvent(evtType, true, true, win, 1);
-                evtObj.keyCodeVal = keyCode;
-                if (evtObj.keyCode !== keyCode) {}
-            }
-            el.dispatchEvent(evtObj)
-        } else if (doc.createEventObject) {
-            evtObj = doc.createEventObject();
-            evtObj.keyCode = keyCode;
-            el.fireEvent('on' + evtType, evtObj)
-        }
-    }
-} catch (e) {}
-
-function addClass(ele, cls) {
-    if (ele.classList) {
-        ele.classList.add(cls)
-    } else {
-        if (!this.hasClass(ele, cls)) ele.className += " " + cls
-    }
-}
-
-function arrIndexOf(arr, v) {
-    for (var i = 0; i < arr.length; i++) {
-        if (arr[i] == v) {
-            return i
-        }
-    }
-    return -1
-}
-
-function removeClass(ele, cls) {
-    if (ele.classList) {
-        ele.classList.remove(cls)
-    } else {
-        if (ele.className != '' && hasClass(ele, cls)) {
-            var arrClassName = ele.className.split(' ');
-            var classIndex = arrIndexOf(arrClassName, cls);
-            if (classIndex !== -1) {
-                arrClassName.splice(classIndex, 1);
-                ele.className = arrClassName.join(' ')
-            }
-        }
-    }
-}
-
-function toggleClass(ele, cls) {
-    if (hasClass(ele, cls)) {
-        removeClass(ele, cls)
-    } else {
-        addClass(ele, cls)
-    }
-}
-
-function hasClass(element, cls) {
-    return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1
-}
-
-function getClassNames(classStr, target, tagName) {
-    target = target ? target : document;
-    tagName = tagName ? tagName : "*";
-    if (document.getElementsByClassName) {
-        return target.getElementsByClassName(classStr)
-    } else {
-        var nodes = target.getElementsByTagName(tagName),
-            ret = [];
-        for (i = 0; i < nodes.length; i++) {
-            if (hasClass(nodes[i], classStr)) {
-                ret.push(nodes[i])
-            }
-        }
-        return ret
-    }
-}
-
-function getElementLeft(ele) {
-    var actualLeft = ele.offsetLeft;
-    var current = ele.offsetParent;
-    while (current !== null) {
-        actualLeft += current.offsetLeft;
-        current = current.offsetParent
-    }
-    return actualLeft
-}
-
-function getElementTop(ele) {
-    var actualTop = ele.offsetTop;
-    var current = ele.offsetParent;
-    while (current !== null) {
-        actualTop += current.offsetTop;
-        current = current.offsetParent
-    }
-    return actualTop
-}
-var contains = document.documentElement.contains ? function(parent, node) {
-    if (parent) {
-        return parent !== node && parent.contains(node)
-    }
-
-} : function(parent, node) {
-    if (parent) {
-        while (node && (node = node.parentNode))
-            if (node === parent) return true
-        return false
-    }
-
-}
-
-function getBoundingClientRect(ele) {
-    var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
-    var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
-    if (ele.getBoundingClientRect) {
-        if (typeof arguments.callee.offset !== 'number') {
-            var temp = document.createElement('div');
-            temp.style.cssText = "position:absolute;top:0;left:0";
-            document.body.appendChild(temp);
-            arguments.callee.offset = -temp.getBoundingClientRect().top - scrollTop;
-            document.body.removeChild(temp);
-            temp = null
-        }
-        var rect = ele.getBoundingClientRect();
-        var offset = arguments.callee.offset;
-        return {
-            left: rect.left + offset,
-            right: rect.right + offset,
-            top: rect.top + offset,
-            bottom: rect.bottom + offset,
-            width: (rect.right + offset) - (rect.left + offset),
-            height: (rect.bottom + offset) - (rect.top + offset)
-        }
-    } else {
-        var actualLeft = getElementLeft(ele);
-        var actualTop = getElementTop(ele);
-        var offsetWidth = ele.offsetWidth;
-        var offsetHeight = ele.offsetHeight;
-        return {
-            left: actualLeft - scrollLeft,
-            right: actualLeft + offsetWidth - scrollLeft,
-            top: actualTop - scrollTop,
-            bottom: actualTop + offsetHeight - scrollTop,
-            width: (actualLeft + offsetWidth - scrollLeft) - (actualLeft - scrollLeft),
-            height: (actualTop + offsetHeight - scrollTop) - (actualTop - scrollTop)
-        }
-    }
-}
-
-(function(window) {
-    var tvSysBtnBind = function(init) {
-        var _this = this,
-            _self = self;
-        var id = init.id ? init.id : null,
-            keyRemoveDefault = typeof init.keyRemoveDefault == "undefined" ? false : init.keyRemoveDefault,
-            currentIndex = init.currentIndex ? parseInt(init.currentIndex) : 0,
-            btnLeft = init.btnLeft ? init.btnLeft : 37,
-            btnUp = init.btnUp ? init.btnUp : 38,
-            btnRight = init.btnRight ? init.btnRight : 39,
-            btnDown = init.btnDown ? init.btnDown : 40,
-            btnEnter = init.btnEnter ? init.btnEnter : 13,
-            btnBack = init.btnBack ? init.btnBack : 27,
-            history = typeof init.history == "undefined" ? true : init.history,
-            doublePress = typeof init.doublePress == "undefined" ? false : init.doublePress,
-            isFloatLast = typeof init.isFloatLast == "undefined" ? false : init.isFloatLast,
-            isCentered = typeof init.isCentered == "undefined" ? true : init.isCentered,
-            currentClass = init.currentClass ? init.currentClass : "current",
-            effect = init.effect ? init.effect : "slide1",
-            element = new Array(),
-            rules = init.rules ? init.rules : { hotbutton: {} },
-            direction = "y";
-        _this.className = init.className ? init.className : "hotbutton";
-        this.event = {};
-        var _tempElem;
-        this.currentIndex = parseInt(currentIndex);
-        this.defaultIndex = parseInt(currentIndex);
-        this.currentClass = currentClass;
-        this.historyFocus = {};
-        if (!window.focusobj) window.focusobj = document.createElement("span");
-        (typeof init.onLoad) == "function" ? init.onLoad: init.onLoad = function() {};
-        (typeof init.onBack) == "function" ? init.onLoad: init.onBack = function() {};
-        (typeof init.onCommPress) == "function" ? init.onCommPress: init.onCommPress = function() {};
-        this.onLoad = function() {
-            focusobj.innerHTML = '<div class="cssbk"><b class="lt"></b><b class="t"></b><b class="rt"></b><b class="r"></b><b class="rb"></b><b class="b"></b><b class="lb"></b> <b class="l"></b></div>';
-            addClass(focusobj, "focusobj");
-            addClass(focusobj, "current");
-            focusobj.style.display = "none";
-            _this.target = init.id ? document.getElementById(init.id) : document.body;
-            _this.defaultTarget = _this.target;
-            _this.currentId = init.id ? init.id : "Jdoc";
-            self.getCurRule();
-            _this.reLoad();
-            _this.sourceClassName = _this.className;
-            _this.sourceLength = element.length;
-            _this.prev = element[currentIndex];
-            _this.prevIndex = currentIndex;
-            _this.current = element[currentIndex];
-            _this.currentIndex = currentIndex;
-            _this.target.appendChild(focusobj);
-            init.onLoad.call(_this);
-            window.focus();
-        }
-        self.getCurRule = function(item) {
-            var obj = {};
-            if (rules) {
-                obj = rules["#" + _this.currentId + ">." + _this.className];
-                if (typeof obj == "undefined") {
-                    if (rules[_this.className]) {
-                        obj = rules[_this.className]
-                    }
-                }
-                if (item && typeof rules[item] == "undefined") {
-                    // rules[item]={};
-                }
-            }
-            return obj
-        }
-        this.reSetClass = function(item, index, curClass) {
-            var obj = _self.getCurRule(item);
-            if (!obj) {
-                console.log("初始化" + _this.className + "失败");
-                return
-            }
-            if (typeof obj["history"] == "undefined") obj["history"] = history;
-            if (obj["history"]) _this.historyFocus[_this.currentId + _this.className] = _this.currentIndex;
-            _this.prevCurrentClass = _this.currentClass;
-            if (curClass) {
-                _this.currentClass = curClass
-            }
-            var arr = item.split(">");
-            for (var i = 0; i < arr.length; i++) {
-                if (arr[i] == "") arr.splice(i)
-            }
-            for (var i = 0; i < arr.length; i++) {
-                if (arr[i].indexOf("#") != -1) {
-                    _this.currentId = arr[i].replace("#", "");
-                    if (document.getElementById(_this.currentId)) _this.target = document.getElementById(_this.currentId)
-                }
-                if (arr[i].indexOf(".") != -1) {
-                    item = arr[i].replace(".", "")
-                }
-                if (arr[i].indexOf(".") == -1 && arr[i].indexOf("#") == -1) {
-                    item = arr[i]
-                }
-            }
-            if (getClassNames(item, _this.target).length > 0) {
-                _self.newItem(item, index)
-            } else {
-                _this.target = _this.defaultTarget;
-                if (getClassNames(item, _this.target).length > 0) _self.newItem(item, index)
-            }
-        }
-        this.onCommPress = function(e) {
-            init.onCommPress.call(_this)
-        }
-        self.newItem = function(item, index) {
-            var obj = _self.getCurRule();
-            if (_this.prev) removeClass(_this.prev, _this.currentClass);
-            if (typeof _this.historyFocus[_this.currentId + item] == "undefined") _this.historyFocus[_this.currentId + item] = 0;
-            _this.className = item;
-            var idx = obj["savelastIndex"] ? _this.currentIndex : 0;
-            index = index > getClassNames(item, _this.target).length - 1 ? getClassNames(item, _this.target).length - 1 : index;
-            idx = _this.historyFocus[_this.currentId + item] ? _this.historyFocus[_this.currentId + item] : idx;
-            _this.currentIndex = typeof index != "undefined" ? index : idx;
-            _this.prevIndex = _this.currentIndex;
-            _this.reLoad()
-        }
-        self.readFn = function() {
-            if ((typeof init.onEnterPress) == "function") {
-                init.onEnterPress
-            } else {
-                init.onEnterPress = function() {}
-            }
-            if ((typeof init.onPress) == "function") {
-                init.onPress
-            } else {
-                init.onPress = function() {}
-            }
-        }
-        this.reLoad = function() {
-            self.readFn();
-            element = getClassNames(_this.className, _this.target);
-            if (element.length <= 0) {
-                console.log("初始化" + _this.className + "失败");
-                return
-            }
-            this.hotbtn = element;
-            if (element.length <= 0) return false;
-            if (_this.currentIndex || _this.currentIndex == 0) {
-                _this.currentIndex = parseInt(_this.currentIndex)
-            } else {
-                _this.currentIndex = parseInt(init.currentIndex)
-            }
-            if (isload >= 2 && _this.sourceClass == _this.className && _this.sourceLength != element.length && !isSet) {
-                if (hasClass(_this.prev, _this.className) && _this.sourceLength > element.length) {
-                    _this.currentIndex = _this.currentIndex - (_this.sourceLength - element.length);
-                    _this.prevIndex = _this.prevIndex - (_this.sourceLength - element.length);
-                    _this.sourceLength = element.length
-                } else if (hasClass(_this.prev, _this.className) && _this.sourceLength < element.length) {
-                    _this.currentIndex = _this.currentIndex + (element.length - _this.sourceLength);
-                    _this.prevIndex = _this.prevIndex + (element.length - _this.sourceLength);
-                    _this.sourceLength = element.length
-                }
-            }
-            isSet = false;
-            self.overIndex();
-            _this.current = element[_this.currentIndex];
-            _this.currentIndex = _this.currentIndex;
-            _self.render(_this.currentIndex);
-            for (var i = 0; i < this.hotbtn.length; i++) {
-                this.hotbtn[i].setAttribute("data-id", i)
-            }
-        }
-
-        function keydefault(e) {
-            try {
-                e.preventDefault()
-            } catch (e) {}
-        }
-        var isSet = false;
-        this.setCurrentIndex = function(index) {
-            isSet = true;
-            index = parseInt(index);
-            _this.currentIndex = index;
-            _this.current = element[index]
-        }
-        this.pageScroll = function(ele, Scroll, direction) {
-            if (!ele["data-sum"]) ele["data-sum"] = 0;
-            if (!ele["data-sumx"]) ele["data-sumx"] = 0;
-            ele.style.position = "relative";
-            ele.children[0].style.position = "absolute";
-            if (direction == "up") {
-                if (ele["data-sum"] - Scroll > 0) {
-                    ele["data-sum"] = parseInt(ele["data-sum"]) - Scroll
-                } else {
-                    ele["data-sum"] = 0
-                }
-                ele.children[0].style.left = "0";
-                ele.children[0].style.top = "-" + ele["data-sum"] + "px"
-            } else if (direction == "down") {
-                var clientHeight = ele.children[0].clientHeight;
-                if (ele["data-sum"] + Scroll < clientHeight - ele.clientHeight / 2) {
-                    ele["data-sum"] = parseInt(ele["data-sum"]) + Scroll
-                } else {
-                    ele["data-sum"] = clientHeight - ele.clientHeight
-                }
-                ele.children[0].style.left = "0";
-                ele.children[0].style.top = "-" + ele["data-sum"] + "px"
-            } else if (direction == "left") {
-                if (ele["data-sumx"] - Scroll > 0) {
-                    ele["data-sumx"] = parseInt(ele["data-sumx"]) - Scroll
-                } else {
-                    ele["data-sumx"] = clientWidth - ele.clientWidth
-                }
-                ele.children[0].style.top = "0";
-                ele.children[0].style.left = "-" + ele["data-sumx"] + "px"
-            } else if (direction == "right") {
-                var clientWidth = ele.children[0].clientWidth;
-                if (ele["data-sumx"] + Scroll < clientWidth - ele.clientWidth / 2) {
-                    ele["data-sumx"] = parseInt(ele["data-sum"]) + Scroll
-                } else {
-                    ele["data-sumx"] = 0;
-                }
-                ele.children[0].style.top = "0";
-                ele.children[0].style.left = "-" + ele["data-sumx"] + "px"
-            }
-        }
-        this.viewScrollY = function(y, view) {
-            var maxTop = view.children[0].clientHeight - view.clientHeight;
-            var obj = self.getCurRule();
-            var sumtop = view.children[0]["ScrollY"] ? view.children[0]["ScrollY"] : 0;
-            var top = sumtop + y;
-            middle = getBoundingClientRect(view).height / 2 - getBoundingClientRect(_this.current).height / 2;
-            top = top + middle;
-            if (top > 0 || maxTop < 0) top = 0;
-            else if (Math.abs(top) > Math.abs(maxTop)) {
-                top = -maxTop;
-                //view.children[0]["ScrollY"] == 0 这个句忘记干嘛的了 留着
-            }
-            top = obj["customTop"] != undefined ? obj["customTop"] : top;
-            view.children[0].style.top = top + "px";
-            view.children[0]["ScrollY"] = top
-        }
-        var maxLeft = 0;
-        this.viewScrollX = function(x, view, viewWidth) {
-            var maxLeft = viewWidth - view.clientWidth;
-            var obj = self.getCurRule();
-            var sumleft = view.children[0]["ScrollX"] ? view.children[0]["ScrollX"] : 0;
-            var left = sumleft + x;
-            middle = getBoundingClientRect(view).width / 2 - getBoundingClientRect(_this.current).width / 2;
-            left = left + middle;
-            if (left > 0 || maxLeft < 0) left = 0;
-            else if (Math.abs(left) > Math.abs(maxLeft)) {
-                left = -maxLeft;
-            }
-            left = obj["customLeft"] != undefined ? obj["customLeft"] : left;
-            view.children[0].style.left = left + "px";
-            view.children[0]["ScrollX"] = left
-        }
-        this.onPress = function(e) {
-            init.onPress.call(_this)
-        }
-        this.onEnterPress = function() {
-            init.onEnterPress.call(_this)
-        }
-        window.onBackEvent = this.onBack = function() {
-            init.onBack.call(_this)
-        }
-        self.getScrollTop = function() {
-            var scrollTop = 0;
-            if (document.documentElement && document.documentElement.scrollTop) {
-                scrollTop = document.documentElement.scrollTop
-            } else if (document.body) {
-                scrollTop = document.body.scrollTop
-            }
-            return scrollTop
-        }
-        this.scroll = function(view, direction) {
-            var obj = self.getCurRule();
-            if (obj == undefined || !obj["direction"]) return;
-
-            direction = direction ? direction : obj["direction"];
-            var viewX = view ? view : obj["directionParentX"] ? obj["directionParentX"] : obj["directionParent"] ? obj["directionParent"] : _this.current.parentNode.parentNode;
-            var viewY = view ? view : obj["directionParentY"] ? obj["directionParentY"] : obj["directionParent"] ? obj["directionParent"] : _this.current.parentNode.parentNode;
-            var sum = 0;
-            if (direction.indexOf("x") > -1) {
-                if (viewX instanceof Array) {
-                    for (var i = 0; i < viewX.length; i++) {
-
-                        if (contains(viewX[i], _this.current)) {
-                            viewX = viewX[i];
-                        }
-                    }
-                }
-
-                if (viewX instanceof Array || !contains(viewX, _this.current)) return;
-                for (var i = 0; i < _this.hotbtn.length; i++) {
-                    sum = getBoundingClientRect(_this.hotbtn[i]).width + sum
-                }
-                if (_this.hotbtn.length > 1) {
-                    if (!obj["scrollWidth"])
-                        sum = sum + Math.ceil(getBoundingClientRect(_this.hotbtn[1]).left - getBoundingClientRect(_this.hotbtn[0]).right) * (_this.hotbtn.length);
-                    else {
-                        sum = _this.hotbtn.length * obj["scrollWidth"]; //因为样式多样性,宽度获取并不准确 所以可以自定义
-                    }
-
-                } else {
-                    sum = sum;
-                }
-                viewX.style.position = "relative";
-                viewX.children[0].style.position = "absolute";
-                viewX.children[0].style.width = (sum + 30) + "px";
-                _this.viewScrollX(-(getBoundingClientRect(_this.current).left - getBoundingClientRect(viewX).left), viewX, sum)
-            }
-            if (direction.indexOf("y") > -1) {
-                if (viewY instanceof Array) {
-                    for (var i = 0; i < viewY.length; i++) {
-
-                        if (contains(viewY[i], _this.current)) {
-                            viewY = viewY[i];
-                        }
-                    }
-                }
-                if (viewY instanceof Array || !contains(viewY, _this.current)) return;
-                viewY.style.position = "relative";
-                viewY.children[0].style.position = "absolute";
-
-                _this.viewScrollY(-(getBoundingClientRect(_this.current).top - getBoundingClientRect(viewY).top), viewY)
-            }
-        }
-        var isload = 0;
-        self.render = function(index) {
-            if (_this.renderType == "self") return;
-            isload = isload + 1;
-            if (isload == 2) {
-                _this.sourceLength = element.length
-            }
-            if (_this.prevCurrentClass) {
-                var ele = getClassNames(_this.prevCurrentClass, _this.target);
-                for (var i = 0; i < ele.length; i++) {
-                    if (hasClass(ele[i], _this.prevCurrentClass)) {
-                        removeClass(ele[i], _this.prevCurrentClass)
-                    }
-                }
-            }
-            if (element[index]) addClass(element[index], _this.currentClass);
-            else return;
-            for (var i = 0; i < element.length; i++) {
-                if (i != index && hasClass(element[i], _this.currentClass)) {
-                    removeClass(element[i], _this.currentClass)
-                }
-            }
-            _this.scroll();
-            var effect = element[index].getAttribute("data-effect");
-            if (effect) {
-                focusobj.setAttribute("style", "  position: fixed; z-index: 19;width:" + (getBoundingClientRect(element[index]).width) + "px ;height:" + (getBoundingClientRect(element[index]).height) + "px; left:" + getBoundingClientRect(element[index]).left + "px;top:" + getBoundingClientRect(element[index]).top + "px;");
-                focusobj.setAttribute("class", "focusobj current " + effect);
-                focusobj.style.display = "list-item"
-            } else {
-                focusobj.setAttribute("style", "");
-                focusobj.style.display = "none"
-            }
-        }
-        self.EventUtil = {
-            add: function(obj, callback) {
-                if (typeof(obj.onkeypress) == "null") {
-                    obj.onkeypress = function(e) {
-                        callback && callback(e)
-                    }
-                } else {
-                    obj.onkeydown = function(e) {
-                        callback && callback(e)
-                    }
-                }
-            }
-        }
-        var _t, sum = 0;
-        EventUtil.add(document, function(e) {
-            _this.renderType = "self";
-            if (doublePress) {
-                if (sum < 2)
-                    clearTimeout(_t);
-                sum++;
-                _t = setTimeout(function() {
-                    _self.onPressFn(e)
-                    sum = 0;
-                }, 100)
-            } else {
-                _self.onPressFn(e);
-            }
-
-
-        });
-        self.overIndex = function() {
-            if (_this.currentIndex >= element.length - 1) {
-                _this.currentIndex = element.length - 1
-            }
-            if (_this.currentIndex < 0) {
-                _this.currentIndex = 0
-            }
-        }
-        self.isNumber = function(val) {
-            var regPos = /^\d+(\.\d+)?$/;
-            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/;
-            if (regPos.test(val) || regNeg.test(val)) {
-                return true
-            } else {
-                return false
-            }
-        }
-        var distance = function(pointA, pointB, type) {
-            var P1 = getBoundingClientRect(pointA),
-                P2 = getBoundingClientRect(pointB);
-            var dist = 0;
-            switch (type) {
-                case "AA":
-                    dist = Math.sqrt(((P1.left - P2.left) * (P1.left - P2.left)) + ((P1.top - P2.top) * (P1.top - P2.top)))
-                    break;
-                case "AB":
-                    dist = Math.sqrt(((P1.left - P2.right) * (P1.left - P2.right)) + ((P1.top - P2.top) * (P1.top - P2.top)))
-                    break;
-                case "AC":
-                    dist = Math.sqrt(((P1.left - P2.right) * (P1.left - P2.right)) + ((P1.top - P2.bottom) * (P1.top - P2.bottom)))
-                    break;
-                case "AD":
-                    dist = Math.sqrt(((P1.left - P2.left) * (P1.left - P2.left)) + ((P1.top - P2.bottom) * (P1.top - P2.bottom)))
-                    break;
-                case "BA":
-                    dist = Math.sqrt(((P1.right - P2.left) * (P1.right - P2.left)) + ((P1.top - P2.top) * (P1.top - P2.top)))
-                    break;
-                case "BB":
-                    dist = Math.sqrt(((P1.right - P2.right) * (P1.right - P2.right)) + ((P1.top - P2.top) * (P1.top - P2.top)))
-                    break;
-                case "BC":
-                    dist = Math.sqrt(((P1.right - P2.right) * (P1.right - P2.right)) + ((P1.top - P2.bottom) * (P1.top - P2.bottom)))
-                    break;
-                case "BD":
-                    dist = Math.sqrt(((P1.right - P2.left) * (P1.right - P2.left)) + ((P1.top - P2.bottom) * (P1.top - P2.bottom)))
-                    break;
-                case "CA":
-                    dist = Math.sqrt(((P1.left - P2.left) * (P1.left - P2.left)) + ((P1.bottom - P2.top) * (P1.bottom - P2.top)))
-                    break;
-                case "CB":
-                    dist = Math.sqrt(((P1.left - P2.right) * (P1.left - P2.right)) + ((P1.bottom - P2.top) * (P1.bottom - P2.top)))
-                    break;
-                case "CC":
-                    dist = Math.sqrt(((P1.left - P2.left) * (P1.left - P2.left)) + ((P1.bottom - P2.bottom) * (P1.bottom - P2.bottom)))
-                    break;
-                case "CD":
-                    dist = Math.sqrt(((P1.right - P2.left) * (P1.right - P2.left)) + ((P1.bottom - P2.bottom) * (P1.bottom - P2.bottom)))
-                    break;
-                case "DA":
-                    dist = Math.sqrt(((P1.left - P2.left) * (P1.left - P2.left)) + ((P1.bottom - P2.top) * (P1.bottom - P2.top)))
-                    break;
-                case "DB":
-                    dist = Math.sqrt(((P1.right - P2.right) * (P1.right - P2.right)) + ((P1.bottom - P2.top) * (P1.bottom - P2.top)))
-                    break;
-                case "DC":
-                    dist = Math.sqrt(((P1.right - P2.left) * (P1.right - P2.left)) + ((P1.bottom - P2.bottom) * (P1.bottom - P2.bottom)))
-                    break;
-                case "DD":
-                    dist = Math.sqrt(((P1.right - P2.right) * (P1.right - P2.right)) + ((P1.bottom - P2.bottom) * (P1.bottom - P2.bottom)))
-                    break
-            }
-            return dist
-        }
-        self.ruleFn = function(index, direction) {
-            var obj = {};
-            if (rules) {
-                obj = _self.getCurRule()
-            }
-            if (obj && typeof obj == "object" && typeof obj["line"] != "undefined") {
-                var line = obj["line"]
-            } else {
-                var line = _this.hotbtn.length
-            }
-            line = parseInt(line);
-            if (obj && typeof obj == "object" && typeof obj[_this.currentIndex] != "undefined" && typeof obj[_this.currentIndex][index] != "undefined") {
-                var objRules = obj[_this.currentIndex];
-                if (self.isNumber(objRules[index])) {
-                    _this.currentIndex = parseInt(_this.currentIndex) + parseInt(objRules[index])
-                } else if (Array.isArray(objRules[index])) {
-                    _this.reSetClass(objRules[index][0], objRules[index][1], objRules[index][2])
-                } else if (typeof objRules[index] == "function") {
-                    objRules[index].call(_this)
-                } else if (typeof obj["line"] != "undefined") {
-                    _this.currentIndex = _this.currentIndex + line
-                }
-            } else {
-                var jump = element[_this.currentIndex].getAttribute("data-" + direction);
-                jump = parseInt(jump);
-                var max = Math.sqrt(window.screen.width * window.screen.width + window.screen.height * window.screen.height);
-                if (direction == "up") {
-                    if (_this.currentIndex > line - 1 && !obj["autoMove"]) _this.currentIndex = jump ? _this.currentIndex - jump : _this.currentIndex - line;
-                    else if (obj && typeof obj["up"] == "object") _this.reSetClass(obj["up"][0], obj["up"][1], obj["up"][2]);
-                    else if (obj && typeof obj["up"] == "function") obj["up"].call(_this)
-                    else {
-                        var min1 = max,
-                            min2 = max,
-                            curIndex = _this.currentIndex,
-                            curIndex2 = _this.currentIndex;
-                        for (var i = 0; i < _this.hotbtn.length; i++) {
-                            var cur1 = distance(_this.current, _this.hotbtn[i], "AD");
-                            var cur2 = distance(_this.current, _this.hotbtn[i], "BC");
-                            if (cur1 < min1 && cur1 > 0 && getBoundingClientRect(_this.current).top > getBoundingClientRect(_this.hotbtn[i]).top && _this.currentIndex > i) {
-                                min1 = cur1;
-                                curIndex = i;
-                            }
-
-                            if (cur2 < min2 && cur2 > 0 && getBoundingClientRect(_this.current).top > getBoundingClientRect(_this.hotbtn[i]).top && _this.currentIndex > i) {
-                                min2 = cur2;
-                                curIndex2 = i;
-                            }
-                        }
-                        curIndex = min1 < min2 ? curIndex : curIndex2;
-                        _this.currentIndex = curIndex;
-                    }
-                } else if (direction == "left") {
-                    if ((_this.currentIndex) % line != 0 && !obj["autoMove"]) _this.currentIndex = jump ? _this.currentIndex - jump : _this.currentIndex - 1;
-                    else if (obj && typeof obj["left"] == "object") _this.reSetClass(obj["left"][0], obj["left"][1], obj["left"][2]);
-                    else if (obj && typeof obj["left"] == "function") obj["left"].call(_this)
-                    else {
-                        var min1 = max,
-                            min2 = max
-                        curIndex = _this.currentIndex, curIndex2 = _this.currentIndex;
-                        for (var i = 0; i < _this.hotbtn.length; i++) {
-                            var cur1 = distance(_this.current, _this.hotbtn[i], "AB");
-                            var cur2 = distance(_this.current, _this.hotbtn[i], "DC");
-                            if (cur1 < min1 && cur1 > 0 && getBoundingClientRect(_this.current).left > getBoundingClientRect(_this.hotbtn[i]).left && _this.currentIndex > i) {
-                                min1 = cur1;
-                                curIndex = i;
-                            }
-
-                            if (cur2 < min2 && cur2 > 0 && getBoundingClientRect(_this.current).left > getBoundingClientRect(_this.hotbtn[i]).left && _this.currentIndex > i) {
-                                min2 = cur2;
-                                curIndex2 = i;
-                            }
-                        }
-                        curIndex = min1 < min2 ? curIndex : curIndex2;
-                        _this.currentIndex = curIndex
-                    }
-                } else if (direction == "right") {
-                    if ((_this.currentIndex + 1) % line != 0 && !obj["autoMove"]) _this.currentIndex = jump ? _this.currentIndex + jump : _this.currentIndex + 1;
-                    else if (obj && typeof obj["right"] == "object") _this.reSetClass(obj["right"][0], obj["right"][1], obj["right"][2]);
-                    else if (obj && typeof obj["right"] == "function") obj["right"].call(_this)
-                    else {
-                        var min1 = max,
-                            min2 = max,
-                            curIndex = _this.currentIndex,
-                            curIndex2 = _this.currentIndex;
-                        for (var i = 0; i < _this.hotbtn.length; i++) {
-                            var cur1 = distance(_this.current, _this.hotbtn[i], "BA");
-                            var cur2 = distance(_this.current, _this.hotbtn[i], "CD");
-
-                            if (cur1 < min1 && cur1 > 0 && getBoundingClientRect(_this.current).right < getBoundingClientRect(_this.hotbtn[i]).right && _this.currentIndex < i) {
-                                min1 = cur1;
-                                curIndex = i;
-                            }
-
-                            if (cur2 < min2 && cur2 > 0 && getBoundingClientRect(_this.current).right < getBoundingClientRect(_this.hotbtn[i]).right && _this.currentIndex < i) {
-                                min2 = cur2;
-
-                                curIndex2 = i;
-                            }
-                        }
-                        curIndex = min1 < min2 ? curIndex : curIndex2;
-                        _this.currentIndex = curIndex;
-                    }
-                } else if (direction == "down") {
-                    if (_this.hotbtn.length - line > _this.currentIndex && !obj["autoMove"]) _this.currentIndex = jump ? _this.currentIndex + jump : _this.currentIndex + line;
-                    else if (obj && typeof obj["down"] == "object") _this.reSetClass(obj["down"][0], obj["down"][1], obj["down"][2]);
-                    else if (obj && typeof obj["down"] == "function") obj["down"].call(_this);
-                    else if (_this.currentIndex + line > _this.hotbtn.length - 1 && _this.currentIndex + line <= (line - _this.hotbtn.length % line) + _this.hotbtn.length - 1 && _this.hotbtn.length % line != 0 && isFloatLast) {
-                        _this.currentIndex = _this.currentIndex + line;
-                        self.overIndex()
-                    } else {
-                        var min1 = max,
-                            min2 = max,
-                            curIndex = _this.currentIndex,
-                            curIndex2 = _this.currentIndex;
-                        for (var i = 0; i < _this.hotbtn.length; i++) {
-                            var cur1 = distance(_this.current, _this.hotbtn[i], "DA");
-                            var cur2 = distance(_this.current, _this.hotbtn[i], "CB");
-                            if (cur1 < min1 && cur1 > 0 && getBoundingClientRect(_this.current).bottom < getBoundingClientRect(_this.hotbtn[i]).bottom && _this.currentIndex < i) {
-                                min1 = cur1;
-                                curIndex = i;
-                            }
-                            if (cur2 < min2 && cur2 > 0 && getBoundingClientRect(_this.current).bottom < getBoundingClientRect(_this.hotbtn[i]).bottom && _this.currentIndex < i) {
-                                min2 = cur2;
-                                curIndex2 = i;
-                            }
-                        }
-
-                        curIndex = min1 < min2 ? curIndex : curIndex2;
-                        _this.currentIndex = curIndex;
-                    }
-                }
-            }
-        }
-        self.rule = function(keyCode) {
-            if (element.length <= 0) {
-                console.log("初始化" + _this.className + "失败");
-                return
-            }
-            self.overIndex();
-            if (keyCode == btnLeft) {
-                self.ruleFn(0, "left")
-            } else if (keyCode == btnRight) {
-                self.ruleFn(2, "right")
-            } else if (keyCode == btnUp) {
-                self.ruleFn(1, "up")
-            } else if (keyCode == btnDown) {
-                self.ruleFn(3, "down")
-            }
-            self.overIndex()
-        }
-        this.BACK = function() {
-            self.onPressFn("back")
-        }
-        this.LEFT = function() {
-            self.onPressFn("left")
-        }
-        this.RIGHT = function() {
-            self.onPressFn("right")
-        }
-        this.UP = function() {
-            self.onPressFn("up")
-        }
-        this.DOWN = function() {
-            self.onPressFn("down")
-        }
-        self.onPressFn = function(e) {
-            var keyCode = "";
-            if (typeof e == "object") {
-                keyCode = e.keyCode
-            } else {
-                if (e == "left") {
-                    keyCode = btnLeft
-                } else if (e == "right") {
-                    keyCode = btnRight
-                } else if (e == "up") {
-                    keyCode = btnUp
-                } else if (e == "down") {
-                    keyCode = btnDown
-                } else if (e == "back") {
-                    keyCode = btnBack
-                }
-            }
-            _this.event = e;
-            _this.currentIndex = _this.currentIndex >= element.length - 1 ? element.length - 1 : _this.currentIndex;
-            _this.prev = element[_this.currentIndex];
-            _this.prevIndex = _this.currentIndex;
-            self.rule(keyCode);
-            _this.current = element[_this.currentIndex];
-            _this.currentIndex = _this.currentIndex;
-            _this.className = _this.className;
-            _this.onCommPress.call(_this);
-            if (keyCode == 8 || keyCode == btnBack) {
-                if (rules["#" + _this.currentId + ">." + _this.className] && (typeof rules["#" + _this.currentId + ">." + _this.className]["onBack"]) == "function") rules["#" + _this.currentId + ">." + _this.className]["onBack"].call(_this);
-                else if (rules[_this.className] && (typeof rules[_this.className]["onBack"]) == "function") rules[_this.className]["onBack"].call(_this);
-                else _this.onBack.call(_this)
-            }
-            if (rules && rules["#" + _this.currentId + ">." + _this.className] && (typeof rules["#" + _this.currentId + ">." + _this.className]["onPress"]) == "function") init.rules["#" + _this.currentId + ">." + _this.className]["onPress"].call(_this);
-            else if (rules && rules[_this.className] && (typeof rules[_this.className]["onPress"]) == "function") init.rules[_this.className]["onPress"].call(_this);
-            else _this.onPress.call(_this);
-            if (keyCode == btnEnter) {
-                if (rules["#" + _this.currentId + ">." + _this.className] && (typeof rules["#" + _this.currentId + ">." + _this.className]["onEnterPress"]) == "function") rules["#" + _this.currentId + ">." + _this.className]["onEnterPress"].call(_this);
-                else if (rules[_this.className] && (typeof rules[_this.className]["onEnterPress"]) == "function") rules[_this.className]["onEnterPress"].call(_this);
-                else _this.onEnterPress.call(_this)
-            }
-            _this.renderType = "";
-            _self.render(_this.currentIndex);
-            keydefault(e)
-        }
-        this.onLoad()
-    }
-    window.tvSysBtnBind = tvSysBtnBind
-})(window)

二进制
yaoli/yaoimages/auto_rotation.png


二进制
yaoli/yaoimages/auto_rotation@2x.png


二进制
yaoli/yaoimages/auto_rotation_click.png


二进制
yaoli/yaoimages/auto_rotation_click@2x.png


+ 0 - 0
yaoli/yaoimages/bg1280.jpg


部分文件因为文件数量过多而无法显示