asciify-engine 4.30.0 → 4.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/kit/chunk-26HU7QJW.js +1 -0
  3. package/dist/kit/chunk-2ZBPTNGK.js +1 -0
  4. package/dist/kit/{chunk-64NSPD2R.js → chunk-62KEKWSM.js} +1 -1
  5. package/dist/kit/chunk-6646EUJY.js +1 -0
  6. package/dist/kit/chunk-6YLMG37G.js +1 -0
  7. package/dist/kit/{chunk-MYAZOXMF.js → chunk-7DBDSJ5R.js} +1 -1
  8. package/dist/kit/chunk-7NS6YAD3.js +1 -0
  9. package/dist/kit/chunk-7OPCQDAL.js +1 -0
  10. package/dist/kit/{chunk-Y2SDQ6EC.js → chunk-CIGEXHZ5.js} +1 -1
  11. package/dist/kit/chunk-DANNL7WR.js +1 -0
  12. package/dist/kit/{chunk-VENDLTH4.js → chunk-ECGALF3G.js} +1 -1
  13. package/dist/kit/chunk-EOTPXDMH.js +1 -0
  14. package/dist/kit/{chunk-6NDTKY3V.js → chunk-J7TFGVZT.js} +1 -1
  15. package/dist/kit/{chunk-UXJRBOSR.js → chunk-JSRXW3FL.js} +1 -1
  16. package/dist/kit/chunk-KO5NAI4S.js +1 -0
  17. package/dist/kit/chunk-LZGSWPH4.js +1 -0
  18. package/dist/kit/chunk-MZDZ6G75.js +1 -0
  19. package/dist/kit/{chunk-G3FVDS2A.js → chunk-O25QXHEZ.js} +1 -1
  20. package/dist/kit/chunk-ODLKGAX2.js +1 -0
  21. package/dist/kit/chunk-P5M6AQQX.js +1 -0
  22. package/dist/kit/{chunk-M5JJSIWI.js → chunk-QRSVLQ2I.js} +1 -1
  23. package/dist/kit/chunk-RPSE33GI.js +1 -0
  24. package/dist/kit/chunk-RU2KQTTL.js +1 -0
  25. package/dist/kit/{chunk-7QH33RJJ.js → chunk-UZR3T5XA.js} +1 -1
  26. package/dist/kit/{chunk-G7GQSPMC.js → chunk-V3J6KJQ2.js} +1 -1
  27. package/dist/kit/chunk-VWFC5XOB.js +1 -0
  28. package/dist/kit/chunk-VXPUEFYR.js +1 -0
  29. package/dist/kit/{chunk-EH4S6T7U.js → chunk-W3GINZLK.js} +1 -1
  30. package/dist/kit/{chunk-2UOPVMN3.js → chunk-WOKKM6CG.js} +1 -1
  31. package/dist/kit/{chunk-NS6HYTQZ.js → chunk-XB7XBYHA.js} +1 -1
  32. package/dist/kit/chunk-XJBVU5QP.js +1 -0
  33. package/dist/kit/{chunk-3H3DJI3M.js → chunk-YFW377RN.js} +1 -1
  34. package/dist/kit.cjs +1 -1
  35. package/dist/kit.d.cts +65 -1
  36. package/dist/kit.d.ts +65 -1
  37. package/dist/kit.js +1 -1
  38. package/package.json +1 -1
  39. package/skills/asciify-engine/SKILL.md +3 -3
  40. package/skills/asciify-engine/references/applying-asciify.md +1 -0
  41. package/skills/asciify-engine/references/components.md +26 -0
  42. package/skills/asciify-engine/references/kit.md +33 -0
  43. package/skills/asciify-engine/references/scenario-prompts.md +7 -0
  44. package/dist/kit/chunk-4G5LJNMB.js +0 -1
  45. package/dist/kit/chunk-5Q634WWI.js +0 -1
  46. package/dist/kit/chunk-7TXDNPL3.js +0 -1
  47. package/dist/kit/chunk-F4IO3HWD.js +0 -1
  48. package/dist/kit/chunk-GJANKSX6.js +0 -1
  49. package/dist/kit/chunk-LTRVMY3D.js +0 -1
  50. package/dist/kit/chunk-OOVUQEXT.js +0 -1
  51. package/dist/kit/chunk-UWX7VIXT.js +0 -1
  52. package/dist/kit/chunk-V6KL3IA7.js +0 -1
  53. package/dist/kit/chunk-X7AUCVMH.js +0 -1
  54. package/dist/kit/chunk-XXHIFJ5Z.js +0 -1
  55. package/dist/kit/chunk-XZO4VH2Z.js +0 -1
  56. package/dist/kit/chunk-ZNZAO7JA.js +0 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ Notable changes to `asciify-engine`, newest first. Releases are published to [np
5
5
 
6
6
 
7
7
 
8
+ ## 4.31: ocean, and backgrounds you play with (estuary, capillary, shockwave)
9
+
10
+ - New in `asciify-engine/kit`: `ocean(el, options)`, an ocean seen from above drawn as characters: fish, sharks, hammerheads, manta rays, jellyfish and schools of small fish, each a procedural body that swims with a travelling wave, steers, wanders and schools, in depth layers. The cursor scatters small fish and sharks turn to investigate; a press sends a ripple. Options `creatures`, `speed`, `density`, `depth`, `palette`, `background`, `interactive`, `ripples`, `edges`, `seed`, `layer`, `label`; handle `add`, `remove`, `count`. Shared GPU context, posters, still under reduced motion, paused off screen, deterministic for a seed.
11
+ - New background presets you play with, each a simulation drawn into the field's source (every mark and charset, theme ink, faint by default, still under reduced motion, no frames once settled): `estuary` (soft blotches the cursor stirs into swirls), `capillary` (a faint network of branching veins; new veins sprout toward the cursor and burst from a click, then fade) and `shockwave` (a click sends rings of characters outward, a front and two echoes; the cursor leaves gusts). Use `setPreset` for a mode switcher.
12
+ - Skill: kit.md "Ocean" and "Interactive simulations", components.md `ascii-ocean` and `stir-grow-ripple`, applying-asciify.md, scenario prompts 22 and 23.
13
+
8
14
  ## 4.30: event-site pieces — morphField, globe, ditherGradient, ditherImage, scramble, assemble, spray
9
15
 
10
16
  - New in `asciify-engine/kit`: `morphField` (frames, including drawing functions and video, that morph into one another as hatched lines or any mark; `next`, `go`, `onChange`), `ditherGradient` (soft lights as a two-tone dither on the element's own background, leaning toward the pointer), `globe` (a globe of dots with land, ocean, graticule and far side, turning, draggable, with `points` and `rotateTo`; built-in Natural Earth land mask, 2.7 KB) and `ditherImage` (an image in a brand's two tones as dither, pixels, dots or engraving, developing in when visible or with scroll).
@@ -0,0 +1 @@
1
+ import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{parseColor as o,hash2 as e}from"./chunk-ZCHGV2CV.js";import{mixHex as l}from"./chunk-I377LEZA.js";var r=1,i=2,n=4,f=8,c={3:"─",12:"│",9:"┌",10:"┐",5:"└",6:"┘",11:"┬",7:"┴",13:"├",14:"┤",15:"┼",[r]:"╶",[i]:"╴",[n]:"╵",[f]:"╷"};function a(t,l,r,i,n={}){const{fontSize:f=13,pulseColor:a="#ffffff",color:s="#00ff88",density:h=.38,speed:g=1,lightMode:p=!1}=n,u=.62*f,b=1.4*f,m=Math.ceil(l/u),d=Math.ceil(r/b),M=o(s)??{r:0,g:255,b:136},$=o(a)??{r:255,g:255,b:255},A=(t,o)=>{if(e(17*t+1,7*o+2)>h)return 0;let l=0;return t+1<m&&e(17*t+1,7*o+2)>.15&&(l|=1),t-1>=0&&e(17*(t-1)+1,7*o+2)>.15&&(l|=2),o+1<d&&e(17*t+1,7*(o+1)+2)>.15&&(l|=8),o-1>=0&&e(17*t+1,7*(o-1)+2)>.15&&(l|=4),l};t.clearRect(0,0,l,r),t.font=`${f}px "JetBrains Mono", monospace`,t.textBaseline="top";const C=i*g;for(let o=0;o<d;o++)for(let l=0;l<m;l++){const r=A(l,o);if(0===r)continue;const i=c[r]??"·",n=(8*C+40*e(l,23*o))%m,f=(6*C+40*e(17*o,11*l))%d,a=(1&r||2&r)&&Math.abs(l-n)<1.5,s=(4&r||8&r)&&Math.abs(o-f)<1.5,h=a||s,g=.25+.35*e(3*l,5*o);h?(t.globalAlpha=.95,t.fillStyle=`rgb(${$.r},${$.g},${$.b})`):(t.globalAlpha=g,t.fillStyle=`rgb(${M.r},${M.g},${M.b})`),t.fillText(i,l*u,o*b)}t.globalAlpha=1}var s={id:"circuit",name:"Circuit",description:"Circuit traces with signals running along them.",cellSize:13,speed:1,cursor:!1,mount:o=>t(o,(t,o,e,r,i,n)=>a(t,o,e,r,{fontSize:n.fontSize,chars:n.chars,lightMode:n.lightMode,color:n.ink,pulseColor:n.accent??l(n.ink,"#ffffff",.7)}))};export{s as circuit,a as renderCircuitBackground};//# sourceMappingURL=chunk-26HU7QJW.js.map
@@ -0,0 +1 @@
1
+ import{vnoise as t,hash2 as s}from"./chunk-ZCHGV2CV.js";import{simPreset as i}from"./chunk-ODLKGAX2.js";var h=class{constructor(t=1){this.seed=t,this.cols=0,this.rows=0,this.ground=new Float32Array(0),this.grain=new Float32Array(0),this.rings=new Float32Array(160),this.count=0,this.walked=0}resize(i,h){this.cols=i,this.rows=h,this.ground=new Float32Array(i*h),this.grain=new Float32Array(i*h);const o=6/Math.max(i,h),r=31.7*this.seed;for(let a=0,n=0;a<h;a++)for(let h=0;h<i;h++,n++){const i=t(h*o+r,a*o);this.ground[n]=.035*i*i,this.grain[n]=.7+.3*s(h+7,3*a+11)}}add(t,s,i,h=0){this.count>=40&&this.drop(0);const o=4*this.count++;this.rings[o]=t,this.rings[o+1]=s,this.rings[o+2]=-h,this.rings[o+3]=i}drop(t){const s=--this.count;t!==s&&this.rings.copyWithin(4*t,4*s,4*s+4)}step(t,s){const i=t*Math.max(.2,s);for(let t=this.count-1;t>=0;t--){const s=4*t;this.rings[s+2]+=i,this.rings[s+3]*Math.exp(1.3*-this.rings[s+2])<.01&&this.drop(t)}return this.count>0}radius(t){return.2*Math.max(this.cols,this.rows)*Math.pow(Math.max(0,t),.7)}render(t){const{cols:s,rows:i,rings:h,grain:o}=this;t.set(this.ground);for(let r=0;r<this.count;r++){const a=4*r,n=h[a+2];if(n<=0)continue;const e=h[a],c=h[a+1],d=this.radius(n),l=.8+.035*d,u=h[a+3]*Math.exp(1.3*-n),w=d+3*l,g=Math.max(0,Math.floor(c-w)),M=Math.min(i,Math.ceil(c+w)),f=Math.max(0,Math.floor(e-w)),m=Math.min(s,Math.ceil(e+w)),p=Math.max(0,d-3*l-.25*d);for(let i=g;i<M;i++){const h=i-c;for(let r=f;r<m;r++){const a=r-e,n=Math.sqrt(a*a+h*h);if(n>w||n<p)continue;const c=(n-d)/l,g=(n-.8*d)/l,M=i*s+r,f=t[M]+u*(Math.exp(-c*c)+.35*Math.exp(-g*g))*o[M];t[M]=f>1?1:f}}}}move(t,s,i,h){this.walked+=Math.hypot(i,h),this.walked<.12*Math.max(this.cols,this.rows)||(this.walked=0,this.add(t,s,.22))}press(t,s){this.add(t,s,.95),this.add(t,s,.5,.14),this.add(t,s,.26,.3)}leave(){this.walked=0}},o=i({id:"shockwave",name:"Shockwave",description:"A click sends rings of characters out across the field: a front and two echoes, slowing and fading. Gusts follow the cursor.",cellSize:9,charset:" .·:-=+*#",detail:1/4,create:t=>new h(t)});export{h as Shockwave,o as shockwave};//# sourceMappingURL=chunk-2ZBPTNGK.js.map
@@ -1 +1 @@
1
- import{scenePreset as e,FIELD_GRAPHITE as t,narrow as r}from"./chunk-LTRVMY3D.js";var l=e({id:"swell",name:"Swell",description:"A fine grid that swells in slow rolling waves, quiet in the middle. Dots by default, or characters.",cellSize:10,opacity:.6,scene:"swell",mark:"dot",charset:" .:-=+*#",hover:"lantern",graphite:t,tune:()=>({scale:r()?1.5:1,contrast:.62,brightness:-.19,blend:"auto",lantern:{radius:.12,strength:.5,trail:1,follow:8},trail:{strength:.7,radius:.35}})});export{l as swell};//# sourceMappingURL=chunk-64NSPD2R.js.map
1
+ import{scenePreset as e,FIELD_GRAPHITE as t,narrow as r}from"./chunk-VWFC5XOB.js";var l=e({id:"swell",name:"Swell",description:"A fine grid that swells in slow rolling waves, quiet in the middle. Dots by default, or characters.",cellSize:10,opacity:.6,scene:"swell",mark:"dot",charset:" .:-=+*#",hover:"lantern",graphite:t,tune:()=>({scale:r()?1.5:1,contrast:.62,brightness:-.19,blend:"auto",lantern:{radius:.12,strength:.5,trail:1,follow:8},trail:{strength:.7,radius:.35}})});export{l as swell};//# sourceMappingURL=chunk-62KEKWSM.js.map
@@ -0,0 +1 @@
1
+ import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{MONO as o,GRAPHITE_LIGHT as e,GRAPHITE_DARK as n,pixelSnap as r,parseColor as c,hash2 as h,band as i,ditherIndex as l,toneAlpha as a}from"./chunk-ZCHGV2CV.js";function s(t,s,f,M,g={}){const{fontSize:d=13,color:u,accentColor:S,speed:$=.4,layers:I=4,turbulence:P=.8,lightMode:b=!1}=g,p=.62*d,m=1.3*d,k=Math.ceil(s/p),x=Math.ceil(f/m);t.clearRect(0,0,s,f),t.font=`${d}px ${o}`,t.textBaseline="top";const z=b?e:n;let C=z.r,w=z.g,y=z.b;const A=r(t);if(u){const t=c(u);t&&(C=t.r,w=t.g,y=t.b)}let V=C,j=w,v=y;const H=S?c(S):null;H&&(V=H.r,j=H.g,v=H.b);const B=M*$,G=g.chars?Array.from(g.chars):void 0,L=["-","\\","|","/"];for(let o=0;o<x;o++){const e=o/x;for(let n=0;n<k;n++){const r=n/k;let c=0,s=0;for(let t=0;t<I;t++){const o=h(13*t,7*t+3),n=1.1+2.4*o,i=.9+2*h(29*t,11*t+1),l=o*Math.PI*6,a=(.2+.5*h(41*t,17*t))*(t%2==0?1:-1.3),f=Math.sin(r*n*Math.PI*2+B*a+l),M=Math.cos(e*i*Math.PI*2+B*a*.6+1.7*l),g=Math.sin(r*i*Math.PI*P+e*n*Math.PI*P+B*a*.4);c+=Math.atan2(M+.3*g,f),s+=.5*(f*M+1)}const f=c/I,M=i(s/I,.54,.74);if(M<=0)continue;const d=(f%Math.PI+Math.PI)%Math.PI,u=Math.round(d/(Math.PI/4))%L.length;if(!G&&g.ditherStrength&&0===l(M,2,n,o,g.ditherStrength))continue;const S=G?G[l(M,G.length,n,o,g.ditherStrength)]:L[u];if(" "===S)continue;const $=!!H&&M>.85,b=a(M);t.fillStyle=$?`rgba(${V},${j},${v},${b})`:`rgba(${C},${w},${y},${b})`,t.fillText(S,A(n*p),A(o*m))}}}var f={id:"silk",name:"Silk",description:"Long ribbons that follow a slow flow field.",cellSize:13,speed:1,cursor:!1,mount:o=>t(o,(t,o,e,n,r,c)=>s(t,o,e,n,{ditherStrength:c.ditherStrength,fontSize:c.fontSize,chars:c.chars,lightMode:c.lightMode,color:c.ink,accentColor:c.accent}))};export{s as renderSilkBackground,f as silk};//# sourceMappingURL=chunk-6646EUJY.js.map
@@ -0,0 +1 @@
1
+ import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{parseColor as e,hash2 as o}from"./chunk-ZCHGV2CV.js";function r(t,r,c,n,l={}){const{fontSize:i=14,chars:s=" ·∙•:-=+*#",color:a,accentColor:h,speed:f=.5,harmonics:m=3,lightMode:p=!1}=l,g=h??(p?"#6b8700":"#d4ff00"),M=.62*i,d=1.4*i,$=Math.ceil(r/M),u=Math.ceil(c/d);t.clearRect(0,0,r,c),t.font=`${i}px monospace`,t.textBaseline="top";let b=255,S=255,x=255;if(p&&(b=55,S=55,x=55),a){const t=e(a);t&&(b=t.r,S=t.g,x=t.b)}let z=212,C=255,k=0;const y=e(g);y&&(z=y.r,C=y.g,k=y.b);const A=n*f,V=Array.from({length:m},(t,e)=>1/(e+1)).reduce((t,e)=>t+e,0);for(let e=0;e<u;e++)for(let r=0;r<$;r++){let c=0;for(let t=0;t<m;t++){const n=.18+1.4*o(r*(t+3)+7,e*(t+5)+11),l=o(r*(t+7),e*(t+9)+3)*Math.PI*2,i=1/(t+1);c+=Math.sin(A*n+l)*i}const n=.5*(c/V+1);if(n<.28)continue;const l=(n-.28)/.72,i=s[Math.min(s.length-1,Math.floor(l*s.length))],a=n>.88,h=p?.82*l:.13*l;t.fillStyle=a?`rgba(${z},${C},${k},${p?.92:.28})`:`rgba(${b},${S},${x},${h})`,t.fillText(i,r*M,e*d)}}var c={id:"morph",name:"Morph",description:"Every cell shimmers at its own frequencies.",cellSize:14,speed:1,cursor:!1,mount:e=>t(e,(t,e,o,c,n,l)=>r(t,e,o,c,{fontSize:l.fontSize,chars:l.chars,lightMode:l.lightMode,color:l.ink,accentColor:l.accent}))};export{c as morph,r as renderMorphBackground};//# sourceMappingURL=chunk-6YLMG37G.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-LTRVMY3D.js";var r=e({id:"contour",name:"Contour",description:"Survey lines over a slowly shifting terrain, every fifth an index line.",cellSize:11,scene:"contour",charset:" .·-~=",hover:"lantern"});export{r as contour};//# sourceMappingURL=chunk-MYAZOXMF.js.map
1
+ import{scenePreset as e}from"./chunk-VWFC5XOB.js";var r=e({id:"contour",name:"Contour",description:"Survey lines over a slowly shifting terrain, every fifth an index line.",cellSize:11,scene:"contour",charset:" .·-~=",hover:"lantern"});export{r as contour};//# sourceMappingURL=chunk-7DBDSJ5R.js.map
@@ -0,0 +1 @@
1
+ import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{MONO as e,GRAPHITE_LIGHT as o,GRAPHITE_DARK as r,pixelSnap as n,parseColor as c,band as i,ditherIndex as a,toneAlpha as l,vnoise as s}from"./chunk-ZCHGV2CV.js";function h(t,h,f,d,g={x:.5,y:.5},u={}){const{fontSize:m=13,chars:M=" .:-=+*#%@",accentColor:p,color:$,octaves:x=4,speed:S=1,scale:b=1,accentThreshold:y=.9,mouseWarp:z=.3,lightMode:A=!1}=u,C=Array.from(M),k=.62*m,V=1.3*m,j=Math.ceil(h/k),v=Math.ceil(f/V);t.clearRect(0,0,h,f),t.font=`${m}px ${e}`,t.textBaseline="top";const w=A?o:r;let H=w.r,N=w.g,T=w.b;const q=n(t);if($){const t=c($);t&&(H=t.r,N=t.g,T=t.b)}let B=H,G=N,Q=T;const R=p?c(p):null;R&&(B=R.r,G=R.g,Q=R.b);const U=.035*b,W=d*S,Z=Math.min(6,Math.max(1,x)),D=(t,e)=>{let o=0,r=.5,n=1,c=0;for(let i=0;i<Z;i++)o+=s(t*n,e*n)*r,c+=r,r*=.5,n*=2.1;return o/c};for(let e=0;e<v;e++)for(let o=0;o<j;o++){const r=o*U+.06*W,n=e*U*1.3-.04*W,c=o/j-g.x,s=e/v-g.y,h=Math.sqrt(c*c+s*s),f=z>0?.12*Math.max(0,1-h/z):0,d=D(r+f*Math.sin(1.3*W+8*s),n+f*Math.cos(.9*W+8*c)),m=i(.5*d+.5,.7,.83);if(m<=0)continue;const M=C[a(m,C.length,o,e,u.ditherStrength)];if(" "===M)continue;const p=!!R&&m>y,$=l(m);t.fillStyle=p?`rgba(${B},${G},${Q},${$})`:`rgba(${H},${N},${T},${$})`,t.fillText(M,q(o*k),q(e*V))}}var f={id:"noise",name:"Noise",description:"A slow fractal noise field that warps around the cursor.",cellSize:13,speed:.5,cursor:!0,mount:e=>t(e,(t,e,o,r,n,c)=>h(t,e,o,r,n,{ditherStrength:c.ditherStrength,fontSize:c.fontSize,chars:c.chars,lightMode:c.lightMode,color:c.ink,accentColor:c.accent}))};export{f as noise,h as renderNoiseBackground};//# sourceMappingURL=chunk-7NS6YAD3.js.map
@@ -0,0 +1 @@
1
+ import{simPreset as t,rng as s}from"./chunk-ODLKGAX2.js";var i=500,h=class{constructor(t=1){this.seed=t,this.cols=0,this.rows=0,this.rest=new Float32Array(0),this.live=new Float32Array(0),this.tips=0,this.x=new Float32Array(i),this.y=new Float32Array(i),this.a=new Float32Array(i),this.life=new Float32Array(i),this.span=new Float32Array(i),this.ink=new Float32Array(i),this.pull={x:0,y:0,on:!1},this.walked=0,this.fade=0,this.lit=!1,this.random=s(t)}resize(t,i){this.cols=t,this.rows=i,this.rest=new Float32Array(t*i),this.live=new Float32Array(t*i),this.random=s(this.seed),this.tips=0,this.pull.on=!1;const h=this.random,a=Math.max(3,Math.round(t*i/2600));for(let s=0;s<a;s++)this.sprout(h()*t,h()*i,h()*Math.PI*2,60+90*h(),1);for(let t=0;this.tips&&t<4e3;t++)this.grow(this.rest);this.tips=0}sprout(t,s,h,a,r){if(this.tips>=i)return;const l=this.tips++;this.x[l]=t,this.y[l]=s,this.a[l]=h,this.life[l]=a,this.span[l]=a,this.ink[l]=r}grow(t){const{cols:s,rows:h,x:a,y:r,a:l,life:e,span:o,ink:n}=this,p=this.random;for(let c=this.tips-1;c>=0;c--){if(l[c]+=.45*(p()-.5),this.pull.on&&t===this.live){let t=Math.atan2(this.pull.y-r[c],this.pull.x-a[c])-l[c];t-=2*Math.PI*Math.floor((t+Math.PI)/(2*Math.PI)),l[c]+=.6*Math.max(-.06,Math.min(.06,t))}a[c]+=.7*Math.cos(l[c]),r[c]+=.7*Math.sin(l[c]),e[c]-=1;const u=0|a[c],f=0|r[c];if(e[c]<=0||a[c]<0||r[c]<0||u>=s||f>=h){this.kill(c);continue}const w=f*s+u,d=n[c]*(.35+e[c]/o[c]*.65);d>t[w]&&(t[w]=d),p()<.022&&this.tips<i&&this.sprout(a[c],r[c],l[c]+(p()<.5?-1:1)*(.45+.6*p()),.8*e[c],.9*n[c])}}kill(t){const s=--this.tips;t!==s&&(this.x[t]=this.x[s],this.y[t]=this.y[s],this.a[t]=this.a[s],this.life[t]=this.life[s],this.span[t]=this.span[s],this.ink[t]=this.ink[s])}step(t,s){if(!this.lit&&!this.tips)return!1;const i=Math.min(8,Math.round(60*t*Math.max(.25,s)*1.6));for(let t=0;t<i&&this.tips;t++)this.grow(this.live);const h=Math.exp(.4*-t),a=this.live;let r=0;for(let t=0;t<a.length;t++){const s=a[t]*h;a[t]=s<.004?0:s,s>r&&(r=s)}return this.fade=r,this.lit=r>0,this.lit||this.tips||(this.pull.on=!1),this.lit||this.tips>0}render(t){const{rest:s,live:i}=this;for(let h=0;h<t.length;h++){const a=.16*s[h],r=.9*i[h];t[h]=a>r?a:r}}move(t,s,i,h){if(!this.cols)return;if(this.pull.x=t,this.pull.y=s,this.pull.on=!0,this.walked+=Math.hypot(i,h),this.walked<2.5)return;this.walked=0;const a=this.random,r=.12*Math.max(this.cols,this.rows);for(let i=0;i<6;i++){const i=t+2*(a()-.5)*r,h=s+2*(a()-.5)*r,l=0|i,e=0|h;if(!(l<0||e<0||l>=this.cols||e>=this.rows||this.rest[e*this.cols+l]<.3)){this.sprout(i,h,Math.atan2(s-h,t-i)+(a()-.5),30+40*a(),.8);break}}this.sprout(t,s,Math.atan2(h,i)+Math.PI+2*(a()-.5),20+30*a(),.7),this.lit=!0}press(t,s){const i=this.random;for(let h=0;h<9;h++)this.sprout(t,s,h/9*Math.PI*2+.5*i(),50+60*i(),1);this.lit=!0}leave(){this.pull.on=!1}get level(){return this.fade}},a=t({id:"capillary",name:"Capillary",description:"Thin branching veins: a faint network at rest, new veins that grow toward the cursor and burst from a click.",cellSize:8,charset:" .·:-+*",detail:1/3,create:t=>new h(t)});export{h as Capillary,a as capillary};//# sourceMappingURL=chunk-7OPCQDAL.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-LTRVMY3D.js";var r=e({id:"halo",name:"Halo",description:"A corona breathes slowly round the middle, its rays turning; the centre stays empty for a headline.",cellSize:11,scene:"halo",charset:" .·:-=+*",hover:"lantern",middle:!1,feather:.12});export{r as halo};//# sourceMappingURL=chunk-Y2SDQ6EC.js.map
1
+ import{scenePreset as e}from"./chunk-VWFC5XOB.js";var r=e({id:"halo",name:"Halo",description:"A corona breathes slowly round the middle, its rays turning; the centre stays empty for a headline.",cellSize:11,scene:"halo",charset:" .·:-=+*",hover:"lantern",middle:!1,feather:.12});export{r as halo};//# sourceMappingURL=chunk-CIGEXHZ5.js.map
@@ -0,0 +1 @@
1
+ import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{parseColor as e,hash2 as o}from"./chunk-ZCHGV2CV.js";function n(t,n,c,r,s={x:.5,y:.5},l={}){const{fontSize:a=14,chars:i=" . · * + ° ★",accentColor:h,color:f,speed:d=1,count:g=180,lightMode:m=!1}=l,p=h??(m?"#6b8700":"#d4ff00");t.clearRect(0,0,n,c),t.textBaseline="middle",t.textAlign="center";const M=n*(.2+.6*s.x),x=c*(.2+.6*s.y),$=.65*Math.sqrt(n*n+c*c);let u=255,S=255,b=255;if(m&&(u=55,S=55,b=55),f){const t=e(f);t&&(u=t.r,S=t.g,b=t.b)}let A=212,k=255,z=0;const C=e(p);C&&(A=C.r,k=C.g,z=C.b);const y=i.replace(/ /g,"").split("");if(0!==y.length){for(let e=0;e<g;e++){const s=o(17*e,3)*Math.PI*2,l=(r*(.15+.85*o(31*e,7))*d*.22+o(13*e,11))%1,i=M+Math.cos(s)*l*$,h=x+Math.sin(s)*l*$;if(i<-20||i>n+20||h<-20||h>c+20)continue;const f=Math.max(6,a*(.4+.9*l));t.font=`${f}px monospace`;const g=y[Math.min(y.length-1,Math.floor(l*y.length))],p=l>.72,C=m?.85*l:.2*l;t.fillStyle=p?`rgba(${A},${k},${z},${Math.min(m?.92:.32,2.2*C)})`:`rgba(${u},${S},${b},${C})`,t.fillText(g,i,h)}t.textAlign="left"}}var c={id:"stars",name:"Stars",description:"A sparse starfield that twinkles, drifts and leans toward the cursor.",cellSize:14,speed:1,cursor:!0,mount:e=>t(e,(t,e,o,c,r,s)=>n(t,e,o,c,r,{fontSize:s.fontSize,chars:s.chars,lightMode:s.lightMode,color:s.ink,accentColor:s.accent}))};export{n as renderStarsBackground,c as stars};//# sourceMappingURL=chunk-DANNL7WR.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-LTRVMY3D.js";var r=e({id:"mesh",name:"Mesh",description:"Four soft lights on slow paths: a gradient mesh written in characters.",cellSize:11,scene:"mesh",charset:" .:-=+*#%@",hover:"trail"});export{r as mesh};//# sourceMappingURL=chunk-VENDLTH4.js.map
1
+ import{scenePreset as e}from"./chunk-VWFC5XOB.js";var r=e({id:"mesh",name:"Mesh",description:"Four soft lights on slow paths: a gradient mesh written in characters.",cellSize:11,scene:"mesh",charset:" .:-=+*#%@",hover:"trail"});export{r as mesh};//# sourceMappingURL=chunk-ECGALF3G.js.map
@@ -0,0 +1 @@
1
+ import{clamp as e,styleKeeper as t,srOnly as n,mountSurface as o,handle as a,resolveColor as r,hexRgb as i}from"./chunk-I377LEZA.js";var s=["fish","shark","hammerhead","manta","jellyfish","school"],h={fish:{len:.13,speed:.55,beat:2.1,amp:.07,waves:.9,turn:1.8,prey:!0,hunter:!1},school:{len:.055,speed:1.15,beat:3.6,amp:.08,waves:.9,turn:3.4,prey:!0,hunter:!1},shark:{len:.44,speed:.2,beat:.75,amp:.05,waves:.75,turn:.5,prey:!1,hunter:!0},hammerhead:{len:.4,speed:.22,beat:.8,amp:.05,waves:.75,turn:.55,prey:!1,hunter:!0},manta:{len:.2,speed:.3,beat:.42,amp:.025,waves:.5,turn:.4,prey:!1,hunter:!1},jellyfish:{len:.085,speed:.4,beat:.6,amp:0,waves:0,turn:.35,prey:!1,hunter:!1}};function l(t,n){if(n=e(n),"shark"===t||"hammerhead"===t){const e=.3;return("shark"===t?.085:.072)*(n<e?(n/e)**("shark"===t?.6:.4):((1-n)/(1-e))**1.35)+.008*n}if("manta"===t)return n<.5?.09*Math.sin(Math.PI*(n/.5)**.8):0;if("jellyfish"===t)return 0;const o=.32;return("school"===t?.14:.16)*(n<o?Math.sin(n/o*Math.PI/2)**.7:((1-n)/(1-o))**1.1)+.01*n}var c=16,d=()=>({x:new Float32Array(17),y:new Float32Array(17),nx:new Float32Array(17),ny:new Float32Array(17)});function u(e,t,n,o,a,r,i,s,h){const l=r/c;let d=t,u=n;for(let t=0;t<=c;t++){const n=t/c,y=o-a*n;t>0&&(d-=Math.cos(y)*l,u-=Math.sin(y)*l);const f=s*r*(.12+.88*n*n)*Math.sin(i-n*h*Math.PI*2);e.x[t]=d-Math.sin(y)*f,e.y[t]=u+Math.cos(y)*f}for(let t=0;t<=c;t++){const n=t>0?t-1:0,o=t<c?t+1:c,a=e.x[n]-e.x[o],r=e.y[n]-e.y[o],i=Math.hypot(a,r)||1;e.nx[t]=-r/i,e.ny[t]=a/i}}var y=1/60,f=2*Math.PI,p=e=>e-f*Math.floor((e+Math.PI)/f);function x(e){let t=(2654435769^Math.floor(2654435761*e))>>>0;return()=>{t=t+1831565813>>>0;let e=t;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}}var M=e=>Math.max(40,Math.min(e.w,e.h)),m=(e,t,n)=>h[t.kind].len*t.size*M(e)*(1-.5*t.z*n);function g(e,t,n=1,o="turn"){return{w:e,h:t,t:0,bodies:[],order:[],pointer:{x:0,y:0,at:-1e9,on:!1},burst:{x:0,y:0,at:-1e9},rng:x(n),edges:o,nextId:1,nextGroup:0,acc:0}}function k(e){const{bodies:t,order:n}=e;n.length=t.length;for(let e=0;e<t.length;e++)n[e]=e;for(let e=1;e<n.length;e++){const o=n[e],a=t[o].z;let r=e-1;for(;r>=0&&t[n[r]].z<a;)n[r+1]=n[r],r--;n[r+1]=o}}function v(t,n,o,a=1){const r=t.rng,i=260-t.bodies.length,s=Math.max(0,Math.min(i,Math.round(o)));if(!s||!h[n])return 0;const l=M(t),c="school"===n?t.nextGroup++:-1,d=t.w*(.15+.7*r()),u=t.h*(.15+.7*r()),y=r()*f,p=r();for(let o=0;o<s;o++){const o=c>=0,i=o?h.school.len*a*l*.8*Math.sqrt(s):0,x=r()*f,M=Math.sqrt(r())*i;t.bodies.push({id:t.nextId++,kind:n,size:a,x:o?d+Math.cos(x)*M:t.w*r(),y:o?u+Math.sin(x)*M:t.h*r(),heading:o?y+.4*(r()-.5):r()*f,omega:0,speed:0,phase:r()*f,z:o?e(p+.15*(r()-.5)):r(),seed:o?7.31*c+.2*r():100*r(),group:c,fear:0})}return k(t),s}function b(e,t){const{bodies:n}=e;for(let o=n.length-1;o>=0;o--){const a=n[o];if(!t||a.kind===t){if(a.group>=0){const t=a.group;e.bodies=n.filter(e=>e.group!==t)}else n.splice(o,1);return k(e),!0}}return!1}function w(e,t,n){if(e.w===t&&e.h===n)return;const o=t/(e.w||t),a=n/(e.h||n);for(const t of e.bodies)t.x*=o,t.y*=a;e.w=t,e.h=n}var T=(e,t)=>.6*Math.sin(.37*t+6.1*e)+.4*Math.sin(.91*t+2.3*e);function P(t,n,o){const{bodies:a,pointer:r,burst:i}=t,s=M(t),l=t.t,c=Math.max(0,o.speed),d=o.depth,u=o.interactive&&r.on&&l-r.at<2.5,y=o.interactive&&l-i.at<.9;for(let o=0;o<a.length;o++){const x=a[o],M=h[x.kind],g=m(t,x,d),k=1-.5*x.z*d;let v=Math.cos(x.heading),b=Math.sin(x.heading),w=0,P=0;if("turn"===t.edges){const e=Math.min(.16*s+.4*g,Math.min(t.w,t.h)/3);x.x<e?v+=2.5*(e-x.x)/e:x.x>t.w-e&&(v-=2.5*(x.x-t.w+e)/e),x.y<e?b+=2.5*(e-x.y)/e:x.y>t.h-e&&(b-=2.5*(x.y-t.h+e)/e)}if(M.prey){if(u){const e=.24*s,t=x.x-r.x,n=x.y-r.y,o=Math.hypot(t,n);if(o<e&&o>0){const a=(1-o/e)**2;v+=t/o*a*5,b+=n/o*a*5,w=Math.max(w,1.6*a)}}if(y){const e=.42*s,t=x.x-i.x,n=x.y-i.y,o=Math.hypot(t,n);if(o<e&&o>0){const a=1-o/e;v+=t/o*a*6,b+=n/o*a*6,w=Math.max(w,2*a)}}for(let e=0;e<a.length;e++){const n=a[e];if(!h[n.kind].hunter)continue;const o=.55*m(t,n,d),r=x.x-n.x,i=x.y-n.y,s=Math.hypot(r,i);if(s<o&&s>0){const e=1-s/o;v+=r/s*e*3,b+=i/s*e*3,w=Math.max(w,e)}}}else if(M.hunter&&(u||y)){const e=y?i.x:r.x,t=y?i.y:r.y,n=.65*s,o=e-x.x,a=t-x.y,h=Math.hypot(o,a);if(h<n&&h>0){const e=1-h/n;if(h>.7*g)v+=o/h*e*2.4,b+=a/h*e*2.4;else{const e=Math.sign(p(Math.atan2(a,o)-x.heading))||1;v+=-a/h*e*1.6,b+=o/h*e*1.6}P=e}}if(x.group>=0){let e=0,t=0,n=0,o=0,r=0,i=0,s=0;const h=.9*g,l=7*g;for(let c=0;c<a.length;c++){const d=a[c];if(d===x||d.group!==x.group)continue;const u=d.x-x.x,y=d.y-x.y,f=Math.hypot(u,y);if(!(f>l)&&(s++,e+=Math.cos(d.heading),t+=Math.sin(d.heading),n+=u,o+=y,f<h&&f>0)){const e=(1-f/h)/f;r-=u*e,i-=y*e}}if(s){const a=Math.hypot(e,t)||1,s=Math.hypot(n,o)||1;v+=e/a*1.1+n/s*1.1+1.8*r,b+=t/a*1.1+o/s*1.1+1.8*i}}x.fear=Math.max(x.fear-.9*n,w);const S=M.turn*(1+2*x.fear+.6*P),C=e(3*p(Math.atan2(b,v)-x.heading)+T(x.seed,l)*M.turn*.7,-S,S);x.omega+=(C-x.omega)*Math.min(1,3*n),x.heading=p(x.heading+x.omega*n*Math.min(1,c));const z=M.beat*f*(1+1.4*x.fear);x.phase+=z*n*c;let I=M.speed*g*k*c*(1+1.8*x.fear+.25*P);if("jellyfish"===x.kind){const e=Math.max(0,Math.sin(x.phase));I*=.25+1.6*e*e}x.speed+=(I-x.speed)*Math.min(1,n*(x.fear>.1?5:2)),x.x+=Math.cos(x.heading)*x.speed*n,x.y+=Math.sin(x.heading)*x.speed*n;const q=1.1*g;("wrap"===t.edges||x.x<-2*q||x.x>t.w+2*q||x.y<-2*q||x.y>t.h+2*q)&&(x.x<-q?x.x+=t.w+2*q:x.x>t.w+q&&(x.x-=t.w+2*q),x.y<-q?x.y+=t.h+2*q:x.y>t.h+q&&(x.y-=t.h+2*q))}t.t+=n}function S(e,t,n){for(e.acc=Math.min(e.acc+Math.max(0,t),.1);e.acc>=y;)P(e,y,n),e.acc-=y}var C=null;function z(e,t){const n=(.2126*e[0]+.7152*e[1]+.0722*e[2])/255||.001;if(t<=n)return e.map(e=>e*t/n);const o=(t-n)/(1-n);return e.map(e=>e+(255-e)*o)}var I=(t,n)=>{const o=t.styles[t.kind];return o?o[Math.round(63*e(n))]:(C??(C=Array.from({length:256},(e,t)=>`rgb(${t},${t},${t})`)))[Math.round(255*e(n))]};function q(e,t,n,o,a,r,i,s){const h=e.pen;h.fillStyle=I(e,s),h.beginPath();for(let e=r;e<=i;e++){const i=l(n,e/c)*o*a;e===r?h.moveTo(t.x[e]+t.nx[e]*i,t.y[e]+t.ny[e]*i):h.lineTo(t.x[e]+t.nx[e]*i,t.y[e]+t.ny[e]*i)}for(let e=i;e>=r;e--){const r=l(n,e/c)*o*a;h.lineTo(t.x[e]-t.nx[e]*r,t.y[e]-t.ny[e]*r)}h.closePath(),h.fill()}function A(e,t,n,o,a,r,i){e.beginPath(),e.moveTo(t,n),e.lineTo(o,a),e.lineTo(r,i),e.closePath(),e.fill()}function $(e,t,n,o){e.beginPath(),e.arc(t,n,Math.max(.3,o),0,f),e.fill()}function j(e,t,n,o,a,r,i,s,h){const d=e.pen,u=t.ny[a],y=-t.nx[a],f=l(n,a/c)*o*.9;d.fillStyle=I(e,h);for(let e=-1;e<=1;e+=2){const n=t.nx[a]*e,h=t.ny[a]*e,l=t.x[a]+n*f,c=t.y[a]+h*f;A(d,l+u*s*.3*o,c+y*s*.3*o,l+n*r*o-u*i*o,c+h*r*o-y*i*o,l-u*s*o,c-y*s*o)}}function E(e,t,n,o,a,r,i,s){const h=e.pen,l=c,d=-t.ny[l],u=t.nx[l],y=t.nx[l],f=t.ny[l],p=t.x[l],x=t.y[l];h.fillStyle=I(e,s),h.beginPath(),h.moveTo(p+.02*y*n,x+.02*f*n),h.lineTo(p+(d*o*r+y*a*r)*n,x+(u*o*r+f*a*r)*n),h.quadraticCurveTo(p+d*o*.5*n,x+u*o*.5*n,p+(d*o*i-y*a*i)*n,x+(u*o*i-f*a*i)*n),h.lineTo(p-.02*y*n,x-.02*f*n),h.closePath(),h.fill()}function L(e,t,n,o,a){const r=n.kind,i="school"===r;if(E(e,t,o,i?.2:.22,.14,1,1,.8*a),i||j(e,t,r,o,5,.09,.08,.05,.7*a),q(e,t,r,o,1,0,c,.72*a),q(e,t,r,o,.55,1,14,.9*a),!i){q(e,t,r,o,.22,1,12,a),e.pen.fillStyle=I(e,0);const n=l(r,.125)*o*.7;$(e.pen,t.x[2]+t.nx[2]*n,t.y[2]+t.ny[2]*n,.025*o),$(e.pen,t.x[2]-t.nx[2]*n,t.y[2]-t.ny[2]*n,.025*o)}}function F(e,t,n,o,a){const r=n.kind,i=e.pen;if(E(e,t,o,.17,.15,1.2,.8,.8*a),j(e,t,r,o,5,.19,.13,.08,.78*a),j(e,t,r,o,10,.06,.05,.035,.65*a),q(e,t,r,o,1,0,c,.7*a),q(e,t,r,o,.6,1,15,.84*a),q(e,t,r,o,.24,2,13,.92*a),q(e,t,r,o,.14,5,8,a),"hammerhead"===r){const n=t.ny[0],r=-t.nx[0],s=t.nx[0],h=t.ny[0],l=t.x[0]-.015*n*o,c=t.y[0]-.015*r*o,d=.2*o,u=.055*o;i.fillStyle=I(e,.7*a),i.beginPath(),i.moveTo(l+s*d,c+h*d),i.quadraticCurveTo(l+.04*n*o,c+.04*r*o,l-s*d,c-h*d),i.lineTo(l-s*d*.9-n*u,c-h*d*.9-r*u),i.quadraticCurveTo(l-n*u*.4,c-r*u*.4,l+s*d*.9-n*u,c+h*d*.9-r*u),i.closePath(),i.fill(),i.fillStyle=I(e,0),$(i,l+s*d*.95-n*u*.4,c+h*d*.95-r*u*.4,.014*o),$(i,l-s*d*.95-n*u*.4,c-h*d*.95-r*u*.4,.014*o)}else{i.fillStyle=I(e,0);const n=l(r,.0875)*o*.8,a=1;$(i,t.x[a]+t.nx[a]*n,t.y[a]+t.ny[a]*n,.011*o),$(i,t.x[a]-t.nx[a]*n,t.y[a]-t.ny[a]*n,.011*o)}}var W={cx:0,cy:0,fx:1,fy:0},G=(e,t)=>W.cx+W.fx*e-W.fy*t,J=(e,t)=>W.cy+W.fy*e+W.fx*t;function B(e,t,n,o,a){const r=e.pen;let i=t.x[2]-t.x[6],s=t.y[2]-t.y[6];const h=Math.hypot(i,s)||1;i/=h,s/=h,W.cx=t.x[4],W.cy=t.y[4],W.fx=i,W.fy=s;const l=.8*o*(.8+.2*Math.cos(n.phase)),d=.08*o*Math.sin(n.phase-.7);r.strokeStyle=I(e,.7*a),r.lineWidth=Math.max(.6,.022*o),r.lineCap="round",r.lineJoin="round",r.beginPath(),r.moveTo(t.x[8],t.y[8]);for(let e=9;e<=c;e++)r.lineTo(t.x[e],t.y[e]);r.stroke(),r.fillStyle=I(e,.72*a),r.beginPath(),r.moveTo(G(.46*o,.08*o),J(.46*o,.08*o)),r.quadraticCurveTo(G(.3*o,.6*l),J(.3*o,.6*l),G(-.2*o-d,l),J(-.2*o-d,l)),r.quadraticCurveTo(G(-.12*o,.3*l),J(-.12*o,.3*l),G(-.44*o,.05*o),J(-.44*o,.05*o)),r.lineTo(G(-.44*o,-.05*o),J(-.44*o,-.05*o)),r.quadraticCurveTo(G(-.12*o,-.3*l),J(-.12*o,-.3*l),G(-.2*o-d,-l),J(-.2*o-d,-l)),r.quadraticCurveTo(G(.3*o,-.6*l),J(.3*o,-.6*l),G(.46*o,-.08*o),J(.46*o,-.08*o)),r.closePath(),r.fill(),r.fillStyle=I(e,.8*a);for(let e=-1;e<=1;e+=2)A(r,G(.46*o,.12*e*o),J(.46*o,.12*e*o),G(.62*o,.08*e*o),J(.62*o,.08*e*o),G(.48*o,.03*e*o),J(.48*o,.03*e*o));q(e,t,"manta",1.4*o,1,0,8,.86*a),q(e,t,"manta",1.4*o,.4,1,7,a)}function O(e,t,n,o,a){const r=e.pen,i=.5*o*(1.08-.16*Math.max(0,Math.sin(n.phase))),s=t.x[0],h=t.y[0];r.lineCap="round",r.lineJoin="round",r.strokeStyle=I(e,.6*a),r.lineWidth=Math.max(.5,.035*o);for(let e=0;e<7;e++){const a=n.heading+Math.PI+2.4*(e/6-.5),l=s+Math.cos(a)*i*.85,d=h+Math.sin(a)*i*.85,u=.9+.35*Math.sin(n.seed+1.7*e);r.beginPath(),r.moveTo(l,d);for(let a=2;a<=c;a+=2){const i=a/c,y=.12*Math.sin(.8*n.phase+.9*e-5*i)*o*i;r.lineTo(l+(t.x[a]-s)*u+t.nx[a]*y,d+(t.y[a]-h)*u+t.ny[a]*y)}r.stroke()}r.strokeStyle=I(e,.7*a),r.lineWidth=Math.max(.8,.08*o);for(let e=-1;e<=1;e++){r.beginPath(),r.moveTo(s,h);for(let a=2;a<=8;a+=2){const i=a/c,l=(.08*e+.06*Math.sin(n.phase+2*e-6*i))*o;r.lineTo(s+.9*(t.x[a]-s)+t.nx[a]*l,h+.9*(t.y[a]-h)+t.ny[a]*l)}r.stroke()}r.fillStyle=I(e,.6*a),$(r,s,h,i),r.strokeStyle=I(e,a),r.lineWidth=Math.max(.6,.2*i),r.beginPath(),r.arc(s,h,.88*i,0,f),r.stroke(),r.fillStyle=I(e,.78*a);for(let e=0;e<4;e++){const t=n.heading+Math.PI/4+e*Math.PI/2;$(r,s+Math.cos(t)*i*.32,h+Math.sin(t)*i*.32,.13*i)}}function R(t,n,o,a,r=[]){const i=X;i.pen=t,i.styles=r;const{bodies:l,order:c}=n;for(let t=0;t<c.length;t++){const r=l[c[t]];if(!r)continue;const d=h[r.kind],y=m(n,r,a),f=1-.5*r.z*a,p=e(r.speed>1?r.omega*y/r.speed*.5:0,-1.1,1.1);i.kind=s.indexOf(r.kind),"jellyfish"===r.kind?u(o,r.x,r.y,r.heading,p,1.9*y,.5*r.phase,.02,.6):"manta"===r.kind?u(o,r.x+Math.cos(r.heading)*y*.5,r.y+Math.sin(r.heading)*y*.5,r.heading,p,2*y,r.phase,d.amp,d.waves):u(o,r.x,r.y,r.heading,p,y,r.phase,d.amp,d.waves),"fish"===r.kind||"school"===r.kind?L(i,o,r,y,f):"shark"===r.kind||"hammerhead"===r.kind?F(i,o,r,y,f):"manta"===r.kind?B(i,o,r,y,f):O(i,o,r,y,f)}}var X={pen:null,styles:[],kind:0},Y=[{kind:"shark"},{kind:"hammerhead"},{kind:"manta"},{kind:"fish",count:4},{kind:"jellyfish",count:2},{kind:"school",count:28}],Z={speed:1,density:1,depth:.7,interactive:!0,ripples:!0,edges:"turn",seed:1,layer:"under"};function D(h,l={}){const c={current:{...Z,...l}},u=()=>c.current,f=t(),p=d(),x=s.map(()=>null),M=u().label?n(u().label):null;let m=g(0,0,u().seed,u().edges),k=!1,T=0,C=null;const I={speed:1,depth:.7,interactive:!0};let q={creatures:u().creatures,seed:u().seed,density:u().density};const A=(t,n)=>{m=g(t,n,u().seed,u().edges);for(const e of u().creatures??Y){const t="school"===e.kind?28:1;v(m,e.kind,(e.count??t)*Math.max(0,u().density),e.size??1)}const o={speed:1,depth:e(u().depth),interactive:!1};for(let e=0;e<1.5;e+=y)P(m,y,o);k=!0},$=()=>{const e=u().palette;for(let t=0;t<s.length;t++){const n=e?.[s[t]],o=n?r(n,h):null;x[t]=o?Array.from({length:64},(e,t)=>{const[n,a,r]=z(i(o),t/63);return`rgb(${0|n},${0|a},${0|r})`}):null}if(e){const e=r(u().ink??"--ascii-ink-strong",h)??r(getComputedStyle(h).color,h);for(let t=0;t<s.length;t++)!x[t]&&e&&(x[t]=Array.from({length:64},(t,n)=>{const[o,a,r]=z(i(e),n/63);return`rgb(${0|o},${0|a},${0|r})`}))}};$(),C=o({host:h,kit:c,look:()=>{const e=u().background;return{mark:"glyph",charset:" .:-=+*#%@",cellSize:7,cellAspect:.62,glyphScale:.92,contrast:1,background:e&&"transparent"!==e?r(e,h)??"transparent":"transparent",color:u().palette?"source":"ink",saturation:1,...u().look}},layer:u().layer,ink:()=>u().ink??"--ascii-ink-strong",reducedMotion:()=>u().reducedMotion,resolution:(e,t)=>{const n=Math.min(.6,560/Math.max(e,t));return[Math.max(8,Math.round(e*n)),Math.max(8,Math.round(t*n))]},onFail:()=>{C=null,f.restore()},onTheme:()=>{$(),u().background&&"transparent"!==u().background&&C?.refresh()},paint:({pen:t,width:n,height:o,w:a,h:r,now:i,still:s})=>{k?w(m,a,r):A(a,r);const h=T?Math.min(.1,Math.max(0,i-T)/1e3):0;return T=i,s||S(m,h,(I.speed=u().speed,I.depth=e(u().depth),I.interactive=u().interactive,I)),t.setTransform(n/a,0,0,o/r,0,0),R(t,m,p,e(u().depth),x),!s&&u().speed>0}});const j=e=>{const t=h.getBoundingClientRect();m.pointer.x=e.clientX-t.left,m.pointer.y=e.clientY-t.top},E=e=>{u().interactive&&(j(e),m.pointer.on=!0,m.pointer.at=m.t,C?.kick())},L=()=>{m.pointer.on=!1},F=e=>{u().interactive&&u().ripples&&0===e.button&&C&&(j(e),m.burst.x=m.pointer.x,m.burst.y=m.pointer.y,m.burst.at=m.t,C.field.pulse({x:m.burst.x,y:m.burst.y,strength:.5}),C.kick())};C&&(M&&h.appendChild(M),h.addEventListener("pointermove",E),h.addEventListener("pointerleave",L),h.addEventListener("pointerdown",F));return a(()=>C,c,e=>{M&&(M.textContent=e.label??""),m.edges=e.edges,!k||q.creatures===e.creatures&&q.seed===e.seed&&q.density===e.density||A(m.w,m.h),q={creatures:e.creatures,seed:e.seed,density:e.density},$(),C?.refresh()},{add(e,t={}){k||A(m.w||800,m.h||450);const n=v(m,e,t.count??("school"===e?28:1),t.size??1);return C?.kick(),n},remove(e){k||A(m.w||800,m.h||450);const t=b(m,e);return C?.kick(),t},get count(){return k||A(m.w||800,m.h||450),m.bodies.length}},()=>{h.removeEventListener("pointermove",E),h.removeEventListener("pointerleave",L),h.removeEventListener("pointerdown",F),M?.remove(),f.restore()})}export{s as OCEAN_KINDS,h as SPECIES,c as SPINE,S as advanceWorld,m as bodyLength,l as bodyWidth,d as createSpine,g as createWorld,b as despawn,R as drawWorld,u as laySpine,D as ocean,w as resizeWorld,x as seeded,v as spawn,P as stepWorld,z as tint};//# sourceMappingURL=chunk-EOTPXDMH.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-LTRVMY3D.js";var n=e({id:"constellation",name:"Constellation",description:"Points wander and neighbours close enough are linked by fine lines that come and go.",cellSize:11,scene:"constellation",charset:" .·:+*#",hover:"lantern",tune:()=>({blend:"off"})});export{n as constellation};//# sourceMappingURL=chunk-6NDTKY3V.js.map
1
+ import{scenePreset as e}from"./chunk-VWFC5XOB.js";var n=e({id:"constellation",name:"Constellation",description:"Points wander and neighbours close enough are linked by fine lines that come and go.",cellSize:11,scene:"constellation",charset:" .·:+*#",hover:"lantern",tune:()=>({blend:"off"})});export{n as constellation};//# sourceMappingURL=chunk-J7TFGVZT.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-LTRVMY3D.js";var t=e({id:"ripple",name:"Ripple",description:"Still water: drops land here and there and ring outward, and the pointer drops its own.",cellSize:11,scene:"ripple",charset:" .·:-~=",hover:"none",extra(e,t){const{host:n}=e;let r=-1e9,i=-1e4,o=-1e4;const s=n=>{const s=performance.now();if(!1===e.settings().cursor||s-r<260||Math.hypot(n.clientX-i,n.clientY-o)<48)return;r=s,i=n.clientX,o=n.clientY;const c=t.canvas.getBoundingClientRect();t.field?.pulse({x:n.clientX-c.left,y:n.clientY-c.top,strength:.5})};return n.addEventListener("pointermove",s,{passive:!0}),()=>n.removeEventListener("pointermove",s)}});export{t as ripple};//# sourceMappingURL=chunk-UXJRBOSR.js.map
1
+ import{scenePreset as e}from"./chunk-VWFC5XOB.js";var t=e({id:"ripple",name:"Ripple",description:"Still water: drops land here and there and ring outward, and the pointer drops its own.",cellSize:11,scene:"ripple",charset:" .·:-~=",hover:"none",extra(e,t){const{host:n}=e;let r=-1e9,i=-1e4,o=-1e4;const s=n=>{const s=performance.now();if(!1===e.settings().cursor||s-r<260||Math.hypot(n.clientX-i,n.clientY-o)<48)return;r=s,i=n.clientX,o=n.clientY;const c=t.canvas.getBoundingClientRect();t.field?.pulse({x:n.clientX-c.left,y:n.clientY-c.top,strength:.5})};return n.addEventListener("pointermove",s,{passive:!0}),()=>n.removeEventListener("pointermove",s)}});export{t as ripple};//# sourceMappingURL=chunk-JSRXW3FL.js.map
@@ -0,0 +1 @@
1
+ import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{parseColor as e,MONO as n,pixelSnap as o,fbm as a,hash2 as r,band as i,ditherIndex as c,toneAlpha as h}from"./chunk-ZCHGV2CV.js";import{hexRgb as s}from"./chunk-I377LEZA.js";function l(t,s,l,f,M={x:.5,y:.5},m={}){const{fontSize:g=13,charAspect:u=.62,lineHeightRatio:d=1.3,chars:p=" .:-=+*#%@",baseColor:x=null,accentColor:$,accentThreshold:b=.52,mouseInfluence:S=.4,mouseFalloff:A=2.8,speed:C=1,vortex:k=!0,sparkles:v=!1,breathe:y=!0,lightMode:z=!1}=m,j=Array.from(p),w=g*u,H=g*d,V=Math.ceil(s/w),I=Math.ceil(l/H),R=M.x,T=M.y,Z=$?e($):null;t.clearRect(0,0,s,l),t.font=`${g}px ${n}`;const q=o(t);t.textBaseline="top";const B=f*C,E=y?.12*(.5*Math.sin(.22*B)+.5):0;for(let e=0;e<I;e++)for(let n=0;n<V;n++){const o=n/V,s=e/I,l=.045,f=.08*B,M=.06,g=.45*((.5*Math.sin(.08*n+.05*e+.6*B)+.5+(.5*Math.sin(.03*n-.07*e+.4*B)+.5)+(.5*Math.sin(.05*n+.03*e+.8*B)+.5))/3)+.35*(.5*a(n*l+f,e*l*1.4-.7*f)+.5)+.2*(.5*Math.sin((n+.65*e)*M+1.1*B)+.5)+E,u=o-R,d=s-T,p=Math.sqrt(u*u+d*d);let $=0;if(k&&p<.35){const t=Math.atan2(d,u),e=Math.sin(4*t+2.2*B-14*p),n=Math.max(0,1-p/.35);$=e*n*n*.22}const C=g*(1-S)+(Math.max(0,1-p*A)+.5*$)*S+.15*$,y=Math.min(1,Math.max(0,C));let F=y;if(v&&y>.72){const t=Math.floor(8*B),o=r(7*n+3*t,11*e+t);o>.88&&(F=Math.min(1,y+4*(o-.88)))}const G=i(F,.32,.9);if(G<=0)continue;const L=c(G,j.length,n,e,m.ditherStrength);if(" "===j[L])continue;const N=h(G);t.fillStyle=Z&&F>b?`rgba(${Z.r},${Z.g},${Z.b},${N})`:x?x.replace("{a}",String(N)):z?`rgba(111,109,103,${N})`:`rgba(143,141,134,${N})`,t.fillText(j[L],q(n*w),q(e*H))}}var f={id:"wave",name:"Wave",description:"An interference field with a soft vortex at the cursor and a slow breath.",cellSize:13,speed:.6,cursor:!0,mount:e=>t(e,(t,e,n,o,a,r)=>{const[i,c,h]=s(r.ink);l(t,e,n,o,a,{ditherStrength:r.ditherStrength,fontSize:r.fontSize,chars:r.chars,lightMode:r.lightMode,baseColor:`rgba(${i},${c},${h},{a})`,accentColor:r.accent})})};export{l as renderWaveBackground,f as wave};//# sourceMappingURL=chunk-KO5NAI4S.js.map
@@ -0,0 +1 @@
1
+ import{vnoise as t}from"./chunk-ZCHGV2CV.js";import{simPreset as s}from"./chunk-ODLKGAX2.js";import{smoothstep as i}from"./chunk-I377LEZA.js";var h=class{constructor(t=1){this.seed=t,this.cols=0,this.rows=0,this.t=0,this.u=new Float32Array(0),this.v=new Float32Array(0),this.ox=new Float32Array(0),this.oy=new Float32Array(0),this.freq=.05,this.live=!1}resize(t,s){this.cols=t,this.rows=s;const i=t*s;this.u=new Float32Array(i),this.v=new Float32Array(i),this.ox=new Float32Array(i),this.oy=new Float32Array(i),this.freq=5/Math.max(t,s),this.live=!1}step(t,s){if(this.t+=t*s*.12,!this.live)return s>0;const{u:i,v:h,ox:o,oy:e}=this,a=Math.exp(1.4*-t),r=Math.exp(.45*-t);let l=0;for(let s=0;s<i.length;s++){o[s]=(o[s]+i[s]*t)*r,e[s]=(e[s]+h[s]*t)*r,i[s]*=a,h[s]*=a;const n=Math.abs(i[s])+Math.abs(h[s])+Math.abs(o[s])+Math.abs(e[s]);n>l&&(l=n)}return l<.02&&(i.fill(0),h.fill(0),o.fill(0),e.fill(0),this.live=!1),s>0||this.live}render(s){const{cols:h,rows:o,ox:e,oy:a,u:r,v:l,freq:n,t:c}=this,M=17.3*this.seed;for(let f=0,m=0;f<o;f++)for(let o=0;o<h;o++,m++){const h=(o+e[m])*n,u=(f+a[m])*n,w=.62*t(h+c+M,u-.6*c)+.28*t(2.3*h-1.4*c,2.3*u+.9*c+M)+.1*t(5.1*h+c,5.1*u),y=Math.min(.45,.03*(Math.abs(r[m])+Math.abs(l[m])));s[m]=.03+.3*i(.5,.8,w)+y*(.4+w)}}move(t,s,i,h){const o=Math.hypot(i,h);o&&this.cols&&this.impulse(t,s,9*i,9*h,2.2*Math.min(o,6),.07*Math.max(this.cols,this.rows))}press(t,s){this.impulse(t,s,0,0,30,.1*Math.max(this.cols,this.rows),40)}impulse(t,s,i,h,o,e,a=0){const{cols:r,rows:l,u:n,v:c}=this,M=Math.ceil(2*e);for(let f=Math.max(0,Math.floor(s-M));f<Math.min(l,Math.ceil(s+M));f++)for(let l=Math.max(0,Math.floor(t-M));l<Math.min(r,Math.ceil(t+M));l++){const M=l-t,m=f-s,u=(M*M+m*m)/(e*e);if(u>4)continue;const w=Math.exp(-u),y=f*r+l,p=Math.sqrt(M*M+m*m)||1;n[y]+=(i-m/e*o+M/p*a)*w,c[y]+=(h+M/e*o+m/p*a)*w}this.live=!0}},o=s({id:"estuary",name:"Estuary",description:"Soft blotches drift on a slow current; the cursor stirs them into swirls that settle back.",cellSize:9,charset:" .·:-=+",detail:1/4,create:t=>new h(t)});export{h as Estuary,o as estuary};//# sourceMappingURL=chunk-LZGSWPH4.js.map
@@ -0,0 +1 @@
1
+ import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{parseColor as o,hash2 as e}from"./chunk-ZCHGV2CV.js";function n(t,n,c,i,a={x:.5,y:.5},r={}){const{fontSize:l=13,chars:s=" ·:;=+*#%@",color:h,accentColor:f,speed:M=1,radius:$=.38,swirl:d=3,lightMode:g=!1}=r,m=f??(g?"#6b8700":"#d4ff00"),p=.62*l,u=1.4*l,x=Math.ceil(n/p),b=Math.ceil(c/u),S=n/c;t.clearRect(0,0,n,c),t.font=`${l}px monospace`,t.textBaseline="top";let y=255,z=255,C=255;if(g&&(y=55,z=55,C=55),h){const t=o(h);t&&(y=t.r,z=t.g,C=t.b)}let V=212,k=255,v=0;const w=o(m);w&&(V=w.r,k=w.g,v=w.b);const A=i*M;for(let o=0;o<b;o++){const n=o/b;for(let c=0;c<x;c++){const i=(c/x-a.x)*S,r=n-a.y,l=Math.sqrt(i*i+r*r)/$;if(l>1){const n=e(3*c,7*o)*Math.max(0,1-3*(l-1));if(n<.62)continue;const i=n*(g?.28:.04);t.fillStyle=`rgba(${y},${z},${C},${i})`,t.fillText(s[1],c*p,o*u);continue}const h=Math.max(0,1-Math.abs(l-(.15+.12*Math.sin(1.1*A)))/.07),f=Math.pow(1-l,2.2),M=Math.min(1,f+.6*h);if(M<.06)continue;const d=Math.floor(M*(s.length-1)),m=s[Math.min(s.length-1,d)],b=h>.35||l<.08,w=g?.85*M:.18*M;t.fillStyle=b?`rgba(${V},${k},${v},${g?.95:.38})`:`rgba(${y},${z},${C},${w})`,t.fillText(m,c*p,o*u)}}}var c={id:"void",name:"Void",description:"A gravity well that spirals characters around the cursor.",cellSize:13,speed:1,cursor:!0,mount:o=>t(o,(t,o,e,c,i,a)=>n(t,o,e,c,i,{fontSize:a.fontSize,chars:a.chars,lightMode:a.lightMode,color:a.ink,accentColor:a.accent}))};export{n as renderVoidBackground,c as voidWell};//# sourceMappingURL=chunk-MZDZ6G75.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-LTRVMY3D.js";var a=e({id:"cascade",name:"Cascade",description:"Streaks fall in three depths: far ones faint and slow, near ones rare, bright and quick.",cellSize:11,scene:"cascade",charset:" .:;|",hover:"lantern",tune:()=>({blend:"off"}),middle:{x:.22,y:.25,width:.56,height:.5,feather:.3,shape:"ellipse"}});export{a as cascade};//# sourceMappingURL=chunk-G3FVDS2A.js.map
1
+ import{scenePreset as e}from"./chunk-VWFC5XOB.js";var a=e({id:"cascade",name:"Cascade",description:"Streaks fall in three depths: far ones faint and slow, near ones rare, bright and quick.",cellSize:11,scene:"cascade",charset:" .:;|",hover:"lantern",tune:()=>({blend:"off"}),middle:{x:.22,y:.25,width:.56,height:.5,feather:.3,shape:"ellipse"}});export{a as cascade};//# sourceMappingURL=chunk-O25QXHEZ.js.map
@@ -0,0 +1 @@
1
+ import{FIELD_GRAPHITE as e,markOf as t,dotCells as n,glyphCells as r}from"./chunk-VWFC5XOB.js";import{mountSurface as a}from"./chunk-I377LEZA.js";var o="button, a, input, select, summary, textarea, label";function i(e){let t=(625341585^Math.floor(2654435761*e))>>>0;return()=>{t=t+1831565813>>>0;let e=Math.imul(t^t>>>15,1|t);return e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}}function s(i){return{id:i.id,name:i.name,description:i.description,cellSize:i.cellSize,speed:i.speed??1,cursor:!0,opacity:i.opacity,mount:s=>function(i,s){const{host:l}=i,c=s.create(1);let u=0,d=0,h=new Float32Array(1),p=null,m=0,v=NaN,f=NaN,g=!1;const k=a({host:l,kit:i.kit,layer:"under",look:()=>{const e=i.settings();return{color:"ink",shade:0,background:"transparent",levels:"none",blend:"on",maxPixelRatio:2,hover:"none",..."dot"===t(e,"glyph")?{mark:"dot",...n(e)}:{mark:"glyph",charset:e.charset??s.charset,...r(e)},clear:!!e.clear&&{element:e.clear,padding:0,feather:.3,shape:"ellipse"},...s.tune?.(e),...e.look}},ink:t=>i.ink(t)??(t?e.dark:e.light),resolution:(e,t)=>{const n=Math.min(s.detail??1/3,240/Math.max(e,t));return[Math.max(8,Math.round(e*n)),Math.max(8,Math.round(t*n))]},reducedMotion:i.reducedMotion,onFail:()=>i.onFail(),paint:({pen:e,width:t,height:n,now:r,still:a})=>{t===u&&n===d||(u=t,d=n,h=new Float32Array(u*d),p=e.createImageData(u,d),c.resize(u,d),g=!1);const o=m?Math.min(.05,Math.max(0,r-m)/1e3):1/60;m=r;const s=i.settings().speed,l=!a&&c.step(o,s);c.render(h);const v=p.data;for(let e=0,t=0;e<h.length;e++,t+=4){const n=h[e]<=0?0:h[e]>=1?255:255*h[e]|0;v[t]=v[t+1]=v[t+2]=n,v[t+3]=255}return e.putImageData(p,0,0),g=!l,g&&(m=0),l}});if(!k)return null;const y=e=>{const t=l.getBoundingClientRect();return t.width&&t.height?[(e.clientX-t.left)/t.width*u,(e.clientY-t.top)/t.height*d]:null},M=e=>!1===i.settings().cursor||k.still()||"undefined"!=typeof Element&&e.target instanceof Element&&!!e.target.closest(o),N=e=>{if(M(e))return;const t=y(e);if(!t)return;const n=Number.isNaN(v)?0:t[0]-v,r=Number.isNaN(f)?0:t[1]-f;v=t[0],f=t[1],c.move?.(t[0],t[1],n,r),k.kick()},E=e=>{if(0!==e.button||M(e))return;const t=y(e);t&&(c.press?.(t[0],t[1]),k.kick())},L=()=>{v=f=NaN,c.leave?.(),k.kick()};return l.addEventListener("pointermove",N,{passive:!0}),l.addEventListener("pointerdown",E),l.addEventListener("pointerleave",L),l.addEventListener("pointercancel",L),{get field(){return k.field},get canvas(){return k.canvas},refresh:()=>k.refresh(),play:()=>{m=0,k.play()},pause:()=>k.pause(),destroy(){l.removeEventListener("pointermove",N),l.removeEventListener("pointerdown",E),l.removeEventListener("pointerleave",L),l.removeEventListener("pointercancel",L),k.destroy()}}}(s,i)}}export{i as rng,s as simPreset};//# sourceMappingURL=chunk-ODLKGAX2.js.map
@@ -0,0 +1 @@
1
+ import{mountCanvas as o}from"./chunk-AAV5QNHU.js";import{parseColor as t,hash2 as l}from"./chunk-ZCHGV2CV.js";import{mixHex as e}from"./chunk-I377LEZA.js";function r(o,e,r,a,i={}){const{fontSize:n=13,baseChars:f="ATCG",bridgeChars:h="-=≡",color:c="#00e5ff",color2:s="#ff4081",bridgeColor:b="#88ffcc",speed:g=1,helixCount:M,lightMode:p=!1}=i,d=.62*n,m=1.4*n,u=Math.ceil(e/d),$=Math.ceil(r/m),x=M??Math.max(1,Math.floor(e/80)),A=u/x,C=t(c)??{r:0,g:229,b:255},S=t(s)??{r:255,g:64,b:129},k=t(b)??{r:136,g:255,b:204};o.clearRect(0,0,e,r),o.font=`${n}px "JetBrains Mono", monospace`,o.textBaseline="top";const z=a*g,I=.35*A;for(let t=0;t<x;t++){const e=A*(t+.5);for(let r=0;r<$;r++){const a=r/$*Math.PI*6-1.8*z,i=e+Math.sin(a)*I,n=e+Math.sin(a+Math.PI)*I,c=Math.round(i),s=Math.round(n);if(c<0||c>=u)continue;const b=l(31*t+7*r,3),g=f[Math.floor(b*f.length)],M=.5*(Math.sin(a)+1),p=.5*(Math.sin(a+Math.PI)+1);if(o.globalAlpha=.35+.65*M,o.fillStyle=`rgb(${C.r},${C.g},${C.b})`,o.fillText(g,c*d,r*m),s>=0&&s<u){const e=l(53*t+11*r,7),a=f[Math.floor(e*f.length)];o.globalAlpha=.35+.65*p,o.fillStyle=`rgb(${S.r},${S.g},${S.b})`,o.fillText(a,s*d,r*m)}if(r%3===0){const e=Math.min(c,s),a=Math.max(c,s);if(a-e>1){const i=l(17*r+43*t,5),n=h[Math.floor(i*h.length)],f=.25*(M+p)+.2;o.globalAlpha=f,o.fillStyle=`rgb(${k.r},${k.g},${k.b})`;for(let t=e+1;t<a;t++)o.fillText(n,t*d,r*m)}}}}o.globalAlpha=1}var a={id:"dna",name:"DNA",description:"Double helices scroll past with base-pair letters.",cellSize:13,speed:1,cursor:!1,mount:t=>o(t,(o,t,l,a,i,n)=>r(o,t,l,a,{fontSize:n.fontSize,color:n.ink,color2:n.accent??e(n.ink,"#ffffff",.55),bridgeColor:e(n.ink,"#0c0d0b",.35)}))};export{a as dna,r as renderDnaBackground};//# sourceMappingURL=chunk-P5M6AQQX.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-LTRVMY3D.js";var r=e({id:"interference",name:"Interference",description:"Two fine ring grids from slowly orbiting centres; where they cross, moiré bands open and close.",cellSize:11,scene:"interference",charset:" .:-=+*#",hover:"lantern"});export{r as interference};//# sourceMappingURL=chunk-M5JJSIWI.js.map
1
+ import{scenePreset as e}from"./chunk-VWFC5XOB.js";var r=e({id:"interference",name:"Interference",description:"Two fine ring grids from slowly orbiting centres; where they cross, moiré bands open and close.",cellSize:11,scene:"interference",charset:" .:-=+*#",hover:"lantern"});export{r as interference};//# sourceMappingURL=chunk-QRSVLQ2I.js.map
@@ -0,0 +1 @@
1
+ import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{parseColor as o,hash2 as e}from"./chunk-ZCHGV2CV.js";function n(t,n,c,l,i={}){const{fontSize:r=13,chars:a="0123456789ABCDEF@#$&*+=/<>",accentColor:s,color:f,speed:h=1,density:g=.55,tailLength:d=14,lightMode:$=!1}=i,p=s??($?"#6b8700":"#d4ff00"),m=.62*r,u=1.4*r,M=Math.ceil(n/m),b=Math.ceil(c/u);t.clearRect(0,0,n,c),t.font=`${r}px monospace`,t.textBaseline="top";let C=255,S=255,x=255;if($&&(C=55,S=55,x=55),f){const t=o(f);t&&(C=t.r,S=t.g,x=t.b)}let z=212,k=255,y=0;const A=o(p);A&&(z=A.r,k=A.g,y=A.b);const V=b+d;for(let o=0;o<M;o++){if(e(17*o,3)>g)continue;const n=(.5+1.5*e(31*o,7))*h,c=e(13*o,11)*V,i=Math.floor((l*n*7+c)%V),r=o*m;for(let n=0;n<=d;n++){const c=i-(d-n);if(c<0||c>=b)continue;const s=c*u,f=e(53*o+Math.floor(5*l+n),7*c),h=a[Math.floor(f*a.length)],g=n/d;if(n===d)t.fillStyle=`rgba(${z},${k},${y},${$?.7:.85})`;else{const o=$?.85*g:.15*g;t.fillStyle=`rgba(${C},${S},${x},${o})`}t.fillText(h,r,s)}}}var c={id:"rain",name:"Rain",description:"Columns of falling characters with bright heads.",cellSize:13,speed:1,cursor:!1,mount:o=>t(o,(t,o,e,c,l,i)=>n(t,o,e,c,{fontSize:i.fontSize,chars:i.chars,lightMode:i.lightMode,color:i.ink,accentColor:i.accent}))};export{c as rain,n as renderRainBackground};//# sourceMappingURL=chunk-RPSE33GI.js.map
@@ -0,0 +1 @@
1
+ import{mountCanvas as o}from"./chunk-AAV5QNHU.js";import{parseColor as t,fbm as e,hash2 as r}from"./chunk-ZCHGV2CV.js";import{mixHex as l}from"./chunk-I377LEZA.js";function n(o,l,n,a,i={}){const{fontSize:c=13,chars:s=" .,:;+*#@",color:f="#4caf50",skyColor:h="#1a237e",peakColor:g="#e0e0e0",speed:p=1,roughness:b=.55,heightScale:M=.55,stars:d=!0,lightMode:m=!1}=i,k=.62*c,u=1.4*c,A=Math.ceil(l/k),x=Math.ceil(n/u),S=t(f)??{r:76,g:175,b:80},$=t(h)??{r:26,g:35,b:126},y=t(g)??{r:224,g:224,b:224};o.clearRect(0,0,l,n),o.font=`${c}px "JetBrains Mono", monospace`,o.textBaseline="top";const C=a*p*.4,z=new Array(A);for(let o=0;o<A;o++){const t=(.5*e((o/A+C)*b*3,.5)+.5)*M;z[o]=Math.floor(t*x)}for(let t=0;t<x;t++)for(let e=0;e<A;e++){const l=x-1-z[e],n=t===l;if(!(t>=l)){if(d){const l=r(7*e+Math.floor(.3*C),13*t);if(l>.97){const r=.3*Math.sin(2*a+100*l)+.7;o.globalAlpha=.5*r,o.fillStyle=`rgb(${$.r+60},${$.g+60},${$.b+80})`,o.fillText("·",e*k,t*u)}}continue}const i=(t-l)/Math.max(1,z[e]),c=s[Math.min(s.length-1,Math.floor(i*s.length))];if(" "===c&&!n)continue;const f=n?1:Math.max(0,1-4*i),h=S.r+(y.r-S.r)*f|0,g=S.g+(y.g-S.g)*f|0,p=S.b+(y.b-S.b)*f|0;o.globalAlpha=.5+.5*i,o.fillStyle=`rgb(${h},${g},${p})`,o.fillText(n?s[s.length-1]:c,e*k,t*u)}o.globalAlpha=1}var a={id:"terrain",name:"Terrain",description:"A side-scrolling landscape drawn in density characters.",cellSize:13,speed:1,cursor:!1,mount:t=>o(t,(o,t,e,r,a,i)=>n(o,t,e,r,{fontSize:i.fontSize,chars:i.chars,lightMode:i.lightMode,color:i.ink,peakColor:i.accent??l(i.ink,"#ffffff",.65),skyColor:l(i.ink,"#0c0d0b",.55)}))};export{n as renderTerrainBackground,a as terrain};//# sourceMappingURL=chunk-RU2KQTTL.js.map
@@ -1 +1 @@
1
- import{scenePreset as r,FIELD_GRAPHITE as e,narrow as t}from"./chunk-LTRVMY3D.js";var a=r({id:"drift",name:"Drift",description:"Characters that drift slowly in broad lobes and stay clear around your content.",cellSize:11,scene:"drift",charset:" .:-=+*#",hover:"trail",graphite:e,middle:!1,feather:.2,tune:r=>({scale:t()?"dot"===r.mark?1.8:1.6:1,brightness:"dot"===r.mark?0:.05,blend:"auto",lantern:{radius:.16,strength:.35,trail:.6,follow:9},trail:{strength:.9,radius:"dot"===r.mark?.4:.32},...r.clear?{clear:{element:r.clear,padding:32,feather:.2,shape:"rect"}}:{}})});export{a as drift};//# sourceMappingURL=chunk-7QH33RJJ.js.map
1
+ import{scenePreset as r,FIELD_GRAPHITE as e,narrow as t}from"./chunk-VWFC5XOB.js";var a=r({id:"drift",name:"Drift",description:"Characters that drift slowly in broad lobes and stay clear around your content.",cellSize:11,scene:"drift",charset:" .:-=+*#",hover:"trail",graphite:e,middle:!1,feather:.2,tune:r=>({scale:t()?"dot"===r.mark?1.8:1.6:1,brightness:"dot"===r.mark?0:.05,blend:"auto",lantern:{radius:.16,strength:.35,trail:.6,follow:9},trail:{strength:.9,radius:"dot"===r.mark?.4:.32},...r.clear?{clear:{element:r.clear,padding:32,feather:.2,shape:"rect"}}:{}})});export{a as drift};//# sourceMappingURL=chunk-UZR3T5XA.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-LTRVMY3D.js";var r=e({id:"aurora",name:"Aurora",description:"Curtains of light at three depths hang from the top in tall vertical rays, brightest along their hems.",cellSize:11,scene:"aurora",charset:" .:¦|",hover:"lantern",tune:()=>({blend:"off"}),middle:{x:.2,y:.42,width:.6,height:.5,feather:.3,shape:"ellipse"}});export{r as aurora};//# sourceMappingURL=chunk-G7GQSPMC.js.map
1
+ import{scenePreset as e}from"./chunk-VWFC5XOB.js";var r=e({id:"aurora",name:"Aurora",description:"Curtains of light at three depths hang from the top in tall vertical rays, brightest along their hems.",cellSize:11,scene:"aurora",charset:" .:¦|",hover:"lantern",tune:()=>({blend:"off"}),middle:{x:.2,y:.42,width:.6,height:.5,feather:.3,shape:"ellipse"}});export{r as aurora};//# sourceMappingURL=chunk-V3J6KJQ2.js.map
@@ -0,0 +1 @@
1
+ import{mountPageField as e}from"./chunk-RGV7VRYC.js";var r=(e,r)=>!1===e.cursor?"none":"string"==typeof e.cursor?e.cursor:r;function t(r,t,n,l){let o=null;if(o=e({host:r.host,kit:r.kit,layer:"under",glyphs:l&&(()=>l(r.settings())),look:e=>{const n=r.settings();return{...t(n,e),...n.look}},ink:e=>r.ink(e)??(e?n.dark:n.light),reducedMotion:r.reducedMotion,onFail:()=>{o=null,r.onFail()}}),!o)return null;const i=o.canvas;return{get field(){return o?.field??null},get canvas(){return o?.canvas??i},refresh(){o?.refresh()},play(){o?.field.play()},pause(){o?.field.pause()},destroy(){o?.destroy(),o=null}}}var n=()=>"number"==typeof innerWidth&&innerWidth<760,l={light:"#86847e",dark:"#7c7a74"},o={light:"#8f8d86",dark:"#64625d"},i=(e,r)=>e.mark??(e.charset||e.look?.charset?"glyph":r),s=e=>({font:'"Geist Mono", ui-monospace, monospace',fontWeight:400,cellSize:e.cellSize,cellAspect:.62,glyphScale:.86}),a=e=>({cellSize:e.cellSize,cellAspect:1,dotScale:.68}),c={x:.18,y:.2,width:.64,height:.6,feather:.3,shape:"ellipse"};function d(e){const{scene:n,charset:o,hover:d,middle:h=c,feather:u=.3,graphite:p=l}=e,g=e.mark??"glyph";return{id:e.id,name:e.name,description:e.description,cellSize:e.cellSize,speed:e.speed??1,cursor:e.cursor??!0,opacity:e.opacity,mount(l){const c=t(l,(t,l)=>{const c=i(t,g);return{scene:n,color:"ink",shade:0,background:"transparent",vignette:0,speed:t.speed,maxPixelRatio:2,levels:"none",blend:"on",..."dot"===c?{mark:"dot",...a(t)}:{mark:"glyph",charset:t.charset??o,...s(t)},hover:r(t,d),lantern:{radius:.14,strength:.45,trail:.8,follow:9},trail:{strength:.8,radius:.35},fluid:{radius:.09,refraction:.03,glow:.6},clear:t.clear?{element:t.clear,padding:0,feather:u,shape:"ellipse"}:h,...e.tune?.(t,l)}},p,"dot"===g?e=>({...s(e),charset:o}):void 0);if(!c||!e.extra)return c;const f=e.extra(l,c),k=c.destroy.bind(c);return Object.assign(c,{destroy(){f(),k()}})}}}export{o as FIELD_GRAPHITE,a as dotCells,s as glyphCells,r as hoverOf,i as markOf,t as mountField,n as narrow,d as scenePreset};//# sourceMappingURL=chunk-VWFC5XOB.js.map
@@ -0,0 +1 @@
1
+ import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{parseColor as o,hash2 as c}from"./chunk-ZCHGV2CV.js";function e(t,e,n,r,a={x:.5,y:.5},i={}){const{fontSize:l=12,chars:s="·-=+|/",accentColor:h,color:f,bands:d=3,speed:g=1,bandWidth:M=.12,glitch:m=!0,lightMode:p=!1}=i,$=h??(p?"#6b8700":"#d4ff00"),b=.62*l,x=1.4*l,u=Math.ceil(e/b),S=Math.ceil(n/x);t.clearRect(0,0,e,n),t.font=`${l}px monospace`,t.textBaseline="top";let z=255,C=255,k=255;if(p&&(z=55,C=55,k=55),f){const t=o(f);t&&(z=t.r,C=t.g,k=t.b)}let y=212,V=255,j=0;const A=o($);A&&(y=A.r,V=A.g,j=A.b);const G=r*g;for(let o=0;o<S;o++)for(let e=0;e<u;e++){const n=o/S,r=((n*d-.5*G)%1+1)%1,i=Math.max(0,1-r/M),l=.35*(.5*c(3*e,7*o)+.5);let h=0;if(m){const t=e/u-a.x,r=n-a.y,i=Math.sqrt(t*t+r*r);if(i<.18){const t=c(11*e+Math.floor(12*G),5*o);h=Math.max(0,1-i/.18)*(t>.5?t-.3:0)}}const f=Math.min(1,l+.8*i+.6*h);if(f<.04)continue;const g=s[Math.floor(f*(s.length-1))],$=i>.55,A=p?.82*f:.12*f;t.fillStyle=$?`rgba(${y},${V},${j},${p?.92:.28})`:`rgba(${z},${C},${k},${A})`,t.fillText(g,e*b,o*x)}}var n={id:"grid",name:"Grid",description:"Scan bands roll down a character grid and glitch near the cursor.",cellSize:12,speed:1,cursor:!0,mount:o=>t(o,(t,o,c,n,r,a)=>e(t,o,c,n,r,{fontSize:a.fontSize,chars:a.chars,lightMode:a.lightMode,color:a.ink,accentColor:a.accent}))};export{n as grid,e as renderGridBackground};//# sourceMappingURL=chunk-VXPUEFYR.js.map
@@ -1 +1 @@
1
- import{mountField as e,hoverOf as t,narrow as r}from"./chunk-LTRVMY3D.js";var a={id:"field",name:"Field",description:"A word becomes the background, drawn by the GPU with a soft wake.",cellSize:13,speed:1,cursor:!0,mount:a=>e(a,(e,a)=>({scene:"flow",levels:"auto",charset:e.charset??" .,:-+"+e.text.replace(/\s+/g,"").toUpperCase(),font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:e.cellSize,cellAspect:.8,glyphScale:.76,color:"ink",shade:a?r()?.1:.4:0,background:"transparent",contrast:1.1,scale:r()?1.6:1,brightness:r()&&a?.08:0,vignette:0,speed:e.speed,maxPixelRatio:2,hover:t(e,"trail"),fluid:{radius:.09,refraction:.04,glow:.7,dissipation:1.3},lantern:{radius:.13,strength:.6,trail:.5,follow:11},trail:{strength:.9,radius:.4}}),{light:"#9a9891",dark:"#7d7b75"})};export{a as wordField};//# sourceMappingURL=chunk-EH4S6T7U.js.map
1
+ import{mountField as e,hoverOf as t,narrow as r}from"./chunk-VWFC5XOB.js";var a={id:"field",name:"Field",description:"A word becomes the background, drawn by the GPU with a soft wake.",cellSize:13,speed:1,cursor:!0,mount:a=>e(a,(e,a)=>({scene:"flow",levels:"auto",charset:e.charset??" .,:-+"+e.text.replace(/\s+/g,"").toUpperCase(),font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:e.cellSize,cellAspect:.8,glyphScale:.76,color:"ink",shade:a?r()?.1:.4:0,background:"transparent",contrast:1.1,scale:r()?1.6:1,brightness:r()&&a?.08:0,vignette:0,speed:e.speed,maxPixelRatio:2,hover:t(e,"trail"),fluid:{radius:.09,refraction:.04,glow:.7,dissipation:1.3},lantern:{radius:.13,strength:.6,trail:.5,follow:11},trail:{strength:.9,radius:.4}}),{light:"#9a9891",dark:"#7d7b75"})};export{a as wordField};//# sourceMappingURL=chunk-W3GINZLK.js.map
@@ -1 +1 @@
1
- import{scenePreset as e}from"./chunk-LTRVMY3D.js";var t=e({id:"caustics",name:"Caustics",description:"Light focused by moving water: fine bright lines that fold, part and meet again.",cellSize:11,scene:"caustics",charset:" .:-=+*#",hover:"lantern",tune:()=>({blend:"off",lantern:{radius:.14,strength:.22,trail:.8,follow:9}})});export{t as caustics};//# sourceMappingURL=chunk-2UOPVMN3.js.map
1
+ import{scenePreset as e}from"./chunk-VWFC5XOB.js";var t=e({id:"caustics",name:"Caustics",description:"Light focused by moving water: fine bright lines that fold, part and meet again.",cellSize:11,scene:"caustics",charset:" .:-=+*#",hover:"lantern",tune:()=>({blend:"off",lantern:{radius:.14,strength:.22,trail:.8,follow:9}})});export{t as caustics};//# sourceMappingURL=chunk-WOKKM6CG.js.map
@@ -1 +1 @@
1
- import{parseColor as t}from"./chunk-ZCHGV2CV.js";import{mountCanvas as o}from"./chunk-AAV5QNHU.js";import{mixHex as e}from"./chunk-I377LEZA.js";function n(o,e,n,a,r={}){const{fontSize:i=13,chars:l=" .,:;i+xX#&@",color:h="#ff4500",hotColor:f="#ffe066",intensity:c=.85,wind:s=0,speed:m=1,lightMode:M=!1}=r,p=.62*i,d=1.4*i,g=Math.ceil(e/p),u=Math.ceil(n/d),b=g*u,x="__fire_heat__",A=o.canvas;let k=A[x];k&&k.length===b||(k=new Float32Array(b),A[x]=k);const S=.18*(.016*m),_=s*m*.8,y=u-1,z=a*m;for(let t=0;t<g;t++){const o=(.6*(.5*Math.sin(.31*t+4.1*z)+.5)+.4*(.5*Math.sin(.73*t-2.7*z)+.5))*c;k[y*g+t]=Math.min(1,o+.15*Math.random()*c),y>0&&(k[(y-1)*g+t]=Math.min(1,.85*o+.1*Math.random()*c))}const C=new Float32Array(b);for(let t=0;t<u-2;t++)for(let o=0;o<g;o++){const e=.4*k[(t+1)*g+o]+.25*k[(t+2)*g+Math.max(0,Math.min(g-1,o+Math.round(_)))]+.175*k[(t+1)*g+Math.max(0,o-1)]+.175*k[(t+1)*g+Math.min(g-1,o+1)];C[t*g+o]=Math.max(0,e-S-.02*Math.random()*m)}for(let t=0;t<g;t++)C[(u-1)*g+t]=k[(u-1)*g+t],u>1&&(C[(u-2)*g+t]=k[(u-2)*g+t]);A[x]=C;const $=t(h)??{r:255,g:69,b:0},j=t(f)??{r:255,g:224,b:102};o.clearRect(0,0,e,n),o.font=`${i}px "JetBrains Mono", monospace`,o.textBaseline="top";for(let t=0;t<u;t++)for(let e=0;e<g;e++){const n=C[t*g+e];if(n<.03)continue;const a=l[Math.min(l.length-1,Math.floor(n*l.length))];if(" "===a)continue;const r=Math.min(1,1.2*n),i=$.r+(j.r-$.r)*r|0,h=$.g+(j.g-$.g)*r|0,f=$.b+(j.b-$.b)*r|0,c=M?1-.3*n:Math.min(1,n+.15);o.globalAlpha=c,o.fillStyle=`rgb(${i},${h},${f})`,o.fillText(a,e*p,t*d)}o.globalAlpha=1}var a={id:"fire",name:"Fire",description:"A cellular flame rising from the bottom edge.",cellSize:13,speed:1,cursor:!1,mount:t=>o(t,(t,o,a,r,i,l)=>n(t,o,a,l.elapsed,{fontSize:l.fontSize,chars:l.chars,color:l.ink,hotColor:l.accent??e(l.ink,"#ffffff",.6),speed:l.speed}),48)};export{a as fire,n as renderFireBackground};//# sourceMappingURL=chunk-NS6HYTQZ.js.map
1
+ import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{parseColor as o}from"./chunk-ZCHGV2CV.js";import{mixHex as e}from"./chunk-I377LEZA.js";function n(t,e,n,a,r={}){const{fontSize:i=13,chars:l=" .,:;i+xX#&@",color:h="#ff4500",hotColor:f="#ffe066",intensity:c=.85,wind:s=0,speed:m=1,lightMode:M=!1}=r,p=.62*i,d=1.4*i,g=Math.ceil(e/p),u=Math.ceil(n/d),b=g*u,x="__fire_heat__",A=t.canvas;let k=A[x];k&&k.length===b||(k=new Float32Array(b),A[x]=k);const S=.18*(.016*m),_=s*m*.8,y=u-1,z=a*m;for(let t=0;t<g;t++){const o=(.6*(.5*Math.sin(.31*t+4.1*z)+.5)+.4*(.5*Math.sin(.73*t-2.7*z)+.5))*c;k[y*g+t]=Math.min(1,o+.15*Math.random()*c),y>0&&(k[(y-1)*g+t]=Math.min(1,.85*o+.1*Math.random()*c))}const C=new Float32Array(b);for(let t=0;t<u-2;t++)for(let o=0;o<g;o++){const e=.4*k[(t+1)*g+o]+.25*k[(t+2)*g+Math.max(0,Math.min(g-1,o+Math.round(_)))]+.175*k[(t+1)*g+Math.max(0,o-1)]+.175*k[(t+1)*g+Math.min(g-1,o+1)];C[t*g+o]=Math.max(0,e-S-.02*Math.random()*m)}for(let t=0;t<g;t++)C[(u-1)*g+t]=k[(u-1)*g+t],u>1&&(C[(u-2)*g+t]=k[(u-2)*g+t]);A[x]=C;const $=o(h)??{r:255,g:69,b:0},j=o(f)??{r:255,g:224,b:102};t.clearRect(0,0,e,n),t.font=`${i}px "JetBrains Mono", monospace`,t.textBaseline="top";for(let o=0;o<u;o++)for(let e=0;e<g;e++){const n=C[o*g+e];if(n<.03)continue;const a=l[Math.min(l.length-1,Math.floor(n*l.length))];if(" "===a)continue;const r=Math.min(1,1.2*n),i=$.r+(j.r-$.r)*r|0,h=$.g+(j.g-$.g)*r|0,f=$.b+(j.b-$.b)*r|0,c=M?1-.3*n:Math.min(1,n+.15);t.globalAlpha=c,t.fillStyle=`rgb(${i},${h},${f})`,t.fillText(a,e*p,o*d)}t.globalAlpha=1}var a={id:"fire",name:"Fire",description:"A cellular flame rising from the bottom edge.",cellSize:13,speed:1,cursor:!1,mount:o=>t(o,(t,o,a,r,i,l)=>n(t,o,a,l.elapsed,{fontSize:l.fontSize,chars:l.chars,color:l.ink,hotColor:l.accent??e(l.ink,"#ffffff",.6),speed:l.speed}),48)};export{a as fire,n as renderFireBackground};//# sourceMappingURL=chunk-XB7XBYHA.js.map
@@ -0,0 +1 @@
1
+ import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{parseColor as e}from"./chunk-ZCHGV2CV.js";function o(t,o,n,c,r={x:.5,y:.5},l={}){const{fontSize:s=14,chars:a=". · ○ ◎ ●",accentColor:i,color:h,rings:f=5,speed:M=1,sharpness:g=4,lightMode:p=!1}=l,m=i??(p?"#007a5e":"#00ffcc");t.clearRect(0,0,o,n),t.textBaseline="middle",t.textAlign="center";const u=o*r.x,d=n*r.y,x=1.6*Math.sqrt(u*u+d*d)+.2*Math.sqrt(o*o+n*n);let $=255,b=255,S=255;if(p&&($=55,b=55,S=55),h){const t=e(h);t&&($=t.r,b=t.g,S=t.b)}let z=0,A=255,C=204;const k=e(m);k&&(z=k.r,A=k.g,C=k.b);const q=a.replace(/ /g,"").split("");if(0===q.length)return;const y=Math.ceil(o/s),V=Math.ceil(n/s);for(let e=0;e<V;e++)for(let o=0;o<y;o++){const n=o*s+.5*s,r=e*s+.5*s,l=n-u,a=r-d,i=Math.sqrt(l*l+a*a)/x;let h=0;for(let t=0;t<f;t++){const e=(c*M*.38+t/f)%1,o=Math.abs(i-e),n=Math.max(0,1-o*x/(s*(12-g)));h+=Math.cos(n*Math.PI*.5)*n}if(h=Math.min(1,h),h<.02)continue;const m=h>.6;t.font=`${s}px monospace`;const k=Math.floor(h*(q.length-1)),y=q[Math.min(k,q.length-1)],V=p?.88*h:.22*h;t.fillStyle=m?`rgba(${z},${A},${C},${Math.min(p?.95:.4,.55*h)})`:`rgba(${$},${b},${S},${V})`,t.fillText(y,n,r)}t.textAlign="left"}var n={id:"pulse",name:"Pulse",description:"Rings of characters ripple out from the cursor.",cellSize:14,speed:1,cursor:!0,mount:e=>t(e,(t,e,n,c,r,l)=>o(t,e,n,c,r,{fontSize:l.fontSize,chars:l.chars,lightMode:l.lightMode,color:l.ink,accentColor:l.accent}))};export{n as pulse,o as renderPulseBackground};//# sourceMappingURL=chunk-XJBVU5QP.js.map
@@ -1 +1 @@
1
- import{scenePreset as e,FIELD_GRAPHITE as r,narrow as t}from"./chunk-LTRVMY3D.js";var a=e({id:"halftone",name:"Halftone",description:"The drifting ground drawn as dots, clear around your content.",cellSize:14,scene:"drift",mark:"dot",charset:" .:-=+*#",hover:"lantern",graphite:r,middle:!1,feather:.2,tune:e=>({scale:t()?1.8:1,blend:"auto",dotScale:.64,lantern:{radius:.16,strength:.35,trail:.6,follow:9},trail:{strength:.9,radius:.4},...e.clear?{clear:{element:e.clear,padding:32,feather:.2,shape:"rect"}}:{}})});export{a as halftone};//# sourceMappingURL=chunk-3H3DJI3M.js.map
1
+ import{scenePreset as e,FIELD_GRAPHITE as r,narrow as t}from"./chunk-VWFC5XOB.js";var a=e({id:"halftone",name:"Halftone",description:"The drifting ground drawn as dots, clear around your content.",cellSize:14,scene:"drift",mark:"dot",charset:" .:-=+*#",hover:"lantern",graphite:r,middle:!1,feather:.2,tune:e=>({scale:t()?1.8:1,blend:"auto",dotScale:.64,lantern:{radius:.16,strength:.35,trail:.6,follow:9},trail:{strength:.9,radius:.4},...e.clear?{clear:{element:e.clear,padding:32,feather:.2,shape:"rect"}}:{}})});export{a as halftone};//# sourceMappingURL=chunk-YFW377RN.js.map