Sie sind nicht angemeldet.

1

Donnerstag, 23. Dezember 2021, 12:36

onloadcomplete not working with cubestrip image

Can someone please verify this odd behaviour that has been driving me nuts? I am using krpano version 1.20.11.

Short version: the event "onloadcomplete" is NOT called when using a cubestrip image. It indeed IS called, when using a sphere image.

Long version: When implementing a variation of "javascript: Synchronize Two Viewers" (https://krpano.com/examples/) I rely on the "onloadcomplete" event to init timerticks of all viewers to be synced. It all works fine, as long as I use the following, simplified setup:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<events
    onloadcomplete="loadcompl()"
    onxmlcomplete="xmlcompl()"
/>
<action name="xmlcompl">
    trace('on XML complete PANO2 fired');
</action>
<action name="loadcompl">
    trace('on LOAD complete PANO2 fired');
</action>
<image>
    <!-- <cubestrip url="cubestrip.jpg" striporder="FRBLUD" /> -->
    <sphere url="sphere.jpg" />
</image>


I get both trace messages: XML-complete and LOAD-complete.

Now, as soon as I switch to <cubestrip>, I only get XML-complete trace messages. *confused*

Find attached ZIP for demonstration, a slightly modified version of the example linked above.

Happy with any hints!
Cheers,
Hennes
»hennzen« hat folgende Datei angehängt:

2

Donnerstag, 23. Dezember 2021, 12:56

Hi,

sorry, there might be a bug related to the cubestrip images, I will check this.

But generally I would recommend not using cubestrips.
Especially not for large images. It's the most inefficient format.
The Cubestrip image internally need to get split into the separated cube-faces before they can be used and that requires memory and time.
And compared to separated cube-faces or sphere/cube multires tiles the loading is slower, because it's necessary to wait for the whole file before anything can be displayed.

Best regards,
Klaus

3

Donnerstag, 23. Dezember 2021, 20:02

Thanks for the super fast response.

I chose cubestrips over equirectangular images to minimize distortion around the nadir/zenith points.
Furthermore I like to just upload one image instead of 6 single images (custom backend built with strapi.io).

But you are right: cube faces outperform the other two, especially when dealing with larger images. AND since my split screen holds up to four panoramas next to each other (4 viewers), performance is key.

I now modified my backend to handle whatever type of image I have of those three mentioned. Would be still nice to have "onloadcomplete" working with cubestrips.

Cheers,
Hennes