Sie sind nicht angemeldet.

Timescale

Schüler

  • »Timescale« ist der Autor dieses Themas

Beiträge: 120

Wohnort: Netherlands

Beruf: Archaeologist, Timescale R&D

  • Nachricht senden

1

Freitag, 9. Dezember 2016, 13:21

Flyout hotspot offset

Hi Everyone,

A client wanted text on panels in-pano which, as you all can imagine is a terrible idea on smartphone screens! So I extended the flyout functionality with a Q&D zoom function, but certain panels zoom out of view. So now I need a way to move the zoomed in flown out image around.

It it possible to offset a flyout hotspot in the X and Y direction? Standard flown out hotspots are centered on screen. I need to be able to move them.

Thanks in advance.

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

2

Freitag, 9. Dezember 2016, 14:07

Hi)

Try ox/oy offsets
Regards,

Alexey

3

Freitag, 9. Dezember 2016, 14:14

Try soemthing like this:

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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<hotspot name="spot1" style="flyoutimage" keep="true"
	         url="image_1.jpg"
	         zorder="1"
	         ath="45"
	         atv="54"
	         ox="0" oy="0"
	         x_offset="200"
	         y_offset="100"
	         scale="0.4"
	         rx="-22.5" ry="-26.25" rz="-50.1"
	         />

	<!-- flyout hotspot actions -->
	<action name="flyout_hotspot">
	  trace(ath);showlog();
		for(set(i,0), i LT hotspot.count, inc(i),
			copy(hs, hotspot[get(i)]);
			if(hs.name != name AND hs.style == 'flyoutimage' AND (hs.flying_state == 'out' OR hs.flying_state == 'flyingout'),
				callwith(hs, flyout_hotspot() );
			  );
		  );

		if(flying_state == 'flyingout',
			set(flying_state, 'flyingin');
		  ,
			if(flying_state == 'flyingin',
				set(flying_state, 'flyingout');
		  	  );
		  );

		if(flying_state == 'in',
			calc(backup_state, '0.0|' + rx + '|' + ry + '|' + rz + '|' + scale+ '|' + ox + '|' + oy);			
			copy(backup_zorder, zorder);
			set(flying_state, 'flyingout');
		  );

		if(flying_state == 'out',
			set(flying_state, 'flyingin');
		  );

		if(flying_state == 'flyingout',
			set(zorder, 99);						
			tween(flying|rx|ry|rz|scale|ox|oy, calc('1.0|0.0|0.0|0.0|1.0|'+x_offset+'|'+y_offset), 0.5, default, set(flying_state,'out'); set(capture,true); );
		  );

		if(flying_state == 'flyingin',
			sub(zorder,1);
			set(capture,false);
			tween(flying|rx|ry|rz|scale|ox|oy, get(backup_state), 0.5, default, set(flying_state,'in'); copy(zorder,backup_zorder); );
		  );
	</action>

Timescale

Schüler

  • »Timescale« ist der Autor dieses Themas

Beiträge: 120

Wohnort: Netherlands

Beruf: Archaeologist, Timescale R&D

  • Nachricht senden

4

Freitag, 9. Dezember 2016, 14:33

Thank

Ah yes, I think I can work something out from this!

Thanks


Edit : Managed to make a pointer driven function that lets me move the flyout hotspot in certain cases.. Thanks again for the tip!

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Timescale« (9. Dezember 2016, 15:08)