You are not logged in.

panoyun

Beginner

  • "panoyun" started this thread

Posts: 31

Location: Somalia

  • Send private message

1

Friday, May 29th 2020, 10:33am

I do n’t know if this grammar is written like this For help

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
	<action name="action_krmvqnlpotey" type="Javascript" autorun="preinit"><![CDATA[
	krpano.set("events.onclick", function(){
		var x = krpano.get("mouse.x");
		var y = krpano.get("mouse.y");
		var pos = krpano.screentosphere(x,y);
		console.log(pos.x + " / " + pos.y);
		actions.trace('ath=' + (pos.x).toFixed(3) + " / " + 'atv=' + pos.y);

		var ath = pos.x;
		var atv = pos.y;
		var depth = "1000";
		var position = krpano.spheretospace(ath,atv,depth);
		krpano.trace(1,"tx=" + (position.x).toFixed(3) + " / " + "ty=" + position.y + " / "  + "tz=" + position.z);
	});
	]]></action>

krpano.spheretospace(h,v,depth)

Source code

1
2
3
4
5
6
7
8
9
  <action name="getlanguagebrowser" type="Javascript" autorun="preinit"><![CDATA[
	krpano.set("events.onclick", function(){
		var x = krpano.get("mouse.x");
		var y = krpano.get("mouse.y");
		var z = "1000";
		var position = krpano.spacetosphere(x,y,z);
		krpano.trace(1,"ath=" + (position.h).toFixed(3) + " / " + "atv=" + position.v + " / "  + "depth=" + position.depth);
	});
  ]]></action>


krpano.spacetosphere(x,y,z)

Are these two grammars written like this?