1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,64083,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(75056),i=e.i(25234),o=e.i(28600),s=e.i(79877),a=e.i(33623),l=e.i(97202);let c=(e,t,r)=>e+(t-e)*r;function u(e,t,r){let n,i=(n=(r-e)/(t-e||1))<0?0:n>1?1:n;return i*i*(3-2*i)}function h(e,t,r,n){return c(e,t,1-Math.exp(-r*n))}function p(e){let t=43758.5453*Math.sin(127.1*e+311.7);return t-Math.floor(t)}var m=e.i(90072);let d=new m.Color(l.COLORS.cyan),f=new m.Color(l.COLORS.red),g=new m.Color(l.COLORS.green),x=Array.from({length:5},(e,t)=>{let r=t/5*Math.PI*2+.3,n=7+3*p(7*t+1),i=Math.cos(r)*n,o=Math.sin(r)*n;return new m.Vector3(i,.1,o)}),y=r.default.memo(function({progress:e}){let n=(0,r.useRef)(null),o=(0,r.useRef)([]),s=(0,r.useRef)([]),a=(0,r.useRef)([]),p=(0,r.useRef)(0),y=(0,r.useMemo)(()=>x.map(e=>{let t=[new m.Vector3(0,.15,0),new m.Vector3(.5*e.x,.6,.5*e.z),new m.Vector3(e.x,.15,e.z)];return new m.CatmullRomCurve3(t).getPoints(24)}),[]);return(0,i.useFrame)((t,r)=>{let i=e.current??0;p.current=h(p.current,i,3,r);let l=p.current,m=t.clock.elapsedTime;n.current&&(n.current.position.y=.04*Math.sin(1.2*m)),o.current.forEach((e,t)=>{e&&(e.rotation.y=m*(.8+.2*t))}),s.current.forEach((e,t)=>{if(e){let r=u(.45,.8,l);e.color.copy(f).lerp(t%2==0?d:g,r),e.opacity=c(.12,.7,r)*(.8+.2*Math.sin(4*m-.5*t))}}),a.current.forEach((e,t)=>{if(e){let r=u(.5,.82,l);e.color.copy(f).lerp(t%2==0?d:g,r),e.opacity=c(.06,.22,r)*(.85+.15*Math.sin(3*m-t))}})}),(0,t.jsxs)("group",{children:[(0,t.jsx)("gridHelper",{args:[60,48,l.COLORS.cyan,l.COLORS.cyan],position:[0,-.01,0],children:(0,t.jsx)("lineBasicMaterial",{attach:"material",color:l.COLORS.cyan,transparent:!0,opacity:.05})}),y.map((e,r)=>(0,t.jsxs)("line",{children:[(0,t.jsx)("bufferGeometry",{children:(0,t.jsx)("float32BufferAttribute",{attach:"attributes-position",args:[new Float32Array(e.flatMap(e=>[e.x,e.y,e.z])),3]})}),(0,t.jsx)("lineBasicMaterial",{ref:e=>{s.current[r]=e},transparent:!0,opacity:.15,depthWrite:!1})]},`corr${r}`)),(0,t.jsxs)("group",{ref:n,position:[0,0,0],children:[(0,t.jsxs)("mesh",{position:[0,.35,0],children:[(0,t.jsx)("boxGeometry",{args:[2.2,.7,1.8]}),(0,t.jsx)("meshBasicMaterial",{color:l.COLORS.ink})]}),(0,t.jsxs)("mesh",{position:[0,.35,0],children:[(0,t.jsx)("boxGeometry",{args:[2.2,.7,1.8]}),(0,t.jsx)("meshBasicMaterial",{color:l.COLORS.cyan,wireframe:!0,transparent:!0,opacity:.65})]}),[-.6,0,.6].map((e,r)=>(0,t.jsxs)("mesh",{position:[e,.18,.91],children:[(0,t.jsx)("boxGeometry",{args:[.3,.35,.06]}),(0,t.jsx)("meshBasicMaterial",{color:l.COLORS.cyan,transparent:!0,opacity:.8})]},r)),(0,t.jsxs)("mesh",{position:[0,.85,0],children:[(0,t.jsx)("boxGeometry",{args:[1.2,.3,1]}),(0,t.jsx)("meshBasicMaterial",{color:l.COLORS.cyan,transparent:!0,opacity:.15})]}),(0,t.jsxs)("mesh",{position:[0,.85,0],children:[(0,t.jsx)("boxGeometry",{args:[1.2,.3,1]}),(0,t.jsx)("meshBasicMaterial",{color:l.COLORS.cyan,wireframe:!0,transparent:!0,opacity:.9})]}),[-.4,.4].map((e,r)=>(0,t.jsxs)("mesh",{position:[e,.71,-.4],rotation:[.15,0,0],children:[(0,t.jsx)("boxGeometry",{args:[.5,.03,.6]}),(0,t.jsx)("meshBasicMaterial",{color:"#1e293b"})]},r)),(0,t.jsxs)("group",{position:[0,1,0],children:[(0,t.jsxs)("mesh",{position:[0,.4,0],children:[(0,t.jsx)("cylinderGeometry",{args:[.03,.03,.8,8]}),(0,t.jsx)("meshBasicMaterial",{color:l.COLORS.cyan})]}),(0,t.jsxs)("mesh",{position:[0,.8,0],children:[(0,t.jsx)("sphereGeometry",{args:[.12,16,16]}),(0,t.jsx)("meshBasicMaterial",{color:"#ffffff"})]})]}),(0,t.jsxs)("mesh",{rotation:[-Math.PI/2,0,0],position:[0,.02,0],children:[(0,t.jsx)("ringGeometry",{args:[1.8,2.2,32]}),(0,t.jsx)("meshBasicMaterial",{color:l.COLORS.cyan,transparent:!0,opacity:.3,blending:m.AdditiveBlending})]})]})]})}),j=new m.Vector3(0,.5,0);function M(e){return new m.CatmullRomCurve3(e,!1,"catmullrom",.5)}let v=null;function O(){if(v)return v;let e=[],t=[];for(let r=0;r<5;r++){let n=r/5*Math.PI*2+.3,i=7+3*p(7*r+1),o=Math.cos(n)*i,s=Math.sin(n)*i,a=2+Math.floor(2*p(7*r+2)),l=[j.clone()];l.push(new m.Vector3(.35*o,.45+1.4,.35*s));let c=[];for(let e=0;e<a;e++){let n=(p(31*r+5*e+3)-.5)*3.2,i=(p(31*r+5*e+4)-.5)*3.2,a=new m.Vector3(o+n,.45,s+i);c.push(a),t.push(a),l.push(a.clone())}e.push({curve:M(l),nodes:c})}let r=[],n=[];for(let e=0;e<6;e++){let t=4+Math.floor(3*p(13*e+1)),i=[j.clone()],o=p(13*e+2)*Math.PI*2,s=[];for(let r=0;r<t;r++){o+=(p(13*e+3*r+3)-.5)*2.6;let a=2.6+6.4*p(13*e+3*r+4),l=Math.cos(o)*a+(p(17*e+r)-.5)*2.6,c=Math.sin(o)*a+(p(19*e+r)-.5)*2.6,u=.45+1.1*p(23*e+r),h=new m.Vector3(l,u,c);if(i.push(h),r===t-1){let e=new m.Vector3(l,.45,c);n.push(e),s.push(e)}}r.push({curve:M(i),nodes:s})}return v={chaotic:r,optimized:e,chaosNodes:n,optimizedNodes:t}}let R=r.default.memo(function({position:e,color:n,maxScale:o=2.2,pulseSpeed:s=2.4}){let a=(0,r.useRef)(null),l=(0,r.useRef)(null);return(0,i.useFrame)(e=>{if(!a.current||!l.current)return;let t=s/4*e.clock.elapsedTime%1;a.current.scale.setScalar(.4+t*(o-.4)),l.current.opacity=.72*Math.sin((1-t)*Math.PI)}),(0,t.jsxs)("mesh",{ref:a,position:[e.x,.03,e.z],rotation:[-Math.PI/2,0,0],children:[(0,t.jsx)("ringGeometry",{args:[.22,.28,24]}),(0,t.jsx)("meshBasicMaterial",{ref:l,color:n,transparent:!0,opacity:0,depthWrite:!1,blending:m.AdditiveBlending})]})}),S=new m.Vector3,b=new m.Vector3,A=r.default.memo(function({progress:e,chaoticCurves:n}){let o=4*n.length,s=(0,r.useRef)([]),a=(0,r.useRef)([]),c=(0,r.useMemo)(()=>Array.from({length:o},(e,t)=>p(13*t+3)),[o]),h=(0,r.useMemo)(()=>Array.from({length:2*n.length},(e,t)=>t%2/2),[n.length]);return(0,i.useFrame)(t=>{let r=1-u(.48,.6,e.current??0),i=r>.01;if(s.current.forEach(e=>{e&&(e.visible=i)}),a.current.forEach(e=>{e&&(e.visible=i)}),!i)return;let l=t.clock.elapsedTime;for(let e=0;e<o;e++){let t=s.current[e];if(!t)continue;let i=n[Math.floor(e/4)],o=.05+.03*p(9*e),a=(c[e]+l*o)%1;i.getPointAt(a,S),t.position.copy(S),t.material.opacity=.6*r*Math.sin(a*Math.PI)}for(let e=0;e<2*n.length;e++){let t=a.current[e];if(!t)continue;let i=n[Math.floor(e/2)],o=(h[e]+.04*l)%1;i.getPointAt(o,S),i.getTangentAt(o,b),t.position.copy(S),t.rotation.y=Math.atan2(b.x,b.z),t.traverse(e=>{let t=e.material;t&&"opacity"in t&&(t.opacity=.5*r*Math.sin(o*Math.PI))})}}),(0,t.jsxs)("group",{children:[Array.from({length:o}).map((e,r)=>(0,t.jsxs)("mesh",{ref:e=>{s.current[r]=e},visible:!1,children:[(0,t.jsx)("sphereGeometry",{args:[.06,6,6]}),(0,t.jsx)("meshBasicMaterial",{color:l.COLORS.red,transparent:!0,opacity:0,depthWrite:!1,blending:m.AdditiveBlending})]},`cp-${r}`)),Array.from({length:2*n.length}).map((e,r)=>(0,t.jsx)("group",{ref:e=>{a.current[r]=e},visible:!1,children:(0,t.jsxs)("mesh",{rotation:[Math.PI/2,0,0],children:[(0,t.jsx)("coneGeometry",{args:[.06,.16,4]}),(0,t.jsx)("meshBasicMaterial",{color:l.COLORS.red,transparent:!0,opacity:0,depthWrite:!1,blending:m.AdditiveBlending})]})},`cc-${r}`))]})}),B=new m.Vector3,C=new m.Vector3,L=r.default.memo(function({progress:e,optimizedCurves:n}){let o=6*n.length,s=(0,r.useRef)([]),a=(0,r.useRef)([]),c=(0,r.useRef)([]),h=(0,r.useMemo)(()=>Array.from({length:o},(e,t)=>p(17*t+4)),[o]),d=(0,r.useMemo)(()=>Array.from({length:3*n.length},(e,t)=>t%3/3),[n.length]);return(0,i.useFrame)(t=>{let r=u(.52,.7,e.current??0),i=r>.01;if(s.current.forEach(e=>{e&&(e.visible=i)}),a.current.forEach(e=>{e&&(e.visible=i)}),c.current.forEach(e=>{e&&(e.visible=i)}),!i)return;let l=t.clock.elapsedTime;for(let e=0;e<o;e++){let t=s.current[e];if(!t)continue;let i=n[Math.floor(e/6)],o=.08+.04*p(11*e),a=(h[e]+l*o)%1;i.getPointAt(a,B),t.position.copy(B),t.material.opacity=.75*r*Math.sin(a*Math.PI);let c=.04+.012*Math.sin(6*l+e);t.scale.setScalar(c/.05)}for(let e=0;e<3*n.length;e++){let t=a.current[e];if(!t)continue;let i=n[Math.floor(e/3)],o=(d[e]+.16*l)%1;i.getPointAt(o,B),i.getTangentAt(o,C),t.position.copy(B),t.rotation.y=Math.atan2(C.x,C.z),t.rotation.x=Math.atan2(C.y,Math.sqrt(C.x*C.x+C.z*C.z))-Math.PI/2,t.traverse(e=>{let t=e.material;t&&"opacity"in t&&(t.opacity=.85*r*Math.sin(o*Math.PI))})}for(let e=0;e<n.length;e++){let t=c.current[e];if(!t)continue;let i=n[e],o=(.55*l+.2*e)%1;i.getPointAt(o,B),t.position.copy(B),t.material.opacity=.9*r*Math.sin(o*Math.PI);let s=.08+.02*Math.sin(12*l+e);t.scale.setScalar(s/.07)}}),(0,t.jsxs)("group",{children:[Array.from({length:o}).map((e,r)=>{let n=Math.floor(r/6)%2==0?l.COLORS.cyan:l.COLORS.green;return(0,t.jsxs)("mesh",{ref:e=>{s.current[r]=e},visible:!1,children:[(0,t.jsx)("sphereGeometry",{args:[.05,8,8]}),(0,t.jsx)("meshBasicMaterial",{color:n,transparent:!0,opacity:0,depthWrite:!1,blending:m.AdditiveBlending})]},`op-${r}`)}),Array.from({length:3*n.length}).map((e,r)=>{let n=Math.floor(r/3)%2==0?l.COLORS.cyan:l.COLORS.green;return(0,t.jsx)("group",{ref:e=>{a.current[r]=e},visible:!1,children:(0,t.jsxs)("mesh",{rotation:[Math.PI/2,0,0],children:[(0,t.jsx)("coneGeometry",{args:[.07,.2,4]}),(0,t.jsx)("meshBasicMaterial",{color:n,transparent:!0,opacity:0,depthWrite:!1,blending:m.AdditiveBlending})]})},`oc-${r}`)}),n.map((e,r)=>{let n=r%2==0?l.COLORS.cyan:l.COLORS.green;return(0,t.jsxs)("mesh",{ref:e=>{c.current[r]=e},visible:!1,children:[(0,t.jsx)("sphereGeometry",{args:[.07,12,12]}),(0,t.jsx)("meshBasicMaterial",{color:n,transparent:!0,opacity:0,depthWrite:!1,blending:m.AdditiveBlending})]},`pulse-${r}`)})]})}),w=r.default.memo(function({progress:e,reduced:n=!1,isMobile:o=!1}){let{chaotic:s,optimized:a,chaosNodes:c,optimizedNodes:h}=(0,r.useMemo)(()=>O(),[]),p=(0,r.useRef)([]),d=(0,r.useRef)([]),f=(0,r.useRef)(null),g=(0,r.useRef)(null),x=(e,t)=>{if(!e.index)return;let r=Math.max(0,36*Math.floor(e.index.count*t/36));e.setDrawRange(0,r)};return(0,i.useFrame)(t=>{let r=e.current??0,n=t.clock.elapsedTime,i=1-u(.4,.56,r),o=(1-u(.38,.55,r))*.85,s=.7+.18*Math.sin(7*n);for(let e of p.current)e?.geo&&(x(e.geo,i),e.mat&&(e.mat.opacity=o*s));let a=u(.55,.74,r),l=u(.55,.66,r);for(let e=0;e<d.current.length;e++){let t=d.current[e];if(t?.geo&&(x(t.geo,a),t.mat)){let r=.52+.12*Math.sin(3*n-.7*e);t.mat.opacity=l*r}}if(f.current){let e=1e-4+(1-u(.4,.55,r));f.current.scale.setScalar(e)}if(g.current){let e=u(.6,.82,r),t=e*(1+.06*Math.sin(4*n)*e);g.current.scale.setScalar(1e-4+t)}}),(0,t.jsxs)("group",{children:[s.map((e,r)=>(0,t.jsxs)("mesh",{frustumCulled:!1,children:[(0,t.jsx)("tubeGeometry",{ref:e=>{e&&(p.current[r]={...p.current[r]??{},geo:e})},args:[e.curve,120,.08,6,!1]}),(0,t.jsx)("meshBasicMaterial",{ref:e=>{e&&(p.current[r]={...p.current[r]??{},mat:e})},color:l.COLORS.red,transparent:!0,opacity:.85,depthWrite:!1,blending:n?m.NormalBlending:m.AdditiveBlending})]},`c${r}`)),a.map((e,r)=>(0,t.jsxs)("mesh",{frustumCulled:!1,children:[(0,t.jsx)("tubeGeometry",{ref:e=>{e&&(d.current[r]={...d.current[r]??{},geo:e})},args:[e.curve,120,.1,6,!1]}),(0,t.jsx)("meshBasicMaterial",{ref:e=>{e&&(d.current[r]={...d.current[r]??{},mat:e})},color:r%2==0?l.COLORS.cyan:l.COLORS.green,transparent:!0,opacity:0,depthWrite:!1,blending:n?m.NormalBlending:m.AdditiveBlending})]},`o${r}`)),(0,t.jsx)("group",{ref:f,children:c.map((e,r)=>(0,t.jsxs)("group",{children:[(0,t.jsxs)("mesh",{position:e,children:[(0,t.jsx)("sphereGeometry",{args:[.18,12,12]}),(0,t.jsx)("meshBasicMaterial",{color:l.COLORS.red,transparent:!0,opacity:.9,blending:m.AdditiveBlending})]}),(0,t.jsx)(R,{position:e,color:l.COLORS.red})]},`cn-group-${r}`))}),(0,t.jsx)("group",{ref:g,scale:1e-4,children:h.map((e,r)=>(0,t.jsxs)("group",{children:[(0,t.jsxs)("mesh",{position:e,children:[(0,t.jsx)("sphereGeometry",{args:[.15,14,14]}),(0,t.jsx)("meshBasicMaterial",{color:l.COLORS.green,transparent:!0,opacity:.95,blending:m.AdditiveBlending})]}),(0,t.jsx)(R,{position:e,color:l.COLORS.green,maxScale:1.8,pulseSpeed:3})]},`on-group-${r}`))}),!o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A,{progress:e,chaoticCurves:s.map(e=>e.curve)}),(0,t.jsx)(L,{progress:e,optimizedCurves:a.map(e=>e.curve)})]})]})}),P=new m.Vector3,G=new m.Vector3,E=new m.Vector3,T=r.default.memo(function({texture:e,tint:r,width:n,aspect:i}){let o=n/i;return(0,t.jsxs)("mesh",{position:[0,o/2.4,0],children:[(0,t.jsx)("planeGeometry",{args:[n,o]}),(0,t.jsx)("meshBasicMaterial",{map:e,color:r,transparent:!0,depthWrite:!1,side:m.DoubleSide,toneMapped:!1})]})}),k=new m.Vector3(0,.5,0),z=r.default.memo(function({progress:e,reduced:n=!1}){let{chaotic:o,optimized:s}=(0,r.useMemo)(()=>O(),[]),a=["truck","van","bike"],c=(0,r.useMemo)(()=>Array.from({length:7},(e,t)=>({curve:o[t%o.length].curve,type:a[t%3],speed:.018+.03*p(5*t+1),offset:p(5*t+2),color:l.COLORS.red,nodes:o[t%o.length].nodes||[]})),[o]),h=(0,r.useMemo)(()=>Array.from({length:5},(e,t)=>({curve:s[t%s.length].curve,type:a[t%3],speed:.05+.025*p(7*t+1),offset:p(7*t+2),color:t%2==0?l.COLORS.cyan:l.COLORS.green,nodes:s[t%s.length].nodes||[]})),[s]),d=(0,r.useRef)([]),f=(0,r.useRef)([]),g=(0,r.useRef)([]),x=(0,r.useMemo)(()=>{let e=new m.TextureLoader().load("/images/truck.png");return e.colorSpace=m.SRGBColorSpace,e.anisotropy=8,e},[]),y=1080/948,j=(0,r.useRef)([]),M=(0,r.useRef)([]),v=(e,t,r,n,i,o)=>{if(!e||!t?.curve)return;let s=o>.02;if(e.visible=s,!s)return;let a=r[n];(void 0===a||Number.isNaN(a))&&(a=r[n]=t.offset??0),t.curve.getPointAt(a,P);let l=P.distanceTo(k);t.nodes&&t.nodes.length>0&&t.nodes.forEach(e=>{let t=P.distanceTo(e);t<l&&(l=t)});let c=.2+1.05*u(.4,2.5,l);a=(a+i*t.speed*c)%1,r[n]=a,t.curve.getPointAt(a,P),t.curve.getTangentAt(a,G),e.position.copy(P),e.rotation.y=Math.atan2(G.x,G.z),e.traverse(e=>{let t=e.material;t&&"opacity"in t&&(t.opacity=o*R(e))})},R=e=>{let t=e.material;return!t||t.map||t.wireframe||t.color&&0xffffff===t.color.getHex()||t.color&&0xef4444===t.color.getHex()?1:.2};return(0,i.useFrame)((t,r)=>{j.current.length!==c.length&&(j.current=c.map(e=>e.offset)),M.current.length!==h.length&&(M.current=h.map(e=>e.offset));let n=e.current??0,i=t.clock.elapsedTime,o=Math.min(.06,r),s=u(.1,.22,n)*(1-u(.7,.82,n))*(.85+.1*Math.sin(6*i)),a=u(.68,.82,n),l=t.camera;for(let e=0;e<c.length;e++){v(d.current[e],c[e],j.current,e,o,s);let t=d.current[e];t&&t.visible&&(t.rotation.y=Math.atan2(l.position.x-t.position.x,l.position.z-t.position.z))}for(let e=0;e<h.length;e++){v(f.current[e],h[e],M.current,e,o,a);let t=f.current[e];t&&t.visible&&(t.rotation.y=Math.atan2(l.position.x-t.position.x,l.position.z-t.position.z));let r=M.current[e],n=h[e]?.curve;if(!(!n||void 0===r||Number.isNaN(r)))for(let t=0;t<16;t++){let o=g.current[16*e+t];if(!o)continue;if(a<.02){o.visible=!1;continue}let s=r-(t+1)*.011;s<0&&(s=0),o.visible=!0,n.getPointAt(s,E),o.position.copy(E);let l=1-t/16,c=.05+.13*l;o.scale.setScalar(c/.1),o.material.opacity=a*l*l*(.65+.35*Math.sin(9*i-.7*t))}}}),(0,t.jsxs)("group",{children:[c.map((e,r)=>(0,t.jsx)("group",{ref:e=>{d.current[r]=e},children:(0,t.jsx)(T,{texture:x,tint:"#ff5a5a",width:1.61,aspect:y})},`cv${r}`)),h.map((e,r)=>(0,t.jsx)("group",{visible:!1,ref:e=>{f.current[r]=e},children:(0,t.jsx)(T,{texture:x,tint:"#d7dce4",width:1.75,aspect:y})},`ov${r}`)),h.map((e,r)=>Array.from({length:16},(i,o)=>(0,t.jsxs)("mesh",{visible:!1,ref:e=>{g.current[16*r+o]=e},children:[(0,t.jsx)("sphereGeometry",{args:[.1,8,8]}),(0,t.jsx)("meshBasicMaterial",{color:e.color,transparent:!0,opacity:0,depthWrite:!1,blending:n?m.NormalBlending:m.AdditiveBlending})]},`ot-${r}-${o}`)))]})}),V=r.default.memo(function({offset:e,index:n,progress:o,color:s}){let a=(0,r.useRef)(null),l=(0,r.useRef)(null),c=(0,r.useRef)([]),h=(0,r.useMemo)(()=>Array.from({length:3},(e,t)=>t/3),[]);(0,i.useFrame)(t=>{let r=o.current??0,i=t.clock.elapsedTime,s=u(.2,.4,r)*(1-u(.72,.85,r)),m=s>.01;a.current&&(a.current.visible=m),l.current&&m&&(l.current.opacity=s*(.15+.08*Math.sin(12*i+n))),c.current.forEach((t,r)=>{if(!t||(t.visible=m,!m))return;let o=.8+.4*p(5*n+r),a=(h[r]+o/3*i)%1;t.position.copy(e).multiplyScalar(a),t.material.opacity=s*Math.sin(a*Math.PI)*.8;let l=.04+.015*Math.sin(8*i+r);t.scale.setScalar(l/.06)})});let d=(0,r.useMemo)(()=>{let t=new m.BufferGeometry,r=new Float32Array([0,0,0,e.x,e.y,e.z]);return t.setAttribute("position",new m.BufferAttribute(r,3)),t},[e]);return(0,t.jsxs)("group",{children:[(0,t.jsx)("lineSegments",{ref:a,geometry:d,children:(0,t.jsx)("lineBasicMaterial",{ref:l,color:s,transparent:!0,opacity:0,depthWrite:!1,blending:m.AdditiveBlending})}),Array.from({length:3}).map((e,r)=>(0,t.jsxs)("mesh",{ref:e=>{c.current[r]=e},visible:!1,children:[(0,t.jsx)("sphereGeometry",{args:[.06,8,8]}),(0,t.jsx)("meshBasicMaterial",{color:s,transparent:!0,opacity:0,depthWrite:!1,blending:m.AdditiveBlending})]},r))]})}),I=r.default.memo(function({progress:e}){let n=(0,r.useRef)(null),o=(0,r.useMemo)(()=>Array.from({length:5},(e,t)=>{let r=t/5*Math.PI*2+.3,n=7+3*p(7*t+1),i=Math.cos(r)*n,o=Math.sin(r)*n;return new m.Vector3(i,-3.3,o)}),[]);return(0,i.useFrame)(e=>{let t=e.clock.elapsedTime;n.current&&(n.current.position.y=3.4+.12*Math.sin(.8*t))}),(0,t.jsxs)("group",{ref:n,position:[0,3.4,0],children:[(0,t.jsxs)("mesh",{children:[(0,t.jsx)("sphereGeometry",{args:[.06,12,12]}),(0,t.jsx)("meshBasicMaterial",{color:l.COLORS.green,blending:m.AdditiveBlending})]}),o.map((r,n)=>(0,t.jsx)(V,{offset:r,index:n,progress:e,color:n%2==0?l.COLORS.cyan:l.COLORS.green},`calc-beam-${n}`))]})}),$={radiusStart:17,radiusEnd:13,heightStart:9,heightEnd:6.5,lookAtY:2.4,fov:50},W={radiusStart:19,radiusEnd:15,heightStart:9.5,heightEnd:7,lookAtY:2.6,fov:54},F={radiusStart:22,radiusEnd:18,heightStart:11,heightEnd:8,lookAtY:3,fov:62};function N({progress:e,framing:t}){let n=(0,r.useRef)(0),s=(0,o.useThree)(e=>e.camera);return(0,r.useEffect)(()=>{"fov"in s&&(s.fov=t.fov,s.updateProjectionMatrix())},[s,t.fov]),(0,i.useFrame)((r,i)=>{let o=e.current??0;n.current=h(n.current,o,1.5,i);let s=n.current,a=r.clock.elapsedTime,l=c(t.radiusStart,t.radiusEnd,s),u=c(-.5,.45,s)+.02*a,p=c(t.heightStart,t.heightEnd,s)+.3*Math.sin(.4*a),m=r.camera;m.position.x=Math.sin(u)*l,m.position.z=Math.cos(u)*l,m.position.y=p,m.lookAt(0,t.lookAtY,0)}),null}let Y=r.default.memo(function({progress:e,reduced:r=!1,isMobile:i=!1,isTablet:o=!1,active:c=!0}){let u=i?F:o?W:$;return(0,t.jsxs)(n.Canvas,{flat:!0,dpr:[1,i||r?1.25:1.5],camera:{position:[0,u.heightStart,u.radiusStart],fov:u.fov,near:.1,far:120},gl:{antialias:!i,powerPreference:"high-performance",alpha:!1},frameloop:c?"always":"never",children:[(0,t.jsx)("color",{attach:"background",args:[l.COLORS.bg]}),(0,t.jsx)("fog",{attach:"fog",args:[l.COLORS.bg,18,52]}),(0,t.jsx)("ambientLight",{intensity:.6}),(0,t.jsx)(N,{progress:e,framing:u}),(0,t.jsx)(y,{progress:e,count:i?48:90,reduced:r}),(0,t.jsx)(w,{progress:e,reduced:r,isMobile:i}),(0,t.jsx)(z,{progress:e,reduced:r}),(0,t.jsx)(I,{progress:e,reduced:r}),!r&&(0,t.jsx)(s.EffectComposer,{multisampling:2*!i,children:(0,t.jsx)(s.Bloom,{mipmapBlur:!0,intensity:i?.5:1,luminanceThreshold:.15,luminanceSmoothing:.04,radius:i?.55:.75,kernelSize:a.KernelSize.MEDIUM})})]})});e.s(["default",0,Y],64083)},29539,e=>{e.n(e.i(64083))}]); |