Can javascript functions return values between plugins?

  • Hello! Is it possible to call a javascript function and get a return value between plugins?

    I am creating a math plugin that i plan on calling on throughout my other plugins for calculations, however if it cannot easily return variables this may be a problem.

    For example, would something like this be possible?

    Plugin A

    Code
    var x = krpano.call("plugin[pluginB].addone(number)");




    Plugin B

    Code
    function addOne(someNumber){return (someNumber+1);}



    I know i can use registerattributes and set/get variables, but i think that would become tedious when creating a large amount of functions to be called on.

    Thanks in advance!

Participate now!

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