PageSourceSearch

https://maieutic.ca/assets/TubesTwoStreaksLogoLightSavedSandboxRoute-DTJcSsD0.js

js maieutic.ca collected 2026-09-24 11:41:18 UTC 8,950 bytes, 1 lines download raw bytes

1import{R as S,j as p,h as oe}from"./index-Dg-VAw7j.js";import{G as ie,E as ce,g as le,D as de,e as ue,v as fe,m as he,o as me,W as ge,q as X,d as xe,p as be,V as E,a as pe,u as we,P as ye}from"./three.module-CTDbhDYp.js";import{o as Re}from"./tubesCursorEffect-HzNzKpXM.js";const ve="0 0 3529.5 3529.499861",Me=[{id:"amber",fill:"#ffbf23",transform:"translate(495, 934)",d:"M 391.773438 -15.359375 L 887.003906 113.25 L 479.570312 1682.125 L -15.660156 1553.515625 Z"},{id:"red",fill:"#ff4017",transform:"translate(1173, 928)",d:"M 391.738281 -15.4375 L 910.367188 119.25 L 503.148438 1687.296875 L -15.480469 1552.609375 Z"},{id:"blue",fill:"#00ace5",transform:"translate(1888, 934)",d:"M 391.921875 -15.28125 L 886.84375 113.25 L 479.664062 1681.148438 L -15.257812 1552.621094 Z"},{id:"white",fill:"#ffffff",transform:"translate(2678, 2208)",d:"M 0.722656 0.125 L 370.992188 0.125 L 370.992188 381.96875 L 0.722656 381.96875 Z"}],[,,te,_e]=ve.split(/\s+/).map(Number),Le=3.05*.5,Y=Le/te,Te=.045,Se=.032,U=.055,Oe=a=>{const t=/translate\(([-\d.]+),\s*([-\d.]+)\)/.exec(a);return{x:t?Number(t[1]):0,y:t?Number(t[2]):0}},Ee=(a,t)=>({x:(a-te/2)*Y,y:(_e/2-t)*Y}),F=(a,t)=>Math.hypot(a.x-t.x,a.y-t.y),Z=(a,t,r)=>{const e=F(a,t);if(e===0)return a;const n=Math.min(r,e)/e;return{x:a.x+(t.x-a.x)*n,y:a.y+(t.y-a.y)*n}},Ae=(a,t)=>{const r=a.id==="white"?Se:Te;return t.map((e,n)=>{const i=t[(n-1+t.length)%t.length]??e,o=t[(n+1)%t.length]??e,d=Math.min(r,F(e,i)*.42,F(e,o)*.42);return{corner:e,start:Z(e,i,d),end:Z(e,o,d)}})},Ce=a=>{var d;const t=Oe(a.transform),r=((d=a.d.match(/-?\d+(?:\.\d+)?/g))==null?void 0:d.map(Number))??[],e=[];for(let h=0;h<r.length;h+=2){const l=r[h],u=r[h+1];typeof l!="number"||typeof u!="number"||e.push(Ee(l+t.x,u+t.y))}const n=new fe;if(e.length<3)return n;const i=Ae(a,e),o=i[0];if(!o)return n;n.moveTo(o.end.x,o.end.y);for(let h=1;h<i.length;h+=1){const l=i[h];l&&(n.lineTo(l.start.x,l.start.y),n.quadraticCurveTo(l.corner.x,l.corner.y,l.end.x,l.end.y))}return n.lineTo(o.start.x,o.start.y),n.quadraticCurveTo(o.corner.x,o.corner.y,o.end.x,o.end.y),n.closePath(),n},Ne=()=>{const a=new ie,t=[],r=[];return Me.forEach((e,n)=>{const i=new ce(Ce(e),{depth:U,bevelEnabled:!0,bevelSize:.012,bevelThickness:.018,bevelSegments:4,curveSegments:10});i.translate(0,0,-U/2),i.computeVertexNormals();const o=new le({color:e.fill,emissive:"#02050a",emissiveIntensity:e.id==="white"?.012:.006,metalness:e.id==="white"?.08:.14,roughness:e.id==="white"?.46:.52,side:de}),d=new ue(i,o);d.position.z=n*.01,a.add(d),t.push(i),r.push(o)}),{group:a,dispose:()=>{t.forEach(e=>e.dispose()),r.forEach(e=>e.dispose())}}},De="/demo/tubes-two-streaks-logo-light-saved",N=Re,Be=()=>{try{return!1}catch{return!1}},K={bloom:{threshold:0,strength:1.44,radius:.46},sleepRadiusX:310,sleepRadiusY:138,tubes:{colors:["#ffbf23","#ff4017","#ff7bd5"],minRadius:.007,maxRadius:.027,minTubularSegments:64,maxTubularSegments:108,count:7,lerp:.56,noise:.028,lights:{intensity:205,colors:["#ffbf23","#ff4017","#ff7bd5","#ffffff"]}}},q={bloom:{threshold:0,strength:1.34,radius:.42},sleepRadiusX:290,sleepRadiusY:130,tubes:{colors:["#00ace5","#5bf5ff","#ffffff"],minRadius:.006,maxRadius:.024,minTubularSegments:64,maxTubularSegments:104,count:7,lerp:.54,noise:.026,lights:{intensity:190,colors:["#00ace5","#5bf5ff","#ffbf23","#ffffff"]}}},Q={WebkitMaskImage:"radial-gradient(ellipse 30% 45% at 50% 50%, #000 0 58%, rgba(0,0,0,0.72) 70%, transparent 100%)",maskImage:"radial-gradient(ellipse 30% 45% at 50% 50%, #000 0 58%, rgba(0,0,0,0.72) 70%, transparent 100%)",mixBlendMode:"screen"},ke=.82,J=42,$=38,ee=(a,t,r,e={})=>{var I;const n=new we,i=new pe,o=new ye,d=new E,h=new E(0,0,0),l=new E,u=t.three.onBeforeRender,w=e.foregroundApps??[],M=w.map(s=>({app:s,onBeforeRender:s.three.onBeforeRender})),g=()=>typeof performance<"u"?performance.now():Date.now(),y=(s,c)=>s+Math.random()*(c-s),R=(s,c,T)=>Math.max(c,Math.min(T,s)),O=(s,c)=>Math.hypot(s.x-c.x,s.y-c.y),f=s=>{let c=s;for(let T=0;
1T<8&&(c={x:y(r.bounds.xMin,r.bounds.xMax),y:y(r.bounds.yMin,r.bounds.yMax)},!(O(s,c)>.28));T+=1);return c},m=()=>y(r.durationMin,r.durationMax)*1e3,v=s=>s*s*(3-2*s);let x={...r.start},_={...r.firstTarget},b=g(),B=m(),A=e.initialForeground?1:0,C=A;const ne=()=>{A=Math.random()<.68?1-A:Math.round(Math.random())};w.forEach(s=>{s.three.onBeforeRender=()=>{}}),(I=e.onForegroundOpacity)==null||I.call(e,C);const P=(s,c,T)=>{const L=a.getBoundingClientRect();return L.width<=0||L.height<=0||(i.x=(c-L.left)/L.width*2-1,i.y=-((T-L.top)/L.height)*2+1,n.setFromCamera(i,s.three.camera),s.three.camera.getWorldDirection(d),o.setFromNormalAndCoplanarPoint(d,h),!n.ray.intersectPlane(o,l))?!1:(s.tubes.target.copy(l),!0)};return t.three.onBeforeRender=s=>{var z,V;const c=a.getBoundingClientRect();if(c.width<=0||c.height<=0){u==null||u.call(t.three,s);return}g()-b>=B&&(x={..._},_=f(x),b=g(),B=m(),ne());const L=R((g()-b)/B,0,1),k=v(L),se=Math.sin(s.elapsed*1.7+r.phase*Math.PI*2),ae=x.x+(_.x-x.x)*k,re=x.y+(_.y-x.y)*k+r.waveAmplitude*se,G=R(ae,.04,.96),D=R(re,.08,.92),W=c.left+c.width*G,j=c.top+c.height*D;if(P(t,W,j)){t.tubes.update(s),C+=(A-C)*.08,w.forEach(H=>{P(H,W,j)&&H.tubes.update(s)}),(z=e.onLight)==null||z.call(e,{x:G,y:D}),(V=e.onForegroundOpacity)==null||V.call(e,C);return}u==null||u.call(t.three,s)},()=>{t.three.onBeforeRender=u,M.forEach(({app:s,onBeforeRender:c})=>{s.three.onBeforeRender=c})}},Fe=(a,t)=>{const r=new he,e=new me(34,1,.1,100),n=new ge({canvas:a,alpha:!0,antialias:!0,powerPreference:"high-performance"}),i=Ne(),o=new X("#ffbf23",J,3.2,2.35),d=new X("#5bf5ff",$,3.05,2.35),h=new E,l=new E,u=[];e.position.set(0,0,6),n.setClearColor(0,0),n.outputColorSpace=xe,n.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),r.add(new be("#dbeafe",.018)),r.add(i.group),r.add(o),r.add(d);const w=()=>{const f=t.getBoundingClientRect(),m=Math.max(1,Math.floor(f.width)),v=Math.max(1,Math.floor(f.height));e.aspect=m/v,e.updateProjectionMatrix(),n.setSize(m,v,!1)},M=(f,m)=>{const v=e.fov*Math.PI/180,x=2*Math.tan(v/2)*e.position.z,_=x*e.aspect;m.set((f.x-.5)*_,(.5-f.y)*x,ke)},g=(f,m)=>{M(f,h),M(m,l)};g({x:.16,y:.76},{x:.84,y:.24});const y=new ResizeObserver(w);y.observe(t),u.push(()=>y.disconnect());let R=!1;const O=()=>{if(R)return;const f=performance.now()/1e3;o.position.lerp(h,.13),d.position.lerp(l,.13),o.intensity=J+Math.sin(f*2.1)*4.4,d.intensity=$+Math.cos(f*1.9)*4,n.render(r,e)};return w(),n.setAnimationLoop(O),{setLightTargets:g,dispose:()=>{R=!0,n.setAnimationLoop(null),u.forEach(f=>f()),i.dispose(),n.dispose()}}},We=()=>{const a=S.useRef(null),t=S.useRef(null),r=S.useRef(null),e=S.useRef(null),n=S.useRef(null),i=S.useRef(null);return S.useEffect(()=>{const o=i.current,d=a.current,h=t.current,l=r.current,u=e.current,w=n.current;if(!o||!d||!h||!l||!u||!w)return;let M={x:.16,y:.76},g={x:.84,y:.24};const y=Fe(w,o),R=()=>y.setLightTargets(M,g),O=N(d,K),f=N(h,q),m=N(l,K),v=N(u,q),x=ee(o,O,{start:M,firstTarget:{x:.76,y:.28},bounds:{xMin:.08,xMax:.92,yMin:.16,yMax:.84},durationMin:3.4,durationMax:6.2,waveAmplitude:.03,phase:.12},{foregroundApps:[m],initialForeground:!1,onLight:b=>{M=b,R()},onForegroundOpacity:b=>{l.style.opacity=b.toFixed(3)}}),_=ee(o,f,{start:g,firstTarget:{x:.22,y:.68},bounds:{xMin:.08,xMax:.92,yMin:.16,yMax:.84},durationMin:3.2,durationMax:5.8,waveAmplitude:.026,phase:.12},{foregroundApps:[v],initialForeground:!0,onLight:b=>{g=b,R()},onForegroundOpacity:b=>{u.style.opacity=b.toFixed(3)}});return()=>{x(),_(),O.dispose(),f.dispose(),m.dispose(),v.dispose(),y.dispose()}},[]),Be()?p.jsx("main",{className:"flex min-h-screen items-center justify-center bg-[#050a18] p-4 sm:p-8","aria-label":"Two isolated neon streaks lighting the Maieutic logo sandbox",children:p.jsx("div",{className:"w-full max-w-[1080px] overflow-hidden rounded-[34px] border border-white/10 bg-black shadow-[0_30px_100px_rgba(0,0,0,0.46)]",children:p.jsxs("div",{ref:i,className:"relative aspect-[1080/459] w-full",children:[p.jsx("canvas",{ref:a,className:"absolute inset-0 block h-full w-full","aria-hidden":!0}),p.jsx("canvas",{ref:t,className:"absolute inset-0 block h-full w-full mix-blend-screen","aria-hidden":!0}),p.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_37%_43%,rgba(255,64,23,0.12),transparent_29%),radial-gradient(circle_at_63%_58%,rgba(0,172,229,0.1),transparent_30%),linear-gradient(90deg,rgba(0,0,0,0.22),transparent_28%,transparent_72%,rgba(0,0,0,0.28))]","aria-hidden":!0}),p.jsx("canvas",{ref:n,className:"pointer-events-none absolute inset-0 block h-full w-full","aria-hidden":!0}),p.jsx("canvas",{ref:r,className:"pointer-events-none absolute inset-0 block h-full w-full",style:Q,"aria-hidden":!0}),p.jsx("canvas",{ref:e,className:"pointer-events-none absolute inset-0 block h-full w-full",style:Q,"aria-hidden":!0})]})})}):p.jsx(oe,{to:"/tableau",replace:!0})};export{De as TUBES_TWO_STREAKS_LOGO_LIGHT_SAVED_SANDBOX_ROUTE,We as TubesTwoStreaksLogoLightSavedSandboxRoute};

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.