In a Krpano tour i have an xml file with 4 scenes, and i use the plugin compass . I would synchronize the compass.heading, the hlookat of each scene, and the actual direction .
how could i define the condition "scene[x] is playing "to identify the actual playing scene
<plugin name="compass" devices="html5"
url="plugins/compass.js"
enabled="true"
keep="true"
onavailability="action(rotor)"
onchange="action(rotor)"
/>
<action name="rotor">
if(scene[0] is playing,
copy(view.hlookat, heading); sub(hlookat,90);)
if(scene[1] is playing,
copy(view.hlookat, heading); add(hlookat,72);)
if(scene[2] is playing,
copy(view.hlookat, heading); sub(hlookat,136);)
if(scene[3] is playing,
copy(view.hlookat, heading); sub(hlookat,42);)
if(scene[4] is playing",
copy(view.hlookat, heading); add(hlookat,127);)
</action>
Any help would be appreciated
Patrick