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.

1

Saturday, August 31st 2013, 9:57pm

Projection Contextual View Menu in KR VTOUR

Where I can find the XML code which I need to include the different projections in the VTOUR of KR Pano ( Fisheye View, Little Planet ...etc) any help would be appreciated.

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

2

Saturday, August 31st 2013, 10:09pm

Hi!

Try this context menu code:

Source code

1
2
3
4
5
6
7
8
9
10
<contextmenu>
		<item caption="KRPANO" />
		<item caption="FULLSCREEN" />
		<item caption="normal view"        onclick="view_normal();"        separator="true" />
		<item caption="fisheye view"       onclick="view_fisheye();"       />
		<item caption="architectural view" onclick="view_architectural();" />
		<item caption="stereographic view" onclick="view_stereographic();" />
		<item caption="pannini view"       onclick="view_pannini();"       />
		<item caption="little planet view" onclick="view_littleplanet();"  />
	</contextmenu> 


And the actions to change the view:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<action name="view_normal">
		tween(view.fovmax,       150.0, distance(179, 1.00), easeoutquad);
		tween(view.architectural,  0.0, distance(1.0, 0.45), easeoutquad);
		tween(view.fisheye,        0.0, distance(1.0, 0.45), easeoutquad, set(view.stereographic,false); set(view.pannini,false); set(display.flash10,on); );
	</action>

	<action name="view_fisheye">
		set(display.flash10,off);
		tween(view.architectural, 0.0, distance(1.0, 0.30), easeoutquad);
		tween(view.fisheye,       0.0 ,distance(1.0, 0.30), easeoutquad, set(view.stereographic,false); set(view.pannini,false); set(view.fovmax,179); tween(view.fisheye, 0.35, distance(1.0,1.25)); );
	</action>

	<action name="view_architectural">
		tween(view.fovmax,       150.0, distance(179, 1.00), easeoutquad);
		tween(view.architectural,  1.0, distance(1.0, 0.45), easeoutquad);
		tween(view.fisheye,        0.0, distance(1.0, 0.45), easeoutquad, set(view.stereographic,false);set(view.pannini,false);set(display.flash10,on); );
	</action>

	<action name="view_stereographic">
		set(display.flash10, off);
		tween(view.architectural, 0.0, 0.25);
		set(backtonormalfirst, false);
		if(view.pannini       == true,  set(backtonormalfirst,true) );
		if(view.stereographic == false, set(backtonormalfirst,true) );
		if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );
		set(view.pannini, false);
		set(view.stereographic, true);
		set(view.fovmax, 150);
		tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
	</action>

	<action name="view_pannini">
		set(display.flash10, off);
		tween(view.architectural, 0.0, 0.25);
		set(backtonormalfirst, false);
		if(view.pannini       == false, set(backtonormalfirst,true) );
		if(view.stereographic == false, set(backtonormalfirst,true) );
		if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );
		set(view.pannini, true);
		set(view.stereographic, true);
		set(view.fovmax, 150);
		tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
	</action>


	<action name="view_littleplanet">
		set(display.flash10,off);
		tween(view.architectural, 0.0, 0.25);
		tween(view.vlookat,  90, distance(179, 1.50), easeoutquad);
		set(backtonormalfirst, false);
		if(view.pannini       == true,  set(backtonormalfirst,true) );
		if(view.stereographic == false, set(backtonormalfirst,true) );
		if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );
		set(view.pannini, false);
		set(view.stereographic, true);
		set(view.fovmax, 150);
		tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
		tween(view.fov,     150, distance(179, 0.75), easeoutquad);
	</action>
Regards,

Alexey