Sie sind nicht angemeldet.

1

Samstag, 28. April 2018, 14:37

10,000 hotspots

Hello.
I have a project with 10k photos combined in a gigapixel pano. "Onover" of each photo I need a tooltip with name. So I wrote a hotspot generator. But 10k image hotspots (even if I use 1pixel jpg to represent them) slow down even my Core-I7 3930K CPU.
Are there any other way to achive my goals? Maybe polygonal hotspots are better in my case? Or can I deactivate hotspots that are not on the screen, somehow?

2

Samstag, 28. April 2018, 18:09

10k hotspots???

i would generate one pano having all those images burnt in
and create an action which will show a tooltip depending on the coordinates

3

Samstag, 28. April 2018, 19:42

All of the photos are burnt in.
I need hotspots just to show tooltips on mouse over.
If it can be done without hotspots it will be great. Can I read spherical coordinates under the mouse cursor?

jordi

Profi

Beiträge: 583

Wohnort: Barcelona

Beruf: creating ideas & coding them

  • Nachricht senden

4

Sonntag, 29. April 2018, 08:29

yes you can :

Quellcode

1
screentosphere(mouse.x, mouse.y, toh, tov);
everpano.com step beyond 360

5

Sonntag, 29. April 2018, 09:08

On what event I need to read mouse coordinates? :/

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

6

Sonntag, 29. April 2018, 11:32

Hi,

two options:

include the toolbox and use the numbers section:
https://krpano.com/forum/wbb/index.php?p…74910#post74910

or

do something like:

Quellcode

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
	<events name="showcoords" keep="true" onkeydown="ShowCoords();" onviewchange="NumDoMouse();" /> 
	
	<style name="coords" keep="true" type="text" width="150" height="40" bgroundedge="20" bgcolor="0xffffff" html="" css="data:css_mouse" ox="20" oy="-50" vcenter="true" />
	<data name="css_mouse"> 
		font-family:Helvetica;font-size:13px;color:#000000;text-align:center;
	</data>	
	<action name="ShowCoords">
		if(keycode == 77,
			ifnot(_mouse,
				addlayer(mouse);
				layer[mouse].loadstyle(coords);
				set(_mouse, true);
			,
				removelayer(mouse);
				set(_mouse, false);	
			);
		);
		if(keycode == 80, Print());
	</action>

	
		<action name="NumDoMouse" >
		setinterval(time, 0.02,
			screentosphere(mouse.x, mouse.y, toh, tov);
			roundval(toh,7);
			roundval(tov,7);
			set(layer[mouse].html, calc:'ATH = ' + toh + '[br]ATV = ' + tov);
			copy(layer[mouse].x, mouse.x);
			copy(layer[mouse].y, mouse.y);
		);
	</action>
	<action name="Print">
		showlog();
		trace('Mouse X = ',get(toh),'&#xA;Mouse Y = ',get(tov));
	</action>


Click 'M' on keyboard to show/hide the mouse pointer.
Click 'P' to show coords in log.
http://www.virtualtuur.com/krpano/show_coords/1/

Hope it helps!
Tuur *thumbsup*

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »Tuur« (29. April 2018, 12:53)