vtourskin.xml 63 KB

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