Sie sind nicht angemeldet.

1

Samstag, 9. September 2023, 18:51

events.onnewscene not firing while a new scene is loading/blending

Hi!

I want a reliable new scene detection event.
I noticed onnewscene/onnewpano will not fire if the scene is still loading or blending.
Is there another event or method of detecting the loading of new scenes?

The first thing that comes to mind is adding callback to all objects that can change the pano, but I would rather not go that route.

Thanks!

3

Samstag, 9. September 2023, 23:17



That was the first place I looked. None of the relevant events work every time.
I first went with just onnewscene/onnewpano and noticed that if I click fast enough, the event won't fire which is a complete deal breaker for my application.
Clicking fast is easy to replicate, for example, choosing from the thumbnails, but also just clicking on the hotspots.
I did get better results adding onnewscene, onblendcomplete and onloadcomplete to fire at the same time. Though it still seems hackish.


If I click through fast enough the events still sometimes won't fire, but it's much better than just onenewscene.

4

Samstag, 9. September 2023, 23:40

maybe onxmlcomplete is what you want ?

5

Montag, 11. September 2023, 20:00

maybe onxmlcomplete is what you want ?

I tried them all including onxmlcomplete. Same issue as stated earlier.
For now I'll go with a bunch of redundant events and add a polling function to check for scene change.

6

Mittwoch, 13. September 2023, 11:21

Hi,

the onnewpano event needs to wait for having the image information, and when they are not pre-set in the xml (e.g. for non-multires panos), it needs to wait for image-loading.

So when switching the xml or scene before that loading is done, that event can't be fired of course, but onxmlcomplete or onnewscene events would fire of course. When they are missing then there would be either an usage-error or a bug (but currently there is no known one here).

Best regards,
Klaus

7

Mittwoch, 13. September 2023, 12:13


So when switching the xml or scene before that loading is done, that event can't be fired of course, but onxmlcomplete or onnewscene events would fire of course. When they are missing then there would be either an usage-error or a bug (but currently there is no known one here).


Thanks for taking the time to reply. I'm sure I'm using it correctly, but I'll try to set up an example and get back to you.