vtourskin2.xml 60 KB

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