@korial29/tiny-fps 1.8.0 → 1.9.1
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.
- package/dist/cast-art-DbwsToaQ.js +1 -0
- package/dist/index.js +8 -7
- package/dist/landfall-CSZGx2iA.js +21 -0
- package/dist/types/client/armor/clip.d.ts +22 -0
- package/dist/types/client/armor/cooking.d.ts +14 -0
- package/dist/types/client/armor/details.d.ts +65 -0
- package/dist/types/client/armor/fit.d.ts +8 -0
- package/dist/types/client/armor/regions.d.ts +304 -0
- package/dist/types/client/armor/scratches.d.ts +4 -0
- package/dist/types/client/armor/shell.d.ts +46 -0
- package/dist/types/client/armor/types.d.ts +37 -0
- package/dist/types/client/armor/wear.d.ts +22 -0
- package/dist/types/client/armor.d.ts +9 -393
- package/dist/types/client/body/constants.d.ts +35 -0
- package/dist/types/client/body/create.d.ts +3 -0
- package/dist/types/client/body/fingers.d.ts +112 -0
- package/dist/types/client/body/glove.d.ts +27 -0
- package/dist/types/client/body/hands.d.ts +28 -0
- package/dist/types/client/body/hunter.d.ts +26 -0
- package/dist/types/client/body/motion.d.ts +42 -0
- package/dist/types/client/body/reach.d.ts +65 -0
- package/dist/types/client/body/types.d.ts +39 -0
- package/dist/types/client/body/wield.d.ts +30 -0
- package/dist/types/client/body.d.ts +10 -207
- package/dist/types/client/cast-art.d.ts +2 -0
- package/dist/types/client/gait/constants.d.ts +34 -0
- package/dist/types/client/gait/create.d.ts +3 -0
- package/dist/types/client/gait/fists.d.ts +55 -0
- package/dist/types/client/gait/maths.d.ts +38 -0
- package/dist/types/client/gait/moves.d.ts +129 -0
- package/dist/types/client/gait/types.d.ts +59 -0
- package/dist/types/client/gait.d.ts +6 -146
- package/dist/types/client/gun/ammo.d.ts +21 -0
- package/dist/types/client/gun/display.d.ts +32 -0
- package/dist/types/client/gun/held.d.ts +75 -0
- package/dist/types/client/gun/kinds.d.ts +12 -0
- package/dist/types/client/gun/loft.d.ts +16 -0
- package/dist/types/client/gun/paint.d.ts +30 -0
- package/dist/types/client/gun/railgun.d.ts +34 -0
- package/dist/types/client/gun/reload.d.ts +112 -0
- package/dist/types/client/gun/rifle.d.ts +54 -0
- package/dist/types/client/gun/sidearm.d.ts +32 -0
- package/dist/types/client/gun.d.ts +10 -308
- package/dist/types/client/hulk/cabin.d.ts +36 -0
- package/dist/types/client/hulk/common.d.ts +55 -0
- package/dist/types/client/hulk/debris.d.ts +16 -0
- package/dist/types/client/hulk/hull.d.ts +81 -0
- package/dist/types/client/hulk/inside.d.ts +5 -0
- package/dist/types/client/hulk/parts.d.ts +16 -0
- package/dist/types/client/hulk/types.d.ts +7 -0
- package/dist/types/client/hulk/wings.d.ts +4 -0
- package/dist/types/client/hulk.d.ts +8 -18
- package/dist/types/client/hunter/animation.d.ts +113 -0
- package/dist/types/client/hunter/constants.d.ts +53 -0
- package/dist/types/client/hunter/disc.d.ts +33 -0
- package/dist/types/client/hunter/harpoon.d.ts +68 -0
- package/dist/types/client/hunter/marine.d.ts +14 -0
- package/dist/types/client/hunter/model.d.ts +4 -0
- package/dist/types/client/hunter/rest.d.ts +7 -0
- package/dist/types/client/hunter.d.ts +7 -164
- package/dist/types/client/render/camera.d.ts +58 -0
- package/dist/types/client/render/constants.d.ts +63 -0
- package/dist/types/client/render/scene.d.ts +58 -0
- package/dist/types/client/render/shader.d.ts +69 -0
- package/dist/types/client/render/shots.d.ts +61 -0
- package/dist/types/client/render/types.d.ts +74 -0
- package/dist/types/client/render.d.ts +9 -277
- package/dist/types/client/sfx/air.d.ts +46 -0
- package/dist/types/client/sfx/anthem.d.ts +27 -0
- package/dist/types/client/sfx/layers.d.ts +6 -0
- package/dist/types/client/sfx/music.d.ts +96 -0
- package/dist/types/client/sfx/render.d.ts +10 -0
- package/dist/types/client/sfx/sounds.d.ts +180 -0
- package/dist/types/client/sfx/synth.d.ts +24 -0
- package/dist/types/client/sfx/voices.d.ts +59 -0
- package/dist/types/client/sfx.d.ts +8 -325
- package/dist/types/client/skin/head.d.ts +120 -0
- package/dist/types/client/skin/lofts.d.ts +145 -0
- package/dist/types/client/skin/pose.d.ts +102 -0
- package/dist/types/client/skin/shape.d.ts +2 -0
- package/dist/types/client/skin.d.ts +4 -179
- package/dist/types/client/soldier/animate.d.ts +12 -0
- package/dist/types/client/soldier/carry.d.ts +28 -0
- package/dist/types/client/soldier/common.d.ts +8 -0
- package/dist/types/client/soldier/draw.d.ts +12 -0
- package/dist/types/client/soldier/grasp.d.ts +28 -0
- package/dist/types/client/soldier/hunter.d.ts +38 -0
- package/dist/types/client/soldier/runner.d.ts +58 -0
- package/dist/types/client/soldier/stance.d.ts +20 -0
- package/dist/types/client/soldier/types.d.ts +107 -0
- package/dist/types/client/soldier.d.ts +9 -236
- package/dist/types/client/xeno/back.d.ts +113 -0
- package/dist/types/client/xeno/body.d.ts +63 -0
- package/dist/types/client/xeno/common.d.ts +28 -0
- package/dist/types/client/xeno/head.d.ts +109 -0
- package/dist/types/client/xeno/limbs.d.ts +62 -0
- package/dist/types/client/xeno/mouth.d.ts +23 -0
- package/dist/types/client/xeno/parts.d.ts +40 -0
- package/dist/types/client/xeno/tail.d.ts +107 -0
- package/dist/types/client/xeno.d.ts +8 -246
- package/package.json +1 -1
- package/dist/landfall-CXJnap8w.js +0 -21
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{Ct as e,F as t,St as n,_n as r,bt as i,gn as a,hn as o,jt as s,lt as c,pn as l,tt as u,vn as d,wt as f}from"./brick-KajeVVVE.js";import{C as p,D as m,E as h,S as g,T as _,_ as v,b as y,g as b,m as ee,o as te,p as x,r as ne,v as re,w as ie,x as S,y as ae}from"./paint-DipbUTzI.js";import{t as oe}from"./stone-DgvIDb2G.js";var C=(e,t=1,n=1)=>({l:e,c:[t],s:n}),w=(e,t=1,n=-1)=>({l:n,c:e.map(e=>e*t),s:1}),T=125,se=w([.68,.69,.71],1,ne),E=se,D=C(l.STEEL,.45),ce=C(l.METAL,.7),le=w([.03,.03,.035]),O=w([.13,.135,.15]),ue=[.8,.3,.04],de=w([1,.36,.05],1,ne),fe=w([.03,.06,.09],1,c),pe=w([0,0,0],1,-7),me=w([.64,.59,.48],1,te),he=w([1,.62,.25],1,-2),k=[0,-99,0],A=e=>(e=Math.min(Math.max(e,0),1))*e*(3-2*e),j=(e,t)=>[e[0]-t[0],e[1]-t[1],e[2]-t[2]],ge=(e,t)=>[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]],M=e=>{let t=Math.hypot(e[0],e[1],e[2])||1;return[e[0]/t,e[1]/t,e[2]/t]},N=(e,t)=>e.map((e,n)=>(e+t[n])/2),P=(e,t,n=1)=>e.map((e,r)=>e+t[r]*n),F=[0,1,3,2],I=[],_e=(e,t)=>0,ve=(e,t,n,r)=>{if(n.l<0)I.push(e[0],e[1],e[2],t[0],t[1],t[2],n.c[0]*r,n.c[1]*r,n.l,n.c[2]*r);else{let[i,a]=Math.abs(t[1])>.7?[e[0],e[2]]:Math.abs(t[0])>.7?[e[2],e[1]]:[e[0],e[1]];I.push(e[0],e[1],e[2],t[0],t[1],t[2],i*n.s,a*n.s,n.l,Math.min(n.c[0]*r,1.99))}},L=(e,t,n,r=1)=>{let i=[0,0,0];if(e.forEach((t,n)=>{let r=e[(n+1)%e.length];i=P(i,[(t[1]-r[1])*(t[2]+r[2]),(t[2]-r[2])*(t[0]+r[0]),(t[0]-r[0])*(t[1]+r[1])])}),Math.hypot(i[0],i[1],i[2])<1e-9)return;i=M(i);let a=j(N(e[0],e[2]),n);i[0]*a[0]+i[1]*a[1]+i[2]*a[2]<0&&(i=i.map(e=>-e));for(let n=1;n<e.length-1;n++)for(let a of[0,n,n+1])ve(e[a],i,t,typeof r==`number`?r:r[a])},R=(e,t,n,r,i,a=i,o=!1)=>{for(let s=0;s<e.length-1;s++){let c=n(s);c&&L([e[s],e[s+1],t[s+1],t[s]],c,o?P(e[s],j(e[s],r)):r,i&&a?[i[s],i[s+1],a[s+1],a[s]]:1)}},z=(e,t,n,r=n,i=4)=>{let a=N(e,t);for(let o=0;o<6;o++)if(!(i>>o&1)){let[i,s,c]=[o>>1,(1+(o>>1))%3,(2+(o>>1))%3];L(F.map(n=>{let r=[0,0,0];return[r[i],r[s],r[c]]=[(1&o?t:e)[i],(1&n?t:e)[s],(2&n?t:e)[c]],r}),o==3?r:n,a)}},B=(e,t,n,r,i=n)=>{let a=M(j(t,e)),o=M(ge(a,Math.abs(a[1])>.9?[1,0,0]:[0,1,0])),s=ge(o,a),[c,l]=[e,t].map(e=>F.map(t=>P(P(e,o,((1&t)-.5)*n),s,((t>>1)-.5)*i))),u=N(e,t);R([...c,c[0]],[...l,l[0]],()=>r,u),L(c,r,u),L(l,r,u)},V=(e,t,n,r,i,o=1,s=k)=>{for(let c=0;c<r;c++){let[l,u]=[P(e,j(t,e),c/r),P(e,j(t,e),(c+1)/r)];L([l,u,P(N(l,u),n,.3+.7*a(c,7*e[0]+3*e[2]+e[1],11))],i,s,o)}},ye=(e,t,n,r,i,a=0,o=[1,1])=>{let[s,c,l,u]=[e[0]-a,t[0]+a,e[2]-a,t[2]+a],d=e=>[[s+n,l],[c-n,l],[c,l+n],[c,u-n],[c-n,u],[s+n,u],[s,u-n],[s,l+n],[s+n,l]].map(([t,n])=>[t,e,n]),[f,p]=[d(e[1]),d(t[1])];R(f,p,()=>r,N(e,t),f.map(()=>o[0]),f.map(()=>o[1])),i&&L(p.slice(1),i,e)},be=({min:e,max:t})=>{let n=N(e,t);if(_e(n[0],n[2])<.3||e[1]>_e(n[0],n[2]))return;let i=(r,i)=>{let[o,s]=[r+1&2?t[0]+i:e[0]-i,2&r?t[2]+i:e[2]-i],c=_e(o,s);return[o,c+(i?-.04:Math.min(.12+.35*a(r%4,n[0]+n[2],5),t[1]-c)),s]};for(let e=0;e<4;e++){let t=[i(e,0),i(e+1,0),i(e+1,.9),i(e,.9)];L(t,me,k,t.map(e=>.92+.16*r(e[0]/11,e[2]/11,5)))}},xe=(e,t,r,i=[1,1,1])=>n(I,e,t,[[-r[2],0,r[0]],[0,1,0],r],[0,0,0],i),Se=e=>{I=e},Ce=(e,t,n=()=>1,r=!1)=>{let i=(t,n)=>e[Math.min(Math.max(t,0),e.length-1)][Math.min(Math.max(n,0),e[0].length-1)],a=e.map((e,t)=>e.map((e,n)=>{let a=ge(j(i(t+1,n),i(t-1,n)),j(i(t,n+1),i(t,n-1))),o=Math.hypot(a[0],a[1],a[2])*(r?-1:1);return o?[a[0]/o,a[1]/o,a[2]/o]:[0,1,0]}));for(let r=0;r<e.length-1;r++)for(let i=0;i<e[0].length-1;i++){let o=t(r,i);if(o)for(let t of[0,1,3,0,3,2]){let[s,c]=[r+(1&t),i+(t>>1)];ve(e[s][c],a[s][c],o,n(e[s][c]))}}},we=(e,t,n=()=>1)=>{let r=I;Se([]);for(let r=0;r<e.length;r+=6)ve(e.slice(r,r+3),e.slice(r+3,r+6),t,n(e.slice(r,r+3)));let i=I;return Se(r),i},Te=[-7,-6.6,-6,-5,-4,-3,-2.05,-1.75,-.9,0,1,1.95,2.25,2.9,3.6,4.3,5,5.5,6,6.5],Ee=[[2.75,6.72],[2.5,6.93],[2.3,7],[0,7],[0,7]],H=Te.length+Ee.length,De=2*H-2,Oe=e=>Te[e]??Ee[e-Te.length][1],[U,ke,Ae,je]=[92,104,114,2.4],W=x[1],G=(e,t)=>{let n=S[e].cut,r=n[0][2];for(let e=1;e<n.length;e++)r+=(n[e][2]-n[e-1][2])*A((t-n[e][0]+1)/2);let i=e>1?Math.max(t-99,0)/(Ae-99):0;return[r,e>1?A((t-94)/5):0,1-.85*i,je*i]},K=(e,t,n)=>{let[r,i,a]=G(e,t);return(h(n)+((e=>e<0?Math.max(0,7+2*e):e>=5.6?2.38:e>=3.15?4.34-.8*(e-3.15):7-.844*e)(n)-h(n))*i)*r*a},Me=(e,t,n,r,i)=>{let[,a,o,s]=G(e,t);return[t,v.axis[e]-s+(r>0?r*(1-.2*a):Math.max(r,3.5*a-7))*o,T+i*n]},Ne=(e,t,n,r)=>Me(e,t,K(e,t,n),n,r),Pe=(e,t)=>{let n=e>1&&t>U?t<ke?5*(t-U)/12:5*(Ae-t)/10:0,r=Array.from({length:H},(r,i)=>{let a=Oe(i),o=t-n*Math.min(Math.max((a-W)/(7-W),0),1),[s,c,l]=G(e,o),u=Ee[i-Te.length],d=u?(i==H-2?2.5*s-v.skin:Math.min(u[0],u[0]+(2.38-u[0])*c)*s)*l:K(e,o,a);return t=>Me(e,o,d,a,t)});return[...r.map(e=>e(1)),...r.slice(0,-1).reverse().map(e=>e(-1))]},Fe=(e,t,n)=>{let{cut:r,tears:i,holes:a}=S[e],o=[t,n,...i.flatMap(e=>[e[0],e[1]]),...a.filter(e=>e[0]==2).flatMap(e=>[e[1],e[2]]),...r.slice(1).flatMap(e=>[-1,-.33,.33,1].map(t=>e[0]+t))].filter(e=>e>=t&&e<=n).sort((e,t)=>e-t),s=[];return o.forEach((e,t)=>{let n=e-(o[t-1]??e);if(t&&n<.05)return;let r=Math.ceil(n/2);for(let t=1;t<r;t++)s.push(e-n*(r-t)/r);s.push(e)}),s},Ie=[93.5,95,95.3,98,98.3,101,101.3,ke,106.5,109,111.5,113,Ae],Le=[[98.3,101,2.9,5,1],[98.3,101,3.6,5.5,-1]],Re=e=>[S[e].floor,...ae.filter(t=>t>S[e].floor+.5&&t<7)],ze=(e,t,n)=>{let r=Re(e),i=r[Math.min(n,r.length-2)],a=r[Math.min(n,r.length-2)+1],o=i<x[0]?r[0]:i<x[1]?x[0]:x[1];return Math.max(Math.min(h(a),h(o))*G(e,t)[0]-v.skin,.05)},Be=(e,t,n,r)=>[t,v.axis[e]+Re(e)[n],T+r*ze(e,t,n)],Ve=(e,t,n,r,i)=>S[e].tears.some(([e,a,o,s])=>t>=e-.01&&n<=a+.01&&r>=o-.01&&i<=s+.01),He=e=>[...e?[[v.sections[e][0],-1]]:[],...e<2?[[v.sections[e][1],1]]:[]],Ue=e=>{let t=v.axis[e],n=He(e).map(e=>e[0]),{tears:i,holes:a}=S[e];return o=>{let[s,c,l]=[o[0],o[1]-t,Math.abs(o[2]-T)],u=.9*r(s/1.7,o[1]/1.7+o[2]/2.3,9),d=Math.min(9,...n.map(e=>Math.abs(s-e)));for(let[e,t,n,r]of i)l>2.4&&(d=Math.min(d,Math.hypot(Math.max(e-s,s-t,0),Math.max(n-c,c-r,0))));for(let[e,t,n]of a)e==2&&c>5&&(d=Math.min(d,1.4*Math.hypot(Math.max(t-s,s-n,0),.5*l)));return(.1+.9*A((d-u)/1.1))*(.5+.5*A((c+6.3+.5*u)/2.4))*(.93+.07*r(s/5,(o[1]+o[2])/4,4+e))}},We=[[0,1.75,1,2],[.75,1,1,2],[.75,0,1,1],[0,0,1,.25],[0,0,.25,1],[0,1,.25,2],[0,.875,1,1.125]],Ge=[63,102,91,7],Ke=i(f([[0,-.1],[.7,-.1],[1,.6],[1.5,1.4],[1.7,1.8],[1.5,1.72],[.6,.3],[0,.3]],14),[.15,.14,.14]),qe=[[0,0],[11,0],[12.5,1.2],[10.5,8.5],[9.2,10],[6.4,10],[5.2,8.8]],Je=[...qe.slice(0,3),[11.6,4.4],[10.2,3.5],[9,5.2],[7.4,4],[5.9,5.6],[3.3,5.5]],Ye=(e,t,n)=>e.slice(1).forEach((r,i)=>V(e[i],r,t,2,E,.14,n)),Xe=(e,t)=>{let[n,r]=v.sections[e],i=v.axis[e],o=e>1?[...Fe(e,n,U),...Ie]:Fe(e,n,r),s=Ue(e),c=e=>[e,i,T];if(Ce(o.map(t=>Pe(e,t)),(n,r)=>{let i=(e=>e<H-1?e:De-1-e)(r),[a,s,c,l]=[o[n],o[n+1],Oe(i),Oe(i+1)];if(i==H-2?((e,t,n)=>S[e].holes.some(([e,r,i])=>e==2&&t>=r-.01&&n<=i+.01))(e,a,s):Ve(e,a,s,c,l)||e>1&&((e,t,n,r,i)=>Le.some(([a,o,s,c,l])=>l==i&&e>=a-.01&&t<=o+.01&&n>=s-.01&&r<=c+.01))(a,s,c,l,r<H-1?1:-1))return;let u=a>=U&&s<=ke&&s-a>.5&&c>=W&&(l<=6.5||i>H-4&&a>=98);return t||u?t&&u?pe:void 0:c==-.9?de:E},s),t)return;let l=Re(e);for(let t of[-1,1])for(let[n,r,a,s]of S[e].tears){let u=l.map((e,t)=>[e,t]).filter(([e])=>e>=a&&e<=s),d=[(n+r)/2,i+(a+s)/2,T+6*t];for(let[i,a]of[[n,.4],[r,-.4]]){let n=u.map(([n])=>Ne(e,i,n,t));R(n,u.map(([,n])=>Be(e,i,n,t)),e=>1&e?D:O,d,void 0,void 0,!0),Ye(n,[a,0,.12*t],c(i))}let f=o.filter(e=>e>=n&&e<=r);for(let[[r,i],a]of[[u[0],.35],[u[u.length-1],-.35]]){let o=f.map(n=>Ne(e,n,r,t));R(o,f.map(n=>Be(e,n,i,t)),e=>1&e?D:O,d,void 0,void 0,!0),Ye(o,[0,a,.12*t],c(n))}}for(let[t,n]of He(e)){let r=Pe(e,t);R(r,r.map((t,r)=>P(t,[n*(.15+1.1*a(r,e,3+n)),0,0])),()=>E,c(t),r.map(()=>.1));for(let r of[-1,1])R(l.map(n=>Ne(e,t,n,r)),l.map((n,i)=>Be(e,t,i,r)),e=>1&e?D:O,c(t-9*n))}},Ze=[0,99,0],Qe=(e,t,n,r,i)=>F.map(a=>[1&a?t:e,n,2&a?i:r]),$e=w([.3,.31,.16]),et=w([.15,.16,.085]),q=w([.17,.17,.18]),J=w([.13,.135,.145]),tt=w([.2,.21,.12]),nt=w([.06,.22,.12],1,-2),rt=w([.3,.15,.02],1,-2),Y=w([.02,.025,.03]),X=(e,t,n,r)=>{let i=M(j(t,e)),a=M(ge(i,Math.abs(i[1])>.9?[1,0,0]:[0,1,0])),o=ge(a,i),s=.58*n,c=[0,1,2,0].map(e=>P(P([0,0,0],a,s*Math.cos(2.0944*e)),o,s*Math.sin(2.0944*e)));R(c.map(t=>P(e,t)),c.map(e=>P(t,e)),()=>r,N(e,t))},Z=(e,t,n,r,i,a=i)=>{let o=n=>P(P(P(e,t[0],n[0]),t[1],n[1]),t[2],n[2]),s=o(N(n,r));for(let e=0;e<6;e++){let[t,c,l]=[e>>1,(1+(e>>1))%3,(2+(e>>1))%3];L(F.map(i=>{let a=[0,0,0];return[a[t],a[c],a[l]]=[(1&e?r:n)[t],(1&i?r:n)[c],(2&i?r:n)[l]],o(a)}),e==3?a:i,s)}},it=(e,t,n)=>e.map(e=>{let[r,i]=[Math.cos(n),Math.sin(n)],a=(1-r)*(t[0]*e[0]+t[1]*e[1]+t[2]*e[2]),o=ge(t,e);return[0,1,2].map(n=>e[n]*r+o[n]*i+t[n]*a)}),at=(e,t,n,r,i)=>{let o=(e,t,a)=>[e,n+t,T+i*(r-a)],s=[0,n,T+i*(r+9)],[c,l,u]=[.22,.64,.55],d=Math.floor((t-e)/u),f=(e+t-d*u)/2,p=f+d*u;X(o(f,1.2,c-.03),o(p,1.2,c-.03),.045,q),X(o(f,.46,c),o(p,.46,c),.04,q),X(o(f,.45,l),o(p,.45,l),.04,q);for(let e=0;e<=d;e+=2){let t=f+e*u;X(o(t,0,l-.1),o(t,.45,l),.035,q),X(o(t,.46,c),o(t,1.2,c-.03),.03,q)}for(let e=0;e<d;e++){let[t,r]=[f+e*u+.035,f+(e+1)*u-.035],d=Math.round(20*t)+(i>0?7919:0),p=a(d,Math.round(4*n),61),m=.85+.3*a(d,3,62);if(p<.95){L([o(t,.5,c+.015),o(r,.5,c+.015),o(r,1.17,c),o(t,1.17,c)],et,s,m);for(let e of[.3,.7]){let n=t+e*(r-t);L([o(n-.03,.5,c+.03),o(n+.03,.5,c+.03),o(n+.03,1.17,c+.02),o(n-.03,1.17,c+.02)],$e,s,m)}for(let e of[.7,.98])L([o(t,e,c+.035),o(r,e,c+.035),o(r,e+.1,c+.035),o(t,e+.1,c+.035)],$e,s,m)}if(p<.58){let e=[o(t,.46,c),o(r,.46,c),o(r,.42,(c+l)/2),o(t,.42,(c+l)/2)];L(e,$e,k,m),L([e[3],e[2],o(r,.45,l),o(t,.45,l)],$e,k,m)}else p<.84?L([o(t,.5,c+.07),o(r,.5,c+.07),o(r,.92,c+.09),o(t,.92,c+.09)],$e,s,.8*m):p<.93&&L([o(t,.46,c),o(r,.46,c),o(r-.04,.08,c+.18),o(t+.06,.1,c+.2)],$e,s,.75*m);if(a(d,5,63)<.3){let e=t+(r-t)*(.25+.5*a(d,6,64)),n=.15+.2*a(d,7,65),i=.06*(a(d,8,66)-.5);L([o(e-.025,.44,l+.02),o(e+.025,.44,l+.02),o(e+.025+i,n,l+.05),o(e-.025+i,n,l+.05)],et,s,m),L([o(e-.04+i,n,l+.055),o(e+.04+i,n,l+.055),o(e+.04+i,n-.06,l+.055),o(e-.04+i,n-.06,l+.055)],q,s)}}},ot=[[1,-1,44.6,57.1],[1,-1,60.9,73.4],[1,0,44.6,47.3],[1,0,55.3,66.8],[1,0,70.7,73.4],[2,-1,82.6,88.9],[2,-1,91.1,94.5],[2,0,91.2,94.5]],st=()=>{Se([]),Xe(2,`glass`);let e=v.axis[2];for(let[t,n,r,i,a]of Le){let o=Te.indexOf(r),s=Te.indexOf(i),c=(e,t)=>Pe(2,e)[a>0?t:De-t],l=[Array.from({length:s-o+1},(e,n)=>c(t,o+n)),Array.from({length:s-o+1},(e,t)=>c(n,o+t)),[c(t,o),c(n,o)],[c(t,s),c(n,s)]],u=N(N(c(t,o),c(n,s)),N(c(n,o),c(t,s)));for(let t of l)t.slice(1).forEach((n,r)=>{let i=M(j(u,N(t[r],n)));V(t[r],n,i.map(e=>.45*e),3,pe,1,[t[r][0],e,T])})}return I},ct=()=>{for(let[e,t,n,r]of ot){let i=t<0?0:Re(e).indexOf(x[t]);for(let t of[-1,1])at(n,r,v.axis[e]+Re(e)[i],ze(e,(n+r)/2,i),t)}(()=>{let e=v.axis[2],t=e+W,n=n=>{let[,r,i,a]=G(2,n);return K(2,n,(t-e+a)/((1-.2*r)*i))},r=[97,98.5,100,101.4];r.slice(1).forEach((e,i)=>{let[a,o]=[r[i],e].map(e=>n(e)-.12);L([[r[i],t,T-a],[e,t,T-o],[e,t,T+o],[r[i],t,T+a]],C(l.METAL,.3),k)});let i=[1,0,0],o=[0,1,0],s=[0,0,1];for(let e of[-1,1]){let n=[98.35,t,T+.85*e],r=[i,o,s];e<0&&(r=it(it(r,i,-.32),o,.35),n[1]+=.06),Z(n,r,[-.2,0,-.17],[.2,.32,.17],J),Z(n,r,[-.26,.32,-.26],[.27,.44,.26],tt);let a=it(r,r[2],.22),c=P(P(n,r[0],-.24),r[1],.42);Z(c,a,[-.13,0,-.26],[0,.82,.26],tt),Z(c,a,[-.12,.84,-.16],[.03,1.08,.16],J);for(let e of[-.24,.24]){let t=e=>P(P(P(c,a[0],e[0]),a[1],e[1]),a[2],e[2]);L([t([.01,.8,.5*e-.04]),t([.01,.8,.5*e+.04]),t([.02,.05,.7*e+.04]),t([.02,.05,.7*e-.04])],et,t([-1,.4,0]));let i=e=>P(P(P(n,r[0],e[0]),r[1],e[1]),r[2],e[2]);X(i([-.22,.68,1.25*e]),i([.2,.68,1.25*e]),.06,J),X(i([.14,.68,1.25*e]),i([.14,.42,1.1*e]),.035,q)}}Z([98.75,t,T],[i,o,s],[0,0,-.22],[1.7,.66,.22],J);for(let e=0;e<4;e++){let n=[99.15+(e==1||e==2?.12:0),t+.66,124.87+.26*e/3],r=P(n,[e%3?.16:-.1,.24,0]);X(n,r,.035,q),Z(r,[i,o,s],[-.035,-.02,-.04],[.035,.05,.04],e<2?tt:Y)}for(let e=0;e<3;e++)L(Qe(99.6+.3*e,99.82+.3*e,t+.665,124.85,125.15),e==1?rt:Y,k);let c=it([i,o,s],s,.28);Z([100.45,t,T],c,[0,0,-1.75],[.85,.92,1.75],J),Z(P([100.45,t,T],c[1],.92),c,[-.18,0,-1.6],[.6,.07,1.6],Y);for(let e=0;e<2;e++)for(let n=0;n<9;n++){let r=3*n/8-1.5,i=n==3||n==5?.17:.1,o=a(n,e,71),s=n==4?Y:o<.45?nt:o<.55?rt:Y,l=P(P([100.45,t,T],c[1],.38+.3*e),c[0],-.005);L(F.map(e=>P(P(l,c[1],(2&e?1:-1)*(i-.02)),c[2],r+(1&e?i:-i))),s,P(l,[9,0,0]))}let u=it([i,o,s],s,-.35),d=[99.1,Me(2,97.6,0,v.r,1)[1]-.75,T];Z(d,u,[-1.6,-.07,-.5],[0,.07,.5],J,Y);for(let e=0;e<5;e++){let t=P(P(d,u[0],-.2-.3*e),u[1],-.075);L(F.map(n=>P(P(t,u[0],1&n?.1:-.1),u[2],(2&n?.3:-.3)+.08*(e-2))),e==1?rt:e==3?nt:Y,P(t,u[1],9))}for(let e=0;e<4;e++){let t=P(d,u[0],-.4-.35*e);X(t,P(t,[.1*(e-1.5),-.5-.4*a(e,1,72),.15*(e-1.5)]),.03,1&e?le:q)}Z([97.5,t,125.35],it([i,o,s],o,.6),[-.3,0,-.2],[.3,.05,.2],J,Y),Z([97.3,t,123.1],it([i,o,s],o,-.4),[-.25,0,-.22],[.25,.1,.22],tt);for(let e of[-1,1]){let r=T+e*(n(99.6)-.25);L([[99,t,r],[100.2,t,r],[100.1,t+.7,r-.12*e],[99.1,t+.65,r-.12*e]],J,[99.6,t,T])}})()},lt=[[0,0],[.08,.3],[.3,.8],[.55,1],[.8,.75],[.95,.3],[1,0]],ut=e=>{let t=re.pieces.filter(e=>e.kind==`wingpiece`&&e.min[2]>T),n=T+v.r+S[1].fair[1][2];p.pieces.forEach(([i,a,o,,,s],c)=>{let l=e=>n+p.span*e+o,u=t.filter(e=>e.min[2]>l(i)-.01&&e.max[2]<l(a)+.01).sort((e,t)=>e.min[2]-t.min[2]),[d,f]=[u[0],u[u.length-1]],h=e=>(e.min[2]+e.max[2])/2,g=e=>d.max[1]+(f.max[1]-d.max[1])*(l(e)-h(d))/(h(f)-h(d)),v=Math.ceil(p.span*(a-i)/1.4),y=(t,n,r)=>{let o=Math.min(t,47.49),[c,u]=[_(p.trail,o),_(p.lead,o)];return[(d=[c+(u-c)*n+s*v*((t-i)/(a-i)-.5),g(t)-r*m(t),l(t)])[0],d[1],T+e*(d[2]-T)];var d},b=[i,...[...p.lead,...p.trail].map(e=>e[1]).filter(e=>e>i+.01&&e<a-.01).flatMap(e=>[e-.01,e+.01]),a].sort((e,t)=>e-t),ee=b.flatMap((e,t)=>t&&e-b[t-1]>3.4?[(e+b[t-1])/2,e]:[e]),te=e=>.12+.88*A((Math.min(c?Math.abs(Math.abs(e[2]-T)+T-l(i)):9,c<2?Math.abs(Math.abs(e[2]-T)+T-l(a)):9)-.7*r(e[0]/1.3,e[2]/1.3,17))/.9);Ce(ee.map(e=>lt.map(([t])=>y(e,t,0))),()=>E,te,e<0),Ce(ee.map(e=>lt.map(([t,n])=>y(e,t,n))),()=>E,e=>.75*te(e),e>0);for(let[t,n]of[...c?[[i,-1]]:[],...c<2?[[a,1]]:[]]){let[r,i]=[0,1].map(e=>lt.map(([n,r])=>y(t,n,e*r))),a=y(t-3*n,.5,.5);R(r,i,()=>le,a),Ye(r,[0,.06,e*n*.3],P(a,[0,-9,0]));for(let e of[.3,.62])B(y(t-.4*n,e,.5),y(t+.45*n,e+.01*n,.6),.14,D,.6*m(t))}})},dt=i(f([[0,.1],[.3,.1],[.36,0],[.52,0],[.6,.15],[.6,.85],[.52,1],[.36,1],[.3,.9],[0,.9]],12),[.05,.05,.055]),ft=we(f([[0,0],[1.5,0],[2.1,2.5],[2.2,4],[2.7,6.5],[2.75,12.5],[2.45,17.5],[2.1,19],[1.75,19.1],[1.5,17.6],[0,17.4]],16),E,e=>Math.hypot(e[0],e[1])<1.7&&e[2]<-16?.05:(.12+.88*A((-e[2]-5-3*r(e[0],2*e[1]-e[2]/2,61))/5))*(.55+.45*A((e[1]+2.2)/1.6))),pt={panel:({min:e,max:t},n,r)=>{let i=.55+.45*a(e[0],e[2],51),o=w(se.c,i,ne),s=t[0]-e[0]<1?0:t[2]-e[2]<1?2:-1;if(s>=0){z(e,t,o,O);let[n,i]=[e.slice(),t.slice()];n[1]=i[1]=t[1],n[s]=i[s]=(e[s]+t[s])/2,V(n,i,[0,.4,0],9,E,.3);for(let n of[.5,1.1,1.7]){let[i,a]=[e.slice(),t.slice()];i[1]=a[1]=t[1]-n,i[s]=a[s]=(r>0?e:t)[s]-.04*r,B(i,a,.08,O)}return}z(e,t,D,o);let c=[0,1,3,2,0].map(n=>[1&n?t[0]:e[0],t[1],2&n?t[2]:e[2]]);c.slice(1).forEach((n,r)=>{let i=j(N(c[r],n),[(e[0]+t[0])/2,t[1],(e[2]+t[2])/2]);V(c[r],n,[.35*Math.sign(i[0]),-.12,.35*Math.sign(i[2])],4,E,.35)}),i>.75&&L(F.map(n=>[e[0]+(1&n?1.1:.7),t[1]+.02,2&n?t[2]:e[2]]),w(ue),k,i)},container:({min:e,max:t},n=ue)=>{z(e,t,w(n,.5));let r=t[0]-e[0]>t[2]-e[2]?0:2;for(let i=e[r]+.3;i<t[r]-.2;i+=.6){let[a,o]=[e.map(e=>e-.05),t.map(e=>e+.05)];[a[r],o[r],a[1],o[1]]=[i,i+.3,e[1],t[1]-.15],z(a,o,w(n,.68))}for(let n of[.35,.65]){let i=P(e,j(t,e),n);[i[r],i[1]]=[e[r]-.04,e[1]],B(i,[i[0],t[1]-.1,i[2]],.08,O)}},crate:({min:e,max:t},n)=>{if(t[1]-e[1]>1.2){z(e,t,C(l.STEEL,.75));for(let n of[.33,.66]){let r=e[0]+(t[0]-e[0])*n;z([r-.02,e[1]+.1,e[2]-.01],[r+.02,t[1]-.1,t[2]+.01],le)}}else{z(e,t,C(l.WOOD),n&&w(n,.75));for(let n of[.25,.75]){let r=e[2]+(t[2]-e[2])*n;z([e[0]-.02,e[1],r-.1],[t[0]+.02,t[1]+.02,r+.1],O)}}},dais:({min:e,max:t},n=ue)=>{z(e,t,D,w(n,.6)),L(F.map(n=>[1&n?t[0]-.5:e[0]+.5,t[1]+.02,2&n?t[2]-.5:e[2]+.5]),w(n,.95),k)},shelter:({min:e,max:t},n)=>{if(!n)return void z(e,t,C(l.STEEL,.8));let r=(n,r,i)=>[e[0]+(t[0]-e[0])*n/6,t[1]-i-.25*Math.sin(Math.PI*n/6)*Math.sin(Math.PI*r/4),e[2]+(t[2]-e[2])*r/4];for(let t=0;t<6;t++)for(let i=0;i<4;i++)for(let a of[0,.03])L([r(t,i,a),r(t+1,i,a),r(t+1,i+1,a),r(t,i+1,a)],w(n,1&t?.62:.8),[e[0],a?99:-99,e[2]])},gear:({min:e,max:t},n)=>{if(n)return ye(e,t,.4,w(n,.7),w(n,.55)),void ye([e[0],t[1]-.9,e[2]],[t[0],t[1]-.6,t[2]],.4,O,void 0,.04);let r=(e[2]+t[2])/2;for(let n=0;n<3;n++)xe(dt,[e[0]+.7+1.5*n,t[1]-.6,t[2]],[0,0,-1],[1,1,t[2]-e[2]]);z([e[0]+.3,t[1]-.8,r-.2],[t[0]-.3,t[1]-.4,r+.2],D)},fallen:({max:e},t,n)=>{if(!t)return;let[r,i,,a,o]=ee[0],s=M([1,0,n*o]),c=[r,e[1]-2.2,T+n*(i-T)];xe(ft,P(c,s,-a/2),s,[.84,.8,1]),xe(Ke,P(c,s,-a/2+.3),s.map(e=>-e),[1.15,1.15,1.15]);let l=[-1,3.5].map(e=>P(P(c,s,e),[0,2.1,0])),u=[.5*-s[2],1.1,.5*s[0]];R(l,l.map(e=>P(e,u)),()=>O,c),V(P(l[0],u),P(l[1],u),u,6,E,.16,c)},rail:({min:e,max:t})=>{z([e[0]+.14,e[1],e[2]],[t[0]-.14,t[1],t[2]],D);for(let n of[e[1],t[1]-.07])z([e[0],n,e[2]],[t[0],n+.07,t[2]],D,D,0)},engine:({min:e,max:t},n=ue)=>{let r=(e[0]+t[0])/2,i=e=>((e,t,n,r)=>[...e,...e.map(([e,t])=>[-e,t]).reverse()].map(([e,i])=>[t+e,n+i,r]))([[2.5,-5],[2.5,-.4],[2.1,0]],r,t[1],e),o=[r,t[1]-2.5,(e[2]+t[2])/2],s=i(0).map((e,t)=>.45+.4*a(t,3,62));R(i(e[2]),i(t[2]),e=>e==2?w(n,.6):E,o,s);for(let[n,a]of[[e[2],-1],[t[2],1]]){L(i(n),le,o);let e=(e,t,i)=>[r+e*Math.cos(t),o[1]+e*Math.sin(t),n+a*i],t=Math.PI/7;for(let n=0;n<14;n++){let r=n*t;L([e(.5,r,.2),e(2.25,r-.1,.22),e(2.25,r+.22,.05),e(.5,r+.3,.08)],w([.42,.43,.46]),o),L([e(0,0,.3),e(.55,r,.1),e(.55,r+t,.1)],O,o),L([e(2.3,r,.04),e(2.3,r+t,.04),e(2.48,r+t,.04),e(2.48,r,.04)],ce,o)}}},pod:({min:e,max:t},n,r)=>{let i=u[r>0?0:1],o=e[1]+.5,s=N(e,t),[c,l]=[s[0],(r>0?e[2]:t[2])-.04*r];ye(e,t,.42,E,w(se.c,.8,ne),0,[.5,1]),ye(e,[t[0],o+.8,t[2]],.42,le,void 0,.04),ye([e[0],o+2,e[2]],[t[0],o+2.4,t[2]],.42,w(i,.8),void 0,.03),L(F.map(e=>[c+(1&e?.65:-.65),o+(2&e?1.95:0),l]),le,s);for(let e of[-.7,.7])B([c+e,o,l],[c+e,o+2,l],.1,O),L(F.map(t=>[c+3.03*Math.sign(e),o+(2&t?1.7:1.2),s[2]+(1&t?.3:-.3)]),fe,s);B([c-.7,o+2,l],[c+.7,o+2,l],.1,O),z([c+1,o-.1,l-2.6*r-.95],[c+2.3,o+.1,l-2.6*r+.95],E);let d=[c,o+.28,s[2]+7*r],f=e=>{let t=3+1.3*a(e%14,r,71);return[c+t*Math.cos(e*Math.PI/7),o+.03+.2*a(e%14,r,72),d[2]+t*Math.sin(e*Math.PI/7)]};for(let e=0;e<14;e++)L([d,f(e),f(e+1)],w(1&e?ue:[.8,.8,.76],.9),k)},heap:({min:e,max:t},n=ue,r=1,i=0)=>{let[o,s]=i?[0,2]:[2,0];z(e,t,O,i?O:w(n,.55));let c=Math.round((t[s]-e[s])/1.6);for(let n of i?[i]:[-1,1]){let r=(n<0?e:t)[o];for(let i=0;i<c;i++){let l=e=>a(i,7*r+e,41),u=(a,l,u)=>{let d=[0,l,0];return d[s]=e[s]+(t[s]-e[s])*(i+a)/c,d[o]=r+n*u,d},d=t[1]-.15-.5*l(3),f=.12+.12*l(4),p=[u(.05,e[1],f),u(.95,e[1],f),u(.95,d,.02),u(.05,d-.2*l(6),.02)],m=u(.5,d/2,-9);L(p,l(5)>.45?E:ce,m,[.75,.75,1,1]),V(p[3],p[2],[0,.35,0],3,ce,.9,m)}}},frame:({min:e,max:t},n,r)=>{z([e[0]+.2,e[1],e[2]],[t[0]-.2,t[1],t[2]],O),z([e[0],t[1]-.16,e[2]],t,D,D,0),z([e[0],t[1]-.8,e[2]],[t[0],t[1]-.64,t[2]],D,D,0);let i=(e[2]+t[2])/2;B([e[0]+.14,t[1],i-.7*r],[e[0]+.14,t[1]+3.4,i+.6*r],.26,D)}};pt.float=pt.raft=pt.panel,pt.jam=(e,t,n)=>pt.heap(e,t,n,v.sections.some(t=>t[1]==e.max[0])?1:-1);var mt=[`pod`,`dais`,`crate`,`shelter`],ht=[`shelter`,`float`,`raft`,`engine`,`dais`,`fallen`,`rail`],gt=e=>Object.values((e=>{let t=e.relief&&{relief:d(e.relief)};_e=(e,n)=>{let r=t?o(t,e,n):0;return r>-1e9?r:0};let n=e=>(Se([]),e(),I),r=t=>()=>{for(let n of re.pieces){let r=mt.includes(n.kind)&&Math.abs((n.min[2]+n.max[2])/2-T)>1;if(pt[n.kind]&&r==t){let t=e.brushes.find(e=>e.min.every((t,r)=>t==n.min[r]&&e.max[r]==n.max[r]));pt[n.kind](n,t?.tint,(n.min[2]+n.max[2])/2<T?-1:1),ht.includes(n.kind)||be(n)}}};return{cabin:n(ct),hull:n(()=>{S.forEach((e,t)=>Xe(t)),S.forEach(({fair:e},t)=>{let n=Ue(t);for(let[r,i,a]of e){let e=t>1&&i>U?ke:i,o=Math.ceil((e-r)/2),s=Array.from({length:o+1},(t,n)=>r+n*(e-r)/o);for(let o of[-1,1]){let c=n=>{let r=K(t,n,0),s=n>i?(v.r+a-K(t,i,0))*(1-(n-i)/(e-i))+.05:v.r+a-r;return[[K(t,n,W)-.15,W],[r+s-.3,W],[r+s-.08,W-.08],[r+s,W-.3],[r+s-.06,W-.75],[r+.6*s,.2],[r+.25*s,-.8],[K(t,n,-1.7)-.15,-1.7]].map(([e,r])=>Me(t,n,e,r,o))};Ce(s.map(c),()=>E,n,o>0);for(let[n,a]of[[r,-1],[i,1]])if(n==e||n==r){let e=c(n);L(e,O,[n-9*a,0,T+8*o]),Ye(e.slice(0,6),[.5*a,0,0],[n,v.axis[t],T])}}}})}),ends:n(()=>{(()=>{let[e]=v.sections[0],t=v.axis[0],n=Pe(0,e);n.slice(1).forEach((r,i)=>L([[e,t,T],n[i],r],O,[e+9,t,T],.8)),xe(Ke,[e+.2,t+1.6,T],[-1,0,0],[1.75,1.75,1.75]);for(let n of[-1,1]){let r=[10.5,t+.4,T+n*(K(0,15,.4)-.5)];xe(we(f([[0,0],[1,.4],[1.5,3],[1.5,8],[.9,10],[0,10.3]],10),E,e=>.25+.75*A((-e[2]-2)/5)*A(1.6-n*e[0])),r,[1,0,0]);let i=[3,7.5].map(e=>[r[0]+e,r[1],r[2]+1.45*n]);R(i,i.map(e=>P(e,[0,.5,0])),()=>O,r),V(i[0],i[1],[0,.2,1.1*n],7,E,.16,r),V(P(i[0],[0,.5,0]),P(i[1],[0,.5,0]),[0,.1,.8*n],5,E,.2);let a=.45,o=r=>(n>0?qe:Je).map(([i,o])=>{let s=e+14-i,c=K(0,Math.max(s,e),5.3)-.3+o*Math.sin(a),l=r*(.35-.017*o);return[s,t+5.3+o*Math.cos(a)-l*Math.sin(a),T+n*(c+l*Math.cos(a))]}),[s,c]=[-1,1].map(e=>{let t=o(e);return L(t,E,o(-e)[3],t.map((e,t)=>n<0&&t>2?.2:t>2?.95:.8)),t});R([...s,s[0]],[...c,c[0]],()=>O,N(s[0],s[3])),Ge.forEach((e,r)=>We.forEach(([i,a,o,s],c)=>{e>>c&1&&L(F.map(e=>{let[t,c]=[16.6+n*(1.5*(r-2)+1.05*(1&e?o:i)),2.5+1.05*(2&e?s:a)];return Me(0,t,K(0,t,c)+.03,c,n)}),w([.05,.08,.16],1,ne),[17,t,T])}))}})(),(()=>{let e=Pe(2,Ae),t=N(e[0],e[H-1]);e.slice(1).forEach((n,r)=>L([P(t,[.5,0,0]),e[r],n],O,[0,t[1],T])),xe(i(f([[0,0],[.22,0],[.08,2.4],[0,2.4]],6),[.2,.2,.22]),P(t,[.3,-.1,0]),[1,0,0])})()}),inside:n(()=>S.forEach((e,t)=>(e=>{let[t,n]=v.sections[e],r=v.axis[e],{cut:i,tears:o,holes:s}=S[e],c=Re(e),[u,d]=[i[0][3]?i[0][1]:t,e>1?U:n],f=Fe(e,t,d).filter(e=>e>=u);for(let t of[-1,1]){Ce(f.map(n=>c.map((r,i)=>Be(e,n,i,t))),(t,n)=>Ve(e,f[t],f[t+1],c[n],c[n+1])?void 0:ce,()=>1,t>0);for(let n=u+2.5;n<d;n+=5)c.slice(1).forEach((i,a)=>{if(!x.includes(i)&&!o.some(([e,t,r,o])=>n>e-.3&&n<t+.3&&c[a]>=r&&i<=o)){let[i,o]=[a,a+1].map(r=>[[-.08,0],[-.08,.2],[.08,.2],[.08,0]].map(([i,a])=>P(Be(e,n,r,t),[i,0,-t*a])));R(i,o,()=>D,[n,r,T+20*t])}})}u>t&&L([1,-1].flatMap(t=>(t>0?c:[...c].reverse()).map(n=>Be(e,u,c.indexOf(n),t))),ce,[u-9,r,T]);for(let{kind:i,min:a,max:o}of re.pieces){if(i!=`deck`||a[0]<t||o[0]>n)continue;let s=o[1]>r+6.9,[c,u]=[a.slice(),o.slice()];s&&e>1&&(u[0]=Math.min(u[0],U));let d=Math.min(...[c[0],(c[0]+u[0])/2,u[0]].map(t=>K(e,t,Math.min(o[1]-r,6.4))))-.3;[c[2],u[2]]=[Math.max(c[2],T-d),Math.min(u[2],T+d)],u[0]>c[0]&&u[2]>c[2]&&z(c,u,s?ce:D,C(l.GRATE),s?8:a[1]<r-6.9?52:0)}for(let[t,n,i,a]of s){let o=r+x[t],s=Math.min(a,(t>1?2.5:h(x[t]))*G(e,(n+i)/2)[0]-v.skin),c=t>1?E:ce,l=t>1?.14:.5;for(let[e,t]of[[n,.4],[i,-.4]])V([e,o,T-s],[e,o,T+s],[t,-.3,0],6,c,l);if(a<9)for(let e of[-1,1])V([n,o,T+e*s],[i,o,T+e*s],[0,-.3,.4*-e],6,c,l)}[...x.slice(0,2),6.8].forEach((t,n)=>{let i=r+t-.33;for(let t=u+2;t<d;t+=5){let r=T+(n>1?2.1:3.9)*G(e,t)[0]*(a(t,n,43)<.5?-1:1);if(!s.some(([e,r,i,a])=>e==n&&t>r-.8&&t<i+.8&&a>3.5)){L(Qe(t-.5,t+.5,i,r-.07,r+.07),he,Ze);let e=[t+1.6,i+.03,T+4*(a(t,n,41)-.5)];B(e,P(e,[.2,-.3-.8*a(t,n,42),.25]),.05,le)}}})})(t))),wings:n(()=>[1,-1].forEach(ut)),debris:n(r(!1)),camps:n(r(!0))}})(e)).flat(),[_t,vt,Q,yt]=[b.trees+5,70,14,80],[bt,xt]=[_t-Q-yt,s/4*Q],St=2*(bt+xt)+250+2*(vt-Q),Ct=v.sections[2][1]+3-_t,$=e=>(e=Math.min(Math.max(e,0),1))*e*(3-2*e),wt=(e,t,n=1.15)=>{let[i,a]=[(e-v.sections[2][1]+2)/32,(t-125)/26],o=i*i+a*a;return o<3?$(2.2*(n-Math.sqrt(o)-.3*r(e/7,t/7,6)))*$((e-b.trees+6)/10):0},[Tt,Et]=[[.2,.13,.06],[.05,.045,.04]],Dt=e=>{for(let t=0;t<e.length;t+=10){let n=wt(e[t],e[t+2],1.3);if(n>0){let[r,i,a]=[Math.min(2*n,1),1-Math.max(2*n-1.2,0),4*e[t+7]];for(let n=0;n<3;n++){let o=t+(n<2?6+n:9);e[o]=(e[o]+(Tt[n]*a-e[o])*r)*i}}}},Ot=e=>{if(e>St/2){let[t,n,r,i]=Ot(St-e);return[t,250-n,r,-i]}let[t,n]=[(e-bt)/Q,Q-vt];return e<bt?[yt+e,-vt,0,-1]:e<bt+xt?[_t-Q+Q*Math.sin(t),n-Q*Math.cos(t),Math.sin(t),-Math.cos(t)]:[_t,n+e-bt-xt,1,0]},kt=(e,t)=>{let[n,r,i,a]=Ot(e),o=t+Ct*i*$((22-Math.abs(r-125))/10);return[n+i*o,r+a*o,$((n-yt)/30)]},At=[[1,0,0],[0,0,1],[0,1,0]],jt=[3,4,5].map(e=>i(f([[.9,0],[1.1,1]],e),[1,1,1])),Mt=[f([[0,-1],[1,0],[0,1]],4),f([[0,-1],[.85,-.45],[.9,.35],[0,1]],5)].map(e=>i(e,[1,1,1])),Nt=[.4,.33,.24],Pt=[.3,.2,.08],Ft=[[.16,.34,.07],[.1,.26,.06],[.22,.29,.08]],It=[[.05,.15,.04],[.08,.2,.05],[.04,.12,.05],[.11,.21,.04]],Lt=(e,t,n,r,i,a,o,[s,c,l])=>{let[u,d]=[Math.cos(n),Math.sin(n)],[f,p,m]=t;for(let t=0;t<o;t++){let n=(t+.5)/o,h=Math.max(r-2.1*n,-1.45),[g,_]=[Math.cos(h)*i/o,Math.sin(h)*i/o],[v,y,b]=[f+u*g,p+_,m+d*g],ee=a*(.3+2.8*n*(1-n));for(let t of[-ee,ee]){let n=(f+v)/2+.4*u*g-d*t,r=(p+y)/2+.4*_-.45*ee,i=(m+b)/2+.4*d*g+u*t,a=_*(i-m)-d*g*(r-p),o=d*g*(n-f)-u*g*(i-m),h=u*g*(r-p)-_*(n-f),te=(o<0?-1:1)/(Math.hypot(a,o,h)||1);[a,o,h]=[a*te,o*te+.6,h*te];let x=1/Math.hypot(a,o,h);e.push(f,p,m,a*x,o*x,h*x,.6*s,.6*c,-1,.6*l),e.push(v,y,b,a*x,o*x,h*x,.6*s,.6*c,-1,.6*l),e.push(n,r,i,a*x,o*x,h*x,s,c,-1,l)}[f,p,m]=[v,y,b]}},Rt=(t,r,i,o,c,l,u,d,f)=>{let p=e=>a(l,e,77),m=8+5*p(1)+(2-u),h=[2,4,8][u],g=e=>[r+d*e*e,i+m*e,o+f*e*e];for(let n=0;n<h;n++){let r=n/h,i=c*(.62+.38*(1-r)*(1-r)),a=n%2?.8:1;e(t,jt[u],g(r),g(r+1/h),[1,0,0],1,i,Nt.map(e=>e*a))}let _=g(1),v=[6,9,11][u];for(let e=0;e<v;e++)Lt(t,_,s*(e+.6*p(10+e))/v,[1.15,.55,-.05][e%3]+.3*p(30+e),3.8+p(50+e)+.3*(2-u),.8+.15*(2-u),[3,4,6][u],Ft[e%3]);for(let e=0;u>1&&e<3;e++){let r=s*(e/3+p(70));n(t,Mt[0],[_[0]+.24*Math.cos(r),_[1]-.3,_[2]+.24*Math.sin(r)],At,[0,0,0],.17,Pt)}},zt=(t,r,i,o,c,l)=>{let u=e=>a(c,e,78),d=8+7*u(1),f=[r+2*u(2)-1,i+.7*d,o+2*u(3)-1];e(t,jt[+!l],[r,i,o],f,[1,0,0],1,.3+.2*u(4),Nt);for(let e=0;e<4;e++){let[r,i]=[s*(e/3+u(5)),.2*d+1.4*u(6+e)],a=e<3?.8*i:0;n(t,Mt[+!l],[f[0]+a*Math.cos(r),f[1]+(e<3?u(10+e):.5*i),f[2]+a*Math.sin(r)],At,[0,0,0],[i,i,.7*i],It[Math.floor(4*u(14+e))])}},Bt=(t,n,r,i,o)=>{let c=e=>a(o,e,81),l=(i<125?-1:1)*(.3+1.1*c(1)),[u,d,f]=[Math.cos(l),Math.sin(l),n(r,i)],[p,m,h]=[.5+6*c(2)*c(2),.2+.14*c(3),4+5*c(4)],g=Et.map(e=>e*(.6+.9*c(5))),_=[r+.25*p*u,f+p,i+.25*p*d];e(t,jt[1],[r,f-m,i],_,[1,0,0],1,m,g);for(let e=0;e<2;e++)Lt(t,_,s*c(6+e),2.5,.5+.6*c(8+e),.5*m,1,g);let v=[r+h*u,n(r+h*u,i+h*d)+m,i+h*d],y=c(10)<.7;y&&e(t,jt[1],p<2.5?_:[r,f+m,i],v,[0,1,0],1,.8*m,g);for(let e=0;e<2&&(y||p>3.5);e++)Lt(t,y?v:_,l+5*c(11+e),y?.5:-.2,2+c(13+e),.5,3,Tt)},Vt=(e,t,n,r,i,o)=>{let c=e=>a(i,e,79),l=6-o;for(let i=0;i<l;i++)Lt(e,[t,n+.1+.3*o,r],s*(i+c(i))/l,1+.3*o+.3*c(10+i),(1+.5*c(20+i))*(1+1.4*o),.3+.7*o,2,Ft[(i+o)%2])},Ht=(e,n,[i,o,s,c,l,u=0],d)=>{let{reach:f}=ie(l,s,c),p=n(i,o)+u,m=p+t(c),h=e.length;oe(e,d,e=>{let t=f(e);return[i+e[0]*t,m+e[1]*t,o+e[2]*t]},p,p+c,l,.72+.14*a(l,5,41),u?void 0:n);for(let t=h;t<e.length;t+=10){let n=b.water+.4+1.2*r(.4*e[t],.4*e[t+2],9);e[t+9]*=.4+.6*$((e[t+1]-n)/1.5)}Ut(e,h)},Ut=(e,t)=>{for(let n=t;n<e.length;n+=30){let[t,r,i]=[n,n+10,n+20],[a,o,s]=[e[r]-e[t],e[r+1]-e[t+1],e[r+2]-e[t+2]],[c,l,u]=[e[i]-e[t],e[i+1]-e[t+1],e[i+2]-e[t+2]],[d,f,p]=[o*u-s*l,s*c-a*u,a*l-o*c],m=Math.hypot(d,f,p)||1;for(let n of[t,r,i]){let[t,r,i]=[.75*e[n+3]+.25*d/m,.75*e[n+4]+.25*f/m,.75*e[n+5]+.25*p/m],a=Math.hypot(t,r,i)||1;[e[n+3],e[n+4],e[n+5]]=[t/a,r/a,i/a]}}},Wt=(e,t,n)=>{let r=[],i=(e,n)=>a(e,n,90+t),o=e=>100+e+50*t;y.forEach(e=>Ht(r,n,e,4));for(let t=0;t<7;t++)Ht(r,e,[34+8*t+5*i(t,1),266+26*i(t,2),2.5+2.5*i(t,3),1.8+2.4*i(t,4),o(t)],3);for(let t=0;t<6;t++){let[n,a]=[94+7*t+4*i(t,5),264+t%3*9+6*i(t,6)],[s,c]=[7+3*i(t,7),7+5*i(t,8)+2*t];Ht(r,e,[n,a,s,c,o(10+t)],4);let l=[n+1.5*i(t,9)-.75,a+1.5*i(t,10)-.75,.6*s,.55*c];Ht(r,e,[...l,o(20+t),.8*c],3),i(t,11)<.5&&Ht(r,e,[l[0]+.5,l[1]-.4,.35*s,.4*c,o(30+t),1.3*c],2)}for(let t=0;t<5;t++)Ht(r,e,[12-9*t+4*i(t,12),264+9*t+6*i(t,13),2.5+2*i(t,14),4+5*i(t,15),o(40+t)],3);for(let n=0;n<8;n++){let a=n/7;Ht(r,e,[b.sea-12-62*a+6*i(n,13),286-14*a*a+8*i(n,14),7-4.5*a,6-4*a,140+n+50*t],2)}return r},Gt=e=>4.5*$(e/2)+5*$((e-1.5)/5)+8*$((e-6)/12)+.14*Math.max(e-18,0),Kt=[0,.8,1.7,3,4.5,6.5,9,12,16,21,28,37,49,65,88,120];function*qt(e){let t=(e=>Object.values((e=>{let t=e.relief&&{relief:d(e.relief)},i=(e,n)=>{let r=t?o(t,e,n):0;return r>-1e9?r:0},s=Wt(i,0,i).concat((e=>{let t=e.slice();for(let n=0;n<e.length;n+=30)for(let r=0;r<3;r++){let[i,a]=[n+10*r,n+(3-r)%3*10];for(let n=0;n<10;n++)t[i+n]=e[a+n];t[i+2]=250-t[i+2],t[i+5]=-t[i+5]}return t})(Wt((e,t)=>i(e,250-t),1,i))),c=[];g.forEach(([e,t,n],r)=>{for(let o of[0,1]){let[s,l]=[2*r+o,o?250-t:t],u=1.2+2.6*a(s,1,70);Rt(c,e,i(e,l),l,n,s,2,-u,u*(2*a(s,2,70)-1))}});let l=[],u=[];[2,6,11,17,24].forEach((e,t)=>{let n=t<2?7.5:7;for(let r=0;r*n<St;r++){let o=e=>a(r,e,80+t),s=(r+o(1))*n,c=e+3*o(2),[d,f,p]=kt(s,c);if(o(3)>.85*p)continue;let m=wt(d,f);if(m>.3){Bt(u,i,d,f,1e3+100*t+r);continue}let h=i(d,f)+Math.max(p*(1-$(2.5*m))*Gt(c)-5,0),[,,g,_]=Ot(s),v=1e3+100*t+r;if(o(4)>.25+.15*t){let e=1+2.5*o(5),[n,r]=[-g*e+2*o(6)-1,-_*e+2*o(7)-1];Rt(l,d,h,f,.28,v,+(t<2),n,r)}else zt(l,d,h,f,v,t>1)}});for(let e=0;e<18;e++){let t=t=>a(e,t,88),n=v.r+2+14*t(2);Bt(u,i,_t+1+16*t(1),125+(1&e?n:-n),e)}let f=[];for(let e=0;4*e<St;e++){let t=t=>a(e,t,86),[n,r,o]=kt(4*(e+t(1)),-.5-3*t(2)*t(2));t(3)<o&&wt(n,r)<.3&&Vt(f,n,i(n,r),r,e,0)}for(let e=0;2.4*e<St;e++){let t=t=>a(e,t,87),[r,o,s]=kt(2.4*(e+t(1)),.8-2.3*t(2)),c=1+.8*t(4);t(3)>s||wt(r,o)>.3||(t(5)<.6?Vt(f,r,i(r,o),o,500+e,1):n(f,Mt[1],[r,i(r,o)+.6*c,o],At,[0,0,0],[c,c,.8*c],It[e%4]))}let p=[];return((e,t,n)=>{let i=Math.ceil(St/2.5),o=Kt.length,s=new Float64Array((i+1)*o*4);for(let e=0;e<=i;e++){let c=e/i*St,[l,u]=kt(c,0),d=n(l,u);for(let i=0;i<o;i++){let l=Kt[i],[u,f,p]=kt(c,l),m=r(u/6,f/6,3)+.5*r(u/2.3,f/2.3,4)-.75,h=4*(e*o+i);s[h]=u+(a(e,i,61)-.5)*Math.min(l,3),s[h+2]=f+(a(e,i,62)-.5)*Math.min(l,3);let g=$(2.5*wt(u,f));s[h+1]=d+(n(u,f)-d)*g-.4+p*(1-g)*(Gt(l)+40*$((l-25)/95)*(.4+.6*r(u/70,f/70,5))+(m*Math.min(.5+.13*l,4)+(a(e,i,63)-.5)*(1.4+.05*l))*$(l/1.5)*(1-.8*$((l-50)/50))),s[h+3]=(.4*(m/1.5+.5)+.6*a(e,i,64))*(1-.5*$((l-20)/50));for(let n=0;p>.3&&g<.9&&i&&i<6&&n<2;n++){let r=t=>a(2*e+n,i,65+t),[,,o,l]=Ot(c);Lt(t,[s[h],s[h+1]-.3,s[h+2]],Math.atan2(-l,-o)+3*r(0)-1.5,.3+.8*r(1),1.3+1.3*r(2),.9,1,(n?Ft:It)[Math.floor(3*r(3))])}}}let c=(e,t)=>4*(e*o+t);for(let t=0;t<i;t++)for(let n=0;n<o-1;n++){let r=t+n&1,i=[c(t,n),c(t+1,n),c(t+1,n+1),c(t,n+1)];for(let t of[0,1]){let[n,a,o]=[i[r],i[r+1+t],i[(r+2+t)%4]],[c,l,u]=[s[a]-s[n],s[a+1]-s[n+1],s[a+2]-s[n+2]],[d,f,p]=[s[o]-s[n],s[o+1]-s[n+1],s[o+2]-s[n+2]],[m,h,g]=[l*p-u*f,u*d-c*p,c*f-l*d],_=(h<0?-1:1)/(Math.hypot(m,h,g)||1),v=(s[n+3]+s[a+3]+s[o+3])/3;for(let t of[n,a,o])e.push(s[t],s[t+1],s[t+2],m*_,h*_,g*_),e.push(.02+.06*v,.06+.13*v,-1,.02+.03*v)}}})(p,f,i),[c,l,f,p].forEach(Dt),{rocks:s,palms:c,forest:l,brush:f,canopy:p,snags:u}})(e)).flat())(e);return yield,{land:t.concat(gt(e)),sky:[],glass:st(),rock:`{vec3 gn=normalize(N);float gp=max(length(dFdx(P)),length(dFdy(P)));
|
|
2
|
+
float g1=vn3(P*.13),g2=vn3(P*.5+3.),gu=0.;
|
|
3
|
+
vec3 gb=vec3(.6,.585,.56)*(.62+.52*g1+.2*g2)*mix(vec3(.97,.99,1.03),vec3(1.05,1.,.93),g2),gc=gb;
|
|
4
|
+
float f0=1.-smoothstep(.15,.6,gp*17.),gf=1.-smoothstep(.15,.6,gp*5.),gd=smoothstep(.2,.8,g2);
|
|
5
|
+
if(f0>0.){gd=smoothstep(.2,.8,vn3(P*1.8+11.));vec3 q0=P*17.,b0=floor(q0-.5),bi=b0;float bd=9.;
|
|
6
|
+
for(int a=0;a<8;a++){vec3 c=b0+vec3(a&1,(a>>1)&1,a>>2),e=q0-c-.15-.7*hs(c+.5);float d=dot(e,e);if(d<bd){bd=d;bi=c;}}
|
|
7
|
+
vec3 h0=hs(bi+2.3);bool mi=h0.z<.04+.18*(1.-gd);
|
|
8
|
+
gc=mix(gb,mi?vec3(.07,.07,.08):(h0.x<.45?vec3(.8,.78,.74):h0.x<.62?vec3(.74,.6,.54):h0.x<.85?vec3(.6,.6,.59):vec3(.44,.45,.47))*(.9+.2*h0.y)*(.78+.36*g1),f0*.75);gu-=mi?f0:0.;}
|
|
9
|
+
if(gf>0.){vec3 q=mat3(.8,.36,-.48,-.6,.48,-.64,0.,.8,.6)*P*5.,ci=floor(q),gh=hs(ci+.5),gj=hs(ci+3.7);
|
|
10
|
+
vec3 d=abs(fract(q)-.5-.3*(gj-.5))/vec3(.26+.12*gh.y,.12+.06*gj.z,.18+.1*gh.z);
|
|
11
|
+
float k=gf*step(gh.x,.2+.55*gd)*(1.-smoothstep(.8,1.,max(max(d.x,d.y),d.z)));
|
|
12
|
+
gc=mix(gc,vec3(.8,.53,.43)*(.9+.2*gj.y)*(.85+.3*g1),k);gu+=.5*k;}
|
|
13
|
+
float ck=0.,cw=max(.012,gp*.6);
|
|
14
|
+
if(cw<.08){float n=vn3(P*.45+21.),cr=abs(n-.5)*2.+(gp<.03?.15*abs(vn3(P*2.+5.)-.5):0.),vr=abs(n-.12)*4.,a=min(.012/cw,1.);
|
|
15
|
+
ck=(1.-smoothstep(cw*.4,cw,cr))*a*step(.35,g1);gc=mix(gc,vec3(.86,.84,.8),(1.-smoothstep(cw*.3,cw*.8,vr))*a*step(.62,g2)*.8);}
|
|
16
|
+
if(gn.y<.8)gc*=mix(vec3(1),vec3(.55,.52,.47),smoothstep(.5,.8,vn3(vec3(P.x*2.2,P.y*.12,P.z*2.2)+1.))*(1.-smoothstep(.3,.8,gn.y))*.8);
|
|
17
|
+
float lc=0.;
|
|
18
|
+
if(gn.y>.15){lc=smoothstep(.52,.6,vn3(P*1.3+13.)+.45*g2+(gp<.05?.2*vn3(P*8.)-.1:0.)-.24)*smoothstep(.15,.6,gn.y);
|
|
19
|
+
gc=mix(gc,g1>.45?vec3(.76,.74,.58)*(.85+.3*g2):vec3(.2,.21,.17),lc*.8);}
|
|
20
|
+
gc=mix(gc,vec3(.12,.11,.1),ck*.9);
|
|
21
|
+
t.rgb=gc;t.a=.5+.25*(g2-.5)+.08*gu-.3*ck+.05*lc;}`}}export{qt as default};
|
|
@@ -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;
|