js event/callback to handle when view moves/changes [resolved]

  • Right now I am using a setInterval with a tight interval to query krpano and find if the current view position has changed. I would rather have an event or callback that fires when this changes, however I have not been able to find such a callback in the documentation. Is there something I don't know about that will let me do this, and/or could this be added as a feature in a future update?

    e.g. I am currently doing something like:

    Code
    setTimeout(function() {
      if(!krpano) return;
      var hlookat = constrainDegrees(krpano.get('view.hlookat'));
      // update some custom UI stuff that is drawn on top of krpano with js...
    }, 10);

    which isn't very efficient

    Einmal editiert, zuletzt von sam0x17 (26. November 2018 um 17:29)

Jetzt mitmachen!

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