[Solved, custom event] Infinite onviewchanged

  • Hi Klaus!

    Changing hotspot.alpha via tweens in infinite animation causes infinite onviewchanged even if the view is not changing. This is due to WebGL rendering of hotspots. Please check why the engine reacts like this.

    I have some code that uses the onviewchanged event and I'm finding that onviewchanged is firing infinitely even though the view is not changing.

    Below I have provided a small test that points to the problem. Also I did not find any fundamental difference between onviewchanged and onviewchange in my tests, could you give some explanations. Yes, I read the documentation well.

    translation difficulties *huh*

  • Is there any way to track changes directly to the view (hlookat, vlookat, fov, etc.) without using hacks? I couldn't think of anything other than tracking changes to each of them (hlookat, vlookat, fov, etc.)

    translation difficulties *huh*

    • New
    • Official Post

    Hi,

    here an example to extend krpano with a 'onlookchange' event that tracks only hlookat, vlookat and fov changes (could be extended with other view attributes too):

    Best regards,
    Klaus

  • Hi,

    here an example to extend krpano with a 'onlookchange' event that tracks only hlookat, vlookat and fov changes (could be extended with other view attributes too):

    Best regards,
    Klaus

    Thank you Klaus!

    translation difficulties *huh*

  • Sergey74 March 20, 2025 at 6:00 AM

    Changed the title of the thread from “Infinite onviewchanged” to “[Solved, custom event] Infinite onviewchanged”.

Participate now!

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