Hi,
that 'layertoscreen' is an action and mainly designed for usage from actions.
It would be callable from JS via krpano.actions.layertoscreen, but as it is an action it works with krpano variables.
So to call it, the variable would need to be set before and get after the call.
Here an example:
|
Source code
|
1
2
3
4
5
|
krpano.set("layerx", ...);
krpano.set("layery", ...);
krpano.actions.layertoscreen("layername", "layerx", "layery", "screenx", "screeny");
var screenx = krpano.get("screenx");
var screeny = krpano.get("screeny");
|
Btw - the 'screentosphere' is there at the krpano object, because a special version of that action for JS is defined at the object - please see here:
https://krpano.com/docu/plugininterface/#krpanointerface
Best regards,
Klaus