1
0

krpano.xml 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <krpano maxwidth="2048" maxheight="1024" logkey="false" showerrors="false" debugmode="false">
  2. <renderer devicescale="auto" gpu="true" />
  3. <plugin name="webvr" devices="vr_headset" html5="prefer-webgl" />
  4. <include url="skin/vtourskin.xml"/>
  5. <include url="skin/loadingpercenttext.xml"/>
  6. <skin_settings maps="false"
  7. maps_type="google"
  8. maps_bing_api_key=""
  9. maps_google_api_key=""
  10. maps_zoombuttons="false"
  11. maps_loadonfirstuse="true"
  12. gyro="true"
  13. gyro_keeplookingdirection="false"
  14. webvr="true"
  15. webvr_keeplookingdirection="false"
  16. webvr_prev_next_hotspots="false"
  17. autotour="false"
  18. littleplanetintro="false"
  19. followmousecontrol="false"
  20. title="false"
  21. thumbs="false"
  22. thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
  23. thumbs_opened="false"
  24. thumbs_text="false"
  25. thumbs_dragging="false"
  26. thumbs_onhoverscrolling="false"
  27. thumbs_scrollbuttons="false"
  28. thumbs_scrollindicator="false"
  29. thumbs_loop="false"
  30. tooltips_buttons="false"
  31. tooltips_thumbs="false"
  32. tooltips_hotspots="false"
  33. tooltips_mapspots="false"
  34. deeplinking="false"
  35. loadscene_flags="MERGE|KEEPVIEW"
  36. loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
  37. loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
  38. loadscene_blend_next="SLIDEBLEND(0.5, 0, 0.75, linear)"
  39. loadingtext=""
  40. layout_width="100%"
  41. layout_maxwidth="814"
  42. controlbar_width="-24"
  43. controlbar_height="0"
  44. controlbar_offset="20"
  45. controlbar_offset_closed="-1555540"
  46. controlbar_overlap.no-fractionalscaling="10"
  47. controlbar_overlap.fractionalscaling="0"
  48. design_skin_images="vtourskin.png"
  49. design_bgcolor="0x2D3E50"
  50. design_bgalpha="0.8"
  51. design_bgborder="0"
  52. design_bgroundedge="1"
  53. design_bgshadow="0 4 10 0x000000 0.3"
  54. design_thumbborder_bgborder="3 0xFFFFFF 1.0"
  55. design_thumbborder_padding="2"
  56. design_thumbborder_bgroundedge="0"
  57. design_text_css="color:#FFFFFF; font-family:Arial;"
  58. design_text_shadow="1"
  59. />
  60. <!-- <style name="roomspot" alpha="0.0" capture="false" /> -->
  61. <!-- <control bouncinglimits="true"/> -->
  62. <scene name="test1">
  63. <image>
  64. <cube url="" />
  65. </image>
  66. <!-- 初始化场景的方向以及角度 -->
  67. <!-- <view hlookat="0.0" vlookat="0.0" fovtype="HFOV" fov="150" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" /> -->
  68. <!-- 0,0 在中心 -->
  69. <!-- <hotspot name="hot152" keep="false" url="/static/img/vtourskin_hotspot.png" ath="0.0" atv="0.0"
  70. distorted="true"
  71. scale="1.0"
  72. rotate="0.0" onclick="goto(tr);jscall(document.getElementsByClassName('everyscenebox')[1].classList.add('nowscene'));jscall(document.getElementsByClassName('everyscenebox')[0].classList.remove('nowscene'););">
  73. </hotspot> -->
  74. </scene>
  75. <!-- <events name="nadirlogo" keep="true" onviewchange="copy(hotspot[nadirlogo].rotate, view.hlookat);" /> -->
  76. <!-- <contextmenu fullscreen="false" versioninfo="false" /> -->
  77. <!-- 自动旋转 -->
  78. <autorotate enabled="true" waittime="3" speed="5" horizon="0.0" tofov="off" zoomslowdown="true" interruptionevents="userviewchange|layers|keyboard"/>
  79. <action name="startup" autorun="onstart"> if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); ); loadscene(get(startscene), null, MERGE); if(startactions !== null, startactions() ); </action>
  80. <action name="add_all_the_time_tooltip_for_VR"> txtadd(tooltipname, 'vrtooltip_', get(name)); addhotspot(get(tooltipname)); set(hotspot[get(tooltipname)], type=text, edge=get(hotspot[get(name)].edge), distorted=get(hotspot[get(name)].distorted), ath=get(hotspot[get(name)].ath), atv=get(hotspot[get(name)].atv), oy=-36, ox=0, vcenter=true, padding='3 8', mipmapping=true, oversampling=2, bg=true, bgcolor=rgba(18, 18, 18, 0.8), bgroundedge=2, bgalpha=0.8, bgborder=0, bgshadow='0 0 0 0x000000 0', 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;'), txtshadow='0 0 0 0x000000 0'; enabled=true, ); txtadd(hotspot[get(tooltipname)].onclick,'callwith(hotspot[',get(name),'],onclick)'); if(text == '' OR text === null, copy(hotspot[get(tooltipname)].html,scene[get(linkedscene)].title), copy(hotspot[get(tooltipname)].html,text); ); if(lp_running == false, set(hotspot[get(tooltipname)].visible,true); , if(!webvr.isenabled, if(lp_running == true, set(hotspot[get(tooltipname)].visible,false); set(hotspot[get(tooltipname)].mark2,true); ); ); ); if(hotspot[get(name)].normal == false, set(hotspot[get(tooltipname)].normal,false); set(hotspot[get(tooltipname)].onloaded, if(webvr.isenabled, set(visible,false); , if(lp_running == false OR lp_running == null OR lp_running === null, set(visible,true); ); ); ); ); </action>
  81. <action name="draghotspot">
  82. spheretoscreen(ath, atv, hotspotcenterx, hotspotcentery, calc(mouse.stagex LT stagewidth/2 ? 'l' : 'r')); sub(drag_adjustx, mouse.stagex, hotspotcenterx); sub(drag_adjusty, mouse.stagey, hotspotcentery); asyncloop(pressed, sub(dx, mouse.stagex, drag_adjustx); sub(dy, mouse.stagey, drag_adjusty); screentosphere(dx, dy, ath, atv);
  83. <!-- print_hotspot_pos(); -->
  84. <!-- js(getHotspotPoint(name,ath,atv);); -->
  85. );
  86. </action>
  87. <action name="makescreenshot_init" type="Javascript" autorun="onstart">
  88. <![CDATA[ // count the screenshots (for the filenames) krpano.makescreenshot_count = 1; // create an empty Object as makeScreenshot cache var makeScreenshotCache = {}; // add a 'makescreenshot' action to krpano krpano.makescreenshot = function(screenshotwidth,screenshotheight) { // if there is already a screenshot layer, remove it now krpano.call("removelayer(screenshot,true)"); // make a screenshot as canvas var sizeinfo = {w:0, h:0}; var screenshotcanvas = krpano.webGL.makeScreenshot(screenshotwidth, screenshotheight, true, "jpeg", 1.0, null, sizeinfo, makeScreenshotCache); // var shotUrl = screenshotcanvas.toDataURL(); window.shotUrl = screenshotcanvas; } ]]>
  89. </action>
  90. <action name="skin_view_normal"> skin_view_look_straight(); set(view.stereographic, true); set(view.fov, get(xml.view.fov)); set(view.fovmax, get(xml.view.fovmax)); tween(view.distortionfovlink, 0.5, distance(1.0,0.5)); tween(view.architectural, 0.0, distance(1.0,0.5)); tween(view.pannini, 0.0, distance(1.0,0.5)); tween(view.distortion, 0.0, distance(1.0,0.5)); </action>
  91. <action name="skin_view_fisheye"> skin_view_look_straight(); set(view.stereographic, true); set(view.fov, get(xml.view.fov)); set(view.fovmax, get(xml.view.fovmax)); tween(view.distortionfovlink, 0.5, distance(1.0,0.5)); tween(view.architectural, 0.0, distance(1.0,0.5)); tween(view.pannini, 0.0, distance(1.0,0.5)); tween(view.distortion, 0.35, distance(1.0,0.5)); </action>
  92. <action name="skin_view_architectural"> skin_view_look_straight(); set(view.stereographic, true); set(view.fov, get(xml.view.fov)); set(view.fovmax, get(xml.view.fovmax)); tween(view.distortionfovlink, 0.5, distance(1.0,0.5)); tween(view.architectural, 1.0, distance(1.0,0.5)); tween(view.pannini, 0.0, distance(1.0,0.5)); tween(view.distortion, 0.0, distance(1.0,0.5)); </action>
  93. <action name="skin_view_stereographic"> skin_view_look_straight(); set(view.stereographic, true); set(view.fov, get(xml.view.fov)); set(view.fovmax, get(xml.view.fovmax)); tween(view.distortionfovlink, 0.5, distance(1.0,0.5)); tween(view.architectural, 0.0, distance(1.0,0.5)); tween(view.pannini, 0.0, distance(1.0,0.5)); tween(view.distortion, 1.0, distance(1.0,0.8)); </action>
  94. <action name="skin_view_pannini"> skin_view_look_straight(); set(view.stereographic, true); set(view.fov, get(xml.view.fov)); set(view.fovmax, get(xml.view.fovmax)); tween(view.distortionfovlink, 0.5, distance(1.0,0.5)); tween(view.architectural, 0.0, distance(1.0,0.5)); tween(view.pannini, 1.0, distance(1.0,0.8)); if(view.distortion LT 0.1, tween(view.distortion, 1.0, distance(1.0,0.8)); ); </action>
  95. <action name="skin_view_littleplanet"> set(view.stereographic, true); set(view.fov, get(xml.view.fov)); set(view.fovmax, get(xml.view.fovmax)); tween(view.distortionfovlink, 0.5, distance(1.0,0.5)); tween(view.architectural, 0.0, distance(1.0,0.5)); tween(view.pannini, 0.0, distance(1.0,0.5)); tween(view.distortion, 1.0, distance(1.0,0.8)); tween(view.fov, 150, distance(150,0.8)); tween(view.vlookat, 90, distance(100,0.8)); add(new_hlookat, view.hlookat, 123.0); tween(view.hlookat, get(new_hlookat), distance(100,0.8)); </action>
  96. <action name="skin_view_ball">
  97. set(view.stereographic, false);
  98. set(view.fovmax, 180);
  99. tween(view.architectural, 0.0, distance(1.0,0.5));
  100. tween(view.fisheye, 1.5, distance(1.0,0.5));
  101. tween(view.pannini, 0.0, distance(1.0,0.5));
  102. tween(view.distortionfovlink, 1.0, distance(1.0,0.5));
  103. tween(view.distortion, 1.5, distance(1.0,0.8));
  104. tween(view.fov, 180, distance(150,0.8));
  105. tween(view.vlookat, 0, distance(100,0.8));
  106. </action>
  107. <!-- <events name="nadirlogorotation" keep="true" onviewchange="copy(hotspot[nadirlogo].rotate,view.hlookat);"/> -->
  108. <memory maxmem="100" devices="Desktop" />
  109. <memory maxmem="80" devices="Tablet" />
  110. <memory maxmem="40" devices="iOS" />
  111. <memory maxmem="40" devices="iOS7.1" />
  112. </krpano>