SOLVED: Cannot get lookto callback to work in JavaScript

  • EDIT: Solved! The solution is here: https://krpano.com/forum/wbb/inde…&threadID=10568

    Hi,

    I'm writing a javascript plugin and I can't get the lookto donecall callback to function.

    I wrote this:

    Code
    krpano.call("lookto(" + 30 + "," + 20 + ","+60+",,,,js(endautorotation());)");


    and this:

    Code
    krpano.call("lookto(" + 30 + "," + 20 + ","+60+",,,,endautorotation)");

    but end up with the following warning message:

    Quote

    Warning: js() - calling Javascript "endautorotation()" failed: ReferenceError: endautorotation is not defined

    The other callbacks work just fine. For instance the following code works just great:

    Code
    krpano.set("events.onloadcomplete", newScene);

    Edited 3 times, last by Abusername (May 18, 2018 at 12:17 PM).

Participate now!

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