Klaus, ich hänge bei dem gleichen Problem fest... Mit Flash werden die Hotspots korrekt in das Panorama eingebettet, aber mit HTML5 werden die Bilder verzerrt dargestellt. In deinen zahlreichen Beispielen werden jedoch immer die extrahierten Hotspots (die HTML5 verwenden) auf nur einer Würfelseite angewandt und nach der Methode
http://krpano.com/forum/wbb/index.php?page=Thread&threadID=1223
Interactive area in the pano
berechnet. Ich habe in meinem Beispiel aber eine größere Fläche, die über die Würfelseiten hinausgehen und muss nach der Methode mit dem extrahierten Bild via PTGui und deinem Scrip für die Positionierung vorgehen!? Die Hotspotbilder sind für HTML5 Desktop genau 2000px und für Mobile 1200px maximal an der langen Seite.
Hier ist mal mein Test mit
Flash
und mit
HTML5
Auszug aus der tour.xml:
"<!-- action for placement of distorted hotspots -->
<action name="calc_pos_from_hfov_yaw_pitch_roll">
div(hfov,%1,57.295779);
div(yaw,%2,-57.295779);
div(pitch,%3,57.295779);
div(roll,%4,-57.295779);
mul(hfov,0.5);Math.tan(hfov);mul(width,hfov,1000);set(height,'prop');
Math.cos(ch,yaw);Math.sin(sh,yaw);
Math.cos(ca,pitch);Math.sin(sa,pitch);
Math.cos(cb,roll);Math.sin(sb,roll);
mul(m0,ca,ch);
mul(tmp,cb,sa);mul(tmp,ch);mul(tmp2,sb,sh);add(m3,tmp,tmp2);
mul(m4,cb,ca);
mul(tmp,cb,sa);mul(tmp,sh);mul(tmp2,sb,ch);sub(m5n,tmp,tmp2);mul(m5n,-1);
mul(tmp,sb,sa);mul(tmp,ch);mul(tmp2,cb,sh);sub(m6n,tmp,tmp2);mul(m6n,-1);
Math.atan2(yaw,m6n,m0);
Math.atan2(roll,m5n,m4);
Math.asin(pitch,m3);
mul(ath,yaw,57.295779);
mul(atv,pitch,57.295779);
mul(rotate,roll,57.295779);
</action>
<scene name="scene_badzu" title="badzu" onstart="" havevrimage="true" thumburl="panos/badzu.tiles/thumb.jpg" lat="" lng="" heading="">
<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
<preview url="panos/badzu.tiles/preview.jpg" />
...
<!-- place your scene hotspots here -->
<hotspot name="tuer_auf"
url="bad_offen.jpg"
distorted="true"
enabled="false"
handcursor="true"
alpha="0.0"
zorder="1"
onloaded="calc_pos_from_hfov_yaw_pitch_roll(144, 10, 21, 8.5);"
/>
<hotspot name="door_open_area" capture="false" zorder="2" alpha="0" onover="tween(hotspot[tuer_auf].alpha,1.0);" onout="tween(hotspot[tuer_auf].alpha,0.0);" ondown.touch="onover();" onup.touch="onout();" onclick="action(changepano,bad);" onhover="showtext('wechseln zu Bad mit offener Tuer',hotspottextstyle);">
<point ath="-16.88439" atv="-13.79747" />
<point ath="18.132263" atv="-13.304367" />
<point ath="18.094122" atv="55.74298" />
<point ath="-16.65124" atv="56.859509" />
</hotspot>
<!-- lower resolution images for HTML5 and mobile devices -->
<hotspot name="door" url="bad_offen_html5desktop.jpg" devices="html5+desktop" />
<hotspot name="door" url="bad_offen_html5mobile.jpg" devices="mobile|tablet" />
</scene>"