Advertisement
Guest User

video into hotspot distorted

a guest
Aug 30th, 2013
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.69 KB | None | 0 0
  1. <krpano version="1.16" title="Virtual Tour" onstart="startup(); showlog(true); ">
  2.  
  3.     <include url="skin/vtourskin.xml" />
  4.  
  5.     <!-- set skin settings: bingmaps? gyro? thumbnail controlling? tooltips? -->
  6.     <skin_settings bingmaps="false"
  7.                    bingmaps_key=""
  8.                    bingmaps_zoombuttons="false"
  9.                    gyro="true"
  10.                    thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
  11.                    thumbs_opened="false"
  12.                    thumbs_text="false"
  13.                    thumbs_dragging="true"
  14.                    thumbs_onhoverscrolling="false"
  15.                    thumbs_scrollbuttons="false"
  16.                    thumbs_scrollindicator="false"
  17.                    tooltips_thumbs="false"
  18.                    tooltips_hotspots="false"
  19.                    tooltips_mapspots="false"
  20.                    controlbar_offset="20"
  21.                    />
  22.  
  23.     <!-- set optional skin logo url -->
  24.     <layer name="skin_logo" url="" scale="0.25" opened_onclick="openurl('...',_blank);" />
  25.  
  26.  
  27.     <action name="startup">
  28.         if(startscene === null, copy(startscene,scene[1].name));
  29.         loadscene(get(startscene), null, MERGE);
  30.     </action>
  31.  
  32.    
  33.     <scene name="scene_401_ingresso" title="401_ingresso" onstart="" thumburl="panos/401_ingresso.tiles/thumb.jpg" lat="" lng="" heading="">
  34.  
  35.         <view hlookat="-212.676" vlookat="-1.391" fovtype="MFOV" fov="120.000" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
  36.  
  37.         <preview url="panos/401_ingresso.tiles/preview.jpg" />
  38.  
  39.         <image type="CUBE" multires="true" tilesize="512" progressive="false">
  40.             <level tiledimagewidth="3300" tiledimageheight="3300">
  41.                 <cube url="panos/401_ingresso.tiles/l3_%s_%v_%h.jpg" />
  42.             </level>
  43.             <level tiledimagewidth="1650" tiledimageheight="1650">
  44.                 <cube url="panos/401_ingresso.tiles/l2_%s_%v_%h.jpg" />
  45.             </level>
  46.             <level tiledimagewidth="825" tiledimageheight="825">
  47.                 <cube url="panos/401_ingresso.tiles/l1_%s_%v_%h.jpg" />
  48.             </level>
  49.             <mobile>
  50.                 <cube url="panos/401_ingresso.tiles/mobile_%s.jpg" />
  51.             </mobile>
  52.         </image>
  53.  
  54.         <!-- place your scene hotspots here -->
  55.         <hotspot name="spot1" style="skin_hotspotstyle" ath="-1.902" atv="28.031" linkedscene="scene_hyperlapse_test" />
  56.        
  57.     </scene>
  58.  
  59.     <scene name="scene_hyperlapse_test" title="hyperlapse_test" onstart="" thumburl="panos/hyperlapse_test.tiles/thumb.jpg" lat="" lng="" heading="">
  60.  
  61.         <view hlookat="119.599" vlookat="1.855" camroll="0.0" fovtype="MFOV" fov="104.000" maxpixelzoom="3.0" fovmin="70" fovmax="140" limitview="auto" />
  62.  
  63.         <preview url="panos/hyperlapse_test.tiles/preview.jpg" />
  64.  
  65.         <image type="CUBE" multires="true" tilesize="512" progressive="false">
  66.             <level tiledimagewidth="900" tiledimageheight="900">
  67.                 <cube url="panos/hyperlapse_test.tiles/l2_%s_%v_%h.jpg" />
  68.             </level>
  69.             <level tiledimagewidth="512" tiledimageheight="512">
  70.                 <cube url="panos/hyperlapse_test.tiles/l1_%s_%v_%h.jpg" />
  71.             </level>
  72.             <mobile>
  73.                 <cube url="panos/hyperlapse_test.tiles/mobile_%s.jpg" />
  74.             </mobile>
  75.         </image>
  76.  
  77.         <!-- place your scene hotspots here -->
  78.         <hotspot name="spot2" style="skin_hotspotstyle" ath="117.114" atv="41.941" ondown="lookto(117.068, 11.541, 90); set(hotspot[video-hyperlapse_1].visible, true); hotspot[video-hyperlapse_1].play();" />
  79.            
  80.         <!-- hyperlapse video -->
  81.         <hotspot name="video-hyperlapse_1"
  82.         url="videoplayer.swf"
  83.         alturl="videoplayer.js"
  84.         videourl="video/hyperLapse_HotelSisto.m4v"
  85.         posterurl=""
  86.         onloaded="calc_pos_from_hfov_yaw_pitch_roll(104, -120.108, -2.9639, -0.3202);"
  87.         visible="false"
  88.         pausedonstart="false"
  89.         distorted="true"
  90.         loop="false"
  91.         volume="1.0"
  92.         zorder="10"
  93.         directionalsound="true"
  94.         range="90.0"
  95.         rangefalloff="1.0"
  96.         outofrangevolume="0.0"
  97.         />
  98.        
  99.         <!--Ricalcolo: da parametri dell'estrazione PTGUI (hfov, yaw, pitch, rol)
  100.             ai parametri del plutin/hotspot KRPANO (ath, atv, width, rotate) -->
  101.         <action name="calc_pos_from_hfov_yaw_pitch_roll">
  102.           div(hfov,%1,57.295779);
  103.           div(yaw,%2,-57.295779);
  104.           div(pitch,%3,57.295779);
  105.           div(roll,%4,-57.295779);
  106.           mul(hfov,0.5);Math.tan(hfov);mul(width,hfov,1000);set(height,'prop');
  107.           Math.cos(ch,yaw);Math.sin(sh,yaw);
  108.           Math.cos(ca,pitch);Math.sin(sa,pitch);
  109.           Math.cos(cb,roll);Math.sin(sb,roll);
  110.           mul(m0,ca,ch);
  111.           mul(tmp,cb,sa);mul(tmp,ch);mul(tmp2,sb,sh);add(m3,tmp,tmp2);
  112.           mul(m4,cb,ca);
  113.           mul(tmp,cb,sa);mul(tmp,sh);mul(tmp2,sb,ch);sub(m5n,tmp,tmp2);mul(m5n,-1);
  114.           mul(tmp,sb,sa);mul(tmp,ch);mul(tmp2,cb,sh);sub(m6n,tmp,tmp2);mul(m6n,-1);
  115.           Math.atan2(yaw,m6n,m0);
  116.           Math.atan2(roll,m5n,m4);
  117.           Math.asin(pitch,m3);
  118.           mul(ath,yaw,57.295779);
  119.           mul(atv,pitch,57.295779);
  120.           mul(rotate,roll,57.295779);
  121.         </action>
  122.    
  123.     </scene>
  124.  
  125.  
  126. </krpano>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement