1import{r as u,j as e,a0 as A}from"./chunk-7c95c149.js";import{u as V,C as D,D as E,f as S}from"./chunk-87cee1fa.js";import{a as P}from"./chunk-6b9675d7.js";import{V as h,C as y,D as v,M as w,d as H}from"./chunk-5e59878c.js";import{B as T,g as k}from"./chunk-d120f533.js";import{u as p}from"./chunk-a256095a.js";import{H as R}from"./chunk-8b458796.js";import{u as b}from"./chunk-09156800.js";import{P as I}from"./chunk-aa898620.js";import"./chunk-56865e9e.js";import"./chunk-bd799850.js";import"./chunk-ab25de1f.js";import"./chunk-cf010ec4.js";function B({x:t,y:r,radius:a=1e3,...n}){const{nodes:s,materials:c}=V(`/sites/pachon-tololo/terrain/2048/terrain-${t}-${r}.glb`),o=u.useMemo(()=>{const l=s.Node.geometry.clone();return new T().bend(l,"z",-1/a),l},[s,a]);return e.jsx("group",{...n,dispose:null,children:e.jsx("mesh",{castShadow:!0,receiveShadow:!0,geometry:o,material:c.default})})}function C({width:t=1,height:r=1,radius:a,widthSegments:n,heightSegments:s}){n||(n=Math.max(t,1)),s||(s=Math.max(r,1));const c=u.useMemo(()=>{const o=new T,l=new H(t,r,n,s);return o.bend(l,"y",-1/a),l},[t,r,n,s,a]);return e.jsx("primitive",{attach:"geometry",object:c})}const $=({radius:t=1e3,width:r=.3,feather:a=.1,density:n=1})=>{const s=Math.PI*t,c=b("/sites/pachon-tololo/gradient.png"),o=b("/sites/pachon-tololo/gradient-end.png");return e.jsxs(e.Fragment,{children:[e.jsx(m,{position:[-s/2,0,0],radius:t,children:e.jsxs("mesh",{"rotation-x":-90*Math.PI/180,children:[e.jsx(C,{width:s,height:r,radius:t}),e.jsx("meshBasicMaterial",{color:new y(10,10,10),side:v,alphaMap:c,transparent:!0})]})}),e.jsx(m,{position:[5*r/2,0,0],radius:t,children:e.jsxs("mesh",{"rotation-x":-90*Math.PI/180,children:[e.jsx(C,{width:5*r,height:r,radius:t}),e.jsx("meshBasicMaterial",{color:new y(10,10,10),side:v,alphaMap:o,transparent:!0})]})})]})},m=({radius:t,position:r=[0,0,0],children:a})=>{Array.isArray(r)?r=new h().fromArray(r):new h().constructor===r.constructor?r=new h().c
1opy(r):r=new h().setScalar(r);const n=r.x,s=r.y,c=r.z,o=-1/t,l=n*o,d=Math.sin(l),x=Math.cos(l);return r.x=-(s-1/o)*d,r.y=(s-1/o)*x+1/o,r.z=c,e.jsx("group",{position:r,children:e.jsx("group",{"rotation-z":-n/t,children:a})})},j=P(m);function N(){const t=u.useRef(k(86)),r=1800/934,a=S(s=>s.size),n=u.useRef(null);return u.useEffect(()=>{if(n.current){if(n.current.aspect=a.width/a.height,n.current.aspect>r){const s=Math.tan(w.degToRad(t.current/2)),c=n.current.aspect/r,o=s/c;n.current.fov=w.radToDeg(Math.atan(o))*2}else n.current.fov=t.current;n.current.updateProjectionMatrix()}},[a]),e.jsx("group",{"rotation-z":-4*Math.PI/180,children:e.jsx(I,{ref:n,makeDefault:!0,rotation:[0,-90*Math.PI/180,0]})})}function z({progress:t,render:r=!0,full:a=!0}){const{er:n,rr:s,fogRange:c,cameraScrollRange:o,ringWidth:l,ringOffsetVertical:d,ringOffsetHorizontal:x,ringOffsetForward:F,ringScrollRange:O}={fogRange:[25,96],er:3.44,rr:3.24,cameraScrollRange:[-130,-40],ringWidth:1.45,ringOffsetHorizontal:.9,ringOffsetVertical:.8,ringOffsetForward:20,ringScrollRange:[-200,108]},f=Math.pow(10,n),g=Math.pow(10,s);return e.jsxs(D,{dpr:1,style:{pointerEvents:"inherit"},children:[!r&&e.jsx(E,{}),a&&e.jsxs(e.Fragment,{children:[e.jsx("fog",{attach:"fog",color:"#C8DEF3",near:c[0],far:c[1]}),[...Array(15).keys()].map(i=>[...Array(3).keys()].map(M=>e.jsx(u.Suspense,{fallback:null,children:e.jsx("group",{scale:[15/12.5,15/12.5,15/12.5],children:e.jsx(B,{x:i+3,y:M,radius:f})})},`${i}-${M}`)))]}),e.jsxs("group",{scale:[15/12.5,15/12.5,15/12.5],children:[e.jsx(m,{position:[-2.7668,2.73955,4.21055],radius:f,children:e.jsxs(R,{className:"bottom-0 left-0 text-white font-mono font-medium text-sm w-20",distanceFactor:20,children:[e.jsx("div",{children:"Cerro Pachón"}),e.jsx("div",{children:"â¼"})]})}),e.jsx(m,{position:[.187305,2.30497,-7.06875],radius:f,children:e.jsxs(R,{className:"bottom-0 left-0 text-white font-mono font-medium text-sm w-20",distanceFactor:20,children:[e.jsx("div",{children:"Cerro Tololo"}),e.jsx("div",{children:"â¼"})]})})]}),e.jsx(j,{position:t.to([.3,.8],o).to(i=>[i,0,0]),radius:t.to([.3,.8],[3,4]).to(i=>f+i),children:e.jsxs(P.group,{position:t.to([.3,.8],[3,4]).to(i=>[0,i,0]),children:[e.jsx(N,{}),a&&e.jsx(j,{position:[F,0,0],radius:t.to([.3,.8],[3,4]).to(i=>f+i),children:e.jsx(j,{position:t.to([.3,.8],O).to(i=>[i,0,0]),radius:g-d,children:e.jsx("group",{position:[0,d,x],children:e.jsx(u.Suspense,{fallback:null,children:e.jsx($,{radius:g,width:l})})})})})]})})]})}function re(){const t=A(0);return u.useEffect(()=>{setTimeout(()=>{t.start(1,{config:{duration:2e4}})},3e3)},[]),e.jsx(z,{progress:t})}function te(){const t=p(n=>
1n.progress),r=p(n=>n.inView),a=p(n=>n.setOverlayMounted);return u.useEffect(()=>{a(!0)},[]),e.jsx(z,{progress:t,full:!1,render:r})}export{te as ApproachOverlay,B as Terrain,re as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.