vtourskin.xml 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285
  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. if(get(skin_settings.lptswitch) == 0,
  238. delayedcall(0.5,animationComplete);
  239. );
  240. );
  241. skin_addthumbs();
  242. skin_onresize();
  243. skin_updatescroll();
  244. set(layer[skin_layer].visible, false);
  245. </action>
  246. <action name="skin_addthumbs">
  247. if(skin_settings.thumbs == false,
  248. set(layer[skin_btn_thumbs].visible,false);
  249. ,
  250. copy(thumbwidth, skin_settings.thumbs_width);
  251. copy(thumbheight, skin_settings.thumbs_height);
  252. copy(thumbpadding, skin_settings.thumbs_padding);
  253. copy(thumbcrop, skin_settings.thumbs_crop);
  254. add(thumbxoffset, thumbwidth, thumbpadding);
  255. mul(thumbxcenter, thumbxoffset, 0.5);
  256. mul(thumbbarwidth, thumbxoffset, scene.count);
  257. add(thumbbarwidth, thumbpadding);
  258. add(thumbbarheight, thumbpadding, thumbheight);
  259. add(thumbbarheight, thumbpadding);
  260. if(skin_settings.thumbs_scrollindicator,
  261. copy(layer[skin_thumbs_scrollindicator].y, thumbbarheight);
  262. add(thumbbarheight, layer[skin_thumbs_scrollindicator].height);
  263. );
  264. copy(layer[skin_thumbs].height, thumbbarheight);
  265. copy(layer[skin_thumbs].width, thumbbarwidth);
  266. mul(halfheight, thumbbarheight, 0.5);
  267. copy(layer[skin_thumbs_scrollleft].y, halfheight);
  268. copy(layer[skin_thumbs_scrollright].y, halfheight);
  269. <!-- set(thumb_cnt,0);
  270. for(set(i,0), i LT scene.count, inc(i),
  271. inc(thumb_cnt);
  272. txtadd(thumbname,'skin_thumb_',get(i));
  273. addlayer(get(thumbname));
  274. copy(layer[get(thumbname)].url, scene[get(i)].thumburl);
  275. set(layer[get(thumbname)].keep, true);
  276. set(layer[get(thumbname)].parent, 'skin_thumbs');
  277. set(layer[get(thumbname)].align, lefttop);
  278. copy(layer[get(thumbname)].crop, thumbcrop);
  279. copy(layer[get(thumbname)].width, thumbwidth);
  280. copy(layer[get(thumbname)].height, thumbheight);
  281. mul(thumbx, i, thumbxoffset);
  282. add(thumbx, thumbpadding);
  283. copy(layer[get(thumbname)].x, thumbx);
  284. copy(layer[get(thumbname)].y, thumbpadding);
  285. add(scene[get(i)].thumbx, thumbx, thumbxcenter);
  286. copy(scene[get(i)].thumby, thumbpadding);
  287. set(layer[get(thumbname)].linkedscene, get(scene[get(i)].name) );
  288. set(layer[get(thumbname)].onclick, copy(layer[skin_thumbborder].parent, name); skin_loadscene(get(linkedscene),get(skin_settings.loadscene_blend)); );
  289. if(skin_settings.tooltips_thumbs,
  290. set(layer[get(thumbname)].tooltip, get(scene[get(i)].title) );
  291. layer[get(thumbname)].loadstyle(skin_tooltips);
  292. );
  293. if(skin_settings.thumbs_text,
  294. txtadd(thumbtext, 'skin_thumbtext_', get(i));
  295. addlayer(get(thumbtext));
  296. layer[get(thumbtext)].loadstyle(skin_thumbtext_style);
  297. set(layer[get(thumbtext)].keep, true);
  298. set(layer[get(thumbtext)].parent, get(thumbname));
  299. set(layer[get(thumbtext)].html, get(scene[get(i)].title));
  300. );
  301. );
  302. if(thumb_cnt == 1,
  303. set(layer[skin_thumbs].align, 'lefttop');
  304. );
  305. ); -->
  306. </action>
  307. <action name="skin_addmapspots">
  308. for(set(i,0), i LT scene.count, inc(i),
  309. if(scene[get(i)].lat,
  310. txtadd(spotname, 'spot', get(i));
  311. 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));');
  312. copy(scene[get(i)].mapspotname, spotname);
  313. addspot(get(spotname), get(scene[get(i)].lat), get(scene[get(i)].lng), get(scene[get(i)].heading), false, get(spotclickevent), null);
  314. if(skin_settings.tooltips_mapspots,
  315. set(layer[skin_map].spot[get(spotname)].tooltip, get(scene[get(i)].title) );
  316. txtadd(layer[skin_map].spot[get(spotname)].onover, 'set(hovering,true);', get(style[skin_tooltips].onover) );
  317. txtadd(layer[skin_map].spot[get(spotname)].onout, 'set(hovering,false);', get(style[skin_tooltips].onout) );
  318. );
  319. );
  320. );
  321. if(xml.scene != null,
  322. activatespot( get(scene[get(xml.scene)].mapspotname) );
  323. ,
  324. activatespot(spot0);
  325. );
  326. <!-- zoom and pan the map to see all spots at the same time -->
  327. zoomToSpotsExtent();
  328. </action>
  329. <action name="skin_setup_littleplanetintro">
  330. copy(lp_scene, xml.scene);
  331. copy(lp_hlookat, view.hlookat);
  332. copy(lp_vlookat, view.vlookat);
  333. copy(lp_fov, view.fov);
  334. copy(lp_fovmax, view.fovmax);
  335. copy(lp_limitview, view.limitview);
  336. if(%1 == 1,
  337. <!-- 小行星开场 -->
  338. set(view.fovmax, 170);
  339. set(view.limitview, lookat);
  340. set(view.vlookatmin, 90);
  341. set(view.vlookatmax, 90);
  342. lookat(calc(lp_hlookat + 180), 90, 150, 1, 0, 0);
  343. set(events[lp_events].onpreviewcomplete,
  344. delayedcall(2,
  345. if(lp_scene === xml.scene,
  346. set(control.usercontrol, off);
  347. copy(view.limitview, lp_limitview);
  348. set(view.vlookatmin, null);
  349. set(view.vlookatmax, null);
  350. tween(view.hlookat|view.vlookat|view.fov|view.distortion, calc('' + lp_hlookat + '|' + lp_vlookat + '|' + lp_fov + '|' + 0.0),
  351. 3.0, easeOutQuad,
  352. animationComplete();
  353. );); ););
  354. );
  355. if(%1 == 2,
  356. <!-- 水平巡游开场 -->
  357. copy(view.hlookat, get(lp_hlookat));
  358. sub(view.hlookat, 360);
  359. set(events[lp_events].onpreviewcomplete,
  360. delayedcall(1,
  361. if(lp_scene === xml.scene,
  362. set(control.usercontrol, off);
  363. tween(view.hlookat, get(lp_hlookat),
  364. 12.0, easeInOutSine,
  365. animationComplete();
  366. ););););
  367. );
  368. if(%1 == 3,
  369. <!-- 小行星巡游 -->
  370. set(view.fov, 70);
  371. set(view.vlookat, -40);
  372. set(view.hlookat, get(lp_hlookat));
  373. sub(view.hlookat, 360);
  374. tween(view.vlookat, 90, 9, easeInOutSine);
  375. delayedcall(animation2_0,2,
  376. tween(view.hlookat, get(lp_hlookat), 7.5, easeInOutSine);
  377. tween(view.fov, 150.0, 7.5, easeInOutSine);
  378. delayedcall(animation2_1,7.6,
  379. tween(view.fisheye, 0.0,3);
  380. tween(view.vlookat, get(lp_vlookat), 3, easeInOutSine);
  381. tween(view.fov, get(lp_fov), 3, easeInOutSine,
  382. animationComplete();
  383. );
  384. );
  385. );
  386. );
  387. if(%1 == 4,
  388. <!-- 水晶球开场 -->
  389. set(view.fov, 110);
  390. set(view.hlookat, get(lp_hlookat));
  391. sub(view.hlookat, 360);
  392. set(view.fov, 110);
  393. set(view.architectural, 0.0);
  394. set(view.pannini, 0.0);
  395. set(view.distortion, 2.8);
  396. tween(view.hlookat, get(lp_hlookat) , 7.5, easeInOutSine);
  397. tween(view.vlookat, get(lp_vlookat), 7.5, easeInOutSine);
  398. delayedcall(3.5, tween(view.distortion, 0, 4, easeInOutSine););
  399. tween(view.fov, get(lp_fov), 7.5, easeInOutSine,
  400. animationComplete(););
  401. );
  402. if(%1 == 5,
  403. <!-- 小行星缩放开场 -->
  404. set(view.fov, 150);
  405. set(view.vlookat, -65);
  406. set(view.hlookat, get(lp_hlookat));
  407. add(view.hlookat, 360);
  408. tween(view.vlookat, 90.0, 9.5, easeInOutSine);
  409. tween(view.hlookat, get(lp_hlookat), 9.5, easeInOutSine);
  410. delayedcall(animation3_0,9.6,
  411. tween(view.fisheye, 0.0,3);
  412. tween(view.fov, get(lp_fov), 3, easeInOutSine,
  413. animationComplete();
  414. );
  415. delayedcall(0.5, tween(view.vlookat, get(lp_vlookat), 2.5, easeInOutSine););
  416. );
  417. );
  418. </action>
  419. <action name="skin_lookat">
  420. if(webvr.isenabled,
  421. <!-- adjust the VR prev/next hotspots for the view change -->
  422. calc(hlookat_offset, %1 - view.hlookat);
  423. add(hotspot[webvr_prev_scene].ath, hlookat_offset);
  424. add(hotspot[webvr_next_scene].ath, hlookat_offset);
  425. );
  426. if(plugin[skin_gyro].enabled,
  427. <!-- reset the gyro tracking -->
  428. plugin[skin_gyro].resetsensor(%1);
  429. );
  430. <!-- change the view -->
  431. lookat(%1, %2, %3);
  432. </action>
  433. <action name="skin_onresize">
  434. mul(mh, area.pixelheight, -1);
  435. if(layer[skin_thumbs].state == 'opened', add(mh,layer[skin_thumbs].height); );
  436. 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); );
  437. add(mh, layer[skin_scroll_layer].y_offset);
  438. set(layer[skin_scroll_layer].y, get(mh));
  439. skin_video_updateseekbarwidth();
  440. skin_arrange_buttons();
  441. </action>
  442. <!-- determine the visibility of the buttons and calculate their positions -->
  443. <action name="skin_arrange_buttons">
  444. calc(show_selbuttons, scene.count GT 1);
  445. calc(show_thumbutton, skin_settings.thumbs == true);
  446. calc(show_mapbutton, skin_settings.maps == true);
  447. calc(show_gyrobutton, plugin[skin_gyro].available == true AND (view.vlookatrange == 180 OR lp_scene === xml.scene));
  448. calc(show_vrbutton, webvr.isavailable == true);
  449. calc(show_fsbutton, device.fullscreensupport == true);
  450. set(lpos,6);
  451. set(cpos,0);
  452. if(show_gyrobutton, dec(cpos,20));
  453. if(show_vrbutton, dec(cpos,24));
  454. set(rpos,6);
  455. calc(show_dirbuttons, !device.mobile AND ((area.pixelwidth + 2*cpos) GT 520));
  456. copy(layer[skin_btn_navi].visible, show_dirbuttons);
  457. copy(layer[skin_btn_prev].visible, show_selbuttons);
  458. copy(layer[skin_btn_next].visible, show_selbuttons);
  459. if(show_selbuttons, inc(lpos,44); inc(rpos,44); );
  460. copy(layer[skin_btn_thumbs].visible, show_thumbutton);
  461. copy(layer[skin_btn_thumbs].x, lpos);
  462. if(show_thumbutton, inc(lpos,40));
  463. copy(layer[skin_btn_map].visible, show_mapbutton);
  464. copy(layer[skin_btn_map].x, lpos);
  465. if(show_mapbutton, inc(lpos,40));
  466. if(show_dirbuttons,
  467. copy(layer[skin_btn_navi].x, cpos);
  468. inc(cpos,140);
  469. set(layer[skin_btn_gyro].align, center);
  470. copy(layer[skin_btn_gyro].visible, show_gyrobutton);
  471. copy(layer[skin_btn_gyro].x, cpos);
  472. if(show_gyrobutton, inc(cpos,48));
  473. set(layer[skin_btn_vr].align, center);
  474. copy(layer[skin_btn_vr].visible, show_vrbutton);
  475. copy(layer[skin_btn_vr].x, cpos);
  476. if(show_vrbutton, inc(cpos,80));
  477. ,
  478. set(layer[skin_btn_gyro].align, left);
  479. copy(layer[skin_btn_gyro].visible, show_gyrobutton);
  480. copy(layer[skin_btn_gyro].x, lpos);
  481. if(show_gyrobutton, inc(lpos,40));
  482. set(layer[skin_btn_vr].align, left);
  483. copy(layer[skin_btn_vr].visible, show_vrbutton);
  484. copy(layer[skin_btn_vr].x, lpos);
  485. if(show_vrbutton, inc(lpos,80));
  486. );
  487. copy(layer[skin_btn_hide].x, rpos);
  488. inc(rpos,40);
  489. copy(layer[skin_btn_fs].visible, show_fsbutton);
  490. copy(layer[skin_btn_fs].x, rpos);
  491. if(show_fsbutton, inc(rpos,40));
  492. </action>
  493. <action name="skin_updatescroll">
  494. if(layer[skin_thumbs].loaded,
  495. set(cursceneindex, 0);
  496. if(xml.scene, copy(cursceneindex, scene[get(xml.scene)].index));
  497. layer[skin_thumbs].setcenter(get(scene[get(cursceneindex)].thumbx), get(scene[get(cursceneindex)].thumby));
  498. );
  499. </action>
  500. <action name="skin_updatethumbscroll">
  501. copy(padding,skin_settings.thumbs_padding);
  502. if(skin_settings.thumbs_scrollbuttons,
  503. if(loverflow GT 0, set(layer[skin_thumbs_scrollleft].visible,true), set(layer[skin_thumbs_scrollleft].visible,false) );
  504. if(roverflow GT 0, set(layer[skin_thumbs_scrollright].visible,true), set(layer[skin_thumbs_scrollright].visible,false) );
  505. );
  506. if(skin_settings.thumbs_scrollindicator,
  507. if(woverflow GT 0,
  508. set(layer[skin_thumbs_scrollindicator].visible,true);
  509. sub(iw,pixelwidth,woverflow);
  510. div(pw,iw,pixelwidth);
  511. div(px,loverflow,woverflow);
  512. mul(pw,iw);
  513. copy(layer[skin_thumbs_scrollindicator].width,pw);
  514. sub(iw,pw);
  515. sub(iw,padding);
  516. sub(iw,padding);
  517. mul(px,iw);
  518. add(px,padding);
  519. copy(layer[skin_thumbs_scrollindicator].x,px);
  520. ,
  521. set(layer[skin_thumbs_scrollindicator].visible,false);
  522. );
  523. );
  524. </action>
  525. <action name="skin_update_scene_infos">
  526. if(xml.scene !== null AND scene[get(xml.scene)].index GE 0,
  527. if(skin_settings.title,
  528. 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 ); );
  529. delayedcall(0.1, set(layer[skin_title].visible,true) );
  530. );
  531. if(skin_settings.thumbs_loop == false,
  532. if(scene[get(xml.scene)].index GT 0,
  533. set(layer[skin_btn_prev].enabled, true);
  534. set(layer[skin_btn_prev].alpha, 1.0);
  535. ,
  536. set(layer[skin_btn_prev].enabled, false);
  537. set(layer[skin_btn_prev].alpha, 0.3);
  538. );
  539. sub(lastsceneindex, scene.count, 1);
  540. if(scene[get(xml.scene)].index LT lastsceneindex,
  541. set(layer[skin_btn_next].enabled, true);
  542. set(layer[skin_btn_next].alpha, 1.0);
  543. ,
  544. set(layer[skin_btn_next].enabled, false);
  545. set(layer[skin_btn_next].alpha, 0.3);
  546. );
  547. ,
  548. if(scene.count GT 1,
  549. set(layer[skin_btn_prev].enabled, true);
  550. set(layer[skin_btn_prev].alpha, 1.0);
  551. set(layer[skin_btn_next].enabled, true);
  552. set(layer[skin_btn_next].alpha, 1.0);
  553. ,
  554. set(layer[skin_btn_prev].enabled, false);
  555. set(layer[skin_btn_prev].alpha, 0.3);
  556. set(layer[skin_btn_next].enabled, false);
  557. set(layer[skin_btn_next].alpha, 0.3);
  558. );
  559. );
  560. if(scene.count GT 1,
  561. set(layer[skin_btn_prev_fs].visible, true);
  562. set(layer[skin_btn_next_fs].visible, true);
  563. ,
  564. set(layer[skin_btn_prev_fs].visible, false);
  565. set(layer[skin_btn_next_fs].visible, false);
  566. );
  567. txtadd(parentname, 'skin_thumb_', get(scene[get(xml.scene)].index));
  568. if(layer[get(parentname)],
  569. set(layer[skin_thumbborder].parent, get(parentname));
  570. set(layer[skin_thumbborder].visible, true);
  571. ,
  572. set(layer[skin_thumbborder].visible, false);
  573. );
  574. if(scene[get(xml.scene)].mapspotname,
  575. layer[skin_map].activatespot(get(scene[get(xml.scene)].mapspotname));
  576. layer[skin_map].pantospot(get(scene[get(xml.scene)].mapspotname));
  577. );
  578. if(plugin[skin_gyro].isavailable == true AND view.vlookatrange == 180,
  579. set(layer[skin_btn_gyro].visible, true);
  580. ,
  581. set(layer[skin_btn_gyro].visible, false)
  582. );
  583. if(view.vlookatrange LT 180,
  584. if(backup_control_bouncinglimits === null,
  585. copy(backup_control_bouncinglimits, control.bouncinglimits);
  586. );
  587. set(control.bouncinglimits, false);
  588. ,
  589. if(backup_control_bouncinglimits !== null,
  590. copy(control.bouncinglimits, backup_control_bouncinglimits);
  591. );
  592. );
  593. if(scene[get(xml.scene)].isvideopano AND plugin[video] !== null,
  594. skin_video_addcontrols();
  595. ,
  596. skin_video_removecontrols();
  597. );
  598. );
  599. </action>
  600. <action name="skin_gotoscene">
  601. if(scene[%1],
  602. copy(cursceneindex, scene[get(xml.scene)].index);
  603. copy(newsceneindex, scene[%1].index);
  604. 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)) );
  605. );
  606. </action>
  607. <action name="skin_nextscene">
  608. add(newsceneindex, scene[get(xml.scene)].index, %1);
  609. if(newsceneindex GE 0 AND newsceneindex LT scene.count,
  610. skin_loadscene(get(newsceneindex), calc(%1 LT 0 ? skin_settings.loadscene_blend_prev : skin_settings.loadscene_blend_next));
  611. );
  612. </action>
  613. <action name="skin_nextscene_loop">
  614. add(newsceneindex, scene[get(xml.scene)].index, %1);
  615. sub(lastsceneindex, scene.count, 1);
  616. if(newsceneindex LT 0, copy(newsceneindex,lastsceneindex));
  617. if(newsceneindex GT lastsceneindex, set(newsceneindex,0));
  618. skin_loadscene(get(newsceneindex), calc(%1 LT 0 ? skin_settings.loadscene_blend_prev : skin_settings.loadscene_blend_next));
  619. </action>
  620. <!-- skin_loadscene(scenenameorindex, blendmode) -->
  621. <action name="skin_loadscene">
  622. if(webvr.isenabled AND scene.count GT 1,
  623. set(hotspot[webvr_prev_scene].visible, false);
  624. set(hotspot[webvr_next_scene].visible, false);
  625. );
  626. txtadd(layer[skin_thumbborder].parent, 'skin_thumb_', get(scene[%1].index));
  627. layer[skin_thumbs].scrolltocenter(get(scene[%1].thumbx), get(scene[%1].thumby));
  628. loadscene(get(scene[%1].name), view.vlookat=%2&amp;view.hlookat=%3, get(skin_settings.loadscene_flags), get(blendmodes[simple crossblending].blend));
  629. </action>
  630. <action name="skin_showloading">
  631. if(display.stereo == true,
  632. set(layer[skin_loadingtext].visible, false);
  633. ,
  634. set(layer[skin_loadingtext].visible, %1);
  635. );
  636. </action>
  637. <action name="skin_hidetooltips">
  638. set(layer[skin_tooltip].alpha,0.0);
  639. set(layer[skin_tooltip].visible,false);
  640. </action>
  641. <action name="skin_buttonglow">
  642. if('%1' !== 'null',
  643. set(strength,0.7);
  644. if(%2 != null, set(strength,%2));
  645. set(layer[skin_buttonglow].parent, %1);
  646. set(layer[skin_buttonglow].visible, true);
  647. tween(layer[skin_buttonglow].alpha, get(strength), 0.07);
  648. ,
  649. tween(layer[skin_buttonglow].alpha, 0.0, 0.1, default,
  650. set(layer[skin_buttonglow].parent, null);
  651. set(layer[skin_buttonglow].visible, false);
  652. );
  653. );
  654. </action>
  655. <action name="skin_calc_opened_closed">
  656. if(layer[get(name)].y_closed === null,
  657. set(layer[get(name)].y_opened, get(layer[get(name)].y));
  658. set(layer[get(name)].y_closed, calc(layer[get(name)].y - skin_settings.controlbar_offset - skin_settings.controlbar_height + skin_settings.controlbar_offset_closed));
  659. );
  660. </action>
  661. <action name="skin_hideskin">
  662. callwith(layer[skin_scroll_window], skin_calc_opened_closed() );
  663. callwith(layer[skin_splitter_bottom], skin_calc_opened_closed() );
  664. callwith(layer[skin_control_bar], skin_calc_opened_closed() );
  665. if(layer[skin_map].state != 'closed', skin_showmap(false); wait(0.40); );
  666. if(layer[skin_thumbs].state != 'closed', skin_showthumbs(false); wait(0.25); );
  667. set(hidetime, calc('%1' == 'instant' ? 0.0 : 0.5));
  668. tween(layer[skin_scroll_window].y, get(layer[skin_scroll_window ].y_closed), get(hidetime));
  669. tween(layer[skin_splitter_bottom].y, get(layer[skin_splitter_bottom].y_closed), get(hidetime));
  670. tween(layer[skin_control_bar].y, get(layer[skin_control_bar ].y_closed), get(hidetime));
  671. tween(layer[skin_btn_prev_fs].x, 0, get(hidetime));
  672. tween(layer[skin_btn_next_fs].x, 0, get(hidetime));
  673. if(layer[skin_logo], tween(layer[skin_logo].alpha, 0.0, 0.5, default, set(layer[skin_logo].visible,false)); );
  674. stopdelayedcall(skin_btn_show_alpha);
  675. set(layer[skin_btn_show].visible, true);
  676. delayedcall(skin_btn_show_alpha, get(hidetime), tween(layer[skin_btn_show].alpha, 0.25, 0.25); );
  677. </action>
  678. <action name="skin_showskin">
  679. tween(layer[skin_scroll_window ].y, get(layer[skin_scroll_window ].y_opened));
  680. tween(layer[skin_splitter_bottom].y, get(layer[skin_splitter_bottom].y_opened));
  681. tween(layer[skin_control_bar ].y, get(layer[skin_control_bar ].y_opened));
  682. tween(layer[skin_btn_prev_fs].x, -50);
  683. tween(layer[skin_btn_next_fs].x, -50);
  684. if(layer[skin_logo], set(layer[skin_logo].visible,true); tween(layer[skin_logo].alpha, 1.0); );
  685. stopdelayedcall(skin_btn_show_alpha);
  686. set(layer[skin_btn_show].visible, false);
  687. delayedcall(skin_btn_show_alpha, 0.25, tween(layer[skin_btn_show].alpha, 0.0, 0.0); );
  688. </action>
  689. <action name="skin_showthumbs">
  690. if(%1 == null, if(layer[skin_thumbs].state == 'closed', set(show,true), set(show,false)); , set(show,%1); );
  691. mul(mh, layer[skin_scroll_layer].pixelheight, -1);
  692. if(show,
  693. set(layer[skin_thumbs].state, 'opened');
  694. tween(layer[skin_thumbs].alpha, 1.0, 0.25);
  695. add(mh, layer[skin_thumbs].height);
  696. add(mh, layer[skin_scroll_layer].y_offset);
  697. tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint);
  698. set(layer[skin_thumbs_container].visible, true);
  699. tween(layer[skin_thumbs_container].alpha, 1.0, 0.25);
  700. tween(layer[skin_map].alpha, 0.0, 0.25, default, set(layer[skin_map].visible,false));
  701. ,
  702. set(layer[skin_thumbs].state, 'closed');
  703. tween(layer[skin_thumbs].alpha, 0.0, 0.25, easeOutQuint);
  704. add(mh, layer[skin_scroll_layer].y_offset);
  705. tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint, set(layer[skin_thumbs_container].visible, false););
  706. );
  707. </action>
  708. <action name="skin_showmap">
  709. if(%1 == null, if(layer[skin_map].state == 'closed', set(show,true), set(show,false)); , set(show,%1); );
  710. mul(mh, layer[skin_scroll_layer].pixelheight, -1);
  711. if(show,
  712. tween(layer[skin_thumbs_container].alpha, 0.0, 0.25, default, set(layer[skin_thumbs_container].visible,false));
  713. set(layer[skin_map].visible, true);
  714. tween(layer[skin_map].alpha, 1.0, 0.25);
  715. set(layer[skin_map].state, 'opened');
  716. sub(hh,area.pixelheight,skin_settings.controlbar_offset);
  717. sub(hh,layer[skin_control_bar].height);
  718. sub(hh,32);
  719. add(mh,hh);
  720. sub(hh,skin_settings.controlbar_overlap);
  721. copy(layer[skin_map].height, hh);
  722. tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint);
  723. ,
  724. if(layer[skin_map].state != 'closed',
  725. set(layer[skin_map].state, 'closed');
  726. add(mh, layer[skin_scroll_layer].y_offset);
  727. tween(layer[skin_map].alpha, 0.0, 0.5, easeOutQuint);
  728. tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint, set(layer[skin_map].visible,false) );
  729. );
  730. );
  731. </action>
  732. <action name="skin_keydown_event">
  733. if(keycode == 33, skin_nextscene_loop(-1) ); <!-- Page Up - previous scene -->
  734. if(keycode == 34, skin_nextscene_loop(+1) ); <!-- Page Dowm - next scene -->
  735. if(keycode == 35, skin_gotoscene(calc(scene.count-1)) ); <!-- End - last scene -->
  736. if(keycode == 36, skin_gotoscene(0) ); <!-- Home/Pos1 - first scene -->
  737. </action>
  738. <action name="skin_deeplinking_update_url">
  739. if(skin_settings.deeplinking AND (!webvr OR webvr.isenabled === false),
  740. delayedcall(skin_deeplinking_update, calc(%1 == null ? 0.1 : %1), skin_deeplinking_update_url_process() );
  741. );
  742. </action>
  743. <action name="skin_deeplinking_update_url_process">
  744. copy(adr, browser.location);
  745. indexoftxt(qi, get(adr), '?');
  746. if(qi GT 0, subtxt(adr, adr, 0, get(qi)));
  747. copy(si, scene[get(xml.scene)].index);
  748. copy(h, view.hlookat);
  749. copy(v, view.vlookat);
  750. copy(f, view.fov);
  751. copy(d, view.distortion);
  752. copy(a, view.architectural);
  753. clamp(d, 0.0, 1.0);
  754. clamp(a, 0.0, 1.0);
  755. set(pp, calc(f LT 10 ? 6 : 2));
  756. roundval(h, get(pp));
  757. roundval(v, get(pp));
  758. roundval(f, get(pp));
  759. roundval(d, 2);
  760. roundval(a, 1);
  761. set(adr, calc(adr + '?startscene=' + si + '&amp;startactions=lookat('+h+','+v+','+f+','+d+','+a+');'));
  762. js( history.replaceState(null, document.title, get(adr)); );
  763. </action>
  764. <!-- reload the scene when there is a special image for VR -->
  765. <action name="skin_reloadscene_webvr">
  766. delayedcall(0.1,
  767. if(scene[get(xml.scene)].havevrimage,
  768. copy(keeplookingdirection_backup, skin_settings.webvr_gyro_keeplookingdirection);
  769. set(skin_settings.webvr_gyro_keeplookingdirection, true);
  770. loadscene(get(xml.scene), null, MERGE|KEEPVIEW|KEEPMOVING|KEEPPLUGINS|KEEPHOTSPOTS|NOPREVIEW, BLEND(0.5));
  771. copy(skin_settings.webvr_gyro_keeplookingdirection, keeplookingdirection_backup);
  772. delete(keeplookingdirection_backup);
  773. );
  774. );
  775. </action>
  776. <!-- videopano support - http://krpano.com/plugins/videoplayer/ -->
  777. <action name="skin_video_addcontrols">
  778. set(events[skin_events].onclick, skin_video_clickevent() );
  779. set(plugin[video].onvideoready, skin_video_updatestate() );
  780. set(plugin[video].onvideoplay, skin_video_updatestate() );
  781. set(plugin[video].onvideopaused, skin_video_updatestate() );
  782. set(plugin[video].onvideocomplete, skin_video_updatestate() );
  783. if(plugin[video].ispaused AND plugin[video].pausedonstart,
  784. set(layer[skin_video_playpause].state, 'visible');
  785. set(layer[skin_video_playpause].enabled, true);
  786. tween(layer[skin_video_playpause].alpha, 1.0);
  787. );
  788. delayedcall(skin_video_delayedvisible, 0.25, set(layer[skin_video_controls].visible, true) );
  789. skin_video_updateseekbarwidth();
  790. set(layer[skin_video_seekpos].x,0);
  791. set(layer[skin_video_loadbar].width,0);
  792. setinterval(skin_video_seek_updates, 0.5, skin_video_updatetime() );
  793. </action>
  794. <action name="skin_video_removecontrols">
  795. stopdelayedcall(skin_video_delayedvisible);
  796. set(events[skin_events].onclick, null);
  797. set(layer[skin_video_playpause].alpha, 0.0);
  798. set(layer[skin_video_controls].visible, false);
  799. clearinterval(skin_video_seek_updates);
  800. </action>
  801. <action name="skin_video_updatetime">
  802. copy(t1, plugin[video].time);
  803. copy(t2, plugin[video].totaltime);
  804. if(%1 !== null, calc(t1, %1 * t2); );
  805. div(t1_min, t1, 60);
  806. mod(t1_sec, t1, 60);
  807. Math.floor(t1_min);
  808. Math.floor(t1_sec);
  809. div(t2_min, t2, 60);
  810. mod(t2_sec, t2, 60);
  811. Math.floor(t2_min);
  812. Math.floor(t2_sec);
  813. calc(layer[skin_video_time].html, t1_min + ':' + (t1_sec LT 10 ? '0' : '') + t1_sec + ' / ' + t2_min + ':' + (t2_sec LT 10 ? '0' : '') + t2_sec);
  814. calc(layer[skin_video_seekpos].x, (t1 / t2 * 100) + '%');
  815. calc(layer[skin_video_loadbar].width, (plugin[video].loadedbytes / plugin[video].totalbytes * 100) + '%');
  816. </action>
  817. <action name="skin_video_updateseekbarwidth">
  818. if(skin_settings.title,
  819. calc(layer[skin_video_seekbar_container].width, 0 - (32 + layer[skin_title].pixelwidth + layer[skin_video_time].pixelwidth));
  820. calc(layer[skin_video_seekbar_container].x, layer[skin_title].pixelwidth + 16);
  821. ,
  822. calc(layer[skin_video_seekbar_container].width, 0 - (24 + layer[skin_video_time].pixelwidth));
  823. set(layer[skin_video_seekbar_container].x, 8);
  824. );
  825. </action>
  826. <action name="skin_video_ondownseeking">
  827. asyncloop(pressed,
  828. screentolayer(skin_video_seekbar, mouse.stagex,mouse.stagey, lx,ly);
  829. calc(seekpos, lx / layer[skin_video_seekbar].pixelwidth);
  830. clamp(seekpos, 0.0, 1.0);
  831. skin_video_updatetime(seekpos);
  832. ,
  833. plugin[video].seek(calc((seekpos * 100) + '%'));
  834. );
  835. </action>
  836. <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();" />
  837. <action name="skin_video_updatestate">
  838. calc(layer[skin_video_playpause].crop, plugin[video].ispaused ? '0|640|64|64' : '64|640|64|64');
  839. if(plugin[video].iscomplete,
  840. set(layer[skin_video_playpause].state, 'visible');
  841. tween(layer[skin_video_playpause].alpha, 1.0);
  842. );
  843. </action>
  844. <action name="skin_video_playpause_click">
  845. if(plugin[video].ispaused,
  846. plugin[video].play();
  847. set(layer[skin_video_playpause].state, 'hidden');
  848. tween(layer[skin_video_playpause].alpha, 0.0);
  849. ,
  850. plugin[video].pause();
  851. set(layer[skin_video_playpause].state, 'visible');
  852. tween(layer[skin_video_playpause].alpha, 1.0);
  853. delayedcall(autohide_pp, 2.0, set(layer[skin_video_playpause].state,'hidden'); tween(layer[skin_video_playpause].alpha, 0.0); );
  854. );
  855. </action>
  856. <action name="skin_video_clickevent">
  857. stopdelayedcall(autohide_pp);
  858. switch(layer[skin_video_playpause].state, 'visible', 'hidden');
  859. if(layer[skin_video_playpause].state == 'hidden',
  860. tween(layer[skin_video_playpause].alpha, 0.0);
  861. ,
  862. tween(layer[skin_video_playpause].alpha, 1.0);
  863. delayedcall(autohide_pp, 2.0, set(layer[skin_video_playpause].state,'hidden'); tween(layer[skin_video_playpause].alpha, 0.0); );
  864. );
  865. </action>
  866. <!-- context menu - http://krpano.com/docu/xml/#contextmenu -->
  867. <contextmenu fullscreen="false" versioninfo="false">
  868. <item name="cc" caption="更改控制模式" onclick="skin_changecontrolmode();" separator="true"/>
  869. <item name="nv" caption="正常视角" onclick="skin_view_normal();" showif="view.vlookatrange == 180" separator="true"/>
  870. <item name="sv" caption="立体视角" onclick="skin_view_stereographic();" showif="view.vlookatrange == 180" devices="flash|webgl"/>
  871. <item name="pv" caption="帕尼尼视角" onclick="skin_view_pannini();" showif="view.vlookatrange == 180" devices="flash|webgl"/>
  872. <item name="lp" caption="小行星视角" onclick="skin_view_littleplanet();" showif="view.vlookatrange == 180" devices="flash|webgl"/>
  873. <item name="bv" caption="水晶球视角" onclick="skin_view_ball();" showif="view.vlookatrange == 180" devices="flash|webgl"/>
  874. </contextmenu>
  875. <action name="skin_changecontrolmode">
  876. switch(control.mouse, moveto, drag);
  877. switch(control.touch, moveto, drag);
  878. </action>
  879. <action name="skin_view_look_straight">
  880. if(view.vlookat LT -80 OR view.vlookat GT +80,
  881. tween(view.vlookat, 0.0, 1.0, easeInOutSine);
  882. tween(view.fov, 100, distance(150,0.8));
  883. );
  884. skin_deeplinking_update_url(1.0);
  885. </action>
  886. <action name="skin_view_normal">
  887. skin_view_look_straight();
  888. tween(view.architectural, 0.0, distance(1.0,0.5));
  889. tween(view.pannini, 0.0, distance(1.0,0.5));
  890. tween(view.distortion, 0.0, distance(1.0,0.5));
  891. </action>
  892. <action name="skin_view_fisheye">
  893. skin_view_look_straight();
  894. tween(view.architectural, 0.0, distance(1.0,0.5));
  895. tween(view.pannini, 0.0, distance(1.0,0.5));
  896. tween(view.distortion, 0.35, distance(1.0,0.5));
  897. </action>
  898. <action name="skin_view_architectural">
  899. skin_view_look_straight();
  900. tween(view.architectural, 1.0, distance(1.0,0.5));
  901. tween(view.pannini, 0.0, distance(1.0,0.5));
  902. tween(view.distortion, 0.0, distance(1.0,0.5));
  903. </action>
  904. <action name="skin_view_stereographic">
  905. skin_view_look_straight();
  906. tween(view.architectural, 0.0, distance(1.0,0.5));
  907. tween(view.pannini, 0.0, distance(1.0,0.5));
  908. tween(view.distortion, 1.0, distance(1.0,0.8));
  909. </action>
  910. <action name="skin_view_pannini">
  911. skin_view_look_straight();
  912. tween(view.architectural, 0.0, distance(1.0,0.5));
  913. tween(view.pannini, 1.0, distance(1.0,0.8));
  914. if(view.distortion LT 0.1,
  915. tween(view.distortion, 1.0, distance(1.0,0.8));
  916. );
  917. </action>
  918. <action name="skin_view_ball">
  919. tween(view.architectural, 0.0, distance(1.0,0.5));
  920. tween(view.pannini, 0.0, distance(1.0,0.5));
  921. tween(view.distortion, 2.8, distance(1.0,0.5),easeOutQuad,
  922. skin_view_look_straight();
  923. );
  924. </action>
  925. <action name="skin_view_littleplanet">
  926. tween(view.architectural, 0.0, distance(1.0,0.5));
  927. tween(view.pannini, 0.0, distance(1.0,0.5));
  928. tween(view.distortion, 1.0, distance(1.0,0.8));
  929. tween(view.fov, 150, distance(150,0.8));
  930. tween(view.vlookat, 90, distance(100,0.8));
  931. add(new_hlookat, view.hlookat, 123.0);
  932. tween(view.hlookat, get(new_hlookat), distance(100,0.8));
  933. skin_deeplinking_update_url(1.0);
  934. </action>
  935. <action name="do_crop_animation">registerattribute(xframes, calc((imagewidth / %1) BOR 0));
  936. registerattribute(yframes, calc((imageheight / %2) BOR 0)); registerattribute(frames, calc(xframes * yframes));
  937. registerattribute(frame, 0); set(crop, '0|0|%1|%2'); setinterval(calc('crop_anim_' + name), calc(1.0 / %3),
  938. if(loaded, inc(frame); if(frame GE frames, if(onlastframe !== null, onlastframe() ); set(frame,0); ); mod(xpos,
  939. frame, xframes); div(ypos, frame, xframes); Math.floor(ypos); mul(xpos, %1); mul(ypos, %2); calc(crop, xpos +
  940. '|' + ypos + '|%1|%2'); , clearinterval(calc('crop_anim_' + name)); ); );
  941. </action>
  942. <action name="addImgTextHotSpot">
  943. set(schp_name,%2);
  944. set(hotspot[get(schp_name)].url,%1);
  945. set(hotspot[get(schp_name)].ath,%4);
  946. set(hotspot[get(schp_name)].atv,%5);
  947. set(hotspot[get(schp_name)].hotspottitle,%3);
  948. set(hotspot[get(schp_name)].wordcontent,%9);
  949. set(hotspot[get(schp_name)].hotspotlink,%8);
  950. set(hotspot[get(schp_name)].alpha,1);
  951. set(hotspot[get(schp_name)].zIndex,99);
  952. set(hotspot[get(schp_name)].scale,1);
  953. set(hotspot[get(schp_name)].autoalpha,false);
  954. set(hotspot[get(schp_name)].distorted,false);
  955. set(hotspot[get(schp_name)].width,'prop');
  956. set(hotspot[get(schp_name)].height,%11);
  957. set(hotspot[get(schp_name)].visible,true);
  958. set(hotspot[get(schp_name)].onhover,showtext(get(hotspottitle),skintext));
  959. addhotspot(get(schp_name));
  960. set(hotspot[get(schp_name)].onclick,'js(__sdk.Tags.linkopen(%6,%2,%9));');
  961. if(%7 == false,
  962. ,
  963. set(hotspot[get(schp_name)].ondown,draghotspot(););
  964. set(hotspot[get(schp_name)].onup,js(__sdk.Tags..updateHotSpotData(get(xml.scene),get(name),get(ath),get(atv),"imgtext")));
  965. );
  966. txtadd(hotspot[get(schp_name)].onloaded,"do_crop_animation(84,84, 40);");
  967. txtadd(hotspot[get(schp_name)].onloaded,"add_all_the_time_tooltip(hotspot[get(name)].hotspottitle);");
  968. set(hotspot[get(schp_name)].onhover,null);
  969. set(hotspot[get(schp_name)].onout,null);
  970. set(hotspot[get(schp_name)].onover,null);
  971. txtadd(tooltipname, 'tooltip_', get(schp_name));
  972. set(plugin[get(tooltipname)].onclick,'js(__sdk.Tags.linkopen(%6,%2,%9));');
  973. if(%10 == true,
  974. set(plugin[get(tooltipname)].visible,true);,
  975. set(plugin[get(tooltipname)].visible,false);
  976. );
  977. txtadd(csstxt, 'text-align:center; color:#FFFFFF; font-family:STXihei; font-size:', %12,'px');
  978. set(plugin[get(tooltipname)].css,get(csstxt)));,
  979. </action>
  980. <action name="add_all_the_time_tooltip">
  981. txtadd(tooltipname, 'tooltip_', get(name)); addplugin(get(tooltipname));
  982. txtadd(plugin[get(tooltipname)].parent, 'hotspot[', get(name), ']');
  983. set(plugin[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
  984. set(plugin[get(tooltipname)].align,center);
  985. set(plugin[get(tooltipname)].edge,top);
  986. set(plugin[get(tooltipname)].x,0);
  987. set(plugin[get(tooltipname)].autowidth,true);
  988. set(plugin[get(tooltipname)].height,36);
  989. if(device.mobile,set(plugin[get(tooltipname)].scale,0.7));
  990. if(device.mobile,set(plugin[get(tooltipname)].height,48));
  991. set(plugin[get(tooltipname)].background,true);
  992. set(plugin[get(tooltipname)].backgroundcolor,0x000000);
  993. set(plugin[get(tooltipname)].roundedge,5);
  994. set(plugin[get(tooltipname)].backgroundalpha,0.5);
  995. set(plugin[get(tooltipname)].padding,5);
  996. set(plugin[get(tooltipname)].vcenter,true);
  997. set(plugin[get(tooltipname)].border,false);
  998. set(plugin[get(tooltipname)].borderwidth,1);
  999. set(plugin[get(tooltipname)].bordercolor,0xFFFFFF);
  1000. set(plugin[get(tooltipname)].borderalpha,0.2);
  1001. set(plugin[get(tooltipname)].glow,0);
  1002. set(plugin[get(tooltipname)].glowcolor,0xFFFFFF);
  1003. <!-- set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:STXihei; font-size:14px;');
  1004. if(device.mobile,
  1005. set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF;
  1006. font-family:STXihei; font-weight:bold; font-size:14px;'); ); -->
  1007. set(plugin[get(tooltipname)].textshadow,0);
  1008. set(plugin[get(tooltipname)].textshadowrange,6.0);
  1009. set(plugin[get(tooltipname)].textshadowangle,90);
  1010. if(text ==
  1011. '' OR text === null, copy(plugin[get(tooltipname)].html,%1), copy(plugin[get(tooltipname)].html,text) );
  1012. set(plugin[get(tooltipname)].enabled,true);
  1013. </action>
  1014. <!-- 设置热点可见 -->
  1015. <action name="set_hotspot_visible">
  1016. for(set(i,0),i LT hotspot.count,inc(i),
  1017. if(%1 == false,
  1018. if(hotspot[get(i)].visible == true,
  1019. set(hotspot[get(i)].mark,true);set(hotspot[get(i)].visible,%1);
  1020. );
  1021. ,
  1022. if(hotspot[get(i)].mark == true,
  1023. set(hotspot[get(i)].visible,%1);
  1024. );
  1025. );
  1026. );
  1027. </action>
  1028. <!-- 自动旋转 -->
  1029. <autorotate enabled="false" waittime="1.0" speed="1.8" horizon="0.0" tofov="120.0"/>
  1030. <!-- 场景切换方式 -->
  1031. <blendmodes name="simple crossblending" blend="BLEND(1.0, easeInCubic)" />
  1032. <blendmodes name="zoom blend" blend="ZOOMBLEND(2.0, 2.0, easeInOutSine)" />
  1033. <blendmodes name="black-out" blend="COLORBLEND(2.0, 0x000000, easeOutSine)" />
  1034. <blendmodes name="white-flash" blend="LIGHTBLEND(1.0, 0xFFFFFF, 2.0, linear)" />
  1035. <blendmodes name="right-to-left" blend="SLIDEBLEND(1.0, 0.0, 0.2, linear)" />
  1036. <blendmodes name="top-to-bottom" blend="SLIDEBLEND(1.0, 90.0, 0.01, linear)" />
  1037. <blendmodes name="diagonal" blend="SLIDEBLEND(1.0, 135.0, 0.4, linear)" />
  1038. <blendmodes name="vertical open" blend="OPENBLEND(0.7, 1.0, 0.1, 0.0, linear)" />
  1039. <blendmodes name="circle open" blend="OPENBLEND(1.0, 0.0, 0.2, 0.0, linear)" />
  1040. <blendmodes name="horizontal open" blend="OPENBLEND(1.0, -1.0, 0.3, 0.0, linear)" />
  1041. <blendmodes name="elliptic + zoom" blend="OPENBLEND(1.0, -0.5, 0.3, 0.8, linear)" />
  1042. <!-- startup action - load the first scene -->
  1043. <action name="startup" autorun="onstart">
  1044. if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
  1045. set(vl, get(view.vlookat));
  1046. set(hl, get(view.hlookat));
  1047. set(vars, calc('view.vlookat=' + vl + '&amp;' + 'view.hlookat=' + hl));
  1048. trace(get(vars));
  1049. loadscene(get(startscene), get(vars), MERGE);
  1050. if(startactions !== null, startactions() );
  1051. </action>
  1052. <!-- 现行热点 -->
  1053. <include url="%SWFPATH%/tooltip.xml" />
  1054. <!-- 底部logo -->
  1055. <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" />
  1056. <!-- 顶部logo -->
  1057. <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" />
  1058. <action name="animationComplete">
  1059. set(control.usercontrol, all);
  1060. js_sceneReadyCallback();
  1061. <!-- setup_pano_settings();
  1062. setup_global_settings();
  1063. js_sceneReadyCallback();
  1064. setup_autoplay();
  1065. autorotate.interrupt(); -->
  1066. </action>
  1067. <action name="js_sceneReadyCallback">
  1068. set(js_command, '__sdk.Scene.sceneReady()');
  1069. jscall(get(js_command));
  1070. </action>
  1071. </krpano>