addhotspot(%1);hotspot[%1].loadstyle(%2);txtadd(sh,%1,'shadow');if(hotspot[%1].style===null,set(shadow,true);if(layer[connections].connection[%1].shadow===false,set(shadow,false));if(layer[connections].connection[%1].arrowstyle===null,if(style[default-arrow].shadow===false,set(shadow,false));,if(style[get(layer[connections].connection[%1].arrowstyle)].shadow===false,set(shadow,false)););if(shadow,if(layer[connections].connection[%1].shadowstyle===null,addHotSpotWithStyle(get(sh),'default-shadow');,addHotSpotWithStyle(get(sh),get(layer[connections].connection[%1].shadowstyle));););if(layer[connections].connection[%1].arrowstyle===null,addHotSpotWithStyle(%1,'default-arrow');,addHotSpotWithStyle(%1,get(layer[connections].connection[%1].arrowstyle)););if(layer[connections].connection[%1].onclick===null,txtadd(hotspot[%1].onclick,'loadscene(',%1,',null,KEEPVIEW,BLEND(0.2));');,copy(hotspot[%1].onclick,layer[connections].connection[%1].onclick););if(layer[connections].connection[%1].onover!==null,copy(hotspot[%1].onover,layer[connections].connection[%1].onover););if(layer[connections].connection[%1].onhover!==null,copy(hotspot[%1].onhover,layer[connections].connection[%1].onhover););if(layer[connections].connection[%1].onout!==null,copy(hotspot[%1].onout,layer[connections].connection[%1].onout););if(layer[connections].connection[%1].ondown!==null,copy(hotspot[%1].ondown,layer[connections].connection[%1].ondown););if(layer[connections].connection[%1].onup!==null,copy(hotspot[%1].onup,layer[connections].connection[%1].onup);););copy(hotspot[get(sh)].visible,hotspot[%1].visible);txtadd(sh,%1,'shadow');addHotSpotIfMissing(%1);div(deg2rad,Math.PI,180.0);sub(fr,view.hlookat,%2);mul(fr,deg2rad);Math.sin(sfr,fr);Math.cos(cfr,fr);set(ltv,null);set(gtv,null);set(ltposv,null);set(gtposv,null);mul(vr,deg2rad,%3);if(vr,sub(vr,0.0,vr);Math.cos(cvr,vr);Math.sin(svr,vr);,set(cvr,1.0);set(svr,0.0););if(layer[%4].arrow.center.functionv===null,copy(fptcnt,layer[default-arrow-shape].arrow.center.functionv.point.count);,copy(fptcnt,layer[%4].arrow.center.functionv.point.count););for(set(fpt,0),fpt LT fptcnt,inc(fpt),if(layer[%4].arrow.center.functionv===null,copy(vn,layer[default-arrow-shape].arrow.center.functionv.point[get(fpt)].vlookat);copy(posvn,layer[default-arrow-shape].arrow.center.functionv.point[get(fpt)].posv);,copy(vn,layer[%4].arrow.center.functionv.point[get(fpt)].vlookat);copy(posvn,layer[%4].arrow.center.functionv.point[get(fpt)].posv););if(vn LT view.vlookat,if(ltv===null,copy(ltv,vn);copy(ltposv,posvn);,if(vn GT ltv,copy(ltv,vn);copy(ltposv,posvn);););,if(gtv===null,copy(gtv,vn);copy(gtposv,posvn);,if(vn LT gtv,copy(gtv,vn);copy(gtposv,posvn);););););if(gtv==null,copy(posv,ltposv);,if(ltv==null,copy(posv,gtposv);,sub(diff,gtv,ltv);sub(posv,gtposv,ltposv);div(posv,diff);sub(diff,view.vlookat,ltv);mul(posv,diff);add(posv,ltposv);););add(posvs,posv,layer[%4].arrow.center.shadowdrop);mul(basev,posv,deg2rad);Math.sin(basev);mul(basev,layer[%4].arrow.center.dist);mul(basevs,posvs,deg2rad);Math.sin(basevs);mul(basevs,layer[%4].arrow.center.dist);for(set(num,0),num LT layer[%4].arrow.point.count,inc(num),mul(ly,layer[%4].arrow.point[get(num)].y,cvr);mul(crz,layer[%4].arrow.point[get(num)].y,svr);mul(crx,layer[%4].arrow.point[get(num)].x,cfr);mul(crx1,ly,sfr);sub(crx,crx1);mul(cry,ly,cfr);mul(cry1,layer[%4].arrow.point[get(num)].x,sfr);add(cry,cry1);mul(cry1,posv,deg2rad);Math.cos(cry1);mul(cry1,layer[%4].arrow.center.dist);add(cry,cry1);Math.atan2(ph,crx,cry);div(ph,deg2rad);ifnot(hotspot[get(sh)].style===null,add(hotspot[get(sh)].point[get(num)].ath,ph,view.hlookat););add(hotspot[%1].point[get(num)].ath,ph,view.hlookat);mul(crx1,crx,crx);mul(distc,cry,cry);add(distc,crx1);Math.sqrt(distc);sub(pbasev,basevs,crz);Math.atan2(pv,pbasev,distc);ifnot(hotspot[get(sh)].style===null,div(hotspot[get(sh)].point[get(num)].atv,pv,deg2rad););sub(pbasev,basev,crz);Math.atan2(pv,pbasev,distc);div(hotspot[%1].point[get(num)].atv,pv,deg2rad););for(set(i,0),i LT layer[connections].connection.count,inc(i),if(layer[connections].connection[get(i)].shape===null,set(shape,'default-arrow-shape');,copy(shape,layer[connections].connection[get(i)].shape););drawArrow(get(layer[connections].connection[get(i)].name),get(layer[connections].connection[get(i)].hdir),get(layer[connections].connection[get(i)].vdir),get(shape)););