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