1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3711],{93711:function(e,n,t){t.r(n),t.d(n,{KraitScene:function(){return d}});var i=t(57437),a=t(36496),r=t(22288),o=t(82357),s=t(2265),l=t(53871),u=t(51448);let m={"idle-coil":{ampX:1.2,ampY:.3,freqX:.15,freqY:.25,phaseSpread:.8},slither:{ampX:1.5,ampY:.25,freqX:.25,freqY:.15,phaseSpread:1.2},active:{ampX:1.6,ampY:.4,freqX:.3,freqY:.25,phaseSpread:1},alert:{ampX:1,ampY:.5,freqX:.4,freqY:.35,phaseSpread:.6}};class c{update(e,n,t,i,a,r){let o=m[t],s=e*n;for(let e=0;e<10;e++){let n=this.basePoints[e],t=e*o.phaseSpread;if(this.points[e].x=n.x+Math.sin(s*o.freqX+t)*o.ampX*.1,this.points[e].y=n.y+Math.cos(s*o.freqY+1.3*t)*o.ampY*.15,this.points[e].z=n.z+.1*Math.sin(.4*s+.7*t),e<3){let n=r*(1-e/3);this.points[e].x+=i*n*.8,this.points[e].y+=a*n*.4}}this.curve=new u.CatmullRomCurve3(this.points,!1,"catmullrom",.5)}constructor(){this.points=[],this.basePoints=[];for(let e=0;e<10;e++){let n=e/9,t=(n-.5)*10,i=.8*Math.sin(n*Math.PI*2)-1.5,a=-8+.5*Math.cos(n*Math.PI);this.points.push(new u.Vector3(t,i,a)),this.basePoints.push(new u.Vector3(t,i,a))}this.curve=new u.CatmullRomCurve3(this.points,!1,"catmullrom",.5)}}var v=t(77884);function p(e){let{mouse:n,tubeSegments:t=200,radialSegments:a=12}=e,r=(0,v.h)(),o=(0,s.useRef)(null),m=(0,s.useMemo)(()=>new c,[]),p=(0,s.useMemo)(()=>new u.ShaderMaterial({vertexShader:"\n varying vec2 vUv;\n varying vec3 vNormal;\n varying vec3 vViewPosition;\n\n void main() {\n vUv = uv;\n vNormal = normalize(normalMatrix * normal);\n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n vViewPosition = -mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n }\n",fragmentShader:"\n uniform float uTime;\n varying vec2 vUv;\n varying vec3 vNormal;\n varying vec3 vViewPosition;\n\n void main() {\n // Band pattern along tube length (~25 bands)\n float bandFreq = 25.0;\n float bandRaw = sin(vUv.x * bandFreq * 3.14159);\n float band = smoothstep(0.3, 0.5, bandRaw);\n\n // Base color (near-black with blue tint)\n vec3 baseColor = vec3(0.008, 0.051, 0.055);\n // Band color (brand teal #13B7C1)\n vec3 bandColor = vec3(0.075, 0.718, 0.757);\n\n // Subtle pulsing on bands\n float pulse = 0.85 + 0.15 * sin(uTime * 1.2);\n vec3 color = mix(baseColor, bandColor * pulse * 0.5, band);\n\n // Subtle Fresnel rim glow\n vec3 viewDir = normalize(vViewPosition);\n float fresnel = pow(1.0 - abs(dot(viewDir, vNormal)), 2.5);\n color += bandColor * fresnel * 0.12;\n\n // Mild emission for bloom pickup\n float emission = band * pulse * 0.6 + fresnel * 0.3;\n\n gl_FragColor = vec4(color * (1.0 + emission * 0.2), 1.0);\n }\n",uniforms:{uTime:{value:0}},side:u.DoubleSide}),[]),d=(0,s.useMemo)(()=>new u.TubeGeometry(m.curve,t,.04,a,!1),[m,t,a]);(0,s.useRef)(null);let h=(0,s.useCallback)(()=>{if(!o.current)return;let e=new u.TubeGeometry(m.curve,t,.04,a,!1),n=e.attributes.position,i=d.attributes.position;if(n.count===i.count){i.copyArray(n.array),i.needsUpdate=!0;let t=e.attributes.normal,a=d.attributes.normal;t&&a&&t.count===a.count&&(a.copyArray(t.array),a.needsUpdate=!0)}e.dispose()},[m,d,t,a]);return(0,l.F)(e=>{let{clock:t}=e,i=t.getElapsedTime();m.update(i,r.speed,r.behavior,n.current.x,n.current.y,r.mouseInfluence),h(),p.uniforms.uTime.value=i}),(0,i.jsx)("mesh",{ref:o,geometry:d,material:p})}function d(e){let{tubeSegments:n=200,radialSegments:t=12,enableBloom:l=!0}=e,u=(0,v.h)(),{visible:m}=function(){let[e,n]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{let e=()=>n(!document.hidden);return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),{visible:e}}(),c=function(){let e=(0,s.useRef)({x:0,y:0});return(0,s.useEffect)(()=>{let n=n=>{e.current={x:n.clientX/window.innerWidth*2-1,y:-(n.clientY/window.innerHeight*2)+1}};return window.addEventListener("mousemove",n,{passive:!0}),()=>window.removeEventListener("mousemove",n)},[]),e}();return(0,i.jsx)("div",{className:"krait-layer",style:{opacity:u.opacity},children:(0,i.jsxs)(a.Xz,{frameloop:m?"always":"never",dpr:u.maxDpr?[1,u.maxDpr]:[1,2],camera:{position:[0,0,6],fov:50},gl:{antialias:!1,alpha:!0},style:{background:"transparent"},children:[(0,i.jsx)("ambientLight",{intensity:.3}
1),(0,i.jsx)(p,{mouse:c,tubeSegments:n,radialSegments:t}),l&&(0,i.jsx)(r.x,{children:(0,i.jsx)(o.d,{intensity:.5,luminanceThreshold:.5,luminanceSmoothing:.9,mipmapBlur:!0})})]})})}}}]);
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.