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

Montag, 9. November 2020, 17:54

Changing default hotspot type in droplet

I've searched for this answer, but couldn't find it. Let me begin by saying that I don't know much about how to code the xml files, other than trial and error and hoping it works out.

I'd like to change the default hotspot (the arrow) in the droplet app to use the animated white circle hotspot, so when I use the tour editor, the default hotspot uses the animated white circle.

If anyone can point me to which file to edit, and what code to add/replace that would be great. I'm looking to change the MAKE VTOUR (VR-OPT) droplet.
thanks!

2

Dienstag, 10. November 2020, 01:36

krpano-1.20.8 → templates → xml → skin → vtourskin_hotspot.png
image change :)

3

Dienstag, 10. November 2020, 15:25

krpano-1.20.8 → templates → xml → skin → vtourskin_hotspot.png
image change :)
But in order to make it animate, there's a bunch of code to go along with it, that's what I'm struggling with at the moment.

4

Mittwoch, 11. November 2020, 01:39

krpano-1.20.8\templates\xml\tour.xml

Add the following code to tour.xml and add action to onloaded of hotspot.
<action name="do_crop_animation" scope="local" args="framewidth, frameheight, framerate">
<!-- define local variables -->
calc(local.xframes, (caller.imagewidth /framewidth) BOR 0);
calc(local.frames, xframes * ((caller.imageheight / frameheight) BOR 0));
def(local.frame, integer, 0);

<!-- set the first frame -->
calc(caller.crop, '0|0|' + framewidth + '|' + frameheight);

<!-- do the animation -->
setinterval(calc('crop_anim_' + caller.name), calc(1.0 / framerate),
if(caller.loaded,
inc(frame);
if(frame GE frames, if(caller.onlastframe !== null, callwith(caller, onlastframe() ) ); set(frame,0); );
mod(xpos, frame, xframes);
div(ypos, frame, xframes);
Math.floor(ypos);
mul(xpos, framewidth);
mul(ypos, frameheight);
calc(caller.crop, xpos + '|' + ypos + '|' + framewidth + '|' + frameheight);
,
<!-- stop the interval when the hotspot gets removed -->
clearinterval(calc('crop_anim_' + caller.name));
);
);
</action>


ex) <hotspot name="animate_circle_hotspot" onloaded="do_crop_animation(50,50,2);"/>)""

5

Mittwoch, 11. November 2020, 15:18

Thank you! I'll give that a shot.