; after each scene node:|
|
Source code |
1 2 3 4 5 |
... </scene> <action> if(view.hlookat==85,loadscene(get(nextscene), null, MERGE, ZOOMBLEND(1,2)); </action> |
well, that I don't know... thtat's why I tried an if condition checking against a given hlookat value...and where would you detect it (after the tween/lookto, in the onviewchanged event?)
|
|
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 32 33 34 35 36 37 38 39 40 |
<krpano version="1.0.8.14" onstart="startup();">
<!-- vtour.xml template krpano tools version 1.0.8.14 -->
<autorotate enabled="true"
waittime="1.5"
speed="10.0"
/>
<action name="startup">
loadscene(get(scene[0].name), null, MERGE);
if(scene.count GT 1, buildthumbs(); );
</action>
<action name="getHlookat">
<!--
%1 = auf Ganzzahl runden (true)
-->
set(hpos, get(view.hlookat));
set(hposreal, get(view.hlookat));
if (hpos LT 0, mul(hposreal, -1); );
div(hposreal, 360);
Math.floor(hposrealtmp, hposreal);
sub(hposreal, hposrealtmp);
mul(hposreal, 360);
if (hpos LT 0, sub(hposreal, 360, hposreal); );
if (%1 EQ true, roundval(hposreal, 0); roundval(hpos, 0); );
</action>
<events onviewchange="getHlookat();" />
<scene name="scene_a....."
...
</scene>
<action>
if(view.hposreal==15,loadscene(get(nextscene), null, MERGE, ZOOMBLEND(1,2));
</action>
<scene name="scene_b..."
...
|
|
|
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 32 33 34 35 36 |
<krpano version="1.0.8.14" onstart="startup();">
<!-- vtour.xml template krpano tools version 1.0.8.14 -->
<autorotate enabled="true"
waittime="1.5"
speed="10.0"
/>
<action name="startup">
if(scene.count GT 1, buildthumbs(); );
<!-- load the first scene -->
loadscene(get(scene[0].name), null, MERGE, ZOOMBLEND(1,2)E);
autotour();
</action>
<action name="getHlookat">
<!--
%1 = auf Ganzzahl runden (true)
-->
set(hpos, get(view.hlookat));
set(hposreal, get(view.hlookat));
if (hpos LT 0, mul(hposreal, -1); );
div(hposreal, 360);
Math.floor(hposrealtmp, hposreal);
sub(hposreal, hposrealtmp);
mul(hposreal, 360);
if (hpos LT 0, sub(hposreal, 360, hposreal); );
if (%1 EQ true, roundval(hposreal, 0); roundval(hpos, 0); );
</action>
<events onviewchange="getHlookat();" />
<action name="autotour">
if(hposreal==25,loadscene(get(scene[1].name), null, MERGE, ZOOMBLEND(1,2));
if(hposreal==25,loadscene(get(scene[0].name), null, MERGE, ZOOMBLEND(1,2));
autotour();
</action>
<scene....
.
|
Warum möchtest du unbedingt per <autorotate> eine Drehung vollführen?
Warum nicht per lookto() oder tween()?
z.B. warum hier zwei mal der gleiche Aufruf?
if(hposreal==25,loadscene(get(scene[1].name), null, MERGE, ZOOMBLEND(1,2));
if(hposreal==25,loadscene(get(scene[0].name), null, MERGE, ZOOMBLEND(1,2));
|
|
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
<action name="startup">
buildthumbs();
loadscene(scene(get(scene[0].name), null, MERGE, ZOOMBLEND(1,2));
autotour();
set(idletime,53);
set(events.onidle, autotour() );
</action>
<action name="getHlookat">
<!--
%1 = auf Ganzzahl runden (true)
-->
set(hpos, get(view.hlookat));
set(hposreal, get(view.hlookat));
if (hpos LT 0, mul(hposreal, -1); );
div(hposreal, 360);
Math.floor(hposrealtmp, hposreal);
sub(hposreal, hposrealtmp);
mul(hposreal, 360);
if (hpos LT 0, sub(hposreal, 360, hposreal); );
if (%1 EQ true, roundval(hposreal, 0); roundval(hpos, 0); );
</action>
<action name="autotour">
oninterrupt(break);
if(step == 2, if(hposreal==28), inc(step););
if(step == 3, loadscene((get(scene[1].name), null, MERGE, ZOOMBLEND(1,2) inc(step););
if(step == 4, if(hposreal==20, inc(step););
if(step == 5, loadscene((get(scene[2].name), null, MERGE, ZOOMBLEND(1,2); inc(step); );
if(step == 6, if(hposreal==25), inc(step); );
if(step == 7, loadscene((get(scene[3].name), null, MERGE, ZOOMBLEND(1,2) );
if(step == 8, if(hposreal==18), inc(step); );
autotour();
</action>
...
und bei den scenes dann jeweils:
<scene name="scene_baghahouddin" title="baghahouddin" onstart="" thumburl="baghahouddin.tiles/thumb.jpg">
<action name="setstep">
set(step,2)
</action>
<view...>
...
<scene name="scene_chor-bakr-2569" title="chor-bakr-2569" onstart="" thumburl="chor-bakr-2569.tiles/thumb.jpg">
<action name="setstep">
set(step,4)
</action>
<view...>
...
|
Warum möchtest du unbedingt per <autorotate> eine Drehung vollführen?
Warum nicht per lookto() oder tween()?