• Hi, I am having a few issues implementing the lens flare effect and I wonder if anyone would be kind enough to assist.

    I have placed the krpano_default_flares.jpg image in the main vtour folder and I have the following code in my xml. I only have one pano to keep it simple.

    <krpano version="1.16" title="Virtual Tour" onstart="startup();">

    <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"
    tooltips_thumbs="false"
    tooltips_hotspots="false"
    tooltips_mapspots="false"
    controlbar_offset="20"
    />


    <plugin name="editor" url="plugins/editor.swf" keep="true" />

    <!-- set optional skin logo url -->
    <layer name="skin_logo" url="" scale="0.25" opened_onclick="openurl('...',_blank);" />


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


    <scene name="scene_IMG_7759_Panorama" title="IMG_7759 Panorama" onstart="" thumburl="panos/IMG_7759_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_7759_Panorama.tiles/preview.jpg" />

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

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

    </scene>

    <lensflare name="lf1" set="DEFAULT" ath="99.439178" atv="-32.10183" />
    <lensflare name="default" set="DEFAULT" ath="-69.5034" atv="-4.752" size="0.40" blind="0.30" />

    </krpano>

    I got the xml snippets from the editor plugin but I cannot get it to work outside the editor. Can anyone see what I am doing wrong?

    Many thanks as usual.

  • Thanks Alexey, I have done as you said as it makes sense but still it does not work :(

    I have put the krpano_default_flares.jpg in all folders just in case!

    Here is the xml I have:

    <krpano version="1.16" onstart="bombtimer(0); startup();">

    <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"
    tooltips_thumbs="false"
    tooltips_hotspots="false"
    tooltips_mapspots="false"
    controlbar_offset="20"
    />

    <!-- set optional skin logo url -->
    <layer name="skin_logo" url="" scale="0.25" opened_onclick="openurl('...',_blank);" />


    <action name="startup">
    set(step,1); set(idletime,2); set(events.onidle, autotour(););
    </action>

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

    <action name="bombtimer">
    set(bt,%1);
    add(bt,1);
    delayedcall(1, bombtimer(get(bt)));
    if(bt == 42, set(bt,0); nextscene();, );
    </action>

    <action name="nextscene">
    set(ns, get(scene[get(xml.scene)].index) );
    set(maxs, get(scene.count) );
    add(ns,1);
    if(ns == maxs, set(ns,0);, );
    loadscene( get(scene[get(ns)].name ), null, MERGE, BLEND(1.5) );
    </action>

    <autorotate enabled="true" waittime=".5" accel="5.0" speed="8.2" horizon="0.0" tofov="off"/>


    <plugin name="editor" url="plugins/editor.swf" keep="true" />


    <scene name="scene_IMG_7759_Panorama_Panorama" title="IMG_7759 Panorama Panorama" onstart=""

    thumburl="panos/IMG_7759_Panorama_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_7759_Panorama_Panorama.tiles/preview.jpg" />

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


    <lensflare name="lf1" set="DEFAULT" ath="99.439178" atv="-32.10183" />
    <lensflare name="default" set="DEFAULT" ath="-69.5034" atv="-4.752" size="0.40" blind="0.30" />

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


    </scene>

    <scene name="scene_IMG_7768_Panorama" title="IMG_7768 Panorama" onstart="" thumburl="panos/IMG_7768_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_7768_Panorama.tiles/preview.jpg" />

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

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

    </scene>


    </krpano>


    I have to be doing something stupid for sure but I cannot see it :(
    Should there be a lensflare plugin in the plugin folder?

    Kind regards.
    Pete

  • Again, check your html file. I bet there is "html5="prefer" setting. That is why we see lensflare in Opera but don't see it in Chrome. Because Chrome goes to html5 automatically and Opera doesn't support it and goes to Flash. And lensflare is Flash-specific feature.

    Regards,

    Alexey

Participate now!

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