vtourskin.xml 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238
  1. <krpano>
  2. <!-- krpano 1.19.pr13 - Virtual Tour Skin -->
  3. <!-- skin settings (can be overridden in the tour.xml) -->
  4. <skin_settings maps="false"
  5. maps_type="google"
  6. maps_bing_api_key=""
  7. maps_google_api_key=""
  8. maps_zoombuttons="false"
  9. gyro="true"
  10. webvr="true"
  11. webvr_gyro_keeplookingdirection="false"
  12. webvr_prev_next_hotspots="true"
  13. littleplanetintro="false"
  14. title="true"
  15. thumbs="true"
  16. thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
  17. thumbs_opened="false"
  18. thumbs_text="false"
  19. thumbs_dragging="true"
  20. thumbs_onhoverscrolling="false"
  21. thumbs_scrollbuttons="false"
  22. thumbs_scrollindicator="false"
  23. thumbs_loop="false"
  24. tooltips_buttons="false"
  25. tooltips_thumbs="false"
  26. tooltips_hotspots="false"
  27. tooltips_mapspots="false"
  28. deeplinking="false"
  29. loadscene_flags="MERGE"
  30. loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
  31. loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
  32. loadscene_blend_next="SLIDEBLEND(0.5, 0, 0.75, linear)"
  33. loadingtext="loading..."
  34. layout_width="100%"
  35. layout_maxwidth="814"
  36. controlbar_width="-24"
  37. controlbar_height="40"
  38. controlbar_offset="20"
  39. controlbar_offset_closed="-40"
  40. controlbar_overlap.no-fractionalscaling="10"
  41. controlbar_overlap.fractionalscaling="0"
  42. design_skin_images="vtourskin.png"
  43. design_bgcolor="0x2D3E50"
  44. design_bgalpha="0.8"
  45. design_bgborder="0"
  46. design_bgroundedge="1"
  47. design_bgshadow="0 4 10 0x000000 0.3"
  48. design_thumbborder_bgborder="3 0xFFFFFF 1.0"
  49. design_thumbborder_padding="2"
  50. design_thumbborder_bgroundedge="0"
  51. design_text_css="color:#FFFFFF; font-family:Arial;"
  52. design_text_shadow="1"
  53. />
  54. <!-- save the url path of this xml file (the url value will be adjusted during xml parsing) -->
  55. <vtourskinxmlpath url="./" />
  56. <!-- mouse / touch / keyboard(button) control settings - http://krpano.com/docu/xml/#control -->
  57. <control mouse="drag"
  58. touch="drag"
  59. zoomtocursor="false"
  60. zoomoutcursor="false"
  61. draginertia="0.1"
  62. dragfriction="0.9"
  63. movetoaccelerate="1.0"
  64. movetospeed="10.0"
  65. movetofriction="0.8"
  66. keybaccelerate="0.09"
  67. keybfriction="0.94"
  68. keybfovchange="0.25"
  69. mousefovchange="1.0"
  70. fovspeed="3.0"
  71. fovfriction="0.9"
  72. bouncinglimits="true"
  73. />
  74. <!-- mouse cursors - http://krpano.com/docu/xml/#cursors -->
  75. <cursors standard="default"
  76. dragging="move"
  77. moving="move"
  78. />
  79. <!-- ensure stagescale 2x for mobile devices (regardless if mobilescale is 0.5 or 1.0) -->
  80. <krpano stagescale="calc:stagescale * 2" if="stagescale LT 1.0" devices="mobile" />
  81. <!-- include VR support - http://krpano.com/plugins/webvr/ -->
  82. <include url="%SWFPATH%/plugins/webvr.xml" devices="html5" />
  83. <!-- overwrite some settings from the webvr.xml for the skin integration -->
  84. <plugin name="WebVR" keep="true" devices="html5"
  85. pluginurl="%SWFPATH%/plugins/webvr.js"
  86. url=""
  87. multireslock.desktop="true"
  88. multireslock.mobile.or.tablet="false"
  89. mobilevr_support="true"
  90. mobilevr_fake_support="true"
  91. onavailable="set(layer[webvr_enterbutton].width,0); skin_arrange_buttons(); webvr_onavailable();"
  92. onentervr="skin_showloading(false); webvr_onentervr(); webvr_setup(); skin_reloadscene_webvr();"
  93. onexitvr="webvr_onexitvr(); webvr_setup(); skin_reloadscene_webvr();"
  94. />
  95. <!-- webvr button style (adjust to match skin style) -->
  96. <style name="webvr_button_style"
  97. border="false"
  98. roundedge="calc:1.0"
  99. backgroundcolor="get:skin_settings.design_bgcolor" backgroundalpha="get:skin_settings.design_bgalpha"
  100. shadow="0.01" shadowrange="10.0" shadowangle="90.0" shadowcolor="0x30261B" shadowalpha="0.50"
  101. css="calc:skin_settings.design_text_css + ' color:#FFFFFF;font-size:' + 20*webvr_setup_scale*webvr_button_scale + 'px;'"
  102. />
  103. <!-- show a 'rotate the device' info when the mobile device is in portrait orientation in VR mode -->
  104. <layer name="webvr_rotate_to_landscape_request" keep="true" vr="true" devices="mobile"
  105. url="rotate_device.png" scale="0.5"
  106. align="top" edge="center" y="28%"
  107. autoalpha="true" alpha="0.0"
  108. enabled="false"
  109. />
  110. <events name="webvr_events" keep="true" devices="html5"
  111. onxmlcomplete="webvr_set_startup_view()"
  112. onresize.mobile="webvr_act_as_gyro_in_portrait_mode();"
  113. onloadcomplete="delayedcall(0.5, if(webvr.isenabled AND scene.count GT 1 AND skin_settings.webvr_prev_next_hotspots, set(hotspot[webvr_prev_scene].visible,true); set(hotspot[webvr_next_scene].visible,true); ); );"
  114. onviewchange=""
  115. />
  116. <action name="webvr_set_startup_view">
  117. if((webvr.isenabled OR plugin[skin_gyro].enabled) AND skin_settings.webvr_gyro_keeplookingdirection == false,
  118. skin_lookat( get(xml.view.hlookat) );
  119. );
  120. </action>
  121. <action name="webvr_setup">
  122. if(webvr.isenabled,
  123. copy(loadscene_flags_backup, skin_settings.loadscene_flags);
  124. set(skin_settings.loadscene_flags, MERGE|KEEPVIEW|KEEPMOVING|NOPREVIEW);
  125. webvr_act_as_gyro_in_portrait_mode(true);
  126. if(scene.count GT 1 AND skin_settings.webvr_prev_next_hotspots,
  127. set(hotspot[webvr_prev_scene].visible, true);
  128. set(hotspot[webvr_next_scene].visible, true);
  129. set(events[webvr_events].onviewchange, webvr_menu_following());
  130. );
  131. ,
  132. if(loadscene_flags_backup !== null, copy(skin_settings.loadscene_flags, loadscene_flags_backup));
  133. if(layer[webvr_rotate_to_landscape_request], tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 0.0); );
  134. set(hotspot[webvr_prev_scene].visible, false);
  135. set(hotspot[webvr_next_scene].visible, false);
  136. set(events[webvr_events].onviewchange, null);
  137. );
  138. </action>
  139. <action name="webvr_act_as_gyro_in_portrait_mode">
  140. if(device.mobile AND webvr.isenabled,
  141. div(aspect, stagewidth, stageheight);
  142. if(aspect != lastaspect OR '%1' == 'true',
  143. copy(lastaspect, aspect);
  144. if(stagewidth GT stageheight,
  145. <!-- landscape orientation - use stereo rendering and a direct/fast gyro sensor mode -->
  146. set(display.stereo, true);
  147. set(webvr.mobilevr_sensor_mode, 3);
  148. webvr.update();
  149. tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 0.0);
  150. ,
  151. <!-- portrait orientation - use normal rendering and a smoother/slower gyro sensor mode -->
  152. set(display.stereo, false);
  153. set(webvr.mobilevr_sensor_mode, 1);
  154. webvr.update();
  155. tween(layer[webvr_rotate_to_landscape_request].alpha, 1.0);
  156. delayedcall(3.0, tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 1.0); );
  157. );
  158. );
  159. ,
  160. set(lastaspect, 0);
  161. );
  162. </action>
  163. <!-- VR scene switching hotspots -->
  164. <style name="webvr_menu_style" depth="800" scale="0.5" distorted="true" ath="0" atv="45" alpha="0.5" />
  165. <hotspot name="webvr_prev_scene" keep="true" style="skin_base|webvr_menu_style" crop="0|64|64|64" ox="-64" onover="tween(scale,0.6);" onout="tween(scale,0.5);" vr_timeout="750" onclick="skin_nextscene_loop(-1);" visible="false" devices="html5.and.webgl" />
  166. <hotspot name="webvr_next_scene" keep="true" style="skin_base|webvr_menu_style" crop="64|64|64|64" ox="+64" onover="tween(scale,0.6);" onout="tween(scale,0.5);" vr_timeout="750" onclick="skin_nextscene_loop(+1);" visible="false" devices="html5.and.webgl" />
  167. <!-- floating/following VR hotspots -->
  168. <action name="webvr_menu_following" type="Javascript" devices="html5"><![CDATA[
  169. var hs1 = krpano.get("hotspot[webvr_prev_scene]");
  170. var hs2 = krpano.get("hotspot[webvr_next_scene]");
  171. if(!hs1.hovering && !hs2.hovering)
  172. {
  173. var f = 0.01; // following speed factor
  174. var h = krpano.view.hlookat;
  175. var v = krpano.view.vlookat;
  176. var hsh = hs1.ath;
  177. var hsv = hs1.atv;
  178. h = (h -(h|0)) + (((h|0) +360180)%360) - 180.0;
  179. v = (v -(v|0)) + (((v|0) +360180)%360) - 180.0;
  180. hsh = (hsh-(hsh|0)) + (((hsh|0)+360180)%360) - 180.0;
  181. var dh = h - hsh;
  182. dh += (dh > 180) ? -360 : (dh < -180) ? 360 : 0
  183. hsh += dh*f;
  184. var a = Math.abs(v - hsv) / 90.0;
  185. a = 1.0 * Math.max(1.0 - 2.0*Math.sqrt(a), 0);
  186. v = v + 55.0 - v*1.5;
  187. hsv = hsv*(1.0 - f) + v*f;
  188. hs1.ath = hs2.ath = hsh;
  189. hs1.atv = hs2.atv = hsv;
  190. hs1.alpha = hs2.alpha = a;
  191. }
  192. ]]></action>
  193. <!-- VR support -->
  194. <!-- skin styles -->
  195. <!-- skin_base - the base skin image -->
  196. <style name="skin_base" url="calc:vtourskinxmlpath.url + skin_settings.design_skin_images" />
  197. <!-- skin_glow - button glowing (if additional ondown,onup,onout,over events are needed, this style provides ondown2,onup2,onover2,onout2 events) -->
  198. <style name="skin_glow"
  199. ondown="copy(skin_lockglow,name); skin_buttonglow(get(name)); if(ondown2, ondown2() );"
  200. onover="if(skin_lockglow === null, copy(skin_lockglow,name); skin_buttonglow(get(name),0.3) ); if(onover2, onover2() );"
  201. onout="if(skin_lockglow === name AND !pressed, skin_buttonglow(null);delete(skin_lockglow); ); if(onout2, onout2() );"
  202. onup="if(onup2, onup2()); delayedcall(0, if(hovering AND enabled, skin_buttonglow(get(name),0.3); , skin_buttonglow(null);delete(skin_lockglow); ); );"
  203. />
  204. <!-- skin_thumbtext_style - style/textfield for the (optional, skin_settings.thumbs_text) thumbnails texts -->
  205. <style name="skin_thumbtext_style" type="text" align="bottom" width="100%" y="5" enabled="false" background="false" border="false" css="calc:skin_settings.design_text_css + ' text-align:center; font-size:10px;'" textshadow="get:skin_settings.design_text_shadow" />
  206. <!-- skin_hotspotstyle - style for the hotspots -->
  207. <style name="skin_hotspotstyle" url="vtourskin_hotspot.png" scale="0.5" edge="top" distorted="true"
  208. tooltip=""
  209. linkedscene=""
  210. linkedscene_lookat=""
  211. onclick="skin_hotspotstyle_click();"
  212. onover="tween(scale,0.55);"
  213. onout="tween(scale,0.5);"
  214. onloaded="if(linkedscene AND skin_settings.tooltips_hotspots, copy(tooltip,scene[get(linkedscene)].title); loadstyle(skin_tooltips); );"
  215. />
  216. <action name="skin_hotspotstyle_click" scope="local">
  217. if(caller.linkedscene,
  218. copy(hs_linkedscene, caller.linkedscene);
  219. if(caller.linkedscene_lookat, txtsplit(caller.linkedscene_lookat, ',', hs_lookat_h, hs_lookat_v, hs_lookat_fov); );
  220. set(caller.enabled, false);
  221. skin_hidetooltips();
  222. tween(caller.depth|caller.alpha|caller.oy|caller.rx, 4000|0.0|-50|-60, 0.5, default,
  223. skin_loadscene(get(hs_linkedscene), get(skin_settings.loadscene_blend));
  224. if(hs_lookat_h !== null, skin_lookat(get(hs_lookat_h), get(hs_lookat_v), get(hs_lookat_fov)); );
  225. skin_updatescroll();
  226. );
  227. );
  228. </action>
  229. <!-- skin_tooltip - style for the thumb, hotspot and mapspot tooltips -->
  230. <style name="skin_tooltips"
  231. onover.mouse="copy(layer[skin_tooltip].html, tooltip);
  232. set(layer[skin_tooltip].visible, true);
  233. tween(layer[skin_tooltip].alpha, 1.0, 0.1);
  234. asyncloop(hovering, copy(layer[skin_tooltip].x,mouse.stagex); copy(layer[skin_tooltip].y,mouse.stagey); );"
  235. onout.mouse="tween(layer[skin_tooltip].alpha, 0.0, 0.1, default, set(layer[skin_tooltip].visible,false), copy(layer[skin_tooltip].x,mouse.stagex); copy(layer[skin_tooltip].y,mouse.stagey); );"
  236. />
  237. <!-- the tooltip textfield -->
  238. <layer name="skin_tooltip" keep="true"
  239. type="text"
  240. parent="STAGE"
  241. visible="false" alpha="0" enabled="false" zorder="2"
  242. align="lefttop" edge="bottom" oy="-2" width="200"
  243. background="false" backgroundcolor="0xFFFFFF" backgroundalpha="1.0"
  244. border="false" bordercolor="0x000000" borderalpha="1.0" borderwidth="1.0" roundedge="0"
  245. shadow="0.0" shadowrange="4.0" shadowangle="45" shadowcolor="0x000000" shadowalpha="1.0"
  246. textshadow="get:skin_settings.design_text_shadow" textshadowrange="6.0" textshadowangle="90" textshadowcolor="0x000000" textshadowalpha="1.0"
  247. css="calc:skin_settings.design_text_css + ' text-align:center; font-size:16px;'"
  248. html=""
  249. />
  250. <!-- skin layout -->
  251. <layer name="skin_layer" keep="true" type="container" align="top" width="get:skin_settings.layout_width" maxwidth="get:skin_settings.layout_maxwidth" height="100%" maskchildren="true" visible="false" bgcapture="false" zorder="1">
  252. <layer name="skin_scroll_window" type="container" align="bottom" width="100%" height="100%" x="0" y="calc:skin_settings.controlbar_offset + skin_settings.controlbar_height - skin_settings.controlbar_overlap" maskchildren="true" onloaded="skin_calc_opened_closed();" zorder="1">
  253. <layer name="skin_scroll_layer" type="container" align="bottom" width="get:skin_settings.controlbar_width" height="100%" x="0" y="200" y_offset="get:skin_settings.controlbar_overlap" accuracy="1" bgalpha="get:skin_settings.design_bgalpha" bgcolor="get:skin_settings.design_bgcolor" bgborder="get:skin_settings.design_bgborder" bgroundedge="get:skin_settings.design_bgroundedge" bgshadow="get:skin_settings.design_bgshadow">
  254. <layer name="skin_title" type="text" align="lefttop" edge="leftbottom" x="4" y="0" zorder="4" enabled="false" background="false" border="false" css="calc:skin_settings.design_text_css + ' text-align:left; font-style:italic; font-size:12px;'" textshadow="get:skin_settings.design_text_shadow" visible="false" onautosized="skin_video_updateseekbarwidth();" />
  255. <layer name="skin_video_controls" type="container" align="lefttop" edge="leftbottom" width="100%" height="18" visible="false">
  256. <layer name="skin_video_seekbar_container" type="container" align="lefttop" width="100%" height="100%" bgcapture="true" ondown="skin_video_ondownseeking();" >
  257. <layer name="skin_video_seekbar" type="container" bgcolor="0xFFFFFF" bgalpha="0.25" align="center" width="100%" height="2">
  258. <layer name="skin_video_loadbar" type="container" bgcolor="0xFFFFFF" bgalpha="0.5" align="left" width="0" height="2" />
  259. <layer name="skin_video_seekpos" type="container" bgcolor="0xFFFFFF" bgalpha="1.0" align="left" edge="center" x="0" bgroundedge="8" width="10" height="10" />
  260. </layer>
  261. </layer>
  262. <layer name="skin_video_time" type="text" align="rightbottom" x="4" enabled="false" background="false" border="false" css="calc:skin_settings.design_text_css + ' text-align:left; font-style:italic; font-size:12px;'" textshadow="get:skin_settings.design_text_shadow" html="0:00 / 0:00" />
  263. </layer>
  264. <layer name="skin_scroll_container" type="container" align="lefttop" width="100%" height="100%" x="0" y="0" bgroundedge="get:skin_settings.design_bgroundedge" maskchildren="true">
  265. <layer name="skin_thumbs_container" type="container" align="lefttop" width="100%" height="100%" visible="false">
  266. <layer name="skin_thumbs_scrollleft" style="skin_base|skin_glow" crop="0|64|64|64" align="lefttop" edge="left" x="5" y="50" scale="0.5" zorder="2" alpha="1.0" ondown2="asyncloop(pressed, layer[skin_thumbs].scrollby(+2,0));" visible="false" />
  267. <layer name="skin_thumbs_scrollright" style="skin_base|skin_glow" crop="64|64|64|64" align="righttop" edge="right" x="5" y="50" scale="0.5" zorder="2" alpha="1.0" ondown2="asyncloop(pressed, layer[skin_thumbs].scrollby(-2,0));" visible="false" />
  268. <layer name="skin_thumbs_scrollindicator" type="container" bgcolor="0xFFFFFF" bgalpha="0.25" align="lefttop" width="0" y="100" height="2" visible="false" enabled="false" />
  269. <layer name="skin_thumbs" state="closed" url.flash="%SWFPATH%/plugins/scrollarea.swf" url.html5="%SWFPATH%/plugins/scrollarea.js" direction="h" align="top" width="100%" height="100" zorder="1" onloaded="skin_updatescroll();" onscroll="skin_updatethumbscroll();" />
  270. </layer>
  271. <layer name="skin_map_container" type="container" align="leftop" width="100%" height="100%" bgroundedge="get:skin_settings.design_bgroundedge" maskchildren="true">
  272. <layer name="skin_map" state="closed" url="" visible="false" align="lefttop" width="100%" height="50%" x="0" y="0" zorder="1" lat="0" lng="0" zoom="10" bgalpha="0" maptype="satellite" onmapready="skin_addmapspots();">
  273. <maptypecontrol visible="true" align="righttop" x="5" y="5" buttonalign="v" scale.mobile="1.5" />
  274. <radar visible="false" headingoffset="0" />
  275. <spotstyle name="DEFAULT" url="vtourskin_mapspot.png" activeurl="vtourskin_mapspotactive.png" edge="bottom" x="-5" y="-8" scale="0.5" />
  276. <layer name="skin_map_zoom_in" style="skin_base" visible="get:skin_settings.maps_zoombuttons" crop="9|512|46|64" align="right" x="0" y="-40" zorder="2" ondown="layer[skin_map].zoomin(); skin_buttonglow(get(name));" onup="skin_buttonglow(null);" />
  277. <layer name="skin_map_zoom_out" style="skin_base" visible="get:skin_settings.maps_zoombuttons" crop="73|512|46|64" align="right" x="0" y="+40" zorder="2" ondown="layer[skin_map].zoomout(); skin_buttonglow(get(name));" onup="skin_buttonglow(null);" />
  278. </layer>
  279. </layer>
  280. </layer>
  281. </layer>
  282. </layer>
  283. <layer name="skin_splitter_bottom" type="container" align="bottom" width="100%" height="calc:skin_settings.controlbar_offset + skin_settings.controlbar_height - skin_settings.controlbar_overlap" y="0" maskchildren="true" onloaded="skin_calc_opened_closed();" zorder="2">
  284. <layer name="skin_control_bar_bg" type="container" align="bottom" width="get:skin_settings.controlbar_width" height="calc:skin_settings.controlbar_height + skin_settings.controlbar_overlap" x="0" y="get:skin_settings.controlbar_offset" bgcolor="get:skin_settings.design_bgcolor" bgalpha="get:skin_settings.design_bgalpha" bgborder="get:skin_settings.design_bgborder" bgroundedge="get:skin_settings.design_bgroundedge" bgshadow="get:skin_settings.design_bgshadow" />
  285. </layer>
  286. <layer name="skin_control_bar" type="container" align="bottom" width="get:skin_settings.controlbar_width" height="calc:skin_settings.controlbar_height" x="0" y="get:skin_settings.controlbar_offset" onloaded="skin_calc_opened_closed();" zorder="3">
  287. <layer name="skin_control_bar_buttons" type="container" align="leftbottom" width="100%" height="get:skin_settings.controlbar_height">
  288. <layer name="skin_btn_prev" style="skin_base|skin_glow" crop="0|64|64|64" align="left" x="5" y="0" scale="0.5" alpha="0.5" onclick="if(skin_settings.thumbs_loop, skin_nextscene_loop(-1), skin_nextscene(-1) );" />
  289. <layer name="skin_btn_thumbs" style="skin_base|skin_glow" crop="0|128|64|64" align="left" x="50" y="0" scale="0.5" ondown2="skin_showmap(false); skin_showthumbs();" />
  290. <layer name="skin_btn_map" style="skin_base|skin_glow" crop="64|128|64|64" align="left" x="90" y="0" scale="0.5" ondown2="skin_showthumbs(false); skin_showmap();" visible="false" />
  291. <layer name="skin_btn_navi" type="container" align="center" x="0" width="240" height="32">
  292. <layer name="skin_btn_left" style="skin_base|skin_glow" crop="0|192|64|64" align="center" x="-100" y="0" scale="0.5" ondown2="set(hlookat_moveforce,-1);" onup2="set(hlookat_moveforce,0);" />
  293. <layer name="skin_btn_right" style="skin_base|skin_glow" crop="64|192|64|64" align="center" x="-60" y="0" scale="0.5" ondown2="set(hlookat_moveforce,+1);" onup2="set(hlookat_moveforce,0);" />
  294. <layer name="skin_btn_up" style="skin_base|skin_glow" crop="0|256|64|64" align="center" x="-20" y="0" scale="0.5" ondown2="set(vlookat_moveforce,-1);" onup2="set(vlookat_moveforce,0);" />
  295. <layer name="skin_btn_down" style="skin_base|skin_glow" crop="64|256|64|64" align="center" x="+20" y="0" scale="0.5" ondown2="set(vlookat_moveforce,+1);" onup2="set(vlookat_moveforce,0);" />
  296. <layer name="skin_btn_in" style="skin_base|skin_glow" crop="0|320|64|64" align="center" x="+60" y="0" scale="0.5" ondown2="set(fov_moveforce,-1);" onup2="set(fov_moveforce,0);" />
  297. <layer name="skin_btn_out" style="skin_base|skin_glow" crop="64|320|64|64" align="center" x="+100" y="0" scale="0.5" ondown2="set(fov_moveforce,+1);" onup2="set(fov_moveforce,0);" />
  298. </layer>
  299. <layer name="skin_btn_gyro" style="skin_base|skin_glow" crop="0|384|64|64" align="center" x="+140" y="0" scale="0.5" onclick="switch(plugin[skin_gyro].enabled); if(plugin[skin_gyro].enabled, skin_showmap(false));" visible="false" devices="html5" />
  300. <layer name="skin_btn_vr" style="skin_base|skin_glow" crop="0|0|80|64" align="center" x="+146" y="0" scale="0.5" onclick="webvr.enterVR();" visible="false" />
  301. <layer name="skin_btn_fs" style="skin_base|skin_glow" crop="0|576|64|64" align="right" x="90" y="0" scale="0.5" onclick="switch(fullscreen);" devices="fullscreensupport" />
  302. <layer name="skin_btn_hide" style="skin_base|skin_glow" crop="0|448|64|64" align="right" x="50" y="0" scale="0.5" onclick="skin_hideskin()" />
  303. <layer name="skin_btn_show" type="container" bgcapture="true" align="bottom" width="100%" height="get:skin_settings.controlbar_height" y="calc:skin_settings.controlbar_height - skin_settings.controlbar_offset_closed" onclick="skin_showskin()" onhover="tween(alpha,1.0);" onout="tween(alpha,0.25);" ondown.touch="onhover();" onup.touch="onout();" visible="false" capture="false" alpha="0.0">
  304. <layer name="skin_btn_show_icon" style="skin_base" crop="64|448|64|64" scale="0.5" align="bottom" y="2" enabled="false" />
  305. </layer>
  306. <layer name="skin_btn_next" style="skin_base|skin_glow" crop="64|64|64|64" align="right" x="5" y="0" scale="0.5" alpha="0.5" onclick="if(skin_settings.thumbs_loop, skin_nextscene_loop(+1), skin_nextscene(+1) );" />
  307. </layer>
  308. </layer>
  309. <layer name="skin_loadingtext" type="text" align="center" x="5" y="-5" html="get:skin_settings.loadingtext" visible="false" background="false" border="false" enabled="false" css="calc:skin_settings.design_text_css + ' text-align:center; font-style:italic; font-size:22px;'" textshadow="get:skin_settings.design_text_shadow" />
  310. <layer name="skin_buttonglow" style="skin_base" crop="64|384|64|64" align="center" x="0" y="1" scale="1.0" alpha="0.0" visible="false" enabled="false" />
  311. <layer name="skin_thumbborder" type="container" x="get:skin_settings.design_thumbborder_padding" y="get:skin_settings.design_thumbborder_padding" width="calc:skin_settings.thumbs_width - 2*skin_settings.design_thumbborder_padding" height="calc:skin_settings.thumbs_height - 2*skin_settings.design_thumbborder_padding" visible="false" enabled="false" align="lefttop" bgborder="get:skin_settings.design_thumbborder_bgborder" bgroundedge="get:skin_settings.design_thumbborder_bgroundedge" />
  312. </layer>
  313. <!-- previous/next scene buttons for the hidden skin mode -->
  314. <layer name="skin_btn_prev_fs" keep="true" type="container" align="lefttop" x="-50" width="40" height="100%" bgcapture="true" alpha="0.25" capture="false" zorder="2" onclick="skin_nextscene_loop(-1);" onhover="tween(alpha,1.0);" onout="tween(alpha,0.25);" ondown.touch="onhover();" onup.touch="onout();">
  315. <layer name="skin_btn_prev_fs_icon" style="skin_base" crop="0|64|64|64" align="center" scale="0.5" enabled="false" />
  316. </layer>
  317. <layer name="skin_btn_next_fs" keep="true" type="container" align="righttop" x="-50" width="40" height="100%" bgcapture="true" alpha="0.25" capture="false" zorder="2" onclick="skin_nextscene_loop(+1);" onhover="tween(alpha,1.0);" onout="tween(alpha,0.25);" ondown.touch="onhover();" onup.touch="onout();">
  318. <layer name="skin_btn_next_fs_icon" style="skin_base" crop="64|64|64|64" align="center" scale="0.5" enabled="false" />
  319. </layer>
  320. <!-- gyro plugin -->
  321. <plugin name="skin_gyro" keep="true" url="" html5_url="%SWFPATH%/plugins/gyro2.js" softstart="1.0" enabled="false" onavailable="skin_arrange_buttons();" devices="html5" />
  322. <!-- skin events -->
  323. <events name="skin_events" keep="true"
  324. onxmlcomplete="set(events[skin_events].onxmlcomplete,null); skin_startup();"
  325. onnewpano="skin_showloading(true); skin_update_scene_infos(); skin_deeplinking_update_url();"
  326. onremovepano="skin_showloading(true);"
  327. onloadcomplete="skin_showloading(false);"
  328. onidle="skin_deeplinking_update_url();"
  329. onresize="skin_onresize();"
  330. onenterfullscreen.fullscreensupport="set(layer[skin_btn_fs].crop, '64|576|64|64');"
  331. onexitfullscreen.fullscreensupport="set(layer[skin_btn_fs].crop, '0|576|64|64');"
  332. onkeydown="skin_keydown_event();"
  333. />
  334. <!-- skin actions -->
  335. <action name="skin_startup">
  336. <!-- apply skin settings on startup -->
  337. if(skin_settings.thumbs,
  338. if(skin_settings.thumbs_opened, set(layer[skin_thumbs].state,'opened'); set(layer[skin_thumbs_container].visible,true); );
  339. copy(layer[skin_thumbs].draggable, skin_settings.thumbs_dragging);
  340. if(skin_settings.thumbs_onhoverscrolling AND device.mouse,
  341. set(layer[skin_thumbs].draggable, false);
  342. set(layer[skin_thumbs].onhover_autoscrolling, true);
  343. );
  344. );
  345. if(skin_settings.gyro AND !device.desktop AND device.html5,
  346. copy(plugin[skin_gyro].url, plugin[skin_gyro].html5_url);
  347. );
  348. if(skin_settings.webvr AND device.html5 AND device.webgl,
  349. copy(plugin[WebVR].url, plugin[WebVR].pluginurl);
  350. );
  351. if(skin_settings.maps == true,
  352. set(layer[skin_btn_map].visible, true);
  353. if(device.flash,
  354. copy(layer[skin_map].key, skin_settings.maps_bing_api_key);
  355. set(layer[skin_map].url, '%SWFPATH%/plugins/bingmaps.swf');
  356. ,
  357. if(skin_settings.maps_type == 'bing',
  358. copy(layer[skin_map].key, skin_settings.maps_bing_api_key);
  359. set(layer[skin_map].url, '%SWFPATH%/plugins/bingmaps.js');
  360. ,
  361. copy(layer[skin_map].key, skin_settings.maps_google_api_key);
  362. set(layer[skin_map].url, '%SWFPATH%/plugins/googlemaps.js');
  363. );
  364. );
  365. );
  366. if(skin_settings.littleplanetintro AND (device.webgl OR device.flash),
  367. skin_setup_littleplanetintro();
  368. );
  369. skin_addthumbs();
  370. skin_onresize();
  371. skin_updatescroll();
  372. set(layer[skin_layer].visible, false);
  373. </action>
  374. <action name="skin_addthumbs">
  375. if(skin_settings.thumbs == false,
  376. set(layer[skin_btn_thumbs].visible,false);
  377. ,
  378. copy(thumbwidth, skin_settings.thumbs_width);
  379. copy(thumbheight, skin_settings.thumbs_height);
  380. copy(thumbpadding, skin_settings.thumbs_padding);
  381. copy(thumbcrop, skin_settings.thumbs_crop);
  382. add(thumbxoffset, thumbwidth, thumbpadding);
  383. mul(thumbxcenter, thumbxoffset, 0.5);
  384. mul(thumbbarwidth, thumbxoffset, scene.count);
  385. add(thumbbarwidth, thumbpadding);
  386. add(thumbbarheight, thumbpadding, thumbheight);
  387. add(thumbbarheight, thumbpadding);
  388. if(skin_settings.thumbs_scrollindicator,
  389. copy(layer[skin_thumbs_scrollindicator].y, thumbbarheight);
  390. add(thumbbarheight, layer[skin_thumbs_scrollindicator].height);
  391. );
  392. copy(layer[skin_thumbs].height, thumbbarheight);
  393. copy(layer[skin_thumbs].width, thumbbarwidth);
  394. mul(halfheight, thumbbarheight, 0.5);
  395. copy(layer[skin_thumbs_scrollleft].y, halfheight);
  396. copy(layer[skin_thumbs_scrollright].y, halfheight);
  397. set(thumb_cnt,0);
  398. for(set(i,0), i LT scene.count, inc(i),
  399. inc(thumb_cnt);
  400. txtadd(thumbname,'skin_thumb_',get(i));
  401. addlayer(get(thumbname));
  402. copy(layer[get(thumbname)].url, scene[get(i)].thumburl);
  403. set(layer[get(thumbname)].keep, true);
  404. set(layer[get(thumbname)].parent, 'skin_thumbs');
  405. set(layer[get(thumbname)].align, lefttop);
  406. copy(layer[get(thumbname)].crop, thumbcrop);
  407. copy(layer[get(thumbname)].width, thumbwidth);
  408. copy(layer[get(thumbname)].height, thumbheight);
  409. mul(thumbx, i, thumbxoffset);
  410. add(thumbx, thumbpadding);
  411. copy(layer[get(thumbname)].x, thumbx);
  412. copy(layer[get(thumbname)].y, thumbpadding);
  413. add(scene[get(i)].thumbx, thumbx, thumbxcenter);
  414. copy(scene[get(i)].thumby, thumbpadding);
  415. set(layer[get(thumbname)].linkedscene, get(scene[get(i)].name) );
  416. set(layer[get(thumbname)].onclick, copy(layer[skin_thumbborder].parent, name); skin_loadscene(get(linkedscene),get(skin_settings.loadscene_blend)); );
  417. if(skin_settings.tooltips_thumbs,
  418. set(layer[get(thumbname)].tooltip, get(scene[get(i)].title) );
  419. layer[get(thumbname)].loadstyle(skin_tooltips);
  420. );
  421. if(skin_settings.thumbs_text,
  422. txtadd(thumbtext, 'skin_thumbtext_', get(i));
  423. addlayer(get(thumbtext));
  424. layer[get(thumbtext)].loadstyle(skin_thumbtext_style);
  425. set(layer[get(thumbtext)].keep, true);
  426. set(layer[get(thumbtext)].parent, get(thumbname));
  427. set(layer[get(thumbtext)].html, get(scene[get(i)].title));
  428. );
  429. );
  430. if(thumb_cnt == 1,
  431. set(layer[skin_thumbs].align, 'lefttop');
  432. );
  433. );
  434. </action>
  435. <action name="skin_addmapspots">
  436. for(set(i,0), i LT scene.count, inc(i),
  437. if(scene[get(i)].lat,
  438. txtadd(spotname, 'spot', get(i));
  439. txtadd(spotclickevent, 'skin_hidetooltips(); activatespot(',get(spotname),'); skin_loadscene(', get(scene[get(i)].name), ',get(skin_settings.loadscene_blend)); skin_updatescroll(); delayedcall(0.5,skin_showmap(false));');
  440. copy(scene[get(i)].mapspotname, spotname);
  441. addspot(get(spotname), get(scene[get(i)].lat), get(scene[get(i)].lng), get(scene[get(i)].heading), false, get(spotclickevent), null);
  442. if(skin_settings.tooltips_mapspots,
  443. set(layer[skin_map].spot[get(spotname)].tooltip, get(scene[get(i)].title) );
  444. txtadd(layer[skin_map].spot[get(spotname)].onover, 'set(hovering,true);', get(style[skin_tooltips].onover) );
  445. txtadd(layer[skin_map].spot[get(spotname)].onout, 'set(hovering,false);', get(style[skin_tooltips].onout) );
  446. );
  447. );
  448. );
  449. if(xml.scene != null,
  450. activatespot( get(scene[get(xml.scene)].mapspotname) );
  451. ,
  452. activatespot(spot0);
  453. );
  454. <!-- zoom and pan the map to see all spots at the same time -->
  455. zoomToSpotsExtent();
  456. </action>
  457. <action name="skin_setup_littleplanetintro">
  458. copy(lp_scene, xml.scene);
  459. copy(lp_hlookat, view.hlookat);
  460. copy(lp_vlookat, view.vlookat);
  461. copy(lp_fov, view.fov);
  462. copy(lp_fovmax, view.fovmax);
  463. copy(lp_limitview, view.limitview);
  464. set(view.fovmax, 170);
  465. set(view.limitview, lookto);
  466. set(view.vlookatmin, 90);
  467. set(view.vlookatmax, 90);
  468. lookat(calc(lp_hlookat - 180), 90, 150, 1, 0, 0);
  469. set(events[lp_events].onloadcomplete,
  470. delayedcall(0.5,
  471. if(lp_scene === xml.scene,
  472. set(control.usercontrol, off);
  473. copy(view.limitview, lp_limitview);
  474. set(view.vlookatmin, null);
  475. set(view.vlookatmax, null);
  476. tween(view.hlookat|view.vlookat|view.fov|view.distortion, calc('' + lp_hlookat + '|' + lp_vlookat + '|' + lp_fov + '|' + 0.0),
  477. 3.0, easeOutQuad,
  478. set(control.usercontrol, all);
  479. tween(view.fovmax, get(lp_fovmax));
  480. );
  481. );
  482. );
  483. );
  484. </action>
  485. <action name="skin_lookat">
  486. if(webvr.isenabled,
  487. <!-- adjust the VR prev/next hotspots for the view change -->
  488. calc(hlookat_offset, %1 - view.hlookat);
  489. add(hotspot[webvr_prev_scene].ath, hlookat_offset);
  490. add(hotspot[webvr_next_scene].ath, hlookat_offset);
  491. );
  492. if(plugin[skin_gyro].enabled,
  493. <!-- reset the gyro tracking -->
  494. plugin[skin_gyro].resetsensor(%1);
  495. );
  496. <!-- change the view -->
  497. lookat(%1, %2, %3);
  498. </action>
  499. <action name="skin_onresize">
  500. mul(mh, area.pixelheight, -1);
  501. if(layer[skin_thumbs].state == 'opened', add(mh,layer[skin_thumbs].height); );
  502. if(layer[skin_map].state == 'opened', sub(hh,area.pixelheight,skin_settings.controlbar_offset); sub(hh,layer[skin_control_bar].height); sub(hh,32); add(mh,hh); add(mh,skin_settings.controlbar_overlap); sub(mh, layer[skin_scroll_layer].y_offset); copy(layer[skin_map].height, hh); );
  503. add(mh, layer[skin_scroll_layer].y_offset);
  504. set(layer[skin_scroll_layer].y, get(mh));
  505. skin_video_updateseekbarwidth();
  506. skin_arrange_buttons();
  507. </action>
  508. <!-- determine the visibility of the buttons and calculate their positions -->
  509. <action name="skin_arrange_buttons">
  510. calc(show_selbuttons, scene.count GT 1);
  511. calc(show_thumbutton, skin_settings.thumbs == true);
  512. calc(show_mapbutton, skin_settings.maps == true);
  513. calc(show_gyrobutton, plugin[skin_gyro].available == true AND (view.vlookatrange == 180 OR lp_scene === xml.scene));
  514. calc(show_vrbutton, webvr.isavailable == true);
  515. calc(show_fsbutton, device.fullscreensupport == true);
  516. set(lpos,6);
  517. set(cpos,0);
  518. if(show_gyrobutton, dec(cpos,20));
  519. if(show_vrbutton, dec(cpos,24));
  520. set(rpos,6);
  521. calc(show_dirbuttons, !device.mobile AND ((area.pixelwidth + 2*cpos) GT 520));
  522. copy(layer[skin_btn_navi].visible, show_dirbuttons);
  523. copy(layer[skin_btn_prev].visible, show_selbuttons);
  524. copy(layer[skin_btn_next].visible, show_selbuttons);
  525. if(show_selbuttons, inc(lpos,44); inc(rpos,44); );
  526. copy(layer[skin_btn_thumbs].visible, show_thumbutton);
  527. copy(layer[skin_btn_thumbs].x, lpos);
  528. if(show_thumbutton, inc(lpos,40));
  529. copy(layer[skin_btn_map].visible, show_mapbutton);
  530. copy(layer[skin_btn_map].x, lpos);
  531. if(show_mapbutton, inc(lpos,40));
  532. if(show_dirbuttons,
  533. copy(layer[skin_btn_navi].x, cpos);
  534. inc(cpos,140);
  535. set(layer[skin_btn_gyro].align, center);
  536. copy(layer[skin_btn_gyro].visible, show_gyrobutton);
  537. copy(layer[skin_btn_gyro].x, cpos);
  538. if(show_gyrobutton, inc(cpos,48));
  539. set(layer[skin_btn_vr].align, center);
  540. copy(layer[skin_btn_vr].visible, show_vrbutton);
  541. copy(layer[skin_btn_vr].x, cpos);
  542. if(show_vrbutton, inc(cpos,80));
  543. ,
  544. set(layer[skin_btn_gyro].align, left);
  545. copy(layer[skin_btn_gyro].visible, show_gyrobutton);
  546. copy(layer[skin_btn_gyro].x, lpos);
  547. if(show_gyrobutton, inc(lpos,40));
  548. set(layer[skin_btn_vr].align, left);
  549. copy(layer[skin_btn_vr].visible, show_vrbutton);
  550. copy(layer[skin_btn_vr].x, lpos);
  551. if(show_vrbutton, inc(lpos,80));
  552. );
  553. copy(layer[skin_btn_hide].x, rpos);
  554. inc(rpos,40);
  555. copy(layer[skin_btn_fs].visible, show_fsbutton);
  556. copy(layer[skin_btn_fs].x, rpos);
  557. if(show_fsbutton, inc(rpos,40));
  558. </action>
  559. <action name="skin_updatescroll">
  560. if(layer[skin_thumbs].loaded,
  561. set(cursceneindex, 0);
  562. if(xml.scene, copy(cursceneindex, scene[get(xml.scene)].index));
  563. layer[skin_thumbs].setcenter(get(scene[get(cursceneindex)].thumbx), get(scene[get(cursceneindex)].thumby));
  564. );
  565. </action>
  566. <action name="skin_updatethumbscroll">
  567. copy(padding,skin_settings.thumbs_padding);
  568. if(skin_settings.thumbs_scrollbuttons,
  569. if(loverflow GT 0, set(layer[skin_thumbs_scrollleft].visible,true), set(layer[skin_thumbs_scrollleft].visible,false) );
  570. if(roverflow GT 0, set(layer[skin_thumbs_scrollright].visible,true), set(layer[skin_thumbs_scrollright].visible,false) );
  571. );
  572. if(skin_settings.thumbs_scrollindicator,
  573. if(woverflow GT 0,
  574. set(layer[skin_thumbs_scrollindicator].visible,true);
  575. sub(iw,pixelwidth,woverflow);
  576. div(pw,iw,pixelwidth);
  577. div(px,loverflow,woverflow);
  578. mul(pw,iw);
  579. copy(layer[skin_thumbs_scrollindicator].width,pw);
  580. sub(iw,pw);
  581. sub(iw,padding);
  582. sub(iw,padding);
  583. mul(px,iw);
  584. add(px,padding);
  585. copy(layer[skin_thumbs_scrollindicator].x,px);
  586. ,
  587. set(layer[skin_thumbs_scrollindicator].visible,false);
  588. );
  589. );
  590. </action>
  591. <action name="skin_update_scene_infos">
  592. if(xml.scene !== null AND scene[get(xml.scene)].index GE 0,
  593. if(skin_settings.title,
  594. if(title, txtadd(layer[skin_title].html, get(title), ' - ', get(scene[get(xml.scene)].title) ); , copy(layer[skin_title].html, scene[get(xml.scene)].title ); );
  595. delayedcall(0.1, set(layer[skin_title].visible,true) );
  596. );
  597. if(skin_settings.thumbs_loop == false,
  598. if(scene[get(xml.scene)].index GT 0,
  599. set(layer[skin_btn_prev].enabled, true);
  600. set(layer[skin_btn_prev].alpha, 1.0);
  601. ,
  602. set(layer[skin_btn_prev].enabled, false);
  603. set(layer[skin_btn_prev].alpha, 0.3);
  604. );
  605. sub(lastsceneindex, scene.count, 1);
  606. if(scene[get(xml.scene)].index LT lastsceneindex,
  607. set(layer[skin_btn_next].enabled, true);
  608. set(layer[skin_btn_next].alpha, 1.0);
  609. ,
  610. set(layer[skin_btn_next].enabled, false);
  611. set(layer[skin_btn_next].alpha, 0.3);
  612. );
  613. ,
  614. if(scene.count GT 1,
  615. set(layer[skin_btn_prev].enabled, true);
  616. set(layer[skin_btn_prev].alpha, 1.0);
  617. set(layer[skin_btn_next].enabled, true);
  618. set(layer[skin_btn_next].alpha, 1.0);
  619. ,
  620. set(layer[skin_btn_prev].enabled, false);
  621. set(layer[skin_btn_prev].alpha, 0.3);
  622. set(layer[skin_btn_next].enabled, false);
  623. set(layer[skin_btn_next].alpha, 0.3);
  624. );
  625. );
  626. if(scene.count GT 1,
  627. set(layer[skin_btn_prev_fs].visible, true);
  628. set(layer[skin_btn_next_fs].visible, true);
  629. ,
  630. set(layer[skin_btn_prev_fs].visible, false);
  631. set(layer[skin_btn_next_fs].visible, false);
  632. );
  633. txtadd(parentname, 'skin_thumb_', get(scene[get(xml.scene)].index));
  634. if(layer[get(parentname)],
  635. set(layer[skin_thumbborder].parent, get(parentname));
  636. set(layer[skin_thumbborder].visible, true);
  637. ,
  638. set(layer[skin_thumbborder].visible, false);
  639. );
  640. if(scene[get(xml.scene)].mapspotname,
  641. layer[skin_map].activatespot(get(scene[get(xml.scene)].mapspotname));
  642. layer[skin_map].pantospot(get(scene[get(xml.scene)].mapspotname));
  643. );
  644. if(plugin[skin_gyro].isavailable == true AND view.vlookatrange == 180,
  645. set(layer[skin_btn_gyro].visible, true);
  646. ,
  647. set(layer[skin_btn_gyro].visible, false)
  648. );
  649. if(view.vlookatrange LT 180,
  650. if(backup_control_bouncinglimits === null,
  651. copy(backup_control_bouncinglimits, control.bouncinglimits);
  652. );
  653. set(control.bouncinglimits, false);
  654. ,
  655. if(backup_control_bouncinglimits !== null,
  656. copy(control.bouncinglimits, backup_control_bouncinglimits);
  657. );
  658. );
  659. if(scene[get(xml.scene)].isvideopano AND plugin[video] !== null,
  660. skin_video_addcontrols();
  661. ,
  662. skin_video_removecontrols();
  663. );
  664. );
  665. </action>
  666. <action name="skin_gotoscene">
  667. if(scene[%1],
  668. copy(cursceneindex, scene[get(xml.scene)].index);
  669. copy(newsceneindex, scene[%1].index);
  670. skin_loadscene(get(newsceneindex), calc(newsceneindex LT cursceneindex ? skin_settings.loadscene_blend_prev : (newsceneindex GT cursceneindex ? skin_settings.loadscene_blend_next : skin_settings.loadscene_blend)) );
  671. );
  672. </action>
  673. <action name="skin_nextscene">
  674. add(newsceneindex, scene[get(xml.scene)].index, %1);
  675. if(newsceneindex GE 0 AND newsceneindex LT scene.count,
  676. skin_loadscene(get(newsceneindex), calc(%1 LT 0 ? skin_settings.loadscene_blend_prev : skin_settings.loadscene_blend_next));
  677. );
  678. </action>
  679. <action name="skin_nextscene_loop">
  680. add(newsceneindex, scene[get(xml.scene)].index, %1);
  681. sub(lastsceneindex, scene.count, 1);
  682. if(newsceneindex LT 0, copy(newsceneindex,lastsceneindex));
  683. if(newsceneindex GT lastsceneindex, set(newsceneindex,0));
  684. skin_loadscene(get(newsceneindex), calc(%1 LT 0 ? skin_settings.loadscene_blend_prev : skin_settings.loadscene_blend_next));
  685. </action>
  686. <!-- skin_loadscene(scenenameorindex, blendmode) -->
  687. <action name="skin_loadscene">
  688. if(webvr.isenabled AND scene.count GT 1,
  689. set(hotspot[webvr_prev_scene].visible, false);
  690. set(hotspot[webvr_next_scene].visible, false);
  691. );
  692. txtadd(layer[skin_thumbborder].parent, 'skin_thumb_', get(scene[%1].index));
  693. layer[skin_thumbs].scrolltocenter(get(scene[%1].thumbx), get(scene[%1].thumby));
  694. loadscene(get(scene[%1].name), null, get(skin_settings.loadscene_flags), %2);
  695. </action>
  696. <action name="skin_showloading">
  697. if(display.stereo == true,
  698. set(layer[skin_loadingtext].visible, false);
  699. ,
  700. set(layer[skin_loadingtext].visible, %1);
  701. );
  702. </action>
  703. <action name="skin_hidetooltips">
  704. set(layer[skin_tooltip].alpha,0.0);
  705. set(layer[skin_tooltip].visible,false);
  706. </action>
  707. <action name="skin_buttonglow">
  708. if('%1' !== 'null',
  709. set(strength,0.7);
  710. if(%2 != null, set(strength,%2));
  711. set(layer[skin_buttonglow].parent, %1);
  712. set(layer[skin_buttonglow].visible, true);
  713. tween(layer[skin_buttonglow].alpha, get(strength), 0.07);
  714. ,
  715. tween(layer[skin_buttonglow].alpha, 0.0, 0.1, default,
  716. set(layer[skin_buttonglow].parent, null);
  717. set(layer[skin_buttonglow].visible, false);
  718. );
  719. );
  720. </action>
  721. <action name="skin_calc_opened_closed">
  722. if(layer[get(name)].y_closed === null,
  723. set(layer[get(name)].y_opened, get(layer[get(name)].y));
  724. set(layer[get(name)].y_closed, calc(layer[get(name)].y - skin_settings.controlbar_offset - skin_settings.controlbar_height + skin_settings.controlbar_offset_closed));
  725. );
  726. </action>
  727. <action name="skin_hideskin">
  728. callwith(layer[skin_scroll_window], skin_calc_opened_closed() );
  729. callwith(layer[skin_splitter_bottom], skin_calc_opened_closed() );
  730. callwith(layer[skin_control_bar], skin_calc_opened_closed() );
  731. if(layer[skin_map].state != 'closed', skin_showmap(false); wait(0.40); );
  732. if(layer[skin_thumbs].state != 'closed', skin_showthumbs(false); wait(0.25); );
  733. set(hidetime, calc('%1' == 'instant' ? 0.0 : 0.5));
  734. tween(layer[skin_scroll_window].y, get(layer[skin_scroll_window ].y_closed), get(hidetime));
  735. tween(layer[skin_splitter_bottom].y, get(layer[skin_splitter_bottom].y_closed), get(hidetime));
  736. tween(layer[skin_control_bar].y, get(layer[skin_control_bar ].y_closed), get(hidetime));
  737. tween(layer[skin_btn_prev_fs].x, 0, get(hidetime));
  738. tween(layer[skin_btn_next_fs].x, 0, get(hidetime));
  739. if(layer[skin_logo], tween(layer[skin_logo].alpha, 0.0, 0.5, default, set(layer[skin_logo].visible,false)); );
  740. stopdelayedcall(skin_btn_show_alpha);
  741. set(layer[skin_btn_show].visible, true);
  742. delayedcall(skin_btn_show_alpha, get(hidetime), tween(layer[skin_btn_show].alpha, 0.25, 0.25); );
  743. </action>
  744. <action name="skin_showskin">
  745. tween(layer[skin_scroll_window ].y, get(layer[skin_scroll_window ].y_opened));
  746. tween(layer[skin_splitter_bottom].y, get(layer[skin_splitter_bottom].y_opened));
  747. tween(layer[skin_control_bar ].y, get(layer[skin_control_bar ].y_opened));
  748. tween(layer[skin_btn_prev_fs].x, -50);
  749. tween(layer[skin_btn_next_fs].x, -50);
  750. if(layer[skin_logo], set(layer[skin_logo].visible,true); tween(layer[skin_logo].alpha, 1.0); );
  751. stopdelayedcall(skin_btn_show_alpha);
  752. set(layer[skin_btn_show].visible, false);
  753. delayedcall(skin_btn_show_alpha, 0.25, tween(layer[skin_btn_show].alpha, 0.0, 0.0); );
  754. </action>
  755. <action name="skin_showthumbs">
  756. if(%1 == null, if(layer[skin_thumbs].state == 'closed', set(show,true), set(show,false)); , set(show,%1); );
  757. mul(mh, layer[skin_scroll_layer].pixelheight, -1);
  758. if(show,
  759. set(layer[skin_thumbs].state, 'opened');
  760. tween(layer[skin_thumbs].alpha, 1.0, 0.25);
  761. add(mh, layer[skin_thumbs].height);
  762. add(mh, layer[skin_scroll_layer].y_offset);
  763. tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint);
  764. set(layer[skin_thumbs_container].visible, true);
  765. tween(layer[skin_thumbs_container].alpha, 1.0, 0.25);
  766. tween(layer[skin_map].alpha, 0.0, 0.25, default, set(layer[skin_map].visible,false));
  767. ,
  768. set(layer[skin_thumbs].state, 'closed');
  769. tween(layer[skin_thumbs].alpha, 0.0, 0.25, easeOutQuint);
  770. add(mh, layer[skin_scroll_layer].y_offset);
  771. tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint, set(layer[skin_thumbs_container].visible, false););
  772. );
  773. </action>
  774. <action name="skin_showmap">
  775. if(%1 == null, if(layer[skin_map].state == 'closed', set(show,true), set(show,false)); , set(show,%1); );
  776. mul(mh, layer[skin_scroll_layer].pixelheight, -1);
  777. if(show,
  778. tween(layer[skin_thumbs_container].alpha, 0.0, 0.25, default, set(layer[skin_thumbs_container].visible,false));
  779. set(layer[skin_map].visible, true);
  780. tween(layer[skin_map].alpha, 1.0, 0.25);
  781. set(layer[skin_map].state, 'opened');
  782. sub(hh,area.pixelheight,skin_settings.controlbar_offset);
  783. sub(hh,layer[skin_control_bar].height);
  784. sub(hh,32);
  785. add(mh,hh);
  786. sub(hh,skin_settings.controlbar_overlap);
  787. copy(layer[skin_map].height, hh);
  788. tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint);
  789. ,
  790. if(layer[skin_map].state != 'closed',
  791. set(layer[skin_map].state, 'closed');
  792. add(mh, layer[skin_scroll_layer].y_offset);
  793. tween(layer[skin_map].alpha, 0.0, 0.5, easeOutQuint);
  794. tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint, set(layer[skin_map].visible,false) );
  795. );
  796. );
  797. </action>
  798. <action name="skin_keydown_event">
  799. if(keycode == 33, skin_nextscene_loop(-1) ); <!-- Page Up - previous scene -->
  800. if(keycode == 34, skin_nextscene_loop(+1) ); <!-- Page Dowm - next scene -->
  801. if(keycode == 35, skin_gotoscene(calc(scene.count-1)) ); <!-- End - last scene -->
  802. if(keycode == 36, skin_gotoscene(0) ); <!-- Home/Pos1 - first scene -->
  803. </action>
  804. <action name="skin_deeplinking_update_url">
  805. if(skin_settings.deeplinking AND (!webvr OR webvr.isenabled === false),
  806. delayedcall(skin_deeplinking_update, calc(%1 == null ? 0.1 : %1), skin_deeplinking_update_url_process() );
  807. );
  808. </action>
  809. <action name="skin_deeplinking_update_url_process">
  810. copy(adr, browser.location);
  811. indexoftxt(qi, get(adr), '?');
  812. if(qi GT 0, subtxt(adr, adr, 0, get(qi)));
  813. copy(si, scene[get(xml.scene)].index);
  814. copy(h, view.hlookat);
  815. copy(v, view.vlookat);
  816. copy(f, view.fov);
  817. copy(d, view.distortion);
  818. copy(a, view.architectural);
  819. clamp(d, 0.0, 1.0);
  820. clamp(a, 0.0, 1.0);
  821. set(pp, calc(f LT 10 ? 6 : 2));
  822. roundval(h, get(pp));
  823. roundval(v, get(pp));
  824. roundval(f, get(pp));
  825. roundval(d, 2);
  826. roundval(a, 1);
  827. set(adr, calc(adr + '?startscene=' + si + '&amp;startactions=lookat('+h+','+v+','+f+','+d+','+a+');'));
  828. js( history.replaceState(null, document.title, get(adr)); );
  829. </action>
  830. <!-- reload the scene when there is a special image for VR -->
  831. <action name="skin_reloadscene_webvr">
  832. delayedcall(0.1,
  833. if(scene[get(xml.scene)].havevrimage,
  834. copy(keeplookingdirection_backup, skin_settings.webvr_gyro_keeplookingdirection);
  835. set(skin_settings.webvr_gyro_keeplookingdirection, true);
  836. loadscene(get(xml.scene), null, MERGE|KEEPVIEW|KEEPMOVING|KEEPPLUGINS|KEEPHOTSPOTS|NOPREVIEW, BLEND(0.5));
  837. copy(skin_settings.webvr_gyro_keeplookingdirection, keeplookingdirection_backup);
  838. delete(keeplookingdirection_backup);
  839. );
  840. );
  841. </action>
  842. <!-- videopano support - http://krpano.com/plugins/videoplayer/ -->
  843. <action name="skin_video_addcontrols">
  844. set(events[skin_events].onclick, skin_video_clickevent() );
  845. set(plugin[video].onvideoready, skin_video_updatestate() );
  846. set(plugin[video].onvideoplay, skin_video_updatestate() );
  847. set(plugin[video].onvideopaused, skin_video_updatestate() );
  848. set(plugin[video].onvideocomplete, skin_video_updatestate() );
  849. if(plugin[video].ispaused AND plugin[video].pausedonstart,
  850. set(layer[skin_video_playpause].state, 'visible');
  851. set(layer[skin_video_playpause].enabled, true);
  852. tween(layer[skin_video_playpause].alpha, 1.0);
  853. );
  854. delayedcall(skin_video_delayedvisible, 0.25, set(layer[skin_video_controls].visible, true) );
  855. skin_video_updateseekbarwidth();
  856. set(layer[skin_video_seekpos].x,0);
  857. set(layer[skin_video_loadbar].width,0);
  858. setinterval(skin_video_seek_updates, 0.5, skin_video_updatetime() );
  859. </action>
  860. <action name="skin_video_removecontrols">
  861. stopdelayedcall(skin_video_delayedvisible);
  862. set(events[skin_events].onclick, null);
  863. set(layer[skin_video_playpause].alpha, 0.0);
  864. set(layer[skin_video_controls].visible, false);
  865. clearinterval(skin_video_seek_updates);
  866. </action>
  867. <action name="skin_video_updatetime">
  868. copy(t1, plugin[video].time);
  869. copy(t2, plugin[video].totaltime);
  870. if(%1 !== null, calc(t1, %1 * t2); );
  871. div(t1_min, t1, 60);
  872. mod(t1_sec, t1, 60);
  873. Math.floor(t1_min);
  874. Math.floor(t1_sec);
  875. div(t2_min, t2, 60);
  876. mod(t2_sec, t2, 60);
  877. Math.floor(t2_min);
  878. Math.floor(t2_sec);
  879. calc(layer[skin_video_time].html, t1_min + ':' + (t1_sec LT 10 ? '0' : '') + t1_sec + ' / ' + t2_min + ':' + (t2_sec LT 10 ? '0' : '') + t2_sec);
  880. calc(layer[skin_video_seekpos].x, (t1 / t2 * 100) + '%');
  881. calc(layer[skin_video_loadbar].width, (plugin[video].loadedbytes / plugin[video].totalbytes * 100) + '%');
  882. </action>
  883. <action name="skin_video_updateseekbarwidth">
  884. if(skin_settings.title,
  885. calc(layer[skin_video_seekbar_container].width, 0 - (32 + layer[skin_title].pixelwidth + layer[skin_video_time].pixelwidth));
  886. calc(layer[skin_video_seekbar_container].x, layer[skin_title].pixelwidth + 16);
  887. ,
  888. calc(layer[skin_video_seekbar_container].width, 0 - (24 + layer[skin_video_time].pixelwidth));
  889. set(layer[skin_video_seekbar_container].x, 8);
  890. );
  891. </action>
  892. <action name="skin_video_ondownseeking">
  893. asyncloop(pressed,
  894. screentolayer(skin_video_seekbar, mouse.stagex,mouse.stagey, lx,ly);
  895. calc(seekpos, lx / layer[skin_video_seekbar].pixelwidth);
  896. clamp(seekpos, 0.0, 1.0);
  897. skin_video_updatetime(seekpos);
  898. ,
  899. plugin[video].seek(calc((seekpos * 100) + '%'));
  900. );
  901. </action>
  902. <layer name="skin_video_playpause" keep="true"
  903. style="skin_base|skin_glow" crop="0|640|64|64" scale="0.75"
  904. align="center" alpha="0.0" autoalpha="true"
  905. state="hidden"
  906. onclick="skin_video_playpause_click();"
  907. />
  908. <action name="skin_video_updatestate">
  909. calc(layer[skin_video_playpause].crop, plugin[video].ispaused ? '0|640|64|64' : '64|640|64|64');
  910. if(plugin[video].iscomplete,
  911. set(layer[skin_video_playpause].state, 'visible');
  912. tween(layer[skin_video_playpause].alpha, 1.0);
  913. );
  914. </action>
  915. <action name="skin_video_playpause_click">
  916. if(plugin[video].ispaused,
  917. plugin[video].play();
  918. set(layer[skin_video_playpause].state, 'hidden');
  919. tween(layer[skin_video_playpause].alpha, 0.0);
  920. ,
  921. plugin[video].pause();
  922. set(layer[skin_video_playpause].state, 'visible');
  923. tween(layer[skin_video_playpause].alpha, 1.0);
  924. delayedcall(autohide_pp, 2.0, set(layer[skin_video_playpause].state,'hidden'); tween(layer[skin_video_playpause].alpha, 0.0); );
  925. );
  926. </action>
  927. <action name="skin_video_clickevent">
  928. stopdelayedcall(autohide_pp);
  929. switch(layer[skin_video_playpause].state, 'visible', 'hidden');
  930. if(layer[skin_video_playpause].state == 'hidden',
  931. tween(layer[skin_video_playpause].alpha, 0.0);
  932. ,
  933. tween(layer[skin_video_playpause].alpha, 1.0);
  934. delayedcall(autohide_pp, 2.0, set(layer[skin_video_playpause].state,'hidden'); tween(layer[skin_video_playpause].alpha, 0.0); );
  935. );
  936. </action>
  937. <!-- context menu - http://krpano.com/docu/xml/#contextmenu -->
  938. <contextmenu>
  939. <item name="kr" caption="KRPANO" />
  940. <item name="fs" caption="FULLSCREEN" />
  941. <item name="cc" caption="Change Controlmode" onclick="skin_changecontrolmode();" separator="true" />
  942. <item name="nv" caption="Normal View" onclick="skin_view_normal();" showif="view.vlookatrange == 180" separator="true" />
  943. <item name="fv" caption="Fisheye View" onclick="skin_view_fisheye();" showif="view.vlookatrange == 180" devices="flash|webgl" />
  944. <item name="sv" caption="Stereographic View" onclick="skin_view_stereographic();" showif="view.vlookatrange == 180" devices="flash|webgl" />
  945. <item name="av" caption="Architectural View" onclick="skin_view_architectural();" showif="view.vlookatrange == 180" />
  946. <item name="pv" caption="Pannini View" onclick="skin_view_pannini();" showif="view.vlookatrange == 180" devices="flash|webgl" />
  947. <item name="lp" caption="Little Planet View" onclick="skin_view_littleplanet();" showif="view.vlookatrange == 180" devices="flash|webgl" />
  948. </contextmenu>
  949. <action name="skin_changecontrolmode">
  950. switch(control.mouse, moveto, drag);
  951. switch(control.touch, moveto, drag);
  952. </action>
  953. <action name="skin_view_look_straight">
  954. if(view.vlookat LT -80 OR view.vlookat GT +80,
  955. tween(view.vlookat, 0.0, 1.0, easeInOutSine);
  956. tween(view.fov, 100, distance(150,0.8));
  957. );
  958. skin_deeplinking_update_url(1.0);
  959. </action>
  960. <action name="skin_view_normal">
  961. skin_view_look_straight();
  962. tween(view.architectural, 0.0, distance(1.0,0.5));
  963. tween(view.pannini, 0.0, distance(1.0,0.5));
  964. tween(view.distortion, 0.0, distance(1.0,0.5));
  965. </action>
  966. <action name="skin_view_fisheye">
  967. skin_view_look_straight();
  968. tween(view.architectural, 0.0, distance(1.0,0.5));
  969. tween(view.pannini, 0.0, distance(1.0,0.5));
  970. tween(view.distortion, 0.35, distance(1.0,0.5));
  971. </action>
  972. <action name="skin_view_architectural">
  973. skin_view_look_straight();
  974. tween(view.architectural, 1.0, distance(1.0,0.5));
  975. tween(view.pannini, 0.0, distance(1.0,0.5));
  976. tween(view.distortion, 0.0, distance(1.0,0.5));
  977. </action>
  978. <action name="skin_view_stereographic">
  979. skin_view_look_straight();
  980. tween(view.architectural, 0.0, distance(1.0,0.5));
  981. tween(view.pannini, 0.0, distance(1.0,0.5));
  982. tween(view.distortion, 1.0, distance(1.0,0.8));
  983. </action>
  984. <action name="skin_view_pannini">
  985. skin_view_look_straight();
  986. tween(view.architectural, 0.0, distance(1.0,0.5));
  987. tween(view.pannini, 1.0, distance(1.0,0.8));
  988. if(view.distortion LT 0.1,
  989. tween(view.distortion, 1.0, distance(1.0,0.8));
  990. );
  991. </action>
  992. <action name="skin_view_littleplanet">
  993. tween(view.architectural, 0.0, distance(1.0,0.5));
  994. tween(view.pannini, 0.0, distance(1.0,0.5));
  995. tween(view.distortion, 1.0, distance(1.0,0.8));
  996. tween(view.fov, 150, distance(150,0.8));
  997. tween(view.vlookat, 90, distance(100,0.8));
  998. add(new_hlookat, view.hlookat, 123.0);
  999. tween(view.hlookat, get(new_hlookat), distance(100,0.8));
  1000. skin_deeplinking_update_url(1.0);
  1001. </action>
  1002. <action name="addImgHotSpot">
  1003. set(schp_name,%7);
  1004. txtadd(hpimg, '%SWFPATH%/images/hotspot/', %1);
  1005. set(hotspot[get(schp_name)].url, get(hpimg));
  1006. set(hotspot[get(schp_name)].ath,%3);
  1007. set(hotspot[get(schp_name)].atv,%4);
  1008. set(hotspot[get(schp_name)].autoalpha,false);
  1009. set(hotspot[get(schp_name)].distorted,false);
  1010. set(hotspot[get(schp_name)].hotspottitle,%2);
  1011. set(hotspot[get(schp_name)].width,%6);
  1012. set(hotspot[get(schp_name)].height,'prop');
  1013. txtadd(hotspot[get(schp_name)].onloaded,"add_all_the_time_tooltip(hotspot[get(name)].hotspottitle);");
  1014. set(hotspot[get(schp_name)].onhover,null);
  1015. set(hotspot[get(schp_name)].onout,null);
  1016. set(hotspot[get(schp_name)].onover,null);
  1017. txtadd(tooltipname, 'tooltip_', get(schp_name));
  1018. if(device.mobile,set(hotspot[get(schp_name)].scale,0.6));
  1019. set(plugin[get(tooltipname)].onclick,'js(__krfn.utils.linkopen(%7));');
  1020. set(hotspot[get(schp_name)].visible,true);
  1021. addhotspot(get(schp_name));
  1022. set(hotspot[get(schp_name)].onclick,'js(__krfn.utils.linkopen(%7));');
  1023. </action>
  1024. <action name="add_all_the_time_tooltip">
  1025. txtadd(tooltipname, 'tooltip_', get(name)); addplugin(get(tooltipname));
  1026. txtadd(plugin[get(tooltipname)].parent, 'hotspot[', get(name), ']');
  1027. set(plugin[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
  1028. set(plugin[get(tooltipname)].align,center);
  1029. set(plugin[get(tooltipname)].edge,top);
  1030. set(plugin[get(tooltipname)].x,0);
  1031. set(plugin[get(tooltipname)].y,-40%);
  1032. set(plugin[get(tooltipname)].autowidth,true);
  1033. set(plugin[get(tooltipname)].height,36);
  1034. if(device.mobile,set(plugin[get(tooltipname)].scale,1));
  1035. if(device.mobile,set(plugin[get(tooltipname)].height,24));
  1036. set(plugin[get(tooltipname)].background,false);
  1037. set(plugin[get(tooltipname)].vcenter,true);
  1038. set(plugin[get(tooltipname)].border,false);
  1039. set(plugin[get(tooltipname)].glow,0);
  1040. set(plugin[get(tooltipname)].glowcolor,0xFFFFFF);
  1041. set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-size:14px;');
  1042. if(device.mobile,
  1043. set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-weight:normal; font-size:12px;'); );
  1044. set(plugin[get(tooltipname)].textshadow,0);
  1045. set(plugin[get(tooltipname)].textshadowrange,6.0);
  1046. set(plugin[get(tooltipname)].textshadowangle,90);
  1047. if(text ==
  1048. '' OR text === null, copy(plugin[get(tooltipname)].html,%1), copy(plugin[get(tooltipname)].html,text) );
  1049. set(plugin[get(tooltipname)].enabled,true);
  1050. </action>
  1051. </krpano>