The perfect auto - tour

  • In pursuit of the perfect auto - tour of this exhibition

    http://www.john-law.org.uk/standard/107/

    I've made made a crude version with
    <action name="autotour">
    and a lookto each 90º - when I use 'lookto 359' it takes the shortest route - can it be induced to go the long way round?

    Given the smoother panning of autorotate this is what I'd prefer

    Autorotate 360
    stop
    Fade to pano 2
    Autorotate 360
    stop
    Fade to pano
    etc

    As far as I can see a timer is not the solution...

    Any advice welcome!

    JL

  • Hi jl-krp,

    Quote

    when I use 'lookto 359' it takes the shortest route - can it be induced to go the long way round?

    Yes it can *smile* ... adding 'false' as additional last parameter to the lookto call. (as I know, here is the only post that ask about this!!! )

    lookto(toH,toV,fov,motiontype,false)

    SAlut.

  • Michel
    Very many thanks, the addition of 'false' even gives the possibility of rotating to more than 360!
    2
    I hope you liked the exhibition (manual version) when the auto version is ready I'll let you know.
    3
    Tell me, what is the story behind that comical image?

    best wishes

    JL

  • Hello
    Using several borrowings and with Michel's invaluable advice I've made a simple automation which restarts after 3 secs when users finish any manipulation. I'd like to zero the panos after - for instance - a user looks up 90º - at present the pano continues in that orientation.
    Please point out any other problems - it is intended to run quite slowly...
    JL

    ---------------------------------------------


    krpano version="1.0.8" onstart="setuptour();">

    <image type="SPHERE">
    <sphere url="images/a0.jpg" />
    </image>
    <view hlookat="0" vlookat="0" />
    <display details="22" />

    <action name="setuptour">
    set(idletime,3);
    set(events.onidle, autotour());
    </action>

    <action name="autotour">
    oninterrupt(break);
    wait(5);
    lookto(360,00,90,smooth(5,5,5), false);
    wait(5);
    loadpano(a1.xml,null,KEEPBASE|NOPREVIEW,BLEND(2));
    wait(load);
    lookto(360,00,90,smooth(5,5,5),false);
    wait(5);
    loadpano(a2.xml,null,KEEPBASE|NOPREVIEW,BLEND(2));
    wait(load);
    lookto(360,00,90,smooth(5,5,5),false);

    etc etc (8 panos)

    autotour();
    </action>
    <events onidle="action(autotour);"/>
    </krpano>

  • I have been using this code partly to do a simple autotour slideshow with 31 panoramas.

    However as I only wants to start it from a button I also wanted a stopbutton.
    Also as an indication that the show is running.
    Everything works great and in this way I can start and stop the show at any scene. If I start it on the last scene it just goes to the first and continue. Perfect.

    However as the tour stops also by clicking anywhere in the pan I made this event
    <events onmousedown="set(autorotate.waittime, 10);set(plugin[autostop].visible,false);set(plugin[auto].visible,true);delayedcall(1, set(event.onclick,null));" />

    This works perfect in Flash but in HTML5 both on Desktop and on my iPad this disables any click on the buttons.
    So if you try to stop by clicking the STOP AUTOTOUR button nothing happens.
    It actually also disables any other buttons except the click interaction on the panos which sets it back perfect.

    I also tried to use the tour without the oninterrupt(break); which works fine also but it seems to be no way of setting up a button to stop it.
    As far as I can see the only way to stop is to use ESC but that does not exist on iPad. I can use the backbutton to get out but if I start it up from a Homebutton or in Goodreader in fullscreen there is no way to stop.

    Anyone knows away to do it.

    I really like this simple way of doing an autotour because it can be reused easy for any tour.

    Hans

  • i'm using this

    call - bombtimer(0); (onidle - after 15 seconds goto next scene);

    <events onmousedown=" set(bt,0); " onviewchange=" set(bt,0); " />

    <action name="bombtimer">
    set(bt,%1);
    add(bt,1);
    delayedcall(1, bombtimer(get(bt)));
    if(bt == 15, set(bt,0); nextscene();, );
    </action>

    <action name="nextscene">
    set(ns, get(scene[get(xml.scene)].index) );
    set(maxs, get(scene.count) );
    add(ns,1);
    if(ns == maxs, set(ns,0);, );
    loadscene( get(scene[get(ns)].name ), null, MERGE, BLEND(1.5) );
    </action>

  • Andrey,

    This bombtimer works pretty well for static scenes. BUT how would one implement auto rotate with this? The autorotate automatically resets bt to 0 because of onviewchange.


    Jarred

Participate now!

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