Blend timed with loading

  • I'm using the little planet intro and a zoom blend effect between panos.

    Is there a way of coordinating the times with loading, i.e. the intro starts when the preview is loaded and finished when the last tile is loaded.
    Or the view slowly zooms towards the hotspot on the door and the blend finishes when the last tile has loaded?

    Just there is something happening while the user is waiting for the pano to load.

    It would also need to be smoothed so it wasn't jittery like the loading bar.

    Any ideas?

  • Hi,

    Is there a way of coordinating the times with loading, i.e. the intro starts when the preview is loaded and finished when the last tile is loaded.


    in the 1.0.8 beta there these events could be used to start actions:

    Code
    <events onxmlcomplete=""
            onpreviewcomplete=""
            onloadcomplete=""
            />

    for use wait(LOAD) to wait until all current tiles are loaded,

    have a look at comments in the xml of this example:
    Example: https://krpano.com/krpano.html?pano=panos/carout/carout.xml
    XML: https://krpano.com/panos/carout/carout.xml

    there wait(LOAD) and wait(BLEND) is used when blending from one pano to the other,

    best regards,
    Klaus

  • Brilliant, cheers Klaus that is a lot more fluid, looks really cool.

    Question 1 - I was hoping I could time the looktohotspot with the loading so when you click the hotspot it finishes the lookto and zoom when the pano is ready to load i.e. so if the pano is taking a while to load the looktohotspot is slow and there is always something going on for the user!
    If not this is fine as it is and works well.

    I've used your example this way:

    Code
    trace(name);looktohotspot(get(name));wait(load);loadscene(%1,null,KEEPBASE|NOPREVIEW,ZOOMBLEND(3,3));copy(backup_hlookat,view.hlookat);copy(backup_vlookat,view.vlookat);copy(backup_fov,view.fov);looktohotspot(%2);set(lockmultireslevel,0);wait(load);set(lockmultireslevel,-1);wait(blend);wait(0.5);set(lockmultireslevel,0);zoomto(get(backup_fov),linear(10));wait(load);lookto(get(backup_hlookat),get(backup_vlookat),get(backup_fov));set(lockmultireslevel,-1);
    ....
    hs(ferry,ferry2pier)"


    If I load a new scene from a different xml document I do it this way -

    Code
    trace(name);looktohotspot(get(name));wait(load);loadpano(%2,KEEPBASE|NOPREVIEW,ZOOMBLEND(3,3));loadscene(%1);copy(backup_hlookat,view.hlookat);copy(backup_vlookat,view.vlookat);copy(backup_fov,view.fov);looktohotspot(%3);set(lockmultireslevel,0);wait(load);set(lockmultireslevel,-1);wait(blend);wait(0.5);set(lockmultireslevel,0);zoomto(get(backup_fov),linear(10));wait(load);lookto(get(backup_hlookat),get(backup_vlookat),get(backup_fov));set(lockmultireslevel,-1);.......
    hs_newxml(exterior,../pavillion_cafe/pavillion-cafe.xml,pavillion2street)


    Question 2 - However I get a black screen between images this way. Any idea how I can get the same smooth blend between scenes when loading a new scene from xml?


    Question 3 - Another thing, if I were to krprotect the xml docs, how would I link to a new specific scene in a new swf( other xml doc)

  • Hi,

    time the looktohotspot with the loading

    this is (currently) not possible,
    the pano will be start to load with loadpano(), 'after' the looktohotspot() call,

    timing the loading is difficult in several ways - the loading time is unknown, double memory need (for the current pano and the new one), "blocking/interrupts" while moving when the Flashplayer decodes a download files, ...

    Question 2 - However I get a black screen between images this way. Any idea how I can get the same smooth blend between scenes when loading a new scene from xml?

    note - the "lockmultireslevel" doesn't work in the current 1.0.8 beta (but it will work in beta 9),
    and after loading you call looktohotspot() - this moves the pano, after loadpano() - wait(LOAD) - or wait(BLEND) should be used,

    Question 3 - Another thing, if I were to krprotect the xml docs, how would I link to a new specific scene in a new swf( other xml doc)

    loading a contents from a other swf is not possible,
    only the embedded or external files can be loaded,

    best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!