Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<action name="startup"> set(step,1); autotour(); set(idletime,4); set(events.onidle, autotour() ); </action> <action name="autotour"> oninterrupt(break); if(step == 1, loadscene(scene_baghahouddin, null, MERGE, ZOOMBLEND(1,2) ); lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); if(step == 2, loadscene(scene_chor-bakr-2569, null, MERGE, ZOOMBLEND(1,2) ); lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); ... autotour(); </action> |
|
|
Source code |
1 2 3 |
set(idletime,8); set(events.onidle, dec(step) ); set(events.onidle, autotour() ); |
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<action name="startup"> autotour(); set(idletime,4); set(events.onidle, autotour() ); </action> <action name="autotour"> set(step,1); oninterrupt(break); if(step == 1, loadscene(scene_baghahouddin, null, MERGE, ZOOMBLEND(1,2) ); lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); if(step == 2, loadscene(scene_chor-bakr-2569, null, MERGE, ZOOMBLEND(1,2) ); lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); ... autotour(); </action> |
|
|
Source code |
1 |
set(events.onidle, dec(step); autotour(); ); |
))
Quoted
<action name="startup">
autotour();
set(idletime,4);
set(events.onidle, autotour() );
</action>
<action name="autotour">
set(step,1);
oninterrupt(break);
if(step == 1, loadscene(scene_baghahouddin, null, MERGE, ZOOMBLEND(1,2) ); lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); );
if(step == 2, loadscene(scene_chor-bakr-2569, null, MERGE, ZOOMBLEND(1,2) ); lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); );
...
autotour();
</action>
Quoted
and still, I don't understand, why it needs this workaround and doesn't just do what we want, start at the current step after idletime
jaaaa... later I will call myself stupid to having taken such a long time to get that.
Quoted from "gkaefer"
its easy - as everything in live - if you know it))
Great explanation for dummies!!!!! Are these conventions from Javascript? (which, obviously, I don't know either...)
Quoted from "gkaefer"
set(events.onidle, dec(step); autotour(); );
this now says that the events.onidle should execute: 1. reduce the value of variable step with 1 and than 2. execute the code in action autotour. The () says that no additional values are assigned to the action autotour.
when does the step increase? after loading? then that would be the reason. We then would need a command to increase the step after finishing the lookto process.
Quoted from "gkaefer"
so step==1 ... first pano gets loaded .... step get the value 2
works!! but I suppose we don't know why...
Quoted from "gkaefer"
if you place the line "set(step,1);" at the beginning of the action autotour() the behaviour should change so that after every idletimeout the tour should automatically start with pano 1
|
|
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 25 26 27 28 29 30 31 |
<action name="startup"> buildthumbs(); set(step,1); set(idletime,53); set(events.onidle, autotour() ); </action> <action name="autotour"> oninterrupt(break); if(step == 1, loadscene(scene_baghahouddin, null, MERGE, ZOOMBLEND(1,2) ); inc(step); ); if(step == 2, lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); if(step == 3, loadscene(scene_chor-bakr-2569, null, MERGE, ZOOMBLEND(1,2) ); inc(step); ); if(step == 4, lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); if(step == 5, loadscene(scene_chor-minor, null, MERGE, ZOOMBLEND(1,2) ); inc(step); ); if(step == 6, lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); if(step == 7, loadscene(scene_labi-havus, null, MERGE, ZOOMBLEND(1,2) ); inc(step); ); if(step == 8, lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); if(step == 9, loadscene(scene_hotel-m, null, MERGE, ZOOMBLEND(1,2) ); inc(step); ); if(step == 10, lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); if(step == 11, loadscene(scene_cafe-nigora, null, MERGE, ZOOMBLEND(1,2) ); inc(step); ); if(step == 12, lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); if(step == 13, loadscene(scene_hinter-ark, null, MERGE, ZOOMBLEND(1,2) ); inc(step); ); if(step == 14, lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); if(step == 15, loadscene(scene_kiosk, null, MERGE, ZOOMBLEND(1,2) ); inc(step); ); if(step == 16, lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); if(step == 17, loadscene(scene_wohnen-rohre, null, MERGE, ZOOMBLEND(1,2) ); inc(step); ); if(step == 18, lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); if(step == 19, loadscene(scene_atelier-asad, null, MERGE, ZOOMBLEND(1,2) ); inc(step); ); if(step == 20, lookto(360, get(view.vlookat),get(view.fov), smooth(2,2,5), false); inc(step); ); if(step == 21, set(step,1); autotour(); ); </action> |