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

Sonntag, 8. September 2013, 18:25

Multiple distorted hotspot pixelhittest - Call for quick brainstorming

Hi

Started on project where I have to align multiple distorted hotspots. All goes fine with "perfect pixel alignement tutorial" steps but than I realised that pixelhittest is confused *blink*
This is the call for brainstorming as I can't find quick solution by my own.

Here is the link on test I prepared for this topic:
link to test example
Code is available here: link to code
Complete project folder can be downloaded: here 700k

Quick info:
- hotspots have pixelhitest and distorted attribute set to true
- zorder2 is not of use here as I have only distorted hotspot
- normal zorder is also not of much help
- seams that pixelhitest is confused the most on the areas where my images are intersecting. Have prepared outlined image to get a feeling what I'm talking about here:

- Right leg of purple and green image, right arm of purple image....are the areas where you can easy see what area are not triggering onmouse over event properly.

Any help of idea is appreciated.
Regards
Umalo

Beiträge: 1 848

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

2

Sonntag, 8. September 2013, 19:54

I have an idea.
These are supposed to be invisible I guess.
Here's my crappy idea. I just did two. The problem is onout for re-entering the SAME hotspot. I would set a delayedcall to reset all scales to 1. With this method, going from a pixelhittest overlap to overlap should work.

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
	<hotspot name="hotspot_igrac_01" style="style_hotspot" url="hotspots/hotspot_igrac_01.png" zorder="1" onloaded="calc_pos_from_hfov_yaw_pitch_roll(19,94.9474,-0.6264,12.8793);" 	       
		onover="
		set(hotspot[hotspot_igrac_01].scale,1);
		set(hotspot[hotspot_igrac_02].scale,0.5);
		set(hotspot[hotspot_igrac_03].scale,0.5);
		set(hotspot[hotspot_igrac_04].scale,0.5);
		copy(layer[tooltip].html,nk[popis_igraca].podaci[get(name)].ime);set(layer[tooltip].visible, true);tween(layer[tooltip].alpha, 1.0, 0.5);asyncloop(hovering, copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); );"
	    onout="
	    set(hotspot[hotspot_igrac_01].scale,0.5);
		set(hotspot[hotspot_igrac_02].scale,1);
		set(hotspot[hotspot_igrac_03].scale,1);
		set(hotspot[hotspot_igrac_04].scale,1);
	    tween(layer[tooltip].alpha, 0.0, 0.25, default, set(layer[tooltip].visible,false), copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); );"	  />
	<hotspot name="hotspot_igrac_02" style="style_hotspot" url="hotspots/hotspot_igrac_02.png" zorder="1" onloaded="calc_pos_from_hfov_yaw_pitch_roll(19,82.562,2.5783,13.7965);" 		       
		onover="
		set(hotspot[hotspot_igrac_02].scale,1);
		set(hotspot[hotspot_igrac_01].scale,0.5);
		set(hotspot[hotspot_igrac_03].scale,0.5);
		set(hotspot[hotspot_igrac_04].scale,0.5);
		copy(layer[tooltip].html,nk[popis_igraca].podaci[get(name)].ime);set(layer[tooltip].visible, true);tween(layer[tooltip].alpha, 1.0, 0.5);asyncloop(hovering, copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); );"
	    onout="
   	    set(hotspot[hotspot_igrac_02].scale,0.5);
		set(hotspot[hotspot_igrac_01].scale,1);
		set(hotspot[hotspot_igrac_03].scale,1);
		set(hotspot[hotspot_igrac_04].scale,1);
	    tween(layer[tooltip].alpha, 0.0, 0.25, default, set(layer[tooltip].visible,false), copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); );"	  />     
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

3

Sonntag, 8. September 2013, 20:43

WOW, I like your out of the box thinking. There are no crappy ideas. Same with questions. Only answers can be stupid *huh*
I can make your idea dynamic but there is a flood:
- at start all hotspots should be scale = 1. This is fine.
- when onover on first hotspot all other hotspot goes to scale 0.5 (it can be even 0) and there is the catch. Again I have areas of hotspots that are not capturing the mouse event properly due to pixelhittest confused with overlaping. So it might happend that even I have mouse over hotspot2 if I hit exactly the area that is not active I can't trigger other hotspot scaling to 0.5. Take a look at image of green hotspot. I left mouse at this position by purpose. On this position (almost whole leg) is not catching onover event so I can't reliably use your solution and be sure that it works 100%. *unsure*

Maybe this will tickle some other ideas.

4

Sonntag, 8. September 2013, 22:46

Decided to go with narrowed images and to avoid overlapping but still question is open at least for Klaus to think if something is possible as people will have designs like mine for sure.
This way I can't get all areas covered ;( There are minor gaps between images which I tried to avoid but no idea for now how to solve this.
Umalo

Beiträge: 1 848

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

5

Sonntag, 8. September 2013, 22:54

What about instead of images... Use polygons.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

6

Montag, 9. September 2013, 18:44

that was also my initial idea but as still not sported on HTML5 rejected.
Workaround with narrowed images in this project I'm doing now is acceptable so I can go with it now.

Hope we will all find or some solution or Klaus will jump in with some already implemented not tested/documented attribute like transparency_overlapping="true" *w00t*