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!

  • 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);"/>)""

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!