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, February 28th 2009, 3:03pm

What sets 'zoom amount' into hotspot ?

I noted on some examples the nice "zoom into the hotspot" effect. So I've used it in a couple of linked scenes. But although I used the exact same code for each scene, it zooms on one, but not the other. Also, I can't figure out which part of the code controls the actual zooming.

I feel like a very "high maintenance" customer at the moment, but I'm trying to get a really robust standard XML template complete so I can start processing many tours.

Thanks again for any help. Below is (what I think) is the vital part of the code.

THIS ONE ZOOMS IN:

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
	<hotspot name="hotspot1"
	     	keep="false"
	     	visible="true" enabled="true" handcursor="true" capture="true" children="true"
 	     	zorder="0"
	     	fillcolor 	="0xff9900" fillalpha 	="0.10" borderwidth 	="2.0" bordercolor 	="0xff9900" borderalpha 	="0.70"
	     	fillcolorhover="0xff9900" fillalphahover="0.50" borderwidthhover="4.0" bordercolorhover="0xff9900" borderalphahover="0.80"
	     	fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
	     	onover=""
	     	onhover="showtext(Go to toolshed);"
	     	onout=""
	     	ondown=""
	     	onup=""
	     	onclick="looktohotspot(hotspot1,auto,smooth(150,25,100));
	              	loadpano(ent-tool shed-2800.xml);
	              	lookat(10.71,0.86,33.41);
	              	wait(BLEND);
	              	lookto(0,0,110,smooth(25,100,100));"
		>
		<point ath=" 28.5416" atv=" -6.0979" />
		<point ath=" 71.9145" atv=" -5.1611" />
		<point ath=" 72.2685" atv="-12.1074" />
		<point ath=" 28.4902" atv="-13.2773" />
	</hotspot>


THIS ONE DOESN'T ?!

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
<hotspot name="hotspot1"
	     	keep="false"
	     	visible="true" enabled="true" handcursor="true" capture="true" children="true"
 	     	zorder="0"
	     	fillcolor 	="0xff9900" fillalpha 	="0.10" borderwidth 	="2.0" bordercolor 	="0xff9900" borderalpha 	="0.70"
	     	fillcolorhover="0xff9900" fillalphahover="0.50" borderwidthhover="4.0" bordercolorhover="0xff9900" borderalphahover="0.80"
	     	fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
	     	onover=""
	     	onhover="showtext(Go to toolshed);"
	     	onout=""
	     	ondown=""
	     	onup=""
	     	onclick="looktohotspot(hotspot1,auto,smooth(350,25,100));

					loadpano(ent-farmshed-2800.xml);
					lookat(10.71,0.86,33.41);
	              		wait(BLEND);
	              		lookto(0,0,110,smooth(25,100,100));"

	   >
		<point ath="-142.2306" atv=" -2.4251" />
		<point ath="-38.6009" atv=" -2.8572" />
		<point ath="-38.8410" atv="-16.3518" />
		<point ath="-142.1502" atv="-11.1605" />
	</hotspot>

2

Saturday, February 28th 2009, 3:17pm

By chance I think I now see. There is no "zoom amount" ? I see that the smaller the hotspot the more the "zoom" amount. But is it possible to control this ?

3

Saturday, February 28th 2009, 4:07pm

Hi,

this code controls the zooming to the hotspot:

Source code

1
looktohotspot(hotspot1,auto,smooth(150,25,100));


the first parameter is the name of hotspot to look/move/zoom,
the second - the zoom fov, when it is set to auto, it's tries to fill the screen with the hotspot,
the third - the moving speed

so you could replace the "auto" value with a fov value to control the zooming deep
e.g.

Source code

1
looktohotspot(hotspot1,30,smooth(150,25,100));


have also a look here:
http://krpano.com/docu/actions/#looktohotspot

best regards,
Klaus

4

Saturday, February 28th 2009, 4:22pm

Thanks again Klaus. I did search documents. I will do better next time ! Even so, your explanation here is much better I think :-)