1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<krpano onstart="loadscene(0, null, MERGE);">
<!-- no default krpano fullscreen --> <contextmenu touch="false" fullscreen="false" />
<!-- set the default fov settings (might need to be adjusted for the particular VR adapter) --> <view fovtype="DFOV" fov="90" fovmin="30" fovmax="150" view.vlookatmin="-70" view.vlookatmax="90" />
<!-- events for sync viewing control --> <events name="vrcontrol" keep="true" onxmlcomplete="if(side == left, loadgyro() );" onviewchange="if(plugin[gyro].available, js(sync_1to2()) , if(syncother, if(side == left, js(sync_1to2()) , js(sync_2to1()) ); ) );" onmousedown="set(syncother,true); events[vrcontrol].onviewchange();" onmousewheel="events[vrcontrol].onmousedown();" />
<action name="loadgyro"> addplugin(gyro); set(plugin[gyro].onavailable, js(sync_set(control.usercontrol,off)) ); set(plugin[gyro].url, 'gyro.js'); </action>
<action name="js_sync_call"> js( sync_call(%1(%2,%3)) ); </action>
<action name="do_hotspot_sevastos_onclick"> tween(layer[sevastos].visible,true,); </action>
<!-- zoom the hotspots when looking at them and after 2 seconds load the linked scene --> <events name="testshotspots" keep="true" onviewchanged="testhotspots();" />
<action name="testhotspots"> for(set(i,0), i LT hotspot.count, inc(i), getlooktodistance(d, hotspot[get(i)].ath, hotspot[get(i)].atv); if(d LT 7, hotspot_in_focus(get(i), get(hotspot[get(i)].tween(layer[sevastos].visible,true,);)); , hotspot_out_of_focus(get(i), 0.5, 0.5); ); ); </action>
<action name="hotspot_in_focus"> if(hotspot[%1].infocus != true, set(hotspot[%1].infocus, true); tween(hotspot[%1].scale, 1.0, 2.0, default), tween(layer[sevastos].visible,true); </action>
<action name="hotspot_out_of_focus"> set(hotspot[%1].infocus, false); tween(hotspot[%1].scale, 0.5, 0.5); </action>
<!-- include the panos --> <include url="tour.xml" />
</krpano>
|