hotspot.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <krpano version="1.20" title="Virtual Tour" showerrors="false">
  2. <include url="../skin/vtourskin.xml" />
  3. <include url="../skin/loadingpercenttext.xml" />
  4. <skin_settings maps="true"
  5. maps_type="google"
  6. maps_bing_api_key=""
  7. maps_google_api_key=""
  8. maps_zoombuttons="false"
  9. maps_loadonfirstuse="false"
  10. gyro="true"
  11. gyro_keeplookingdirection="false"
  12. webvr="true"
  13. webvr_keeplookingdirection="true"
  14. webvr_prev_next_hotspots="true"
  15. littleplanetintro="false"
  16. followmousecontrol="false"
  17. title="true"
  18. thumbs="true"
  19. thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
  20. thumbs_opened="false"
  21. thumbs_text="false"
  22. thumbs_dragging="true"
  23. thumbs_onhoverscrolling="false"
  24. thumbs_scrollbuttons="false"
  25. thumbs_scrollindicator="false"
  26. thumbs_loop="false"
  27. tooltips_buttons="false"
  28. tooltips_thumbs="false"
  29. tooltips_hotspots="false"
  30. tooltips_mapspots="false"
  31. deeplinking="false"
  32. loadscene_flags="MERGE"
  33. loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
  34. loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
  35. loadscene_blend_next="SLIDEBLEND(0.5, 0, 0.75, linear)"
  36. loadingtext="loading..."
  37. layout_width="100%"
  38. layout_maxwidth="814"
  39. controlbar_width="-24"
  40. controlbar_height="40"
  41. controlbar_offset="20"
  42. controlbar_offset_closed="-40"
  43. controlbar_overlap.no-fractionalscaling="10"
  44. controlbar_overlap.fractionalscaling="0"
  45. design_skin_images="vtourskin.png"
  46. design_bgcolor="0x2D3E50"
  47. design_bgalpha="0.8"
  48. design_bgborder="0"
  49. design_bgroundedge="1"
  50. design_bgshadow="0 4 10 0x000000 0.3"
  51. design_thumbborder_bgborder="3 0xFFFFFF 1.0"
  52. design_thumbborder_padding="2"
  53. design_thumbborder_bgroundedge="0"
  54. design_text_css="color:#FFFFFF; font-family:Arial;"
  55. design_text_shadow="1"
  56. />
  57. <control
  58. bouncinglimits="true"
  59. />
  60. <action name="startup" autorun="onstart">
  61. if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
  62. loadscene(get(startscene), null, MERGE);
  63. if(startactions !== null, startactions() );
  64. </action>
  65. <action name="add_all_the_time_tooltip_for_VR">
  66. txtadd(tooltipname, 'vrtooltip_', get(name));
  67. addhotspot(get(tooltipname));
  68. set(hotspot[get(tooltipname)],
  69. type=text,
  70. edge=get(hotspot[get(name)].edge),
  71. distorted=get(hotspot[get(name)].distorted),
  72. ath=get(hotspot[get(name)].ath),
  73. atv=get(hotspot[get(name)].atv),
  74. oy=-36,
  75. ox=0,
  76. vcenter=true,
  77. padding='3 8',
  78. mipmapping=true,
  79. oversampling=2,
  80. bg=true,
  81. bgcolor=rgba(18, 18, 18, 0.8),
  82. bgroundedge=2,
  83. bgalpha=0.8,
  84. bgborder=0,
  85. bgshadow='0 0 0 0x000000 0',
  86. css=calc(device.mobile ? 'text-align:center; color:#FFFFFF; font-family:MicrosoftYahei; font-size:14px;':'text-align:left; color:#FFFFFF; font-family:MicrosoftYahei; font-size:14px;'),
  87. txtshadow='0 0 0 0x000000 0';
  88. enabled=true,
  89. );
  90. txtadd(hotspot[get(tooltipname)].onclick,'callwith(hotspot[',get(name),'],onclick)');
  91. if(text == '' OR text === null,
  92. copy(hotspot[get(tooltipname)].html,scene[get(linkedscene)].title),
  93. copy(hotspot[get(tooltipname)].html,text);
  94. );
  95. if(lp_running == false,
  96. set(hotspot[get(tooltipname)].visible,true);
  97. ,
  98. if(!webvr.isenabled,
  99. if(lp_running == true,
  100. set(hotspot[get(tooltipname)].visible,false);
  101. set(hotspot[get(tooltipname)].mark2,true);
  102. );
  103. );
  104. );
  105. if(hotspot[get(name)].normal == false,
  106. set(hotspot[get(tooltipname)].normal,false);
  107. set(hotspot[get(tooltipname)].onloaded,
  108. if(webvr.isenabled,
  109. set(visible,false);
  110. ,
  111. if(lp_running == false OR lp_running == null OR lp_running === null,
  112. set(visible,true);
  113. );
  114. );
  115. );
  116. );
  117. </action>
  118. <action name="draghotspot">
  119. spheretoscreen(ath, atv, hotspotcenterx, hotspotcentery, calc(mouse.stagex LT stagewidth/2 ? 'l' : 'r'));
  120. sub(drag_adjustx, mouse.stagex, hotspotcenterx);
  121. sub(drag_adjusty, mouse.stagey, hotspotcentery);
  122. asyncloop(pressed,
  123. sub(dx, mouse.stagex, drag_adjustx);
  124. sub(dy, mouse.stagey, drag_adjusty);
  125. screentosphere(dx, dy, ath, atv);
  126. <!-- print_hotspot_pos(); -->
  127. jscall(calc('document.getElementById(window.activekrpanowindow).hooks.hookFn("'+get(name)+','+get(ath)+','+get(atv)+'")'));
  128. <!-- js(getHotspotPoint(get(name),get(ath),get(atv));); -->
  129. );
  130. </action>
  131. <!-- <action name="test" scope="local">
  132. jscall(calc('window.krp.hooks.hookFn()'));
  133. </action> -->
  134. <style name="skin_filter" opacity="0.5"/>
  135. <scene name="scene_99" title="99" onstart="" thumburl="" lat="" lng="" heading="0.0">
  136. <view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fov="95" fovmin="70" fovmax="120" limitview="auto" />
  137. <preview url="" />
  138. <image>
  139. <cube url="" />
  140. </image>
  141. </scene>
  142. <events name="nadirlogorotation"
  143. keep="true"
  144. onviewchange="copy(hotspot[nadirlogo].rotate,view.hlookat);"
  145. />
  146. </krpano>