Zitat
<!--
krpano - xml slider / blending cubes example
-->
<krpano version="1.16" onstart="start();">
<!-- text style for startup text -->
<textstyle name="infostyle"
origin="center" edge="center" yoffset="-100" textalign="center" background="false" border="false"
fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
showtime="4.0" fadeintime="1.0" fadetime="1.0"
/>
<view hlookat="110" vlookat="40" fovtype="MFOV" fov="130" fovmin="60" fovmax="160" />
<plugin name="slider_bg" url="slider_background.png" align="bottom" x="0" y="30" handcursor="false" zorder="1" />
<plugin name="slider_grip" url="slider_grip.png" align="left" edge="center" parent="slider_bg" x="0" zorder="2"
dragging="if(pressed,
sub(dx, mouse.stagex, drag_stagex);
add(newx, drag_currentx, dx);
if(newx LT 0, set(newx,0));
if(newx GT plugin[slider_bg].pixelwidth, copy(newx,plugin[slider_bg].pixelwidth));
copy(x,newx);
div(val, newx, plugin[slider_bg].pixelwidth);
setblend(get(val));
delayedcall(0,dragging());
);"
ondown="copy(drag_currentx,x); copy(drag_stagex,mouse.stagex); dragging();"
/>
<action name="addface">
addhotspot(%1);
set(hotspot[%1].url, %2);
set(hotspot[%1].ath, %3);
set(hotspot[%1].atv, %4);
set(hotspot[%1].width, 1000);
set(hotspot[%1].height, 1000);
if(device.html5, if(device.desktop,
<!-- desktop html5 browsers need overlapping cube faces -->
set(hotspot[%1].width, 1002);
set(hotspot[%1].height, 1002);
));
set(hotspot[%1].distorted, true);
set(hotspot[%1].enabled, false);
if(isflash, set(hotspot[%1].visible, false));
set(hotspot[%1].alpha, 0.0);
set(hotspot[%1].details, 16);
</action>
<action name="addcube">
addface(face_%1_F, '%CURRENTXML%/%1_f.jpg', 0, 0);
addface(face_%1_L, '%CURRENTXML%/%1_l.jpg', -90, 0);
addface(face_%1_R, '%CURRENTXML%/%1_r.jpg', +90, 0);
addface(face_%1_B, '%CURRENTXML%/%1_b.jpg', +180, 0);
addface(face_%1_Z, '%CURRENTXML%/%1_u.jpg', 0, -90);
addface(face_%1_N, '%CURRENTXML%/%1_d.jpg', 0, +90);
</action>
<action name="setalpha" devices="flash">
set(%1.alpha, %2);
if(%1.alpha == 0.0, set(%1.visible,false), set(%1.visible,true));
</action>
<action name="setalpha" devices="html5">
<!-- safari has some framerate stops/problems when toggling the visibility - so keep here the spots always visible -->
set(%1.alpha, %2);
</action>
<action name="setcubealpha">
setalpha(hotspot[face_%1_F], %2);
setalpha(hotspot[face_%1_L], %2);
setalpha(hotspot[face_%1_R], %2);
setalpha(hotspot[face_%1_B], %2);
setalpha(hotspot[face_%1_Z], %2);
setalpha(hotspot[face_%1_N], %2);
</action>
<action name="start">
showtext('krpano[br]xml slider / blending cubes example', infostyle);
addcube(pano1);
addcube(pano2);
setblend(0);
</action>
<action name="setblend" devices="flash">
sub(blend2, 1.0, %1);
setcubealpha(pano1, get(blend2));
setcubealpha(pano2, %1);
</action>
<action name="setblend" devices="html5">
set(blend1, %1);
sub(blend2, 1.0, %1);
copy(hotspot[face_pano1_F].alpha, blend1);
copy(hotspot[face_pano1_L].alpha, blend1);
copy(hotspot[face_pano1_R].alpha, blend1);
copy(hotspot[face_pano1_B].alpha, blend1);
copy(hotspot[face_pano1_Z].alpha, blend1);
copy(hotspot[face_pano1_N].alpha, blend1);
copy(hotspot[face_pano2_F].alpha, blend2);
copy(hotspot[face_pano2_L].alpha, blend2);
copy(hotspot[face_pano2_R].alpha, blend2);
copy(hotspot[face_pano2_B].alpha, blend2);
copy(hotspot[face_pano2_Z].alpha, blend2);
copy(hotspot[face_pano2_N].alpha, blend2);
</action>
</krpano>
"""
Zitat
<scene name="scene_1" title=„blablabla" thumburl="panos/1.tiles/thumb.jpg" lat="" lng="" heading="">
<view hlookat="225.483" vlookat="0.000" fov="110" maxpixelzoom="1.0" fovmax="150" limitview="auto" />
<preview url="1.tiles/preview.jpg" />
<image type="CUBE" multires="true" tilesize="512">
<level tiledimagewidth="3392" tiledimageheight="3392">
<cube url="1.tiles/mres_%s/l3/%v/l3_%s_%v_%h.jpg" />
</level>
<level tiledimagewidth="1696" tiledimageheight="1696">
<cube url="1.tiles/mres_%s/l2/%v/l2_%s_%v_%h.jpg" />
</level>
<level tiledimagewidth="848" tiledimageheight="848">
<cube url="1.tiles/mres_%s/l1/%v/l1_%s_%v_%h.jpg" />
</level>
<mobile>
<cube url="1.tiles/mobile_%s.jpg" />
</mobile>
</image>
<!-- place your scene hotspots here -->
<hotspot name="spot1" style="skin_hotspotstyle" ath="-146.992" atv="11.854" linkedscene="scene_7" />
<hotspot name="spot3" style="skin_hotspotstyle" ath="-168.599" atv="-14.265" linkedscene="scene_4" />
</scene>
Cool, danke. Das Hilft schon sehr weiter.
Sehe ich das richtig, dass das "keepview " dafür allein verantwortlich ist, dass das nächste Panorama im selben Winkel geöffnet wird.
Dann habe ich noch ne Code-Frage - ich hoffe, ich kann sie richtig formulieren:
Eine Idee wäre, eine Navimap mit allen Standpunkten zu machen.
Als Beispiel 2 Standpunkte á 2 Tageszeiten:
1a. Standpunkt 1 Tag
1b Standpunkt 1 Nacht
2a Standpunkt 2 Tag
2b Standpunkt 2 Nacht
- Wenn ich von Standpunkt 1a oder 1b in der Navimap auf Standpunkt 2b klicke, soll dieser sich in einem Vordedinierten (von der Sicht optimalen) Winkel öffnen.
- Wenn ich von 2a in der Navimap auf 2b klicke, soll "keepview" aktiv sein.
Ist das nur möglich, wenn ich die Navimap für jeden STandpunkt einzeln baue (und entsprechend viel Code produziere), oder gibt es auch eine Art Navimap-Code mit "Nur wenn vorher Panorama 2, dann keepview"
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »EOS1D« (19. September 2015, 11:55)
Danke noch einmal für die Hinweise.
Ich habe in meiner Tour jetzt folgendes Problem:
Wenn ich das keepview nutze, blendet krpano an diesen Stellen nicht mehr langsam über, sondern wechselt ruckartig das Bild.
Weiss jemand, woran das liegen kann? Hier mein Code
<layer name="spot2" url="skin/mappoint.png" onhover="showtext('Vor den Betten oben Tag',mapspottextstyle);" align="lefttop" edge="center" x="170" y="61" zorder="2" onclick="loadscene(scene_2, null, MERGE,KEEPVIEW, BLEND(1));" />
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »maxbenn« (29. September 2015, 11:31)
@EOS1D: Ich kann mir zwar dein pano angucken, finde aber keine xml datei, wo ich mir das mal angucken könnte... Wäre echt super, wenn du mich nochmal darauf verweisen könntest.
Ich sehe aber nicht mal die html Datei.... also hinter dem / steht nichts mehr...Du musst Dir den HTML-Quelltext anzeigen lassen
Benutze selber Chrome.
© 2006-2025