Sie sind nicht angemeldet.

  • »nonchiedercilaparola« ist der Autor dieses Themas

Beiträge: 148

Wohnort: Italy

Beruf: Freelance Fotographer

  • Nachricht senden

1

Mittwoch, 4. Dezember 2013, 18:06

hotspot as a parent for a layer doesn't work?

Hi, i would like to use skin_bottonglow function over my layer and over my hotspot so i have change the default skin_bottonglow function because in the log i have this error: "no parent 'btn-gallery-bagni2' found" and the glow effect doesn't appear over the hotspot.
This is my code (my changes in red):



if(%1 != null,
set(strength,0.7);
if(%2 != null, set(strength,%2));
if (hotspot[1%].name === %1,
set(layer[skin_buttonglow].parent, hotspot[1%]);,
set(layer[skin_buttonglow].parent, %1);
);
set(layer[skin_buttonglow].visible, true);
tween(layer[skin_buttonglow].alpha, get(strength), 0.07);
,
tween(layer[skin_buttonglow].alpha, 0.0, 0.1, default, set(layer[skin_buttonglow].parent, null); set(layer[skin_buttonglow].visible, false); );
);

but the i get the same error. so i'm thinking is it possible to have an hotspot like a parent for a layer?

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

2

Donnerstag, 5. Dezember 2013, 08:57

Hotspots and layers are in different "dimensions"! Hotspots are inside panorama while layers are on the screen. So it is impossible to set hotspot as parent for a layer. Instead, create a "glow" hotspot using the same crop as the "buttonglow" image and use this hotspot to "jump" over other hotspots.
Regards,

Alexey

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

3

Freitag, 6. Dezember 2013, 15:31

Not true, i use hotspots as parents for layers all the time.

His problem is not the hotspot parent, but the layer parent. It is not found.

Hotspots and Parents
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

4

Freitag, 6. Dezember 2013, 15:41

Sorry, didn't know that.
Regards,

Alexey

5

Freitag, 6. Dezember 2013, 15:48

Not true, i use hotspots as parents for layers all the time.

His problem is not the hotspot parent, but the layer parent. It is not found.
Hotspots and Parents


you have a working example of this function? Very be interesting to see its use! *question*
Tnx!

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

6

Freitag, 6. Dezember 2013, 16:10

Okay, I've made a quick test with the standard skin and went the easiest way: joined styles for hotspots:

Quellcode

1
<hotspot name="spot1" style="skin_hotspotstyle|skin_glow" ath="53.498" atv="13.032" linkedscene="scene_25" />


I see the error that "ERROR: no parent "spot1" found". However, I see the glow layer somewhere near the middle of the screen.

Check out the link:

http://vt-vr.most-inform.com/glow_test/

I suppose there must be some further playing with sphere to screen to calculate where the glow layer must appear.
Regards,

Alexey

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

7

Freitag, 6. Dezember 2013, 17:01

Not true, i use hotspots as parents for layers all the time.

His problem is not the hotspot parent, but the layer parent. It is not found.
Hotspots and Parents


you have a working example of this function? Very be interesting to see its use! *question*
Tnx!


layers with hotspot parents look like just two hotspots next two each other. Use ox and oy for positioning.

hotspots with hotspot parents are really strange though. I suggest you try that!
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

8

Freitag, 6. Dezember 2013, 20:37

This action almost works)))

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<action name="skin_buttonglow">
		if(%1 != null,
			set(strength,0.7);
			if(%2 != null, set(strength,%2));
			ifnot(hotspot[get(name)].name == %1,set(layer[skin_buttonglow].parent, %1););
			set(layer[skin_buttonglow].visible, true);
			if(hotspot[get(name)].name == %1,
			set(layer[skin_buttonglow].align,lefttop);set(layer[skin_buttonglow].edge,top);
			spheretoscreen(ath,atv,glow_x,glow_y);
			set(layer[skin_buttonglow].x,get(glow_x));set(layer[skin_buttonglow].y,get(glow_y)); 
			);
			tween(layer[skin_buttonglow].alpha, get(strength), 0.07);
		  ,
			tween(layer[skin_buttonglow].alpha, 0.0, 0.1, default, set(layer[skin_buttonglow].parent, null); set(layer[skin_buttonglow].visible, false); );
			delayedcall(0.1, set(layer[skin_buttonglow].align,center);set(layer[skin_buttonglow].edge,null);set(layer[skin_buttonglow].x,0);set(layer[skin_buttonglow].y,1););
		  );
		 
	</action>

Check out the link again:
http://vt-vr.most-inform.com/glow_test/
Regards,

Alexey

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Alexey Tkachenko« (9. Dezember 2013, 08:12)