Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Freitag, 5. Mai 2023, 08:25

Hotspot list/menu with move camera to capability?

Hi, I couldn't find any way to do this with the built in tools so just asking if anyone knows a way to have the following:

- a list of hotspots existing in the panorama in a menu
- when clicking one of the hotspot's in the menu the camera moves to focus on that hotspot

This is to help trainees identify locations they know the name of inside a vehicle but not its location when refreshing their knowledge.

Thanks in advance

2

Freitag, 5. Mai 2023, 12:08

Hi, look at this option

kme

Fortgeschrittener

Beiträge: 310

Wohnort: Belgium

Beruf: Long time coder, product manager and 3D enthousiast

  • Nachricht senden

3

Freitag, 5. Mai 2023, 12:19

If you want a plug and play solution, San7 plugin is certainly an option!

If you are into coding/styling a bit yourself, you can use this piece of code as a start. Put it in your tour.xml:


Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<layer type="container" name="hotspotlist" flowchildren="v">
</layer>

<action name="makehotspotlist" autorun='onstart' scope="local">
		for(set(i,0), i LT hotspot.count, inc(i),
			set(s,get(hotspot[get(i)]));			
			addlayer(calc(get(s.name)+i));
			set(item,get(layer[calc(get(s.name)+i)]));			
			
			set(item.parent, "hotspotlist");
			set(item.type, "text");
			set(item.text, get(s.name));
			
			set(item.onclick, calc("looktohotspot('" +  get(s.name) + "', 110)"));
		);
</action>

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

4

Freitag, 5. Mai 2023, 18:25

Hi,

here 2 simple versions.

https://www.virtualtuur.com/krpano/121/b…/hotspotlist/1/

Quellcode

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="spot1" style="htsp" tit="Tomato" ath="0" atv="0" />
		<hotspot name="spot2" style="htsp" tit="Pepper" ath="30" atv="10" />
		<hotspot name="spot3" style="htsp" tit="Carrot" ath="-100" atv="-8" />
		<hotspot name="spot4" style="htsp" tit="Onion" ath="178"  atv="5" />
	</scene>

	<style name="htsp" type="text" width="20" height="20" bgroundedge="10" />
	<style name="list" type="text" bgcolor="0x353535" x="10" bgroundedge="4" padding="4 10" parent="layer[hotspotlist]" css="font-family:Helvetica;color:#ffffff;font-size:12px;" />

	<layer name="hotspotlist" keep="true" align="lefttop" x="10" y="10" type="container"  bgcolor="0x000000" bgalpha="0.6" bgroundedge="6" flowchildren="v" flowexpand="true" childmargin="10" childflowspacing="10" />

	
	<action name="FillList" autorun="onstart">
		forall(hotspot,h,
			addlayer(*h.name,li);
			li.loadstyle(list);
			li.y = (30*h.index) + 10;
			li.html = h.tit;
			li.onclick = 'looktohotspot(*name,110);';
		);
	</action>


..and here a dirty one that shows/hides the visible hotspots from the list.

https://www.virtualtuur.com/krpano/121/b…/hotspotlist/2/
xml:
https://www.virtualtuur.com/krpano/121/b…list/2/tour.xml

Hope it helps,
Tuur *thumbsup*

5

Freitag, 5. Mai 2023, 18:33

I think we need to add a condition
if(h.style == 'htsp',