vtourskin.xml 62 KB

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