Hilfe bei interaktiven Touren

  • Hallo zusammen,

    ich nutze seit kurzem krpano, klappt alles wunderbar soweit. Doch jetzt wollte ich eine interaktive Tour erstellen. Ich habe zunächst mit kleinen Spielereien angefangen, dass zum Beispiel das Licht einer Lampe angehen soll oder sich die Lackfarbe des Autos ändert wenn man mit der Maus drüber geht, so wie bei der Weintour.

    Folgendes Problem, ich gehe streng nach der Anleitung vor.


    Irgendwie fehlt ein Teil meines Textes, egal, bei mir steht jedoch nur das unter hotspot wenn ich einfach die Zeilen aus der Anleitung nehme funktioniert es nicht.
    Ich arbeite mit ptgui, klappt bis Punkt 4 in der Anleitung auch, dann füge ich die action Berechnung in die xml ein erstelle den hotspot im toureditor und weiter komme ich nicht.

    <!-- place your scene hotspots here -->
    [url='https://krpano.com/forum/wbb/wcf/js/undefined']<hotspot name="spot1" linkedscene="scene_img_6941_panorama" atv="5.122" ath="179.852" style="skin_hotspotstyle"/></Scene>


    Ich habe einfach keine Idee was ich da ändern soll und stehe gerade etwas auf dem Schlauch.

    Edited 2 times, last by eiddoo (May 2, 2016 at 6:54 PM).

  • ich bin jetzt schon etwas weiter, was komisch ist. Wenn ich mir die Vorschau im Browser anschaue ist mein Hotspot Bild deutlich zu groß, wenn ich das ganze hingegen unter tour Editor anschaue passt es deutlich besser, da ist mein hotspot etwas zu klein, dass heißt ich gehe mit der Maus drüber und mein Hotspot wird sichtbar, verkleinert sich jedoch etwas. Die Position an sich passt perfekt, es löst genau da aus wo ich es haben wollte.

    Ich verstehe nur nicht wieso das auf der Livevorschau komplett anders ist als im tour Editor.


    Hier mal der Code, evtl. sieht ja jemand das Problem.

    <krpano version="1.19" title="Virtual Tour">

    <include url="skin/vtourskin.xml" />


    <!-- customize skin settings: maps, gyro, webvr, thumbnails, tooltips, layout, design, ... -->
    <skin_settings maps="false"
    maps_type="bing"
    maps_bing_api_key=""
    maps_zoombuttons="false"
    gyro="true"
    webvr="true"
    littleplanetintro="false"
    title="true"
    thumbs="true"
    thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
    thumbs_opened="false"
    thumbs_text="false"
    thumbs_dragging="true"
    thumbs_onhoverscrolling="false"
    thumbs_scrollbuttons="false"
    thumbs_scrollindicator="false"
    thumbs_loop="false"
    tooltips_buttons="false"
    tooltips_thumbs="false"
    tooltips_hotspots="false"
    tooltips_mapspots="false"
    deeplinking="false"
    loadscene_flags="MERGE"
    loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
    loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
    loadscene_blend_next="SLIDEBLEND(0.5, 0, 0.75, linear)"
    loadingtext="loading..."
    layout_width="100%"
    layout_maxwidth="814"
    controlbar_width="-24"
    controlbar_height="40"
    controlbar_offset="20"
    controlbar_offset_closed="-40"
    controlbar_overlap.no-fractionalscaling="10"
    controlbar_overlap.fractionalscaling="0"
    design_skin_images="vtourskin.png"
    design_bgcolor="0x2D3E50"
    design_bgalpha="0.8"
    design_bgborder="0"
    design_bgroundedge="1"
    design_bgshadow="0 4 10 0x000000 0.3"
    design_thumbborder_bgborder="3 0xFFFFFF 1.0"
    design_thumbborder_padding="2"
    design_thumbborder_bgroundedge="0"
    design_text_css="color:#FFFFFF; font-family:Arial;"
    design_text_shadow="1"
    />

    <!--
    For an alternative skin design either change the <skin_settings> values
    from above or optionally include one of the predefined designs from below.
    -->
    <!-- <include url="skin/vtourskin_design_flat_light.xml" /> -->
    <!-- <include url="skin/vtourskin_design_glass.xml" /> -->
    <!-- <include url="skin/vtourskin_design_ultra_light.xml" /> -->
    <!-- <include url="skin/vtourskin_design_117.xml" /> -->
    <!-- <include url="skin/vtourskin_design_117round.xml" /> -->
    <!-- <include url="skin/vtourskin_design_black.xml" /> -->


    <!-- startup action - load the first scene -->
    <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>

    <style name="distorted_aligned_spots" onloaded="calc_pos_from_hfov_yaw_pitch_roll(get(hfov),get(yaw),get(pitch),get(roll));" onout="tween(alpha,0,0.5);" onover="tween(alpha,1,0.5);" capture="true" alpha="0" distorted="true"/>
    <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_IMG_6941_Panorama" title="IMG_6941 Panorama" onstart="" thumburl="panos/IMG_6941_Panorama.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/IMG_6941_Panorama.tiles/preview.jpg" />

    <image>
    <cube url="panos/IMG_6941_Panorama.tiles/pano_%s.jpg" />

    <cube url="panos/IMG_6941_Panorama.tiles/mobile/pano_%s.jpg" devices="mobile" />
    </image>

    <!-- place your scene hotspots here -->


    <hotspot url="lichthotspot.png" name="lichthotspot" roll="-14.2471" pitch="-1.3362" yaw="85.762" hfov="23" style="distorted_aligned_spots"/>
    </scene>


    </krpano>

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!