@korial29/tiny-fps 1.7.0 → 1.9.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 (108) hide show
  1. package/dist/assets/{room-RIvmKR68.js → room-DNdwMAUE.js} +31 -15
  2. package/dist/cast-art-DbwsToaQ.js +1 -0
  3. package/dist/index.js +7 -7
  4. package/dist/landfall-CSZGx2iA.js +21 -0
  5. package/dist/local.js +1 -1
  6. package/dist/paint-DipbUTzI.js +4 -0
  7. package/dist/room.js +1 -1
  8. package/dist/server.js +1 -1
  9. package/dist/types/client/armor/clip.d.ts +22 -0
  10. package/dist/types/client/armor/cooking.d.ts +14 -0
  11. package/dist/types/client/armor/details.d.ts +65 -0
  12. package/dist/types/client/armor/fit.d.ts +8 -0
  13. package/dist/types/client/armor/regions.d.ts +304 -0
  14. package/dist/types/client/armor/scratches.d.ts +4 -0
  15. package/dist/types/client/armor/shell.d.ts +46 -0
  16. package/dist/types/client/armor/types.d.ts +37 -0
  17. package/dist/types/client/armor/wear.d.ts +22 -0
  18. package/dist/types/client/armor.d.ts +9 -393
  19. package/dist/types/client/body/constants.d.ts +35 -0
  20. package/dist/types/client/body/create.d.ts +3 -0
  21. package/dist/types/client/body/fingers.d.ts +112 -0
  22. package/dist/types/client/body/glove.d.ts +27 -0
  23. package/dist/types/client/body/hands.d.ts +28 -0
  24. package/dist/types/client/body/hunter.d.ts +26 -0
  25. package/dist/types/client/body/motion.d.ts +42 -0
  26. package/dist/types/client/body/reach.d.ts +65 -0
  27. package/dist/types/client/body/types.d.ts +39 -0
  28. package/dist/types/client/body/wield.d.ts +30 -0
  29. package/dist/types/client/body.d.ts +10 -207
  30. package/dist/types/client/cast-art.d.ts +2 -0
  31. package/dist/types/client/gait/constants.d.ts +34 -0
  32. package/dist/types/client/gait/create.d.ts +3 -0
  33. package/dist/types/client/gait/fists.d.ts +55 -0
  34. package/dist/types/client/gait/maths.d.ts +38 -0
  35. package/dist/types/client/gait/moves.d.ts +129 -0
  36. package/dist/types/client/gait/types.d.ts +59 -0
  37. package/dist/types/client/gait.d.ts +6 -146
  38. package/dist/types/client/gun/ammo.d.ts +21 -0
  39. package/dist/types/client/gun/display.d.ts +32 -0
  40. package/dist/types/client/gun/held.d.ts +75 -0
  41. package/dist/types/client/gun/kinds.d.ts +12 -0
  42. package/dist/types/client/gun/loft.d.ts +16 -0
  43. package/dist/types/client/gun/paint.d.ts +30 -0
  44. package/dist/types/client/gun/railgun.d.ts +34 -0
  45. package/dist/types/client/gun/reload.d.ts +112 -0
  46. package/dist/types/client/gun/rifle.d.ts +54 -0
  47. package/dist/types/client/gun/sidearm.d.ts +32 -0
  48. package/dist/types/client/gun.d.ts +10 -308
  49. package/dist/types/client/hulk/cabin.d.ts +36 -0
  50. package/dist/types/client/hulk/common.d.ts +55 -0
  51. package/dist/types/client/hulk/debris.d.ts +16 -0
  52. package/dist/types/client/hulk/hull.d.ts +81 -0
  53. package/dist/types/client/hulk/inside.d.ts +5 -0
  54. package/dist/types/client/hulk/parts.d.ts +16 -0
  55. package/dist/types/client/hulk/types.d.ts +7 -0
  56. package/dist/types/client/hulk/wings.d.ts +4 -0
  57. package/dist/types/client/hulk.d.ts +8 -18
  58. package/dist/types/client/hunter/animation.d.ts +113 -0
  59. package/dist/types/client/hunter/constants.d.ts +53 -0
  60. package/dist/types/client/hunter/disc.d.ts +33 -0
  61. package/dist/types/client/hunter/harpoon.d.ts +68 -0
  62. package/dist/types/client/hunter/marine.d.ts +14 -0
  63. package/dist/types/client/hunter/model.d.ts +4 -0
  64. package/dist/types/client/hunter/rest.d.ts +7 -0
  65. package/dist/types/client/hunter.d.ts +7 -164
  66. package/dist/types/client/render/camera.d.ts +58 -0
  67. package/dist/types/client/render/constants.d.ts +63 -0
  68. package/dist/types/client/render/scene.d.ts +58 -0
  69. package/dist/types/client/render/shader.d.ts +62 -0
  70. package/dist/types/client/render/shots.d.ts +61 -0
  71. package/dist/types/client/render/types.d.ts +74 -0
  72. package/dist/types/client/render.d.ts +9 -277
  73. package/dist/types/client/sfx/air.d.ts +46 -0
  74. package/dist/types/client/sfx/anthem.d.ts +27 -0
  75. package/dist/types/client/sfx/layers.d.ts +6 -0
  76. package/dist/types/client/sfx/music.d.ts +96 -0
  77. package/dist/types/client/sfx/render.d.ts +10 -0
  78. package/dist/types/client/sfx/sounds.d.ts +180 -0
  79. package/dist/types/client/sfx/synth.d.ts +24 -0
  80. package/dist/types/client/sfx/voices.d.ts +59 -0
  81. package/dist/types/client/sfx.d.ts +8 -325
  82. package/dist/types/client/skin/head.d.ts +120 -0
  83. package/dist/types/client/skin/lofts.d.ts +145 -0
  84. package/dist/types/client/skin/pose.d.ts +102 -0
  85. package/dist/types/client/skin/shape.d.ts +2 -0
  86. package/dist/types/client/skin.d.ts +4 -179
  87. package/dist/types/client/soldier/animate.d.ts +12 -0
  88. package/dist/types/client/soldier/carry.d.ts +28 -0
  89. package/dist/types/client/soldier/common.d.ts +8 -0
  90. package/dist/types/client/soldier/draw.d.ts +12 -0
  91. package/dist/types/client/soldier/grasp.d.ts +28 -0
  92. package/dist/types/client/soldier/hunter.d.ts +38 -0
  93. package/dist/types/client/soldier/runner.d.ts +58 -0
  94. package/dist/types/client/soldier/stance.d.ts +20 -0
  95. package/dist/types/client/soldier/types.d.ts +107 -0
  96. package/dist/types/client/soldier.d.ts +9 -236
  97. package/dist/types/client/xeno/back.d.ts +113 -0
  98. package/dist/types/client/xeno/body.d.ts +63 -0
  99. package/dist/types/client/xeno/common.d.ts +28 -0
  100. package/dist/types/client/xeno/head.d.ts +109 -0
  101. package/dist/types/client/xeno/limbs.d.ts +62 -0
  102. package/dist/types/client/xeno/mouth.d.ts +23 -0
  103. package/dist/types/client/xeno/parts.d.ts +40 -0
  104. package/dist/types/client/xeno/tail.d.ts +107 -0
  105. package/dist/types/client/xeno.d.ts +8 -246
  106. package/package.json +1 -1
  107. package/dist/landfall-n5tpoRmi.js +0 -21
  108. package/dist/paint-BBkY8KO0.js +0 -4
@@ -0,0 +1,4 @@
1
+ import{Dt as e,F as t,St as n,_n as r,bt as i,gn as a,gt as o,hn as s,pn as c,tt as l,vn as u,wt as d}from"./brick-KajeVVVE.js";var f=125,[p,m]=l,{METAL:h,STEEL:g,PAINT:_,WOOD:v,STONE:y,GRATE:b}=c,x=[1,.42,.08],S={sea:0,shore:30,trees:90,east:110,cape:-6,water:0},C={east:S.trees+5,cape:S.cape-4},w={r:7,sunk:2,sections:[[6,36],[44,74],[82,106]],axis:[4,6.25,7.5],spine:2.5,skin:.85},T=e=>{let t=Math.max(1-e*e/(w.r*w.r),0);return Math.max(w.r*Math.sqrt(Math.sqrt(t*Math.sqrt(t))),e>0?w.spine:0)},E=[-4,-2.05,-1.75,0,1.95,2.25,3.6,5,5.5,6,6.5,7],D=[-1.75,2.25,w.r],O=(E.map(e=>[e,T(e)]),[{cut:[[6,7,.7,9],[7,13,.76],[13,20,.9],[20,36,1]],floor:-4.75,holes:[[0,14,20,3],[1,24,29,9],[2,13,18.5,2.3]],tears:[[21,30,-1.75,1.95],[31,36,2.25,5]],fair:[[30,36,3]],crates:[[18.3,-1],[24.2,0],[16.8,1]]},{cut:[[44,74,1]],floor:-5,holes:[[0,51.5,56,3.2],[0,67,70.5,9],[1,44,48,9],[1,60.5,65.5,3],[2,44,47,9],[2,53,58,2.2]],tears:[[57.5,60.5,-4,-2.05],[47.5,55,-1.75,1.95],[64,71,2.25,5]],fair:[[44,47.5,3.2],[55,71,4.4],[71,74,3]],crates:[[54.3,-1],[60.7,0],[56.3,1]]},{cut:[[82,90,1],[90,97,.85]],floor:-5,holes:[[0,86.5,90,3],[1,82,85,9],[2,87.5,91.5,2]],tears:[[84.5,91,-1.75,1.95]],fair:[[82,84.5,2.7],[91,95,1.5]],crates:[[88.3,-1],[83.3,0],[87.7,1]]}]),k={floor:w.axis[1]+O[1].floor,ceil:w.axis[1]+E[1],half:4.525,x:w.sections[1],door:O[1].tears[0],lintel:E[1]-O[1].floor,walls:[],way:2.4},A={root:[45,71],lead:[[71,0],[69,8],[64,18],[61.5,26],[60,26],[59,38],[60.5,38],[59,42],[57.5,46.5],[54,47.5]],trail:[[45,0],[46.5,10],[50,30],[52.5,44],[54,47.5]],span:.78,pieces:[[0,14,0,8.5,6.4,0],[16,30,2,6.8,3.6,.17],[32,47.5,4,3.3,1.6,-.2]],rails:[53.5,58]},j=[[38.5,150.3,2.7,19,.78],[4.5,137,2.5,9]],M=[60,219,4],N=1.25,ee=[[38,237,3.5,2.6,1],[57,242,3,2.2,2],[47,251,4,3,3],[66,254,4.5,3.6,4],[78,241,4,3.4,5],[33,256,2.8,1.8,6],[87,250,5.5,5,7],[97,243,6,6.5,8],[100,256,7.5,9,9],[89,262,7,7,10]],te=(e,n,i)=>{let o=t=>a(e,t,151),s=2*o(1)-1,[c,l]=[(1-s*s)/(1+s*s),2*s/(1+s*s)],u=i-t(i),[d,f]=[n*(.85+.3*o(2)),n*(.6+.3*o(3))],p=t(i)+.7*i,m=[4,8].map(e=>{let[t,n,r]=[2*o(e)-1,.35*o(e+1),2*o(e+2)-1],i=Math.sqrt(t*t+n*n+r*r);return[t/i,n/i,r/i,.7+.2*o(e+3)]}),h=e=>{let t=(e[0]*c+e[2]*l)/d,n=(e[2]*c-e[0]*l)/f,r=e[1]/u,[i,a,o]=[t*t*t*t,r*r*r*r,n*n*n*n];return .25/Math.sqrt(Math.sqrt(i+a+o))+.75/Math.sqrt(Math.sqrt(Math.sqrt(i*i+a*a+o*o)))},g=t=>{if(t[1]<0){let e=Math.sqrt(t[0]*t[0]+t[2]*t[2]);return e<1e-6?p:Math.min(g([t[0]/e,0,t[2]/e])/e,p/-t[1])}let n=h(t);for(let[e,r,i,a]of m){let o=t[0]*e+t[1]*r+t[2]*i;if(o>.001){let t=a*h([e,r,i])/o,s=Math.max(.2-Math.abs(n-t),0)/.2;n=Math.min(n,t)-.05*s*s}}return n*(.95+.08*r(1.3*t[0]+e,1.3*t[2]+1.1*t[1],e+3))};return{reach:g}},ne=Array.from({length:28},(e,t)=>[S.trees+3*a(t,1,7),134+4*t+2*a(t,2,7),.22+.1*a(t,3,7)]),P=e=>Math.min(Math.max(e,0),1),F=e=>P(e)*P(e)*(3-2*P(e)),re=(e,t)=>Math.sqrt(e*e+t*t),ie=[[57,132,61,138,k.floor-.95],[56,171,66,175,1.3],[44,209,76,229,N]],ae=[1.5,1.2],oe=(e,t)=>{let n=Math.abs(t-f),{shore:i,trees:a}=S,o=e>i?2.5*(e-i)/(a-i):(e-i)/10;o+=.9*F((e-46)/24)*(r(e/13,n/13,5)-.45)*F((n-14)/10),o+=F((e-i)/14)*(1-F((e-102)/8))*(ae[1]*P(1-Math.abs(n-12)/5)-ae[0]*(1-F((n-2)/7))),o+=1.8*P(1-re(e-110,n)/9);for(let[t,r,i,a,s]of ie){let c=re(Math.max(t-e,e-i,0),Math.max(r-f-n,f+n-a,0));o=s+(o-s)*F((c-6)/6)}return o},I=(e,t)=>{let[n,r]=[Math.floor(e/4),Math.floor((t-1)/4)],[i,a]=[e/4-n,(t-1)/4-r],o=(e,t)=>Math.fround(oe(4*(n+e),1+4*(r+t))),[s,c]=[o(0,0),o(1,1)];return i>=a?s+(o(1,0)-s)*i+(c-o(1,0))*a:s+(o(0,1)-s)*a+(c-o(0,1))*i},L=(e,t,n,r,i,a,o,s)=>({min:[e,t,n],max:[r,i,a],top:o,side:o,...s?{tint:s}:{}}),R=e=>({...e,ghost:!0}),se=e=>({...e,min:[e.min[0],e.min[1],250-e.max[2]],max:[e.max[0],e.max[1],250-e.min[2]],...e.tint?{tint:e.tint===p?m:e.tint}:{}}),ce=([e,t,n])=>[e,t,250-n],z=(e,...t)=>[...e,...e.map(ce),...t],B=[],V=[],H=(e,t,n)=>(e.push({kind:t,min:n.min,max:n.max}),R(n)),U=(e,t,n,r)=>{let i=[0,.25,.5,.75,1].flatMap(i=>[0,.25,.5,.75,1].map(a=>I(e+(n-e)*i,t+(r-t)*a)));return[Math.max(...i),Math.min(...i)]},W=(e,t,n,r,i,a,o,s)=>{let[c,l]=U(t,n,r,i);return H(B,e,L(t,l-.5,n,r,Math.round(32*(c+a))/32,i,o,s))},G=e=>[(e.min[0]+e.max[0])/2,e.max[1],(e.min[2]+e.max[2])/2],K=(e,t,n,r,i,a,o,s=0)=>{let c=[],l=t,u=(o,s,l)=>{let[u,d]=[Math.max(o,t),Math.min(s,n)];if(d>u&&l<a)for(let[t,n]of l>0?[[-a,-l],[l,a]]:[[-a,a]])c.push(H(V,e,L(u,r,f+t,d,i,f+n,e==`deck`?b:h)))};for(let[e,t,r]of[...o,[n,n,0]])u(l,e,s),u(e,t,r),l=Math.max(l,t);return c},le=w.axis.map(e=>e+w.r),ue=w.sections.slice(1).map(([e],t)=>{let n=w.sections[t][1],[r,i]=U(n,123.5,e,126.5),a=Math.round(32*(Math.max(r,S.water)+1.875))/32;return{x:(n+e)/2,top:a,heap:L(n,i-.5,123.5,e,a,126.5,g,x)}}),de=w.sections.flatMap(([e,t],n)=>[n&&[e,e+1],n<2&&[t-1,t]].filter(e=>e).map(e=>{let[t,r]=e,i=w.axis[n],a=Math.round(16*T(O[n].floor))/16-w.skin;return L(t,i+O[n].floor,f-a,r,i+E[1],f+a,h)})),fe=[36,74].flatMap(e=>{let[t,n]=U(e,128,e+1.2,130.5),r=L(e,n-.5,128,e+1.2,Math.round(32*(t+1.4))/32,130.5,g);return[r,se(r)]}),pe=L(.5,-.3,121,5,.4,129,h),me=[...O.flatMap(({cut:e,floor:t,holes:n,tears:r,fair:i,crates:a},o)=>{let s=w.axis[o],c=[t,...E.filter(e=>e>t+.5)];return[...e.flatMap(([e,a,o,l=w.skin])=>{let u=e=>Math.round(16*o*T(e))/16;return[...K(`deck`,e,a,s-w.r,s+t,u(t),[]),...c.slice(1).flatMap((d,f)=>{let p=c[f],m=D.indexOf(d),h=d<w.r?u(m<0?(p+d)/2:d):o*w.spine,g=p<D[0]?t:p<D[1]?D[0]:D[1];return[...m<0?K(`skin`,e,a,s+p,s+d,h,r.filter(e=>e[2]<=p&&e[3]>=d).map(([e,t])=>[e,t,99]),Math.min(u(d),u(g))-l):K(`deck`,e,a,s+p,s+d,h,n.filter(e=>e[0]==m).map(([,e,t,n])=>[e,t,Math.min(n,h-l)])),...p>=0&&d<=D[1]?i.flatMap(([t,n,r])=>K(`fairing`,Math.max(t,e),Math.min(n,a),s+p,s+d,w.r+r,[],h)):[]]})]}),...a.map(([e,n])=>{let r=s+(D[n]??t);return H(V,`crate`,L(e,r,124.25,e+1.5,r+[1,1.4,2][n+1],125.75,v))})]}),...ue.map(e=>H(V,`heap`,e.heap)),...fe.map(e=>H(V,`frame`,e)),...de.map(e=>H(V,`jam`,e)),H(V,`raft`,pe),R(L(C.east,-10,C.cape-2,C.east+2,40,250-C.cape+2,y))],he=e=>.6-.45*e/47.5,ge=(e,t)=>{let n=e.findIndex(e=>e[1]>t),[r,i]=[e[n-1],e[n]];return r[0]+(i[0]-r[0])*(t-r[1])/(i[1]-r[1])},_e=Array.from({length:6},(e,t)=>{let[n,r,i,,a]=j[0],o=n-7.5+2.5*t,s=r+a*(o+1.25-n);return W(`fallen`,o,s-i-.2,o+2.5,s+i+.2,3.5,h,t?void 0:x)}),ve=[...[G(_e[3]),[j[1][0]-1.5,1.3,j[1][1]+3.5]].flatMap(([e,t,n])=>[[e,t,n,42,1.3,7],[e,t,250-n,42,1.3,7]]),...w.sections.flatMap(([e,t],n)=>[n&&e-.6,n<2&&t+.6].filter(e=>e).map(e=>[+e,w.axis[n]+4.2,125,28,.9,4]))],ye=[.55,2.3],be=(()=>{let[e,t,n,r]=j[1];return H(B,`engine`,L(e-n,-5,t-r/2,e+n,1.4,t+r/2,h,x))})(),q=[H(B,`float`,L(16,-1.6,141,22,.35,144,h)),H(B,`float`,L(10,-.2,138,13,.5,141,h)),H(B,`float`,L(23,-1.6,132.6,26,.2,135,h))],xe=H(B,`pod`,L(M[0]-3,.75,M[1]-3,M[0]+3,4.25,M[1]+3,h)),Se=H(B,`dais`,L(M[0]-2,.75,M[1]-10,M[0]+2,1.3,M[1]-6,_,p)),J=(e,t,n=.4,r)=>W(`crate`,e-1.5,t-1.5,e+1.5,t+1.5,n,v,r),Ce=(e,t)=>[L(e-2.6,3.85,t-2.1,e+2.6,4,t+2.1,_,p),...[-1,1].flatMap(n=>[-1,1].map(r=>L(e+2.5*n-.1,.75,t+2*r-.1,e+2.5*n+.1,3.85,t+2*r+.1,g)))].map(e=>H(B,`shelter`,e)),[we,Te]=[J(49,221),J(71,221)],[Ee,De]=[J(84,185,.4,p),J(33,153,.4,p)],Oe=W(`panel`,67,184.5,70.5,188,.65,h),ke=W(`container`,68.5,176,71.1,182,1.875,h,x),Ae=W(`gear`,68.6,170.6,71,173,2.9,g,[.95,.75,.1]),je=W(`container`,64,164.5,67.5,168,2.6,h,x),Me=W(`gear`,67.6,169.6,72,170.6,1.2,g),Y={camp:[J(76,213),J(40,217)],west:[W(`panel`,44.5,191.5,47.5,194.5,.5,h),W(`container`,33,173.7,39,176.3,2.2,h,x),W(`panel`,41,163.5,44,166.5,.4,h),W(`panel`,25.5,159.5,28.5,162.5,.5,h),W(`panel`,50.5,139.5,53.5,142.5,.4,h),W(`container`,49.5,132.4,52.5,135,2.6,h,x)],east:[W(`panel`,62.5,145.5,65.5,148.5,.4,h),J(80,171),J(85.5,165),J(84,153),W(`panel`,84.5,135.5,87.5,138.5,.4,h)],cover:[W(`panel`,78,156.6,83,157,2.6,h),W(`panel`,30,166.6,35,167,2.2,h),W(`container`,76,190,82,192.6,2.6,h,x)]},Ne=(e,n,r,i,a,o)=>{let{reach:s}=te(a,r,i),c=U(e-.8*r,n-.8*r,e+.8*r,n+.8*r),l=I(e,n)+t(i),u=l+s([0,1,0])-.1,d=(e,t,n)=>{let r=Math.sqrt(e*e+t*t+n*n)||1;return r<=s([e/r,t/r,n/r])},f=(e,t)=>{if(!d(e,t,0))return;let n=n=>{let[i,a]=[0,1.6*r];for(let r=0;r<9;r++){let r=(i+a)/2;d(e,t,n*r)?i=r:a=r}return n*i};return[n(-1),n(1)]},p=[],[m,h]=[r<5?1:r<8?2:3,i<5?1:i<12?2:3];for(let t=c[1]-.5;t<u-.3;t+=h){let i=Math.min(t+h,u);for(let a=-1.5*r;a<1.5*r;a+=m){let r=[.1,.5,.9].flatMap(e=>[Math.max(t,c[1])+.05,i].map(t=>f(a+m*e,t-l)));if(r.every(e=>e)){let s=n+Math.max(...r.map(e=>e[0])),c=Math.min(n+Math.min(...r.map(e=>e[1])),o);c-s>.4&&p.push([e+a,t,s,e+a+m,i,c])}}}return p},X=ee.map(([e,t,n,r,i])=>({at:[e,I(e,t),t],R:n,H:r,s:i,parts:Ne(e,t,n,r,i,250-C.cape)})),Pe=[...A.pieces.flatMap(([e,t,n,r,i,a],o)=>{let s=(e,t=n)=>f+w.r+O[1].fair[1][2]+A.span*e+t,c=Math.ceil((s(t)-s(e))/1.4),l=Math.max(c,Math.ceil((r-i)/.15-1e-9)+1),u=A.pieces[o-1];return[...Array.from({length:l},(n,o)=>{let u=e+(t-e)*(o+.5)/l,d=a*c*((o+.5)/l-.5),[f,p]=[A.trail,A.lead].map(e=>Math.round(8*(ge(e,u)+d))/8),[m,g]=[o,o+1].map(n=>s(e+(t-e)*n/l)),_=r+(i-r)*o/(l-1);return H(B,`wingpiece`,L(f,_-he(u),m,p,_,g,h))}),...u?A.rails.map(t=>{let n=Math.min(u[4],r);return H(B,`rail`,L(t-.225,n-.45,s(u[1],u[2]),t+.225,n,s(e),g))}):[]]}),..._e,be,...q,xe,Se,we,Te,...Ce(49,221),...Ce(71,221),Ee,De,Oe,ke,Ae,Me,je,...Object.values(Y).flat(),...ne.map(([e,t,n])=>{let r=I(e,t);return R(L(e-n,r-1,t-n,e+n,r+9,t+n,v))}),...X.flatMap(e=>e.parts).map(([e,t,n,r,i,a])=>R(L(e,t,n,r,i,a,y))),R(L(-60,-10,250-C.cape,C.east+2,40,250-C.cape+2,y))],Fe={hull:w.sections.map(([e,t],n)=>[e,t,w.axis[n]]),pieces:[...V,...B,...B.map(({kind:e,min:t,max:n})=>({kind:e,min:[t[0],t[1],250-n[2]],max:[n[0],n[1],250-t[2]]}))],crags:[...X,...X.map(e=>({...e,at:[e.at[0],e.at[1],250-e.at[2]],parts:e.parts.map(([e,t,n,r,i,a])=>[e,t,250-a,r,i,250-n])}))]},Ie=[46,54,62,70].flatMap(e=>[[e,N,226,0],[e+4,N,229,0]]),Le=e=>{let t=t=>e?t:ce(t);return{base:t(G(Se)),spawns:e?Ie:Ie.map(([e,t,n])=>[e,t,250-n,Math.PI]),rack:t(G(we)),blade:t(G(Te)),rifle:t(G(Ee)),rail:t(G(De))}},Re=[70.5,w.axis[1]+D[1],128],ze={armor:!0,name:`Landfall`,tag:`Beach · wreck`,lore:`A ship came down across a Caribbean beach, its tail in the lagoon and its nose in the trees. The survivors camp at either end of the sand and fight over the wreck between them.`,brushes:[...Pe,...Pe.map(se),...me],teams:[Le(!0),Le(!1)],packs:z([G(Y.camp[0]),G(Y.west[2]),G(Y.west[4]),G(q[0]),G(Y.east[3])],...ue.map(({x:e,top:t})=>[e,t,f])),ammo:z([G(Oe),G(ke),G(Ae),G(Y.west[0]),G(Y.west[1]),G(Y.west[3]),G(Y.east[0]),G(Y.east[1]),G(Y.east[4])],[51,k.floor,f],[67,k.floor,f]),cells:z([G(Y.camp[1]),G(je),G(q[1]),G(Y.east[2]),Re],[59,k.floor,f]),vests:z([G(be)],[63,le[1],f]),floor:-1.4,water:S.water,fires:ve.map(([e,t,n,,r])=>[e,t,n,.6*r+ye[0],ye[1]]),relief:{hole:[0,0,0,0],bound:[56,f,100,185],cell:4,origin:[0,1],at:oe},sun:{dir:[-.47,.83,.3],color:[3.2,3,2.6]},sky:[[.1,.32,.75],[.55,.75,.9]],fog:[.6,.78,.9,.0012],scenery:`beach`},Be=-1.09,Z=[16,48,120,280,600,1100],[Ve,He]=[.08,-40],[Ue,We]=[[.64,.59,.48],[.3,.25,.15]],Ge=[.1,.2,.12],Q=(e,t,n)=>Math.min(Math.max(e,t),n),Ke=i(d([[0,-1],[1,0],[0,1]],4),[1,1,1]),[qe,Je]=[72,17],Ye=/* @__PURE__ */ new WeakMap,Xe=t=>{let i=Ye.get(t);if(i)return i;let c=t.relief&&u(t.relief),[l,d,f,p,m]=c?[c.x0,c.z0,c.cell,c.nx,c.nz]:[S.sea,0,10,(S.east-S.sea)/10+1,26],h=Z.length,g=(e,t)=>[...Z.map(t=>e-t).reverse(),...Array.from({length:t},(t,n)=>e+n*f),...Z.map(n=>e+(t-1)*f+n)],[_,v]=[g(l,p),g(d,m)],[y,b]=[_.length,v.length],x=new Float64Array(y*b);for(let e=0;e<b;e++)for(let t=0;t<y;t++){let[n,r]=[Q(t-h,0,p-1),Q(e-h,0,m-1)],i=c?c.h[n+r*p]:S.water+.1*(l+n*f-S.shore);x[t+e*y]=Math.max(i-Ve*Math.max(l-_[t],0),He)}let C=(e,t)=>x[Q(e,0,y-1)+Q(t,0,b-1)*y],T=[],E=[];for(let t=0;t<b;t++)for(let n=0;n<y;n++){let[i,a,o]=[_[n],v[t],C(n,t)],[s,l]=[Math.max(n-1,0),Math.min(n+1,y-1)],[u,d]=[Math.max(t-1,0),Math.min(t+1,b-1)],f=c?e([(C(s,t)-C(l,t))/(_[l]-_[s]),1,(C(n,u)-C(n,d))/(v[d]-v[u])]):[0,1,0],p=.92+.16*r(i/11,a/11,5),m=Q((i-S.trees-2)/14,0,1),h=Ue.map((e,t)=>(e+(We[t]-e)*m)*p);T.push([i,c?o:S.water-.02,a,...f,h[0],h[1],-1.09,h[2]]),E.push([i,S.water+.05,a,0,1,0,S.water+.05-o,0,-5,0])}let D=[[],[]],O=c?.hole??[0,0,0,0];for(let e=0;e<b-1;e++)for(let t=0;t<y-1;t++){let[n,r,i,a]=[t+e*y,t+1+e*y,t+1+(e+1)*y,t+(e+1)*y];_[t]>=O[0]&&_[t+1]<=O[2]&&v[e]>=O[1]&&v[e+1]<=O[3]||D[0].push(...T[n],...T[i],...T[r],...T[n],...T[a],...T[i]),Math.min(x[n],x[r],x[i],x[a])<S.water+.05&&D[1].push(...E[n],...E[i],...E[r],...E[n],...E[a],...E[i])}if((e=>{let[t,n,i,a]=[28,S.sea-840,125,560],o=e=>{let n=e/t;return 70*(4*n*(1-n))**.7*(.45+.75*r(5*n,3,9))},s=(e,r)=>[n-60*r,r?o(e):S.water-1,i+(e/t-.5)*a,.6,.8,0,Ge[0],Ge[1],-1,Ge[2]];for(let n=0;n<t;n++)e.push(...s(n,0),...s(n+1,0),...s(n+1,1),...s(n,0),...s(n+1,1),...s(n,1))})(D[0]),c){let e={relief:c};((e,t)=>{let[r,i]=[S.shore+4,w.sections[2][1]];for(let s=0;s<qe;s++){let c=e=>a(s,e,31),[l,u]=[r+(i-r)*c(1),3+(Je-3)*c(2)*c(2)];if(u<w.r+1.5&&w.sections.some(([e,t])=>l>e&&l<t))continue;let[d,f,p]=[125+(c(3)<.5?u:-u),.12+.3*c(4)*c(4),.03+.04*c(5)];n(e,Ke,[l,t(l,d)+.2*f,d],o(7*c(5),0),[0,0,0],[f*(.6+c(6)),.7*f,f],[p,p,p])}})(D[0],(t,n)=>s(e,t,n))}return Ye.set(t,D),D},Ze=e=>Xe(e)[0],Qe=e=>Xe(e)[1],$e=`0.05+0.05*sin(T*.55+q.y*.13+4.*vn(q*.05))`,et=`if(d.y>0.){vec2 q=d.xz/(d.y+.1)*2.+T*.003;float f=vn(q)+.5*vn(q*2.3+5.)+.25*vn(q*5.1);
2
+ f=smoothstep(1.05,1.4,f)*smoothstep(0.,.05,d.y)*(1.-smoothstep(.12,.4,d.y));
3
+ s=mix(s,vec3(1.22,1.2,1.17)*(.8+.3*max(dot(d,O),0.)),f*.9);}`,tt=e=>`{vec2 q=P.xz;float d=C.x-(${$e});if(d<0.)discard;\nfloat ds=length(P-E),pf=length(fwidth(q)),fz=${e},fo;vec3 V=(E-P)/ds;\nvec2 w=q+1.5*vn(q*.09+T*.04),gd=vec2(0);\nfor(int i=0;i<(ds<18.?7:5);i++){float k=.6*exp(.66*float(i)),a=(float(i)-2.)*.8;vec2 dr=vec2(cos(a),sin(a));\ngd+=dr*cos(k*dot(dr,w)-T*sqrt(k)*1.3+a*5.)*(1.-smoothstep(.15,.6,k*pf))*(i<5?.055:.04-.04*smoothstep(6.,18.,ds));}\ngd*=.35+.65*smoothstep(0.,.6,d);\nvec3 n=normalize(vec3(-gd.x,1,-gd.y));float fr=.02+.6*pow(clamp(1.-dot(n,V),0.,1.),5.);\nfloat fn=vn(q*1.7+vec2(T*.12,0))*vn(q*5.-vec2(T*.2,T*.07));\nfo=smoothstep(.03+.06*fn,0.,d)+smoothstep(.3,.55,fn+.3*sin(d*14.+T*.8+3.*vn(q*.3)))*(1.-smoothstep(.05,.4,d));\nfo=min(fo,1.)*(1.-smoothstep(.3,1.2,pf)*.5);\nvec3 tr=exp(-vec3(.42,.07,.055)*d*2.4);\nif(Z>1.5){o=vec4(tr*(1.-fr)*(1.-fo)*(1.-fz),1);return;}\nvec4 sq=W*vec4(P,1);sq.xyz=sq.xyz*.5+.5;\nfloat sv=mix(texture(D,vec4(sq.xy,0,sq.z-.0004)),1.,smoothstep(.8,1.,max(max(abs(sq.x-.5),abs(sq.y-.5)),abs(sq.z-.5))*2.));\nvec3 lw=e(X*max(O.y,0.)*sv+H[0]),r=reflect(-V,n);r.y=abs(r.y)+.25;r=normalize(r);\nvec3 sc=mix(vec3(.02,.42,.5),vec3(.004,.09,.3),1.-exp(-d*.18))*lw*(1.-tr.g*tr.g);\nvec3 c=(sc*(1.-fr)+(K1(r,0.)+sv*X*2.*pow(max(dot(n,nz(O+V)),0.),600.))*fr)*(1.-fo)+fo*.9*lw;\nc=mix(c,F.rgb,fz);if(Vn>0)c=hv(c);o=vec4(c,1);return;}`,$=[(w.sections[1][0]+w.sections[1][1])/2,w.sections[2][1]-2],nt=`{vec2 q=P.xz;float y=P.y-${S.water}.,f1=1.-smoothstep(.3,1.,pw*9.),f2=1.-smoothstep(.3,1.,pw*2.5),f3=1.-smoothstep(.3,1.,pw*80.);\nbw=1.-smoothstep(.08,.3+.12*vn(q*.4),y);\nfloat rp=sin((dot(q,vec2(.95,.3))+1.2*vn(q*.3))*18.)*smoothstep(.3,.7,vn(q*.07+5.))*f1*(1.-.6*bw);\nfloat dr=dot(q,vec2(.27,.86))+2.5*vn(q*.04);\nh+=smoothstep(.4,1.6,y)*(.24*(sin(dr)+.35*sin(2.*dr))*smoothstep(.2,.7,vn(q*.025+7.))+.9*vn(q*.06))+.018*rp+f2*.04*(vn(q*2.2)-.5)+f1*.012*(vn(q*6.+3.)-.5)+(1.-smoothstep(.3,1.,pw*40.))*.006*(vn(q*28.)-.5);\nc*=(.88+.24*vn(q*.13+9.))*(1.+.05*rp+f3*.16*(vn(q*170.)-.5)+f1*.07*(vn(q*37.)-.5));\nc*=mix(vec3(1),vec3(.52,.47,.4),bw);\nif(y<0.){vec2 u=q*3.+vn(q*.8)*2.;float ca=vn(u+T*.3)-vn(u+7.-T*.25);c*=1.+.45*f2*pow(max(1.-abs(ca)*2.5,0.),6.)*smoothstep(0.,-.3,y);}\nfloat wl=0.05-(${$e});bw*=.35+.65*smoothstep(wl+.12,wl,y);float cz=abs(q.y-125.);if(cz<40.){\nfloat ht=max(max(1.-abs(q.x-${$[0]}.)/26.,1.-abs(q.x-${$[1]}.)/14.),0.),\nwd=cz/(1.+1.2*smoothstep(${$[1]-14}.,${$[1]+6}.,q.x))+6.*vn(vec2(q.x*.06,q.y*.15))+30.\n-30.*smoothstep(8.,20.,q.x)*(1.-smoothstep(${$[1]+8}.,${$[1]+26}.,q.x))-3.*ht;\nc*=mix(vec3(1),vec3(.13,.09,.07),(1.-smoothstep(18.,29.,wd))*(.7+.3*vn(q*.7)));\nif(wd<19.){vec2 u=q*2.5+2.*vn(q*.3),ic=floor(u),fc=fract(u);float d1=9.,d2=9.,id=0.;\nfor(int j=0;j<9;j++){vec2 g=vec2(j%3,j/3)-1.,o=ic+g,pt=g+vec2(h3(vec3(o,1)),h3(vec3(o,2)))-fc;float d=dot(pt,pt);\nif(d<d1){d2=d1;d1=d;id=h3(vec3(o,3));}else if(d<d2)d2=d;}\nfloat fk=1.-smoothstep(.3,1.,pw*8.),e=sqrt(d2)-sqrt(d1),fe=fk*min(19.-wd,1.),ck=mix(1.,smoothstep(0.,.1,e),fe),cb=mix(1.,smoothstep(0.,.25,e),fe),a=step(wd+1.5*id,18.),gl=a*smoothstep(.8,.86,vn(q*.3));\nh=cb*mix(h,.02+f2*.012*vn(q*5.),a)*(1.-gl);c*=.4+.6*ck;\nc=mix(c,vec3(1,.94,.88)*(.03+.05*id+.2*ck*vn(q*2.5)*vn(q*9.))*ck*(1.-.7*gl)+vec3(2.,.4,.05)*(1.-ck)*fk*ht*step(.75,id)*smoothstep(9.,4.,cz),a);\nbw=mix(bw,gl,a);}}}`,rt=`c+=bw*k*(.02+.3*fr);`,it=-1.05,at=`{vec2 q=vec2(P.x,abs(n.y)>.7?P.z:P.y*1.3)*.5,d=abs(fract(q)-.5);hk=smoothstep(.25,.55,C.x);
4
+ c*=1.-.4*hk*smoothstep(.006+pw,.006,min(d.x,d.y))*(1.-smoothstep(.02,.09,pw));if(dot(n,E-P)<0.){c*=.18;hk=0.;}}`,ot=e=>`{float ds=length(P-E),fz=${e};vec3 V=(E-P)/ds,n=normalize(N)*sign(dot(N,V));float fr=.07+.8*pow(max(1.-abs(dot(n,V)),0.),4.);\nif(Z>1.5){o=vec4(vec3(.56,.7,.68)*(1.-fr)*(1.-fz),1);return;}\nvec3 c=(K1(reflect(-V,n),0.)+X*3.*pow(max(dot(n,nz(O+V)),0.),300.))*fr;c=mix(c,F.rgb,fz);if(Vn>0)c=hv(c);o=vec4(c,1);return;}`,st=`c+=hk*(mix(vec3(.8,.72,.56),k,smoothstep(-.3,.05,r.y))*(.15+.6*fr)+vec3(.3,.27,.21)*clamp(.5-m.y,0.,1.));`;export{A as C,he as D,T as E,ne as S,ge as T,w as _,nt as a,ee as b,tt as c,Ze as d,ze as f,S as g,ve as h,at as i,rt as l,j as m,st as n,Be as o,D as p,it as r,et as s,ot as t,Qe as u,Fe as v,te as w,O as x,E as y};
package/dist/room.js CHANGED
@@ -1 +1 @@
1
- export { n as MAPS, r as RULES, t as Room } from "./assets/room-RIvmKR68.js";
1
+ export { n as MAPS, r as RULES, t as Room } from "./assets/room-DNdwMAUE.js";
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as Room } from "./assets/room-RIvmKR68.js";
1
+ import { t as Room } from "./assets/room-DNdwMAUE.js";
2
2
  import { WebSocketServer } from "ws";
3
3
  // src/server/index.ts
4
4
  /** `/demo` → "demo", `/` → "default". Undecodable paths are kept as is. */
@@ -0,0 +1,22 @@
1
+ import type { Corner } from './types';
2
+ import type { Region } from './regions';
3
+ /** The angle of the rest point (x, z) round the region's middle line, degrees: + outward on a limb, toward +x on the trunk; from the region's face. */
4
+ export declare const angle: (g: Region, x: number, z: number) => number;
5
+ /** Each triangle in four, by its edges' middles. */
6
+ export declare const split: (tris: Corner[][]) => number[][][];
7
+ /** Where the corner `c` of a moulded plate lies at rest: set off by `m` (moulding()), as a point to test against a region's limits. */
8
+ export declare const landed: (c: Corner, m: number[]) => Corner;
9
+ /** Clips the polygon `poly` to where `f` >= 0 (Sutherland-Hodgman, corners eased along the edges). */
10
+ export declare const clip: (poly: Corner[], f: (c: Corner) => number, bit: number) => Corner[];
11
+ /** How far round past a plate's side a skin triangle may lie and still be cut (degrees). */
12
+ export declare const REACH = 40;
13
+ /** Where a corner keeps the limits it lies on (a bit each): two corners sharing one make an edge of the plate. */
14
+ export declare const BITS = 9;
15
+ export declare const LIMITS: ((c: Corner) => number)[][];
16
+ /** Each region's heights, to pass over the triangles out of all reach at once. */
17
+ export declare const SPANS: number[][];
18
+ /** How many scratches the plates have close up, and their colours: worn to the grey, or paler. */
19
+ export declare const SCRATCHES = 110;
20
+ export declare const WORN: number[][];
21
+ /** The scratches' colours on coloured plates: the white under the paint, and paler. */
22
+ export declare const SCRATCHED: number[][];
@@ -0,0 +1,14 @@
1
+ import type { Skin } from '../skin';
2
+ import type { Recipe } from './types';
3
+ /**
4
+ * The recipe of the armour on the skin `s`, `fine` (curved outlines refined, scratches) or not,
5
+ * pausing (yield) every SLICE skin triangles and before the scratches: the close one takes a
6
+ * third of a second, which preparing() spreads over tasks of their own.
7
+ */
8
+ export declare function cooking(s: Skin, fine: boolean): Generator<undefined, Recipe, undefined>;
9
+ /**
10
+ * The plates' details (the user, 2026-11-13, on a picture of a trooper's armour: discreet, on the
11
+ * chest plate and the forearms): dark strokes drawn as the scratches are. Each is [the part, its
12
+ * middle line across, the angle round it (degrees, 0 the front, + outward), its height, its tilt
13
+ * from upright (degrees), its length, its half width, the side it is on (0: both)].
14
+ */
@@ -0,0 +1,65 @@
1
+ export declare const DETAILS: number[][];
2
+ /**
3
+ * 忍 on the left pec of the ninja's chest piece (the user, 2026-11-13: the hood's ideogram on the
4
+ * chest too), dark, over the vents and read from the front, on him and on her: its middle across
5
+ * (m, - the left) and up, its size, and the trunk's half width and depth there that turn a place
6
+ * across into an angle round it. Hers in the middle of her left breast, in place of its vents
7
+ * (VENTS): her piece is moulded over the dome and set where the skin's normal meets it, so a stroke
8
+ * over the top of the breast landed past the piece's top and was dropped.
9
+ */
10
+ export declare const SIGN: {
11
+ x: number;
12
+ y: number;
13
+ size: number;
14
+ w: number;
15
+ d: number;
16
+ }[];
17
+ /** Each segment of KANJI's strokes as a detail on the left side, for build b (a stroke of the hood is 2.4 mm wide on 3 cm). */
18
+ export declare const SIGNS: number[][][];
19
+ /** The three vents on each pec, as DETAILS, on him and on her: hers on the right alone (SIGN). */
20
+ export declare const VENTS: number[][][];
21
+ /**
22
+ * The ninja's details (the user, 2026-11-13: more detail on his armour), as DETAILS on his own
23
+ * pieces: a seam down the chest piece, what its cut down the sternum leaves of it (NOTCH); a rivet
24
+ * each side of each lame; a groove down each side of the back piece, a rivet each side of each back
25
+ * lame, as the belly's; a band at each end of the bracers with three slits between them; a groove
26
+ * down each shin guard, a rivet each side of its top. And by build, the vents (VENTS) and 忍 on the
27
+ * left pec (SIGNS).
28
+ */
29
+ export declare const NINJA_DETAILS: number[][];
30
+ /**
31
+ * The astronaut's details (the user, 2026-11-13: more detail on his armour), as DETAILS, then 1 for
32
+ * the team's colour (ACCENT) or 0 dark: three rank bars on the left of the chest; a band of the
33
+ * team's colour round each wrist; a patch on the left biceps; a dark control panel on the left
34
+ * forearm with a row of keys beside it; a rivet at each corner of the belly's plate; two grooves
35
+ * down the front of each thigh plate.
36
+ */
37
+ export declare const ASTRO_DETAILS: number[][];
38
+ /**
39
+ * The marine's details (the user, 2026-11-14: coloured buttons, boxes, grooves), as DETAILS, then
40
+ * how far it stands over the plate (a box, walled, when not 0) and its look in `KIT`: a control box
41
+ * on the left of the chest with three lit buttons (none on the belly: smooth, the user); a
42
+ * power box on the back with two lights, two
43
+ * grooves across the small of the back; a box on the outside of each thigh with a light; three
44
+ * lit buttons alone on the left forearm by the wrist (the user: no black box there).
45
+ */
46
+ export declare const MARINE_DETAILS: number[][];
47
+ /** The marine's details' looks: [colour, layer]: the boxes dark and glossy, the buttons lit (green, amber, cyan), the grooves dark. */
48
+ export declare const KIT: [number[], number][];
49
+ /** A detail's colour that is the team's, told by its red under 0 (armor() swaps it). */
50
+ export declare const ACCENT: number[];
51
+ /** A triangle's kind bit: the astronaut's alone (ASTRO_DETAILS). */
52
+ export declare const ASTRO = 16;
53
+ /** A triangle's kind bit: the marine's alone (MARINE_DETAILS). */
54
+ export declare const MARINE = 32;
55
+ /** A triangle's kind bit: in its own colour on any plate (the marine's details). */
56
+ export declare const OWN = 64;
57
+ export declare const DARK: number[];
58
+ /** The longest piece a detail is laid in (m). */
59
+ export declare const PIECE = 0.012;
60
+ /**
61
+ * Adds to the recipe the scratches on the plates of the skin `s`: short strokes at random (the
62
+ * same each time) on its triangles inside a plate, each lying on one triangle, wholly inside its
63
+ * plate, a hair over it, matte. Then its details (DETAILS, and the ninja's NINJA_DETAILS on his own
64
+ * pieces), each tagged with its plate (`tag`): they keep their colour on a plate in a team's.
65
+ */
@@ -0,0 +1,8 @@
1
+ /** The cut down the sternum of his chest piece: how deep at the middle, how far round each side (degrees), and how hollow its sides. */
2
+ export declare const NOTCH: {
3
+ deep: number;
4
+ a: number;
5
+ curve: number;
6
+ };
7
+ /** And his pecs on it: this much of the chest plate's. */
8
+ export declare const FLAT = 0.25;
@@ -0,0 +1,304 @@
1
+ import type { Corner } from './types';
2
+ /** Why a plate applies to a triangle: the trunk, an arm or a leg (both sides). */
3
+ export declare const PART: {
4
+ readonly TRUNK: 0;
5
+ readonly ARM: 1;
6
+ readonly LEG: 2;
7
+ };
8
+ /**
9
+ * A plate's region on the body at rest (metres, -z the front, +x the right): the part it is on,
10
+ * the heights it spans, and the angles round
11
+ * the part it spans (degrees from the front, + outward on a limb, toward +x on the trunk), round
12
+ * the part's middle line at `cx` across (mirrored on the left).
13
+ */
14
+ export interface Region {
15
+ part: number;
16
+ cx: number;
17
+ y: [number, number];
18
+ a: [number, number];
19
+ /** How much further out the plate swells at the rest point (x, y): the chest plate's pecs. */
20
+ swell?: (x: number, y: number, z: number) => number;
21
+ /** Where its angles are measured from, degrees (0 the front): 180 for a plate on the back. */
22
+ face?: number;
23
+ /** Its bottom and top at each angle (degrees from the front, + outward) or rest point, when not level: a leg's opening. */
24
+ low?: (a: number, c: Corner) => number;
25
+ high?: (a: number, c: Corner) => number;
26
+ /** Only on the woman's skin. */
27
+ fem?: boolean;
28
+ /** Only on the man's. */
29
+ man?: boolean;
30
+ /** A round plate: its outline an ellipse in (angle, height), [half the angle, middle height, half height]. */
31
+ round?: [number, number, number];
32
+ /** Cast: the forearm's straight plate rather than the skin's shape (casting()). */
33
+ cast?: boolean;
34
+ /** Moulded: a smooth shell round the trunk rather than the skin's facets (moulding()). */
35
+ mould?: boolean;
36
+ /** The ninja's own armour (the user, 2026-11-13), worn by him alone; he wears no other plate. */
37
+ alone?: boolean;
38
+ /** How far it stands off the skin, when not OFF. */
39
+ off?: number;
40
+ /** On the trunk, its angles are measured round the leg of that side, as a leg's plate's. */
41
+ legs?: boolean;
42
+ /** No plate: the suit's dark ribbed cloth, a hair off the skin, with no wall (the gusset). */
43
+ thin?: boolean;
44
+ /** No plate: the ninja's sash, cloth in its own grey (SASH) off the skin (beltOff()), with no wall. */
45
+ belt?: boolean;
46
+ }
47
+ export declare const smooth: (a: number, b: number, x: number) => number;
48
+ /** A bell either side of the middle line, `c` out, `w` wide: no crease down the middle, as |x| would make. */
49
+ export declare const twin: (x: number, c: number, w: number) => number;
50
+ /**
51
+ * The chest plate's pecs (the user, 2026-11-10: fuller toward the bottom, then the round part too
52
+ * low, flattened): a lobe each side of the sternum, high on the chest, rising from the line under
53
+ * the pecs and fading to the collar, the plate flat below; `PEC` metres at most.
54
+ */
55
+ export declare const PEC = 0.011;
56
+ export declare const pecs: (x: number, y: number) => number;
57
+ /**
58
+ * The woman's chest plate (the user, 2026-11-11: a more feminine armour, with the chest; until then
59
+ * one moulded piece with the sternum filled): a cup each side over the bust skin.ts shapes, `CUP`
60
+ * metres out at most, fullest low with a firm line under it, the sternum left hollow between them.
61
+ */
62
+ export declare const CUP = 0.014;
63
+ /** The cups' fullest height, 3 mm under the bust's (BUST_Y, skin.ts). */
64
+ export declare const CUP_Y = 1.367;
65
+ export declare const bust: (x: number, y: number) => number;
66
+ /**
67
+ * The forearm's plate (the user, 2026-11-13: its shape worked, after a trooper's armour, and down
68
+ * to the wrist, `wrist`, the hand's joint being at 0.92 m): its top is
69
+ * cut low in the crook of the elbow, at `y`, and rises by `rise` round to the elbow's point behind,
70
+ * between the angles `a` round the arm; it flares by `flare` toward the elbow; and a flat ridge
71
+ * `ridge` high runs down its outer side, from `x` out from the body's middle, fading to the wrist.
72
+ * It stands `off` the arm, half a chest plate's thickness (the user, 2026-11-14: thinner).
73
+ */
74
+ export declare const CUFF: {
75
+ wrist: number;
76
+ y: number;
77
+ rise: number;
78
+ a: number[];
79
+ flare: number;
80
+ ridge: number;
81
+ x: number;
82
+ off: number;
83
+ };
84
+ /**
85
+ * The forearm's plate cast straight (the user, 2026-11-14: rectilinear, aggressive, not in rolls
86
+ * over the muscles, still flared): its section a rounded square (`n`, a superellipse) round the
87
+ * arm's line at `cx`, its half sizes across (`x`) and front to back (`z`) in straight lines between
88
+ * the heights `y`: a steep taper from the wrist, then an angular break and the long run to the elbow
89
+ * (the user, 2026-11-14: thin, an angular slope toward the hands, aggressive, down to the end of the
90
+ * wrist, kept thin by its shape: a bevel pressed onto the skin lay on the arm in a tongue), at least
91
+ * `floor` off the skin; then the flare and the ridge. Its end is cut to a point over the back of the
92
+ * hand, an arrow (the user liked it: more), `cut` higher on the inside of the arm, in straight lines.
93
+ */
94
+ export declare const CAST: {
95
+ cx: number;
96
+ y: number[];
97
+ x: number[];
98
+ z: number[];
99
+ floor: number;
100
+ n: number;
101
+ cut: number;
102
+ };
103
+ export declare const vambrace: (x: number, y: number) => number;
104
+ /**
105
+ * The biceps' plate (the user, 2026-11-13: worked too, and thinner; 2026-11-14: thinner again): the
106
+ * heights of its edges' middles, how far they slant (`cut`), and how far it stands off the arm, not
107
+ * OFF.
108
+ */
109
+ export declare const BICEPS: {
110
+ y: number[];
111
+ cut: number;
112
+ off: number;
113
+ };
114
+ /**
115
+ * The briefs (the user, 2026-11-10: round the hips under the belt, the leg's opening rising from the
116
+ * crotch to the hip and lower behind, never between the thighs; 2026-11-12: thinner on the sides,
117
+ * and no glitches; 2026-11-14: their sides up higher toward the hips, then a little less). One opening line for all
118
+ * their pieces, the band on the trunk and the piece on each thigh, by the angle of the rest point
119
+ * round the trunk (0 the front, 180 the back, either side): the pieces met at the border of the
120
+ * trunk's skin and the legs' (0.93 m) on two lines that did not agree, and left gaps, overlaps and
121
+ * slivers there. Their top is at `top` before and behind and climbs to `hip` over the hip between
122
+ * the angles `rise`; the opening, lowest at the crotch, before and behind, rises between the angles
123
+ * `at` to a strap `strap` high under that top.
124
+ */
125
+ export declare const BRIEFS: {
126
+ front: number;
127
+ back: number;
128
+ top: number;
129
+ hip: number;
130
+ strap: number;
131
+ at: number[];
132
+ rise: number[];
133
+ };
134
+ /** The angle round the trunk of a rest point, degrees from the front, either side. */
135
+ export declare const round: (c: Corner) => number;
136
+ /**
137
+ * The seat (the user, 2026-11-14: one piece, rounded, no breach in the middle, then one block): behind,
138
+ * the opening rises over the cleft in a small round arch to `top`, `r` either side of the middle,
139
+ * where the legs' insides rose in a V and parted the seat in two points.
140
+ */
141
+ export declare const SEAT: {
142
+ top: number;
143
+ r: number;
144
+ fill: number;
145
+ w: number;
146
+ y: number[];
147
+ };
148
+ /** How far the inside of a leg is from the angle a round it: 1 there, 0 from 60 degrees off. */
149
+ export declare const inside: (a: number) => number;
150
+ /**
151
+ * The thigh plates' top (the user, 2026-11-13, on a picture of a trooper's hips: a slant from the
152
+ * hip down to the inside of the thigh, a crescent of dark ribbed suit between it and the briefs):
153
+ * a line of its own by the angle round the trunk, on the thighs and up the hips' sides alike, so one
154
+ * line across the border too. Lowest at the inside of the thigh, `front` and `back`, under the
155
+ * crotch; `hip` at the hip, where the briefs' strap climbs on over it; between the angles `at`.
156
+ */
157
+ export declare const THIGH: {
158
+ front: number;
159
+ back: number;
160
+ hip: number;
161
+ at: number[];
162
+ };
163
+ export declare const plates: (_a: number, c: Corner) => number;
164
+ /**
165
+ * The gusset: dark cloth from under the briefs to under the thigh plates' top, where the grey suit
166
+ * showed and, at the crotch, the stripes of the legs' insides. Its bottom is under the plates by
167
+ * `under`, and as low all round the inside of the thigh, where no plate is.
168
+ */
169
+ export declare const GUSSET: {
170
+ under: number;
171
+ off: number;
172
+ tuck: number;
173
+ };
174
+ /**
175
+ * The ninja's belt, a wide sash (the user, 2026-11-24, on a picture: a big cloth belt with folds; it
176
+ * was a narrow band, knotted in front, since 2026-11-17): woven cloth in his shoulder pads' grey
177
+ * (SASH; the user, 2026-11-24: grey as the pads, it was his team's colour for a day) wound
178
+ * round the waist, from the hips up over the bottom of his vest, pleated by the shader (render.ts).
179
+ * Its bottom at the front's middle, rising `rise` to the hips, then down round the back to `back`
180
+ * over the front's; its height, and how far it stands off the skin: over the vest's plates. Its top
181
+ * rolls in to `thin` off the skin over `lip`; the tabard and the skirt (sash.ts) hang from under its
182
+ * bottom. Cut as the gusset is, so drawn on every map, armour or none (armor()'s `bare`).
183
+ */
184
+ export declare const BELT: {
185
+ y: number;
186
+ rise: number;
187
+ back: number;
188
+ h: number;
189
+ off: number;
190
+ lip: number;
191
+ thin: number;
192
+ };
193
+ /** How far the sash stands off the skin at the height y, at the angle a: its top rolled in, a quarter round. */
194
+ export declare const beltOff: (a: number, y: number) => number;
195
+ /** The dark grey of the ninja's sash, and of his face guard and shoulder pads (mask.ts, pads.ts). */
196
+ export declare const SASH: number[];
197
+ /** The cloth: plain black, as the suit's legs (the user, 2026-11-14: it was ribbed in two shades). */
198
+ export declare const CLOTH: number[];
199
+ /**
200
+ * The chest plate's armholes (the user, 2026-11-12: a triangle came through the plate under the
201
+ * armpit; 2026-11-13: small triangles on its sides): the shoulder's skin stands out of the trunk's
202
+ * at the split (1.41 m, skin.ts), and a plate's edge across the two was cut in steps. Its top falls
203
+ * from the neckline's to `low` between the two angles `a`, in one round curve with no corner at
204
+ * either end (the user, 2026-11-17: it fell in two steps, a block and a ledge with walls under the
205
+ * bell), steep enough to be under the split before the shoulder's skin starts (52 degrees). The
206
+ * shoulder's bell (pads.ts) is over what is left bare. The breach that ran across the plate by the
207
+ * armpits (2026-11-13) was the rim of the arm's hole in the trunk's skin: see TURN in cooking().
208
+ */
209
+ export declare const ARMPIT: {
210
+ a: number[];
211
+ low: number;
212
+ round: number[];
213
+ r: number;
214
+ };
215
+ export declare const chestHigh: (a: number) => number;
216
+ /** The marine's shoulder blade plates: ovals `at` degrees either side of the spine, `a` degrees and `h` metres half wide and high, their middle at `y`. */
217
+ export declare const BLADE: {
218
+ at: number;
219
+ a: number;
220
+ y: number;
221
+ h: number;
222
+ };
223
+ /** The gap the user asked between the chest plate and the belly's plate. */
224
+ export declare const GAP = 0.02;
225
+ /**
226
+ * The belly's plate (the user, 2026-11-13: worked, rounder; 2026-11-14: its shape to fit the chest
227
+ * plate's as puzzle pieces fit): its bottom at the middle, how far it goes round each side
228
+ * (degrees: out to under the chest plate's corners), how much its bottom rises to its corners,
229
+ * rounding them off, and how far it domes at its middle.
230
+ */
231
+ export declare const BELLY: {
232
+ y: number;
233
+ a: number;
234
+ round: number;
235
+ dome: number;
236
+ };
237
+ export declare const belly: (x: number, y: number) => number;
238
+ /**
239
+ * The chest plate's bottom (the user, 2026-11-13: dipped at the middle; 2026-11-14: the belly's
240
+ * plate to lock into it): a tab hangs down the middle to `y`, flat out to the first angle of `tab`
241
+ * and rounding up by `drop` to the second; beside it the bottom rises by `rise` more to the sides.
242
+ * The belly's top follows it GAP under, so the tab sits in a notch of the belly's plate.
243
+ */
244
+ export declare const CHEST: {
245
+ y: number;
246
+ drop: number;
247
+ tab: number[];
248
+ rise: number;
249
+ };
250
+ /**
251
+ * The ninja's vest: the bottom of its chest piece at the sides, how far its chevron dips at the
252
+ * middle (and the lames' under it), how far its neckline dips at the middle, its top over the chest
253
+ * on him and on her, the lames' height and the gap between two pieces.
254
+ */
255
+ export declare const VEST: {
256
+ y: number;
257
+ dip: number;
258
+ neck: number;
259
+ top: number[];
260
+ lame: number;
261
+ gap: number;
262
+ };
263
+ /** How far a piece of the vest dips at the angle a: a chevron, its point down the middle. */
264
+ export declare const chevron: (a: number) => number;
265
+ /**
266
+ * The vest's armholes (the user, 2026-11-13: a crack in the chest piece by the armpit): over the
267
+ * trunk's split (1.41 m) the skin is the shoulder's and goes with the arm, away from the piece under
268
+ * it. Its top is down to `y`, under the split, at the angle `a` on him and on her; from the top over
269
+ * the pec it falls there from the angle `fall` (hers sooner, round over each breast); its outer
270
+ * corner rounds off by `corner` between the angles `round`. His holds its height out to the
271
+ * shoulders, over all of the pecs, under the pads (the user, 2026-11-13: it fell from 22 to 42
272
+ * degrees and left their top bare); the skin there is the chest's and the collarbone's, not yet
273
+ * the arm's.
274
+ */
275
+ export declare const ARMHOLE: {
276
+ a: number[];
277
+ y: number;
278
+ fall: number[];
279
+ corner: number;
280
+ round: number[][];
281
+ };
282
+ /**
283
+ * The ninja's back piece (the user, 2026-11-17: one piece as the front's, where plates by halves
284
+ * stood each side of a spine of blocks, with a plate on each flank): its top is at `top` at the
285
+ * spine and rises by `rise` beside it, before it falls (SHIELD).
286
+ */
287
+ export declare const BACK: {
288
+ top: number;
289
+ rise: number;
290
+ };
291
+ /** How far round the lames go, from the front and from the back (degrees): they meet at the flank, a seam between them. */
292
+ export declare const FLANK = 88.5;
293
+ /** The back piece's shield: the angles off the spine between which its top falls. */
294
+ export declare const SHIELD: number[];
295
+ /** How far the ninja's bracers stand off the forearm: half a plate's thickness. */
296
+ export declare const BRACER = 0.006;
297
+ export declare const REGIONS: Region[];
298
+ /** How far the plates stand off the skin: their thickness. */
299
+ export declare const OFF = 0.012;
300
+ /** The astronaut's white, a shade under full: in the moon's sun the plates burnt out to flat white (the user, 2026-11-13). */
301
+ export declare const WHITE: number[];
302
+ /** The plates' edges seen side on: their thickness. */
303
+ export declare const WALL: number[];
304
+ export declare const partOf: (l: number) => 0 | 1 | 2 | -1;
@@ -0,0 +1,4 @@
1
+ import type { Skin } from '../skin';
2
+ import type { Corner, Moulded } from './types';
3
+ import type { Region } from './regions';
4
+ export declare const scratchesOn: (s: Skin, add: (cs: Corner[], offs: number[], swell: Region["swell"], col: number[], layer: number, wall: number, k: number, moulded?: Moulded[]) => void, moulds: (((c: Corner, k: number) => Moulded) | undefined)[], tag: (g: number) => void) => void;
@@ -0,0 +1,46 @@
1
+ import type { Skin } from '../skin';
2
+ import type { Corner, Moulded } from './types';
3
+ import type { Region } from './regions';
4
+ export declare const seeded: (seed: number) => () => number;
5
+ /** The region as the skin's build wears it: the woman's chest plate has her own swell. */
6
+ export declare const shaped: (g: Region, s: Skin) => Region;
7
+ export declare const bell: (a: number, w: number) => number;
8
+ /**
9
+ * Her breasts on the shell (the user, 2026-11-12: a uniform dome each, a little bigger): a round
10
+ * dome each side, `h` out at its middle (x, y) and falling to nothing `r` away, smooth at its rim;
11
+ * it stands in for the skin's bust and bust()'s cups.
12
+ */
13
+ export declare const DOME: {
14
+ x: number;
15
+ y: number;
16
+ r: number;
17
+ h: number;
18
+ };
19
+ export declare const dome: (x: number, y: number) => number;
20
+ /** The ninja's vest has them a little smaller (the user, 2026-11-13): this much of their height. */
21
+ export declare const SLIM = 0.65;
22
+ /**
23
+ * The marine's chest shell swells toward the shoulders (the user, 2026-11-13: the plate on over the
24
+ * top of the pecs, near the shoulders): there the shoulder's skin stands out of the trunk's, and a
25
+ * plate held off it stood a step over the plate under the split. `out` more, from the first angle
26
+ * `a` (degrees) to the second and the first height `y` to the second, so the two are one surface;
27
+ * less again up to the collar piece (`top`), which it would cover.
28
+ */
29
+ export declare const SWELL: {
30
+ out: number;
31
+ a: number[];
32
+ y: number[];
33
+ top: number[];
34
+ };
35
+ /**
36
+ * A moulded plate (the user, 2026-11-12: the chest uneven, as the plate followed every facet of the
37
+ * skin, its creases and the line under the bust): a shell round the trunk (shellOf()), its radius
38
+ * smooth in the angle (even: both sides alike) and the height. Each corner of the region on the
39
+ * skin `s` is set off to the shell, with the shell's normal, turned as the skin turns.
40
+ */
41
+ export declare const moulding: (s: Skin, gi: number) => (c: Corner, k: number, turned?: number) => Moulded;
42
+ /**
43
+ * The forearm's plate on the skin `s` (CAST): each corner set off along the skin's rest normal to
44
+ * the cast's radius, with the cast's normal, as moulding() does the chest's.
45
+ */
46
+ export declare const casting: (s: Skin) => (c: Corner, k: number, turned?: number) => Moulded;
@@ -0,0 +1,37 @@
1
+ /** A corner being clipped: its place at rest, its weights of its skin triangle's corners, its normal at rest, then the limits it lies on (BITS). */
2
+ export type Corner = number[];
3
+ /**
4
+ * A recipe: triangles of corners, each [skin triangle, its three weights, how far off the skin,
5
+ * the slope of the swell at rest (x, y, z), the normal at rest (x, y, z)], and per triangle its
6
+ * colour, layer, whether it is a wall (its normal its own, flat) and its region (-1: a scratch).
7
+ */
8
+ export interface Recipe {
9
+ c: number[];
10
+ t: number[];
11
+ /** The triangles each kind of wearer has (armor()'s `ninja`, astronaut and `bare` bits), listed on first use. */
12
+ k?: Int32Array[];
13
+ /** Their corners, each distinct one once (shared()), by the same wearer. */
14
+ s?: Shared[];
15
+ }
16
+ /**
17
+ * A wearer's corners, each distinct one once: its first number in the recipe's `c` and its turned
18
+ * weights (TURN bits) in `u`, two numbers a corner; in `x` the three of each triangle of its list.
19
+ * Next to each other, triangles share their corners, two or three times over on the marine.
20
+ */
21
+ export interface Shared {
22
+ u: Int32Array;
23
+ x: Int32Array;
24
+ rest: Float64Array;
25
+ }
26
+ export declare const CORNER = 11;
27
+ export declare const TRI = 6;
28
+ /** A triangle's kind, bits: 1 a wall (its normal its own, flat); from TURN on, one for each corner of its skin triangle whose normal is taken the other way. */
29
+ export declare const TURN = 2;
30
+ /** A moulded corner: how far off the skin, the tilt of its normal (rest normal less the shell's), its rest normal. */
31
+ export type Moulded = number[];
32
+ /** A moulded plate's shell: its axis, the fit's weights, its clearance, per build and region. */
33
+ export interface Shell {
34
+ z0: number;
35
+ w: number[];
36
+ clear: number;
37
+ }
@@ -0,0 +1,22 @@
1
+ import type { Skin } from '../skin';
2
+ import type { Out } from '../verts';
3
+ import type { Recipe } from './types';
4
+ /**
5
+ * Takes the recipe of the armour on `s` a slice further (cooking()): true while there is more to
6
+ * do. A step of the renderer's warm-up (render.ts warmSteps()), a task each.
7
+ */
8
+ export declare const preparing: (s: Skin, fine: boolean) => boolean;
9
+ /** The armour's recipe on the skin `s`, `fine` or not (armor()), made now if it is not yet (the rest of it, if preparing() began it): the close one takes a third of a second. */
10
+ export declare const prepare: (s: Skin, fine: boolean) => Recipe;
11
+ /**
12
+ * Appends the armour cut out of the skin `s` drawn into `out` from the float `from` on (skin()
13
+ * writes three vertices per triangle of s.t, in order). Not `fine` (a runner not close by), curved
14
+ * outlines follow the skin's own triangles, unrefined, and there are no scratches. `plate` is the
15
+ * plates' colour (their walls a shade darker): white when absent, the astronaut's, who has his own
16
+ * details in his team's colour `accent` too. The `ninja` wears his own armour.
17
+ */
18
+ /** The recipe on the skin `s` (`fine` or not) and the triangles of it a wearer has (armor()'s rules): its first numbers' indices. */
19
+ export declare const wornOf: (s: Skin, fine: boolean, ninja: boolean, astro: boolean, bare: boolean) => [Recipe, Int32Array];
20
+ /** Each distinct corner's place and normal, six numbers, from frame to frame. */
21
+ export declare let Q: Float64Array<ArrayBuffer>;
22
+ export declare const armor: (out: Out, from: number, s: Skin, fine?: boolean, plate?: number[], ninja?: boolean, accent?: number[], bare?: boolean) => void;