embedding code in xml for little planet

  • Hi, I see where I need to add the following code for little planet. Do I add this anywhere in the main xml file or does it need to be in a specific location?

    <view hlookat="0.0"
    vlookat="90"
    camroll="0.0"
    fovtype="VFOV"
    fov="150"
    fovmin="1.0"
    fovmax="150"
    maxpixelzoom=""
    fisheye="1"
    fisheyefovlink="0.5"
    stereographic="true"
    pannini="false"
    architectural="0.0"
    architecturalonlymiddle="false"
    limitview="auto"
    hlookatmin=""
    hlookatmax=""
    vlookatmin=""
    vlookatmax=""
    />

  • This is the code Im using. It doesn't function properly for little planet. Im using multi res tour...do I need to use the beginning "pano image" code? if so which tiles do I point to? This code works but it doesn't start out in little planet viewpoint. Thanks


    <!--
    krpano - little planet intro example
    -->

    <krpano>

    <!-- pano image -->
    <preview url="../../panos/p3/preview.jpg" />
    <image>
    <cube url="../../panos/p3/pano_%s.jpg" />
    </image>


    <!-- startup view settings for 'little planet view' (stereographic=true + fisheye=1.0 + fov>120 + vlookat>70) -->
    <view stereographic="true"
    fisheye="1.0"
    fov="155"
    fovtype="VFOV"
    fovmax="150"
    hlookat="-60"
    vlookat="77"
    />


    <!-- fisheye and little planets projections are needing more cpu rendering performance,
    to reduce the cpu need and get better performance and frame rate, switch to Flash9
    rendering while in fisheye/littleplanet/stereographic mode -->
    <display flash10="off" details="24" />


    <!-- when the loading is done, wait 2 seconds and then start with the animation to an normal view -->
    <events onloadcomplete="delayedcall(2.0, normalview());" />


    <action name="normalview">
    tween(view.hlookat, -40, 2.5, easeInOutQuad);
    tween(view.vlookat, -35, 2.5, easeInOutQuad);
    tween(view.fov, 85, 2.5, easeInOutQuad);
    tween(view.fisheye, 0.0, 2.5, easeInOutQuad);
    wait(2.7);
    set(display.flash10, on);
    showtext('krpano[br]little planet intro example', infostyle)
    </action>


    <!-- showtext() textstyle -->
    <textstyle name="infostyle"
    origin="center" edge="center" yoffset="-39" 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="3.0" fadeintime="1.0" fadetime="1.0"
    />


    </krpano>

  • Need a little clarification!
    You have one panorama or a virtual tour and effect need only to start the virtual tour?
    Your example for the case where you have one panorama!

    Panoreal — to make and see this wonderful world! *whistling*

  • I'm not going edit and suggest in your example, but simply will make my file for a virtual tour of a few scenes where the intro little planet is inserted from the outside scenes. Because if you insert action intro to one of the panoramas, when the return to this panorama of the other, you will again see the effect of little planet! *tongue*
    Little planet with intro text (with new coding-style layer). And start only for supported platforms:

    If you have any questions on the above example, ask! *cool*

    Panoreal — to make and see this wonderful world! *whistling*

    Edited 2 times, last by Arsdezi (March 4, 2014 at 3:12 PM).

  • I just added code to my .xml and it still doesn't want to work. I believe I have followed the correct structure as you described - placing this code on top globally with my "scenes" below. I also left the skin code in there with its settings because I was assuming I would need it? Here is my code. I really appreciate you help.


    <krpano version="1.17" title="" debugmode="false" showerrors="true" onstart="startup();">
    <!-- Startup actions default in krpano, run for platform without support effect little planet-->
    <action name="startup" devices="html5+css3d|ios" >
    if(startscene === null, copy(startscene,scene[0].name));
    loadscene(get(startscene), null, MERGE);
    </action>

    <!--Startup actions effect of little planet, running only on for supported platforms-->
    <!-- when the loading is done, wait 2 seconds and then start with the animation to an normal view -->
    <action name="startup" devices="flash|html5+webgl" >
    if(startscene === null, copy(startscene,scene[0].name));set(display.flash10, off);
    loadscene(get(startscene));
    set(view.stereographic,true);
    set(view.fisheye, 1.0);
    set(view.fov, 155);
    set(view.fovtype, VFOV);
    set(view.fovmax, 150);
    set(view.hlookat, -165);
    set(view.vlookat, 77);
    set(hotspot[spot1].alpha, 0.0);
    set(autorotate.enabled,false);
    wait(blend);
    delayedcall(2, normalview() );
    </action>

    <!-- set to normal view-->
    <action name="normalview">
    tween(view.hlookat, 15.698, 2.5, easeInOutQuad);
    tween(view.vlookat, 0, 2.5, easeInOutQuad);
    tween(view.fov, 115, 2.5, easeInOutQuad);
    tween(view.fisheye, 0.0, 2.5, easeInOutQuad);
    tween(hotspot[spot1].alpha, 1.0, 2.5, easeInOutQuad);
    wait(2.7);
    set(display.details, 24);
    set(display.flash10, on);
    set(view.fovmax, 135 );
    </action>

    <!-- start autorotate and playing the sound and etc. at globally for tour-->
    <events name="currentpano" keep="true"
    onnewpano="set(autorotate.enabled, true);
    playsound(bgsnd, 'music.mp3|music.ogg', 0);
    set(events[currentpano].onnewpano, null);"
    />

    <!-- autorotate -->
    <autorotate enabled="false"
    waittime="3.0"
    accel="0.5"
    speed="6.0"
    horizon="0.0"
    tofov="100"
    />

    <!-- Intro text, layer-based, see other parameters for setting of layer in documentation by krpano-->
    <layer name="intro_text" keep="true" url="%SWFPATH%/plugins/textfield.swf" align="center" x="0" y="-75"
    visible="true" autoheight="true" background="false" border="false" enabled="false"
    html="Welcome![br]in Paradise!"
    css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:normal; font-size:32px; font-style:regular;"
    textshadow="2"
    onloaded="if(visible == true, delayedcall(3.0, tween(alpha, 0.0, 2.5, easeInOutQuad, set(visible,false);));); " />

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

    <!-- set skin settings: bingmaps? gyro? thumbnail controlling? tooltips? -->
    <skin_settings bingmaps="false"
    bingmaps_key=""
    bingmaps_zoombuttons="false"
    gyro="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_thumbs="false"
    tooltips_hotspots="false"
    tooltips_mapspots="false"
    controlbar_offset="20"
    />

    <!-- set optional skin logo url -->
    <layer name="skin_logo" url="Kitchen_out.jpg" scale="0.50" opened_onclick="openurl('http://www.yahoo.com',_blank);" />


    <action name="startup">
    if(startscene === null, copy(startscene,scene[0].name));
    loadscene(get(startscene), null, MERGE);
    </action>


    <!-- showtext() textstyle -->
    <textstyle name="infostyle"
    origin="center" edge="center" yoffset="-39" 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="3.0" fadeintime="1.0" fadetime="1.0"
    />


    <!-- showtext() textstyle -->
    <textstyle name="infostyle"
    origin="center" edge="center" yoffset="-39" 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="3.0" fadeintime="1.0" fadetime="1.0"
    />



    <scene name="scene__DSC1933_Panorama" title="_DSC1933 Panorama" onstart="" thumburl="panos/_DSC1933_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/_DSC1933_Panorama.tiles/preview.jpg" />

    <image type="CUBE" multires="true" tilesize="512" progressive="false">
    <level tiledimagewidth="5795" tiledimageheight="5795">
    <cube url="panos/_DSC1933_Panorama.tiles/%s/l4/%v/l4_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="2898" tiledimageheight="2898">
    <cube url="panos/_DSC1933_Panorama.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="1449" tiledimageheight="1449">
    <cube url="panos/_DSC1933_Panorama.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="725" tiledimageheight="725">
    <cube url="panos/_DSC1933_Panorama.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
    </level>
    <mobile>
    <cube url="panos/_DSC1933_Panorama.tiles/mobile_%s.jpg" />
    </mobile>
    </image>

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

    </scene>

    <scene name="scene__DSC2041_Panorama" title="_DSC2041 Panorama" onstart="" thumburl="panos/_DSC2041_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/_DSC2041_Panorama.tiles/preview.jpg" />

    <image type="CUBE" multires="true" tilesize="512" progressive="false">
    <level tiledimagewidth="5772" tiledimageheight="5772">
    <cube url="panos/_DSC2041_Panorama.tiles/%s/l4/%v/l4_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="2886" tiledimageheight="2886">
    <cube url="panos/_DSC2041_Panorama.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="1443" tiledimageheight="1443">
    <cube url="panos/_DSC2041_Panorama.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="722" tiledimageheight="722">
    <cube url="panos/_DSC2041_Panorama.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
    </level>
    <mobile>
    <cube url="panos/_DSC2041_Panorama.tiles/mobile_%s.jpg" />
    </mobile>
    </image>

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

    </scene>


    </krpano>

  • I just added code to my .xml and it still doesn't want to work. I believe I have followed the correct structure as you described - placing this code on top globally with my "scenes" below. I also left the skin code in there with its settings because I was assuming I would need it? Here is my code. I really appreciate you help.


    <krpano version="1.17" title="" debugmode="false" showerrors="true" onstart="startup();">
    <!-- Startup actions default in krpano, run for platform without support effect little planet-->
    <action name="startup" devices="html5+css3d|ios" >
    if(startscene === null, copy(startscene,scene[0].name));
    loadscene(get(startscene), null, MERGE);
    </action>

    <!--Startup actions effect of little planet, running only on for supported platforms-->
    <!-- when the loading is done, wait 2 seconds and then start with the animation to an normal view -->
    <action name="startup" devices="flash|html5+webgl" >
    if(startscene === null, copy(startscene,scene[0].name));set(display.flash10, off);
    loadscene(get(startscene));
    set(view.stereographic,true);
    set(view.fisheye, 1.0);
    set(view.fov, 155);
    set(view.fovtype, VFOV);
    set(view.fovmax, 150);
    set(view.hlookat, -165);
    set(view.vlookat, 77);
    set(hotspot[spot1].alpha, 0.0);
    set(autorotate.enabled,false);
    wait(blend);
    delayedcall(2, normalview() );
    </action>

    <!-- set to normal view-->
    <action name="normalview">
    tween(view.hlookat, 15.698, 2.5, easeInOutQuad);
    tween(view.vlookat, 0, 2.5, easeInOutQuad);
    tween(view.fov, 115, 2.5, easeInOutQuad);
    tween(view.fisheye, 0.0, 2.5, easeInOutQuad);
    tween(hotspot[spot1].alpha, 1.0, 2.5, easeInOutQuad);
    wait(2.7);
    set(display.details, 24);
    set(display.flash10, on);
    set(view.fovmax, 135 );
    </action>

    <!-- start autorotate and playing the sound and etc. at globally for tour-->
    <events name="currentpano" keep="true"
    onnewpano="set(autorotate.enabled, true);
    playsound(bgsnd, 'music.mp3|music.ogg', 0);
    set(events[currentpano].onnewpano, null);"
    />

    <!-- autorotate -->
    <autorotate enabled="false"
    waittime="3.0"
    accel="0.5"
    speed="6.0"
    horizon="0.0"
    tofov="100"
    />

    <!-- Intro text, layer-based, see other parameters for setting of layer in documentation by krpano-->
    <layer name="intro_text" keep="true" url="%SWFPATH%/plugins/textfield.swf" align="center" x="0" y="-75"
    visible="true" autoheight="true" background="false" border="false" enabled="false"
    html="Welcome![br]in Paradise!"
    css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:normal; font-size:32px; font-style:regular;"
    textshadow="2"
    onloaded="if(visible == true, delayedcall(3.0, tween(alpha, 0.0, 2.5, easeInOutQuad, set(visible,false);));); " />

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

    <!-- set skin settings: bingmaps? gyro? thumbnail controlling? tooltips? -->
    <skin_settings bingmaps="false"
    bingmaps_key=""
    bingmaps_zoombuttons="false"
    gyro="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_thumbs="false"
    tooltips_hotspots="false"
    tooltips_mapspots="false"
    controlbar_offset="20"
    />

    <!-- set optional skin logo url -->
    <layer name="skin_logo" url="Kitchen_out.jpg" scale="0.50" opened_onclick="openurl('http://www.yahoo.com',_blank);" />


    <action name="startup">
    if(startscene === null, copy(startscene,scene[0].name));
    loadscene(get(startscene), null, MERGE);
    </action>


    <!-- showtext() textstyle -->
    <textstyle name="infostyle"
    origin="center" edge="center" yoffset="-39" 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="3.0" fadeintime="1.0" fadetime="1.0"
    />


    <!-- showtext() textstyle -->
    <textstyle name="infostyle"
    origin="center" edge="center" yoffset="-39" 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="3.0" fadeintime="1.0" fadetime="1.0"
    />



    <scene name="scene__DSC1933_Panorama" title="_DSC1933 Panorama" onstart="" thumburl="panos/_DSC1933_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/_DSC1933_Panorama.tiles/preview.jpg" />

    <image type="CUBE" multires="true" tilesize="512" progressive="false">
    <level tiledimagewidth="5795" tiledimageheight="5795">
    <cube url="panos/_DSC1933_Panorama.tiles/%s/l4/%v/l4_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="2898" tiledimageheight="2898">
    <cube url="panos/_DSC1933_Panorama.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="1449" tiledimageheight="1449">
    <cube url="panos/_DSC1933_Panorama.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="725" tiledimageheight="725">
    <cube url="panos/_DSC1933_Panorama.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
    </level>
    <mobile>
    <cube url="panos/_DSC1933_Panorama.tiles/mobile_%s.jpg" />
    </mobile>
    </image>

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

    </scene>

    <scene name="scene__DSC2041_Panorama" title="_DSC2041 Panorama" onstart="" thumburl="panos/_DSC2041_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/_DSC2041_Panorama.tiles/preview.jpg" />

    <image type="CUBE" multires="true" tilesize="512" progressive="false">
    <level tiledimagewidth="5772" tiledimageheight="5772">
    <cube url="panos/_DSC2041_Panorama.tiles/%s/l4/%v/l4_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="2886" tiledimageheight="2886">
    <cube url="panos/_DSC2041_Panorama.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="1443" tiledimageheight="1443">
    <cube url="panos/_DSC2041_Panorama.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="722" tiledimageheight="722">
    <cube url="panos/_DSC2041_Panorama.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
    </level>
    <mobile>
    <cube url="panos/_DSC2041_Panorama.tiles/mobile_%s.jpg" />
    </mobile>
    </image>

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

    </scene>


    </krpano>

  • Hi! At a quick glance through your code - you have two actions named "startup" - one you pasted from Arsdezi's example (in two variants) and another one is left within your code. Make sure that there are no identically named actions in your code or that actions don't double.

    Regards,

    Alexey

  • I said that there is "startup" action from Arsdezi in two variants (for ios and for other devices):

    and then, below in YOUR code there's another startup action (the default from the droplet):

    Code
    <!-- set optional skin logo url -->
     <layer name="skin_logo" url="Kitchen_out.jpg" scale="0.50" opened_onclick="openurl('http://www.yahoo.com',_blank);" />
    
    
    
    
     <action name="startup">
     if(startscene === null, copy(startscene,scene[0].name));
     loadscene(get(startscene), null, MERGE);
     </action>

    delete the second action and see if Arsdezi's code work. Duplicating actions can cause malfunction.

    Regards,

    Alexey

  • panoqbr, please read the comments that I wrote specifically for you in the code! *attention*
    To make it easy to read and edit the code, use Notepad + + or other similar text editors with syntax highlighting!
    And of course, check that there are no repeated actions with the same name: the last will just interrupt the previous (as in your case) or just a will get an error!
    PS: Alex, thank you!

    PSs: delete part of code with music start, I put as an example:
    <!-- start autorotate and playing the sound and etc. at globally for tour-->
    <events name="currentpano" keep="true"
    onnewpano="set(autorotate.enabled, true);
    playsound(bgsnd, 'music.mp3|music.ogg', 0);
    set(events[currentpano].onnewpano, null);"
    />

    Panoreal — to make and see this wonderful world! *whistling*

  • WOW!!! Thank you both very much! It finally worked. I really like how it spins at the beginning *smile*

    With your help I feel comfortable enough to use krpano. Im confident I will be able to learn and make my tours with it. So I plan to purchase a license to software.

  • Excellent!
    Of course, it is necessary to grasp the essence of work and documentation krpano. And if there is strong support in the forum and a lot of examples of the use!
    But in the future, if you do not need to do any complex actions enough to work by copy-and-paste method or/and with include your already existing files as templates.
    I'm on the same level of work with KRPANO (вeginner) *rolleyes*
    Good luck! *cool*

    Panoreal — to make and see this wonderful world! *whistling*

  • Excellent!
    Of course, it is necessary to grasp the essence of work and documentation krpano. And if there is strong support in the forum and a lot of examples of the use!
    But in the future, if you do not need to do any complex actions enough to work by copy-and-paste method or/and with include your already existing files as templates.
    I'm on the same level of work with KRPANO (вeginner) *rolleyes*
    Good luck! *cool*

    Excellent!
    Of course, it is necessary to grasp the essence of work and documentation krpano. And if there is strong support in the forum and a lot of examples of the use!
    But in the future, if you do not need to do any complex actions enough to work by copy-and-paste method or/and with include your already existing files as templates.
    I'm on the same level of work with KRPANO (вeginner) *rolleyes*
    Good luck! *cool*

    Thank you!

Participate now!

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