@korial29/tiny-fps 1.24.1 → 1.26.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.
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as Room } from "./assets/room-CxBWgkPu.js";
1
+ import { t as Room } from "./assets/room-BD4doLmi.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,6 @@
1
+ import type { Piece } from '../../shared/beach';
2
+ import type { V } from './types';
3
+ /** The kinds of the camp, each drawn on its box (Piece), turned askew. */
4
+ export declare const CAMPSITE: Record<string, (p: Piece, t?: V, s?: number) => void>;
5
+ /** The camps' fires, drawn only (Decor.blazes, as burnt/fire.ts's): small flames, a thin column of smoke. */
6
+ export declare const hearths: () => number[][];
@@ -0,0 +1,8 @@
1
+ import type { V } from './types';
2
+ /**
3
+ * A stretch tent over the box a to b (its top the roof's walkable top): four wooden masts leaning
4
+ * out at the corners, two high and two lower across the diagonals; the cloth stretched between
5
+ * their tips, its edges cut in arcs and pulled down at their middles by ropes to the sand, its
6
+ * middle lifted a little; a rope from each mast's tip out to two stakes. `s` mirrors blue's.
7
+ */
8
+ export declare const tent: (a: V, b: V, t: V, s: number) => void;
@@ -33,13 +33,10 @@ export declare const GLOSS = "c+=hk*(mix(vec3(.8,.72,.56),k,smoothstep(-.3,.05,r
33
33
  * own layers end.
34
34
  */
35
35
  export declare const TARP = -1.098;
36
- /** Metres of hem drawn down each long edge of a tarpaulin: the shader frays it shorter. */
37
- export declare const HEM = 1;
38
36
  /**
39
37
  * Its pixel, in main(), before the light: a canvas weave of 4 mm threads that fades before it
40
38
  * aliases, slow blotches of sun-bleach and dirt. Torn (the user, 2026-11-26: tears less angular):
41
- * holes through the roof where a slow noise peaks, their edges frayed by finer ones and scorched
42
- * dark; the hems, hanging from AWNING, cut to tatters of their own lengths, slit up from the foot.
43
- * By world position, so the roof's two faces tear alike.
39
+ * holes through the cloth where a slow noise peaks, their edges frayed by finer ones and scorched
40
+ * dark. By world position across the ground, so the cloth's two faces tear alike.
44
41
  */
45
- export declare const TARP_GLSL: string;
42
+ export declare const TARP_GLSL = "{vec2 q=P.xz;float f=1.-smoothstep(.002,.008,pw),w=sin(q.x*785.)*sin(q.y*785.),te=vn(q*.45+3.)+.35*vn(q*.9+17.)-.08*vn(q*6.)-.04*vn(q*19.)-.96;\nif(te>0.)discard;\nh+=f*.004*w+.02*(vn(q*2.5)-.5);c*=(1.+.18*f*w)*(.78+.34*vn(q*1.3+4.))*mix(1.,.62,smoothstep(.5,.8,vn(q*.7+11.)))*mix(.45,1.,smoothstep(0.,.06,-te));}";
@@ -115,8 +115,11 @@ export declare const WING: {
115
115
  * it. The second lies along z in the lagoon off the tail's end, awash, stood on.
116
116
  */
117
117
  export declare const ENGINES: number[][];
118
- /** Red's camp: the escape pod its flag stands by (x, z, radius). */
119
- export declare const POD: number[];
118
+ /**
119
+ * Red's camp: the survivors' hearth its flag stands by (x, z, the radius of what lies round it).
120
+ * An escape pod stood there, a box 6 m wide that read as a building (the user, 2026-11-27).
121
+ */
122
+ export declare const HEARTH: number[];
120
123
  /** The camp's ground, level. */
121
124
  export declare const CAMP = 1.25;
122
125
  /**
@@ -189,13 +192,21 @@ export declare const edge: (l: number[][], v: number) => number;
189
192
  export declare const FIRES: number[][];
190
193
  /** Metres the flames at a fire's foot reach out from its middle and up from it: smoke.ts stands three balls of 0.55 m within 0.6 of the foot's radius, up to 2.3 m. */
191
194
  export declare const FLAME: number[];
195
+ /**
196
+ * What the survivors keep round their hearth, on the camp's level sand (FLATS), drawn only and
197
+ * walked through: no brush, so nothing new stands in the way (the user, 2026-11-27). Each box is
198
+ * where its piece is drawn, its long side along the piece: the hearth's ring of stones, the logs
199
+ * sat on round it, a pile of firewood, woven mats, and a rack of fish drying beside the flag. Its flames burn nobody: they are drawn only (client hulk/camp.ts, Decor.blazes).
200
+ */
201
+ /** The kinds drawn only: no brush under them. */
202
+ export declare const PROPS: string[];
192
203
  /** The top of the camps' tarpaulins: their hems hang from it (client paint.ts TARP_GLSL). */
193
204
  export declare const AWNING: number;
194
205
  /**
195
206
  * What the scenery draws on the map's boxes, both halves, blue's mirrored: the hull's sections
196
207
  * (x0, x1, the axis' height), every piece of the wreck and of the camps by kind (skin, deck,
197
- * fairing, wingpiece, rail, fallen, heap, frame, raft, engine, float, pod, dais, crate, shelter,
198
- * panel, container, gear), and the headlands' rocks where they stand.
208
+ * fairing, wingpiece, rail, fallen, heap, frame, raft, engine, float, dais, crate, shelter,
209
+ * panel, container, gear; the hearth, log, wood, mat and drying drawn only), and the headlands' rocks where they stand.
199
210
  */
200
211
  export declare const LAYOUT: {
201
212
  hull: number[][];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@korial29/tiny-fps",
3
3
  "description": "Tiny multiplayer first-person rooftop game for the browser: raw WebGL, zero runtime dependencies, WebSocket or same-browser multi-tab play.",
4
4
  "license": "Apache-2.0",
5
- "version": "1.24.1",
5
+ "version": "1.26.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"
@@ -1,21 +0,0 @@
1
- import{C as e,Dr as t,Er as n,Gt as r,J as i,M as a,O as o,Pt as s,T as c,U as l,Y as u,dt as d,et as f,fn as p,hn as m,it as h,k as g,m as _,mn as v,nt as y,pn as b,rt as x,st as S,ut as C,v as ee,yr as te}from"./brick-DvzwRQTg.js";import{Aa as ne,Ao as re,Ca as ie,Co as ae,Da as oe,Do as se,Ea as ce,Eo as le,Oa as ue,Oo as de,Q as fe,S as pe,Sa as me,So as he,Ta as ge,To as w,Ui as _e,W as ve,_ as ye,_o as be,b as xe,ba as Se,bo as Ce,d as we,go as T,h as Te,ho as Ee,ja as De,jo as Oe,ka as ke,ko as Ae,mo as je,p as Me,v as Ne,vo as Pe,wa as E,wo as Fe,x as Ie,xa as D,xo as O}from"./scene-DBUZnDXl.js";import{t as Le}from"./stone-HhX4Igzx.js";var Re=[.8,.79,.74],k=[.24,.25,.28],ze=[.32,.32,.34],A=[.08,.08,.09],Be=[.13,.12,.12],Ve=[1,.95,.8],He=[1,.1,.06],Ue=[1,.62,.2],We=[1,1,1],Ge=[.92,.91,.87],j=.92,M=.1,Ke=.8400000000000001,qe=[[-.62,M],[-.42,M],[-.26,-.06],[.4,-.06],[.56,M],[.8,M]],Je=[.07,.07,.075],Ye=[.16,.15,.13],Xe=[.78,.77,.72],Ze=[.2,.2,.22],Qe=ne-.03,$e=ne+.03,et=.27,tt=[[et,.02-.2],[ne-.1,-.2],[Qe,-.14],[Qe,.14],[ne-.1,.2],[et,.18000000000000002]],nt=ne+.1,rt=.62,[it,at]=[.28,.26],ot=.07,st=(e,t,n)=>{let r=Array.from({length:n+1},(e,r)=>{let i=r*Math.PI/(2*n);return[.55+ot*Math.cos(i),t-ot+ot*Math.sin(i)]});return[[-.62,-.4],...r.map(([e,t])=>[-e,t]),...r.reverse(),[rt,-.4]].map(([t,n])=>D(t,n,e))},ct={body:e=>{let[t,n]=[[],[]],r=e>1,a=(e,n,i=.04,a=Re)=>ge(t,r&&i>.035?me:Se,e,n,i,a),o=(e,n,r,i=t)=>{let a=i.length;r();for(let t=a;t<i.length;t+=10)[i[t+6],i[t+7],i[t+9]]=e;ee(i,a,n)},s=[2,3,5][e],c=[st(.85,it,s),...Array.from({length:s+1},(e,t)=>{let n=t*Math.PI/(2*s);return st(1.0499999999999998+.9*Math.sin(n),at-.38*(1-Math.cos(n)),s)})];for(let e=0;e+1<c.length;e++)ie(n,c[e],c[e+1],[We]);let l=c[c.length-1].map(e=>i(e,[0,0,-.005])),u=l.length-1;E(t,[l[0],l[u],l[u-1],l[1]],A,[0,0,-1]);for(let e=0;e<s;e++)E(n,[l[1+e],l[u-1-e],l[u-2-e],l[2+e]],We,[0,0,-1]);E(t,[D(-.92,-.45,.85),D(j,-.45,.85),D(j,M,.85),D(-.92,M,.85)],A,[0,0,1]),E(t,[D(-.62,M,.85),D(rt,M,.85),D(.55,it,.85),D(-.55,it,.85)],A,[0,0,1]),E(t,[D(-.92,-.44,-.6),D(j,-.44,-.6),D(j,-.44,.85),D(-.92,-.44,.85)],k,[0,1,0]),((e,t,n)=>{let r=n>1,i=n?qe:[qe[0],qe[qe.length-1]];for(let a of[-1,1]){for(let o=0;o+1<i.length;o++){let[[s,c],[l,u]]=[i[o],i[o+1]],d=[D(a*Ke,-.47,s),D(a*Ke,-.47,l),D(a*j,u,l),D(a*j,c,s)];if(E(t,d,We,[a,.2,0]),E(t,[d[3],d[2],D(a*(j-.1),u,l),D(a*(j-.1),c,s)],We,[0,1,0]),r){let t=[D(a*(j-.1),-.44,s),D(a*(j-.1),-.44,l),D(a*(j-.1),u,l),D(a*(j-.1),c,s)];E(e,t,A,[-a,0,0])}n&&ge(e,Se,D(.88*a,c+.025,s),D(.88*a,u+.025,l),.035,A)}if(E(t,[D(a*Ke,-.47,-.62),D(a*j,M,-.62),D(a*(j-.1),M,-.62),D(a*(Ke-.1),-.47,-.62)],We,[0,0,1]),!n)continue;let o=(e,t)=>Ke+(j-Ke)*(e+.47)/(t+.47)+.008;E(e,[D(a*o(-.47,M),-.47,-.62),D(a*o(-.47,M),-.47,.8),D(a*o(-.35,M),-.35,.8),D(a*o(-.35,M),-.35,-.62)],A,[a,0,0]);let s=1*a;if(ge(e,r?me:Se,D(s,-.38,-.5),D(s,-.38,.62),.04,k),!r)continue;for(let t of[-.4,.5])ge(e,Se,D(a*Ke,-.42,t),D(s,-.38,t),.03,k);let[c,l,u]=[.07,-.26,.13],d=Array.from({length:8},(e,t)=>{let n=(t+.5)*Math.PI/4,r=l+u*Math.sin(n);return D(a*o(r,qe[2][1]),r,c+u*Math.cos(n))}),f=D(a*o(l,qe[2][1]),l,c);d.forEach((t,n)=>E(e,[f,t,d[(n+1)%8]],Ge,[a,0,0]))}})(t,n,e),ie(t,ce(-.55,.5,.2,.5,-.45),ce(-1.55,.45,.15,.45,-.4),[ze,k,A,k],void 0,A);for(let e of[-1,1])o(He,_,()=>E(t,[D(.2*e,-.05,-1.555),D(.36*e,-.05,-1.555),D(.36*e,.05,-1.555),D(.2*e,.05,-1.555)],We,[0,0,1]));let d=(e,t,n)=>{let r=e=>[-e[0],e[1],e[2]];a(e,t,.045),a(t,n,.045),a(r(e),r(t),.045),a(r(t),r(n),.045),a(n,r(n),.045)},[p,m]=[D(.86,.85,-.55),D(.68,1.15,-.6)],[g,v]=[D(.82,.72,.74),D(.64,1.05,.64)];d(D(.88,.1,-.5),p,m),d(D(.88,M,.78),g,v);for(let e of[-1,1])a(D(e*m[0],m[1],-m[2]),D(e*v[0],v[1],-v[2]),.04),a(D(e*p[0],p[1],-p[2]),D(.44*e,.15,-1.55),.04),a(D(e*g[0],g[1],-g[2]),D(.65*e,.05,1.5),.04);a(D(.1-.92,-.3,2.06),D(j-.1,-.3,2.06),.07,k);for(let e of[-1,1]){let n=D(e*ue[0],ue[1],ue[2]);if(r){t.push(...f(h([[.085,-.13],[.095,0],[0,0]],6,n),k));let e=t.length-180;for(let n=e;n<t.length;n+=10)[t[n+6],t[n+7],t[n+9]]=Ve;ee(t,e,_)}else o(Ve,_,()=>E(t,[i(n,[-.09,-.09,0]),i(n,[.09,-.09,0]),i(n,[.09,.09,0]),i(n,[-.09,.09,0])],We,[0,0,-1]))}if(!e)return[t,n];for(let e of[-.45,.45]){let n=(t,n,r)=>[D(e-.21,n,t),D(e+.21,n,t),D(e+.21,n,t-r),D(e-.21,n,t-r)];E(t,n(.3,-.22,.52),Be,[0,1,0]);let[i,a]=[n(-.2,-.22,.08),n(-.3,.68,.07)];r?(E(t,[...n(.3,-.44,0).slice(0,2),...n(.3,-.22,0).slice(2)],Be,[0,0,-1]),ie(t,i,a,[Be,A,A,A],void 0,Be)):E(t,[i[0],i[1],a[1],a[0]],Be,[0,0,-1])}let y=D(0,.62,-.82);t.push(...f(h([[.27,-.13],[.42,-.12],[.42,.12],[.27,.13]],e>1?12:8,y),Je),...f(h([[0,-.08],[.27,-.13]],6,y),Xe));let b=e=>[D(-.5,1.13,e),D(.5,1.13,e),D(.5,1.03,e),D(-.5,1.03,e)];ie(t,b(.58),b(.67),[A],A);for(let e of r?[-.39,-.13,.13,.39]:[0]){let n=r?.08:.46;o(Ve,_,()=>E(t,[D(e-n,1.04,.675),D(e+n,1.04,.675),D(e+n,1.12,.675),D(e-n,1.12,.675)],We,[0,0,-1]))}for(let e of[oe,-oe]){let t=[-1,1].map(t=>D(t*ke[0],ke[1],e));e<0&&a(t[0],t[1],.04,k),t.forEach((t,n)=>a(D(.4*(2*n-1),e>0?-.05:.12,e),t,.04,k))}if(!r)return[t,n];for(let e of[-1,1])a(D(.88*e,.4,-.52),D(e*(j-.06),.45,.8),.035);a(D(-.86,.85,-.55),D(.68,1.15,-.6),.035);for(let e of[-.36])a(D(-.56,e,1.96),D(.56,e,1.96),.018,k);for(let e of[-.3,.3])a(D(e,.17,-1.25),D(e,.36,-1.25),.09,k),a(D(e,.36,-1.25),D(e,.38,-1.25),.095,A);a(D(.36,-.1,-1.45),D(.42,.2,-1.75),.05,k);for(let[e,t,n]of De){a(D(e,t,n-1.1),D(e,t,n-.06),.065,[.16,.17,.2]),a(D(e,t,n-1.2),D(e,t,n-1.1),.085,k);for(let r of[n-.85,n-.35])a(D(.7*e,t-.14,r),D(e,t,r),.03,k);o([.2,1,.35],_,()=>a(D(e,t,n-.06),D(e,t,n),.05,[.2,1,.35]))}o(Ue,1.5,()=>E(t,[D(-.6,-.08,.845),D(-.3,-.08,.845),D(-.3,.04,.845),D(-.6,.04,.845)],We,[0,0,1]));let x=D(-.62,2.4,-1.62);a(D(-.6,.15,-1.5),x,.012,k);for(let e of[-1,1])E(n,[x,D(-.62,2.12,-1.62),D(-.62,2.27,-2.05)],We,[e,0,0]);return[t,n]},wheel:e=>{let t=[6,8,12][e],n=[...f(h(e?tt:[[Qe,-.2],[Qe,.2]],t),e?Je:Ye),...f(h(e?[[et,.18000000000000002],[.12,.1]]:[[Qe,.2],[0,.12000000000000001]],6),e?Xe:Je),...e?f(h([[.12,.1],[0,.16]],6),Ze):[]];for(let r=0;e&&r<6*t*10*5;r+=10)Math.floor(r/10/6/t)===2&&([n[r+6],n[r+7],n[r+9]]=Ye);for(let e=0;e<n.length;e+=10)[n[e],n[e+2],n[e+3],n[e+5]]=[-n[e+2],n[e],-n[e+5],n[e+3]];if(e>1){let e=(e,t,n)=>[e,n*Math.cos(t),n*Math.sin(t)];for(let t=0;t<12;t++){let r=(t+.5)*d/12,[i,a]=[r-.035,r+.035],[o,s]=[.05-.2,.15000000000000002];E(n,[e(o,i,Qe),e(s,i,Qe),e(s,i,$e),e(o,i,$e)],Je,e(0,i-1.6,1)),E(n,[e(o,a,Qe),e(s,a,Qe),e(s,a,$e),e(o,a,$e)],Je,e(0,a+1.6,1)),E(n,[e(o,i,$e),e(s,i,$e),e(s,a,$e),e(o,a,$e)],Je,e(0,r,1))}}return n},fender:e=>{let t=[],n=e>1?.9:.6,[r,i]=[-.22,.24000000000000002];for(let a=0;a<e;a++){let[o,s]=[a,a+1].map(t=>n*(2*t/e-1)),c=(e,t,n=nt)=>[e,n*Math.cos(t),-n*Math.sin(t)];E(t,[c(r,o),c(i,o),c(i,s),c(r,s)],[1,1,1],[0,1,0]),e>2&&E(t,[c(i,o),c(i,s),c(i,s,nt-.09),c(i,o,nt-.09)],[1,1,1],[1,0,0])}return t}},N=(e,t=1,n=1,r)=>({l:e,c:[t],s:n,r}),lt=s(je).map(String),ut=(e,t,n=1,r=1)=>({...N(e,n,r),t:Math.max(0,lt.indexOf(`${t}`))}),P=(e,t=1,n=-1)=>({l:n,c:e.map(e=>e*t),s:1}),F=125,dt=P([.48,.49,.51],1,Me),I=dt,L=N(t.STEEL,.45),ft=N(t.METAL,.7),pt=P([.03,.03,.035]),R=P([.13,.135,.15]),mt=[.8,.3,.04],ht=P([1,.36,.05],1,Me),gt=P([.03,.06,.09],1,l),_t=P([0,0,0],1,-7),vt=P([.64,.59,.48],1,_e),yt=P([1,.62,.25],1,-2),bt=N(t.PAINT,1.37),xt=bt,St=P([1.3,1.33,1.38]),Ct=N(t.PAINT,1.99),wt=P([.42,.43,.45]),Tt=ut(t.FABRIC,Ee.carpet,1,2),z=[0,-99,0],Et=e=>(e=Math.min(Math.max(e,0),1))*e*(3-2*e),B=(e,t)=>[e[0]-t[0],e[1]-t[1],e[2]-t[2]],Dt=(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]],Ot=e=>{let t=Math.hypot(e[0],e[1],e[2])||1;return[e[0]/t,e[1]/t,e[2]/t]},V=(e,t)=>e.map((e,n)=>(e+t[n])/2),H=(e,t,n=1)=>e.map((e,r)=>e+t[r]*n),U=[0,1,3,2],W=[],kt=(e,t)=>0,At=(e,t,n,r)=>{if(n.l<0)W.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]],[o,s]=n.r?[a,i]:[i,a];W.push(e[0],e[1],e[2],t[0],t[1],t[2],o*n.s,s*n.s,n.l,Math.min(n.c[0]*r,1.99)+2*(n.t??0))}},G=(e,t,n,r=1)=>{let i=[0,0,0];if(e.forEach((t,n)=>{let r=e[(n+1)%e.length];i=H(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=Ot(i);let a=B(V(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])At(e[a],i,t,typeof r==`number`?r:r[a])},K=(e,t,n,r,i,a=i,o=!1)=>{for(let s=0;s<e.length-1;s++){let c=n(s);c&&G([e[s],e[s+1],t[s+1],t[s]],c,o?H(e[s],B(e[s],r)):r,i&&a?[i[s],i[s+1],a[s+1],a[s]]:1)}},q=(e,t,n,r=n,i=4)=>{let a=V(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];G(U.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)}},jt=(e,t,n,r,i=n)=>{let a=Ot(B(t,e)),o=Ot(Dt(a,Math.abs(a[1])>.9?[1,0,0]:[0,1,0])),s=Dt(o,a),[c,l]=[e,t].map(e=>U.map(t=>H(H(e,o,((1&t)-.5)*n),s,((t>>1)-.5)*i))),u=V(e,t);K([...c,c[0]],[...l,l[0]],()=>r,u),G(c,r,u),G(l,r,u)},Mt=N(t.STEEL,.6),Nt=(e,t,n,r,i,a=1,o=z,s=Mt)=>{let c=7*e[0]+3*Math.abs(e[2]-F)+e[1],l=(e,t)=>b(e,c+1.37*t,11+t),u=B(t,e),d=Math.hypot(n[0],n[1],n[2]),f=Ot(Dt(u,n)),p=B(V(e,t),o);f[0]*p[0]+f[1]*p[1]+f[2]*p[2]<0&&(f=f.map(e=>-e));let m=Math.sign(f[0]*n[0]+f[1]*n[1]+f[2]*n[2])||1,h=1/r;for(let t=0;t<r;t++){let c=(t+.3*(l(t,0)-.5)*(t>0))*h,p=(t+1+.3*(l(t+1,0)-.5)*(t<r-1))*h,g=.3+.7*l(t,1),_=m*d*(.15+.5*l(t,2)),v=.5*(l(t,3)-.5)*d,y=(t,r)=>H(H(H(e,u,c+(p-c)*t),n,g*r),f,_*r*r*g+v*(t-.5)*r*g),b=[.08+.3*l(t,4),.92-.3*l(t,5)],x=.35+.25*l(t,6),S=l(t,7),C=[[0,0],[1,0],[b[1],x],...S<.45?[[.25+.5*l(t,8),1]]:S<.8?[[.55+.3*l(t,8),.75+.25*l(t,9)],[.15+.3*l(t,9),1]]:[[.7+.2*l(t,8),1],[.5,.55+.15*l(t,9)],[.1+.2*l(t,9),.9]],[b[0],x+.1*(l(t,10)-.5)]],ee=C.map(([e,t])=>y(e,t)),te=C.map(([,e])=>a*(1-.45*e));for(let e=1;e<ee.length-1;e++){let t=[ee[0],ee[e],ee[e+1]],n=[te[0],te[e],te[e+1]];G(t,i,o,n),i.l!=-7&&G(t.map(e=>H(e,f,-.012)),s,H(ee[0],f,9),n.map(e=>Math.min(1,.5+e)))}}},Pt=(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])];K(f,p,()=>r,V(e,t),f.map(()=>o[0]),f.map(()=>o[1])),i&&G(p.slice(1),i,e)},[Ft,It,Lt]=[1.3,3,3],Rt=({min:e,max:t})=>{let n=V(e,t),r=kt(n[0],n[2]);if(r<.3||e[1]>r)return;let i=n[0]+n[2],a=(n,a)=>{let o=Math.hypot(Math.max(e[0]-n,0,n-t[0]),Math.max(e[2]-a,0,a-t[2]));return kt(n,a)+(((e,n)=>Math.min(.1+.3*v(e/1.6+i,n/1.6,5),t[1]-r-.04))(n,a)+.05)*(1-Et(o/Ft))-.05},o=(e,t)=>Ot([a(e-.05,t)-a(e+.05,t),.1,a(e,t-.05)-a(e,t+.05)]),s=[],c=[[t[0],e[2]],[t[0],t[2]],[e[0],t[2]],[e[0],e[2]]];c.forEach(([e,t],n)=>{for(let r=0;r<=Lt;r++){let i=(n-1+r/Lt)*Math.PI/2;s.push([e,t,Math.cos(i),Math.sin(i)])}let[r,i]=c[(n+1)%4],a=Math.ceil(Math.hypot(r-e,i-t)/1.5),[o,l]=[Math.cos(n*Math.PI/2),Math.sin(n*Math.PI/2)];for(let n=1;n<a;n++)s.push([e+(r-e)*n/a,t+(i-t)*n/a,o,l])});let l=e=>s.map(([t,n,r,i])=>{let[s,c]=[t+r*e,n+i*e];return{p:[s,a(s,c),c],n:o(s,c),k:.92+.16*v(s/11,c/11,5)}}),u=l(0);for(let e=1;e<=It;e++){let t=l(Ft*(e/It)**1.3);for(let e=0;e<s.length;e++){let n=(e+1)%s.length;for(let r of[u[e],u[n],t[n],u[e],t[n],t[e]])At(r.p,r.n,vt,r.k)}u=t}},zt=(e,t,n,r=[1,1,1])=>y(W,e,t,[[-n[2],0,n[0]],[0,1,0],n],[0,0,0],r),Bt=e=>{W=e},Vt=(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=Dt(B(i(t+1,n),i(t-1,n)),B(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)];At(e[s][c],a[s][c],o,n(e[s][c]))}}},Ht=(e,t,n=()=>1)=>{let r=W;Bt([]);for(let r=0;r<e.length;r+=6)At(e.slice(r,r+3),e.slice(r+3,r+6),t,n(e.slice(r,r+3)));let i=W;return Bt(r),i},Ut=[-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],Wt=[[2.75,6.72],[2.5,6.93],[2.3,7],[0,7],[0,7]],Gt=Ut.length+Wt.length,Kt=2*Gt-2,qt=e=>Ut[e]??Wt[e-Ut.length][1],[Jt,Yt,Xt,Zt]=[92,104,114,2.4],J=T[1],Qt=(e,t)=>{let n=w[e].cut,r=n[0][2];for(let e=1;e<n.length;e++)r+=(n[e][2]-n[e-1][2])*Et((t-n[e][0]+1)/2);let i=e>1?Math.max(t-99,0)/(Xt-99):0;return[r,e>1?Et((t-94)/5):0,1-.85*i,Zt*i]},$t=(e,t,n)=>{let[r,i,a]=Qt(e,t);return(re(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)-re(n))*i)*r*a},en=(e,t,n,r,i)=>{let[,a,o,s]=Qt(e,t);return[t,O.axis[e]-s+(r>0?r*(1-.2*a):Math.max(r,3.5*a-7))*o,F+i*n]},tn=(e,t,n,r)=>en(e,t,$t(e,t,n),n,r),nn=(e,t)=>{let n=e>1&&t>Jt?t<Yt?5*(t-Jt)/12:5*(Xt-t)/10:0,r=Array.from({length:Gt},(r,i)=>{let a=qt(i),o=t-n*Math.min(Math.max((a-J)/(7-J),0),1),[s,c,l]=Qt(e,o),u=Wt[i-Ut.length],d=u?(i==Gt-2?2.5*s-O.skin:Math.min(u[0],u[0]+(2.38-u[0])*c)*s)*l:$t(e,o,a);return t=>en(e,o,d,a,t)});return[...r.map(e=>e(1)),...r.slice(0,-1).reverse().map(e=>e(-1))]},rn=(e,t,n)=>{let{cut:r,tears:i,holes:a}=w[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},an=[93.5,95,95.3,98,98.3,101,101.3,Yt,106.5,109,111.5,113,Xt],on=[[98.3,101,2.9,5,1],[98.3,101,3.6,5.5,-1]],sn=e=>[w[e].floor,...ae.filter(t=>t>w[e].floor+.5&&t<7)],cn=(e,t,n)=>{let r=sn(e),i=r[Math.min(n,r.length-2)],a=r[Math.min(n,r.length-2)+1],o=i<T[0]?r[0]:i<T[1]?T[0]:T[1];return Math.max(Math.min(re(a),re(o))*Qt(e,t)[0]-O.skin,.05)},ln=(e,t,n,r)=>[t,O.axis[e]+sn(e)[n],F+r*cn(e,t,n)],un=e=>T.some(t=>Math.abs(t-e)<1e-6),dn=(e,t,n,r,i)=>w[e].tears.some(([e,a,o,s])=>t>=e-.01&&n<=a+.01&&r>=o-.01&&i<=s+.01),fn=e=>[...e?[[O.sections[e][0],-1]]:[],...e<2?[[O.sections[e][1],1]]:[]],pn=(e,t)=>fn(e).some(([e])=>Math.abs(e-t)<.01),mn=.03,hn=e=>{let t=O.axis[e],n=fn(e).map(e=>e[0]),{tears:r,holes:i}=w[e];return a=>{let[o,s,c]=[a[0],a[1]-t,Math.abs(a[2]-F)],l=.9*v(o/1.7,a[1]/1.7+a[2]/2.3,9),u=Math.min(9,...n.map(e=>Math.abs(o-e)));for(let[e,t,n,i]of r)c>2.4&&(u=Math.min(u,Math.hypot(Math.max(e-o,o-t,0),Math.max(n-s,s-i,0))));for(let[e,t,n]of i)e==2&&s>5&&(u=Math.min(u,1.4*Math.hypot(Math.max(t-o,o-n,0),.5*c)));return(.22+.78*Et((u-l)/1.1))*(.5+.5*Et((s+6.3+.5*l)/2.4))*(.93+.07*v(o/5,(a[1]+a[2])/4,4+e))}},gn=[[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]],_n=[63,102,91,7],vn=f(h([[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]),yn=[[0,0],[11,0],[12.5,1.2],[10.5,8.5],[9.2,10],[6.4,10],[5.2,8.8]],bn=[...yn.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]],xn=(e,t,n)=>e.slice(1).forEach((r,i)=>Nt(e[i],r,t,2,I,.14,n)),Sn=(e,t)=>{let[n,r]=O.sections[e],i=O.axis[e],a=e>1?[...rn(e,n,Jt),...an]:rn(e,n,r),o=hn(e),s=e=>[e,i,F];if(Vt(a.map(t=>nn(e,t)),(n,r)=>{let i=(e=>e<Gt-1?e:Kt-1-e)(r),[o,s,c,l]=[a[n],a[n+1],qt(i),qt(i+1)];if(i==Gt-2?((e,t,n)=>w[e].holes.some(([e,r,i])=>e==2&&t>=r-.01&&n<=i+.01))(e,o,s):dn(e,o,s,c,l)||e>1&&((e,t,n,r,i)=>on.some(([a,o,s,c,l])=>l==i&&e>=a-.01&&t<=o+.01&&n>=s-.01&&r<=c+.01))(o,s,c,l,r<Gt-1?1:-1))return;let u=o>=Jt&&s<=Yt&&s-o>.5&&c>=J&&(l<=6.5||i>Gt-4&&o>=98);return t||u?t&&u?_t:void 0:c==-.9?ht:I},o),t)return;let c=sn(e);for(let t of[-1,1])for(let[n,r,o,l]of w[e].tears){let u=c.map((e,t)=>[e,t]).filter(([e])=>e>=o&&e<=l),d=[(n+r)/2,i+(o+l)/2,F+6*t];for(let[i,a]of[[n,.4],[r,-.4]]){if(pn(e,i))continue;let n=u.map(([n])=>tn(e,i,n,t));K(n,u.map(([,n])=>ln(e,i,n,t)),()=>wt,d,void 0,void 0,!0),xn(n,[a,0,.12*t],s(i))}let f=a.filter(e=>e>=n&&e<=r);for(let[[r,i],a]of[[u[0],.35],[u[u.length-1],-.35]]){let o=un(r)?-.02:un(r+.3)?.02:0,c=f.map(n=>H(tn(e,n,r,t),[0,o,0]));K(c,f.map(n=>H(ln(e,n,i,t),[0,o,0])),()=>wt,d,void 0,void 0,!0),xn(c,[0,a,.12*t],s(n))}}for(let[t,n]of fn(e)){let r=nn(e,t),i=r.map((t,r)=>H(t,[n*(.15+1.1*b(r,e,3+n)),0,0]));K(r,i,()=>I,s(t),r.map(()=>.22));let a=e=>{let t=B(e,s(e[0])),n=Math.hypot(t[1],t[2])||1;return[e[0],e[1]-.02*t[1]/n,e[2]-.02*t[2]/n]};K(r.map(a),i.map(a),()=>Mt,s(t),void 0,void 0,!0);for(let r of[-1,1])K(c.map(n=>tn(e,t,n,r)),c.map((n,i)=>ln(e,t,i,r)),e=>1&e?wt:R,s(t-9*n))}},Cn=.012,wn=P([.12,.085,.06]),Tn=P([.1,.07,.05]),En=P([.8,.34,.07],1,-2),Dn=(e,t,n,r,i,a,[o,s])=>{let c=[],l=(e,t,n)=>{let r=[],i=Math.max(2,Math.round(Math.hypot(t[0]-e[0],t[1]-e[1])/.3));for(let a=0;a<=i;a++){let o=a/i;r.push([e[0]+(t[0]-e[0])*o,e[1]+(t[1]-e[1])*o,n[0],n[1]])}return r},[u,d]=[F-r,F+r];if(a)e>o+.1&&c.push(l([e,d],[e,u],[-1,0])),t<s-.1&&c.push(l([t,u],[t,d],[1,0]));else{let n=[[e,u],[t,u],[t,d],[e,d]],r=[[0,-1],[1,0],[0,1],[-1,0]],i=n.flatMap((e,t)=>{let i=l(e,n[(t+1)%4],r[t]).slice(0,-1),a=(t+3)%4;return i[0]=[e[0],e[1],r[t][0]+r[a][0],r[t][1]+r[a][1]],i});c.push([...i,i[0]])}let f=(e,t,n)=>Math.max(t,Math.min(n,e)),p=Math.round(10*e+3*t);c.forEach((e,t)=>{let r=[],a=0;e.slice(1).forEach((t,n)=>{let i=e[n],o=Math.hypot(t[0]-i[0],t[1]-i[1])/2;for(let e=0;e<2;e++){let n=e/2,s=e?t:i;r.push([i[0]+(t[0]-i[0])*n,i[1]+(t[1]-i[1])*n,s[2],s[3],a]),a+=o}});let c=e[e.length-1];r.push([c[0],c[1],c[2],c[3],a]);let l=((e,t)=>{let n=[];for(let r=0,i=0;r<e+.5;i++){let e=.25+.5*b(i,t,95);n.push([r,e,.05+.3*b(i,t,96)]),r+=e*(.9+.6*b(i,t,97))}return e=>Math.max(.12,...n.map(([t,n,r])=>Math.abs(e-t)<n?r+Math.sqrt(n*n-(e-t)**2):0))})(a,p+31*t),[u,d]=[0,1].map(e=>r.map(([t,r,a,c,u])=>{let d=e*l(u),p=Math.hypot(a,c);return[f(t+a/p*d,o,s),n+Cn,f(r+c/p*d,F-i,F+i)]}));for(let e=0;e<r.length-1;e++)G([u[e],u[e+1],d[e+1],d[e]],wn,z,[.15,.15,1,1]);let m=d.map((e,t)=>{let[n,i]=[d[Math.max(0,t-1)],d[Math.min(d.length-1,t+1)]],[a,o]=[i[2]-n[2],n[0]-i[0]],s=Math.hypot(a,o)||1;return a*r[t][2]+o*r[t][3]<0&&([a,o]=[-a,-o]),[a/s,o/s]}),h=r.map(([,,,,e])=>Math.max(0,Math.min(1,1.6*v(e/.6,.37*p+t,21)-.35))),g=(e,t)=>[d[e][0]+m[e][0]*t,n+Cn+.001,d[e][2]+m[e][1]*t];for(let e=0;e<d.length-1;e++)if(h[e]+h[e+1]>.1){let[t,n]=[h[e],h[e+1]];G([g(e,-.016),g(e+1,-.016),g(e+1,.028),g(e,.028)],En,z,[t,n,.5*n,.5*t])}for(let t=0;t<e.length-1;t+=2){let[r,i]=[e[t],e[Math.min(t+2,e.length-1)]],a=e=>[e[0],n+Cn,e[1]];Nt(a(r),a(i),[.2*-r[2],-.25,.2*-r[3]],1,wn,.35,z,Tn)}})},On=N(t.GRATE,1.7,2),kn=[0,99,0],An=(e,t,n,r,i)=>U.map(a=>[1&a?t:e,n,2&a?i:r]),jn=e=>{let[t,n]=O.sections[e],{cut:r}=w[e];return[r[0][3]?r[0][1]:t,e>1?be.east:n]},Mn=(e,t,n,r,i=3)=>{let a=Ot(B(t,e)),o=Ot(Dt(a,Math.abs(a[1])>.9?[1,0,0]:[0,1,0])),s=Dt(o,a),[c,l]=i==3?[.58*n,2.0944]:[.5*n,2*Math.PI/i],u=Array.from({length:i+1},(e,t)=>t%i*l).map(e=>H(H([0,0,0],o,c*Math.cos(e)),s,c*Math.sin(e)));K(u.map(t=>H(e,t)),u.map(e=>H(t,e)),()=>r,V(e,t))},Nn=(e,t,n,r,i=4,a=8)=>{let o=Array.from({length:i+1},(e,t)=>Math.PI*t/i),s=r=>Array.from({length:a+1},(i,o)=>((r,i)=>H(H(H(e,t[1],n[1]*Math.cos(r)),t[0],n[0]*Math.sin(r)*Math.cos(i)),t[2],n[2]*Math.sin(r)*Math.sin(i)))(r,2*Math.PI*(o%a)/a));for(let t=0;t<i;t++)K(s(o[t]),s(o[t+1]),()=>r,e)},Pn=(e,t,n,r,i,a=i,o=0)=>{let s=n=>H(H(H(e,t[0],n[0]),t[1],n[1]),t[2],n[2]),c=s(V(n,r));for(let e=0;e<6;e++){if(o>>e&1)continue;let[t,l,u]=[e>>1,(1+(e>>1))%3,(2+(e>>1))%3];G(U.map(i=>{let a=[0,0,0];return[a[t],a[l],a[u]]=[(1&e?r:n)[t],(1&i?r:n)[l],(2&i?r:n)[u]],s(a)}),e==3?a:i,c)}},Y=(e,t,n,r,i,a,o=a,s=2,c=!1,l=a)=>{let u=Fn(n,r,i,s),d=(n,r,i)=>H(H(H(e,t[0],n),t[1],r),t[2],i),f=d((n[0]+r[0])/2,(n[1]+r[1])/2,(n[2]+r[2])/2),p=e=>u.map(([t,n])=>d(t,n,e)),[m,h]=[p(n[2]),p(r[2])];K([...m,m[0]],[...h,h[0]],e=>{let[t,n]=[u[e],u[(e+1)%u.length]];return r[1]-t[1]<1e-6&&r[1]-n[1]<1e-6?o:a},f),c||(G(m,l,f),G(h,a,f))},Fn=(e,t,n,r)=>{let i=typeof n==`number`?[n,n,n,n]:n,a=Math.min(t[0]-e[0],t[1]-e[1])/2,o=[];return[[e[0],e[1],1,1,Math.PI],[t[0],e[1],-1,1,1.5*Math.PI],[t[0],t[1],-1,-1,0],[e[0],t[1],1,-1,.5*Math.PI]].forEach(([e,t,n,s,c],l)=>{let u=Math.min(i[l],a),[d,f]=[e+n*u,t+s*u];for(let e=0;e<=(u>0?r:0);e++){let t=c+e/r*Math.PI*.5;o.push([d+u*Math.cos(t),f+u*Math.sin(t)])}}),o},In=(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=Dt(t,e);return[0,1,2].map(n=>e[n]*r+o[n]*i+t[n]*a)}),Ln=P([.04,.06,.09]),Rn=P([.85,.88,.92],1,-2),zn=P([.75,.6,.08]),Bn=e=>[{floor:w[e].floor,ceil:ae[1],under:-1,over:0,seated:!1},{floor:T[0],ceil:ae[4],under:0,over:1,seated:!0},{floor:T[1],ceil:6.5,under:1,over:2,seated:!0}],Vn=(e,t,n,r)=>{let i=sn(e),a=Math.max(0,Math.min(i.findIndex(e=>e>n)-1,i.length-2)),o=(n-i[a])/(i[a+1]-i[a]),[s,c]=[ln(e,t,a,r),ln(e,t,a+1,r)];return s.map((e,t)=>e+(c[t]-e)*o)},Hn=(e,t,n,r,i)=>w[e].tears.some(([e,a,o,s])=>e<n&&a>t&&o<i&&s>r),Un=(e,t,n,r,i)=>w[e].holes.some(([e,a,o,s])=>e==t&&a<r&&o>n&&s>=i),Wn=(e,t,n,r,i,a,o=1)=>{let s=n=>i.map(([r,i])=>{let a=Vn(e,n,i,t);return[n,a[1],a[2]-t*r]}),c=s(n),l=[(n+r)/2,c[o>0?c.length-1:0][1]+9*o,F+30*t];K(c,s(r),a,l)},Gn=[[0,2.05],[.6,2],[.68,2.12],[.72,2.45],[.66,2.78],[.9,3.25],[1.3,3.58],[1.75,3.7]],Kn=[0,1,2,3].map(e=>[1-Math.cos(e*Math.PI/6),Math.sin(e*Math.PI/6)-1]),qn=(e,t,n,r,i)=>{let a=e=>Gn.slice(1,5).map(([t,n])=>[t+e,i+n]);for(let o=1.5*Math.ceil(n/1.5);o<r;o+=1.5){o-n>.02&&Wn(e,t,o-.015,o+.015,a(.006),()=>wt);let s=b(Math.round(4*o),2*e+ +(t>0),81),c=Math.min(o+1.5,r);if(s<.14&&c-o>1&&(Wn(e,t,o+.03,c-.03,a(.01),()=>pt),Wn(e,t,o+.05,c-.05,[[.68,i+2.78],[.97,i+3],[1.17,i+3.25]],()=>xt)),s>.7&&c-o>1){let n=Math.round(4*o),r=H(Vn(e,o+.6,i+2,t),[0,-.03,0]);r[2]-=t*(.2+.35*b(n,3,82));let a=[r[0]+.03,r[1]-.45-.4*b(n,4,83),r[2]];G([H(r,[-.006,0,0]),H(r,[.006,0,0]),H(a,[.006,0,0]),H(a,[-.006,0,0])],St,H(a,[0,0,9])),Pn(a,[[1,0,0],[0,1,0],[0,0,1]],[-.055,-.1,-.055],[.055,0,.055],zn)}}},Jn=(e,t,n,r,i)=>{for(let a=Math.ceil(n)+.5;a<r-.3;a+=1){if(a-n<.3||Hn(e,a-.35,a+.35,i-.4,i+.4))continue;let r=(n,r,o)=>[0,1,2,3,4,5,6,7].map(s=>{let c=(s+.5)*Math.PI/4,[l,u]=[Math.cos(c)*n*1.25,Math.sin(c)*r*1.25],[d,f]=[Math.max(-n,Math.min(n,l)),Math.max(-r,Math.min(r,u))],p=Vn(e,a+d,i+f,t);return[a+d,p[1],p[2]-t*o]}),o=[a,O.axis[e]+i,F+20*t];G(r(.2,.27,.012),St,o);let s=b(Math.round(3*a),2*e+ +(t>0),84);G(r(.13,.19,.02),s<.3?bt:Ln,o)}},Yn=ut(t.FABRIC,Ee.navy,1,4),Xn=ut(t.HIDE,Ee.leather,1,2),Zn=N(t.PAINT,1,.5),Qn=P([.2,.2,.21]),$n=N(t.FABRIC,1.9,4),er=N(t.PAINT,1.2,.5),tr=N(t.STEEL,.6,2),nr=[1,0,0],X=[0,1,0],Z=[0,0,1],rr=(e,t,n,r)=>{let i=t/2,[a,o]=r?[Xn,.95]:[Yn,.74];if(n>.9)return;let s=In([nr,X,Z],Z,n<.8?.2:-.55),c=H(e,X,.42),l=[s[2],s[1],s[0]];Y(c,l,[-i,0,-.09],[i,o,.03],[0,0,.13,.13],a,a,2,!1,Qn),n<.8&&!r&&((e,t,n,r,i,a,o=2)=>{let s=(n,r)=>H(H(e,t[0],n),t[1],r);G(Fn(n,r,[0,0,.09,.09],o).map(([e,t])=>s(e,t)),a,H(s((n[0]+r[0])/2,(n[1]+r[1])/2),t[2],-1))})(H(c,s[0],.031),l,[.8*-i,o-.26,0],[.8*i,o-.03,0],0,$n)},ir=(e,t,n,r,i,a,o)=>{let s=Math.abs(Vn(e,t,n+(o?1.3:1.15),r)[2]-F)-(o?.12:.1),c=e=>F+r*(s-a*e),l=O.axis[e]+n,u=2*Math.round(8*t)+ +(r>0),d=[nr,X,Z],[f,p]=[c(0),c(i)].sort((e,t)=>e-t);Y([t,l,0],d,[.02,.33,f+.015],[o?.6:.46,.48,p-.015],[0,0,.07,0],o?Xn:Yn);for(let r=0;r<i;r++)rr([t,l,c(r+.5)],a-.05,b(u,r+7*e+Math.round(n),91),o);for(let e=0;e<=i;e++){let n=c(e);o?Y([t,l,n],d,[-.25,0,-.03],[.8,.75,.03],[0,0,.3,.12],Zn):Y([t,l,n],d,[.04,.55,-.025],[.44,.62,.025],[0,0,.03,.03],Qn,Qn,1,e!=0&&e!=i)}if(o)Y([t,l,0],[Z,X,nr],[f,0,-.32],[p,1.2,-.25],[0,0,.25,.25],Zn);else for(let e of[.5,i-.5])Mn([t+.3,l,c(e)],[t+.25,l+.36,c(e)],.05,Qn)},ar=(e,t,n,r,i)=>{let a=O.axis[e]+n,[o,s]=[F+r*(Math.abs(Vn(e,t+.9*i,n+1,r)[2]-F)-.05),F+2.9*r],c=Math.min(o,s),l=Math.max(o,s),u=[[i,0,0],X,Z];Pn([t,a,0],u,[0,0,c],[.75,1,l],pt,tr,4);let d=Math.floor((l-c-.1)/.34);for(let e=0;e<d;e++){if(e==(r>0?0:d-1))continue;let n=c+.07+.34*e;Y([t,a,0],[u[0],Z,X],[.6,n,.04],[.77,n+.3,.98],.025,tr),Y([t,a,0],u,[.77,.85,n+.04],[.81,.91,n+.26],.02,Qn)}let f=[u[0],Z,X];Y([t,a,0],f,[0,c,1.45],[.55,l,2.15],[0,.08,.08,0],er),Y([t,a,0],f,[0,c,.98],[.8,l,1.04],[0,.03,.03,0],tr);let p=Math.floor((l-c)/.55);for(let e=0;e<p;e++){let n=c+.08+.55*e;Y([t,a,0],[u[0],Z,X],[.5,n,1.55],[.57,n+.42,1.95],.04,1&e?tr:pt)}Y([t+1.5*i,a,F+3.52*r],In([nr,X,Z],X,.3*r),[-.4,0,-.5],[.4,.3,.5],.04,tr)},or=P([.5,.5,.49]),sr=P([.1,.5,.2],1,-2),cr=[N(t.HIDE,.05,2),ut(t.FABRIC,Ee.navy,.7,3),ut(t.HIDE,Ee.red,.9,2),ut(t.HIDE,Ee.green,.9,2),N(t.HIDE,.22,2),ut(t.HIDE,Ee.tan,.95,2)],lr=P([.12,.14,.07]),ur=P([.55,.42,.05]),dr=[[1,44.6,73.4],[2,82.6,94.5]],fr=(e,t,n)=>{let r=O.axis[e]+w[e].floor,i=w[e].floor;for(let a of[-1,1]){let o=t;for(;o<n-.4;){let t=2*Math.round(16*o)+ +(a>0),n=n=>b(t,n+13*e,101),s=.42+.3*n(0);if(Hn(e,o-.1,o+s+.1,i,i+1.3)){o+=.3;continue}let c=Math.abs(Vn(e,o+s/2,i+.5,a)[2]-F),l=r,u=1+Math.floor(2.4*n(1));for(let e=0;e<u;e++){let t=.36+.22*n(2+e),r=.2+.12*n(5+e),i=In([[1,0,0],[0,1,0],[0,0,1]],[0,1,0],.25*(n(8+e)-.5));Y([o+s/2,l,F+a*(c-.05-t/2-.03*e)],i,[-s/2+.02*e,0,-t/2],[s/2-.02*e,r,t/2],.05,cr[Math.floor(n(11+e)*cr.length)],cr[Math.floor(n(11+e)*cr.length)],1),l+=r}o+=s+.04+.2*n(14)}for(let o=t;o<n-1;o+=3){let t=Math.min(o+2.9,n);if(Hn(e,o,t,i,i+1.4))continue;let s=t=>F+a*(Math.abs(Vn(e,t,i+.7,a)[2]-F)-.62),c=[o,r+.7,F+20*a],l=(e,t,n,i,a,o)=>G([[e,r+t-a,s(e)],[n,r+i-a,s(n)],[n,r+i+a,s(n)],[e,r+t+a,s(e)]],o,c),u=1.1;for(let e=o-u;e<t;e+=.45)for(let n of[1,-1]){let[r,i]=n>0?[e,e+u]:[e+u,e],a=Math.max(Math.min(r,i),o),s=Math.min(Math.max(r,i),t);if(s-a<.02)continue;let c=t=>n>0?t-e:e+u-t;l(a,c(a),s,c(s),.018,lr)}l(o,.06,t,.06,.04,ur),l(o,u,t,u,.04,ur)}}},pr=[.8,.81,.83],mr=P([.05,.06,.1]),hr=P([.03,.03,.035]),gr=P([.55,.42,.12]),_r=[1,0,0],vr=[0,1,0],yr=[0,0,1],br=1/60,xr=(t,r,i)=>{let s={id:1,x:t,y:r-.13,z:i,vy:0,yaw:-Math.PI/2,pitch:-.6,ground:!1,...C,mode:n.RIDE,ammo:0,fists:!0},l=fe(s,void 0,0,void 0,!0);for(let e=0;e<60;e++)l.gait.update(s,br);let u=l.gait.pose(),d=u.rot.slice(),f=(e,t,n)=>d[e]=g(d[e],o(t,n));f(e.SPINE,[1,0,0],-.4),f(e.CHEST,[1,0,0],-.35),f(e.CHEST,[0,0,1],.22),f(e.NECK,[1,0,0],-.6),f(e.HEAD,[1,0,0],-.5),f(e.HEAD,[0,0,1],.5);let p=(e,t)=>{let[n,r,i,s]=a({...u,rot:d}).rot[c[e]];d[e]=g([-n,-r,-i,s],g(o([0,1,0],u.yaw),o([0,0,1],t)))};p(e.ARM_R,.5),p(e.FOREARM_R,.05),p(e.HAND_R,0);let m={...u,rot:d};l.gait={...l.gait,pose:()=>m};let h=W.length;ve(W,l,pr,1,!1,!1);let _=[];for(let e=h;e<W.length;e+=3*Sr)W[e+8]!=Cr&&W[e+Sr+8]!=Cr&&W[e+2*Sr+8]!=Cr&&_.push(...W.slice(e,e+3*Sr));W.length=h,W.push(..._)},Sr=10,Cr=-2,wr=(e,t,n,r)=>{let i=In([_r,vr,yr],vr,r),a=[e,t,n];Nn(a,i,[.13,.09,.12],mr,6,12),Y(a,[i[0],i[2],i[1]],[.06,-.1,0],[.2,.1,.015],[0,.07,.07,0],hr,hr,3),Nn(H(H(a,i[0],.095),vr,.06),[i[1],i[0],i[2]],[.02,.005,.02],gr,2,8)},Tr=[0,.2,.4,.55,.66,.78,.9,.98,1.04,1.08,1.11,1.12],Er=[-1,-.75,-.4,0,.4,.75,1],Dr=(e,t,n,r)=>{let i=(n,r,i)=>H(H(H(e,t[0],n),t[1],r),t[2],i),a=Tr.map(e=>{let t=(e=>{let t=Math.min(Math.max((e-.6)/.18,0),1),n=.26-.09*t*t*(3-2*t),r=Math.max(e-.96,0)/.16;return n*Math.sqrt(Math.max(1-r*r,0))})(e),n=1-.5*Math.max(e-.78,0)/.34;return[...Er.map(n=>i(.02+.08*n**4*(e<.7),e,t*n)),...Er.map(r=>i(-.11*n-.04*(1-r*r),e,-.9*t*r))]}),o=Er.length;for(let e=0;e<a.length-1;e++){let t=i(-.05,(Tr[e]+Tr[e+1])/2,0),[s,c]=[a[e],a[e+1]];K([...s,s[0]],[...c,c[0]],e=>e<o-1?n:r,t)}},Or=P([.1,.1,.11]),kr=P([.17,.17,.18]),Ar=P([.17,.18,.2]),jr=P([.26,.24,.21]),Mr=P([.07,.07,.08]),Nr=P([.06,.22,.12],1,-2),Pr=P([.3,.15,.02],1,-2),Fr=P([.02,.025,.03]),Ir=()=>{Bt([]),Sn(2,`glass`);let e=O.axis[2];for(let[t,n,r,i,a]of on){let o=Ut.indexOf(r),s=Ut.indexOf(i),c=(e,t)=>nn(2,e)[a>0?t:Kt-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=V(V(c(t,o),c(n,s)),V(c(n,o),c(t,s)));for(let t of l)t.slice(1).forEach((n,r)=>{let i=Ot(B(u,V(t[r],n)));Nt(t[r],n,i.map(e=>.45*e),3,_t,1,[t[r][0],e,F])})}return W},Lr=()=>{w.forEach((e,t)=>{(e=>{let[t,n]=O.sections[e],[r,i]=jn(e);Bn(e).forEach(({floor:a,under:o,seated:s},c)=>{if(!s)return;let l=c>1||e>1,[u,d,f]=l?[1.25,.66,.8]:[.8,.5,.5],p=r>t?r+1.7:t+.6,m=e<2?n-.6:c>1?Jt-.3:i-1.7;for(let t of[-1,1])for(let n=p;n+f<m;n+=u){let r=Math.abs(Vn(e,n,a+1.2,t)[2]-F)-.1,i=Math.min(l?2:3,Math.floor((r-2.9)/d));i<1||Hn(e,n-.25,n+f+.1,a,a+1.3)||Un(e,o,n-.25,n+f,r-i*d-.1)||ir(e,n,a,t,i,d,l)}})})(t),(e=>{let t=(e=>{let[t,n]=jn(e),r=[...rn(e,O.sections[e][0],n),...w[e].holes.flatMap(([,e,t])=>[e,t])].filter(e=>e>=t&&e<=n);return[...new Set(r.map(e=>Math.round(100*e)/100))].sort((e,t)=>e-t)})(e);Bn(e).forEach(({floor:n,ceil:r,under:i,over:a,seated:o},s)=>{let c=s==1,l=s==0?.45:.35;for(let u of[-1,1])t.slice(1).forEach((d,f)=>{let p=t[f],m=(p+d)/2;if(d-p<.05||e>1&&p>=Jt-.01&&n>=J)return;let h=Math.abs(Vn(e,m,r,u)[2]-F),g=c?Gn.map(([e,t])=>[e,n+t]):Kn.map(([e,t])=>[e*l,r+t*l]);if(!Hn(e,p,d,g[0][1],r)&&!Un(e,a,p,d,h-2)){Wn(e,u,p,d,g,e=>c&&e==0?wt:s?xt:bt);let[t,r]=g[g.length-1];b(Math.round(4*p),2*e+ +(u>0)+8*s,85)>.3&&Wn(e,u,p,d,[[t+.04,r-.012],[t+.16,r-.012]],()=>Rn),c&&qn(e,u,p,d,n)}let _=[[0,n+.12],[.12,n]];Hn(e,p,d,n,n+.15)||Un(e,i,p,d,h-1)||Wn(e,u,p,d,_,()=>wt,-1),o&&Jn(e,u,p,d,n+1.2)})})})(t)});for(let[e,t,n]of dr)fr(e,t,n);let[e]=jn(0);for(let t of[-1,1])ar(0,e,T[0],t,1);let[,t]=jn(2);ar(2,t,T[0],-1,-1),((e,t,n)=>{let r=O.axis[2]+n,i=Math.abs(Vn(2,t+-1,n+2.1,1)[2]-F)-.05,[a,o]=[i-1,i].map(e=>F+1*e).sort((e,t)=>e-t),s=[[-1,0,0],X,Z];Y([t,r,0],[s[0],Z,X],[0,a,0],[1,o,2.1],[0,.16,.16,0],er);let c=[s[0],Z,X];Y([t,r,0],c,[.98,a+.18,.05],[1.015,o-.18,1.95],.08,or),Y([t,r,0],c,[1.015,a+.3,1],[1.03,a+.36,1.2],.02,wt),Y([t,r,0],c,[1.015,a+.42,1.72],[1.025,o-.42,1.84],.04,sr)})(0,t,T[0]),(()=>{let e=O.axis[2],t=e+J,n=n=>{let[,r,i,a]=Qt(2,n);return $t(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);G([[r[i],t,F-a],[e,t,F-o],[e,t,F+o],[r[i],t,F+a]],Mr,z)});let i=[1,0,0],a=[0,1,0],o=[0,0,1];for(let e of[-1,1]){let n=[98.35,t,F+.85*e],r=[i,a,o];e>0&&(r=In(In(r,i,-.32),a,-.35),n[1]+=.06),Y(n,r,[-.2,0,-.17],[.2,.32,.17],.05,Ar),Y(n,r,[-.26,.31,-.24],[.27,.44,.24],[.02,.04,.07,.04],jr,jr,3);for(let e of[-1,1]){let[t,i]=[.17*e,.27*e].sort((e,t)=>e-t);Y(n,[r[2],r[1],r[0]],[t,.33,-.25],[i,.5,.25],.06,jr,jr,3)}let s=In(r,r[2],.22),c=H(H(n,r[0],-.24),r[1],.42);Dr(c,s,jr,Ar);for(let e of[-.24,.24]){let t=e=>H(H(H(c,s[0],e[0]),s[1],e[1]),s[2],e[2]);G([t([.035,.8,.5*e-.04]),t([.035,.8,.5*e+.04]),t([.04,.05,.7*e+.04]),t([.04,.05,.7*e-.04])],Or,t([-1,.4,0]));let i=e=>H(H(H(n,r[0],e[0]),r[1],e[1]),r[2],e[2]);Y(n,r,[-.22,.64,1.25*e-.035],[.2,.71,1.25*e+.035],.03,Ar),Mn(i([.14,.68,1.25*e]),i([.14,.42,1.1*e]),.035,kr,6)}}Y([98.75,t,F],[o,a,i],[-.22,0,0],[.22,.66,1.7],[0,0,.1,.1],Ar,Ar,3);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=H(n,[e%3?.16:-.1,.24,0]);Mn(n,r,.03,kr,6),Nn(r,[i,a,o],[.04,.035,.045],e<2?jr:Fr,4,10)}for(let e=0;e<3;e++)G(An(99.6+.3*e,99.82+.3*e,t+.665,124.85,125.15),e==1?Pr:Fr,z);let s=In([i,a,o],o,.28);Y([100.45,t,F],s,[0,0,-1.75],[.85,.92,1.75],[0,0,0,.14],Ar,Ar,3);let c=[s[0],s[2],s[1]];Y(H([100.45,t,F],s[1],.92),c,[-.18,-1.6,0],[.6,1.6,.07],.3,Fr,Fr,3);let l=H(H([100.45,t,F],s[1],.955),s[0],-.18);Mn(H(l,s[2],-1.3),H(l,s[2],1.3),.07,Fr,8);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,a=b(n,e,71),o=n==4?Fr:a<.45?Nr:a<.55?Pr:Fr,c=H(H([100.45,t,F],s[1],.38+.3*e),s[0],-.005);G(U.map(e=>H(H(c,s[1],(2&e?1:-1)*(i-.02)),s[2],r+(1&e?i:-i))),o,H(c,[9,0,0]))}let u=In([i,a,o],o,-.35),d=[99.1,en(2,97.6,0,O.r,1)[1]-.75,F];Y(d,[u[0],u[2],u[1]],[-1.6,-.5,-.07],[0,.5,.07],.2,Ar,Ar,3);for(let e=0;e<5;e++){let t=H(H(d,u[0],-.2-.3*e),u[1],-.075);G(U.map(n=>H(H(t,u[0],1&n?.1:-.1),u[2],(2&n?.3:-.3)+.08*(e-2))),e==1?Pr:e==3?Nr:Fr,H(t,u[1],9))}for(let e=0;e<4;e++){let t=H(d,u[0],-.4-.35*e);Mn(t,H(t,[.1*(e-1.5),-.5-.4*b(e,1,72),.15*(e-1.5)]),.03,1&e?pt:kr,6)}xr(98.36,t+.44,124.15),wr(97.6,t,123.45,.7);let f=In([i,a,o],a,.6);Y([97.5,t,125.35],[f[0],f[2],f[1]],[-.3,-.2,0],[.3,.2,.05],.1,Ar,Ar,3);let p=In([i,a,o],a,-.4);Y([97.3,t,123.1],[p[0],p[2],p[1]],[-.25,-.22,0],[.25,.22,.1],.12,jr,jr,3),Y([97.3,t,123.1],p,[-.27,0,-.18],[.27,.1,.18],.05,jr,jr,3);for(let e of[-1,1]){let r=F+e*(n(99.6)-.25);G([[99,t,r],[100.2,t,r],[100.1,t+.7,r-.12*e],[99.1,t+.65,r-.12*e]],Ar,[99.6,t,F])}})()},Rr=[[0,0],[.08,.3],[.3,.8],[.55,1],[.8,.75],[.95,.3],[1,0]],zr=e=>{let t=he.pieces.filter(e=>e.kind==`wingpiece`&&e.min[2]>F),n=F+O.r+w[1].fair[1][2];se.pieces.forEach(([r,i,a,,,o],s)=>{let c=e=>n+se.span*e+a,l=t.filter(e=>e.min[2]>c(r)-.01&&e.max[2]<c(i)+.01).sort((e,t)=>e.min[2]-t.min[2]),[u,d]=[l[0],l[l.length-1]],f=e=>(e.min[2]+e.max[2])/2,p=e=>u.max[1]+(d.max[1]-u.max[1])*(c(e)-f(u))/(f(d)-f(u)),m=Math.ceil(se.span*(i-r)/1.4),h=(t,n,a)=>{let s=Math.min(t,47.49),[l,u]=[Ae(se.trail,s),Ae(se.lead,s)];return[(d=[l+(u-l)*n+o*m*((t-r)/(i-r)-.5),p(t)-a*Oe(t),c(t)])[0],d[1],F+e*(d[2]-F)];var d},g=[r,...[...se.lead,...se.trail].map(e=>e[1]).filter(e=>e>r+.01&&e<i-.01).flatMap(e=>[e-.01,e+.01]),i].sort((e,t)=>e-t),_=g.flatMap((e,t)=>t&&e-g[t-1]>3.4?[(e+g[t-1])/2,e]:[e]),y=e=>.12+.88*Et((Math.min(s?Math.abs(Math.abs(e[2]-F)+F-c(r)):9,s<2?Math.abs(Math.abs(e[2]-F)+F-c(i)):9)-.7*v(e[0]/1.3,e[2]/1.3,17))/.9);Vt(_.map(e=>Rr.map(([t])=>h(e,t,0))),()=>I,y,e<0),Vt(_.map(e=>Rr.map(([t,n])=>h(e,t,n))),()=>I,e=>.75*y(e),e>0);for(let[t,n]of[...s?[[r,-1]]:[],...s<2?[[i,1]]:[]]){let[r,i]=[0,1].map(e=>Rr.map(([n,r])=>h(t,n,e*r))),a=h(t-3*n,.5,.5);K(r,i,()=>pt,a),xn(r,[0,.06,e*n*.3],H(a,[0,-9,0]));for(let e of[.3,.62])jt(h(t-.4*n,e,.5),h(t+.45*n,e+.01*n,.6),.14,L,.6*Oe(t))}})},[Br,Vr]=[.85,.7].map(e=>N(t.STEEL+we,e,1,!0)),Hr=N(t.WOOD,1.35,1,!0),Ur=N(t.WOOD,1.1,.5,!0),Wr=f(h([[0,.1],[.3,.1],[.36,0],[.52,0],[.6,.15],[.6,.85],[.52,1],[.36,1],[.3,.9],[0,.9]],12),[.05,.05,.055]),Gr=Ht(h([[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),I,e=>Math.hypot(e[0],e[1])<1.7&&e[2]<-16?.05:(.12+.88*Et((-e[2]-5-3*v(e[0],2*e[1]-e[2]/2,61))/5))*(.55+.45*Et((e[1]+2.2)/1.6))),Kr={panel:({min:e,max:t},n,r)=>{let i=.55+.45*b(e[0],e[2],51),a=P(dt.c,i,Me),o=t[0]-e[0]<1?0:t[2]-e[2]<1?2:-1;if(o>=0){q(e,t,a,R);let[n,i]=[e.slice(),t.slice()];n[1]=i[1]=t[1],n[o]=i[o]=(e[o]+t[o])/2,Nt(n,i,[0,.4,0],9,I,.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[o]=a[o]=(r>0?e:t)[o]-.04*r,jt(i,a,.08,R)}return}q(e,t,L,a);let s=[0,1,3,2,0].map(n=>[1&n?t[0]:e[0],t[1],2&n?t[2]:e[2]]);s.slice(1).forEach((n,r)=>{let i=B(V(s[r],n),[(e[0]+t[0])/2,t[1],(e[2]+t[2])/2]);Nt(s[r],n,[.35*Math.sign(i[0]),-.12,.35*Math.sign(i[2])],4,I,.35)}),i>.75&&G(U.map(n=>[e[0]+(1&n?1.1:.7),t[1]+.02,2&n?t[2]:e[2]]),P(mt),z,i)},container:({min:e,max:t})=>{q(e,t,Br);let n=t[0]-e[0]>t[2]-e[2]?0:2;for(let r=e[n]+.3;r<t[n]-.2;r+=.6){let[i,a]=[e.map(e=>e-.05),t.map(e=>e+.05)];[i[n],a[n],i[1],a[1]]=[r,r+.3,e[1],t[1]-.15],q(i,a,Vr)}for(let r of[.35,.65]){let i=H(e,B(t,e),r);[i[n],i[1]]=[e[n]-.04,e[1]],jt(i,[i[0],t[1]-.1,i[2]],.08,R)}},crate:({min:e,max:n},r)=>{if(n[1]-e[1]>1.2){q(e,n,N(t.STEEL,.75));for(let t of[.33,.66]){let r=e[0]+(n[0]-e[0])*t;q([r-.02,e[1]+.1,e[2]-.01],[r+.02,n[1]-.1,n[2]+.01],pt)}}else{q(e,n,N(t.WOOD),r&&P(r,.75));for(let t of U){let[r,i]=[1&t?n[0]-.09:e[0]-.01,2&t?n[2]-.09:e[2]-.01];q([r,e[1],i],[r+.1,n[1]+.01,i+.1],Hr,Hr,55^1<<(1&t)^(2&t?32:16))}for(let t of[.25,.75]){let r=e[2]+(n[2]-e[2])*t;q([e[0]-.02,e[1],r-.1],[n[0]+.02,n[1]+.02,r+.1],R)}}},dais:({min:e,max:t},n=mt)=>{q(e,t,L,P(n,.6)),G(U.map(n=>[1&n?t[0]-.5:e[0]+.5,t[1]+.02,2&n?t[2]-.5:e[2]+.5]),P(n,.95),z)},shelter:({min:e,max:t},n)=>{if(!n)return void q(e,t,Ur);let[r,i]=[6,4],a=(n,a,o)=>[e[0]+(t[0]-e[0])*n/r,t[1]-o-.3*Math.sin(Math.PI*n/r)*Math.sin(Math.PI*a/i),e[2]+(t[2]-e[2])*a/i];for(let t=0;t<r;t++)for(let r=0;r<=i;r++)for(let o of[0,.03]){let[s,c]=[a(t,r,o),a(t+1,r,o)],l=P(n,1&t?.7:.8,Te);r<i&&G([s,c,a(t+1,r+1,o),a(t,r+1,o)],l,[e[0],o?99:-99,e[2]]),r%i<1&&G([s,c,H(c,z,1/99),H(s,z,1/99)],l,[e[0],e[1],o?99:-99])}},gear:({min:e,max:t},n)=>{if(n)return Pt(e,t,.4,P(n,.7),P(n,.55)),void Pt([e[0],t[1]-.9,e[2]],[t[0],t[1]-.6,t[2]],.4,R,void 0,.04);let r=(e[2]+t[2])/2;for(let n=0;n<3;n++)zt(Wr,[e[0]+.7+1.5*n,t[1]-.6,t[2]],[0,0,-1],[1,1,t[2]-e[2]]);q([e[0]+.3,t[1]-.8,r-.2],[t[0]-.3,t[1]-.4,r+.2],L)},fallen:({max:e},t,n)=>{if(!t)return;let[r,i,,a,o]=Pe[0],s=Ot([1,0,n*o]),c=[r,e[1]-2.2,F+n*(i-F)];zt(Gr,H(c,s,-a/2),s,[.84,.8,1]),zt(vn,H(c,s,-a/2+.3),s.map(e=>-e),[1.15,1.15,1.15]);let l=[-1,3.5].map(e=>H(H(c,s,e),[0,2.1,0])),u=[.5*-s[2],1.1,.5*s[0]];K(l,l.map(e=>H(e,u)),()=>R,c),Nt(H(l[0],u),H(l[1],u),u,6,I,.16,c)},rail:({min:e,max:t})=>{q([e[0]+.14,e[1]+.07,e[2]],[t[0]-.14,t[1]-.07,t[2]],L,L,12);for(let n of[e[1],t[1]-.07])q([e[0],n,e[2]],[t[0],n+.07,t[2]],L,L,0)},engine:({min:e,max:t},n=mt)=>{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),a=[r,t[1]-2.5,(e[2]+t[2])/2],o=i(0).map((e,t)=>.45+.4*b(t,3,62));K(i(e[2]),i(t[2]),e=>e==2?P(n,.6):I,a,o);for(let[n,o]of[[e[2],-1],[t[2],1]]){G(i(n),pt,a);let e=(e,t,i)=>[r+e*Math.cos(t),a[1]+e*Math.sin(t),n+o*i],t=Math.PI/7;for(let n=0;n<14;n++){let r=n*t;G([e(.5,r,.2),e(2.25,r-.1,.22),e(2.25,r+.22,.05),e(.5,r+.3,.08)],P([.42,.43,.46]),a),G([e(0,0,.3),e(.55,r,.1),e(.55,r+t,.1)],R,a),G([e(2.3,r,.04),e(2.3,r+t,.04),e(2.48,r+t,.04),e(2.48,r,.04)],ft,a)}}},pod:({min:e,max:t},n,r)=>{let i=te[r>0?0:1],a=e[1]+.5,o=V(e,t),[s,c]=[o[0],(r>0?e[2]:t[2])-.04*r];Pt(e,t,.42,I,P(dt.c,.8,Me),0,[.5,1]),Pt(e,[t[0],a+.8,t[2]],.42,pt,void 0,.04),Pt([e[0],a+2,e[2]],[t[0],a+2.4,t[2]],.42,P(i,.8),void 0,.03),G(U.map(e=>[s+(1&e?.65:-.65),a+(2&e?1.95:0),c]),pt,o);for(let e of[-.7,.7])jt([s+e,a,c],[s+e,a+2,c],.1,R),G(U.map(t=>[s+3.03*Math.sign(e),a+(2&t?1.7:1.2),o[2]+(1&t?.3:-.3)]),gt,o);jt([s-.7,a+2,c],[s+.7,a+2,c],.1,R),q([s+1,a-.1,c-2.6*r-.95],[s+2.3,a+.1,c-2.6*r+.95],I);let l=[s,a+.28,o[2]+7*r],u=e=>{let t=3+1.3*b(e%14,r,71);return[s+t*Math.cos(e*Math.PI/7),a+.03+.2*b(e%14,r,72),l[2]+t*Math.sin(e*Math.PI/7)]};for(let e=0;e<14;e++)G([l,u(e),u(e+1)],P(1&e?mt:[.8,.8,.76],.9),z)},heap:({min:e,max:t},n=mt,r=1,i=0)=>{let[a,o]=i?[0,2]:[2,0],[s,c]=[e.slice(),t.slice()];i>0?c[0]-=mn:i<0&&(s[0]+=mn),q(s,c,R,i?R:P(n,.55));let l=Math.round((t[o]-e[o])/1.6);for(let n of i?[i]:[-1,1]){let r=(n<0?e:t)[a];for(let i=0;i<l;i++){let s=e=>b(i,7*r+e,41),c=(s,c,u)=>{let d=[0,c,0];return d[o]=e[o]+(t[o]-e[o])*(i+s)/l,d[a]=r+n*u,d},u=t[1]-.15-.5*s(3),d=.12+.12*s(4),f=[c(.05,e[1],d),c(.95,e[1],d),c(.95,u,.02),c(.05,u-.2*s(6),.02)],p=c(.5,u/2,-9);G(f,s(5)>.45?I:ft,p,[.75,.75,1,1]),Nt(f[3],f[2],[0,.35,0],3,ft,.9,p)}}},frame:({min:e,max:t},n,r)=>{let i=O.sections.some(([,t])=>Math.abs(t-e[0])<.01),a=[e[0]+(i?mn:0),e[1],e[2]],o=[t[0]-(i?0:mn),t[1],t[2]];q([a[0]+.2,a[1],a[2]],[o[0]-.2,o[1]-.8,o[2]],R,R,12),q([a[0]+.2,o[1]-.64,a[2]],[o[0]-.2,o[1]-.16,o[2]],R,R,12),q([a[0],o[1]-.16,a[2]],o,L,L,0),q([a[0],o[1]-.8,a[2]],[o[0],o[1]-.64,o[2]],L,L,0);let s=(a[2]+o[2])/2;jt([a[0]+.14,o[1],s-.7*r],[a[0]+.14,o[1]+3.4,s+.6*r],.26,L)}};Kr.float=Kr.raft=Kr.panel,Kr.jam=(e,t,n)=>Kr.heap(e,t,n,O.sections.some(t=>t[1]==e.max[0])?1:-1);var qr=[`pod`,`dais`,`crate`,`shelter`],Jr=[`shelter`,`float`,`raft`,`engine`,`dais`,`fallen`,`rail`],Yr=e=>Object.values((e=>{let t=e.relief&&{relief:m(e.relief)};kt=(e,n)=>{let r=t?p(t,e,n):0;return r>-1e9?r:0};let n=e=>(Bt([]),e(),W),r=t=>()=>{for(let n of he.pieces){let r=qr.includes(n.kind)&&Math.abs((n.min[2]+n.max[2])/2-F)>1;if(Kr[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]));Kr[n.kind](n,t?.tint,(n.min[2]+n.max[2])/2<F?-1:1),Jr.includes(n.kind)||Rt(n)}}};return{cabin:n(Lr),hull:n(()=>{w.forEach((e,t)=>Sn(t)),w.forEach(({fair:e},t)=>{let n=hn(t);for(let[r,i,a]of e){let e=pn(t,r)?r+mn:r,o=pn(t,i)?i-mn:i,s=t>1&&o>Jt?Yt:o,c=Math.ceil((s-e)/2),l=Array.from({length:c+1},(t,n)=>e+n*(s-e)/c);for(let r of[-1,1]){let i=e=>{let n=$t(t,e,0),i=e>o?(O.r+a-$t(t,o,0))*(1-(e-o)/(s-o))+.05:O.r+a-n;return[[$t(t,e,J)-.15,J],[n+i-.3,J],[n+i-.08,J-.08],[n+i,J-.3],[n+i-.06,J-.75],[n+.6*i,.2],[n+.25*i,-.8],[$t(t,e,-1.7)-.15,-1.7]].map(([n,i])=>en(t,e,n,i,r))};Vt(l.map(i),()=>I,n,r>0);for(let[n,a]of[[e,-1],[o,1]])if(n==s||n==e){let e=i(n);G(e,R,[n-9*a,0,F+8*r]),xn(e.slice(0,6),[.5*a,0,0],[n,O.axis[t],F])}}}})}),ends:n(()=>{(()=>{let[e]=O.sections[0],t=O.axis[0],n=nn(0,e);n.slice(1).forEach((r,i)=>G([[e,t,F],n[i],r],R,[e+9,t,F],.8)),zt(vn,[e+.2,t+1.6,F],[-1,0,0],[1.75,1.75,1.75]);for(let n of[-1,1]){let r=[12.6,t+.4,F+n*($t(0,16,.4)+.3)];zt(Ht(h([[0,0],[.7,.35],[1,2.4],[1,6.4],[.6,8],[0,8.25]],10),I,e=>.25+.75*Et((-e[2]-2)/5)*Et(1.6-n*e[0])),r,[1,0,0]);let i=[2.4,6].map(e=>[r[0]+e,r[1],r[2]+.95*n]);K(i,i.map(e=>H(e,[0,.5,0])),()=>R,r),Nt(i[0],i[1],[0,.2,.8*n],7,I,.16,r),Nt(H(i[0],[0,.5,0]),H(i[1],[0,.5,0]),[0,.1,.8*n],5,I,.2);let a=.45,o=r=>(n>0?yn:bn).map(([i,o])=>{let s=e+14-i,c=$t(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),F+n*(c+l*Math.cos(a))]}),[s,c]=[-1,1].map(e=>{let t=o(e);return G(t,I,o(-e)[3],t.map((e,t)=>n<0&&t>2?.2:t>2?.95:.8)),t});K([...s,s[0]],[...c,c[0]],()=>R,V(s[0],s[3])),_n.forEach((e,r)=>gn.forEach(([i,a,o,s],c)=>{e>>c&1&&G(U.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 en(0,t,$t(0,t,c)+.03,c,n)}),P([.05,.08,.16],1,Me),[17,t,F])}))}})(),(()=>{let e=nn(2,Xt),t=V(e[0],e[Gt-1]);e.slice(1).forEach((n,r)=>G([H(t,[.5,0,0]),e[r],n],R,[0,t[1],F])),zt(f(h([[0,0],[.22,0],[.08,2.4],[0,2.4]],6),[.2,.2,.22]),H(t,[.3,-.1,0]),[1,0,0])})()}),inside:n(()=>w.forEach((e,t)=>(e=>{let[t,n]=O.sections[e],r=O.axis[e],{holes:i}=w[e],a=sn(e),[o,s]=jn(e),c=rn(e,t,s).filter(e=>e>=o);for(let t of[-1,1])Vt(c.map(n=>a.map((r,i)=>ln(e,n,i,t))),(t,n)=>dn(e,c[t],c[t+1],a[n],a[n+1])||c[t]>=Jt-.01&&a[n]>=J?void 0:bt,()=>1,t>0);if(o>t&&G([1,-1].flatMap(t=>(t>0?a:[...a].reverse()).map(n=>ln(e,o,a.indexOf(n),t))),bt,[o-9,r,F]),e>1){let t=a.filter(e=>e<=J);G([1,-1].flatMap(n=>(n>0?t:[...t].reverse()).map(t=>ln(e,s,a.indexOf(t),n))),bt,[s+9,r,F])}for(let{kind:i,min:a,max:o}of he.pieces){if(i!=`deck`||a[0]<t||o[0]>n)continue;let s=o[1]>r+6.9,c=a[1]<r-6.9,[l,u]=[a.slice(),o.slice()];s&&e>1&&(u[0]=Math.min(u[0],Jt));for(let[t,n]of fn(e))Math.abs(l[0]-t)<.01&&n<0&&(l[0]+=.03),Math.abs(u[0]-t)<.01&&n>0&&(u[0]-=.03);let d=Math.min(...[l[0],(l[0]+u[0])/2,u[0]].map(t=>$t(e,t,Math.min(o[1]-r,6.4))))-.3;[l[2],u[2]]=[Math.max(l[2],F-d),Math.min(u[2],F+d)],u[0]>l[0]&&u[2]>l[2]&&(c||q(l,u,Ct,Ct,59),q(l,u,wt,c?On:Tt,s?12:c?52:4))}for(let[n,a,c,l]of i){let i=r+T[n],u=(n>1?2.5:re(T[n]))*Qt(e,(a+c)/2)[0]-O.skin,d=Math.min(l,u);n<2&&Dn(a,c,i,d,u-.3,l>=9,[Math.max(t,o),s]);let f=n>1?I:St,p=n>1?.14:1.05,m=n>1?Mt:wt;for(let[e,t]of[[a,.4],[c,-.4]])Nt([e,i,F-d],[e,i,F+d],[t,-.3,0],6,f,p,z,m);if(l<9)for(let e of[-1,1])Nt([a,i,F+e*d],[c,i,F+e*d],[0,-.3,.4*-e],6,f,p,z,m)}[...T.slice(0,2),6.8].forEach((t,n)=>{let a=r+t-.33;for(let t=o+2;t<Math.min(s,Jt);t+=5){let r=F+(n>1?2.1:3.9)*Qt(e,t)[0]*(b(t,n,43)<.5?-1:1),o=[t+1.6,a+.03,F+4*(b(t,n,41)-.5)],s=(e,t,r)=>i.some(([i,a,o,s])=>i==n&&e>a-r&&e<o+r&&Math.abs(t-F)<s+.3);s(t,r,.8)||s(o[0],o[2],.3)||(G(An(t-.5,t+.5,a,r-.07,r+.07),yt,kn),jt(o,H(o,[.2,-.3-.8*b(t,n,42),.25]),.05,pt))}})})(t))),wings:n(()=>[1,-1].forEach(zr)),debris:n(r(!1)),camps:n(r(!0))}})(e)).flat(),Xr=Array.from({length:18},(e,t)=>{let n=e=>b(t,e,88),r=O.r+2+14*n(2);return[Ce.trees+6+16*n(1),125+(1&t?r:-r),t]}),Zr=(e,t,n,r)=>{let i=e=>b(r,e,81),a=(n<125?-1:1)*(.3+1.1*i(1)),[o,s]=[Math.cos(a),Math.sin(a)],[c,l,u]=[.6+6.5*i(2)*i(2),.3+.18*i(3),4+5*i(4)],d=.12+.18*i(16);return{a,c:o,d:s,tall:c,r:l,len:u,lean:d,top:[e+d*c*o,t+c,n+d*c*s]}},Qr=e=>{let t=e.relief&&{relief:m(e.relief)};return Xr.filter(([,,e])=>b(e,30,89)<.6).map(([e,n,r])=>{let i=t?p(t,e,n):0,a=i>-1e9?i:0,{tall:o,top:s}=Zr(e,a,n,r),c=e=>b(r,e,89),l=o<2.2?s:[e,a,n];return[l[0],l[1],l[2],5+4*c(1),.5,1.6+c(2),.8+.4*c(3)]})},[$r,ei]=[[.75,.04,.03],[.9,.6,.05]],ti=(e,t,n,r,i,a)=>{for(let o of[t,n,r])e.push(o[0],o[1],o[2],i[0],i[1],i[2],a[0],a[1],-1,a[2])},ni=(e,t,n,r,i)=>{let a=e=>b(i,e,91),o=2+Math.floor(3*a(0)),s=.8+.4*a(1),c=$r.map((e,t)=>e*s*(t?1+.5*a(2):1));for(let i=0;i<o;i++){let s=d*(i/o+.3*a(3+i)),l=[t+.5*a(10+i)*Math.cos(s),n+.15+.2*a(20+i),r+.5*a(10+i)*Math.sin(s)],u=.12+.08*a(30+i),[f,p]=[.4*(a(40+i)-.5),.4*(a(50+i)-.5)],m=(e,t)=>l[1]+f*e+p*t,h=Math.hypot(f,1,p),g=[-f/h,1/h,-p/h];for(let t=0;t<5;t++){let[n,r]=[d*t/5+s,d*(t+.5)/5+s],i=[l[0]+u*Math.cos(r),0,l[2]+u*Math.sin(r)];i[1]=m(i[0]-l[0],i[2]-l[2])+.02;let a=e=>{let t=[l[0]+.55*u*Math.cos(e),0,l[2]+.55*u*Math.sin(e)];return t[1]=m(t[0]-l[0],t[2]-l[2]),t};ti(e,l,a(n),i,g,c),ti(e,l,i,a(n+d/5),g,c)}let _=.3*u;ti(e,[l[0]+_,l[1]+.015,l[2]],[l[0]-_/2,l[1]+.015,l[2]+.87*_],[l[0]-_/2,l[1]+.015,l[2]-.87*_],g,ei)}},[ri,ii,ai,oi]=[Ce.trees+5,70,14,80],[si,ci]=[ri-ai-oi,d/4*ai],li=2*(si+ci)+250+2*(ii-ai),ui=O.sections[2][1]+3-ri,Q=e=>(e=Math.min(Math.max(e,0),1))*e*(3-2*e),di=(e,t,n=1.15)=>{let[r,i]=[(e-O.sections[2][1]+2)/32,(t-125)/26],a=r*r+i*i;return a<3?Q(2.2*(n-Math.sqrt(a)-.3*v(e/7,t/7,6)))*Q((e-Ce.trees+6)/10):0},[fi,pi]=[[.2,.13,.06],[.05,.045,.04]],mi=e=>{for(let t=0;t<e.length;t+=10){let n=di(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]+(fi[n]*a-e[o])*r)*i}}}},hi=e=>{if(e>li/2){let[t,n,r,i]=hi(li-e);return[t,250-n,r,-i]}let[t,n]=[(e-si)/ai,ai-ii];return e<si?[oi+e,-ii,0,-1]:e<si+ci?[ri-ai+ai*Math.sin(t),n-ai*Math.cos(t),Math.sin(t),-Math.cos(t)]:[ri,n+e-si-ci,1,0]},gi=(e,t)=>{let[n,r,i,a]=hi(e),o=t+ui*i*Q((22-Math.abs(r-125))/10);return[n+i*o,r+a*o,Q((n-oi)/30)]},_i=[[1,0,0],[0,0,1],[0,1,0]],vi=[5,7,9].map(e=>{return t=h([[.9,0],[1.1,1]],e),pe(f(t,[1,1,1]),ye);var t}),yi=[h([[0,-1],[1,0],[0,1]],4),h([[0,-1],[.85,-.45],[.9,.35],[0,1]],5)].map(e=>f(e,[1,1,1])),bi=[.4,.33,.24],xi=[.3,.2,.08],Si=[[.16,.34,.07],[.1,.26,.06],[.22,.29,.08]],Ci=(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],x=a*(.3+2.8*n*(1-n));for(let t of[-x,x]){let n=(f+v)/2+.4*u*g-d*t,r=(p+y)/2+.4*_-.45*x,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),S=(o<0?-1:1)/(Math.hypot(a,o,h)||1);[a,o,h]=[a*S,o*S+.6,h*S];let C=1/Math.hypot(a,o,h);e.push(f,p,m,a*C,o*C,h*C,.6*s,.6*c,Ie,.6*l),e.push(v,y,b,a*C,o*C,h*C,.6*s,.6*c,Ie,.6*l),e.push(n,r,i,a*C,o*C,h*C,s,c,Ie,l)}[f,p,m]=[v,y,b]}},wi=(e,t,n,r,i,a,o,s,c,l=o,u=1)=>{let f=e=>b(a,e,77),p=(8+5*f(1)+(2-o))*u,m=[2,6,8][l],h=e=>[t+s*e*e,n+p*e,r+c*e*e];for(let t=0;t<m;t++){let n=t/m,r=i*(.62+.38*(1-n)*(1-n)),a=t%2?.8:1;x(e,vi[l],h(n),h(n+1/m),[1,0,0],1,r,bi.map(e=>e*a))}let g=h(1),_=[8,10,12][l];for(let t=0;t<_;t++)Ci(e,g,d*(t+.6*f(10+t))/_,[1.15,.55,-.05][t%3]+.3*f(30+t),(3.8+f(50+t)+.3*(2-o))*(.3+.7*u),.75*(.8+.15*(2-o))*(.6+.4*u),[4,6,10][l],Si[t%3]);for(let t=0;l>1&&t<1+Math.floor(2*f(80));t++)Ci(e,g,d*f(81+t),-.9,3+f(83+t),.6,5,fi.map(e=>2.2*e));for(let t=0;l>1&&t<5;t++){let n=d*(t/3+f(70));y(e,yi[0],[g[0]+.24*Math.cos(n),g[1]-.3,g[2]+.24*Math.sin(n)],_i,[0,0,0],.17,xi)}},Ti=(e,t,n,r,i,a,o=a?7:12,s=a?8:7)=>{let c=e=>b(i,e,79);for(let i=0;i<o;i++)Ci(e,[t,n+.1+.3*a,r],d*(i+c(i))/o,1+.3*a+.3*c(10+i),(1.1+.5*c(20+i))*(1+1.3*a),a?.45:.11,s,Si[(i+a)%2])},Ei=e=>2.5*Q(e/6)+3*Q((e-4)/10)+8*Q((e-8)/14)+.14*Math.max(e-18,0),Di=[0,.4,.8,1.2,1.7,2.3,3,3.7,4.5,5.5,6.5,7.7,9,10.2,11.5,12.8,14.2,15.6,17,18.5,20,21.6,23.2,25,27,29,31.5,34,37,40,44,49,57,65,76,88,104,120],Oi=(e,t,n)=>4*(2*e+ +t)+n,ki=Array.from({length:24},(e,t)=>{let n=t%4;return Oi(2-Math.floor(t/4)%3,t>=12,n)}),Ai=e=>7e3+13*e,ji=(e,t)=>8+5*b(e,1,77)+(2-t),Mi=(e,t,[n,i,a,o,s,c=0],l)=>{let{reach:u}=de(s,a,o),d=t(n,i)+c,f=d+r(o),p=e.length;Le(e,l,e=>{let t=u(e);return[n+e[0]*t,f+e[1]*t,i+e[2]*t]},d,d+o,s,.72+.14*b(s,5,41),c?void 0:t);for(let t=p;t<e.length;t+=10){let n=Ce.water+.4+1.2*v(.4*e[t],.4*e[t+2],9);e[t+9]*=.4+.6*Q((e[t+1]-n)/1.5)}Ni(e,p)},Ni=(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]}}},Pi=(e,t,n)=>{let r=[],i=(e,n)=>b(e,n,90+t),a=e=>100+e+50*t;Fe.forEach(e=>Mi(r,n,e,4));for(let t=0;t<7;t++)Mi(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),a(t)],3);for(let t=0;t<6;t++){let[n,o]=[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];Mi(r,e,[n,o,s,c,a(10+t)],4);let l=[n+1.5*i(t,9)-.75,o+1.5*i(t,10)-.75,.6*s,.55*c];Mi(r,e,[...l,a(20+t),.8*c],3),i(t,11)<.5&&Mi(r,e,[l[0]+.5,l[1]-.4,.35*s,.4*c,a(30+t),1.3*c],2)}for(let t=0;t<5;t++)Mi(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),a(40+t)],3);for(let n=0;n<8;n++){let a=n/7;Mi(r,e,[Ce.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},Fi=pe(f(h([[1,0],[0,1]],3),[1,1,1]),ye),Ii=[.15,.145,.14],Li=e=>{let[t,n]=u(e,Math.abs(e[1])>.9?[1,0,0]:[0,1,0]);return[t,n]},Ri=(e,t,n,r,i,a,o)=>{let[s,c]=[n.map((e,n)=>e-t[n]),r.map((e,n)=>e-t[n])],l=S([s[1]*c[2]-s[2]*c[1],s[2]*c[0]-s[0]*c[2],s[0]*c[1]-s[1]*c[0]]);l[0]*(t[0]-i[0])+l[1]*(t[1]-i[1])+l[2]*(t[2]-i[2])<0&&(l=l.map(e=>-e));for(let i of[t,n,r])e.push(i[0],i[1],i[2],l[0],l[1],l[2],a[0]*o,a[1]*o,ye,a[2]*o)},zi=(e,t,n,r,i,a)=>{let o=S([n[0]-t[0],n[1]-t[1],n[2]-t[2]]),[s,c]=Li(o),l=e=>b(i,e,83),u=d*l(0),f=r.map(([e,r],i)=>{let a=t.map((t,r)=>t+(n[r]-t)*e);return{c:a,ring:Array.from({length:7},(e,t)=>{let n=u+d*(t+.35*l(1+7*i+t))/7,o=r*(.75+.45*l(100+7*i+t));return a.map((e,t)=>e+o*(Math.cos(n)*s[t]+Math.sin(n)*c[t]))})}}),p=e=>.7+.6*l(300+e);for(let t=0;t+1<f.length;t++){let[n,r]=[f[t],f[t+1]],i=n.c.map((e,t)=>(e+r.c[t])/2);for(let o=0;o<7;o++){let s=(o+1)%7;Ri(e,n.ring[o],n.ring[s],r.ring[s],i,a,p(2*t*7+2*o)),Ri(e,n.ring[o],r.ring[s],r.ring[o],i,a,p(2*t*7+2*o+1))}}for(let[t,n]of[[f[0],1],[f[f.length-1],-1]]){let r=t.c.map((e,t)=>e+.1*n*o[t]);for(let n=1;n+1<7;n++)Ri(e,t.ring[0],t.ring[n],t.ring[n+1],r,a,.6)}},Bi=(e,t,n,r,i,a)=>{let o=e=>b(i,e,82),[s,c]=Li(n),l=3+Math.floor(2*o(0));for(let i=0;i<l;i++){let u=d*(i/l+.3*o(1+i)),[f,p]=[Math.cos(u),Math.sin(u)],m=r*(.55-.3*o(9+i)),h=t.map((e,t)=>e+m*(f*s[t]+p*c[t])-.15*r*n[t]),g=r*(.6+2.6*o(5+i)*o(5+i)),_=h.map((e,t)=>e+g*n[t]+.06*g*(f*s[t]+p*c[t]));x(e,Fi,h,_,s,1,r*(.42+.2*o(13+i)),a)}},Vi=(e,t,n,r,i)=>{let a=e=>b(i,e,81),o=t(n,r),{a:s,c,d:l,tall:u,r:f,len:p,lean:m,top:h}=Zr(n,o,r,i),g=pi.map((e,t)=>(e+(Ii[t]-e)*a(15)**3)*(.3+.4*a(5))),_=S([m*u*c,u,m*u*l]),v=u+.3;zi(e,[n,o-.3,r],h,[[0,1.9*f],[Math.min(.45/v,.4),1.3*f],[Math.min(.7/v,.7),f],[1,.78*f]],i,g),Bi(e,h,_,.78*f,i,g);let y=a(17)<.55;if(u>3.5)for(let t=0;t<(y?3:2);t++){let[i,p]=[d*(t/3+.3*a(6+t)),.5+.4*a(8+t)],_=[n+m*u*p*c,o+u*p,r+m*u*p*l];if(y){let n=1.2+1.6*a(11+t),r=[_[0]+.6*n*Math.cos(i),_[1]+.8*n,_[2]+.6*n*Math.sin(i)];x(e,Fi,_,r,[0,1,0],1,.4*f,g)}else Ci(e,h,s+5*a(11+t),-.4,2+a(13+t),.45,3,fi)}if(a(10)<.7){let d=u<2.5?h:[n+.6*c,o+.7*f,r+.6*l],m=[n+p*c,t(n+p*c,r+p*l)+.5*f,r+p*l],_=S([m[0]-d[0],m[1]-d[1],m[2]-d[2]]);zi(e,d,m,[[0,.85*f],[.5,.74*f],[1,.62*f]],i+300,g),Bi(e,m,_,.62*f,i+500,g),u>=2.5&&Bi(e,d,_.map(e=>-e),.85*f,i+700,g);let v=.35+.4*a(18),b=d.map((e,t)=>e+(m[t]-e)*v),C=.6+1.2*a(19),ee=a(20)<.5?-1:1;x(e,Fi,b,[b[0]-ee*l*.6*C,b[1]+C,b[2]+ee*c*.6*C],[0,1,0],1,.35*f,g);for(let t=0;t<2&&!y;t++)Ci(e,m,s+5*a(11+t),.5,2+a(13+t),.5,3,fi)}},Hi=`bool tk=abs(c.z-(${ye}))<.0008;float hv=Pc.w,H=hv*Pb.x;vec3 q=p;\nif(tk){q.xz*=Pc.x;q.y*=Pb.x;}else{q.y-=hv;q*=Pb.w;q.y+=H;}\nfloat cs=cos(Pa.w),sn=sin(Pa.w);q.xz=vec2(cs*q.x-sn*q.z,sn*q.x+cs*q.z);\nfloat t=tk?clamp(q.y/H,0.,1.):1.,ph=Pc.z;\nq.xz+=(Pb.yz+vec2(sin(T*.8+ph),sin(T*.63+ph*1.3))*.012*H)*t*t;\nif(!tk){float e=length(p-vec3(0,hv,0));q.y+=.05*e*sin(T*2.3+ph+e);}\nP=Pa.xyz+q;N=vec3(cs*n.x-sn*n.z,n.y,sn*n.x+cs*n.z);Rp=P;Wa=0.;C=c;\nfloat b=Pc.y;if(b>0.){float k=min(2.*b,1.),f=1.-max(2.*b-1.2,0.),g=4.*c.y;C.xyw=(c.xyw+(vec3(${fi.join(`,`)})*g-c.xyw)*k)*f;}\nLb=vec3(-1);Lp=p+vec3(0,2.*ph,0);`,Ui=`if(Lb.x>=0.&&abs(C.z-(${Ie}))<.0008&&dot(P-E,P-E)<144.){float t=Lb.z,s=Lb.x+Lb.y,x=s>1e-4?(Lb.y-Lb.x)/s*(1.-t):0.,y=t-.38;if(x*x*4.+y*y*2.6>1.)discard;}`,Wi=`\n#ifdef FADE\nif(abs(L-(${ye}))<.0008){float k=1.-smoothstep(6.,12.,length(P-E));if(k>0.){float a=vn(vec2((Lp.x+Lp.z)*18.,Lp.y*.6)),b=.5+.5*sin((Lp.x*.8-Lp.z)*110.+a*6.),fb=.6*a+.4*b;c*=mix(1.,.7+.6*fb,k);h+=k*.015*fb;}}\n#endif\n`,$={x:700,z:125,top:400,rim:75},Gi=[0,20,38,52,62,70,75,81,90,102,117,134,154,176,200,226,255,286,320,356,394,434,476,520,566,614,664,716,770],Ki=96,qi=e=>(e=Math.min(Math.max(e,0),1))*e*(3-2*e),Ji=(e,t,n)=>{let r=(r,i)=>1-Math.abs(2*v(e*r+n/500,t*r+n/700,i)-1);return Math.min((.65*r(11,31)+.35*r(27,32))**1.5*1.25,1)},Yi=(e,t)=>v(1.6*Math.cos(e)+5,1.6*Math.sin(e)+5,t),Xi=$.x-170,Zi=$.z-300,Qi=Math.atan2(Zi-$.z,Xi-$.x),$i=e=>{let t=560+240*Yi(e,41)+160*Math.max(Math.cos(e-Qi),0)**2,n=Math.cos(e);return n<0?Math.min(t,($.x-160)/-n):t},ea=(e,t)=>{let{top:n,rim:r}=$,[i,a]=[Math.cos(t),Math.sin(t)],o=(e=>Math.exp(-((Math.atan2(Math.sin(e-2.25),Math.cos(e-2.25))/.38)**2)))(t),s=n+70*(Yi(t,42)-.5)-95*o,c=$i(t),l=1.5+.9*Yi(t,43),u=n-85,d;if(e<=r)d=u+(Math.max(s,u+4)-u)*qi((e-30)/(r-30));else{let t=Math.max((c-e)/(c-r),0),n=95*o*(1-qi((e-r)/260));d=((s+n)*t**l-n*t)*(1+.16*(Ji(i,a,e)-.5)*qi((e-r)/40)*(1-.6*qi((e-420)/200)))+14*(v(($.x+i*e)/90,($.z+a*e)/90,33)-.5)*qi(1-t)*qi(6*t)}let[f,p]=[$.x+i*e,$.z+a*e],m=Math.hypot(f-Xi,p-Zi)/300,h=220*Math.max(1-m,0)**1.6*(.9+.2*v(f/60,p/60,44))-25*Math.exp(-((m/.12)**2)),g=Math.max(Math.min(30,d,h),.001),_=Math.max(g-Math.abs(d-h),0)/g;return Math.max(d,h)+_*_*g/4},ta=()=>{let e=Gi.length,t=new Float64Array(e*Ki*4);for(let n=0;n<e;n++)for(let r=0;r<Ki;r++){let i=r/Ki*d,[a,o]=[$.rim,Gi[e-1]],s=Gi[n]<=a?Gi[n]:a+($i(i)-a)*(Gi[n]-a)/(o-a),c=4*(n*Ki+r);t[c]=$.x+Math.cos(i)*s,t[c+1]=ea(s,i),t[c+2]=$.z+Math.sin(i)*s,t[c+3]=Ji(Math.cos(i),Math.sin(i),s)}let n=(e,t)=>4*(e*Ki+(t+Ki)%Ki),r=(r,i,a)=>{let o=n(i,a),[s,c,l]=[t[o],t[o+1],t[o+2]],u=((e,t,n,r)=>{let i=n/$.top,a=v(e/40,t/40,34),o=i+.12*(a-.5),s=(e,t,n)=>e.map((e,r)=>e+(t[r]-e)*n),c=s([.025,.07,.03],[.09,.1,.05],qi((o-.28)/.14));c=s(c,[.075,.065,.06],qi((o-.42-.12*r)/.1)),c=s(c,[.06,.035,.03],qi((o-.9)/.08));let l=.45+.9*r+.2*(a-.5);return c.map(e=>e*l)})(s,l,c,t[o+3]);r.push(s,c,l,...((r,i)=>{let[a,o]=[n(r,i-1),n(r,i+1)],[s,c]=[n(Math.max(r-1,0),i),n(Math.min(r+1,e-1),i)],l=[t[o]-t[a],t[o+1]-t[a+1],t[o+2]-t[a+2]],u=[t[c]-t[s],t[c+1]-t[s+1],t[c+2]-t[s+2]],d=[l[1]*u[2]-l[2]*u[1],l[2]*u[0]-l[0]*u[2],l[0]*u[1]-l[1]*u[0]];d[1]<0&&(d=d.map(e=>-e));let f=Math.hypot(d[0],d[1],d[2])||1;return r?d.map(e=>e/f):[0,1,0]})(i,a),u[0],u[1],-1,u[2])},i=[];for(let t=0;t<e-1;t++)for(let e=0;e<Ki;e++)r(i,t,e),r(i,t+1,e),r(i,t+1,e+1),r(i,t,e),r(i,t+1,e+1),r(i,t,e+1);return i};function*na(e){let{brush:t,trees:n,...r}=(e=>{let t=e.relief&&{relief:m(e.relief)},n=(e,n)=>{let r=t?p(t,e,n):0;return r>-1e9?r:0},r=Pi(n,0,n).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})(Pi((e,t)=>n(e,250-t),1,n))),i=(()=>{let[e,t,n,r]=[[],[],[],[]];return{add:(i,a,o,s,c,l,u,f,p=1)=>{let m=Math.abs(Math.floor(c))%4,h=ji(Ai(m),l),g=ji(c,l)*p,_=di(i+u,o+f,1.3);e.push(i,a,o,d*b(c,90,77),g/h,u,f,.3+.7*p,s/.28,_,d*b(c,91,77),h,1,0,0,0),t.push(i+.5*u,a+.5*g,o+.5*f,.5*g+5*(.3+.7*p)),n.push(Oi(l,!1,m)),r.push(Oi(l,!0,m))},done:()=>{let i=[],a=[];for(let e=0;e<3;e++)for(let t of[!1,!0])for(let n=0;n<4;n++){let r=i.length/10;wi(i,0,0,0,.28,Ai(n),e,0,0,t?0:Math.max(e,1)),a[2*Oi(e,t,n)]=r,a[2*Oi(e,t,n)+1]=i.length/10-r}return{mesh:i,ranges:a,inst:e,sphere:t,near:n,far:r,order:ki}}}})(),a=i.add;le.forEach(([e,t,r],i)=>{for(let o of[0,1]){let[s,c]=[2*i+o,o?250-t:t],l=1.2+2.6*b(s,1,70);a(e,n(e,c),c,r,s,2,-l,l*(2*b(s,2,70)-1))}});let o=[];[2,4.5,7,10,13,16.5,20.5,25,30].forEach((e,t)=>{let r=t<2?3.5:4;for(let i=0;i*r<li;i++){let s=e=>b(i,e,80+t),c=(i+s(1))*r,l=e+3*s(2),[u,d,f]=gi(c,l);if(s(3)>.85*f)continue;let p=di(u,d);if(p>.3){Vi(o,n,u,d,1e3+1e3*t+i);continue}let m=n(u,d)+Math.max(f*(1-Q(2.5*p))*Ei(l)-5,0),[,,h,g]=hi(c),_=1e3+1e3*t+i,v=1+2.5*s(5),[y,x]=[-h*v+2*s(6)-1,-g*v+2*s(7)-1];a(u,m,d,.28,_,+(t<5),y,x);let[S,C,ee]=gi(c+r/2,l+1.5*(s(8)-.5));if(t&&t<4&&s(9)<.75&&ee>.3&&di(S,C)<.3){let e=.35+.25*s(10),t=.4+.8*s(11);a(S,n(S,C)+.5*Math.max(ee*Ei(l)-5,0),C,.16,_+5e4,1,t*(2*s(12)-1),t*(2*s(13)-1),e)}}});for(let[e,t,r]of Xr)Vi(o,n,e,t,r);let s=[];for(let e=0;e<2*li;e++){let t=t=>b(e,t,86),[r,i,a]=gi((e+t(1))/2,-.5-3*t(2)*t(2));t(3)<a&&di(r,i)<.3&&(Ti(s,r,n(r,i),i,e,0,7,4),t(4)<.33&&ni(s,r+.6,n(r+.6,i),i+.4,9e3+e))}for(let e=0;1.6*e<li;e++){let t=t=>b(e,t,87),[r,i,a]=gi(1.6*(e+t(1)),.8-2.3*t(2));t(3)>a||di(r,i)>.3||Ti(s,r,n(r,i),i,500+e,+(t(5)<.6),t(5)<.6?7:9,t(5)<.6?8:6)}let c=[];return((e,t,n)=>{let r=Math.ceil(li/1.25),i=Di.length,a=new Float64Array((r+1)*i*4),o=new Float64Array((r+1)*i);for(let e=0;e<=r;e++){let s=e/r*li,[c,l]=gi(s,0),u=n(c,l);for(let r=0;r<i;r++){let c=Di[r],[l,d,f]=gi(s,c),p=v(l/6,d/6,3)-.5+.5*(v(l/2.3,d/2.3,4)-.5)*(1-Q((c-6)/8)),m=4*(e*i+r);a[m]=l+(b(e,r,61)-.5)*Math.min(c,3)*(.15+.85*Q((c-40)/20)),a[m+2]=d+(b(e,r,62)-.5)*Math.min(c,3)*(.15+.85*Q((c-40)/20));let h=Q(2.5*di(l,d));if(o[e*i+r]=Q(3*di(l,d,1.3)),a[m+1]=u+(n(l,d)-u)*h-.4+f*(1-h)*(Ei(c)+40*Q((c-25)/95)*(.4+.6*v(l/70,d/70,5))+(p*Math.min(.5+.13*c,4)+(b(e,r,63)-.5)*(1.4+.05*c)*Q((c-40)/20)*(1-Q(4*di(l,d,1.3))))*Q(c/1.5)*(1-.8*Q((c-50)/50))),a[m+3]=(.4*(p/1.5+.5)+.6*(.5+(b(e,r,64)-.5)*Q((c-40)/20)))*(1-.5*Q((c-20)/50)),f>.3&&h<.9&&r&&r<8){let n=t=>b(e,r,65+t);Ti(t,a[m]+n(0)-.5,a[m+1]-.05,a[m+2]+n(1)-.5,31*e+r,0,5,3)}else if(f>.3&&h<.9&&c>=9&&c<35&&(c<24||(e+r)%2==0)){let n=t=>b(e,r,65+t);Ti(t,a[m]+n(0)-.5,a[m+1]-.05,a[m+2]+n(1)-.5,31*e+r,0,4,3)}f>.3&&h<.5&&r&&c<30&&b(e,r,69)<.4&&ni(t,a[m]+b(e,r,70)-.5,a[m+1]-.05,a[m+2]+b(e,r,71)-.5,53*e+r)}}let s=(e,t)=>4*(e*i+t),c=new Float64Array((r+1)*i*3),l=[];for(let e=0;e<r;e++)for(let t=0;t<i-1;t++){let n=e+t&1,r=[s(e,t),s(e+1,t),s(e+1,t+1),s(e,t+1)];for(let e of[0,1]){let[t,i,o]=[r[n],r[n+1+e],r[(n+2+e)%4]],[s,u,d]=[a[i]-a[t],a[i+1]-a[t+1],a[i+2]-a[t+2]],[f,p,m]=[a[o]-a[t],a[o+1]-a[t+1],a[o+2]-a[t+2]],[h,g,_]=[u*m-d*p,d*f-s*m,s*p-u*f],v=(g<0?-1:1)/(Math.hypot(h,g,_)||1);l.push([t,i,o,h*v,g*v,_*v]);for(let e of[t,i,o])for(let t=0;t<3;t++)c[e/4*3+t]+=[h,g,_][t]*v}}for(let[t,n,r,s,u,d]of l){let l=(a[t+3]+a[n+3]+a[r+3])/3,f=o[t/4]+o[n/4]+o[r/4]>1.5?Ne:Ie;for(let p of[t,n,r]){let t=Math.max(o[p/4],1-Q((Di[p/4%i]-50)/30)),n=c.subarray(p/4*3,p/4*3+3),r=1/(Math.hypot(n[0],n[1],n[2])||1),m=[s+(n[0]*r-s)*t,u+(n[1]*r-u)*t,d+(n[2]*r-d)*t],h=1/(Math.hypot(m[0],m[1],m[2])||1),g=l+(a[p+3]-l)*t;e.push(a[p],a[p+1],a[p+2],m[0]*h,m[1]*h,m[2]*h),e.push(.02+.06*g,.06+.13*g,f,.02+.03*g)}}})(c,s,n),[s,c].forEach(mi),{rocks:r,trees:i.done(),brush:s,canopy:c,snags:o}})(e),i=[].concat(...Object.values(r)),a=(e=>{let t=/* @__PURE__ */ new Map;for(let n=0;n<e.length;n+=30){let r=`${Math.floor(e[n]/16)} ${Math.floor(e[n+2]/16)}`,i=t.get(r);i||t.set(r,i=[]);for(let t=0;t<30;t++)i.push(e[n+t])}let n=[];for(let e of t.values())for(let t=0;t<e.length;t++)n.push(e[t]);return n})(t);return yield,{land:i.concat(Yr(e),ta()),sky:[],glass:Ir(),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;}`,car:ct,grass:a,instances:n,instanced:Hi,fade:Ui,forest:xe+Wi,blazes:Qr(e)}}export{na as default};