• Ich habe eine xml mit dem folgenden Quellcode Ausschnitt:


    <!-- the skin -->

    <include url="skin/defaultskin.xml" keep="true" />
    <include url="skin/compass.xml" keep="true" />

    <view hlookat="0" vlookat="0" maxpixelzoom="1.5" limitview="range" vlookatmin="-90" vlookatmax="60" fovmax="135" />


    <preview url="GA_006.tiles/preview.jpg" />

    <image type="CUBE" multires="true" tilesize="666">
    <level tiledimagewidth="5216" tiledimageheight="5216">
    <cube url="GA_006.tiles/l5_%s_0%v_0%h.jpg" />
    </level>
    <level tiledimagewidth="2664" tiledimageheight="2664">
    <cube url="GA_006.tiles/l4_%s_0%v_0%h.jpg" />
    </level>
    <level tiledimagewidth="1332" tiledimageheight="1332">
    <cube url="GA_006.tiles/l3_%s_0%v_0%h.jpg" />
    </level>
    <level tiledimagewidth="666" tiledimageheight="666">
    <cube url="GA_006.tiles/l2_%s_0%v_0%h.jpg" />
    </level>
    <level tiledimagewidth="334" tiledimageheight="334">
    <cube url="GA_006.tiles/l1_%s_0%v_0%h.jpg" />
    </level>
    </image>

    _________________________________________________________________________________________________________________________


    Ich möchte in dem Kugelbild den Kompass angezeigt bekommt und mit Defaultskin lade ich meine Standardbuttons und die Einstellung das die Dragfunktion als Erste Funktion zum Navigieren geladen wird.
    Leider funktionen beide include Befehle nicht zusammen nur wenn ich entweder das eine oder das andere einbinde?

    Hat einer vllt eine Idee?


    _________________________________________________________________________________________________________________________

    compass.xml:


    <krpano>

    <!-- vignetting style - preload mask, then load real pano -->
    <!--<plugin name="mask" url="vignetting.png" width="100%" height="100%" enabled="false" alpha="0" zorder="0" onloaded="tween(alpha,1);" />-->

    <!-- events, show a infotext on start, and call the "onviewchange" action on a view change -->
    <events onxmlcomplete="startup();"
    onviewchange="rotatecompasses();"
    />

    <!-- show info, set heading, create hotpots -->
    <action name="startup">
    <!-- SET HEADING -->
    set(heading, 0);
    set(view.hlookat, 0);
    </action>

    <!-- change the rotation of the compass pointer / compass plate image -->
    <action name="rotatecompasses">
    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="compass_plate.png" keep="true" zorder="1" children="false"
    align="righttop" x="10" y="10"
    scale="1.0" scalechildren="true"
    destscale="1.0"
    onclick="switch(destscale,1.0,0.5);tween(scale,get(destscale));"
    />

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

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


    <!-- use only a grid preview pano (to save download space) -->
    <preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />


    </krpano>


    _________________________________________________________________________________________________________________________


    defaultskin.xml:

    <krpano version="1.0.8">

    <!-- default quality settings -->
    <display flash10="on" movequality="LOW" stillquality="HIGH" movequality10="HIGH" stillquality10="HIGH" />


    <!-- events: set the custom cursor on start and fullscreen events for button changes -->
    <events onxmlcomplete="setuppano();"
    onenterfullscreen="set(plugin[openfs].visible,false);
    set(plugin[closefs].visible,true);
    if(isandroid, set(plugin[android_openfs].visible,false); set(plugin[android_closefs].visible,true); );
    "
    onexitfullscreen ="set(plugin[openfs].visible,true);
    set(plugin[closefs].visible,false);
    if(isandroid, set(plugin[android_openfs].visible,true); set(plugin[android_closefs].visible,false); );
    "
    />


    <!-- button showtext() style -->
    <textstyle name="buttonstyle" font="Arial" fontsize="12" bold="true" italic="true"
    textcolor="0x000000" background="false" border="false"
    blendmode="layer" effect="glow(0xFFFFFF,0.85,4,4);dropshadow(2,45,0x000000,4,1);"
    origin="cursor" edge="bottom" xoffset="15" yoffset="-5" showtime="0.1" fadeintime="0.1" fadetime="0.1"
    />

    <style name="button" url="%SWFPATH%/skin/buttons.png" keep="true" />


    <!-- some default buttons (zooming, direction, hotspots on/off, fullscreen) -->
    <plugin name="in" devices="desktop|tablet" align="bottom" x="-160" y="10" style="button" crop="160|0|40|40" onovercrop="160|40|40|40" ondowncrop="160|80|40|40" ondown="set(fov_moveforce,-1);" onup="set(fov_moveforce,0);" />
    <plugin name="out" devices="desktop|tablet" align="bottom" x="-120" y="10" style="button" crop="200|0|40|40" onovercrop="200|40|40|40" ondowncrop="200|80|40|40" ondown="set(fov_moveforce,+1);" onup="set(fov_moveforce,0);" />
    <plugin name="left" devices="desktop|tablet" align="bottom" x="-80" y="10" style="button" crop= "0|0|40|40" onovercrop= "0|40|40|40" ondowncrop= "0|80|40|40" ondown="set(hlookat_moveforce,-1);" onup="set(hlookat_moveforce,0);" />
    <plugin name="right" devices="desktop|tablet" align="bottom" x="-40" y="10" style="button" crop= "40|0|40|40" onovercrop= "40|40|40|40" ondowncrop= "40|80|40|40" ondown="set(hlookat_moveforce,+1);" onup="set(hlookat_moveforce,0);" />
    <plugin name="up" devices="desktop|tablet" align="bottom" x="+0" y="10" style="button" crop= "80|0|40|40" onovercrop= "80|40|40|40" ondowncrop= "80|80|40|40" ondown="set(vlookat_moveforce,-1);" onup="set(vlookat_moveforce,0);" />
    <plugin name="down" devices="desktop|tablet" align="bottom" x="+40" y="10" style="button" crop="120|0|40|40" onovercrop="120|40|40|40" ondowncrop="120|80|40|40" ondown="set(vlookat_moveforce,+1);" onup="set(vlookat_moveforce,0);" />
    <plugin name="quality" devices="desktop|tablet" align="bottom" x="+80" y="10" style="button" crop="240|0|40|40" onovercrop="240|40|40|40" ondowncrop="240|80|40|40" onhover="showtext(Toggle Quality, buttonstyle);" onclick="switch(display.flash10,on,off);invalidatescreen();" />
    <plugin name="dragmode" devices="desktop|tablet" align="bottom" x="+120" y="10" style="button" crop="400|0|40|40" onovercrop="400|40|40|40" ondowncrop="400|80|40|40" onhover="showtext(Change Controlmode, buttonstyle);" onclick="action(dragcursor);" visible="true" />
    <plugin name="movemode" devices="desktop|tablet" align="bottom" x="+120" y="10" style="button" crop="360|0|40|40" onovercrop="360|40|40|40" ondowncrop="360|80|40|40" onhover="showtext(Change Controlmode, buttonstyle);" onclick="action(qtvrcursor);" visible="false" />
    <plugin name="openfs" devices="desktop|tablet" align="bottom" x="+160" y="10" style="button" crop="280|0|40|40" onovercrop="280|40|40|40" ondowncrop="280|80|40|40" onhover="showtext(Fullscreen, buttonstyle);" onclick="set(fullscreen,true);" visible="true" />
    <plugin name="closefs" devices="desktop|tablet" align="bottom" x="+160" y="10" style="button" crop="320|0|40|40" onovercrop="320|40|40|40" ondowncrop="320|80|40|40" onhover="showtext(Exit Fullscreen,buttonstyle);" onclick="set(fullscreen,false);" visible="false" />

    <plugin name="android_in" devices="android" align="leftbottom" x="20" y="20" scale="2.0" style="button" crop="160|0|40|40" onovercrop="160|40|40|40" ondowncrop="160|80|40|40" ondown="set(fov_moveforce,-1);" onup="set(fov_moveforce,0);" />
    <plugin name="android_out" devices="android" align="leftbottom" x="100" y="20" scale="2.0" style="button" crop="200|0|40|40" onovercrop="200|40|40|40" ondowncrop="200|80|40|40" ondown="set(fov_moveforce,+1);" onup="set(fov_moveforce,0);" />
    <plugin name="android_openfs" devices="android" align="rightbottom" x="20" y="20" scale="2.0" style="button" crop="280|0|40|40" onovercrop="280|40|40|40" ondowncrop="280|80|40|40" onhover="showtext(Fullscreen, buttonstyle);" onclick="set(fullscreen,true);" visible="true" />
    <plugin name="android_closefs" devices="android" align="rightbottom" x="20" y="20" scale="2.0" style="button" crop="320|0|40|40" onovercrop="320|40|40|40" ondowncrop="320|80|40|40" onhover="showtext(Exit Fullscreen,buttonstyle);" onclick="set(fullscreen,false);" visible="false" />

    <!-- right-click context menu to change the viewing settings -->
    <contextmenu>
    <item caption="KRPANO" />
    <item caption="FULLSCREEN" />
    <item caption="normal view" onclick="action(view_normal);" separator="true" />
    <item caption="fisheye view" onclick="action(view_fisheye);" />
    <item caption="architectural view" onclick="action(view_architectural);" />
    <item caption="stereographic view" onclick="action(view_stereographic);" />
    <item caption="pannini view" onclick="action(view_pannini);" />
    <item caption="little planet view" onclick="action(view_littleplanet);" />
    </contextmenu>


    <!-- actions to change the mouse cursor -->
    <action name="dragcursor">
    set(plugin[dragmode].visible, false);
    set(plugin[movemode].visible, true);
    set(control.mousetype, drag2D);
    set(cursors.url, %SWFPATH%/skin/drag-cursors.png);
    set(cursors.type, drag);
    set(cursors.move, 2|0|30|32);
    set(cursors.drag, 37|0|30|32);
    </action>

    <action name="qtvrcursor">
    set(plugin[dragmode].visible, true);
    set(plugin[movemode].visible, false);
    set(control.mousetype, moveto);
    set(cursors.url, %SWFPATH%/skin/qtvr-cursors.png);
    set(cursors.type, 8way);
    set(cursors.move, 0|0|16|16);
    set(cursors.drag, 16|0|16|16);
    set(cursors.arrow_u, 32|0|16|16);
    set(cursors.arrow_d, 48|0|16|16);
    set(cursors.arrow_l, 64|0|16|16);
    set(cursors.arrow_r, 80|0|16|16);
    set(cursors.arrow_lu, 96|0|16|16);
    set(cursors.arrow_ru, 112|0|16|16);
    set(cursors.arrow_rd, 128|0|16|16);
    set(cursors.arrow_ld, 144|0|16|16);
    </action>


    <!-- actions for view changing -->
    <action name="view_normal">
    tween(view.fovmax, 150.0, distance(179, 1.00), easeoutquad);
    tween(view.architectural, 0.0, distance(1.0, 0.45), easeoutquad);
    tween(view.fisheye, 0.0, distance(1.0, 0.45), easeoutquad, set(view.stereographic,false); set(view.pannini,false); set(display.flash10,on); );
    </action>


    <action name="view_fisheye">
    set(display.flash10,off);
    tween(view.architectural, 0.0, distance(1.0, 0.30), easeoutquad);
    tween(view.fisheye, 0.0 ,distance(1.0, 0.30), easeoutquad, set(view.stereographic,false); set(view.pannini,false); set(view.fovmax,179); tween(view.fisheye, 0.35, distance(1.0,1.25)); );
    </action>


    <action name="view_architectural">
    tween(view.fovmax, 150.0, distance(179, 1.00), easeoutquad);
    tween(view.architectural, 1.0, distance(1.0, 0.45), easeoutquad);
    tween(view.fisheye, 0.0, distance(1.0, 0.45), easeoutquad, set(view.stereographic,false);set(view.pannini,false);set(display.flash10,on); );
    </action>


    <action name="view_stereographic">
    set(display.flash10,off);

    tween(view.architectural, 0.0, 0.25);

    set(backtonormalfirst,false);
    if(view.pannini == true, set(backtonormalfirst,true) );
    if(view.stereographic == false, set(backtonormalfirst,true) );

    if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );

    set(view.pannini, false);
    set(view.stereographic, true);
    set(view.fovmax, 150);

    tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
    </action>


    <action name="view_pannini">
    set(display.flash10,off);

    tween(view.architectural, 0.0, 0.25);

    set(backtonormalfirst,false);
    if(view.pannini == false, set(backtonormalfirst,true) );
    if(view.stereographic == false, set(backtonormalfirst,true) );

    if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );

    set(view.pannini, true);
    set(view.stereographic, true);
    set(view.fovmax, 150);

    tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
    </action>


    <action name="view_littleplanet">
    set(display.flash10,off);

    tween(view.architectural, 0.0, 0.25);

    tween(view.vlookat, 90, distance(179, 1.50), easeoutquad);

    set(backtonormalfirst,false);
    if(view.pannini == true, set(backtonormalfirst,true) );
    if(view.stereographic == false, set(backtonormalfirst,true) );

    if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );

    set(view.pannini, false);
    set(view.stereographic, true);
    set(view.fovmax, 150);

    tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
    tween(view.fov, 150, distance(179, 0.75), easeoutquad);
    </action>


    <!-- setup pano, will be called on the onxmlcomplete event -->
    <action name="setuppano">
    <!-- set drag cursor -->
    action(dragcursor);

    <!-- hide the other view settings in the context menu on partial panos -->
    if(ispartialpano === true, set(showviewitems,false), set(showviewitems,true));

    set(contextmenu.item[2].visible, get(showviewitems));
    set(contextmenu.item[3].visible, get(showviewitems));
    set(contextmenu.item[4].visible, get(showviewitems));
    set(contextmenu.item[5].visible, get(showviewitems));
    set(contextmenu.item[6].visible, get(showviewitems));
    set(contextmenu.item[7].visible, get(showviewitems));
    </action>




    </krpano>

Participate now!

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