onLoaded, xml and full secuency of images of pano

  • Hi,

    at the moment there is no real event for "loading finished" because when using tiled or multiresolution panoramas it can happen that it loads new needed tiles later...

    or use the "wait(LOAD);" action to wait until all images or all tiles for the first view (on multiresolution panoramas) are loaded,

    or if you are in as3 / a plugin you can check the "progress.loaddone" variable with a Timer...

    I have planned to make two new events in the next versions:

    "events.onviewdone" - when all images/tiles are loaded for the current view (for multiresolution and normal panoramas)
    "events.onloaddone" - when really all images are loaded (only useable for normal panoramas)

    what do you think about them? or any further proposals?

    best regards,
    Klaus

  • Dear Sir,
    Around line 353 in flashcs3exampleplugin1.fla you offer with the package, you wrote:
    ..................................................
    if ( krpano.get("progress.loaddone") == "false" )
    {
    // show progressbar
    this.progressbar.visible = true;

    // NOTE - this works only for simple one image panoramas
    // when there are more images, the calculation of the download progress
    // is more complex

    var bytesloaded:Number = Number( krpano.get("progress.bytesloaded") );
    var bytestotal:Number = Number( krpano.get("progress.bytestotal") );
    ..................................

    Could you please explain how can I predict multiple images downloading. In other words, I have front, left, right, top,down, etc... and need to predict the loading of all these images.
    Could you help please?

    Thanks,
    Wesam

  • Hi,

    calculating the download progress is a little bit complicated at the moment,
    because of the multi-resolution loading it's difficult to show a correct progress.

    have a look at the "krpano.progress.*" values here:

    https://krpano.com/docu/api/

    here a quick explanation of these values:

    progress.loaddone
    - while loading "false", when done "true"

    progress.bytesloaded
    - sum of bytes from all files that are current downloading
    (see the value set in "network.downloadqueues" for how many files are
    max. loading at the same time, if you set it to 1 it would be a little
    bit easier to calculate a good progress value)

    progress.bytestotal
    - sum of all total bytes from all files that are current downloading

    progress.filesloaded
    - number of files are already downloaded (for the current level)

    progress.filestotal
    - total files (for the current level)

    progress.filesneeded
    - files that are needed to be downloaded for the current view

    progress.decodesneeded
    - each image must also be decoded
    - this is the number of files that needed to be decoded for the current view


    from these values the current progress can be calculated,

    this is my current implementation in the viewer: (not optimal)

    but note - this is not a really good algorithm at the moment
    it will be improved next,

    best regards,
    Klaus

Participate now!

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