Benutzerinformationen überspringen
Wohnort: Berlin
Beruf: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<merken keep="1" showhs="1" />
...
<action name="hotspot_an-aus_schalten"> <!-- Durchläuft alle Hotspots der Art Standpunkte und schaltet Sie an und aus -->
for( set(i,0), i LT hotspot.count, inc(i),
if( hotspot[get(i)].cat == 'standpunkt',
switch( hotspot[get(i)].visible);
copy( merken.showhs, hotspot[get(i)].visible);
);
);
</action>
<action name="onloadpano">
for( set(i,0), i LT hotspot.count, inc(i),
copy( hotspot[get(i)].visible, merken.showhs);
);
</action>
|
Benutzerinformationen überspringen
Wohnort: Berlin
Beruf: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )
|
|
Quellcode |
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 |
<krpano onstart="loadscene(0,null,MERGE|KEEPVIEW);"> <events onpreviewcomplete="onloadpano()" /> <scene name="pano1"> <preview type="grid(cube,16,16,512,0xCCCCCC,0x000000,0x999999);" /> <hotspot name="spot1" url="hotspot.png" scale="0.5" ath="-25" atv="+5" cat="standpunkt" /> <hotspot name="spot2" url="hotspot.png" zoom="true" scale="0.5" ath="0" atv="+25" cat="standpunkt" /> <hotspot name="spot3" url="hotspot.png" distorted="true" scale="0.2" ath="+25" atv="+5" ondown="hotspot_an-aus_schalten()" /> <hotspot name="spot4" url="hotspot.png" distorted="true" scale="0.2" ath="0" atv="+5" ondown="loadscene(1,null,MERGE|KEEPVIEW);" /> </scene> <scene name="pano2"> <preview type="grid(cube,16,16,512,0xCCCCCC,0x000080,0x999999);" /> <hotspot name="spot4" url="hotspot.png" scale="0.5" ath="-25" atv="+5" cat="standpunkt" /> <hotspot name="spot5" url="hotspot.png" zoom="true" scale="0.5" ath="0" atv="+25" cat="standpunkt" /> <hotspot name="spot6" url="hotspot.png" distorted="true" scale="0.2" ath="+25" atv="+5" ondown="hotspot_an-aus_schalten()" /> <hotspot name="spot7" url="hotspot.png" distorted="true" scale="0.2" ath="0" atv="+5" ondown="loadscene(0,null,MERGE|KEEPVIEW);" /> </scene> <merken keep="1" showhs="1" /> <action name="hotspot_an-aus_schalten"> for( set(i,0), i LT hotspot.count, inc(i), if( hotspot[get(i)].cat == 'standpunkt', switch( hotspot[get(i)].visible); copy( merken.showhs, hotspot[get(i)].visible); ); ); </action> <action name="onloadpano"> for( set(i,0), i LT hotspot.count, inc(i), if( hotspot[get(i)].cat == 'standpunkt', copy( hotspot[get(i)].visible, merken.showhs); ); ); </action> </krpano> |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Ossigott90« (1. Februar 2017, 12:45)
Benutzerinformationen überspringen
Wohnort: Berlin
Beruf: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<merken keep="1" showhs="1" /> <action name="hotspot_an-aus_schalten"> for( set(i,0), i LT hotspot.count, inc(i), if( hotspot[get(i)].cat == 'standpunkt', switch( hotspot[get(i)].visible); copy( merken.showhs, hotspot[get(i)].visible); ); ); </action> <action name="onloadpano"> for( set(i,0), i LT hotspot.count, inc(i), if( hotspot[get(i)].cat == 'standpunkt', copy( hotspot[get(i)].visible, merken.showhs); ); ); </action> |
Benutzerinformationen überspringen
Wohnort: Berlin
Beruf: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )
Benutzerinformationen überspringen
Wohnort: Berlin
Beruf: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )
Benutzerinformationen überspringen
Wohnort: Berlin
Beruf: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )
Wäre es nicht möglich die Funktion des merkens in eine separate Funktion auszulagern die alle Touren benutzen, also eine separate .XML in der immer der Status gespeichert ist und die nächste Tour einfach den Status von dieser Datei ausließt?