Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.com|
|
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 |
<scene name="scene_1" autoload="true" title="a1" onstart=""> <preview type="grid(cube,16,16,512,0xCCCCCC,0x666666,0x999999);" details="16"/> <hotspot type="text" html="clickme" name="colorspot" ath="10" atv="0" width="100" height="100" bgcolor="0xff0000" onclick="swapcolor(colorspot)"></hotspot> <hotspot type="text" html="lookatme" name="colorspot2" ath="90" atv="0" width="100" height="100" bgcolor="0xff0000"></hotspot> </scene> <action name="swapcolor" args="name"> trace(get(name)); set(hs, get(hotspot[get(name)])); if (hs.bgcolor == "0xff0000", set(hs.bgcolor, "0x00ff00"), set(hs.bgcolor,"0xff0000")); </action> <events name="check_viewathotspot_colorspot2" keep="true" onviewchanged="togglehotspot"/> <action name="togglehotspot" scope="local"> getlooktodistance(current_angle, hotspot[colorspot2].ath, hotspot[colorspot2].atv); set(hs, get(hotspot[colorspot2])); if (current_angle LT 20, <!-- dosomething when hotspot is in viewing range --> set(hs.bgcolor, "0x00ff00"); , set(hs.bgcolor, "0xff0000"); ); trace(get(current_angle)); </action> |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »nikonutsch« (3. Januar 2023, 21:26)
|
|
Quellcode |
1 |
getlooktodistance(current_angle, hotspot[oapv_foto].ath, hotspot[oapv_photo].atv); |
|
|
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 |
<events name="check_viewathotspot" keep="true" onviewchanged="togglehotspot"/> <action name="togglehotspot" scope="local"> getlooktodistance(current_angle, hotspot[oapv_foto].ath,hotspot[oapv_foto].atv); set(hs, get(hotspot[oapv_foto])); if (current_angle LT 30, <!-- dosomething when hotspot is in viewing range --> set(hs.alpha, "1"); , set(hs.alpha, "0"); ); trace(get(current_angle)); getlooktodistance(current_angle, hotspot[ao_f].ath, hotspot[ao_f].atv); set(hs, get(hotspot[ao_f])); if (current_angle LT 30, <!-- dosomething when hotspot is in viewing range --> set(hs.alpha, "1"); , set(hs.alpha, "0"); ); trace(get(current_angle)); </action> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 |
onloaded="drag()" ox="0"
drag="adjusthlookat(10);
if( (ath LT calc(view.hlookat + 30)) AND (ath GT calc(view.hlookat - 30)),
if(ox == 0, tween(ox, -750));
,
if(ox == -750, tween(ox, 0));
);
delayedcall(0.01, if(drag, drag()) );
"
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 |
onloaded="drag()" ox="0" drag="getlooktodistance(cur_angle, ath, atv); if( cur_angle LE 30, tween(ox, -200); , tween(ox, 0); ); delayedcall(0.01, if(drag, drag()) ); " |
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »San7« (4. Januar 2023, 19:35)
dear San7
thank you for this great solution. it makes working with a lot of hotspots much easier!!!!!!!!!!!!!
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<events name="check_viewathotspot" keep="true" onviewchanged="slideingdoor"/> <action name="slideingdoor"> for(set(i,0), i LT hotspot.count, inc(i), copy(hs,hotspot[get(i)]); hs.getcenter(hs_h, hs_v); getlooktodistance(d, hs_h, hs_v); subtxt(destVar,get(hs.name),0, 1); if(destVar == "x", if(d LT 40, set(hs.ox, 200); , set(hs.ox, -200); ); ); ); </action> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 |
<action name="slideingdoor"> for(set(i,0), i LT hotspot.count, inc(i), copy(hs,hotspot[get(i)]); hs.getcenter(hs_h, hs_v); getlooktodistance(d, hs_h, hs_v); subtxt(destVar,get(hs.name),0, 1); if(destVar == "x", if(d LT 40, tween(hs.ox, 200,3); , tween(hs.ox, -200,3); );); ); </action> |
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »nikonutsch« (10. Januar 2023, 11:49)
with this code i can get all hotspots with x at the beginning of the title
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »indexofrefraction« (9. Januar 2023, 23:25)
|
|
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 |
<hotspot name="x_sd1" type="image" url="skin/türop1.jpg" keep="false" renderer="webgl" visible="true" enabled="true" capture="false" handcursor="true" cursor="pointer" maskchildren="false" zorder="" style="" ath="00" atv="0.000" edge="center" zoom="false" distorted="true" rx="0.0" ry="0.0" rz="0.0" width="500" height="800" scale="1" rotate="0" alpha="1" so="-1500" sc="1100" /> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<events name="check_viewathotspot" keep="true" onviewchanged="slidingdoor"/> <action name="slidingdoor"> for(set(i,0), i LT hotspot.count, inc(i), copy(hs,hotspot[get(i)]); hs.getcenter(hs_h, hs_v); getlooktodistance(d, hs_h, hs_v); subtxt(destVar,get(hs.name),0, 1); if(destVar == "x", if(d LT 40, tween(hotspot[get(hs.name)].ox, get(hotspot[get(hs.name)].so) ,3); , tween(hotspot[get(hs.name)].ox, get(hotspot[get(hs.name)].sc) ,3); ); ); ); </action> |
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »nikonutsch« (10. Januar 2023, 13:07)