Hi,
Can use "get" to replace "call" with "screentosphere" function in JS? Because "call" is not 'sync' and i need to use screentosphere in a loop function.
1, Use call function,it will be return the same results for
gx and
gy.
|
Quellcode
|
1
2
3
4
5
6
7
8
9
|
var a=100;
var b=200;
for (var i = 0; i < 2; i++) {
krpano.call("spheretoscreen("+a+","+b+",gx,gy);");
var gx = krpano.get("gx");
var gy = krpano.get("gy");
}
|
2,Use get function,it will be return null for "
c".
|
Quellcode
|
1
2
3
4
5
|
var a=100;
var b=200;
for(var i=0;i<2;i++){
var c=krpano.get("screentosphere("+a+","+b+")");
}
|
thx!