I'm developping krpano javascript plugin.
But spheretoscreen function seems not to be working.
Syntax written in document is
screentosphere(x,y)
spheretoscreen(h,v)
Functions for converting between screen and spherical coordinates.
Return value: an Object with x and y properties. The values of these properties can be NaN (Not a Number) when the conversion wasn't possible.
And here is my code.
var ath = 0;
var atv = 0;
krpano.trace(1,"ath=" + ath + ",atv=" + atv);
var coord = krpano.spheretoscreen(ath,atv);
krpano.trace(1,"tox=" + coord.x + ",toy=" + coord.y);
First trace message appears in console window.But second trace message doesn't appear, strangely.
I've got no error messages. What is happening ?
If I use krpano.call() instead of krpano.spheretoscreen like below, it works fine.
krpano.call("set(h,0); set(v,0);set(x,0); set(y,0); spheretoscreen(h,v,x,y);trace('x=', get(x));");
krpano.trace(1,"x=" + krpano.get("x"));
Is krpano.spheretoscreen() obsolete or not supported in javascript plugin interface ?