This post has been edited 1 times, last edit by "Kev-in-spain" (Apr 6th 2011, 7:57pm)
Here a modified code:
Quoted
Except in reverse....
|
|
Source code |
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
<krpano version="1.0.8"> <preview type="grid(cube,32,32,256,0x000000,0x778899,0x000000);" details="8" /> <events onviewchange="show_hotspots_in_range()" /> <action name="show_hotspots_in_range"> set(i,0); loop_hotspots(0); </action> <action name="loop_hotspots"> test_hotspot_in_range(get(hotspot[%1].name)); inc(i); if (i LT hotspot.count, loop_hotspots( get(i) ) ); </action> <action name="test_hotspot_in_range"> sub(hdistance, view.hlookat, hotspot[%1].ath); mod(hdistance,hdistance,360); if(hdistance GT 180, sub(hdistance,hdistance,360)); if(hdistance LT -180, add(hdistance,hdistance,360)); sub(vdistance, view.vlookat, hotspot[%1].atv); mod(vdistance,vdistance,360); if(vdistance GT 180, sub(vdistance,vdistance,360)); if(vdistance LT -180, add(vdistance,vdistance,360)); if(hdistance LT 0, mul(hdistance,hdistance,-1)); if(vdistance LT 0, mul(vdistance,vdistance,-1)); if(hdistance GT 50, set(hdistance,50) ); if(vdistance GT 50, set(vdistance,50) ); div(hdistance,hdistance,50); div(vdistance,vdistance,50); add(distance2,hdistance,vdistance); sub(distance2,0.3); mul(distance2,2); add(hotspot[%1].alpha,0,distance2); </action> <hotspot name="hs1" keep="false" visible="true" enabled="true" handcursor="true" capture="true" children="true" zorder="0" fillcolor ="0xbbbbbb" fillalpha ="1" borderwidth ="2.0" bordercolor ="0xffffff" borderalpha ="0.50" fillcolorhover="0xffffff" fillalphahover="1" borderwidthhover="4.0" bordercolorhover="0xffffff" borderalphahover="0.80" fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700" onover="" onhover="set(hotspot[hs1].alpha,1)" onout="action(show_hotspots_in_range);" ondown="" onup="" onclick="" flying="0" ath="0" atv="0" > <point ath="-10" atv="-10" /> <point ath="-10" atv="10" /> <point ath="10" atv=" 10" /> <point ath="10" atv="-10" /> </hotspot> </krpano> |
Yep.... I've only been a member of the forum for a few weeks and I'm accumulating quite a 'beer dept' already!Me debes una cerveza...![]()