You are not logged in.

1

Monday, August 1st 2016, 8:21pm

Wie Hotspot Animation animatedhotspot_white.png in der vtour-multires einbauen

Hallo,

ich schaffe es leider nicht diese Animation als Hotspot einzubauen (Ich verwende krpano-1.19-pr5):
animatedhotspot_white.png

In der Datei templates/vtourskin119.skin
habe ich die Zeile
xmltemplate_additional_file=xml/skin/animatedhotspot_white.png
hinzugefügt. (Damit die png Datei mitkopiert wird)

Jetzt muß noch die entsprechende Zeile in der Datei vtourskin.xml angepasst werden (vermute ich):
Zeile 224:

Source code

1
2
3
4
5
6
7
8
9
<!-- skin_hotspotstyle - style for the hotspots -->
	<style name="skin_hotspotstyle" url="animatedhotspot_white.png" scale="0.5" edge="top" distorted="true"
	   	tooltip=""
	   	onclick="if(linkedscene, set(enabled,false); skin_hidetooltips(); tween(depth|alpha|oy|rx, 4000|0.0|-50|-60, 0.5, default, loadscene(get(linkedscene),null,get(skin_settings.loadscene_flags),get(skin_settings.loadscene_blend)); skin_updatescroll(); ); );"
	   	onover="tween(scale,0.55);"
	   	onout="tween(scale,0.5);"
	   	onloaded="if(linkedscene AND skin_settings.tooltips_hotspots, copy(tooltip,scene[get(linkedscene)].title); loadstyle(skin_tooltips); );"
		   
	   	/>


Ich vermute der Code

Source code

1
onloaded="do_crop_animation(64,64, 60);" 
muß hier noch irgendwie eingebaut werden.
Danke für Hilfe!

Viele Grüße

2

Tuesday, August 2nd 2016, 10:21am

So nun bin ich einen Schritt weiter:

In die vtour.xml muß noch die entsprechende Skript Datei:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<action name="do_crop_animation">
		<!-- add attributes to the hotspot -->
		registerattribute(xframes, calc((imagewidth / %1) BOR 0));
		registerattribute(yframes, calc((imageheight / %2) BOR 0));
		registerattribute(frames, calc(xframes * yframes));
		registerattribute(frame, 0);

		set(crop, '0|0|%1|%2');

		setinterval(calc('crop_anim_' + name), calc(1.0 / %3),
			if(loaded,
				inc(frame);
				if(frame GE frames, if(onlastframe !== null, onlastframe() ); set(frame,0); );
				mod(xpos, frame, xframes);
				div(ypos, frame, xframes);
				Math.floor(ypos);
				mul(xpos, %1);
				mul(ypos, %2);
				calc(crop, xpos + '|' + ypos + '|%1|%2');
			  ,
				clearinterval(calc('crop_anim_' + name));
			  );
		  );
	</action>


hinzugefügt werden.

Jetzt fehlt vermutlich nur noch nur noch den Befehl





onloaded="do_crop_animation(64,64, 60);"


in die vtourskin.xml einzufügen.

3

Wednesday, August 3rd 2016, 5:27pm

Richtig - siehe im 'skin_hotspotstyle' <style> diese Zeile:

Source code

1
onloaded="if(linkedscene AND skin_settings.tooltips_hotspots, ..."

und ändere sie zu:

Source code

1
onloaded="do_crop_animation(64,64, 60); if(linkedscene AND skin_settings.tooltips_hotspots, ..."