You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

panoyun

Trainee

  • "panoyun" started this thread

Posts: 116

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?