Hi everyone,
I'm new to the forum.
I'm trying to do something that should be simple, but is not yet working out.
I have two scenes set to autotour using the timer by Sudarchikov Andrey to switch from one to the other
I would like to get a random value for the hlookat (and vlookat) each time one scene reloads.
Code
<krpano onstart="loadscene(0);timer.start(autotour,12);"> <events name="autotour" keep="true" onxmlcomplete="autotour.reset();" onmousedown="autotour.pause();" onmouseup="autotour.reset();" autotour=" if(autorotate.enabled, add(sceneindex,scene[get(xml.scene)].index,1); if(sceneindex == scene.count, set(sceneindex,0); ); loadscene(get(sceneindex),null,merge,blend(0.7)); ); " />
<include url="timer.xml" />
<autorotate waittime="0" enabled="true"/>
<krpano idletime="2.0" /> <events onidle="mul(h,random,360);mul(v,random,90);mul(f,random,90);sub(h,180);sub(v,45);add(f,45);oninterrupt(break);lookto(get(h),get(v),get(f),smooth(5,2,50));wait(2.0);" />
<scene name="01" title="01" onstart="" thumburl="panos/01.tiles/thumb.jpg" lat="" lng="" heading="">
<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
<preview url="panos/01.tiles/preview.jpg" />
<image> <cube url="panos/01.tiles/pano_%s.jpg" /> <mobile> <cube url="panos/01.tiles/mobile_%s.jpg" /> </mobile> </image>
</scene>
<scene name="02" title="02" onstart="" thumburl="panos/02.tiles/thumb.jpg" lat="" lng="" heading="">
<view hlookat="100" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
<preview url="panos/02.tiles/preview.jpg" />
<image> <cube url="panos/02.tiles/pano_%s.jpg" /> <mobile> <cube url="panos/02.tiles/mobile_%s.jpg" /> </mobile> </image>
</scene>
Alles anzeigen
Any suggestion?