Kompass klappt nicht

  • Servus,

    ich bin mal wieder zu dusslig: ich bekomme den Kompass nicht zum Laufen.
    Mir wird das mitgelieferte Compass Beispiel leider nicht von selbst heraus klar und verstaendlich.

    Ich weiss auch nicht welche Frage ich genau stellen soll *sad*
    Ich sehe die Kompassbilder im Flash, aber sie bewegen sich nicht (ich hab ja auch keine Stelle gefunden,
    an der ich NORD spezifizieren konnte *question* )

    Kann mir bitte jmd kurz schildern wie man das einbaut?


    Vielen Dank!,
    Torres
    (ja, ich hab hier im Forum gelesen, aber daraus wurde ich leider nicht schlau)

  • also so schaut es aus:

    <krpano version="1.0.8">

    (..)

    <action name="onstart">
    showtext("krpano[br]compass example", infostyle);

    <!-- SET HEADING -->
    set(heading, 0);

    action(add_compass_spots);
    </action>

    <!-- change the rotation of the compass pointer / compass plate image -->
    <action name="onviewchange">
    sub(plugin[compass_pointer].rotate, view.hlookat, heading);
    sub(plugin[compass2_plate].rotate, heading, view.hlookat);
    </action>

    <!-- second compass (left side) -->

    <!-- compass2 with rotating plate -->
    <plugin name="compass2" url="../plugins/compass/compass.png" keep="true" zorder="1" children="false"
    align="lefttop" x="10" y="10"
    scale="1.0" scalechildren="true"
    destscale="1.0"
    onclick="switch(destscale,1.0,0.5);tween(scale,get(destscale));"
    onhover="showtext(click to toggle size,hoverstyle);"
    />

    <!-- compass2 plate, the rotation will be changed in the "onviewchange" action -->
    <plugin name="compass2_plate" url="../plugins/compass/compass_plate.png" keep="true" handcursor="false"
    parent="compass2" zorder="1"
    align="center"
    />
    <!-- compass2 fixed pointer -->
    <plugin name="compass2_pointer" url="../plugins/compass/compass_pointer.png" keep="true" handcursor="false"
    parent="compass2" zorder="2"
    align="center"
    />

    <!-- compass2 fixed outer ring -->
    <plugin name="compass2_ring" url="../plugins/compass/compass_ring.png" keep="true" handcursor="false"
    parent="compass2" zorder="3"
    align="center"
    />

    <!-- compass2 glass cap (flash only, because there is no blendmode in html5) -->
    <plugin name="glass2" devices="flash" url="../plugins/compass/glass.jpg" keep="true" enabled="false"
    blendmode="screen" alpha="0.5"
    parent="compass2" zorder="4"
    align="center"
    />


    <!-- compass direction hotspots, created dynamically -->

    <action name="addhotspot">
    addhotspot(%1);
    set(hotspot[%1].url,%CURRENTXML%/hotspots.png);
    set(hotspot[%1].crop,%3);
    add(hotspot[%1].ath,%2,heading);
    set(hotspot[%1].atv,0);
    set(hotspot[%1].scale,%4);
    set(hotspot[%1].scale1,%4);
    mul(hotspot[%1].scale2,%4,2);
    set(hotspot[%1].zoom,true);
    set(hotspot[%1].onover,tween(scale,get(scale2)));
    set(hotspot[%1].onout,tween(scale,get(scale1)));
    set(hotspot[%1].onclick,lookto(%2,0,90));
    </action>

    <action name="add_compass_spots">
    action(addhotspot, n, 0, 0|0| 76|76, 1.0);
    action(addhotspot, no, 45, 78|0|118|76, 0.5);
    action(addhotspot, o, 90, 202|0| 71|76, 1.0);
    action(addhotspot, so, 135, 281|0|109|76, 0.5);
    action(addhotspot, s, 180, 400|0| 69|76, 1.0);
    action(addhotspot, sw, 225, 469|0|134|76, 0.5);
    action(addhotspot, w, 270, 603|0| 86|76, 1.0);
    action(addhotspot, nw, 315, 689|0|141|76, 0.5);
    </action>


    </krpano>

Participate now!

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