three-low-poly 1.0.0 → 1.0.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/index.mjs CHANGED
@@ -1,11 +1,13 @@
1
- import { AdditiveBlending as e, Box3 as t, BoxGeometry as n, BufferAttribute as r, BufferGeometry as i, CanvasTexture as a, CatmullRomCurve3 as o, CircleGeometry as s, Color as c, ConeGeometry as l, CylinderGeometry as u, DataTexture as d, DodecahedronGeometry as f, DoubleSide as p, DynamicDrawUsage as m, Euler as h, ExtrudeGeometry as g, Float32BufferAttribute as _, Group as v, IcosahedronGeometry as y, InstancedMesh as b, LatheGeometry as x, MathUtils as S, Matrix4 as C, Mesh as w, MeshBasicMaterial as T, MeshPhysicalMaterial as E, MeshStandardMaterial as D, NearestFilter as ee, Object3D as O, OctahedronGeometry as k, Path as A, PlaneGeometry as j, PointLight as te, Points as ne, PointsMaterial as re, Quaternion as M, RGBAFormat as ie, RepeatWrapping as ae, SRGBColorSpace as oe, Shape as N, ShapeGeometry as se, SphereGeometry as P, TorusGeometry as ce, TubeGeometry as le, UnsignedByteType as ue, Vector2 as F, Vector3 as I } from "three";
2
- import { mergeGeometries as L, mergeVertices as de } from "three/addons/utils/BufferGeometryUtils.js";
3
- import { ParametricGeometry as fe } from "three/addons/geometries/ParametricGeometry.js";
1
+ import { AdditiveBlending as e, Box3 as t, BoxGeometry as n, BufferAttribute as r, BufferGeometry as i, CanvasTexture as a, CatmullRomCurve3 as o, CircleGeometry as s, Color as c, ConeGeometry as l, CylinderGeometry as u, DataTexture as d, DodecahedronGeometry as f, DoubleSide as p, DynamicDrawUsage as m, Euler as h, ExtrudeGeometry as g, Float32BufferAttribute as _, Group as v, IcosahedronGeometry as y, InstancedBufferAttribute as b, InstancedMesh as x, LatheGeometry as S, MathUtils as C, Matrix4 as w, Mesh as T, MeshBasicMaterial as E, MeshPhysicalMaterial as D, MeshStandardMaterial as O, NearestFilter as k, Object3D as A, OctahedronGeometry as ee, Path as j, PlaneGeometry as M, PointLight as te, Quaternion as N, RGBAFormat as ne, RepeatWrapping as re, SRGBColorSpace as ie, Shape as P, ShapeGeometry as ae, SphereGeometry as F, TorusGeometry as oe, TubeGeometry as se, UnsignedByteType as ce, Vector2 as I, Vector3 as L } from "three";
2
+ import { instancedBufferAttribute as le, instancedDynamicBufferAttribute as ue } from "three/tsl";
3
+ import { SpriteNodeMaterial as de } from "three/webgpu";
4
+ import { mergeGeometries as R, mergeVertices as fe } from "three/addons/utils/BufferGeometryUtils.js";
5
+ import { ParametricGeometry as pe } from "three/addons/geometries/ParametricGeometry.js";
4
6
  //#region src/animators/cameraClip.ts
5
- function pe(e, t) {
6
- let n = t?.target.clone() ?? new I();
7
+ function me(e, t) {
8
+ let n = t?.target.clone() ?? new L();
7
9
  if (!t) {
8
- let t = new I();
10
+ let t = new L();
9
11
  e.getWorldDirection(t), n.copy(e.position).add(t);
10
12
  }
11
13
  return {
@@ -15,31 +17,31 @@ function pe(e, t) {
15
17
  target: n
16
18
  };
17
19
  }
18
- function me(e, t, n) {
20
+ function he(e, t, n) {
19
21
  e.position.copy(n.position), e.quaternion.copy(n.quaternion), e.fov = n.fov, e.updateProjectionMatrix(), t && (t.target.copy(n.target), t.update());
20
22
  }
21
- function R(e, t) {
23
+ function z(e, t) {
22
24
  return t(Math.min(1, e.elapsed / e.duration));
23
25
  }
24
26
  //#endregion
25
27
  //#region src/animators/CameraPlayback.ts
26
- var he = class {
28
+ var ge = class {
27
29
  camera;
28
30
  controls;
29
31
  active = null;
30
32
  elapsed = 0;
31
- focus = new I();
33
+ focus = new L();
32
34
  rest;
33
35
  constructor(e, t) {
34
36
  this.camera = e, this.controls = t;
35
- let n = pe(e, t);
37
+ let n = me(e, t);
36
38
  this.focus.copy(n.target), this.rest = n;
37
39
  }
38
40
  get isPlaying() {
39
41
  return this.active !== null;
40
42
  }
41
43
  setRest() {
42
- this.rest = pe(this.camera, this.controls);
44
+ this.rest = me(this.camera, this.controls);
43
45
  }
44
46
  setRestSnapshot(e) {
45
47
  this.rest = {
@@ -50,10 +52,10 @@ var he = class {
50
52
  };
51
53
  }
52
54
  play(e) {
53
- this.cancelActive(), me(this.camera, this.controls, this.rest), this.active = e, this.elapsed = 0, this.controls && (this.controls.enabled = !1), e.start(this.runtime());
55
+ this.cancelActive(), he(this.camera, this.controls, this.rest), this.active = e, this.elapsed = 0, this.controls && (this.controls.enabled = !1), e.start(this.runtime());
54
56
  }
55
57
  stop() {
56
- this.cancelActive(), me(this.camera, this.controls, this.rest), this.controls && (this.controls.enabled = !0, this.controls.update());
58
+ this.cancelActive(), he(this.camera, this.controls, this.rest), this.controls && (this.controls.enabled = !0, this.controls.update());
57
59
  }
58
60
  reset() {
59
61
  this.stop();
@@ -76,7 +78,7 @@ var he = class {
76
78
  focus: this.focus
77
79
  };
78
80
  }
79
- }, z = {
81
+ }, B = {
80
82
  sineIn: (e) => 1 - Math.cos(e * Math.PI / 2),
81
83
  sineOut: (e) => Math.sin(e * Math.PI / 2),
82
84
  sineInOut: (e) => -.5 * (Math.cos(Math.PI * e) - 1),
@@ -106,42 +108,42 @@ var he = class {
106
108
  squareRoot: (e) => Math.sqrt(e),
107
109
  inverse: (e) => 1 - e,
108
110
  gaussian: (e) => Math.exp(-((e - .5) ** 2) / (2 * .5))
109
- }, B = new I();
110
- new I();
111
- function ge(e) {
112
- let { target: t, duration: n, ease: r = z.smoothstep, revolutions: i = 1 } = e, a = { value: 0 }, o = { value: e.radius ?? 10 }, s = { value: e.elevation ?? .4 };
111
+ }, V = new L();
112
+ new L();
113
+ function _e(e) {
114
+ let { target: t, duration: n, ease: r = B.smoothstep, revolutions: i = 1 } = e, a = { value: 0 }, o = { value: e.radius ?? 10 }, s = { value: e.elevation ?? .4 };
113
115
  return {
114
116
  label: "Orbit",
115
117
  duration: n,
116
118
  start(n) {
117
- n.focus.copy(t), B.subVectors(n.camera.position, t), o.value = e.radius ?? B.length(), s.value = e.elevation ?? Math.asin(S.clamp(B.y / o.value, -1, 1)), a.value = Math.atan2(B.z, B.x);
119
+ n.focus.copy(t), V.subVectors(n.camera.position, t), o.value = e.radius ?? V.length(), s.value = e.elevation ?? Math.asin(C.clamp(V.y / o.value, -1, 1)), a.value = Math.atan2(V.z, V.x);
118
120
  },
119
121
  update(e) {
120
- let n = R(e, r);
122
+ let n = z(e, r);
121
123
  if (n >= 1) return "complete";
122
124
  let c = a.value + n * Math.PI * 2 * i, l = o.value * Math.cos(s.value);
123
125
  return e.camera.position.set(t.x + l * Math.cos(c), t.y + o.value * Math.sin(s.value), t.z + l * Math.sin(c)), e.camera.lookAt(e.focus), "running";
124
126
  }
125
127
  };
126
128
  }
127
- function _e(e) {
128
- let { target: t, duration: n, azimuthAmplitude: r = .14, oscillations: i = 2, ease: a = z.linear } = e, o = { value: 0 }, s = { value: e.distance ?? 8 }, c = { value: .35 };
129
+ function ve(e) {
130
+ let { target: t, duration: n, azimuthAmplitude: r = .14, oscillations: i = 2, ease: a = B.linear } = e, o = { value: 0 }, s = { value: e.distance ?? 8 }, c = { value: .35 };
129
131
  return {
130
132
  label: "Pendulum",
131
133
  duration: n,
132
134
  start(n) {
133
- n.focus.copy(t), B.subVectors(n.camera.position, t), s.value = e.distance ?? B.length(), c.value = Math.asin(S.clamp(B.y / s.value, -1, 1)), o.value = Math.atan2(B.z, B.x);
135
+ n.focus.copy(t), V.subVectors(n.camera.position, t), s.value = e.distance ?? V.length(), c.value = Math.asin(C.clamp(V.y / s.value, -1, 1)), o.value = Math.atan2(V.z, V.x);
134
136
  },
135
137
  update(e) {
136
- let n = R(e, a);
138
+ let n = z(e, a);
137
139
  if (n >= 1) return "complete";
138
140
  let l = Math.sin(n * Math.PI * 2 * i) * r, u = o.value + l, d = s.value * Math.cos(c.value);
139
141
  return e.camera.position.set(t.x + d * Math.cos(u), t.y + s.value * Math.sin(c.value), t.z + d * Math.sin(u)), e.camera.lookAt(e.focus), "running";
140
142
  }
141
143
  };
142
144
  }
143
- function ve(e) {
144
- let { waypoints: t, duration: n, ease: r = z.cubicInOut } = e;
145
+ function ye(e) {
146
+ let { waypoints: t, duration: n, ease: r = B.cubicInOut } = e;
145
147
  if (t.length < 2) throw Error("Flythrough clip requires at least two waypoints");
146
148
  let i = e.lookAt ?? t.slice(1).concat(t[t.length - 1]), a = t.length - 1;
147
149
  return {
@@ -151,7 +153,7 @@ function ve(e) {
151
153
  e.focus.copy(i[0] ?? t[0]), e.camera.position.copy(t[0]), e.camera.lookAt(e.focus);
152
154
  },
153
155
  update(e) {
154
- let n = R(e, z.linear);
156
+ let n = z(e, B.linear);
155
157
  if (n >= 1) return e.camera.position.copy(t[t.length - 1]), e.focus.copy(i[i.length - 1] ?? t[t.length - 1]), e.camera.lookAt(e.focus), "complete";
156
158
  let o = n * a, s = Math.min(a - 1, Math.floor(o)), c = r(o - s);
157
159
  e.camera.position.lerpVectors(t[s], t[s + 1], c);
@@ -160,8 +162,8 @@ function ve(e) {
160
162
  }
161
163
  };
162
164
  }
163
- function ye(e) {
164
- let { distance: t, duration: n, ease: r = z.cubicInOut } = e, i = new I(), a = new I(), o = new I();
165
+ function be(e) {
166
+ let { distance: t, duration: n, ease: r = B.cubicInOut } = e, i = new L(), a = new L(), o = new L();
165
167
  return {
166
168
  label: "Dolly",
167
169
  duration: n,
@@ -169,29 +171,29 @@ function ye(e) {
169
171
  i.copy(e.camera.position), e.camera.getWorldDirection(o), a.copy(i).addScaledVector(o, t), e.focus.copy(e.controls?.target ?? i).addScaledVector(o, 10);
170
172
  },
171
173
  update(e) {
172
- let t = R(e, r);
174
+ let t = z(e, r);
173
175
  return t >= 1 ? (e.camera.position.copy(a), "complete") : (e.camera.position.lerpVectors(i, a, t), e.camera.lookAt(e.focus), "running");
174
176
  }
175
177
  };
176
178
  }
177
- function be(e) {
178
- let { target: t, radius: n, endRadius: r = n, height: i, revolutions: a, duration: o, ease: s = z.smoothstep } = e, c = { value: 0 }, l = { value: 0 };
179
+ function xe(e) {
180
+ let { target: t, radius: n, endRadius: r = n, height: i, revolutions: a, duration: o, ease: s = B.smoothstep } = e, c = { value: 0 }, l = { value: 0 };
179
181
  return {
180
182
  label: "Spiral",
181
183
  duration: o,
182
184
  start(e) {
183
- e.focus.copy(t), c.value = e.camera.position.y, B.subVectors(e.camera.position, t), l.value = Math.atan2(B.z, B.x);
185
+ e.focus.copy(t), c.value = e.camera.position.y, V.subVectors(e.camera.position, t), l.value = Math.atan2(V.z, V.x);
184
186
  },
185
187
  update(e) {
186
- let o = R(e, s);
188
+ let o = z(e, s);
187
189
  if (o >= 1) return "complete";
188
- let u = l.value + o * Math.PI * 2 * a, d = S.lerp(n, r, o);
190
+ let u = l.value + o * Math.PI * 2 * a, d = C.lerp(n, r, o);
189
191
  return e.camera.position.set(t.x + d * Math.cos(u), c.value + i * o, t.z + d * Math.sin(u)), e.camera.lookAt(e.focus), "running";
190
192
  }
191
193
  };
192
194
  }
193
- function xe(e) {
194
- let { target: t, endFov: n, duration: r, ease: i = z.cubicInOut } = e, a = { value: 75 };
195
+ function Se(e) {
196
+ let { target: t, endFov: n, duration: r, ease: i = B.cubicInOut } = e, a = { value: 75 };
195
197
  return {
196
198
  label: "Zoom",
197
199
  duration: r,
@@ -199,16 +201,16 @@ function xe(e) {
199
201
  e.focus.copy(t), a.value = e.camera.fov;
200
202
  },
201
203
  update(e) {
202
- let t = R(e, i);
203
- return e.camera.fov = S.lerp(a.value, n, Math.min(1, t)), e.camera.updateProjectionMatrix(), e.camera.lookAt(e.focus), t >= 1 ? "complete" : "running";
204
+ let t = z(e, i);
205
+ return e.camera.fov = C.lerp(a.value, n, Math.min(1, t)), e.camera.updateProjectionMatrix(), e.camera.lookAt(e.focus), t >= 1 ? "complete" : "running";
204
206
  },
205
207
  cancel(e) {
206
208
  e.camera.fov = a.value, e.camera.updateProjectionMatrix();
207
209
  }
208
210
  };
209
211
  }
210
- function Se(e) {
211
- let { intensity: t, duration: n, ease: r = z.linear } = e, i = new I(), a = { value: 0 };
212
+ function Ce(e) {
213
+ let { intensity: t, duration: n, ease: r = B.linear } = e, i = new L(), a = { value: 0 };
212
214
  return {
213
215
  label: "Wobble",
214
216
  duration: n,
@@ -216,7 +218,7 @@ function Se(e) {
216
218
  i.copy(e.camera.position), a.value = e.camera.position.x * 17.3 + e.camera.position.z * 9.1;
217
219
  },
218
220
  update(e) {
219
- let n = R(e, r);
221
+ let n = z(e, r);
220
222
  if (n >= 1) return e.camera.position.copy(i), "complete";
221
223
  let o = 1 - n, s = e.elapsed * 28 + a.value;
222
224
  return e.camera.position.set(i.x + Math.sin(s * 1.7) * t * o, i.y + Math.sin(s * 2.3) * t * .6 * o, i.z + Math.cos(s * 1.9) * t * o), "running";
@@ -228,14 +230,14 @@ function Se(e) {
228
230
  }
229
231
  //#endregion
230
232
  //#region src/constants/Direction.ts
231
- var V = {
232
- UP: new I(0, 1, 0),
233
- DOWN: new I(0, -1, 0),
234
- LEFT: new I(-1, 0, 0),
235
- RIGHT: new I(1, 0, 0),
236
- FORWARD: new I(0, 0, 1),
237
- BACKWARD: new I(0, 0, -1)
238
- }, H = {
233
+ var H = {
234
+ UP: new L(0, 1, 0),
235
+ DOWN: new L(0, -1, 0),
236
+ LEFT: new L(-1, 0, 0),
237
+ RIGHT: new L(1, 0, 0),
238
+ FORWARD: new L(0, 0, 1),
239
+ BACKWARD: new L(0, 0, -1)
240
+ }, U = {
239
241
  linear: (e, t) => 1 - e / t,
240
242
  quadratic: (e, t) => (1 - e / t) ** 2,
241
243
  squareRoot: (e, t) => (1 - e / t) ** .5,
@@ -249,10 +251,10 @@ var V = {
249
251
  let n = Math.max(0, Math.min(1, 1 - e / t));
250
252
  return n * n * (3 - 2 * n);
251
253
  }
252
- }, Ce = (e, t, n, r, i = V.UP, a = H.linear) => {
254
+ }, we = (e, t, n, r, i = H.UP, a = U.linear) => {
253
255
  let o = e.attributes.position;
254
256
  for (let e = 0; e < o.count; e++) {
255
- let s = new I();
257
+ let s = new L();
256
258
  s.fromBufferAttribute(o, e);
257
259
  let c = s.distanceTo(t);
258
260
  if (c < n) {
@@ -261,10 +263,10 @@ var V = {
261
263
  }
262
264
  }
263
265
  o.needsUpdate = !0;
264
- }, we = (e, t, n, r, i, a = V.UP, o = H.linear) => {
266
+ }, Te = (e, t, n, r, i, a = H.UP, o = U.linear) => {
265
267
  let s = e.attributes.position;
266
268
  for (let e = 0; e < s.count; e++) {
267
- let c = new I();
269
+ let c = new L();
268
270
  c.fromBufferAttribute(s, e);
269
271
  let l = c.distanceTo(t);
270
272
  if (l < n) {
@@ -273,33 +275,33 @@ var V = {
273
275
  }
274
276
  }
275
277
  s.needsUpdate = !0;
276
- }, Te = (e, t, n, r, i = V.UP, a = H.linear) => {
278
+ }, Ee = (e, t, n, r, i = H.UP, a = U.linear) => {
277
279
  let o = e.attributes.position;
278
280
  for (let e = 0; e < o.count; e++) {
279
- let s = new I();
281
+ let s = new L();
280
282
  s.fromBufferAttribute(o, e);
281
283
  let c = s.distanceTo(t);
282
284
  if (c < n) {
283
285
  let t = r * a(c, n), l = i.clone().normalize();
284
- s.x += S.randFloatSpread(t) * l.x, s.y += S.randFloatSpread(t) * l.y, s.z += S.randFloatSpread(t) * l.z, o.setXYZ(e, s.x, s.y, s.z);
286
+ s.x += C.randFloatSpread(t) * l.x, s.y += C.randFloatSpread(t) * l.y, s.z += C.randFloatSpread(t) * l.z, o.setXYZ(e, s.x, s.y, s.z);
285
287
  }
286
288
  }
287
289
  o.needsUpdate = !0;
288
- }, Ee = (e, t, n, r) => {
289
- let i = e.attributes.position, a = new I();
290
+ }, De = (e, t, n, r) => {
291
+ let i = e.attributes.position, a = new L();
290
292
  for (let e = 0; e < i.count; e++) {
291
- let o = new I();
293
+ let o = new L();
292
294
  if (o.fromBufferAttribute(i, e), o.distanceTo(t) < n) {
293
- let t = new I(), s = 0;
295
+ let t = new L(), s = 0;
294
296
  for (let e = 0; e < i.count; e++) a.fromBufferAttribute(i, e), a.distanceTo(o) < n && (t.add(a), s++);
295
297
  s > 0 && (t.divideScalar(s), o.lerp(t, r), i.setXYZ(e, o.x, o.y, o.z));
296
298
  }
297
299
  }
298
300
  i.needsUpdate = !0;
299
- }, De = (e, t, n, r, i = !1, a = H.linear) => {
301
+ }, Oe = (e, t, n, r, i = !1, a = U.linear) => {
300
302
  let o = e.attributes.position;
301
303
  for (let e = 0; e < o.count; e++) {
302
- let s = new I();
304
+ let s = new L();
303
305
  s.fromBufferAttribute(o, e);
304
306
  let c = s.distanceTo(t);
305
307
  if (c < n) {
@@ -308,10 +310,10 @@ var V = {
308
310
  }
309
311
  }
310
312
  o.needsUpdate = !0;
311
- }, Oe = (e, t, n, r, i = V.UP, a = H.linear) => {
312
- let o = e.attributes.position, s = new M();
313
+ }, ke = (e, t, n, r, i = H.UP, a = U.linear) => {
314
+ let o = e.attributes.position, s = new N();
313
315
  for (let e = 0; e < o.count; e++) {
314
- let c = new I();
316
+ let c = new L();
315
317
  c.fromBufferAttribute(o, e);
316
318
  let l = c.distanceTo(t);
317
319
  if (l < n) {
@@ -320,17 +322,17 @@ var V = {
320
322
  }
321
323
  }
322
324
  o.needsUpdate = !0;
323
- }, ke = {
324
- X: new I(1, 0, 0),
325
- Y: new I(0, 1, 0),
326
- Z: new I(0, 0, 1),
327
- XY: new I(1, 1, 0).normalize(),
328
- XZ: new I(1, 0, 1).normalize(),
329
- YZ: new I(0, 1, 1).normalize(),
330
- XYZ: new I(1, 1, 1).normalize()
331
- }, U = /* @__PURE__ */ function(e) {
325
+ }, Ae = {
326
+ X: new L(1, 0, 0),
327
+ Y: new L(0, 1, 0),
328
+ Z: new L(0, 0, 1),
329
+ XY: new L(1, 1, 0).normalize(),
330
+ XZ: new L(1, 0, 1).normalize(),
331
+ YZ: new L(0, 1, 1).normalize(),
332
+ XYZ: new L(1, 1, 1).normalize()
333
+ }, W = /* @__PURE__ */ function(e) {
332
334
  return e.LEFT = "left", e.RIGHT = "right", e.TOP = "top", e.BOTTOM = "bottom", e.FRONT = "front", e.BACK = "back", e;
333
- }({}), Ae = {
335
+ }({}), je = {
334
336
  CADMIUM_RED: 15073318,
335
337
  CARDINAL_RED: 12981270,
336
338
  CHERRY_RED: 14165028,
@@ -400,7 +402,7 @@ var V = {
400
402
  PALE_GRAY: 15658734,
401
403
  WHITE_SMOKE: 16119285,
402
404
  TITANIUM_WHITE: 16777215
403
- }, W = {
405
+ }, G = {
404
406
  cubic: (e, t, n, r, i) => {
405
407
  let a = Math.max(0, Math.min(1, e)), o = 1 - a;
406
408
  return o * o * o * t + 3 * o * o * a * n + 3 * o * a * a * r + a * a * a * i;
@@ -427,7 +429,7 @@ var V = {
427
429
  };
428
430
  //#endregion
429
431
  //#region src/utils/Random.ts
430
- function je(e) {
432
+ function Me(e) {
431
433
  let t = e >>> 0;
432
434
  return () => {
433
435
  t |= 0, t = t + 1831565813 | 0;
@@ -435,14 +437,14 @@ function je(e) {
435
437
  return e = e + Math.imul(e ^ e >>> 7, 61 | e) ^ e, ((e ^ e >>> 14) >>> 0) / 4294967296;
436
438
  };
437
439
  }
438
- function Me(e) {
440
+ function Ne(e) {
439
441
  let t = (e >>> 0) + 2654435769;
440
442
  return t = Math.imul(t ^ t >>> 16, 2246822507), t ^= t >>> 13, t = Math.imul(t ^ t >>> 16, 3266489909), (t ^ t >>> 16) >>> 0;
441
443
  }
442
- function Ne(e, t) {
443
- return Me(e >>> 0 ^ t >>> 0);
444
- }
445
444
  function Pe(e, t) {
445
+ return Ne(e >>> 0 ^ t >>> 0);
446
+ }
447
+ function Fe(e, t) {
446
448
  return {
447
449
  seeded: t,
448
450
  next: e,
@@ -467,39 +469,39 @@ function Pe(e, t) {
467
469
  }
468
470
  };
469
471
  }
470
- function G(e) {
471
- return e === void 0 ? Pe(Math.random, !1) : Pe(je(e >>> 0), !0);
472
+ function K(e) {
473
+ return e === void 0 ? Fe(Math.random, !1) : Fe(Me(e >>> 0), !0);
472
474
  }
473
- function Fe(e, t, n) {
475
+ function Ie(e, t, n) {
474
476
  return t + (n - t) * e();
475
477
  }
476
- function Ie(e, t) {
478
+ function Le(e, t) {
477
479
  if (!t.length) throw Error("randomPick() requires a non-empty array");
478
480
  return t[Math.floor(e() * t.length)];
479
481
  }
480
- var Le = {
481
- create: G,
482
- mulberry32: je,
483
- splitmix32: Me,
484
- deriveSubSeed: Ne,
485
- range: Fe,
486
- pick: Ie
487
- }, Re = G();
488
- function K(e = 0, t = 1, n = Re) {
482
+ var Re = {
483
+ create: K,
484
+ mulberry32: Me,
485
+ splitmix32: Ne,
486
+ deriveSubSeed: Pe,
487
+ range: Ie,
488
+ pick: Le
489
+ }, ze = K();
490
+ function q(e = 0, t = 1, n = ze) {
489
491
  return n.float(e, t);
490
492
  }
491
- function ze(e = 0, t = 1, n = Re) {
493
+ function Be(e = 0, t = 1, n = ze) {
492
494
  return n.int(e, t);
493
495
  }
494
- function Be(e = .5, t = 0, n = 1, r = Re) {
496
+ function Ve(e = .5, t = 0, n = 1, r = ze) {
495
497
  return r.skewMax(e, t, n);
496
498
  }
497
- function Ve(e = .5, t = 0, n = 1, r = Re) {
499
+ function He(e = .5, t = 0, n = 1, r = ze) {
498
500
  return r.skewMin(e, t, n);
499
501
  }
500
502
  //#endregion
501
503
  //#region src/effects/DustMotesEffect.ts
502
- var He = class extends b {
504
+ var Ue = class extends x {
503
505
  width;
504
506
  height;
505
507
  depth;
@@ -513,10 +515,10 @@ var He = class extends b {
513
515
  settle;
514
516
  twinkle;
515
517
  phase;
516
- dummy = new O();
518
+ dummy = new A();
517
519
  clock = 0;
518
520
  constructor(t = {}) {
519
- let { count: n = 150, width: r = 12, height: i = 8, depth: a = 12, floorY: o = 0, color: s = "#aebfe6", radius: l = .02, opacity: u = .9, material: d, settleMin: f = .1, settleMax: p = .35, waft: h = .08, scaleMin: g = .6, scaleMax: _ = 1.2, twinkleMin: v = .7, twinkleMax: y = 1.6 } = t, b = d ?? new T({
521
+ let { count: n = 150, width: r = 12, height: i = 8, depth: a = 12, floorY: o = 0, color: s = "#aebfe6", radius: l = .02, opacity: u = .9, material: d, settleMin: f = .1, settleMax: p = .35, waft: h = .08, scaleMin: g = .6, scaleMax: _ = 1.2, twinkleMin: v = .7, twinkleMax: y = 1.6 } = t, b = d ?? new E({
520
522
  color: new c(s),
521
523
  transparent: !0,
522
524
  opacity: u,
@@ -524,8 +526,8 @@ var He = class extends b {
524
526
  depthWrite: !1,
525
527
  toneMapped: !1
526
528
  });
527
- super(new P(l, 5, 5), b, n), this.instanceMatrix.setUsage(m), this.frustumCulled = !1, this.width = r, this.height = i, this.depth = a, this.floorY = o, this.waft = h, this.scaleMin = g, this.scaleMax = _, this.px = new Float32Array(n), this.py = new Float32Array(n), this.pz = new Float32Array(n), this.settle = new Float32Array(n), this.twinkle = new Float32Array(n), this.phase = new Float32Array(n);
528
- for (let e = 0; e < n; e++) this.respawn(e, !0), this.settle[e] = K(f, p), this.twinkle[e] = K(v, y), this.phase[e] = K(0, Math.PI * 2);
529
+ super(new F(l, 5, 5), b, n), this.instanceMatrix.setUsage(m), this.frustumCulled = !1, this.width = r, this.height = i, this.depth = a, this.floorY = o, this.waft = h, this.scaleMin = g, this.scaleMax = _, this.px = new Float32Array(n), this.py = new Float32Array(n), this.pz = new Float32Array(n), this.settle = new Float32Array(n), this.twinkle = new Float32Array(n), this.phase = new Float32Array(n);
530
+ for (let e = 0; e < n; e++) this.respawn(e, !0), this.settle[e] = q(f, p), this.twinkle[e] = q(v, y), this.phase[e] = q(0, Math.PI * 2);
529
531
  this.writeMatrices();
530
532
  }
531
533
  update(e) {
@@ -540,7 +542,7 @@ var He = class extends b {
540
542
  return this;
541
543
  }
542
544
  respawn(e, t) {
543
- this.px[e] = K(-this.width * .5, this.width * .5), this.pz[e] = K(-this.depth * .5, this.depth * .5), this.py[e] = t ? this.floorY + K(0, this.height) : this.floorY + this.height;
545
+ this.px[e] = q(-this.width * .5, this.width * .5), this.pz[e] = q(-this.depth * .5, this.depth * .5), this.py[e] = t ? this.floorY + q(0, this.height) : this.floorY + this.height;
544
546
  }
545
547
  writeMatrices() {
546
548
  let e = this.dummy;
@@ -550,7 +552,7 @@ var He = class extends b {
550
552
  }
551
553
  this.instanceMatrix.needsUpdate = !0;
552
554
  }
553
- }, Ue = class extends b {
555
+ }, We = class extends x {
554
556
  width;
555
557
  height;
556
558
  depth;
@@ -560,9 +562,9 @@ var He = class extends b {
560
562
  py;
561
563
  pz;
562
564
  speed;
563
- dummy = new O();
565
+ dummy = new A();
564
566
  constructor(e = {}) {
565
- let { count: t = 24, width: n = 1.5, height: r = 3, depth: i = 1.5, spread: a = .88, baseY: o = 0, speedMin: s = .35, speedMax: c = .85, color: l = 16777215, opacity: u = .6, emissiveIntensity: d = 0, geometry: f = new P(.08, 6, 6), material: p } = e, h = p ?? new D({
567
+ let { count: t = 24, width: n = 1.5, height: r = 3, depth: i = 1.5, spread: a = .88, baseY: o = 0, speedMin: s = .35, speedMax: c = .85, color: l = 16777215, opacity: u = .6, emissiveIntensity: d = 0, geometry: f = new F(.08, 6, 6), material: p } = e, h = p ?? new O({
566
568
  color: l,
567
569
  emissive: l,
568
570
  emissiveIntensity: d,
@@ -572,7 +574,7 @@ var He = class extends b {
572
574
  metalness: .1
573
575
  });
574
576
  super(f, h, t), this.instanceMatrix.setUsage(m), this.frustumCulled = !1, this.width = n, this.height = r, this.depth = i, this.baseY = o, this.spread = Math.min(1, Math.max(0, a)), this.px = new Float32Array(t), this.py = new Float32Array(t), this.pz = new Float32Array(t), this.speed = new Float32Array(t);
575
- for (let e = 0; e < t; e++) this.respawn(e, !0), this.speed[e] = K(s, c);
577
+ for (let e = 0; e < t; e++) this.respawn(e, !0), this.speed[e] = q(s, c);
576
578
  this.writeMatrices();
577
579
  }
578
580
  update(e) {
@@ -588,14 +590,14 @@ var He = class extends b {
588
590
  }
589
591
  respawn(e, t) {
590
592
  let n = this.width * .5 * this.spread, r = this.depth * .5 * this.spread;
591
- this.px[e] = K(-n, n), this.pz[e] = K(-r, r), this.py[e] = t ? this.baseY + Math.random() * this.height : this.baseY + K(0, this.height * .15);
593
+ this.px[e] = q(-n, n), this.pz[e] = q(-r, r), this.py[e] = t ? this.baseY + Math.random() * this.height : this.baseY + q(0, this.height * .15);
592
594
  }
593
595
  writeMatrices() {
594
596
  let e = this.dummy;
595
597
  for (let t = 0; t < this.count; t++) e.position.set(this.px[t], this.py[t], this.pz[t]), e.updateMatrix(), this.setMatrixAt(t, e.matrix);
596
598
  this.instanceMatrix.needsUpdate = !0;
597
599
  }
598
- }, We = class {
600
+ }, Ge = class {
599
601
  speed;
600
602
  minIntensity;
601
603
  maxIntensity;
@@ -609,7 +611,7 @@ var He = class extends b {
609
611
  let t = Math.abs(Math.sin(this.elapsed * this.speed));
610
612
  this.material.emissiveIntensity = this.minIntensity + t * (this.maxIntensity - this.minIntensity);
611
613
  }
612
- }, Ge = class e {
614
+ }, Ke = class e {
613
615
  seed;
614
616
  light;
615
617
  lightIntensity;
@@ -638,21 +640,21 @@ var He = class extends b {
638
640
  };
639
641
  //#endregion
640
642
  //#region src/effects/GlowHalo.ts
641
- function Ke(e) {
643
+ function qe(e) {
642
644
  let t = document.createElement("canvas");
643
645
  t.width = t.height = 128;
644
646
  let n = t.getContext("2d"), r = `#${e.getHexString()}`, i = n.createRadialGradient(64, 64, 2, 64, 64, 64);
645
647
  i.addColorStop(0, `${r}ff`), i.addColorStop(.25, `${r}aa`), i.addColorStop(1, `${r}00`), n.fillStyle = i, n.fillRect(0, 0, 128, 128);
646
648
  let o = new a(t);
647
- return o.colorSpace = oe, o;
649
+ return o.colorSpace = ie, o;
648
650
  }
649
- var qe = class extends O {
651
+ var Je = class extends A {
650
652
  mesh;
651
653
  texture;
652
654
  baseColor;
653
655
  constructor({ color: t = 16755268, size: n = 1.2, opacity: r = .75 } = {}) {
654
- super(), this.baseColor = new c(t), this.texture = Ke(this.baseColor);
655
- let i = new T({
656
+ super(), this.baseColor = new c(t), this.texture = qe(this.baseColor);
657
+ let i = new E({
656
658
  map: this.texture,
657
659
  color: this.baseColor,
658
660
  transparent: !0,
@@ -661,7 +663,7 @@ var qe = class extends O {
661
663
  depthWrite: !1,
662
664
  toneMapped: !1
663
665
  });
664
- this.mesh = new w(new j(n, n), i), this.add(this.mesh);
666
+ this.mesh = new T(new M(n, n), i), this.add(this.mesh);
665
667
  }
666
668
  faceCamera(e) {
667
669
  this.mesh.lookAt(e);
@@ -673,12 +675,12 @@ var qe = class extends O {
673
675
  return this.mesh.material.opacity;
674
676
  }
675
677
  setColor(e) {
676
- this.baseColor.set(e), this.mesh.material.color.copy(this.baseColor), this.texture.dispose(), this.texture = Ke(this.baseColor), this.mesh.material.map = this.texture;
678
+ this.baseColor.set(e), this.mesh.material.color.copy(this.baseColor), this.texture.dispose(), this.texture = qe(this.baseColor), this.mesh.material.map = this.texture;
677
679
  }
678
680
  dispose() {
679
681
  this.mesh.geometry.dispose(), this.mesh.material.dispose(), this.texture.dispose();
680
682
  }
681
- }, Je = class extends O {
683
+ }, Ye = class extends A {
682
684
  patches = [];
683
685
  area;
684
686
  heightAt;
@@ -688,8 +690,8 @@ var qe = class extends O {
688
690
  x: 1,
689
691
  z: 1
690
692
  }, color: o = "#9fb0c8", heightAt: s = () => 0 } = {}) {
691
- super(), this.area = t, this.heightAt = s, this.texture = Ye(o);
692
- let c = Xe(a);
693
+ super(), this.area = t, this.heightAt = s, this.texture = Xe(o);
694
+ let c = Ze(a);
693
695
  for (let t = 0; t < e; t++) this.patches.push(this.makeInteriorPatch());
694
696
  for (let e = 0; e < n; e++) this.patches.push(this.makePerimeterPatch(r, i, c));
695
697
  }
@@ -697,7 +699,7 @@ var qe = class extends O {
697
699
  this.elapsed += e;
698
700
  for (let t of this.patches) {
699
701
  let n = t.mesh;
700
- n.position.x += t.driftX * e, n.position.z += t.driftZ * e, n.rotation.z += t.spin * e, t.perimeter ? ($e(n, t.perimeter.edge, t.perimeter.plotHalf, t.perimeter.terrainHalf), n.position.y = this.heightAt(n.position.x, n.position.z) + .15 + .35 * (.5 + .5 * Math.sin(this.elapsed * .22 + t.phase))) : (n.position.x > this.area && (n.position.x -= this.area * 2), n.position.x < -this.area && (n.position.x += this.area * 2), n.position.z > this.area && (n.position.z -= this.area * 2), n.position.z < -this.area && (n.position.z += this.area * 2)), n.material.opacity = t.baseOpacity * (.6 + .4 * Math.sin(this.elapsed * .3 + t.phase));
702
+ n.position.x += t.driftX * e, n.position.z += t.driftZ * e, n.rotation.z += t.spin * e, t.perimeter ? (et(n, t.perimeter.edge, t.perimeter.plotHalf, t.perimeter.terrainHalf), n.position.y = this.heightAt(n.position.x, n.position.z) + .15 + .35 * (.5 + .5 * Math.sin(this.elapsed * .22 + t.phase))) : (n.position.x > this.area && (n.position.x -= this.area * 2), n.position.x < -this.area && (n.position.x += this.area * 2), n.position.z > this.area && (n.position.z -= this.area * 2), n.position.z < -this.area && (n.position.z += this.area * 2)), n.material.opacity = t.baseOpacity * (.6 + .4 * Math.sin(this.elapsed * .3 + t.phase));
701
703
  }
702
704
  }
703
705
  dispose() {
@@ -706,25 +708,25 @@ var qe = class extends O {
706
708
  this.patches.length = 0, this.clear();
707
709
  }
708
710
  makeInteriorPatch() {
709
- let e = K(8, 16), t = K(.05, .16), n = K(-this.area, this.area), r = K(-this.area, this.area), i = this.makeMesh(e, t);
710
- return i.position.set(n, this.heightAt(n, r) + K(.3, 1.2), r), this.add(i), {
711
+ let e = q(8, 16), t = q(.05, .16), n = q(-this.area, this.area), r = q(-this.area, this.area), i = this.makeMesh(e, t);
712
+ return i.position.set(n, this.heightAt(n, r) + q(.3, 1.2), r), this.add(i), {
711
713
  mesh: i,
712
- driftX: K(-.15, .15),
713
- driftZ: K(-.15, .15),
714
- spin: K(-.03, .03),
714
+ driftX: q(-.15, .15),
715
+ driftZ: q(-.15, .15),
716
+ spin: q(-.03, .03),
715
717
  baseOpacity: t,
716
- phase: K(0, Math.PI * 2)
718
+ phase: q(0, Math.PI * 2)
717
719
  };
718
720
  }
719
721
  makePerimeterPatch(e, t, n) {
720
- let r = Ze(n), { x: i, z: a, driftX: o, driftZ: s } = Qe(r, e, t), c = K(18, 30), l = K(.1, .26), u = this.makeMesh(c, l);
721
- return u.position.set(i, this.heightAt(i, a) + K(.15, .55), a), this.add(u), {
722
+ let r = Qe(n), { x: i, z: a, driftX: o, driftZ: s } = $e(r, e, t), c = q(18, 30), l = q(.1, .26), u = this.makeMesh(c, l);
723
+ return u.position.set(i, this.heightAt(i, a) + q(.15, .55), a), this.add(u), {
722
724
  mesh: u,
723
725
  driftX: o,
724
726
  driftZ: s,
725
- spin: K(-.012, .012),
727
+ spin: q(-.012, .012),
726
728
  baseOpacity: l,
727
- phase: K(0, Math.PI * 2),
729
+ phase: q(0, Math.PI * 2),
728
730
  perimeter: {
729
731
  edge: r,
730
732
  plotHalf: e,
@@ -733,35 +735,35 @@ var qe = class extends O {
733
735
  };
734
736
  }
735
737
  makeMesh(e, t) {
736
- let n = new w(new j(e, e), new T({
738
+ let n = new T(new M(e, e), new E({
737
739
  map: this.texture,
738
740
  transparent: !0,
739
741
  depthWrite: !1,
740
742
  opacity: t,
741
743
  toneMapped: !1
742
744
  }));
743
- return n.rotation.x = -Math.PI / 2, n.rotation.z = K(0, Math.PI * 2), n;
745
+ return n.rotation.x = -Math.PI / 2, n.rotation.z = q(0, Math.PI * 2), n;
744
746
  }
745
747
  };
746
- function Ye(e) {
748
+ function Xe(e) {
747
749
  let t = `#${new c(e).getHexString()}`, n = document.createElement("canvas");
748
750
  n.width = n.height = 256;
749
751
  let r = n.getContext("2d"), i = r.createRadialGradient(128, 128, 8, 128, 128, 128);
750
752
  i.addColorStop(0, `${t}dd`), i.addColorStop(.45, `${t}66`), i.addColorStop(1, `${t}00`), r.fillStyle = i, r.fillRect(0, 0, 256, 256);
751
753
  let o = new a(n);
752
- return o.colorSpace = oe, o;
754
+ return o.colorSpace = ie, o;
753
755
  }
754
- function Xe(e) {
756
+ function Ze(e) {
755
757
  let t = [];
756
758
  return e.z > 0 && t.push("n"), e.z < 0 && t.push("s"), e.x > 0 && t.push("w"), e.x < 0 && t.push("e"), t.length ? t : ["n", "w"];
757
759
  }
758
- function Ze(e) {
760
+ function Qe(e) {
759
761
  if (e.length === 1) return e[0];
760
762
  let t = Math.random(), n = e.includes("n"), r = e.includes("w");
761
763
  return n && r ? t < .58 ? "n" : "w" : e[Math.floor(Math.random() * e.length)];
762
764
  }
763
- function Qe(e, t, n) {
764
- let r = K(.6, n - t - 1.5), i = K(-n + 3, n - 3), a = K(.03, .09) * (Math.random() < .5 ? -1 : 1), o = K(.01, .04);
765
+ function $e(e, t, n) {
766
+ let r = q(.6, n - t - 1.5), i = q(-n + 3, n - 3), a = q(.03, .09) * (Math.random() < .5 ? -1 : 1), o = q(.01, .04);
765
767
  switch (e) {
766
768
  case "n": return {
767
769
  x: i,
@@ -789,29 +791,29 @@ function Qe(e, t, n) {
789
791
  };
790
792
  }
791
793
  }
792
- function $e(e, t, n, r) {
794
+ function et(e, t, n, r) {
793
795
  let i = r - 1, { x: a, z: o } = e.position;
794
796
  switch (t) {
795
797
  case "n":
796
- e.position.z = et(o, -i, -n + .8), a < -i + 3 && (e.position.x = i - 3), a > i - 3 && (e.position.x = -i + 3);
798
+ e.position.z = tt(o, -i, -n + .8), a < -i + 3 && (e.position.x = i - 3), a > i - 3 && (e.position.x = -i + 3);
797
799
  break;
798
800
  case "s":
799
- e.position.z = et(o, n - .8, i), a < -i + 3 && (e.position.x = i - 3), a > i - 3 && (e.position.x = -i + 3);
801
+ e.position.z = tt(o, n - .8, i), a < -i + 3 && (e.position.x = i - 3), a > i - 3 && (e.position.x = -i + 3);
800
802
  break;
801
803
  case "e":
802
- e.position.x = et(a, n - .8, i), o < -i + 3 && (e.position.z = i - 3), o > i - 3 && (e.position.z = -i + 3);
804
+ e.position.x = tt(a, n - .8, i), o < -i + 3 && (e.position.z = i - 3), o > i - 3 && (e.position.z = -i + 3);
803
805
  break;
804
806
  case "w":
805
- e.position.x = et(a, -i, -n + .8), o < -i + 3 && (e.position.z = i - 3), o > i - 3 && (e.position.z = -i + 3);
807
+ e.position.x = tt(a, -i, -n + .8), o < -i + 3 && (e.position.z = i - 3), o > i - 3 && (e.position.z = -i + 3);
806
808
  break;
807
809
  }
808
810
  }
809
- function et(e, t, n) {
811
+ function tt(e, t, n) {
810
812
  return Math.max(t, Math.min(n, e));
811
813
  }
812
814
  //#endregion
813
815
  //#region src/effects/LightningEffect.ts
814
- var tt = class {
816
+ var nt = class {
815
817
  level = 0;
816
818
  light;
817
819
  peak;
@@ -821,7 +823,7 @@ var tt = class {
821
823
  clock = 0;
822
824
  nextStrike;
823
825
  constructor({ light: e, peak: t = 12, minGap: n = 3, maxGap: r = 9 }) {
824
- this.light = e, this.peak = t, this.minGap = n, this.maxGap = r, this.nextStrike = K(n * .3, r);
826
+ this.light = e, this.peak = t, this.minGap = n, this.maxGap = r, this.nextStrike = q(n * .3, r);
825
827
  }
826
828
  update(e) {
827
829
  this.clock += e, this.clock >= this.nextStrike && this.strike();
@@ -840,12 +842,12 @@ var tt = class {
840
842
  strike() {
841
843
  let e = Math.random() < .5 ? 2 : 3;
842
844
  for (let t = 0; t < e; t++) this.spikes.push({
843
- at: this.clock + t * K(.04, .12),
844
- amp: K(.5, 1)
845
+ at: this.clock + t * q(.04, .12),
846
+ amp: q(.5, 1)
845
847
  });
846
- this.nextStrike = this.clock + K(this.minGap, this.maxGap);
848
+ this.nextStrike = this.clock + q(this.minGap, this.maxGap);
847
849
  }
848
- }, nt = class extends i {
850
+ }, rt = class extends i {
849
851
  constructor(e = .1) {
850
852
  super();
851
853
  let t = [], n = [], r = [
@@ -867,7 +869,7 @@ var tt = class {
867
869
  let i = new _(t, 3);
868
870
  this.setAttribute("position", i), this.setIndex(n), this.computeVertexNormals();
869
871
  }
870
- }, rt = class extends b {
872
+ }, it = class extends x {
871
873
  width;
872
874
  height;
873
875
  depth;
@@ -883,14 +885,14 @@ var tt = class {
883
885
  rotY;
884
886
  rotZ;
885
887
  phase;
886
- dummy = new O();
888
+ dummy = new A();
887
889
  clock = 0;
888
890
  constructor(e = {}) {
889
891
  let { count: t = 120, width: n = 16, height: r = 8, depth: i = 16, floorY: a = 0, fallSpeedMin: o = .12, fallSpeedMax: s = .28, driftMin: l = .04, driftMax: u = .14, flutter: d = .35, color: f = [
890
892
  16766704,
891
893
  16774650,
892
894
  15775952
893
- ], geometry: h = new nt(), material: g } = e, _ = (Array.isArray(f) ? f : [f]).map((e) => new c(e)), v = g ?? new D({
895
+ ], geometry: h = new rt(), material: g } = e, _ = (Array.isArray(f) ? f : [f]).map((e) => new c(e)), v = g ?? new O({
894
896
  color: _.length === 1 ? _[0].getHex() : 16777215,
895
897
  metalness: .05,
896
898
  roughness: .85,
@@ -899,9 +901,9 @@ var tt = class {
899
901
  });
900
902
  super(h, v, t), this.instanceMatrix.setUsage(m), this.frustumCulled = !1, this.width = n, this.height = r, this.depth = i, this.floorY = a, this.flutter = d, this.px = new Float32Array(t), this.py = new Float32Array(t), this.pz = new Float32Array(t), this.fallSpeed = new Float32Array(t), this.driftX = new Float32Array(t), this.driftZ = new Float32Array(t), this.rotX = new Float32Array(t), this.rotY = new Float32Array(t), this.rotZ = new Float32Array(t), this.phase = new Float32Array(t);
901
903
  for (let e = 0; e < t; e++) {
902
- this.respawn(e, !0), this.fallSpeed[e] = K(o, s);
903
- let t = K(l, u), n = K(0, Math.PI * 2);
904
- this.driftX[e] = Math.cos(n) * t, this.driftZ[e] = Math.sin(n) * t, this.phase[e] = K(0, Math.PI * 2), _.length > 1 && this.setColorAt(e, _[Math.floor(Math.random() * _.length)]);
904
+ this.respawn(e, !0), this.fallSpeed[e] = q(o, s);
905
+ let t = q(l, u), n = q(0, Math.PI * 2);
906
+ this.driftX[e] = Math.cos(n) * t, this.driftZ[e] = Math.sin(n) * t, this.phase[e] = q(0, Math.PI * 2), _.length > 1 && this.setColorAt(e, _[Math.floor(Math.random() * _.length)]);
905
907
  }
906
908
  this.instanceColor && (this.instanceColor.needsUpdate = !0), this.writeMatrices();
907
909
  }
@@ -920,7 +922,7 @@ var tt = class {
920
922
  return this;
921
923
  }
922
924
  respawn(e, t) {
923
- this.px[e] = K(-this.width * .5, this.width * .5), this.pz[e] = K(-this.depth * .5, this.depth * .5), this.py[e] = t ? this.floorY + K(0, this.height * 1.25) : this.floorY + this.height + K(0, this.height * .25), this.rotX[e] = K(-.6, .6), this.rotY[e] = K(-Math.PI, Math.PI), this.rotZ[e] = K(-.8, .8);
925
+ this.px[e] = q(-this.width * .5, this.width * .5), this.pz[e] = q(-this.depth * .5, this.depth * .5), this.py[e] = t ? this.floorY + q(0, this.height * 1.25) : this.floorY + this.height + q(0, this.height * .25), this.rotX[e] = q(-.6, .6), this.rotY[e] = q(-Math.PI, Math.PI), this.rotZ[e] = q(-.8, .8);
924
926
  }
925
927
  writeMatrices() {
926
928
  let e = this.dummy;
@@ -933,15 +935,15 @@ var tt = class {
933
935
  };
934
936
  //#endregion
935
937
  //#region src/effects/RainEffect.ts
936
- function it() {
938
+ function at() {
937
939
  let e = document.createElement("canvas");
938
940
  e.width = 8, e.height = 64;
939
941
  let t = e.getContext("2d"), n = t.createLinearGradient(0, 0, 0, 64);
940
942
  n.addColorStop(0, "rgba(255,255,255,0)"), n.addColorStop(.42, "rgba(255,255,255,0.55)"), n.addColorStop(.58, "rgba(255,255,255,0.55)"), n.addColorStop(1, "rgba(255,255,255,0)"), t.fillStyle = n, t.fillRect(0, 0, 8, 64);
941
943
  let r = new a(e);
942
- return r.colorSpace = oe, r;
944
+ return r.colorSpace = ie, r;
943
945
  }
944
- var at = class extends b {
946
+ var ot = class extends x {
945
947
  intensity;
946
948
  maxCount;
947
949
  area;
@@ -950,18 +952,18 @@ var at = class extends b {
950
952
  baseOpacity;
951
953
  windDirection;
952
954
  windStrength;
953
- fallDirection = new I(0, -1, 0);
954
- streakOrientation = new M();
955
+ fallDirection = new L(0, -1, 0);
956
+ streakOrientation = new N();
955
957
  sx;
956
958
  sz;
957
959
  topY;
958
960
  len;
959
961
  speed;
960
962
  streakTexture;
961
- dummy = new O();
963
+ dummy = new A();
962
964
  clock = 0;
963
965
  constructor(e = {}) {
964
- let { count: t = 1400, area: n = 26, height: r = 22, groundY: i = 0, width: a = .009, color: o = "#aebfd6", opacity: s = .16, lengthMin: l = .18, lengthMax: u = .42, speedMin: d = 11, speedMax: f = 19, windDirection: h = 0, windStrength: g = 0, intensity: _ = .5, geometry: v = new j(a, 1), material: y } = e, b = y ? void 0 : it(), x = y ?? new T({
966
+ let { count: t = 1400, area: n = 26, height: r = 22, groundY: i = 0, width: a = .009, color: o = "#aebfd6", opacity: s = .16, lengthMin: l = .18, lengthMax: u = .42, speedMin: d = 11, speedMax: f = 19, windDirection: h = 0, windStrength: g = 0, intensity: _ = .5, geometry: v = new M(a, 1), material: y } = e, b = y ? void 0 : at(), x = y ?? new E({
965
967
  color: new c(o),
966
968
  map: b,
967
969
  transparent: !0,
@@ -972,7 +974,7 @@ var at = class extends b {
972
974
  side: p
973
975
  });
974
976
  super(v, x, t), this.instanceMatrix.setUsage(m), this.frustumCulled = !1, this.maxCount = t, this.area = n, this.height = r, this.groundY = i, this.baseOpacity = s, this.windDirection = h, this.windStrength = Math.max(0, g), this.updateFallDirection(0), this.intensity = _, this.streakTexture = b, this.sx = new Float32Array(t), this.sz = new Float32Array(t), this.topY = new Float32Array(t), this.len = new Float32Array(t), this.speed = new Float32Array(t);
975
- for (let e = 0; e < t; e++) this.sx[e] = K(-n, n), this.sz[e] = K(-n, n), this.topY[e] = K(i, i + r), this.len[e] = K(l, u), this.speed[e] = K(d, f);
977
+ for (let e = 0; e < t; e++) this.sx[e] = q(-n, n), this.sz[e] = q(-n, n), this.topY[e] = q(i, i + r), this.len[e] = q(l, u), this.speed[e] = q(d, f);
976
978
  this.writeMatrices(), this.applyIntensity();
977
979
  }
978
980
  update(e) {
@@ -1004,7 +1006,7 @@ var at = class extends b {
1004
1006
  return;
1005
1007
  }
1006
1008
  let n = t, r = 1 / Math.hypot(n, 1);
1007
- this.fallDirection.set(Math.cos(this.windDirection) * n * r, -1 * r, Math.sin(this.windDirection) * n * r), this.streakOrientation.setFromUnitVectors(new I(0, 1, 0), this.fallDirection);
1009
+ this.fallDirection.set(Math.cos(this.windDirection) * n * r, -1 * r, Math.sin(this.windDirection) * n * r), this.streakOrientation.setFromUnitVectors(new L(0, 1, 0), this.fallDirection);
1008
1010
  }
1009
1011
  writeMatrices() {
1010
1012
  let e = this.dummy;
@@ -1014,7 +1016,7 @@ var at = class extends b {
1014
1016
  }
1015
1017
  this.instanceMatrix.needsUpdate = !0;
1016
1018
  }
1017
- }, ot = class extends N {
1019
+ }, st = class extends P {
1018
1020
  constructor(e = 5, t = .5, n = 1) {
1019
1021
  super();
1020
1022
  let r = Math.PI * 2 / e, i = r / 2, a = r / 4;
@@ -1025,27 +1027,14 @@ var at = class extends b {
1025
1027
  }
1026
1028
  this.closePath();
1027
1029
  }
1028
- }, st = class extends g {
1030
+ }, ct = class extends g {
1029
1031
  constructor({ sides: e = 5, innerRadius: t = .5, outerRadius: n = 1, depth: r = .25 } = {}) {
1030
- super(new ot(e, t, n), {
1032
+ super(new st(e, t, n), {
1031
1033
  depth: r,
1032
1034
  bevelEnabled: !1
1033
1035
  });
1034
1036
  }
1035
- }, ct = new I(0, 0, 0);
1036
- function lt(e, t, n, r = 128) {
1037
- let i = document.createElement("canvas");
1038
- i.width = r, i.height = r;
1039
- let o = i.getContext("2d"), s = r * .46, c = t / n * s;
1040
- o.translate(r / 2, r / 2), o.fillStyle = "#ffffff", o.beginPath();
1041
- for (let t = 0; t < e * 2; t++) {
1042
- let n = t % 2 == 0 ? s : c, r = t / (e * 2) * Math.PI * 2 - Math.PI / 2, i = Math.cos(r) * n, a = Math.sin(r) * n;
1043
- t === 0 ? o.moveTo(i, a) : o.lineTo(i, a);
1044
- }
1045
- o.closePath(), o.fill();
1046
- let l = new a(i);
1047
- return l.needsUpdate = !0, l;
1048
- }
1037
+ }, lt = new L(0, 0, 0);
1049
1038
  function ut(e) {
1050
1039
  let t = Math.random(), n = Math.random(), r = Math.PI * 2 * t, i = Math.acos(2 * n - 1), a = Math.sin(i);
1051
1040
  return e.set(a * Math.cos(r), Math.cos(i), a * Math.sin(r));
@@ -1053,63 +1042,50 @@ function ut(e) {
1053
1042
  function dt(e) {
1054
1043
  return (Array.isArray(e) ? e : [e]).map((e) => new c(e));
1055
1044
  }
1056
- var ft = class extends O {
1057
- style;
1045
+ function ft(e) {
1046
+ let t = e.getAttribute("position"), n = 0;
1047
+ for (let e = 0; e < t.count; e++) {
1048
+ let r = t.getX(e), i = t.getY(e), a = r * r + i * i;
1049
+ a > n && (n = a);
1050
+ }
1051
+ return Math.sqrt(n) || 1;
1052
+ }
1053
+ var pt = class extends A {
1054
+ orientation;
1058
1055
  field;
1059
1056
  twinkle;
1060
- baseSize;
1061
1057
  baseScales;
1062
1058
  twinklePhases;
1063
- baseColors;
1064
- spriteTexture;
1065
- dummy = new O();
1059
+ scaleAttribute;
1060
+ dummy = new A();
1066
1061
  constructor(e = {}) {
1067
- super(), this.style = e.style ?? "points";
1068
- let { count: t = 1500, radius: n = 500, minRadius: r = n, maxRadius: i = n, sizeMin: a = .008, sizeMax: o = .025, color: s = [
1062
+ super();
1063
+ let { orientation: t = "billboard", count: n = 1500, radius: r = 500, minRadius: i = r, maxRadius: a = r, sizeMin: o = .008, sizeMax: s = .025, color: c = [
1069
1064
  16777215,
1070
1065
  13293567,
1071
1066
  16774368
1072
- ], twinkle: c = !1, material: l, burst: u = {}, geometry: d } = e;
1073
- this.frustumCulled = !1, this.twinkle = c;
1074
- let f = r + Math.max(i - r, 0) * .5, p = (a + o) * .5;
1075
- this.baseSize = f * p;
1076
- let m = {
1077
- sides: u.sides ?? 4,
1078
- innerRadius: u.innerRadius ?? .6,
1079
- outerRadius: u.outerRadius ?? 1.9,
1080
- depth: u.depth ?? .05
1067
+ ], twinkle: l = !1, rotation: u = 0, rotationJitter: d = Math.PI * 2, material: f, burst: p = {}, geometry: m } = e;
1068
+ this.orientation = t, this.frustumCulled = !1, this.twinkle = l, l && (this.twinklePhases = new Float32Array(n), this.baseScales = new Float32Array(n));
1069
+ let h = {
1070
+ count: n,
1071
+ minRadius: i,
1072
+ maxRadius: a,
1073
+ sizeMin: o,
1074
+ sizeMax: s,
1075
+ color: c,
1076
+ material: f,
1077
+ geometry: m ?? new ct({
1078
+ sides: p.sides ?? 4,
1079
+ innerRadius: p.innerRadius ?? .6,
1080
+ outerRadius: p.outerRadius ?? 1.9,
1081
+ depth: p.depth ?? .05
1082
+ }),
1083
+ rotation: u,
1084
+ rotationJitter: d
1081
1085
  };
1082
- if (c && (this.twinklePhases = new Float32Array(t)), this.style === "burst") {
1083
- c && (this.baseScales = new Float32Array(t));
1084
- let e = d ?? new st({
1085
- sides: m.sides,
1086
- innerRadius: m.innerRadius,
1087
- outerRadius: m.outerRadius,
1088
- depth: m.depth
1089
- });
1090
- this.field = this.createBurstField({
1091
- count: t,
1092
- minRadius: r,
1093
- maxRadius: i,
1094
- sizeMin: a,
1095
- sizeMax: o,
1096
- color: s,
1097
- material: l,
1098
- geometry: e
1099
- });
1100
- } else this.field = this.createPointsField({
1101
- count: t,
1102
- minRadius: r,
1103
- maxRadius: i,
1104
- sizeMin: a,
1105
- sizeMax: o,
1106
- color: s,
1107
- material: l,
1108
- burstShape: m
1109
- });
1110
- this.add(this.field);
1086
+ this.field = t === "billboard" ? this.createBillboardField(h) : this.createRadialField(h), this.add(this.field);
1111
1087
  }
1112
- get drawable() {
1088
+ get mesh() {
1113
1089
  return this.field;
1114
1090
  }
1115
1091
  get geometry() {
@@ -1122,23 +1098,21 @@ var ft = class extends O {
1122
1098
  this.geometry.dispose();
1123
1099
  let e = Array.isArray(this.material) ? this.material : [this.material];
1124
1100
  for (let t of e) t.dispose();
1125
- this.spriteTexture?.dispose();
1126
1101
  }
1127
1102
  update(e = performance.now() * .001) {
1128
- if (!this.twinkle) return;
1129
- if (this.field instanceof ne) {
1130
- if (this.twinklePhases && this.baseColors) {
1131
- let t = this.field.geometry.getAttribute("color"), n = t.array, r = this.baseColors;
1132
- for (let t = 0; t < this.twinklePhases.length; t++) {
1133
- let i = .65 + .35 * Math.sin(e * 2.5 + this.twinklePhases[t]);
1134
- n[t * 3] = r[t * 3] * i, n[t * 3 + 1] = r[t * 3 + 1] * i, n[t * 3 + 2] = r[t * 3 + 2] * i;
1135
- }
1136
- t.needsUpdate = !0;
1137
- } else this.field.material.size = this.baseSize * (.8 + .2 * Math.sin(e * 2.5));
1103
+ if (!this.twinkle || !this.baseScales || !this.twinklePhases) return;
1104
+ if (this.orientation === "billboard") {
1105
+ let t = this.scaleAttribute;
1106
+ if (!t) return;
1107
+ let n = t.array;
1108
+ for (let t = 0; t < this.baseScales.length; t++) {
1109
+ let r = .75 + .25 * Math.sin(e * 2.5 + this.twinklePhases[t]);
1110
+ n[t] = this.baseScales[t] * r;
1111
+ }
1112
+ t.needsUpdate = !0;
1138
1113
  return;
1139
1114
  }
1140
- if (!this.baseScales || !this.twinklePhases) return;
1141
- let t = new C(), n = new I(), r = new M(), i = new I();
1115
+ let t = new w(), n = new L(), r = new N(), i = new L();
1142
1116
  for (let a = 0; a < this.field.count; a++) {
1143
1117
  this.field.getMatrixAt(a, t), t.decompose(n, r, i);
1144
1118
  let o = .75 + .25 * Math.sin(e * 2.5 + this.twinklePhases[a]), s = this.baseScales[a] * o;
@@ -1146,54 +1120,51 @@ var ft = class extends O {
1146
1120
  }
1147
1121
  this.field.instanceMatrix.needsUpdate = !0;
1148
1122
  }
1149
- createPointsField({ count: e, minRadius: t, maxRadius: n, sizeMin: a, sizeMax: o, color: s, material: c, burstShape: l }) {
1150
- let u = dt(s), d = new I(), f = Math.max(n - t, 0), p = (t + f * .5) * ((a + o) / 2), h = new Float32Array(e * 3), g = u.length > 1 || this.twinkle ? new Float32Array(e * 3) : null;
1123
+ createBillboardField({ count: e, minRadius: t, maxRadius: n, sizeMin: r, sizeMax: i, color: a, material: o, geometry: s, rotation: c, rotationJitter: l }) {
1124
+ let u = dt(a), d = new L(), f = Math.max(n - t, 0), h = s.clone();
1125
+ h.center();
1126
+ let g = ft(h), _ = new Float32Array(e * 3), v = new Float32Array(e), y = new Float32Array(e), S = u.length > 1, C = S ? new Float32Array(e * 3) : null;
1151
1127
  for (let n = 0; n < e; n++) {
1152
1128
  let e = t + Math.random() * f;
1153
- if (ut(d).multiplyScalar(e), h[n * 3] = d.x, h[n * 3 + 1] = d.y, h[n * 3 + 2] = d.z, g) {
1129
+ if (ut(d).multiplyScalar(e), _[n * 3] = d.x, _[n * 3 + 1] = d.y, _[n * 3 + 2] = d.z, v[n] = e * (r + Math.random() * (i - r)) / g, y[n] = c + Math.random() * l, this.baseScales && (this.baseScales[n] = v[n]), this.twinklePhases && (this.twinklePhases[n] = Math.random() * Math.PI * 2), C) {
1154
1130
  let e = u[Math.floor(Math.random() * u.length)];
1155
- g[n * 3] = e.r, g[n * 3 + 1] = e.g, g[n * 3 + 2] = e.b;
1131
+ C[n * 3] = e.r, C[n * 3 + 1] = e.g, C[n * 3 + 2] = e.b;
1156
1132
  }
1157
- this.twinklePhases && (this.twinklePhases[n] = Math.random() * Math.PI * 2);
1158
- }
1159
- let _ = new i();
1160
- if (_.setAttribute("position", new r(h, 3)), g) {
1161
- let e = new r(g, 3);
1162
- this.twinkle && (this.baseColors = g.slice(), e.setUsage(m)), _.setAttribute("color", e);
1163
1133
  }
1164
- this.spriteTexture = lt(l.sides, l.innerRadius, l.outerRadius);
1165
- let v = new ne(_, c ?? new re({
1166
- map: this.spriteTexture,
1167
- color: g ? 16777215 : u[0].getHex(),
1168
- size: p,
1169
- sizeAttenuation: !0,
1170
- transparent: !0,
1171
- alphaTest: .05,
1172
- vertexColors: g !== null,
1134
+ let T = new b(_, 3), E = new b(v, 1), D = new b(y, 1);
1135
+ this.scaleAttribute = E;
1136
+ let O = o ?? new de({
1137
+ color: S ? 16777215 : u[0].getHex(),
1138
+ side: p,
1173
1139
  depthWrite: !1,
1174
1140
  toneMapped: !1
1175
- }));
1176
- return v.frustumCulled = !1, v.renderOrder = 1, v;
1177
- }
1178
- createBurstField({ count: e, minRadius: t, maxRadius: n, sizeMin: r, sizeMax: i, color: a, material: o, geometry: s }) {
1179
- let c = dt(a), l = new I(), u = Math.max(n - t, 0), d = s.clone();
1180
- d.center(), d.computeBoundingSphere();
1181
- let f = d.boundingSphere?.radius ?? 1, m = new b(d, o ?? new T({
1182
- color: c.length === 1 ? c[0].getHex() : 16777215,
1141
+ });
1142
+ O.positionNode = le(T, "vec3"), O.rotationNode = le(D, "float"), this.twinkle ? (E.setUsage(m), O.scaleNode = ue(E, "float")) : O.scaleNode = le(E, "float"), C && (O.colorNode = le(new b(C, 3), "vec3"));
1143
+ let k = new x(h, O, e);
1144
+ k.frustumCulled = !1, k.renderOrder = 1;
1145
+ let A = new w();
1146
+ for (let t = 0; t < e; t++) k.setMatrixAt(t, A);
1147
+ return k.instanceMatrix.needsUpdate = !0, k;
1148
+ }
1149
+ createRadialField({ count: e, minRadius: t, maxRadius: n, sizeMin: r, sizeMax: i, color: a, material: o, geometry: s, rotation: c, rotationJitter: l }) {
1150
+ let u = dt(a), d = new L(), f = Math.max(n - t, 0), m = s.clone();
1151
+ m.center(), m.computeBoundingSphere();
1152
+ let h = m.boundingSphere?.radius ?? 1, g = new x(m, o ?? new E({
1153
+ color: u.length === 1 ? u[0].getHex() : 16777215,
1183
1154
  side: p,
1184
1155
  depthWrite: !1,
1185
1156
  toneMapped: !1
1186
1157
  }), e);
1187
- m.frustumCulled = !1, m.renderOrder = 1;
1158
+ g.frustumCulled = !1, g.renderOrder = 1;
1188
1159
  for (let n = 0; n < e; n++) {
1189
- let e = t + Math.random() * u;
1190
- ut(l).multiplyScalar(e);
1191
- let a = e * (r + Math.random() * (i - r)) / f;
1192
- this.baseScales && (this.baseScales[n] = a), this.twinklePhases && (this.twinklePhases[n] = Math.random() * Math.PI * 2), this.dummy.position.copy(l), this.dummy.lookAt(ct), this.dummy.rotateZ(Math.random() * Math.PI * 2), this.dummy.scale.setScalar(a), this.dummy.updateMatrix(), m.setMatrixAt(n, this.dummy.matrix), c.length > 1 && m.setColorAt(n, c[Math.floor(Math.random() * c.length)]);
1160
+ let e = t + Math.random() * f;
1161
+ ut(d).multiplyScalar(e);
1162
+ let a = e * (r + Math.random() * (i - r)) / h;
1163
+ this.baseScales && (this.baseScales[n] = a), this.twinklePhases && (this.twinklePhases[n] = Math.random() * Math.PI * 2), this.dummy.position.copy(d), this.dummy.lookAt(lt), this.dummy.rotateZ(c + Math.random() * l), this.dummy.scale.setScalar(a), this.dummy.updateMatrix(), g.setMatrixAt(n, this.dummy.matrix), u.length > 1 && g.setColorAt(n, u[Math.floor(Math.random() * u.length)]);
1193
1164
  }
1194
- return m.instanceMatrix.needsUpdate = !0, m.instanceColor && (m.instanceColor.needsUpdate = !0), m;
1165
+ return g.instanceMatrix.needsUpdate = !0, g.instanceColor && (g.instanceColor.needsUpdate = !0), g;
1195
1166
  }
1196
- }, pt = class extends O {
1167
+ }, mt = class extends A {
1197
1168
  wisps = [];
1198
1169
  orbGeometry;
1199
1170
  orbMaterial;
@@ -1214,19 +1185,19 @@ var ft = class extends O {
1214
1185
  lightPulseSpeed;
1215
1186
  elapsed = 0;
1216
1187
  constructor({ count: e = 3, width: t = 16, depth: n = 8, heightMin: r = 1, heightMax: i = 2, color: a = 7208880, orbRadius: o = .08, driftX: s = 1.6, driftY: l = .3, driftZ: u = 1.6, speedMin: d = .3, speedMax: f = .7, castLight: p = !0, lightDistance: m = 6, lightDecay: h = 2, lightIntensity: g = 2.5, lightPulseAmplitude: _ = 1.2, lightPulseSpeed: v = 3 } = {}) {
1217
- super(), this.halfWidth = t / 2, this.depth = n, this.heightMin = r, this.heightMax = i, this.driftX = s, this.driftY = l, this.driftZ = u, this.speedMin = d, this.speedMax = f, this.castLight = p, this.lightDistance = m, this.lightDecay = h, this.lightIntensity = g, this.lightPulseAmplitude = _, this.lightPulseSpeed = v, this.orbGeometry = new P(o, 8, 8), this.orbMaterial = new T({
1188
+ super(), this.halfWidth = t / 2, this.depth = n, this.heightMin = r, this.heightMax = i, this.driftX = s, this.driftY = l, this.driftZ = u, this.speedMin = d, this.speedMax = f, this.castLight = p, this.lightDistance = m, this.lightDecay = h, this.lightIntensity = g, this.lightPulseAmplitude = _, this.lightPulseSpeed = v, this.orbGeometry = new F(o, 8, 8), this.orbMaterial = new E({
1218
1189
  color: new c(a),
1219
1190
  toneMapped: !1
1220
1191
  });
1221
1192
  for (let t = 0; t < e; t++) {
1222
- let e = new I(K(-this.halfWidth, this.halfWidth), K(this.heightMin, this.heightMax), K(0, this.depth)), t = new w(this.orbGeometry, this.orbMaterial);
1193
+ let e = new L(q(-this.halfWidth, this.halfWidth), q(this.heightMin, this.heightMax), q(0, this.depth)), t = new T(this.orbGeometry, this.orbMaterial);
1223
1194
  t.position.copy(e), this.add(t);
1224
1195
  let n;
1225
1196
  p && (n = new te(a, 3, this.lightDistance, this.lightDecay), t.add(n)), this.wisps.push({
1226
1197
  orb: t,
1227
1198
  home: e,
1228
- phase: K(0, Math.PI * 2),
1229
- speed: K(this.speedMin, this.speedMax),
1199
+ phase: q(0, Math.PI * 2),
1200
+ speed: q(this.speedMin, this.speedMax),
1230
1201
  light: n
1231
1202
  });
1232
1203
  }
@@ -1243,7 +1214,7 @@ var ft = class extends O {
1243
1214
  for (let e of this.wisps) e.light?.dispose();
1244
1215
  this.clear(), this.wisps.length = 0;
1245
1216
  }
1246
- }, mt = class extends i {
1217
+ }, ht = class extends i {
1247
1218
  width;
1248
1219
  height;
1249
1220
  depth;
@@ -1790,26 +1761,26 @@ var ft = class extends O {
1790
1761
  ], y = new Float32Array(p), b = new Float32Array(m), x = new Float32Array(_), S = new Uint16Array(v), C = new i();
1791
1762
  C.setAttribute("position", new r(y, 3)), C.setAttribute("normal", new r(b, 3)), C.setAttribute("uv", new r(x, 2)), C.setIndex(new r(S, 1));
1792
1763
  let w = new n(e - d - f, l - f * 2, u - d * 2);
1793
- w.translate((e - d - f) / 2 + d, l / 2, -u / 2), this.copy(L([C, w], !0));
1764
+ w.translate((e - d - f) / 2 + d, l / 2, -u / 2), this.copy(R([C, w], !0));
1794
1765
  }
1795
- }, ht = .5, gt = Math.PI / 2;
1796
- function _t({ scaleXMin: e = .4, scaleXMax: t = .7, scaleYMin: n = .3, scaleYMax: r = .95, scaleZMin: i = .1, scaleZMax: a = .5, source: o }) {
1797
- return new I(K(e, t, o), Be(.25, n, r, o), Ve(.8, i, a, o));
1766
+ }, gt = .5, _t = Math.PI / 2;
1767
+ function vt({ scaleXMin: e = .4, scaleXMax: t = .7, scaleYMin: n = .3, scaleYMax: r = .95, scaleZMin: i = .1, scaleZMax: a = .5, source: o }) {
1768
+ return new L(q(e, t, o), Ve(.25, n, r, o), He(.8, i, a, o));
1798
1769
  }
1799
- function vt({ coverMaterial: e, pagesMaterial: t, scales: n, source: r }) {
1800
- let i = new b(new mt(), [e, t], n.length), a = new C(), o = 0;
1770
+ function yt({ coverMaterial: e, pagesMaterial: t, scales: n, source: r }) {
1771
+ let i = new x(new ht(), [e, t], n.length), a = new w(), o = 0;
1801
1772
  for (let e = 0; e < n.length; e++) {
1802
- let t = n[e], s = new C();
1773
+ let t = n[e], s = new w();
1803
1774
  s.makeScale(t.x, t.y, t.z), a.identity(), a.multiply(s), a.setPosition(.01 + r.float(0, .1), 0, o + t.z * .5), i.setMatrixAt(e, a), o += t.z * .5;
1804
1775
  }
1805
1776
  return i;
1806
1777
  }
1807
- function yt({ coverMaterial: e, pagesMaterial: t, count: n = 10, scaleXMin: r = .4, scaleXMax: i = .7, scaleYMin: a = .3, scaleYMax: o = .95, scaleZMin: s = .1, scaleZMax: c = .5, seed: l }) {
1808
- let u = G(l);
1809
- return vt({
1778
+ function bt({ coverMaterial: e, pagesMaterial: t, count: n = 10, scaleXMin: r = .4, scaleXMax: i = .7, scaleYMin: a = .3, scaleYMax: o = .95, scaleZMin: s = .1, scaleZMax: c = .5, seed: l }) {
1779
+ let u = K(l);
1780
+ return yt({
1810
1781
  coverMaterial: e,
1811
1782
  pagesMaterial: t,
1812
- scales: Array.from({ length: n }, () => _t({
1783
+ scales: Array.from({ length: n }, () => vt({
1813
1784
  scaleXMin: r,
1814
1785
  scaleXMax: i,
1815
1786
  scaleYMin: a,
@@ -1821,10 +1792,10 @@ function yt({ coverMaterial: e, pagesMaterial: t, count: n = 10, scaleXMin: r =
1821
1792
  source: u
1822
1793
  });
1823
1794
  }
1824
- function bt({ coverMaterial: e, pagesMaterial: t, length: n = 10, scaleXMin: r = .4, scaleXMax: i = .7, scaleYMin: a = .3, scaleYMax: o = .95, scaleZMin: s = .1, scaleZMax: c = .5, seed: l }) {
1825
- let u = G(l), d = [], f = n;
1795
+ function xt({ coverMaterial: e, pagesMaterial: t, length: n = 10, scaleXMin: r = .4, scaleXMax: i = .7, scaleYMin: a = .3, scaleYMax: o = .95, scaleZMin: s = .1, scaleZMax: c = .5, seed: l }) {
1796
+ let u = K(l), d = [], f = n;
1826
1797
  for (; f > 0;) {
1827
- let e = _t({
1798
+ let e = vt({
1828
1799
  scaleXMin: r,
1829
1800
  scaleXMax: i,
1830
1801
  scaleYMin: a,
@@ -1835,17 +1806,17 @@ function bt({ coverMaterial: e, pagesMaterial: t, length: n = 10, scaleXMin: r =
1835
1806
  });
1836
1807
  e.z = Math.min(e.z, f), d.push(e), f -= e.z;
1837
1808
  }
1838
- return vt({
1809
+ return yt({
1839
1810
  coverMaterial: e,
1840
1811
  pagesMaterial: t,
1841
1812
  scales: d,
1842
1813
  source: u
1843
1814
  });
1844
1815
  }
1845
- function xt({ coverMaterial: e, pagesMaterial: t, count: n = 6, scaleXMin: r = .4, scaleXMax: i = .7, scaleYMin: a = .3, scaleYMax: o = .95, scaleZMin: s = .1, scaleZMax: c = .5, yawMax: l = .55, offsetMax: u = .06, seed: d }) {
1846
- let f = G(d), p = new mt(), m = new b(p, [e, t], n), h = new C(), g = new I(), _ = new M(), v = new M().setFromAxisAngle(new I(1, 0, 0), gt), y = new M(), x = new I(), S = new I(p.width * .5, p.height * .5, -p.depth * .5), w = new I(), T = new I(), E = 0;
1816
+ function St({ coverMaterial: e, pagesMaterial: t, count: n = 6, scaleXMin: r = .4, scaleXMax: i = .7, scaleYMin: a = .3, scaleYMax: o = .95, scaleZMin: s = .1, scaleZMax: c = .5, yawMax: l = .55, offsetMax: u = .06, seed: d }) {
1817
+ let f = K(d), p = new ht(), m = new x(p, [e, t], n), h = new w(), g = new L(), _ = new N(), v = new N().setFromAxisAngle(new L(1, 0, 0), _t), y = new N(), b = new L(), S = new L(p.width * .5, p.height * .5, -p.depth * .5), C = new L(), T = new L(), E = 0;
1847
1818
  for (let e = 0; e < n; e++) {
1848
- let t = _t({
1819
+ let t = vt({
1849
1820
  scaleXMin: r,
1850
1821
  scaleXMax: i,
1851
1822
  scaleYMin: a,
@@ -1854,15 +1825,15 @@ function xt({ coverMaterial: e, pagesMaterial: t, count: n = 6, scaleXMin: r = .
1854
1825
  scaleZMax: c,
1855
1826
  source: f
1856
1827
  });
1857
- x.copy(t);
1858
- let n = ht * t.z;
1859
- y.setFromAxisAngle(new I(0, 1, 0), f.float(-l, l)), _.copy(v).premultiply(y), w.copy(S).multiply(x), T.copy(w).applyQuaternion(_), g.set(f.float(-u, u), E + n * .5, f.float(-u, u)), g.sub(T), h.compose(g, _, x), m.setMatrixAt(e, h), E += n;
1828
+ b.copy(t);
1829
+ let n = gt * t.z;
1830
+ y.setFromAxisAngle(new L(0, 1, 0), f.float(-l, l)), _.copy(v).premultiply(y), C.copy(S).multiply(b), T.copy(C).applyQuaternion(_), g.set(f.float(-u, u), E + n * .5, f.float(-u, u)), g.sub(T), h.compose(g, _, b), m.setMatrixAt(e, h), E += n;
1860
1831
  }
1861
1832
  return m.instanceMatrix.needsUpdate = !0, m;
1862
1833
  }
1863
1834
  //#endregion
1864
1835
  //#region src/utils/CoherentNoise.ts
1865
- function q(e, t, n) {
1836
+ function Ct(e, t, n) {
1866
1837
  let r = Math.imul(e | 0, 374761393) ^ Math.imul(t | 0, 668265263) ^ Math.imul(n | 0, 362437);
1867
1838
  return r = Math.imul(r ^ r >>> 13, 1274126177), r ^= r >>> 16, (r >>> 0) / 4294967296;
1868
1839
  }
@@ -1871,38 +1842,38 @@ function J(e, t, n, r) {
1871
1842
  return i = Math.imul(i ^ i >>> 13, 1274126177), i ^= i >>> 16, (i >>> 0) / 4294967296;
1872
1843
  }
1873
1844
  var Y = (e) => e * e * (3 - 2 * e);
1874
- function St(e, t, n) {
1875
- let r = Math.floor(e), i = Math.floor(t), a = Y(e - r), o = Y(t - i), s = q(r, i, n), c = q(r + 1, i, n), l = q(r, i + 1, n), u = q(r + 1, i + 1, n), d = s + (c - s) * a;
1845
+ function wt(e, t, n) {
1846
+ let r = Math.floor(e), i = Math.floor(t), a = Y(e - r), o = Y(t - i), s = Ct(r, i, n), c = Ct(r + 1, i, n), l = Ct(r, i + 1, n), u = Ct(r + 1, i + 1, n), d = s + (c - s) * a;
1876
1847
  return d + (l + (u - l) * a - d) * o;
1877
1848
  }
1878
- function Ct(e, t, n, r) {
1849
+ function Tt(e, t, n, r) {
1879
1850
  let i = Math.floor(e), a = Math.floor(t), o = Math.floor(n), s = Y(e - i), c = Y(t - a), l = Y(n - o), u = J(i, a, o, r), d = J(i + 1, a, o, r), f = J(i, a + 1, o, r), p = J(i + 1, a + 1, o, r), m = J(i, a, o + 1, r), h = J(i + 1, a, o + 1, r), g = J(i, a + 1, o + 1, r), _ = J(i + 1, a + 1, o + 1, r), v = u + (d - u) * s, y = f + (p - f) * s, b = m + (h - m) * s, x = g + (_ - g) * s, S = v + (y - v) * c;
1880
1851
  return S + (b + (x - b) * c - S) * l;
1881
1852
  }
1882
- function wt(e, t, n, r, i) {
1853
+ function Et(e, t, n, r, i) {
1883
1854
  let a = 0, o = 1, s = 1, c = 0;
1884
- for (let l = 0; l < r; l++) a += (St(e * s, t * s, n + l * 101) * 2 - 1) * o, c += o, o *= i, s *= 2;
1855
+ for (let l = 0; l < r; l++) a += (wt(e * s, t * s, n + l * 101) * 2 - 1) * o, c += o, o *= i, s *= 2;
1885
1856
  return c > 0 ? a / c : 0;
1886
1857
  }
1887
- function Tt(e, t, n, r, i, a) {
1858
+ function Dt(e, t, n, r, i, a) {
1888
1859
  let o = 0, s = 1, c = 1, l = 0;
1889
- for (let u = 0; u < i; u++) o += (Ct(e * c, t * c, n * c, r + u * 101) * 2 - 1) * s, l += s, s *= a, c *= 2;
1860
+ for (let u = 0; u < i; u++) o += (Tt(e * c, t * c, n * c, r + u * 101) * 2 - 1) * s, l += s, s *= a, c *= 2;
1890
1861
  return l > 0 ? o / l : 0;
1891
1862
  }
1892
1863
  //#endregion
1893
1864
  //#region src/geometry/rocks/BoulderGeometry.ts
1894
- var Et = class extends i {
1865
+ var Ot = class extends i {
1895
1866
  radius;
1896
1867
  constructor({ radius: e = 1, detail: t = 2, noiseHeight: n = .35, noiseScale: r = 1.6, octaves: i = 3, persistence: a = .5, seed: o = 1 } = {}) {
1897
1868
  super(), this.radius = e;
1898
1869
  let s = new y(e, t);
1899
1870
  s.deleteAttribute("uv"), s.deleteAttribute("normal");
1900
- let c = de(s);
1871
+ let c = fe(s);
1901
1872
  s.dispose();
1902
- let l = c.getAttribute("position"), u = new I(), d = r / e;
1873
+ let l = c.getAttribute("position"), u = new L(), d = r / e;
1903
1874
  for (let e = 0; e < l.count; e++) {
1904
1875
  u.fromBufferAttribute(l, e);
1905
- let t = Tt(u.x * d, u.y * d, u.z * d, o, i, a), r = u.length() || 1, s = (r + t * n) / r;
1876
+ let t = Dt(u.x * d, u.y * d, u.z * d, o, i, a), r = u.length() || 1, s = (r + t * n) / r;
1906
1877
  l.setXYZ(e, u.x * s, u.y * s, u.z * s);
1907
1878
  }
1908
1879
  l.needsUpdate = !0, c.computeVertexNormals(), c.center(), this.copy(c), c.dispose();
@@ -1910,14 +1881,14 @@ var Et = class extends i {
1910
1881
  };
1911
1882
  //#endregion
1912
1883
  //#region src/factory/BoulderFactory.ts
1913
- function Dt({ count: e = 8, width: t = 6, depth: n = 6, heightJitter: r = 0, scaleMin: i = .8, scaleMax: a = 1.2, seed: o, radius: s = 1, detail: l = 2, noiseHeight: u = .35, noiseScale: d = 1.6, octaves: f = 3, persistence: p = .5, variants: m = 4, material: g, color: _ = "#6f6f6f" } = {}) {
1914
- let y = G(o), x = Math.max(1, Math.min(Math.round(m), Math.max(1, e))), S = g ?? new D({
1884
+ function kt({ count: e = 8, width: t = 6, depth: n = 6, heightJitter: r = 0, scaleMin: i = .8, scaleMax: a = 1.2, seed: o, radius: s = 1, detail: l = 2, noiseHeight: u = .35, noiseScale: d = 1.6, octaves: f = 3, persistence: p = .5, variants: m = 4, material: g, color: _ = "#6f6f6f" } = {}) {
1885
+ let y = K(o), b = Math.max(1, Math.min(Math.round(m), Math.max(1, e))), S = g ?? new O({
1915
1886
  color: new c(_),
1916
1887
  roughness: 1,
1917
1888
  metalness: 0,
1918
1889
  flatShading: !0
1919
- }), w = [];
1920
- for (let e = 0; e < x; e++) w.push(new Et({
1890
+ }), C = [];
1891
+ for (let e = 0; e < b; e++) C.push(new Ot({
1921
1892
  radius: s,
1922
1893
  detail: l,
1923
1894
  noiseHeight: u,
@@ -1926,22 +1897,22 @@ function Dt({ count: e = 8, width: t = 6, depth: n = 6, heightJitter: r = 0, sca
1926
1897
  persistence: p,
1927
1898
  seed: y.int(0, 1e6)
1928
1899
  }));
1929
- let T = Array(x).fill(0);
1930
- for (let t = 0; t < e; t++) T[t % x]++;
1931
- let E = w.map((e, t) => new b(e, S, T[t])), ee = Array(x).fill(0), O = new C(), k = new I(), A = new M(), j = new I(), te = new h();
1900
+ let T = Array(b).fill(0);
1901
+ for (let t = 0; t < e; t++) T[t % b]++;
1902
+ let E = C.map((e, t) => new x(e, S, T[t])), D = Array(b).fill(0), k = new w(), A = new L(), ee = new N(), j = new L(), M = new h();
1932
1903
  for (let o = 0; o < e; o++) {
1933
1904
  let e = y.float(i, a);
1934
- j.set(e, e, e), te.set(y.float(0, Math.PI * 2), y.float(0, Math.PI * 2), y.float(0, Math.PI * 2)), A.setFromEuler(te), k.set(y.float(-t / 2, t / 2), y.float(0, r), y.float(-n / 2, n / 2)), O.compose(k, A, j);
1935
- let s = o % x;
1936
- E[s].setMatrixAt(ee[s]++, O);
1905
+ j.set(e, e, e), M.set(y.float(0, Math.PI * 2), y.float(0, Math.PI * 2), y.float(0, Math.PI * 2)), ee.setFromEuler(M), A.set(y.float(-t / 2, t / 2), y.float(0, r), y.float(-n / 2, n / 2)), k.compose(A, ee, j);
1906
+ let s = o % b;
1907
+ E[s].setMatrixAt(D[s]++, k);
1937
1908
  }
1938
- let ne = new v();
1939
- for (let e of E) e.instanceMatrix.needsUpdate = !0, e.castShadow = !0, e.receiveShadow = !0, ne.add(e);
1940
- return ne;
1909
+ let te = new v();
1910
+ for (let e of E) e.instanceMatrix.needsUpdate = !0, e.castShadow = !0, e.receiveShadow = !0, te.add(e);
1911
+ return te;
1941
1912
  }
1942
1913
  //#endregion
1943
1914
  //#region src/shapes/HexagonShape.ts
1944
- var Ot = class extends N {
1915
+ var At = class extends P {
1945
1916
  constructor(e = 1) {
1946
1917
  super();
1947
1918
  for (let t = 0; t < 6; t++) {
@@ -1950,11 +1921,11 @@ var Ot = class extends N {
1950
1921
  }
1951
1922
  this.closePath();
1952
1923
  }
1953
- }, kt = class extends g {
1924
+ }, jt = class extends g {
1954
1925
  radius;
1955
1926
  depth;
1956
1927
  constructor({ radius: e = 1, depth: t = .01 } = {}) {
1957
- super(new Ot(e), {
1928
+ super(new At(e), {
1958
1929
  depth: t,
1959
1930
  bevelEnabled: !1
1960
1931
  }), this.radius = e, this.depth = t;
@@ -1962,26 +1933,26 @@ var Ot = class extends N {
1962
1933
  };
1963
1934
  //#endregion
1964
1935
  //#region src/factory/HexagonalTileFactory.ts
1965
- function At(e) {
1966
- let { width: t, depth: n, height: r, count: i, gap: a, material: o } = e, s = o || new D({ color: 16777215 }), c = t / i, l = (c - a) * 2 / 3, u = Math.sqrt(3) * l + a, d = Math.floor(n / u), f = i * d, p = new kt({
1936
+ function Mt(e) {
1937
+ let { width: t, depth: n, height: r, count: i, gap: a, material: o } = e, s = o || new O({ color: 16777215 }), c = t / i, l = (c - a) * 2 / 3, u = Math.sqrt(3) * l + a, d = Math.floor(n / u), f = i * d, p = new jt({
1967
1938
  radius: l,
1968
1939
  depth: r
1969
1940
  });
1970
1941
  p.rotateX(-Math.PI / 2);
1971
- let m = new b(p, s, f), h = new O(), g = 0;
1942
+ let m = new x(p, s, f), h = new A(), g = 0;
1972
1943
  for (let e = 0; e < i; e++) for (let t = 0; t < d; t++) {
1973
1944
  let n = e * c, r = t * u + e % 2 * (u / 2), a = n - i * c / 2 + c / 2, o = r - d * u / 2 + u / 2;
1974
1945
  h.position.set(a, 0, o), h.updateMatrix(), m.setMatrixAt(g++, h.matrix);
1975
1946
  }
1976
1947
  return m.instanceMatrix.needsUpdate = !0, m;
1977
1948
  }
1978
- function jt(e) {
1979
- let { width: t, depth: n, height: r, radius: i, gap: a, material: o } = e, s = o || new D({ color: 16777215 }), c = i * 3 / 2 + a, l = Math.sqrt(3) * i + a, u = Math.floor(t / c), d = Math.floor(n / l), f = u * d, p = new kt({
1949
+ function Nt(e) {
1950
+ let { width: t, depth: n, height: r, radius: i, gap: a, material: o } = e, s = o || new O({ color: 16777215 }), c = i * 3 / 2 + a, l = Math.sqrt(3) * i + a, u = Math.floor(t / c), d = Math.floor(n / l), f = u * d, p = new jt({
1980
1951
  radius: i,
1981
1952
  depth: r
1982
1953
  });
1983
1954
  p.rotateX(-Math.PI / 2);
1984
- let m = new b(p, s, f), h = new O(), g = 0;
1955
+ let m = new x(p, s, f), h = new A(), g = 0;
1985
1956
  for (let e = 0; e < u; e++) for (let t = 0; t < d; t++) {
1986
1957
  let n = e * c, r = t * l + e % 2 * (l / 2), i = n - u * c / 2 + c / 2, a = r - d * l / 2 + l / 2;
1987
1958
  h.position.set(i, 0, a), h.updateMatrix(), m.setMatrixAt(g++, h.matrix);
@@ -1990,55 +1961,55 @@ function jt(e) {
1990
1961
  }
1991
1962
  //#endregion
1992
1963
  //#region src/geometry/rocks/MossyRockGeometry.ts
1993
- var Mt = class extends i {
1964
+ var Pt = class extends i {
1994
1965
  radius;
1995
1966
  detail;
1996
1967
  constructor({ radius: e = 1, detail: t = 0, mossScaleXZ: n = .9, mossScaleY: r = .5, mossOffsetY: i = .3 } = {}) {
1997
1968
  super(), this.radius = e, this.detail = t;
1998
1969
  let a = new f(e, t), o = new f(e, t);
1999
- o.scale(n, r, n), o.translate(0, i, 0), this.copy(L([a, o], !0)), this.computeVertexNormals();
1970
+ o.scale(n, r, n), o.translate(0, i, 0), this.copy(R([a, o], !0)), this.computeVertexNormals();
2000
1971
  }
2001
1972
  };
2002
1973
  //#endregion
2003
1974
  //#region src/utils/VertexUtils.ts
2004
- function Nt(e, t = ke.XYZ, n = .5, r = 2) {
2005
- e.deleteAttribute("uv"), e.deleteAttribute("normal"), e = de(e), e.computeVertexNormals();
1975
+ function Ft(e, t = Ae.XYZ, n = .5, r = 2) {
1976
+ e.deleteAttribute("uv"), e.deleteAttribute("normal"), e = fe(e), e.computeVertexNormals();
2006
1977
  let i = e.getAttribute("position");
2007
1978
  for (let e = 0; e < i.count; e++) {
2008
- let a = new I().fromBufferAttribute(i, e), o = Math.random() * (r - n) + n, s = t.clone().multiplyScalar(o);
1979
+ let a = new L().fromBufferAttribute(i, e), o = Math.random() * (r - n) + n, s = t.clone().multiplyScalar(o);
2009
1980
  a.add(s), i.setXYZ(e, a.x, a.y, a.z);
2010
1981
  }
2011
1982
  return i.needsUpdate = !0, e.computeVertexNormals(), e;
2012
1983
  }
2013
1984
  //#endregion
2014
1985
  //#region src/geometry/rocks/RockGeometry.ts
2015
- var Pt = class extends i {
1986
+ var It = class extends i {
2016
1987
  radius;
2017
1988
  widthSegments;
2018
1989
  heightSegments;
2019
1990
  constructor({ radius: e = 1, widthSegments: t = 4, heightSegments: n = 4 } = {}) {
2020
1991
  super(), this.radius = e, this.widthSegments = t, this.heightSegments = n;
2021
- let r = new P(e, t, n);
2022
- this.copy(Nt(r, ke.XYZ, .5, 1)), this.computeVertexNormals(), this.center();
1992
+ let r = new F(e, t, n);
1993
+ this.copy(Ft(r, Ae.XYZ, .5, 1)), this.computeVertexNormals(), this.center();
2023
1994
  }
2024
1995
  };
2025
1996
  //#endregion
2026
1997
  //#region src/factory/RockFactory.ts
2027
- function Ft(e, { count: t = 5, width: n = 4, depth: r = 4, heightJitter: i = 0, scaleMin: a = .8, scaleMax: o = 1.2, seed: s }) {
2028
- let c = G(s), l = new C(), u = new I(), d = new M(), f = new I(), p = new h();
1998
+ function Lt(e, { count: t = 5, width: n = 4, depth: r = 4, heightJitter: i = 0, scaleMin: a = .8, scaleMax: o = 1.2, seed: s }) {
1999
+ let c = K(s), l = new w(), u = new L(), d = new N(), f = new L(), p = new h();
2029
2000
  for (let s = 0; s < t; s++) f.set(c.float(a, o), c.float(a, o), c.float(a, o)), p.set(c.float(0, Math.PI), c.float(0, Math.PI), c.float(0, Math.PI)), d.setFromEuler(p), u.set(c.float(-n / 2, n / 2), c.float(0, i), c.float(-r / 2, r / 2)), l.compose(u, d, f), e.setMatrixAt(s, l);
2030
2001
  e.instanceMatrix.needsUpdate = !0;
2031
2002
  }
2032
- function It({ count: e = 5, width: t = 4, depth: n = 4, heightJitter: r = 0, scaleMin: i = .8, scaleMax: a = 1.2, seed: o, radius: s = 1, widthSegments: l = 4, heightSegments: u = 4, material: d, color: f = "#808080" } = {}) {
2033
- let p = d ?? new D({
2003
+ function Rt({ count: e = 5, width: t = 4, depth: n = 4, heightJitter: r = 0, scaleMin: i = .8, scaleMax: a = 1.2, seed: o, radius: s = 1, widthSegments: l = 4, heightSegments: u = 4, material: d, color: f = "#808080" } = {}) {
2004
+ let p = d ?? new O({
2034
2005
  color: new c(f),
2035
2006
  flatShading: !0
2036
- }), m = new b(new Pt({
2007
+ }), m = new x(new It({
2037
2008
  radius: s,
2038
2009
  widthSegments: l,
2039
2010
  heightSegments: u
2040
2011
  }), p, e);
2041
- return Ft(m, {
2012
+ return Lt(m, {
2042
2013
  count: e,
2043
2014
  width: t,
2044
2015
  depth: n,
@@ -2048,23 +2019,23 @@ function It({ count: e = 5, width: t = 4, depth: n = 4, heightJitter: r = 0, sca
2048
2019
  seed: o
2049
2020
  }), m;
2050
2021
  }
2051
- function Lt({ count: e = 5, width: t = 4, depth: n = 4, heightJitter: r = 0, scaleMin: i = .8, scaleMax: a = 1.2, seed: o, radius: s = 1, detail: l = 0, mossScaleXZ: u = .9, mossScaleY: d = .5, mossOffsetY: f = .3, rockMaterial: p, mossMaterial: m, rockColor: h = "#808080", mossColor: g = "#4b8b3b", mossOpacity: _ = .8 } = {}) {
2052
- let v = [p ?? new D({
2022
+ function zt({ count: e = 5, width: t = 4, depth: n = 4, heightJitter: r = 0, scaleMin: i = .8, scaleMax: a = 1.2, seed: o, radius: s = 1, detail: l = 0, mossScaleXZ: u = .9, mossScaleY: d = .5, mossOffsetY: f = .3, rockMaterial: p, mossMaterial: m, rockColor: h = "#808080", mossColor: g = "#4b8b3b", mossOpacity: _ = .8 } = {}) {
2023
+ let v = [p ?? new O({
2053
2024
  color: new c(h),
2054
2025
  flatShading: !0
2055
- }), m ?? new D({
2026
+ }), m ?? new O({
2056
2027
  color: new c(g),
2057
2028
  flatShading: !0,
2058
2029
  opacity: _,
2059
2030
  transparent: _ < 1
2060
- })], y = new b(new Mt({
2031
+ })], y = new x(new Pt({
2061
2032
  radius: s,
2062
2033
  detail: l,
2063
2034
  mossScaleXZ: u,
2064
2035
  mossScaleY: d,
2065
2036
  mossOffsetY: f
2066
2037
  }), v, e);
2067
- return Ft(y, {
2038
+ return Lt(y, {
2068
2039
  count: e,
2069
2040
  width: t,
2070
2041
  depth: n,
@@ -2076,10 +2047,10 @@ function Lt({ count: e = 5, width: t = 4, depth: n = 4, heightJitter: r = 0, sca
2076
2047
  }
2077
2048
  //#endregion
2078
2049
  //#region src/geometry/architecture/diamondLattice.ts
2079
- function Rt(e, t) {
2050
+ function Bt(e, t) {
2080
2051
  return (e / 2 + t / 2) / Math.SQRT2;
2081
2052
  }
2082
- function zt(e, t, n, r) {
2053
+ function Vt(e, t, n, r) {
2083
2054
  let i = Math.max(1, Math.round(n)), a = Math.max(1, Math.round(r)), o = e / (2 * i), s = t / (2 * a);
2084
2055
  return {
2085
2056
  a: o,
@@ -2088,30 +2059,30 @@ function zt(e, t, n, r) {
2088
2059
  spacing: 2 * o * s / Math.hypot(o, s)
2089
2060
  };
2090
2061
  }
2091
- function Bt(e, t, n) {
2092
- let r = Rt(e, t);
2062
+ function Ht(e, t, n) {
2063
+ let r = Bt(e, t);
2093
2064
  return r / Math.max(2, Math.round(r / n));
2094
2065
  }
2095
- function Vt(e, t, n) {
2096
- return Rt(e, t) / Math.max(2, n);
2066
+ function Ut(e, t, n) {
2067
+ return Bt(e, t) / Math.max(2, n);
2097
2068
  }
2098
- function Ht({ width: e, height: t, centerY: r = 0, grid: i, leadThickness: a, leadDepth: o }) {
2069
+ function Wt({ width: e, height: t, centerY: r = 0, grid: i, leadThickness: a, leadDepth: o }) {
2099
2070
  let s = e / 2, c = t / 2, l = [
2100
2071
  new n(e + a, a, o).translate(0, r - c, 0),
2101
2072
  new n(e + a, a, o).translate(0, r + c, 0),
2102
2073
  new n(a, t + a, o).translate(-s, r, 0),
2103
2074
  new n(a, t + a, o).translate(s, r, 0)
2104
2075
  ];
2105
- return Wt(l, e, t, r, i.spacing, a, o, i.angle), Wt(l, e, t, r, i.spacing, a, o, -i.angle), l;
2076
+ return Kt(l, e, t, r, i.spacing, a, o, i.angle), Kt(l, e, t, r, i.spacing, a, o, -i.angle), l;
2106
2077
  }
2107
- function Ut(e) {
2078
+ function Gt(e) {
2108
2079
  let { width: t, height: n, centerY: r = 0, grid: i, leadThickness: a, leadDepth: o } = e, s = [];
2109
- return Wt(s, t, n, r, i.spacing, a, o, i.angle), Wt(s, t, n, r, i.spacing, a, o, -i.angle), s;
2080
+ return Kt(s, t, n, r, i.spacing, a, o, i.angle), Kt(s, t, n, r, i.spacing, a, o, -i.angle), s;
2110
2081
  }
2111
- function Wt(e, t, r, i, a, o, s, c) {
2082
+ function Kt(e, t, r, i, a, o, s, c) {
2112
2083
  let l = t / 2, u = r / 2, d = -l, f = l, p = i - u, m = i + u, h = Math.hypot(t, r) + o, g = -Math.sin(c), _ = Math.cos(c), v = Math.ceil(Math.hypot(t, r) / a) + 2;
2113
2084
  for (let t = -v; t <= v; t++) {
2114
- let r = g * t * a, l = i + _ * t * a, u = Math.cos(c) * h * .5, v = Math.sin(c) * h * .5, y = Gt(r - u, l - v, r + u, l + v, d, p, f, m);
2085
+ let r = g * t * a, l = i + _ * t * a, u = Math.cos(c) * h * .5, v = Math.sin(c) * h * .5, y = qt(r - u, l - v, r + u, l + v, d, p, f, m);
2115
2086
  if (!y) continue;
2116
2087
  let [b, x, S, C] = y, w = Math.hypot(S - b, C - x);
2117
2088
  if (w < 1e-6) continue;
@@ -2119,7 +2090,7 @@ function Wt(e, t, r, i, a, o, s, c) {
2119
2090
  T.rotateZ(c), T.translate((b + S) / 2, (x + C) / 2, 0), e.push(T);
2120
2091
  }
2121
2092
  }
2122
- function Gt(e, t, n, r, i, a, o, s) {
2093
+ function qt(e, t, n, r, i, a, o, s) {
2123
2094
  let c = n - e, l = r - t, u = 0, d = 1, f = [[
2124
2095
  e,
2125
2096
  c,
@@ -2158,7 +2129,7 @@ function X({ width: e, rectHeight: t, archHeight: n = e / 2, centerY: r = 0 }) {
2158
2129
  centerY: r
2159
2130
  };
2160
2131
  }
2161
- function Kt(e, t, { hole: n = !1 } = {}) {
2132
+ function Jt(e, t, { hole: n = !1 } = {}) {
2162
2133
  let { hw: r, ymin: i, rectTopY: a, archCy: o, archRadius: s } = t, c = Math.atan2(a - o, -r), l = Math.atan2(a - o, r);
2163
2134
  if (!n) {
2164
2135
  e.moveTo(-r, i), e.lineTo(r, i), e.lineTo(r, a), e.absarc(0, o, s, l, c, !1), e.lineTo(-r, a), e.closePath();
@@ -2166,7 +2137,7 @@ function Kt(e, t, { hole: n = !1 } = {}) {
2166
2137
  }
2167
2138
  e.moveTo(-r, i), e.lineTo(-r, a), e.absarc(0, o, s, c, l, !0), e.lineTo(r, a), e.lineTo(r, i), e.closePath();
2168
2139
  }
2169
- function qt(e, t) {
2140
+ function Yt(e, t) {
2170
2141
  let n = Math.max(e.hw - t, t), r = e.ymin + t, i = e.rectTopY - t, a = Math.max(e.archHeight - t, t), o = (n * n + a * a) / (2 * a), s = i + a - o, c = i + a;
2171
2142
  return {
2172
2143
  hw: n,
@@ -2180,30 +2151,30 @@ function qt(e, t) {
2180
2151
  centerY: (r + c) / 2
2181
2152
  };
2182
2153
  }
2183
- var Jt = 48;
2184
- function Yt(e, t, n) {
2185
- let r = new N();
2186
- Kt(r, e);
2187
- let i = new A();
2188
- Kt(i, qt(e, t), { hole: !0 }), r.holes.push(i);
2154
+ var Xt = 48;
2155
+ function Zt(e, t, n) {
2156
+ let r = new P();
2157
+ Jt(r, e);
2158
+ let i = new j();
2159
+ Jt(i, Yt(e, t), { hole: !0 }), r.holes.push(i);
2189
2160
  let a = new g(r, {
2190
2161
  depth: n,
2191
2162
  bevelEnabled: !1,
2192
- curveSegments: Jt
2163
+ curveSegments: Xt
2193
2164
  });
2194
2165
  return a.translate(0, 0, -n / 2), a;
2195
2166
  }
2196
- function Xt(e, t, n) {
2167
+ function Qt(e, t, n) {
2197
2168
  let r = 2 * n.b, i = t - e;
2198
2169
  return Math.round(i / r) * r - i;
2199
2170
  }
2200
- function Zt(e, t, { hw: n, ymin: r, ymax: i, rectTopY: a, archCy: o, archRadius: s }, c = 1e-6) {
2171
+ function $t(e, t, { hw: n, ymin: r, ymax: i, rectTopY: a, archCy: o, archRadius: s }, c = 1e-6) {
2201
2172
  if (t < r - c || t > i + c) return !1;
2202
2173
  if (t <= a + c) return Math.abs(e) <= n + c;
2203
2174
  let l = e, u = t - o;
2204
2175
  return l * l + u * u <= s * s + c;
2205
2176
  }
2206
- function Qt(e, t, n, r, i) {
2177
+ function en(e, t, n, r, i) {
2207
2178
  let a = /* @__PURE__ */ new Set([0, 1]), o = n - e, s = r - t, { hw: c, ymin: l, ymax: u, rectTopY: d, archCy: f, archRadius: p } = i, m = (e) => {
2208
2179
  e > 1e-9 && e < .999999999 && a.add(e);
2209
2180
  };
@@ -2215,11 +2186,11 @@ function Qt(e, t, n, r, i) {
2215
2186
  }
2216
2187
  return [...a].sort((e, t) => e - t);
2217
2188
  }
2218
- function $t(e, t, n, r, i) {
2219
- let a = X(i), o = Qt(e, t, n, r, a), s = n - e, c = r - t, l = [], u = null, d = 0;
2189
+ function tn(e, t, n, r, i) {
2190
+ let a = X(i), o = en(e, t, n, r, a), s = n - e, c = r - t, l = [], u = null, d = 0;
2220
2191
  for (let n = 0; n < o.length - 1; n++) {
2221
2192
  let r = o[n], i = o[n + 1], f = (r + i) * .5;
2222
- Zt(e + s * f, t + c * f, a) ? (u === null && (u = r), d = i) : u !== null && (l.push([u, d]), u = null);
2193
+ $t(e + s * f, t + c * f, a) ? (u === null && (u = r), d = i) : u !== null && (l.push([u, d]), u = null);
2223
2194
  }
2224
2195
  u !== null && l.push([u, d]);
2225
2196
  let f = null, p = 0;
@@ -2236,7 +2207,7 @@ function $t(e, t, n, r, i) {
2236
2207
  t + c * h
2237
2208
  ];
2238
2209
  }
2239
- function en(e) {
2210
+ function nn(e) {
2240
2211
  return {
2241
2212
  width: 2 * e.hw,
2242
2213
  rectHeight: e.rectTopY - e.ymin,
@@ -2244,23 +2215,23 @@ function en(e) {
2244
2215
  centerY: e.centerY
2245
2216
  };
2246
2217
  }
2247
- function tn(e, t, r, i) {
2218
+ function rn(e, t, r, i) {
2248
2219
  let { hw: a, rectTopY: o, archCy: s, archRadius: c } = t, l = Math.atan2(o - s, -a), u = Math.atan2(o - s, a) - l, d = Math.max(12, Math.ceil(Math.abs(u) * c / (r * 1.8)));
2249
2220
  for (let t = 0; t < d; t++) {
2250
2221
  let a = t / d, o = (t + 1) / d, f = l + u * a, p = l + u * o, m = (f + p) / 2, h = new n(2 * c * Math.sin((p - f) / 2), r, i);
2251
2222
  h.rotateZ(m - Math.PI / 2), h.translate(c * Math.cos(m), s + c * Math.sin(m), 0), e.push(h);
2252
2223
  }
2253
2224
  }
2254
- function nn({ width: e, rectHeight: t, archHeight: n, centerY: r = 0, grid: i, leadThickness: a, leadDepth: o, clipInset: s = 0 }) {
2225
+ function an({ width: e, rectHeight: t, archHeight: n, centerY: r = 0, grid: i, leadThickness: a, leadDepth: o, clipInset: s = 0 }) {
2255
2226
  let c = {
2256
2227
  width: e,
2257
2228
  rectHeight: t,
2258
2229
  archHeight: n,
2259
2230
  centerY: r
2260
- }, l = X(c), u = s > 0 ? en(qt(l, s)) : c, d = [], f = Xt(l.ymin, l.rectTopY, i);
2261
- return an(d, u, l, i, f, a, o, i.angle), an(d, u, l, i, f, a, o, -i.angle), d;
2231
+ }, l = X(c), u = s > 0 ? nn(Yt(l, s)) : c, d = [], f = Qt(l.ymin, l.rectTopY, i);
2232
+ return sn(d, u, l, i, f, a, o, i.angle), sn(d, u, l, i, f, a, o, -i.angle), d;
2262
2233
  }
2263
- function rn(e) {
2234
+ function on(e) {
2264
2235
  let { width: t, rectHeight: r, archHeight: i, centerY: a = 0, leadThickness: o, leadDepth: s } = e, c = X({
2265
2236
  width: t,
2266
2237
  rectHeight: r,
@@ -2271,12 +2242,12 @@ function rn(e) {
2271
2242
  new n(o, f + o, s).translate(-l, u + f / 2, 0),
2272
2243
  new n(o, f + o, s).translate(l, u + f / 2, 0)
2273
2244
  ];
2274
- return tn(p, c, o, s), p.push(...nn(e)), p;
2245
+ return rn(p, c, o, s), p.push(...an(e)), p;
2275
2246
  }
2276
- function an(e, t, r, i, a, o, s, c) {
2247
+ function sn(e, t, r, i, a, o, s, c) {
2277
2248
  let { totalHeight: l, centerY: u } = r, d = i.spacing, f = Math.hypot(t.width, l) + o, p = -Math.sin(c), m = Math.cos(c), h = Math.ceil(Math.hypot(t.width, l) / d) + 2, g = u + a;
2278
2249
  for (let r = -h; r <= h; r++) {
2279
- let i = p * r * d, a = g + m * r * d, l = Math.cos(c) * f * .5, u = Math.sin(c) * f * .5, h = $t(i - l, a - u, i + l, a + u, t);
2250
+ let i = p * r * d, a = g + m * r * d, l = Math.cos(c) * f * .5, u = Math.sin(c) * f * .5, h = tn(i - l, a - u, i + l, a + u, t);
2280
2251
  if (!h) continue;
2281
2252
  let [_, v, y, b] = h, x = Math.hypot(y - _, b - v);
2282
2253
  if (x < 1e-6) continue;
@@ -2286,7 +2257,7 @@ function an(e, t, r, i, a, o, s, c) {
2286
2257
  }
2287
2258
  //#endregion
2288
2259
  //#region src/geometry/architecture/ArchedDiamondLatticeWindowGeometry.ts
2289
- var on = class extends i {
2260
+ var cn = class extends i {
2290
2261
  cellsX;
2291
2262
  cellsY;
2292
2263
  fittedGrid;
@@ -2297,8 +2268,8 @@ var on = class extends i {
2297
2268
  rectHeight: t,
2298
2269
  archHeight: n,
2299
2270
  centerY: s
2300
- }), this.fittedGrid = zt(e, this.opening.totalHeight, this.cellsX, this.cellsY);
2301
- let c = nn({
2271
+ }), this.fittedGrid = Vt(e, this.opening.totalHeight, this.cellsX, this.cellsY);
2272
+ let c = an({
2302
2273
  width: e,
2303
2274
  rectHeight: t,
2304
2275
  archHeight: n,
@@ -2307,25 +2278,25 @@ var on = class extends i {
2307
2278
  leadThickness: r,
2308
2279
  leadDepth: i,
2309
2280
  clipInset: r * .5
2310
- }), l = L(c);
2281
+ }), l = R(c);
2311
2282
  if (!l) throw Error("ArchedDiamondLatticeWindowGeometry: merge failed");
2312
2283
  this.copy(l), l.dispose();
2313
2284
  for (let e of c) e.dispose();
2314
2285
  }
2315
- }, sn = class extends i {
2286
+ }, ln = class extends i {
2316
2287
  cellsX;
2317
2288
  cellsY;
2318
2289
  fittedGrid;
2319
2290
  constructor({ width: e = 4.5, height: t = 5.5, leadThickness: n = .055, leadDepth: r = .11, cellsX: i = 10, cellsY: a = 10, centerY: o = 0 } = {}) {
2320
- super(), this.cellsX = Math.max(1, Math.round(i)), this.cellsY = Math.max(1, Math.round(a)), this.fittedGrid = zt(e, t, this.cellsX, this.cellsY);
2321
- let s = Ht({
2291
+ super(), this.cellsX = Math.max(1, Math.round(i)), this.cellsY = Math.max(1, Math.round(a)), this.fittedGrid = Vt(e, t, this.cellsX, this.cellsY);
2292
+ let s = Wt({
2322
2293
  width: e,
2323
2294
  height: t,
2324
2295
  centerY: o,
2325
2296
  grid: this.fittedGrid,
2326
2297
  leadThickness: n,
2327
2298
  leadDepth: r
2328
- }), c = L(s);
2299
+ }), c = R(s);
2329
2300
  if (!c) throw Error("DiamondLatticeWindowGeometry: merge failed");
2330
2301
  this.copy(c), c.dispose();
2331
2302
  for (let e of s) e.dispose();
@@ -2333,20 +2304,20 @@ var on = class extends i {
2333
2304
  };
2334
2305
  //#endregion
2335
2306
  //#region src/geometry/architecture/gregorianLattice.ts
2336
- function cn(e, t, n, r) {
2307
+ function un(e, t, n, r) {
2337
2308
  let i = Math.max(1, Math.round(n)), a = Math.max(1, Math.round(r));
2338
2309
  return {
2339
2310
  paneWidth: e / i,
2340
2311
  paneHeight: t / a
2341
2312
  };
2342
2313
  }
2343
- function ln({ width: e, height: t, centerY: r = 0, cellsX: i, cellsY: a, mullionThickness: o, mullionDepth: s }) {
2314
+ function dn({ width: e, height: t, centerY: r = 0, cellsX: i, cellsY: a, mullionThickness: o, mullionDepth: s }) {
2344
2315
  let c = e / 2, l = t / 2, u = [
2345
2316
  new n(e + o, o, s).translate(0, r - l, 0),
2346
2317
  new n(e + o, o, s).translate(0, r + l, 0),
2347
2318
  new n(o, t + o, s).translate(-c, r, 0),
2348
2319
  new n(o, t + o, s).translate(c, r, 0)
2349
- ], { paneWidth: d, paneHeight: f } = cn(e, t, i, a);
2320
+ ], { paneWidth: d, paneHeight: f } = un(e, t, i, a);
2350
2321
  for (let e = 1; e < i; e++) {
2351
2322
  let i = -c + d * e;
2352
2323
  u.push(new n(o, t + o, s).translate(i, r, 0));
@@ -2359,13 +2330,13 @@ function ln({ width: e, height: t, centerY: r = 0, cellsX: i, cellsY: a, mullion
2359
2330
  }
2360
2331
  //#endregion
2361
2332
  //#region src/geometry/architecture/GregorianLatticeWindowGeometry.ts
2362
- var un = class extends i {
2333
+ var fn = class extends i {
2363
2334
  cellsX;
2364
2335
  cellsY;
2365
2336
  fittedGrid;
2366
2337
  constructor({ width: e = 4.5, height: t = 5.5, mullionThickness: n = .055, mullionDepth: r = .11, cellsX: i = 4, cellsY: a = 6, centerY: o = 0 } = {}) {
2367
- super(), this.cellsX = Math.max(1, Math.round(i)), this.cellsY = Math.max(1, Math.round(a)), this.fittedGrid = cn(e, t, this.cellsX, this.cellsY);
2368
- let s = ln({
2338
+ super(), this.cellsX = Math.max(1, Math.round(i)), this.cellsY = Math.max(1, Math.round(a)), this.fittedGrid = un(e, t, this.cellsX, this.cellsY);
2339
+ let s = dn({
2369
2340
  width: e,
2370
2341
  height: t,
2371
2342
  centerY: o,
@@ -2373,7 +2344,7 @@ var un = class extends i {
2373
2344
  cellsY: this.cellsY,
2374
2345
  mullionThickness: n,
2375
2346
  mullionDepth: r
2376
- }), c = L(s);
2347
+ }), c = R(s);
2377
2348
  if (!c) throw Error("GregorianLatticeWindowGeometry: merge failed");
2378
2349
  this.copy(c), c.dispose();
2379
2350
  for (let e of s) e.dispose();
@@ -2387,13 +2358,13 @@ function Z(e, t, n, r, i, a, o) {
2387
2358
  for (let [e, t] of o) n.push(e, t);
2388
2359
  r.push(s, s + 1, s + 2, s, s + 2, s + 3);
2389
2360
  }
2390
- var dn = [
2361
+ var pn = [
2391
2362
  [0, 0],
2392
2363
  [0, 1],
2393
2364
  [1, 1],
2394
2365
  [1, 0]
2395
2366
  ];
2396
- function fn(e, t, n, r, i) {
2367
+ function mn(e, t, n, r, i) {
2397
2368
  Z(e.positions, e.normals, e.uvs, e.indices, [
2398
2369
  [
2399
2370
  -t,
@@ -2426,7 +2397,7 @@ function fn(e, t, n, r, i) {
2426
2397
  [1, 0]
2427
2398
  ]);
2428
2399
  }
2429
- function pn(e, t, n, r, i) {
2400
+ function hn(e, t, n, r, i) {
2430
2401
  Z(e.positions, e.normals, e.uvs, e.indices, [
2431
2402
  [
2432
2403
  -t,
@@ -2452,9 +2423,9 @@ function pn(e, t, n, r, i) {
2452
2423
  0,
2453
2424
  1,
2454
2425
  0
2455
- ], dn);
2426
+ ], pn);
2456
2427
  }
2457
- function mn(e, t, n, r, i, a) {
2428
+ function gn(e, t, n, r, i, a) {
2458
2429
  Z(e.positions, e.normals, e.uvs, e.indices, [
2459
2430
  [
2460
2431
  r,
@@ -2487,7 +2458,7 @@ function mn(e, t, n, r, i, a) {
2487
2458
  [1, 0]
2488
2459
  ]);
2489
2460
  }
2490
- function hn(e, t, n, r, i, a) {
2461
+ function _n(e, t, n, r, i, a) {
2491
2462
  Z(e.positions, e.normals, e.uvs, e.indices, [
2492
2463
  [
2493
2464
  n,
@@ -2513,20 +2484,20 @@ function hn(e, t, n, r, i, a) {
2513
2484
  0,
2514
2485
  1,
2515
2486
  0
2516
- ], dn);
2487
+ ], pn);
2517
2488
  }
2518
2489
  function Q(e, t) {
2519
2490
  return [e * Math.cos(t), e * Math.sin(t)];
2520
2491
  }
2521
- function gn(e) {
2492
+ function vn(e) {
2522
2493
  return [
2523
2494
  -Math.sin(e),
2524
2495
  0,
2525
2496
  Math.cos(e)
2526
2497
  ];
2527
2498
  }
2528
- function _n(e, t, n, r, i, a) {
2529
- let [o, s] = Q(t, a), [c, l] = Q(n, a), u = gn(a);
2499
+ function yn(e, t, n, r, i, a) {
2500
+ let [o, s] = Q(t, a), [c, l] = Q(n, a), u = vn(a);
2530
2501
  Z(e.positions, e.normals, e.uvs, e.indices, [
2531
2502
  [
2532
2503
  o,
@@ -2555,7 +2526,7 @@ function _n(e, t, n, r, i, a) {
2555
2526
  [1, 0]
2556
2527
  ]);
2557
2528
  }
2558
- function vn(e, t, n, r, i, a) {
2529
+ function bn(e, t, n, r, i, a) {
2559
2530
  let [o, s] = Q(t, i), [c, l] = Q(t, a), [u, d] = Q(n, a), [f, p] = Q(n, i);
2560
2531
  Z(e.positions, e.normals, e.uvs, e.indices, [
2561
2532
  [
@@ -2589,7 +2560,7 @@ function vn(e, t, n, r, i, a) {
2589
2560
  [0, 1]
2590
2561
  ]);
2591
2562
  }
2592
- function yn(e, t, n, r, i) {
2563
+ function xn(e, t, n, r, i) {
2593
2564
  Z(e.positions, e.normals, e.uvs, e.indices, [
2594
2565
  [
2595
2566
  -t,
@@ -2615,11 +2586,11 @@ function yn(e, t, n, r, i) {
2615
2586
  0,
2616
2587
  1,
2617
2588
  0
2618
- ], dn);
2589
+ ], pn);
2619
2590
  }
2620
2591
  //#endregion
2621
2592
  //#region src/geometry/architecture/LShapedStaircaseGeometry.ts
2622
- var bn = class extends i {
2593
+ var Sn = class extends i {
2623
2594
  width;
2624
2595
  riserHeight;
2625
2596
  treadDepth;
@@ -2637,18 +2608,18 @@ var bn = class extends i {
2637
2608
  };
2638
2609
  for (let e = 0; e < this.stepsPerFlight; e++) {
2639
2610
  let t = e * this.riserHeight, n = t + this.riserHeight, r = e * this.treadDepth, i = r + this.treadDepth;
2640
- fn(u, a, t, n, r), pn(u, a, n, r, i);
2611
+ mn(u, a, t, n, r), hn(u, a, n, r, i);
2641
2612
  }
2642
2613
  let d = this.stepsPerFlight * this.riserHeight, f = (this.stepsPerFlight - 1) * this.treadDepth, p = f + this.landingSize;
2643
- yn(u, a, d, f, p);
2614
+ xn(u, a, d, f, p);
2644
2615
  let m = -a;
2645
2616
  for (let e = 0; e < this.stepsPerFlight; e++) {
2646
2617
  let t = d + e * this.riserHeight, n = t + this.riserHeight, r = m - e * this.treadDepth, i = r - this.treadDepth;
2647
- mn(u, t, n, r, f, p), hn(u, n, r, i, f, p);
2618
+ gn(u, t, n, r, f, p), _n(u, n, r, i, f, p);
2648
2619
  }
2649
2620
  this.setIndex(l), this.setAttribute("position", new r(new Float32Array(o), 3)), this.setAttribute("normal", new r(new Float32Array(s), 3)), this.setAttribute("uv", new r(new Float32Array(c), 2)), this.computeBoundingSphere();
2650
2621
  }
2651
- }, xn = class extends i {
2622
+ }, Cn = class extends i {
2652
2623
  innerRadius;
2653
2624
  width;
2654
2625
  outerRadius;
@@ -2671,11 +2642,11 @@ var bn = class extends i {
2671
2642
  };
2672
2643
  for (let e = 0; e < this.stepCount; e++) {
2673
2644
  let t = this.startAngle + e * this.stepAngle, n = t + this.stepAngle, r = e * this.riserHeight, i = r + this.riserHeight;
2674
- _n(p, this.innerRadius, this.outerRadius, r, i, t), vn(p, this.innerRadius, this.outerRadius, i, t, n);
2645
+ yn(p, this.innerRadius, this.outerRadius, r, i, t), bn(p, this.innerRadius, this.outerRadius, i, t, n);
2675
2646
  }
2676
2647
  this.setIndex(f), this.setAttribute("position", new r(new Float32Array(l), 3)), this.setAttribute("normal", new r(new Float32Array(u), 3)), this.setAttribute("uv", new r(new Float32Array(d), 2)), this.computeBoundingSphere();
2677
2648
  }
2678
- }, Sn = class extends i {
2649
+ }, wn = class extends i {
2679
2650
  width;
2680
2651
  riserHeight;
2681
2652
  treadDepth;
@@ -2692,61 +2663,61 @@ var bn = class extends i {
2692
2663
  };
2693
2664
  for (let e = 0; e < this.stepCount; e++) {
2694
2665
  let t = e * this.riserHeight, n = t + this.riserHeight, r = e * this.treadDepth, i = r + this.treadDepth;
2695
- fn(u, a, t, n, r), pn(u, a, n, r, i);
2666
+ mn(u, a, t, n, r), hn(u, a, n, r, i);
2696
2667
  }
2697
2668
  this.setIndex(l), this.setAttribute("position", new r(new Float32Array(o), 3)), this.setAttribute("normal", new r(new Float32Array(s), 3)), this.setAttribute("uv", new r(new Float32Array(c), 2)), this.computeBoundingSphere();
2698
2669
  }
2699
- }, Cn = class extends i {
2670
+ }, Tn = class extends i {
2700
2671
  constructor() {
2701
2672
  super();
2702
- let e = new x([
2703
- new F(0, 0),
2704
- new F(1.2, 0),
2705
- new F(1.5, 1.5),
2706
- new F(1, 3),
2707
- new F(.6, 3.5),
2708
- new F(.5, 3.5)
2673
+ let e = new S([
2674
+ new I(0, 0),
2675
+ new I(1.2, 0),
2676
+ new I(1.5, 1.5),
2677
+ new I(1, 3),
2678
+ new I(.6, 3.5),
2679
+ new I(.5, 3.5)
2709
2680
  ], 10), t = new u(.6, .5, .3, 10);
2710
- t.translate(0, 3.5, 0), this.copy(L([e, t], !0));
2681
+ t.translate(0, 3.5, 0), this.copy(R([e, t], !0));
2711
2682
  }
2712
2683
  };
2713
2684
  //#endregion
2714
2685
  //#region src/utils/LineEquations.ts
2715
- function wn(e, t, n, r, i) {
2686
+ function En(e, t, n, r, i) {
2716
2687
  let a = (r - t) / (n - e);
2717
2688
  return e + (i - t) / a;
2718
2689
  }
2719
- function Tn(e, t, n, r, i) {
2690
+ function Dn(e, t, n, r, i) {
2720
2691
  return t + (r - t) / (n - e) * (i - e);
2721
2692
  }
2722
- var En = {
2723
- calculateXFromSlopeIntercept: wn,
2724
- calculateYFromSlopeIntercept: Tn
2725
- }, Dn = class extends i {
2693
+ var On = {
2694
+ calculateXFromSlopeIntercept: En,
2695
+ calculateYFromSlopeIntercept: Dn
2696
+ }, kn = class extends i {
2726
2697
  constructor() {
2727
2698
  super();
2728
- let e = new x([
2729
- new F(0, 0),
2730
- new F(.8, 0),
2731
- new F(1, 1.5),
2732
- new F(.5, 2.2),
2733
- new F(.6, 2.5),
2734
- new F(.5, 2.5)
2699
+ let e = new S([
2700
+ new I(0, 0),
2701
+ new I(.8, 0),
2702
+ new I(1, 1.5),
2703
+ new I(.5, 2.2),
2704
+ new I(.6, 2.5),
2705
+ new I(.5, 2.5)
2735
2706
  ], 10), t = new u(.55, .45, .2, 10);
2736
2707
  t.translate(0, 2.5, 0);
2737
- let n = new x([
2738
- new F(0, 0),
2739
- new F(.8, 0),
2740
- new F(wn(.8, 0, 1, 1.5, 1), 1),
2741
- new F(0, 1)
2708
+ let n = new S([
2709
+ new I(0, 0),
2710
+ new I(.8, 0),
2711
+ new I(En(.8, 0, 1, 1.5, 1), 1),
2712
+ new I(0, 1)
2742
2713
  ], 10);
2743
- n.translate(0, .1, 0), n.scale(.9, .9, .9), this.copy(L([
2714
+ n.translate(0, .1, 0), n.scale(.9, .9, .9), this.copy(R([
2744
2715
  e,
2745
2716
  t,
2746
2717
  n
2747
2718
  ], !0));
2748
2719
  }
2749
- }, On = class extends i {
2720
+ }, An = class extends i {
2750
2721
  radius;
2751
2722
  height;
2752
2723
  constructor({ radius: e = .5, neckRadius: t = .2, height: n = 3, neckHeight: r = 1, segments: i = 16 } = {}) {
@@ -2756,13 +2727,13 @@ var En = {
2756
2727
  let s = .3, c = new u(t, e, s, i);
2757
2728
  c.translate(0, a + s / 2, 0);
2758
2729
  let l = new u(t, t, r, i);
2759
- l.translate(0, a + s + r / 2, 0), this.copy(L([
2730
+ l.translate(0, a + s + r / 2, 0), this.copy(R([
2760
2731
  o,
2761
2732
  c,
2762
2733
  l
2763
2734
  ], !1));
2764
2735
  }
2765
- }, kn = class extends i {
2736
+ }, jn = class extends i {
2766
2737
  width;
2767
2738
  height;
2768
2739
  depth;
@@ -2771,9 +2742,9 @@ var En = {
2771
2742
  let i = t * .6, a = new n(e / 2, i, r);
2772
2743
  a.translate(0, i / 2, 0);
2773
2744
  let o = new n(e * 1.5, e / 4, r);
2774
- o.translate(0, i * .75, 0), this.copy(L([a, o], !1)), this.computeVertexNormals();
2745
+ o.translate(0, i * .75, 0), this.copy(R([a, o], !1)), this.computeVertexNormals();
2775
2746
  }
2776
- }, An = class extends i {
2747
+ }, Mn = class extends i {
2777
2748
  constructor() {
2778
2749
  super();
2779
2750
  let e = new n(5, 1, 5);
@@ -2808,20 +2779,20 @@ var En = {
2808
2779
  });
2809
2780
  let a = new l(3.5, 2, 4);
2810
2781
  a.rotateY(Math.PI / 4), a.translate(0, 5, 0);
2811
- let o = new N();
2782
+ let o = new P();
2812
2783
  o.moveTo(-1, 0), o.lineTo(-1, 2), o.absarc(0, 2, 1, Math.PI, 0, !0), o.lineTo(1, 0);
2813
2784
  let s = new g(o, {
2814
2785
  depth: .5,
2815
2786
  bevelEnabled: !1
2816
2787
  });
2817
- s.translate(0, .5, 1.7), s.setIndex([...Array(s.attributes.position.count).keys()]), this.copy(L([
2788
+ s.translate(0, .5, 1.7), s.setIndex([...Array(s.attributes.position.count).keys()]), this.copy(R([
2818
2789
  e,
2819
- L([t, ...i], !1),
2790
+ R([t, ...i], !1),
2820
2791
  a,
2821
2792
  s
2822
2793
  ], !0)), this.computeVertexNormals();
2823
2794
  }
2824
- }, jn = class extends i {
2795
+ }, Nn = class extends i {
2825
2796
  totalHeight;
2826
2797
  baseWidth;
2827
2798
  constructor({ totalHeight: e = 1.75, baseWidth: t = .75 } = {}) {
@@ -2835,7 +2806,7 @@ var En = {
2835
2806
  let f = new n(t * .4, o, t * .4);
2836
2807
  f.translate(0, s + o / 2, 0), s += o;
2837
2808
  let p = new l(t * .4 / Math.sqrt(2), .1, 4, 1, !1, Math.PI / 4);
2838
- p.translate(0, s + .1 / 2, 0), this.copy(L([
2809
+ p.translate(0, s + .1 / 2, 0), this.copy(R([
2839
2810
  c,
2840
2811
  u,
2841
2812
  d,
@@ -2843,21 +2814,21 @@ var En = {
2843
2814
  p
2844
2815
  ], !1)), this.computeVertexNormals();
2845
2816
  }
2846
- }, Mn = class extends i {
2817
+ }, Pn = class extends i {
2847
2818
  constructor(e = .6, t = 1, r = .2, i = .6) {
2848
2819
  super();
2849
2820
  let a = t - i / 2, o = new n(e, a, r);
2850
2821
  o.translate(0, a / 2, 0);
2851
2822
  let s = new u(i / 2, i / 2, r, 16, 1, !1, 0, Math.PI);
2852
- s.rotateY(Math.PI / 2), s.rotateX(Math.PI / 2), s.translate(0, a, 0), this.copy(L([o, s], !1)), this.computeVertexNormals();
2823
+ s.rotateY(Math.PI / 2), s.rotateX(Math.PI / 2), s.translate(0, a, 0), this.copy(R([o, s], !1)), this.computeVertexNormals();
2853
2824
  }
2854
- }, Nn = class extends i {
2825
+ }, Fn = class extends i {
2855
2826
  constructor(e = .5, t = .8, r = .15) {
2856
2827
  super();
2857
2828
  let i = new n(e, t, r);
2858
2829
  i.translate(0, t / 2, 0), this.copy(i);
2859
2830
  }
2860
- }, Pn = class extends i {
2831
+ }, In = class extends i {
2861
2832
  height;
2862
2833
  constructor({ height: e = 2.25 } = {}) {
2863
2834
  super(), this.height = e;
@@ -2866,27 +2837,27 @@ var En = {
2866
2837
  let r = new n(1, e, 1);
2867
2838
  r.translate(0, .5 + e / 2, 0);
2868
2839
  let i = new n(1.4, .3, 1.4);
2869
- i.translate(0, .5 + e + .15, 0), this.copy(L([
2840
+ i.translate(0, .5 + e + .15, 0), this.copy(R([
2870
2841
  t,
2871
2842
  r,
2872
2843
  i
2873
2844
  ], !1));
2874
2845
  }
2875
- }, Fn = class extends i {
2846
+ }, Ln = class extends i {
2876
2847
  barHeight;
2877
2848
  constructor({ barHeight: e = 2, barRadius: t = .05, spikeHeight: n = .3, spikeRadius: r = .075, spikeScaleZ: i = 1, radialSegments: a = 8 } = {}) {
2878
2849
  super(), this.barHeight = e;
2879
2850
  let o = new u(t, t, e, a);
2880
2851
  o.translate(0, e / 2, 0);
2881
2852
  let s = new l(r, n, a);
2882
- s.translate(0, e + n / 2, 0), s.scale(1, 1, i), this.copy(L([o, s], !1));
2853
+ s.translate(0, e + n / 2, 0), s.scale(1, 1, i), this.copy(R([o, s], !1));
2883
2854
  }
2884
- }, In = class extends i {
2855
+ }, Rn = class extends i {
2885
2856
  count;
2886
2857
  spacing;
2887
2858
  constructor({ count: e = 20, spacing: t = .4, barHeight: r = 2, barRadius: i = .05, spikeHeight: a = .3, spikeRadius: o = .075, spikeScaleZ: s = 1, railHeight: c = .1, railDepth: l = .05, railOffset: u = 0, radialSegments: d = 8 } = {}) {
2888
2859
  super(), this.count = e, this.spacing = t;
2889
- let f = [], p = new Fn({
2860
+ let f = [], p = new Ln({
2890
2861
  barHeight: r,
2891
2862
  barRadius: i,
2892
2863
  spikeHeight: a,
@@ -2901,9 +2872,9 @@ var En = {
2901
2872
  let h = m.clone();
2902
2873
  h.translate(t * (e - 1) / 2, r - u - c / 2, 0), f.push(h);
2903
2874
  let g = m.clone();
2904
- g.translate(t * (e - 1) / 2, c / 2, 0), f.push(g), this.copy(L(f));
2875
+ g.translate(t * (e - 1) / 2, c / 2, 0), f.push(g), this.copy(R(f));
2905
2876
  }
2906
- }, Ln = class extends i {
2877
+ }, zn = class extends i {
2907
2878
  width;
2908
2879
  height;
2909
2880
  depth;
@@ -2925,7 +2896,7 @@ var En = {
2925
2896
  let t = c.clone();
2926
2897
  t.translate(0, a / 2 + e * h, 0), m.push(t);
2927
2898
  }
2928
- this.copy(L([
2899
+ this.copy(R([
2929
2900
  l,
2930
2901
  u,
2931
2902
  d,
@@ -2934,17 +2905,17 @@ var En = {
2934
2905
  ...m
2935
2906
  ], !1));
2936
2907
  }
2937
- }, Rn = class extends i {
2908
+ }, Bn = class extends i {
2938
2909
  constructor() {
2939
2910
  super();
2940
2911
  let e = new n(5, .3, 3);
2941
2912
  e.translate(0, 3.15, 0);
2942
- let t = new x([
2943
- new F(.2, 0),
2944
- new F(.25, .5),
2945
- new F(.15, 1.5),
2946
- new F(.3, 3)
2947
- ], 32), r = L([
2913
+ let t = new S([
2914
+ new I(.2, 0),
2915
+ new I(.25, .5),
2916
+ new I(.15, 1.5),
2917
+ new I(.3, 3)
2918
+ ], 32), r = R([
2948
2919
  [
2949
2920
  2.1,
2950
2921
  0,
@@ -2969,9 +2940,9 @@ var En = {
2969
2940
  let n = t.clone();
2970
2941
  return n.translate(e[0], e[1], e[2]), n;
2971
2942
  }));
2972
- this.copy(L([e, r], !0));
2943
+ this.copy(R([e, r], !0));
2973
2944
  }
2974
- }, zn = class extends i {
2945
+ }, Vn = class extends i {
2975
2946
  size;
2976
2947
  lift;
2977
2948
  constructor({ size: e = .13, lift: t = .22 } = {}) {
@@ -2995,7 +2966,7 @@ var En = {
2995
2966
  for (let e = 0; e < n.length - 1; e++) i.push(a[e], s[e], s[e + 1], a[e], s[e + 1], a[e + 1]), i.push(a[e], a[e + 1], o[e + 1], a[e], o[e + 1], o[e]);
2996
2967
  this.setAttribute("position", new _(r, 3)), this.setIndex(i), this.computeVertexNormals(), this.computeBoundingSphere();
2997
2968
  }
2998
- }, Bn = class extends fe {
2969
+ }, Hn = class extends pe {
2999
2970
  height;
3000
2971
  radius;
3001
2972
  segmentsU;
@@ -3006,7 +2977,7 @@ var En = {
3006
2977
  i.set(s, c, -l);
3007
2978
  }, n, r), this.height = e, this.radius = t, this.segmentsU = n, this.segmentsV = r;
3008
2979
  }
3009
- }, Vn = class extends i {
2980
+ }, Un = class extends i {
3010
2981
  radiusTop;
3011
2982
  radiusBottom;
3012
2983
  height;
@@ -3017,15 +2988,15 @@ var En = {
3017
2988
  super(), this.radiusTop = e, this.radiusBottom = t, this.height = n, this.flameHeight = r, this.flameRadius = i, this.segments = a;
3018
2989
  let o = new u(e, t, n, a);
3019
2990
  o.translate(0, n / 2, 0);
3020
- let s = new Bn({
2991
+ let s = new Hn({
3021
2992
  segmentsU: a,
3022
2993
  segmentsV: a,
3023
2994
  height: r,
3024
2995
  radius: i
3025
2996
  });
3026
- s.translate(0, n, 0), this.copy(L([o, s], !0));
2997
+ s.translate(0, n, 0), this.copy(R([o, s], !0));
3027
2998
  }
3028
- }, Hn = class extends i {
2999
+ }, Wn = class extends i {
3029
3000
  baseWidth;
3030
3001
  bodyHeight;
3031
3002
  baseHeight;
@@ -3038,25 +3009,25 @@ var En = {
3038
3009
  h.translate(0, n / 2, 0), m.push(h);
3039
3010
  let g = n + t, _ = new l(i, r, f);
3040
3011
  _.translate(0, g + r / 2, 0), m.push(_);
3041
- let v = g + r, y = new ce(s, c, f, f * 2);
3012
+ let v = g + r, y = new oe(s, c, f, f * 2);
3042
3013
  y.translate(0, v + d, 0), m.push(y);
3043
- let b = [L(m.map((e) => e.toNonIndexed()), !1)];
3014
+ let b = [R(m.map((e) => e.toNonIndexed()), !1)];
3044
3015
  if (p) {
3045
3016
  let n = new u(e * a * o, e * a * o, t * o, f);
3046
3017
  n.translate(0, this.lampCenterY, 0), b.push(n.toNonIndexed());
3047
3018
  }
3048
- this.copy(L(b, !0)), this.computeBoundingSphere();
3019
+ this.copy(R(b, !0)), this.computeBoundingSphere();
3049
3020
  }
3050
- }, Un = new I(0, 1, 0);
3051
- function Wn(e, t, r) {
3021
+ }, Gn = new L(0, 1, 0);
3022
+ function Kn(e, t, r) {
3052
3023
  let i = t.clone().sub(e), a = new n(r, i.length(), r);
3053
- a.applyQuaternion(new M().setFromUnitVectors(Un, i.normalize()));
3024
+ a.applyQuaternion(new N().setFromUnitVectors(Gn, i.normalize()));
3054
3025
  let o = e.clone().add(t).multiplyScalar(.5);
3055
3026
  return a.translate(o.x, o.y, o.z), a;
3056
3027
  }
3057
3028
  //#endregion
3058
3029
  //#region src/geometry/lighting/HangingLanternGeometry.ts
3059
- var Gn = class extends i {
3030
+ var qn = class extends i {
3060
3031
  drop;
3061
3032
  chainWidth;
3062
3033
  capWidth;
@@ -3078,7 +3049,7 @@ var Gn = class extends i {
3078
3049
  h.translate(0, -e / 2, 0), m.push(h);
3079
3050
  let g = new n(r, i, a);
3080
3051
  g.translate(0, -e + o, 0), m.push(g);
3081
- let _ = this.cageCenterY, v = s, y = new I(0, _ + v * c, 0), b = new I(0, _ - v * c, 0), x = new I(v, _, 0), S = new I(-v, _, 0), C = new I(0, _, v), w = new I(0, _, -v), T = [
3052
+ let _ = this.cageCenterY, v = s, y = new L(0, _ + v * c, 0), b = new L(0, _ - v * c, 0), x = new L(v, _, 0), S = new L(-v, _, 0), C = new L(0, _, v), w = new L(0, _, -v), T = [
3082
3053
  [y, x],
3083
3054
  [y, S],
3084
3055
  [y, C],
@@ -3091,14 +3062,14 @@ var Gn = class extends i {
3091
3062
  [C, S],
3092
3063
  [S, w],
3093
3064
  [w, x]
3094
- ].map(([e, t]) => Wn(e, t, u)), E = [L(m.map((e) => e.toNonIndexed()), !1), L(T.map((e) => e.toNonIndexed()), !1)];
3065
+ ].map(([e, t]) => Kn(e, t, u)), E = [R(m.map((e) => e.toNonIndexed()), !1), R(T.map((e) => e.toNonIndexed()), !1)];
3095
3066
  if (f) {
3096
- let e = new k(s * d, 0);
3067
+ let e = new ee(s * d, 0);
3097
3068
  e.scale(1, c, 1), e.translate(0, _, 0), E.push(e.toNonIndexed());
3098
3069
  }
3099
- this.copy(L(E, !0)), this.computeBoundingSphere();
3070
+ this.copy(R(E, !0)), this.computeBoundingSphere();
3100
3071
  }
3101
- }, Kn = class extends i {
3072
+ }, Jn = class extends i {
3102
3073
  bodyOffsetX;
3103
3074
  chimneyCenterY;
3104
3075
  innerScale;
@@ -3110,20 +3081,20 @@ var Gn = class extends i {
3110
3081
  super(), this.bodyOffsetX = d, this.chimneyCenterY = h, this.innerScale = w, this.inner = T, this.lightCenterX = d, this.lightCenterY = h, this.lightCenterZ = 0;
3111
3082
  let E = [], D = new n(e, t, r);
3112
3083
  D.translate(i, 0, 0), E.push(D);
3113
- let ee = new n(a, o, s);
3114
- ee.translate(c, l, 0), E.push(ee);
3115
- let O = [], k = new u(g, g, _, C);
3116
- k.translate(d, v, 0), O.push(k);
3117
- let A = new u(y, b, x, C);
3118
- A.translate(d, S, 0), O.push(A);
3119
- let j = [L(E.map((e) => e.toNonIndexed()), !1), L(O.map((e) => e.toNonIndexed()), !1)];
3084
+ let O = new n(a, o, s);
3085
+ O.translate(c, l, 0), E.push(O);
3086
+ let k = [], A = new u(g, g, _, C);
3087
+ A.translate(d, v, 0), k.push(A);
3088
+ let ee = new u(y, b, x, C);
3089
+ ee.translate(d, S, 0), k.push(ee);
3090
+ let j = [R(E.map((e) => e.toNonIndexed()), !1), R(k.map((e) => e.toNonIndexed()), !1)];
3120
3091
  if (T) {
3121
3092
  let e = new u(p * w, m * w, f * w, C);
3122
3093
  e.translate(d, h, 0), j.push(e.toNonIndexed());
3123
3094
  }
3124
- this.copy(L(j, !0)), this.computeBoundingSphere();
3095
+ this.copy(R(j, !0)), this.computeBoundingSphere();
3125
3096
  }
3126
- }, qn = class extends i {
3097
+ }, Yn = class extends i {
3127
3098
  constructor(e = 1, t = 2, n = .5, i = Math.PI / 4) {
3128
3099
  super();
3129
3100
  let a = t * Math.tan(i), o = e, s = t, c = n, l = [
@@ -3361,38 +3332,38 @@ var Gn = class extends i {
3361
3332
  ]), p = new Float32Array(l), m = new Float32Array(u), h = new Float32Array(f), g = new Uint16Array(d);
3362
3333
  this.setAttribute("position", new r(p, 3)), this.setAttribute("normal", new r(m, 3)), this.setAttribute("uv", new r(h, 2)), this.setIndex(new r(g, 1)), this.center();
3363
3334
  }
3364
- }, Jn = class extends N {
3335
+ }, Xn = class extends P {
3365
3336
  constructor(e = 5, t = .5, n = 1, r = 5, i = .25) {
3366
3337
  super();
3367
3338
  let a = Math.PI * 2 / e, o = a / 4;
3368
3339
  this.moveTo(Math.cos(0) * n, -Math.sin(0) * n);
3369
3340
  for (let r = 1; r <= e; ++r) this.lineTo(Math.cos(a * r - o * 3) * t, -Math.sin(a * r - o * 3) * t), this.lineTo(Math.cos(a * r - o * 2) * t, -Math.sin(a * r - o * 2) * t), this.lineTo(Math.cos(a * r - o) * n, -Math.sin(a * r - o) * n), this.lineTo(Math.cos(a * r) * n, -Math.sin(a * r) * n);
3370
3341
  if (this.closePath(), i > 0 && r > 2) {
3371
- let e = new A(), t = Math.PI * 2 / r;
3342
+ let e = new j(), t = Math.PI * 2 / r;
3372
3343
  e.moveTo(Math.cos(0) * i, -Math.sin(0) * i);
3373
3344
  for (let n = 1; n < r; ++n) e.lineTo(Math.cos(t * n) * i, -Math.sin(t * n) * i);
3374
3345
  e.lineTo(Math.cos(0) * i, -Math.sin(0) * i), this.holes.push(e);
3375
3346
  }
3376
3347
  }
3377
- }, Yn = class extends g {
3348
+ }, Zn = class extends g {
3378
3349
  constructor({ sides: e = 5, innerRadius: t = .5, outerRadius: n = 1, holeSides: r = 5, holeRadius: i = .25, depth: a = .25 } = {}) {
3379
- super(new Jn(e, t, n, r, i), {
3350
+ super(new Xn(e, t, n, r, i), {
3380
3351
  depth: a,
3381
3352
  bevelEnabled: !1
3382
3353
  });
3383
3354
  }
3384
- }, Xn = class extends N {
3355
+ }, Qn = class extends P {
3385
3356
  constructor(e = 1, t = 2.1, n = 1.4, r = 1.6) {
3386
3357
  super(), this.moveTo(0, n * e / 3), this.bezierCurveTo(-t * .375 * e, n * e, -t * e, n * e / 3, 0, -r * e), this.bezierCurveTo(t * e, n * e / 3, t * .375 * e, n * e, 0, n * e / 3);
3387
3358
  }
3388
- }, Zn = class extends g {
3359
+ }, $n = class extends g {
3389
3360
  constructor({ size: e = 1, width: t = 2.1, height: n = 1.4, tipDepth: r = 1.6, depth: i = .25 } = {}) {
3390
- super(new Xn(e, t, n, r), {
3361
+ super(new Qn(e, t, n, r), {
3391
3362
  depth: i,
3392
3363
  bevelEnabled: !1
3393
3364
  });
3394
3365
  }
3395
- }, Qn = class extends N {
3366
+ }, er = class extends P {
3396
3367
  constructor(e = 5, t = .5, n = 1) {
3397
3368
  super();
3398
3369
  let r = Math.PI * 2 / e, i = r / 2;
@@ -3400,20 +3371,20 @@ var Gn = class extends i {
3400
3371
  for (let a = 1; a <= e; ++a) this.lineTo(Math.cos(r * a - i) * t, Math.sin(r * a - i) * t), this.lineTo(Math.cos(r * a) * n, Math.sin(r * a) * n);
3401
3372
  this.closePath();
3402
3373
  }
3403
- }, $n = class extends g {
3374
+ }, tr = class extends g {
3404
3375
  constructor({ points: e = 5, innerRadius: t = .5, outerRadius: n = 1, depth: r = .25 } = {}) {
3405
- super(new Qn(e, t, n), {
3376
+ super(new er(e, t, n), {
3406
3377
  depth: r,
3407
3378
  bevelEnabled: !1
3408
3379
  });
3409
3380
  }
3410
- }, er = class extends i {
3381
+ }, nr = class extends i {
3411
3382
  constructor(e = .1, t = .1, n = .4, r = 8) {
3412
3383
  super();
3413
3384
  let i = new u(e * .6, t * .6, n, r);
3414
3385
  i.translate(0, 0, 0);
3415
- let a = new P(e, r, r), o = a.clone(), s = a.clone(), c = a.clone(), l = a.clone();
3416
- o.translate(0, n / 2 + e * .6, -e * .6), s.translate(0, n / 2 + e * .6, e * .6), c.translate(0, -n / 2 - t * .6, -t * .6), l.translate(0, -n / 2 - t * .6, t * .6), this.copy(L([
3386
+ let a = new F(e, r, r), o = a.clone(), s = a.clone(), c = a.clone(), l = a.clone();
3387
+ o.translate(0, n / 2 + e * .6, -e * .6), s.translate(0, n / 2 + e * .6, e * .6), c.translate(0, -n / 2 - t * .6, -t * .6), l.translate(0, -n / 2 - t * .6, t * .6), this.copy(R([
3417
3388
  i,
3418
3389
  o,
3419
3390
  s,
@@ -3421,29 +3392,29 @@ var Gn = class extends i {
3421
3392
  l
3422
3393
  ], !1));
3423
3394
  }
3424
- }, tr = class extends i {
3395
+ }, rr = class extends i {
3425
3396
  flaskRadius;
3426
3397
  height;
3427
3398
  constructor({ flaskRadius: e = 1, neckRadius: t = .3, height: n = 2.5, neckHeight: r = 1, radialSegments: i = 16 } = {}) {
3428
3399
  super(), this.flaskRadius = e, this.height = n;
3429
- let a = new x([
3430
- new F(0, 0),
3431
- new F(e * .875, 0),
3432
- new F(e, .1),
3433
- new F(t, n),
3434
- new F(t, n + r),
3435
- new F(t * 1.1, n + r + .3)
3400
+ let a = new S([
3401
+ new I(0, 0),
3402
+ new I(e * .875, 0),
3403
+ new I(e, .1),
3404
+ new I(t, n),
3405
+ new I(t, n + r),
3406
+ new I(t * 1.1, n + r + .3)
3436
3407
  ], i);
3437
- this.copy(L([a], !1));
3408
+ this.copy(R([a], !1));
3438
3409
  }
3439
- }, nr = (e, t) => e / (1 - Math.cos(t)), rr = (e, t) => e / (2 * Math.sin(t)), ir = (e, t) => e * (1 - Math.cos(t)), ar = (e, t) => 2 * e * Math.sin(t), or = (e, t) => {
3410
+ }, ir = (e, t) => e / (1 - Math.cos(t)), ar = (e, t) => e / (2 * Math.sin(t)), or = (e, t) => e * (1 - Math.cos(t)), sr = (e, t) => 2 * e * Math.sin(t), cr = (e, t) => {
3440
3411
  let n = 2 * t;
3441
3412
  return Math.asin(n / (2 * e));
3442
- }, sr = (e, t, n) => ({
3413
+ }, lr = (e, t, n) => ({
3443
3414
  x: e * Math.sin(n) * Math.cos(t),
3444
3415
  y: e * Math.sin(n) * Math.sin(t),
3445
3416
  z: e * Math.cos(n)
3446
- }), cr = (e, t, n) => {
3417
+ }), ur = (e, t, n) => {
3447
3418
  let r = Math.sqrt(e * e + t * t + n * n);
3448
3419
  return {
3449
3420
  radius: r,
@@ -3453,66 +3424,66 @@ var Gn = class extends i {
3453
3424
  };
3454
3425
  //#endregion
3455
3426
  //#region src/utils/SphericalCurve.ts
3456
- function lr(e, t, n, r = 0, i = 0, a = 32) {
3457
- let o = r ? or(e, r) : 0, s = i ? Math.PI - or(e, i) : Math.PI, c = [];
3427
+ function dr(e, t, n, r = 0, i = 0, a = 32) {
3428
+ let o = r ? cr(e, r) : 0, s = i ? Math.PI - cr(e, i) : Math.PI, c = [];
3458
3429
  for (let r = 0; r <= a; r++) {
3459
3430
  let i = s - (s - o) / a * r, l = e * Math.sin(i), u = t * Math.cos(i) + n;
3460
- c.push(new F(l, u));
3431
+ c.push(new I(l, u));
3461
3432
  }
3462
3433
  return [...c];
3463
3434
  }
3464
3435
  //#endregion
3465
3436
  //#region src/geometry/science/FlorenceFlaskGeometry.ts
3466
- var ur = class extends i {
3437
+ var fr = class extends i {
3467
3438
  constructor() {
3468
3439
  super();
3469
- let e = new x([...lr(1, 1, .5, .2, 0, 32), new F(.2, 3)], 32);
3440
+ let e = new S([...dr(1, 1, .5, .2, 0, 32), new I(.2, 3)], 32);
3470
3441
  this.copy(e);
3471
3442
  }
3472
- }, dr = class extends i {
3443
+ }, pr = class extends i {
3473
3444
  constructor() {
3474
3445
  super();
3475
- let e = new x([
3476
- new F(1, 0),
3477
- new F(1.2, .5),
3478
- new F(1.4, 1.5),
3479
- new F(1.3, 1.8),
3480
- new F(.8, 1.8)
3446
+ let e = new S([
3447
+ new I(1, 0),
3448
+ new I(1.2, .5),
3449
+ new I(1.4, 1.5),
3450
+ new I(1.3, 1.8),
3451
+ new I(.8, 1.8)
3481
3452
  ], 12), t = new s(1, 12);
3482
- t.rotateX(-Math.PI / 2), t.translate(0, 0, 0), this.copy(L([e, t], !1));
3453
+ t.rotateX(-Math.PI / 2), t.translate(0, 0, 0), this.copy(R([e, t], !1));
3483
3454
  }
3484
- }, fr = class extends i {
3455
+ }, mr = class extends i {
3485
3456
  radius;
3486
3457
  height;
3487
3458
  count;
3488
3459
  constructor({ radius: e = .3, height: t = .4, count: n = 3, thickness: r = .03, radialSegments: i = 16 } = {}) {
3489
3460
  super(), this.radius = e, this.height = t, this.count = n;
3490
- let a = new ce(e, r, 8, i);
3461
+ let a = new oe(e, r, 8, i);
3491
3462
  a.rotateX(Math.PI / 2), a.translate(0, t, 0);
3492
3463
  let o = new u(r * .6, r * .6, t, i), s = [];
3493
3464
  for (let r = 0; r < n; r++) {
3494
3465
  let i = r / n * Math.PI * 2, a = o.clone();
3495
3466
  a.translate(Math.cos(i) * e, t / 2, Math.sin(i) * e), s.push(a);
3496
3467
  }
3497
- this.copy(L([a, ...s], !1));
3468
+ this.copy(R([a, ...s], !1));
3498
3469
  }
3499
- }, pr = class extends i {
3470
+ }, hr = class extends i {
3500
3471
  constructor() {
3501
3472
  super();
3502
3473
  let e = new u(.5, .6, .3, 16);
3503
3474
  e.translate(0, .15, 0);
3504
3475
  let t = new u(.15, .15, 2, 12, 1, !0);
3505
3476
  t.translate(0, 1.3, 0);
3506
- let n = new P(.3, 16, 16);
3507
- n.translate(0, 2.4, 0), this.copy(L([e, L([t, n])], !0));
3477
+ let n = new F(.3, 16, 16);
3478
+ n.translate(0, 2.4, 0), this.copy(R([e, R([t, n])], !0));
3508
3479
  }
3509
- }, mr = class extends i {
3480
+ }, gr = class extends i {
3510
3481
  constructor(e = .2, t = .2, n = 3, r = 32, i = !0) {
3511
3482
  super();
3512
- let a = new u(e, t, n, r, 1, i), o = new P(t, r, r / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
3513
- o.translate(0, -(n / 2), 0), this.copy(L([a, o], !1));
3483
+ let a = new u(e, t, n, r, 1, i), o = new F(t, r, r / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
3484
+ o.translate(0, -(n / 2), 0), this.copy(R([a, o], !1));
3514
3485
  }
3515
- }, hr = class extends i {
3486
+ }, _r = class extends i {
3516
3487
  radius;
3517
3488
  height;
3518
3489
  constructor({ radius: e = 8, height: t = 1.2, radialSegments: n = 40, angularSegments: i = 64, noiseHeight: a = .5, noiseScale: o = .35, octaves: s = 4, persistence: c = .5, rim: l = .82, seed: u = 1 } = {}) {
@@ -3521,7 +3492,7 @@ var ur = class extends i {
3521
3492
  if (e <= l) return 1;
3522
3493
  let t = (e - l) / (1 - l);
3523
3494
  return 1 - t * t * (3 - 2 * t);
3524
- }, h = (e, n, r) => p(e) * t + wt(n * o, r * o, u, s, c) * a * m(e), g = 1 + d * f, _ = new Float32Array(g * 3), v = new Float32Array(g * 2);
3495
+ }, h = (e, n, r) => p(e) * t + Et(n * o, r * o, u, s, c) * a * m(e), g = 1 + d * f, _ = new Float32Array(g * 3), v = new Float32Array(g * 2);
3525
3496
  _[1] = h(0, 0, 0), v[0] = .5, v[1] = .5;
3526
3497
  for (let t = 1; t <= d; t++) {
3527
3498
  let n = t / d, r = n * e;
@@ -3538,7 +3509,7 @@ var ur = class extends i {
3538
3509
  }
3539
3510
  this.setAttribute("position", new r(_, 3)), this.setAttribute("uv", new r(v, 2)), this.setIndex(b), this.computeVertexNormals();
3540
3511
  }
3541
- }, gr = class extends i {
3512
+ }, vr = class extends i {
3542
3513
  width;
3543
3514
  depth;
3544
3515
  constructor({ width: e = 16, depth: t = 16, widthSegments: n = 48, depthSegments: i = 48, noiseHeight: a = .8, noiseScale: o = .35, octaves: s = 4, persistence: c = .5, edgeFalloff: l = 0, seed: u = 1 } = {}) {
@@ -3553,7 +3524,7 @@ var ur = class extends i {
3553
3524
  for (let n = 0; n <= f; n++) {
3554
3525
  let r = -m + n / f * t;
3555
3526
  for (let t = 0; t <= d; t++) {
3556
- let i = -p + t / d * e, l = wt(i * o, r * o, u, s, c) * a * g(i, r), m = n * (d + 1) + t;
3527
+ let i = -p + t / d * e, l = Et(i * o, r * o, u, s, c) * a * g(i, r), m = n * (d + 1) + t;
3557
3528
  v[m * 3] = i, v[m * 3 + 1] = l, v[m * 3 + 2] = r, y[m * 2] = t / d, y[m * 2 + 1] = n / f;
3558
3529
  }
3559
3530
  }
@@ -3564,7 +3535,7 @@ var ur = class extends i {
3564
3535
  }
3565
3536
  this.setAttribute("position", new r(v, 3)), this.setAttribute("uv", new r(y, 2)), this.setIndex(b), this.computeVertexNormals();
3566
3537
  }
3567
- }, _r = class extends i {
3538
+ }, yr = class extends i {
3568
3539
  trunkRadiusTop;
3569
3540
  trunkRadiusBottom;
3570
3541
  trunkHeight;
@@ -3582,9 +3553,9 @@ var ur = class extends i {
3582
3553
  let e = new f(i, o);
3583
3554
  e.translate((Math.random() - .5) * s, (Math.random() - .5) * i + n, (Math.random() - .5) * s), l.push(e);
3584
3555
  }
3585
- this.copy(L([c.toNonIndexed(), L(l, !1)], !0)), this.computeVertexNormals();
3556
+ this.copy(R([c.toNonIndexed(), R(l, !1)], !0)), this.computeVertexNormals();
3586
3557
  }
3587
- }, vr = class extends w {
3558
+ }, br = class extends T {
3588
3559
  width;
3589
3560
  riserHeight;
3590
3561
  treadDepth;
@@ -3593,15 +3564,15 @@ var ur = class extends i {
3593
3564
  flightRun;
3594
3565
  totalHeight;
3595
3566
  constructor({ color: e = "#8b4513", ...t } = {}) {
3596
- let n = new bn(t);
3597
- super(n, new D({
3567
+ let n = new Sn(t);
3568
+ super(n, new O({
3598
3569
  color: new c(e),
3599
3570
  roughness: .85,
3600
3571
  metalness: .04,
3601
3572
  side: p
3602
3573
  })), this.width = n.width, this.riserHeight = n.riserHeight, this.treadDepth = n.treadDepth, this.stepsPerFlight = n.stepsPerFlight, this.landingSize = n.landingSize, this.flightRun = n.flightRun, this.totalHeight = n.totalHeight;
3603
3574
  }
3604
- }, yr = class extends w {
3575
+ }, xr = class extends T {
3605
3576
  innerRadius;
3606
3577
  width;
3607
3578
  outerRadius;
@@ -3612,15 +3583,15 @@ var ur = class extends i {
3612
3583
  totalHeight;
3613
3584
  totalTurn;
3614
3585
  constructor({ color: e = "#8b4513", ...t } = {}) {
3615
- let n = new xn(t);
3616
- super(n, new D({
3586
+ let n = new Cn(t);
3587
+ super(n, new O({
3617
3588
  color: new c(e),
3618
3589
  roughness: .85,
3619
3590
  metalness: .04,
3620
3591
  side: p
3621
3592
  })), this.innerRadius = n.innerRadius, this.width = n.width, this.outerRadius = n.outerRadius, this.treadDepth = n.treadDepth, this.riserHeight = n.riserHeight, this.stepCount = n.stepCount, this.stepAngle = n.stepAngle, this.totalHeight = n.totalHeight, this.totalTurn = n.totalTurn;
3622
3593
  }
3623
- }, br = class extends w {
3594
+ }, Sr = class extends T {
3624
3595
  width;
3625
3596
  riserHeight;
3626
3597
  treadDepth;
@@ -3628,15 +3599,15 @@ var ur = class extends i {
3628
3599
  totalHeight;
3629
3600
  totalDepth;
3630
3601
  constructor({ color: e = "#8b4513", ...t } = {}) {
3631
- let n = new Sn(t);
3632
- super(n, new D({
3602
+ let n = new wn(t);
3603
+ super(n, new O({
3633
3604
  color: new c(e),
3634
3605
  roughness: .85,
3635
3606
  metalness: .04,
3636
3607
  side: p
3637
3608
  })), this.width = n.width, this.riserHeight = n.riserHeight, this.treadDepth = n.treadDepth, this.stepCount = n.stepCount, this.totalHeight = n.totalHeight, this.totalDepth = n.totalDepth;
3638
3609
  }
3639
- }, xr = 48, Sr = class extends v {
3610
+ }, Cr = 48, wr = class extends v {
3640
3611
  lattice;
3641
3612
  frame;
3642
3613
  glass;
@@ -3651,7 +3622,7 @@ var ur = class extends i {
3651
3622
  archHeight: s,
3652
3623
  centerY: l
3653
3624
  });
3654
- let m = new on({
3625
+ let m = new cn({
3655
3626
  width: a,
3656
3627
  rectHeight: o,
3657
3628
  archHeight: s,
@@ -3663,9 +3634,9 @@ var ur = class extends i {
3663
3634
  this.cellsX = m.cellsX, this.cellsY = m.cellsY, this.fittedGrid = m.fittedGrid;
3664
3635
  let h = new c(e);
3665
3636
  if (t) {
3666
- let e = new N();
3667
- Kt(e, this.opening);
3668
- let t = new se(e, xr), a = new E({
3637
+ let e = new P();
3638
+ Jt(e, this.opening);
3639
+ let t = new ae(e, Cr), a = new D({
3669
3640
  color: new c(n),
3670
3641
  emissive: r ? new c(r) : new c(0),
3671
3642
  emissiveIntensity: i,
@@ -3677,9 +3648,9 @@ var ur = class extends i {
3677
3648
  thickness: d * .5,
3678
3649
  side: p
3679
3650
  });
3680
- this.glass = new w(t, a), this.glass.renderOrder = 0, this.glass.castShadow = !1, this.glass.receiveShadow = !1, this.add(this.glass);
3651
+ this.glass = new T(t, a), this.glass.renderOrder = 0, this.glass.castShadow = !1, this.glass.receiveShadow = !1, this.add(this.glass);
3681
3652
  }
3682
- let g = new D({
3653
+ let g = new O({
3683
3654
  color: h,
3684
3655
  roughness: .7,
3685
3656
  metalness: .35,
@@ -3687,15 +3658,15 @@ var ur = class extends i {
3687
3658
  polygonOffsetFactor: -1,
3688
3659
  polygonOffsetUnits: -1
3689
3660
  });
3690
- this.lattice = new w(m, g), this.lattice.castShadow = !0, this.lattice.renderOrder = 1, this.add(this.lattice);
3691
- let _ = Yt(this.opening, u, d);
3692
- this.frame = new w(_, new D({
3661
+ this.lattice = new T(m, g), this.lattice.castShadow = !0, this.lattice.renderOrder = 1, this.add(this.lattice);
3662
+ let _ = Zt(this.opening, u, d);
3663
+ this.frame = new T(_, new O({
3693
3664
  color: h,
3694
3665
  roughness: .7,
3695
3666
  metalness: .35
3696
3667
  })), this.frame.castShadow = !0, this.frame.renderOrder = 2, this.add(this.frame);
3697
3668
  }
3698
- }, Cr = class extends v {
3669
+ }, Tr = class extends v {
3699
3670
  lattice;
3700
3671
  glass;
3701
3672
  cellsX;
@@ -3703,13 +3674,13 @@ var ur = class extends i {
3703
3674
  fittedGrid;
3704
3675
  constructor({ leadColor: e = "#0c0f14", glass: t = !1, glassColor: n = "#6a7d8c", glassEmissive: r, glassEmissiveIntensity: i = 0, centerY: a = 0, leadDepth: o = .11, ...s } = {}) {
3705
3676
  super();
3706
- let l = new sn({
3677
+ let l = new ln({
3707
3678
  centerY: a,
3708
3679
  leadDepth: o,
3709
3680
  ...s
3710
3681
  });
3711
3682
  this.cellsX = l.cellsX, this.cellsY = l.cellsY, this.fittedGrid = l.fittedGrid;
3712
- let u = new D({
3683
+ let u = new O({
3713
3684
  color: new c(e),
3714
3685
  roughness: .7,
3715
3686
  metalness: .35,
@@ -3717,8 +3688,8 @@ var ur = class extends i {
3717
3688
  polygonOffsetFactor: -1,
3718
3689
  polygonOffsetUnits: -1
3719
3690
  });
3720
- if (this.lattice = new w(l, u), this.lattice.castShadow = !0, this.lattice.renderOrder = 1, this.add(this.lattice), t) {
3721
- let e = s.width ?? 4.5, t = s.height ?? 5.5, l = new E({
3691
+ if (this.lattice = new T(l, u), this.lattice.castShadow = !0, this.lattice.renderOrder = 1, this.add(this.lattice), t) {
3692
+ let e = s.width ?? 4.5, t = s.height ?? 5.5, l = new D({
3722
3693
  color: new c(n),
3723
3694
  emissive: r ? new c(r) : new c(0),
3724
3695
  emissiveIntensity: i,
@@ -3730,10 +3701,10 @@ var ur = class extends i {
3730
3701
  thickness: o * .5,
3731
3702
  side: p
3732
3703
  });
3733
- this.glass = new w(new j(e, t), l), this.glass.position.y = a, this.glass.renderOrder = 0, this.glass.castShadow = !1, this.glass.receiveShadow = !1, this.add(this.glass);
3704
+ this.glass = new T(new M(e, t), l), this.glass.position.y = a, this.glass.renderOrder = 0, this.glass.castShadow = !1, this.glass.receiveShadow = !1, this.add(this.glass);
3734
3705
  }
3735
3706
  }
3736
- }, wr = class extends v {
3707
+ }, Er = class extends v {
3737
3708
  mullions;
3738
3709
  glass;
3739
3710
  cellsX;
@@ -3741,15 +3712,15 @@ var ur = class extends i {
3741
3712
  fittedGrid;
3742
3713
  constructor({ mullionColor: e = "#5c4033", glass: t = !1, glassColor: n = "#6a7d8c", glassEmissive: r, glassEmissiveIntensity: i = 0, ...a } = {}) {
3743
3714
  super();
3744
- let o = new un(a);
3715
+ let o = new fn(a);
3745
3716
  this.cellsX = o.cellsX, this.cellsY = o.cellsY, this.fittedGrid = o.fittedGrid;
3746
- let s = new D({
3717
+ let s = new O({
3747
3718
  color: new c(e),
3748
3719
  roughness: .85,
3749
3720
  metalness: .05
3750
3721
  });
3751
- if (this.mullions = new w(o, s), this.mullions.castShadow = !0, this.mullions.renderOrder = 1, this.add(this.mullions), t) {
3752
- let e = a.width ?? 4.5, t = a.height ?? 5.5, o = new E({
3722
+ if (this.mullions = new T(o, s), this.mullions.castShadow = !0, this.mullions.renderOrder = 1, this.add(this.mullions), t) {
3723
+ let e = a.width ?? 4.5, t = a.height ?? 5.5, o = new D({
3753
3724
  color: new c(n),
3754
3725
  emissive: r ? new c(r) : new c(0),
3755
3726
  emissiveIntensity: i,
@@ -3761,30 +3732,30 @@ var ur = class extends i {
3761
3732
  thickness: .02,
3762
3733
  side: p
3763
3734
  });
3764
- this.glass = new w(new j(e, t), o), this.glass.renderOrder = 0, this.glass.castShadow = !1, this.glass.receiveShadow = !1, this.add(this.glass);
3735
+ this.glass = new T(new M(e, t), o), this.glass.renderOrder = 0, this.glass.castShadow = !1, this.glass.receiveShadow = !1, this.add(this.glass);
3765
3736
  }
3766
3737
  }
3767
- }, Tr = class extends w {
3738
+ }, Dr = class extends T {
3768
3739
  width;
3769
3740
  height;
3770
3741
  depth;
3771
3742
  coverThickness;
3772
3743
  pageIndent;
3773
3744
  constructor({ coverColor: e = "#8b0000", pageColor: t = "#ffffff", ...n } = {}) {
3774
- let r = new mt(n);
3775
- super(r, [new D({
3745
+ let r = new ht(n);
3746
+ super(r, [new O({
3776
3747
  color: new c(e),
3777
3748
  metalness: .1,
3778
3749
  roughness: .7,
3779
3750
  flatShading: !0
3780
- }), new D({
3751
+ }), new O({
3781
3752
  color: new c(t),
3782
3753
  flatShading: !0
3783
3754
  })]), this.width = r.width, this.height = r.height, this.depth = r.depth, this.coverThickness = r.coverThickness, this.pageIndent = r.pageIndent;
3784
3755
  }
3785
- }, Er = class extends w {
3756
+ }, Or = class extends T {
3786
3757
  constructor() {
3787
- super(new Cn(), [new D({
3758
+ super(new Tn(), [new O({
3788
3759
  color: 8965290,
3789
3760
  transparent: !0,
3790
3761
  depthWrite: !1,
@@ -3792,15 +3763,15 @@ var ur = class extends i {
3792
3763
  roughness: .1,
3793
3764
  metalness: .5,
3794
3765
  side: p
3795
- }), new D({
3766
+ }), new O({
3796
3767
  color: 9127187,
3797
3768
  roughness: 1
3798
3769
  })]);
3799
3770
  }
3800
- }, Dr = class extends w {
3771
+ }, kr = class extends T {
3801
3772
  constructor() {
3802
- super(new Dn(), [
3803
- new D({
3773
+ super(new kn(), [
3774
+ new O({
3804
3775
  color: 8965375,
3805
3776
  transparent: !0,
3806
3777
  depthWrite: !1,
@@ -3808,21 +3779,21 @@ var ur = class extends i {
3808
3779
  roughness: .1,
3809
3780
  metalness: .3
3810
3781
  }),
3811
- new D({
3782
+ new O({
3812
3783
  color: 9127187,
3813
3784
  roughness: 1
3814
3785
  }),
3815
- new D({
3816
- color: Ae.PINK_SHERBET,
3786
+ new O({
3787
+ color: je.PINK_SHERBET,
3817
3788
  transparent: !0,
3818
3789
  depthWrite: !1,
3819
3790
  opacity: .5
3820
3791
  })
3821
3792
  ]);
3822
3793
  }
3823
- }, Or = class extends w {
3794
+ }, Ar = class extends T {
3824
3795
  constructor({ color: e = "#556b2f", ...t } = {}) {
3825
- super(new On(t), new E({
3796
+ super(new An(t), new D({
3826
3797
  color: new c(e),
3827
3798
  roughness: .1,
3828
3799
  transmission: .9,
@@ -3832,106 +3803,106 @@ var ur = class extends i {
3832
3803
  clearcoatRoughness: .1
3833
3804
  }));
3834
3805
  }
3835
- }, kr = class extends w {
3806
+ }, jr = class extends T {
3836
3807
  width;
3837
3808
  height;
3838
3809
  constructor({ color: e = "#777777", roughness: t = .8, ...n } = {}) {
3839
- let r = new kn(n);
3840
- super(r, new D({
3810
+ let r = new jn(n);
3811
+ super(r, new O({
3841
3812
  color: new c(e),
3842
3813
  roughness: t
3843
3814
  })), this.width = r.width, this.height = r.height;
3844
3815
  }
3845
- }, Ar = class extends w {
3816
+ }, Mr = class extends T {
3846
3817
  constructor() {
3847
- super(new An(), [
3848
- new D({
3818
+ super(new Mn(), [
3819
+ new O({
3849
3820
  color: 8421504,
3850
3821
  flatShading: !0
3851
3822
  }),
3852
- new D({
3823
+ new O({
3853
3824
  color: 6908265,
3854
3825
  flatShading: !0
3855
3826
  }),
3856
- new D({
3827
+ new O({
3857
3828
  color: 5263440,
3858
3829
  flatShading: !0
3859
3830
  }),
3860
- new D({
3831
+ new O({
3861
3832
  color: 4210752,
3862
3833
  flatShading: !0
3863
3834
  })
3864
3835
  ]);
3865
3836
  }
3866
- }, jr = class extends w {
3837
+ }, Nr = class extends T {
3867
3838
  totalHeight;
3868
3839
  constructor({ color: e = "#777777", roughness: t = .8, ...n } = {}) {
3869
- let r = new jn(n);
3870
- super(r, new D({
3840
+ let r = new Nn(n);
3841
+ super(r, new O({
3871
3842
  color: new c(e),
3872
3843
  roughness: t
3873
3844
  })), this.totalHeight = r.totalHeight;
3874
3845
  }
3875
- }, Mr = class extends w {
3846
+ }, Pr = class extends T {
3876
3847
  constructor(e = .6, t = 1, n = .2, r = .6) {
3877
- super(new Mn(e, t, n, r), new D({
3848
+ super(new Pn(e, t, n, r), new O({
3878
3849
  color: 7829367,
3879
3850
  roughness: .8
3880
3851
  }));
3881
3852
  }
3882
- }, Nr = class extends w {
3853
+ }, Fr = class extends T {
3883
3854
  constructor(e = .5, t = .8, n = .15) {
3884
- super(new Nn(e, t, n), new D({
3855
+ super(new Fn(e, t, n), new O({
3885
3856
  color: 7829367,
3886
3857
  roughness: .8
3887
3858
  }));
3888
3859
  }
3889
- }, Pr = class extends w {
3860
+ }, Ir = class extends T {
3890
3861
  height;
3891
3862
  constructor({ color: e = "#8b7d7b", ...t } = {}) {
3892
- let n = new Pn(t);
3893
- super(n, new D({
3863
+ let n = new In(t);
3864
+ super(n, new O({
3894
3865
  color: new c(e),
3895
3866
  flatShading: !0
3896
3867
  })), this.height = n.height;
3897
3868
  }
3898
- }, Fr = class extends w {
3869
+ }, Lr = class extends T {
3899
3870
  barHeight;
3900
3871
  constructor({ color: e = "#333333", ...t } = {}) {
3901
- let n = new Fn(t);
3902
- super(n, new D({
3872
+ let n = new Ln(t);
3873
+ super(n, new O({
3903
3874
  color: new c(e),
3904
3875
  metalness: .8,
3905
3876
  roughness: .4
3906
3877
  })), this.barHeight = n.barHeight;
3907
3878
  }
3908
- }, Ir = class extends w {
3879
+ }, Rr = class extends T {
3909
3880
  count;
3910
3881
  constructor({ color: e = "#333333", ...t } = {}) {
3911
- let n = new In(t);
3912
- super(n, new D({
3882
+ let n = new Rn(t);
3883
+ super(n, new O({
3913
3884
  color: new c(e),
3914
3885
  metalness: .8,
3915
3886
  roughness: .4
3916
3887
  })), this.count = n.count;
3917
3888
  }
3918
- }, Lr = class extends w {
3889
+ }, zr = class extends T {
3919
3890
  width;
3920
3891
  height;
3921
3892
  constructor({ color: e = "#8b4513", ...t } = {}) {
3922
- let n = new Ln(t);
3923
- super(n, new D({ color: new c(e) })), this.width = n.width, this.height = n.height;
3893
+ let n = new zn(t);
3894
+ super(n, new O({ color: new c(e) })), this.width = n.width, this.height = n.height;
3924
3895
  }
3925
- }, Rr = class extends w {
3896
+ }, Br = class extends T {
3926
3897
  constructor() {
3927
- super(new Rn(), [new D({ color: 9132587 }), new D({ color: 4929057 })]);
3898
+ super(new Bn(), [new O({ color: 9132587 }), new O({ color: 4929057 })]);
3928
3899
  }
3929
- }, zr = class extends w {
3900
+ }, Vr = class extends T {
3930
3901
  size;
3931
3902
  lift;
3932
3903
  constructor({ color: e = "#a8702c", ...t } = {}) {
3933
- let n = new zn(t);
3934
- super(n, new D({
3904
+ let n = new Vn(t);
3905
+ super(n, new O({
3935
3906
  color: new c(e),
3936
3907
  roughness: .85,
3937
3908
  metalness: .05,
@@ -3939,14 +3910,14 @@ var ur = class extends i {
3939
3910
  side: p
3940
3911
  })), this.size = n.size, this.lift = n.lift;
3941
3912
  }
3942
- }, Br = class extends w {
3913
+ }, Hr = class extends T {
3943
3914
  height;
3944
3915
  constructor({ stickColor: e = "#ffffff", flameColor: t = "#ffd700", flameEmissive: n = "#ffa500", flameEmissiveIntensity: r = .35, ...i } = {}) {
3945
- let a = new Vn(i);
3946
- super(a, [new D({
3916
+ let a = new Un(i);
3917
+ super(a, [new O({
3947
3918
  color: new c(e),
3948
3919
  flatShading: !0
3949
- }), new D({
3920
+ }), new O({
3950
3921
  color: new c(t),
3951
3922
  emissive: new c(n),
3952
3923
  emissiveIntensity: r,
@@ -3954,14 +3925,14 @@ var ur = class extends i {
3954
3925
  toneMapped: !1
3955
3926
  })]), this.height = a.height;
3956
3927
  }
3957
- }, Vr = class extends w {
3928
+ }, Ur = class extends T {
3958
3929
  height;
3959
3930
  radius;
3960
3931
  segmentsU;
3961
3932
  segmentsV;
3962
3933
  constructor({ color: e = "#ffd700", emissive: t = "#ffa500", emissiveIntensity: n = .35, ...r } = {}) {
3963
- let i = new Bn(r);
3964
- super(i, new D({
3934
+ let i = new Hn(r);
3935
+ super(i, new O({
3965
3936
  color: new c(e),
3966
3937
  emissive: new c(t),
3967
3938
  emissiveIntensity: n,
@@ -3969,25 +3940,25 @@ var ur = class extends i {
3969
3940
  toneMapped: !1
3970
3941
  })), this.height = i.height, this.radius = i.radius, this.segmentsU = i.segmentsU, this.segmentsV = i.segmentsV;
3971
3942
  }
3972
- }, Hr = class extends w {
3943
+ }, Wr = class extends T {
3973
3944
  drop;
3974
3945
  cageCenterY;
3975
3946
  constructor({ color: e = "#171a1f", mountColor: t, cageColor: n, lampColor: r = "#ffb45a", lampEmissiveIntensity: i = 1.4, lampOpacity: a = .88, inner: o = !0, ...s } = {}) {
3976
- let l = new Gn({
3947
+ let l = new qn({
3977
3948
  inner: o,
3978
3949
  ...s
3979
- }), u = new c(r), d = [new D({
3950
+ }), u = new c(r), d = [new O({
3980
3951
  color: new c(t ?? e),
3981
3952
  metalness: .7,
3982
3953
  roughness: .5,
3983
3954
  flatShading: !0
3984
- }), new D({
3955
+ }), new O({
3985
3956
  color: new c(n ?? e),
3986
3957
  metalness: .7,
3987
3958
  roughness: .5,
3988
3959
  flatShading: !0
3989
3960
  })];
3990
- o && d.push(new D({
3961
+ o && d.push(new O({
3991
3962
  color: u,
3992
3963
  emissive: u,
3993
3964
  emissiveIntensity: i,
@@ -4000,26 +3971,26 @@ var ur = class extends i {
4000
3971
  toneMapped: !1
4001
3972
  })), super(l, d), this.drop = l.drop, this.cageCenterY = l.cageCenterY;
4002
3973
  }
4003
- }, Ur = class extends w {
3974
+ }, Gr = class extends T {
4004
3975
  lightCenterX;
4005
3976
  lightCenterY;
4006
3977
  lightCenterZ;
4007
3978
  constructor({ color: e = "#1c1e24", mountColor: t, frameColor: n, lampColor: r = "#e8a058", lampEmissiveIntensity: i = 1.4, lampOpacity: a = .88, inner: o = !0, ...s } = {}) {
4008
- let l = new Kn({
3979
+ let l = new Jn({
4009
3980
  inner: o,
4010
3981
  ...s
4011
- }), u = new c(r), d = [new D({
3982
+ }), u = new c(r), d = [new O({
4012
3983
  color: new c(t ?? e),
4013
3984
  metalness: .65,
4014
3985
  roughness: .55,
4015
3986
  flatShading: !0
4016
- }), new D({
3987
+ }), new O({
4017
3988
  color: new c(n ?? e),
4018
3989
  metalness: .65,
4019
3990
  roughness: .55,
4020
3991
  flatShading: !0
4021
3992
  })];
4022
- o && d.push(new D({
3993
+ o && d.push(new O({
4023
3994
  color: u,
4024
3995
  emissive: u,
4025
3996
  emissiveIntensity: i,
@@ -4032,19 +4003,19 @@ var ur = class extends i {
4032
4003
  toneMapped: !1
4033
4004
  })), super(l, d), this.lightCenterX = l.lightCenterX, this.lightCenterY = l.lightCenterY, this.lightCenterZ = l.lightCenterZ;
4034
4005
  }
4035
- }, Wr = class extends w {
4006
+ }, Kr = class extends T {
4036
4007
  lampCenterY;
4037
4008
  constructor({ color: e = "#8b4513", lampColor: t = "#ffd700", lampEmissiveIntensity: n = 1.2, lampOpacity: r = .75, inner: i = !0, ...a } = {}) {
4038
- let o = new Hn({
4009
+ let o = new Wn({
4039
4010
  inner: i,
4040
4011
  ...a
4041
- }), s = new c(t), l = [new D({
4012
+ }), s = new c(t), l = [new O({
4042
4013
  color: new c(e),
4043
4014
  roughness: .85,
4044
4015
  metalness: .04,
4045
4016
  flatShading: !0
4046
4017
  })];
4047
- i && l.push(new D({
4018
+ i && l.push(new O({
4048
4019
  color: s,
4049
4020
  emissive: s,
4050
4021
  emissiveIntensity: n,
@@ -4057,52 +4028,52 @@ var ur = class extends i {
4057
4028
  toneMapped: !1
4058
4029
  })), super(o, l), this.lampCenterY = o.lampCenterY;
4059
4030
  }
4060
- }, Gr = class extends w {
4031
+ }, qr = class extends T {
4061
4032
  radius;
4062
4033
  constructor({ color: e = "#6f6f6f", flatShading: t = !0, ...n } = {}) {
4063
- let r = new Et(n);
4064
- super(r, new D({
4034
+ let r = new Ot(n);
4035
+ super(r, new O({
4065
4036
  color: new c(e),
4066
4037
  roughness: 1,
4067
4038
  metalness: 0,
4068
4039
  flatShading: t
4069
4040
  })), this.radius = r.radius, this.castShadow = !0, this.receiveShadow = !0;
4070
4041
  }
4071
- }, Kr = class extends w {
4042
+ }, Jr = class extends T {
4072
4043
  constructor({ rockColor: e = "#808080", mossColor: t = "#4b8b3b", mossOpacity: n = .8, ...r } = {}) {
4073
- super(new Mt(r), [new D({
4044
+ super(new Pt(r), [new O({
4074
4045
  color: new c(e),
4075
4046
  flatShading: !0
4076
- }), new D({
4047
+ }), new O({
4077
4048
  color: new c(t),
4078
4049
  flatShading: !0,
4079
4050
  opacity: n,
4080
4051
  transparent: n < 1
4081
4052
  })]);
4082
4053
  }
4083
- }, qr = class extends w {
4054
+ }, Yr = class extends T {
4084
4055
  constructor({ color: e = "#808080", ...t } = {}) {
4085
- super(new Pt(t), new D({
4056
+ super(new It(t), new O({
4086
4057
  color: new c(e),
4087
4058
  flatShading: !0
4088
4059
  }));
4089
4060
  }
4090
- }, Jr = class extends v {
4061
+ }, Xr = class extends v {
4091
4062
  constructor() {
4092
4063
  super();
4093
- let e = new w(new u(.3, .4, .1, 16), new D({
4064
+ let e = new T(new u(.3, .4, .1, 16), new O({
4094
4065
  color: 3355443,
4095
4066
  roughness: .6,
4096
4067
  metalness: .3
4097
4068
  }));
4098
4069
  e.position.y = .05;
4099
- let t = new w(new u(.1, .1, .7, 16), new D({
4070
+ let t = new T(new u(.1, .1, .7, 16), new O({
4100
4071
  color: 5592405,
4101
4072
  roughness: .5,
4102
4073
  metalness: .4
4103
4074
  }));
4104
4075
  t.position.y = .4;
4105
- let n = new w(new l(.075, .2, 16), new D({
4076
+ let n = new T(new l(.075, .2, 16), new O({
4106
4077
  color: 16733440,
4107
4078
  emissive: 16733440,
4108
4079
  emissiveIntensity: .6,
@@ -4111,38 +4082,38 @@ var ur = class extends i {
4111
4082
  }));
4112
4083
  n.position.y = .8, this.add(e, t, n);
4113
4084
  }
4114
- }, Yr = class extends v {
4085
+ }, Zr = class extends v {
4115
4086
  constructor() {
4116
4087
  super();
4117
- let e = new n(3, 4, .1), t = new D({
4088
+ let e = new n(3, 4, .1), t = new O({
4118
4089
  color: 3026478,
4119
4090
  roughness: .8,
4120
4091
  metalness: .6
4121
- }), r = new n(.2, .5, .2), i = new D({
4092
+ }), r = new n(.2, .5, .2), i = new O({
4122
4093
  color: 11184810,
4123
4094
  roughness: .5,
4124
4095
  metalness: .7
4125
- }), a = new u(.3, .3, .1, 16), o = new D({
4096
+ }), a = new u(.3, .3, .1, 16), o = new O({
4126
4097
  color: 5592405,
4127
4098
  roughness: .7,
4128
4099
  metalness: .5
4129
- }), s = new w(e, t);
4100
+ }), s = new T(e, t);
4130
4101
  for (let e = -1; e <= 1; e++) {
4131
- let t = new w(r, i);
4102
+ let t = new T(r, i);
4132
4103
  t.position.set(e, 1.5, .1), s.add(t);
4133
4104
  }
4134
- let c = new w(a, o);
4105
+ let c = new T(a, o);
4135
4106
  c.rotation.x = Math.PI / 2, c.position.set(0, .5, .15), s.add(c);
4136
- let l = new w(new P(.15, 8, 8), new D({
4107
+ let l = new T(new F(.15, 8, 8), new O({
4137
4108
  color: 16711680,
4138
4109
  emissive: 16711680,
4139
4110
  emissiveIntensity: .5
4140
4111
  }));
4141
4112
  l.position.set(0, -1, .1), s.add(l), this.add(s);
4142
4113
  }
4143
- }, Xr = class extends w {
4114
+ }, Qr = class extends T {
4144
4115
  constructor({ color: e = "#88ccff", opacity: t = .4, ...n } = {}) {
4145
- super(new tr(n), new E({
4116
+ super(new rr(n), new D({
4146
4117
  color: new c(e),
4147
4118
  transparent: !0,
4148
4119
  opacity: t,
@@ -4153,9 +4124,9 @@ var ur = class extends i {
4153
4124
  side: p
4154
4125
  }));
4155
4126
  }
4156
- }, Zr = class extends w {
4127
+ }, $r = class extends T {
4157
4128
  constructor() {
4158
- super(new ur(), new E({
4129
+ super(new fr(), new D({
4159
4130
  color: 8965375,
4160
4131
  transparent: !0,
4161
4132
  depthWrite: !1,
@@ -4167,96 +4138,96 @@ var ur = class extends i {
4167
4138
  side: p
4168
4139
  }));
4169
4140
  }
4170
- }, Qr = class extends v {
4141
+ }, ei = class extends v {
4171
4142
  constructor() {
4172
4143
  super();
4173
- let e = new w(new n(2, 3, .1), new D({
4144
+ let e = new T(new n(2, 3, .1), new O({
4174
4145
  color: 3355443,
4175
4146
  roughness: .8,
4176
4147
  metalness: .5
4177
- })), t = new u(.1, .1, .2, 8), r = new u(.05, .05, 1, 8), i = new D({
4148
+ })), t = new u(.1, .1, .2, 8), r = new u(.05, .05, 1, 8), i = new O({
4178
4149
  color: 11184810,
4179
4150
  roughness: .5,
4180
4151
  metalness: .7
4181
4152
  }), a = [];
4182
4153
  for (let e = -.5; e <= .5; e += .5) {
4183
- let n = new w(t, i);
4154
+ let n = new T(t, i);
4184
4155
  n.position.set(e, 1, .1);
4185
- let o = new w(r, i);
4156
+ let o = new T(r, i);
4186
4157
  o.position.y = .5, n.add(o), a.push(o), this.add(n);
4187
4158
  }
4188
4159
  this.add(e);
4189
4160
  }
4190
- }, $r = class extends v {
4161
+ }, ti = class extends v {
4191
4162
  constructor() {
4192
4163
  super();
4193
- let e = new n(1, .2, .5), t = new D({
4164
+ let e = new n(1, .2, .5), t = new O({
4194
4165
  color: 4473924,
4195
4166
  roughness: .6,
4196
4167
  metalness: .3
4197
- }), r = new w(e, t);
4168
+ }), r = new T(e, t);
4198
4169
  r.position.y = .1;
4199
- let i = new w(new n(.2, 1, .2), t);
4170
+ let i = new T(new n(.2, 1, .2), t);
4200
4171
  i.position.set(0, .6, -.2);
4201
- let a = new w(new u(.1, .1, .4, 8), new D({
4172
+ let a = new T(new u(.1, .1, .4, 8), new O({
4202
4173
  color: 3355443,
4203
4174
  roughness: .5,
4204
4175
  metalness: .6
4205
4176
  }));
4206
4177
  a.position.set(0, 1.1, -.35), a.rotation.x = -Math.PI / 4;
4207
- let o = new w(new n(.6, .1, .6), new D({
4178
+ let o = new T(new n(.6, .1, .6), new O({
4208
4179
  color: 5592405,
4209
4180
  roughness: .8,
4210
4181
  metalness: .2
4211
4182
  }));
4212
4183
  o.position.set(0, .6, 0), this.add(r, i, a, o);
4213
4184
  }
4214
- }, ei = class extends v {
4185
+ }, ni = class extends v {
4215
4186
  constructor() {
4216
4187
  super();
4217
- let e = new dr(), t = new u(.2, .3, 1.5, 8);
4188
+ let e = new pr(), t = new u(.2, .3, 1.5, 8);
4218
4189
  t.translate(0, .75, 0);
4219
- let n = new D({
4190
+ let n = new O({
4220
4191
  color: 6045747,
4221
4192
  roughness: 1,
4222
4193
  metalness: 0,
4223
4194
  side: p
4224
- }), r = new D({
4195
+ }), r = new O({
4225
4196
  color: 9132587,
4226
4197
  roughness: .8,
4227
4198
  metalness: .1
4228
- }), i = new w(e, n);
4199
+ }), i = new T(e, n);
4229
4200
  i.castShadow = !0;
4230
- let a = new w(t, r);
4201
+ let a = new T(t, r);
4231
4202
  a.castShadow = !0, a.position.set(.3, 1.3, 0), a.rotation.z = Math.PI / 4, this.add(i, a);
4232
4203
  }
4233
- }, ti = class extends w {
4204
+ }, ri = class extends T {
4234
4205
  geometry;
4235
4206
  material;
4236
4207
  constructor({ width: e = 3, height: t = 4, depth: r = .1 } = {}) {
4237
- super(), this.geometry = new n(e, t, r), this.material = new D({
4208
+ super(), this.geometry = new n(e, t, r), this.material = new O({
4238
4209
  color: 3026478,
4239
4210
  roughness: .8,
4240
4211
  metalness: .6
4241
4212
  });
4242
4213
  }
4243
- }, ni = class extends w {
4214
+ }, ii = class extends T {
4244
4215
  geometry;
4245
4216
  material;
4246
4217
  constructor({ radius: e = .15, color: t = 16762823, emissive: n = 16711680, emissiveIntensity: r = .5 } = {}) {
4247
- super(), this.geometry = new P(e, 8, 8), this.material = new D({
4218
+ super(), this.geometry = new F(e, 8, 8), this.material = new O({
4248
4219
  color: t,
4249
4220
  emissive: n,
4250
4221
  emissiveIntensity: r
4251
4222
  });
4252
4223
  }
4253
- }, ri = class extends v {
4224
+ }, ai = class extends v {
4254
4225
  constructor() {
4255
4226
  super();
4256
- let e = new w(new le(new o(Array.from({ length: 100 }, (e, t) => {
4227
+ let e = new T(new se(new o(Array.from({ length: 100 }, (e, t) => {
4257
4228
  let n = t * .2;
4258
- return new I(Math.cos(n) * .4, t * .05, Math.sin(n) * .4);
4259
- })), 200, .1, 8, !1), new D({
4229
+ return new L(Math.cos(n) * .4, t * .05, Math.sin(n) * .4);
4230
+ })), 200, .1, 8, !1), new O({
4260
4231
  color: 8965375,
4261
4232
  transparent: !0,
4262
4233
  opacity: .3,
@@ -4267,30 +4238,30 @@ var ur = class extends i {
4267
4238
  }));
4268
4239
  this.add(e);
4269
4240
  }
4270
- }, ii = class extends w {
4241
+ }, oi = class extends T {
4271
4242
  constructor({ color: e = "#888888", ...t } = {}) {
4272
- super(new fr(t), new D({
4243
+ super(new mr(t), new O({
4273
4244
  color: new c(e),
4274
4245
  roughness: .7,
4275
4246
  metalness: .3
4276
4247
  }));
4277
4248
  }
4278
- }, ai = class extends w {
4249
+ }, si = class extends T {
4279
4250
  constructor() {
4280
- super(new pr(), [new D({
4251
+ super(new hr(), [new O({
4281
4252
  color: 3355443,
4282
4253
  roughness: .6,
4283
4254
  metalness: .5
4284
- }), new D({
4255
+ }), new O({
4285
4256
  color: 16737792,
4286
4257
  roughness: .5,
4287
4258
  metalness: .8,
4288
4259
  side: p
4289
4260
  })]);
4290
4261
  }
4291
- }, oi = class extends w {
4262
+ }, ci = class extends T {
4292
4263
  constructor(e = .2, t = .2, n = 3, r = 32) {
4293
- super(new mr(e, t, n, r), new E({
4264
+ super(new gr(e, t, n, r), new D({
4294
4265
  color: 8965375,
4295
4266
  transparent: !0,
4296
4267
  opacity: .4,
@@ -4302,7 +4273,7 @@ var ur = class extends i {
4302
4273
  side: p
4303
4274
  }));
4304
4275
  }
4305
- }, si = class extends v {
4276
+ }, li = class extends v {
4306
4277
  count;
4307
4278
  constructor({ count: e = 3, colors: t = [
4308
4279
  "#00ffaa",
@@ -4310,13 +4281,13 @@ var ur = class extends i {
4310
4281
  "#aa00ff"
4311
4282
  ] } = {}) {
4312
4283
  super(), this.count = e;
4313
- let r = new w(new n(3, .2, 1), new D({
4284
+ let r = new T(new n(3, .2, 1), new O({
4314
4285
  color: 9127187,
4315
4286
  roughness: .7,
4316
4287
  metalness: .3
4317
4288
  }));
4318
4289
  r.position.y = .5, r.castShadow = !0;
4319
- let i = new mr(.1, .1, 1, 16), a = new D({
4290
+ let i = new gr(.1, .1, 1, 16), a = new O({
4320
4291
  color: 11184810,
4321
4292
  transparent: !0,
4322
4293
  opacity: .4,
@@ -4326,9 +4297,9 @@ var ur = class extends i {
4326
4297
  side: p
4327
4298
  });
4328
4299
  for (let n = 0; n < e; n++) {
4329
- let o = new w(i, a), s = (n - (e - 1) / 2) * .8;
4300
+ let o = new T(i, a), s = (n - (e - 1) / 2) * .8;
4330
4301
  o.position.set(s, 1, 0), o.castShadow = !0, o.renderOrder = 2;
4331
- let l = new mr(.099, .099, .5, 16, !1), u = t[n % t.length], d = new w(l, new D({
4302
+ let l = new gr(.099, .099, .5, 16, !1), u = t[n % t.length], d = new T(l, new O({
4332
4303
  color: new c(u),
4333
4304
  emissive: new c(u),
4334
4305
  emissiveIntensity: .5,
@@ -4341,9 +4312,9 @@ var ur = class extends i {
4341
4312
  }
4342
4313
  this.add(r);
4343
4314
  }
4344
- }, ci = class extends w {
4315
+ }, ui = class extends T {
4345
4316
  constructor({ color: e = "#ffff00", emissive: t = "#ffd700", emissiveIntensity: n = .25, ...r } = {}) {
4346
- super(new st(r), new D({
4317
+ super(new ct(r), new O({
4347
4318
  color: new c(e),
4348
4319
  emissive: new c(t),
4349
4320
  emissiveIntensity: n,
@@ -4352,17 +4323,17 @@ var ur = class extends i {
4352
4323
  flatShading: !0
4353
4324
  }));
4354
4325
  }
4355
- }, li = class extends w {
4326
+ }, di = class extends T {
4356
4327
  constructor({ color: e = "#aaaaaa", ...t } = {}) {
4357
- super(new Yn(t), new D({
4328
+ super(new Zn(t), new O({
4358
4329
  color: new c(e),
4359
4330
  metalness: .8,
4360
4331
  roughness: .2
4361
4332
  }));
4362
4333
  }
4363
- }, ui = class extends w {
4334
+ }, fi = class extends T {
4364
4335
  constructor({ color: e = "#c62828", emissive: t = "#c61416", emissiveIntensity: n = .25, ...r } = {}) {
4365
- super(new Zn(r), new D({
4336
+ super(new $n(r), new O({
4366
4337
  color: new c(e),
4367
4338
  emissive: new c(t),
4368
4339
  emissiveIntensity: n,
@@ -4371,9 +4342,9 @@ var ur = class extends i {
4371
4342
  flatShading: !0
4372
4343
  }));
4373
4344
  }
4374
- }, di = class extends w {
4345
+ }, pi = class extends T {
4375
4346
  constructor({ color: e = "#ffffff", emissive: t = "#ffffff", emissiveIntensity: n = .1, ...r } = {}) {
4376
- super(new kt(r), new D({
4347
+ super(new jt(r), new O({
4377
4348
  color: new c(e),
4378
4349
  emissive: new c(t),
4379
4350
  emissiveIntensity: n,
@@ -4382,9 +4353,9 @@ var ur = class extends i {
4382
4353
  flatShading: !0
4383
4354
  }));
4384
4355
  }
4385
- }, fi = class extends w {
4356
+ }, mi = class extends T {
4386
4357
  constructor({ color: e = "#ffff00", emissive: t = "#ffd700", emissiveIntensity: n = .25, ...r } = {}) {
4387
- super(new $n(r), new D({
4358
+ super(new tr(r), new O({
4388
4359
  color: new c(e),
4389
4360
  emissive: new c(t),
4390
4361
  emissiveIntensity: n,
@@ -4393,32 +4364,32 @@ var ur = class extends i {
4393
4364
  flatShading: !0
4394
4365
  }));
4395
4366
  }
4396
- }, pi = class extends w {
4367
+ }, hi = class extends T {
4397
4368
  constructor() {
4398
- super(new er(), new D({ color: 16777215 }));
4369
+ super(new nr(), new O({ color: 16777215 }));
4399
4370
  }
4400
- }, mi = class extends w {
4371
+ }, gi = class extends T {
4401
4372
  trunkHeight;
4402
4373
  constructor({ trunkColor: e = "#8b4513", leafColor: t = "#228b22", ...n } = {}) {
4403
- let r = new _r(n);
4404
- super(r, [new D({
4374
+ let r = new yr(n);
4375
+ super(r, [new O({
4405
4376
  color: new c(e),
4406
4377
  roughness: .9,
4407
4378
  metalness: 0,
4408
4379
  flatShading: !0
4409
- }), new D({
4380
+ }), new O({
4410
4381
  color: new c(t),
4411
4382
  roughness: .8,
4412
4383
  metalness: 0,
4413
4384
  flatShading: !0
4414
4385
  })]), this.trunkHeight = r.trunkHeight;
4415
4386
  }
4416
- }, hi = class extends w {
4387
+ }, _i = class extends T {
4417
4388
  radius;
4418
4389
  height;
4419
4390
  constructor({ color: e = "#3a5a3a", flatShading: t = !0, ...n } = {}) {
4420
- let r = new hr(n);
4421
- super(r, new D({
4391
+ let r = new _r(n);
4392
+ super(r, new O({
4422
4393
  color: new c(e),
4423
4394
  roughness: 1,
4424
4395
  metalness: 0,
@@ -4426,12 +4397,12 @@ var ur = class extends i {
4426
4397
  side: p
4427
4398
  })), this.radius = r.radius, this.height = r.height, this.castShadow = !0, this.receiveShadow = !0;
4428
4399
  }
4429
- }, gi = class extends w {
4400
+ }, vi = class extends T {
4430
4401
  width;
4431
4402
  depth;
4432
4403
  constructor({ color: e = "#3a5a3a", flatShading: t = !0, ...n } = {}) {
4433
- let r = new gr(n);
4434
- super(r, new D({
4404
+ let r = new vr(n);
4405
+ super(r, new O({
4435
4406
  color: new c(e),
4436
4407
  roughness: 1,
4437
4408
  metalness: 0,
@@ -4439,52 +4410,52 @@ var ur = class extends i {
4439
4410
  side: p
4440
4411
  })), this.width = r.width, this.depth = r.depth, this.castShadow = !0, this.receiveShadow = !0;
4441
4412
  }
4442
- }, _i = (e) => {
4413
+ }, yi = (e) => {
4443
4414
  let t = new Uint8Array(4 * e * e);
4444
4415
  for (let n = 0; n < e * e; n++) {
4445
4416
  let r = n * 4, i = (n % e ^ Math.floor(n / e)) & 1 ? 255 : 0;
4446
4417
  t[r] = i, t[r + 1] = i, t[r + 2] = i, t[r + 3] = 255;
4447
4418
  }
4448
- let n = new d(t, e, e, ie, ue);
4449
- return n.wrapS = ae, n.wrapT = ae, n.minFilter = ee, n.needsUpdate = !0, n;
4419
+ let n = new d(t, e, e, ne, ce);
4420
+ return n.wrapS = re, n.wrapT = re, n.minFilter = k, n.needsUpdate = !0, n;
4450
4421
  };
4451
4422
  //#endregion
4452
4423
  //#region src/utils/AlignToEdge.ts
4453
- function vi(e, n) {
4424
+ function bi(e, n) {
4454
4425
  if (e.length === 0) throw Error("No objects provided for alignment.");
4455
- let r = new t(), i = new I(), a = e.map((e) => (r.setFromObject(e), e.getWorldPosition(i), {
4426
+ let r = new t(), i = new L(), a = e.map((e) => (r.setFromObject(e), e.getWorldPosition(i), {
4456
4427
  object: e,
4457
4428
  boundingBox: r.clone(),
4458
4429
  worldPosition: i.clone()
4459
4430
  })), o = a.reduce((e, { boundingBox: t }) => {
4460
4431
  switch (n) {
4461
- case U.LEFT: return Math.min(e, t.min.x);
4462
- case U.RIGHT: return Math.max(e, t.max.x);
4463
- case U.BOTTOM: return Math.min(e, t.min.y);
4464
- case U.TOP: return Math.max(e, t.max.y);
4465
- case U.BACK: return Math.min(e, t.min.z);
4466
- case U.FRONT: return Math.max(e, t.max.z);
4432
+ case W.LEFT: return Math.min(e, t.min.x);
4433
+ case W.RIGHT: return Math.max(e, t.max.x);
4434
+ case W.BOTTOM: return Math.min(e, t.min.y);
4435
+ case W.TOP: return Math.max(e, t.max.y);
4436
+ case W.BACK: return Math.min(e, t.min.z);
4437
+ case W.FRONT: return Math.max(e, t.max.z);
4467
4438
  default: throw Error(`Unsupported side type: ${n}`);
4468
4439
  }
4469
- }, n === U.RIGHT || n === U.TOP || n === U.FRONT ? -Infinity : Infinity);
4440
+ }, n === W.RIGHT || n === W.TOP || n === W.FRONT ? -Infinity : Infinity);
4470
4441
  a.forEach(({ object: e, boundingBox: t }) => {
4471
4442
  switch (n) {
4472
- case U.LEFT:
4443
+ case W.LEFT:
4473
4444
  e.position.x += o - t.min.x;
4474
4445
  break;
4475
- case U.RIGHT:
4446
+ case W.RIGHT:
4476
4447
  e.position.x += o - t.max.x;
4477
4448
  break;
4478
- case U.BOTTOM:
4449
+ case W.BOTTOM:
4479
4450
  e.position.y += o - t.min.y;
4480
4451
  break;
4481
- case U.TOP:
4452
+ case W.TOP:
4482
4453
  e.position.y += o - t.max.y;
4483
4454
  break;
4484
- case U.BACK:
4455
+ case W.BACK:
4485
4456
  e.position.z += o - t.min.z;
4486
4457
  break;
4487
- case U.FRONT:
4458
+ case W.FRONT:
4488
4459
  e.position.z += o - t.max.z;
4489
4460
  break;
4490
4461
  }
@@ -4492,11 +4463,11 @@ function vi(e, n) {
4492
4463
  }
4493
4464
  //#endregion
4494
4465
  //#region src/utils/AlignToRow.ts
4495
- function yi(e, n = V.RIGHT, r = 0) {
4496
- let i = n.clone().normalize(), a = new I(), o = new t();
4466
+ function xi(e, n = H.RIGHT, r = 0) {
4467
+ let i = n.clone().normalize(), a = new L(), o = new t();
4497
4468
  e.forEach((e) => {
4498
4469
  o.setFromObject(e);
4499
- let t = new I(o.max.x - o.min.x, o.max.y - o.min.y, o.max.z - o.min.z).dot(i), n = new I();
4470
+ let t = new L(o.max.x - o.min.x, o.max.y - o.min.y, o.max.z - o.min.z).dot(i), n = new L();
4500
4471
  o.getCenter(n);
4501
4472
  let s = i.clone().multiplyScalar(t / 2);
4502
4473
  e.position.copy(a.clone().add(s).sub(n).add(e.position)), a.add(i.clone().multiplyScalar(t + r));
@@ -4504,17 +4475,17 @@ function yi(e, n = V.RIGHT, r = 0) {
4504
4475
  }
4505
4476
  //#endregion
4506
4477
  //#region src/utils/AlignToSurface.ts
4507
- function bi(e, n, r = new I(0, 0, 0)) {
4478
+ function Si(e, n, r = new L(0, 0, 0)) {
4508
4479
  let i = new t().setFromObject(e);
4509
4480
  if (i.isEmpty()) console.warn("The object has no geometry or is not visible.");
4510
4481
  else {
4511
- let t = i.min, a = new I((t.x + i.max.x) / 2, t.y, (t.z + i.max.z) / 2);
4482
+ let t = i.min, a = new L((t.x + i.max.x) / 2, t.y, (t.z + i.max.z) / 2);
4512
4483
  e.localToWorld(a);
4513
4484
  let o = n.clone().sub(a).add(r), s = e.worldToLocal(o.clone());
4514
4485
  e.position.add(s);
4515
4486
  }
4516
4487
  }
4517
- function xi(e, n) {
4488
+ function Ci(e, n) {
4518
4489
  let r = new t().setFromBufferAttribute(new _(e.attributes.position.array, 3));
4519
4490
  if (r.isEmpty()) console.warn("The geometry is empty or invalid.");
4520
4491
  else {
@@ -4522,50 +4493,50 @@ function xi(e, n) {
4522
4493
  e.translate(0, n - t, 0);
4523
4494
  }
4524
4495
  }
4525
- function Si(e, n, r = new I(0, 0, 0)) {
4496
+ function wi(e, n, r = new L(0, 0, 0)) {
4526
4497
  let i = new t().setFromObject(e);
4527
4498
  if (i.isEmpty()) console.warn("The InstancedMesh has no geometry or is not visible.");
4528
4499
  else {
4529
- let t = i.min.y, a = new I(0, n.y - t, 0).add(r), o = e.worldToLocal(a.clone());
4500
+ let t = i.min.y, a = new L(0, n.y - t, 0).add(r), o = e.worldToLocal(a.clone());
4530
4501
  e.position.add(o);
4531
4502
  }
4532
4503
  }
4533
- function Ci(e, n, r, i = new I(0, 0, 0)) {
4504
+ function Ti(e, n, r, i = new L(0, 0, 0)) {
4534
4505
  let a = new t().setFromObject(e);
4535
4506
  if (a.isEmpty()) console.warn("The instanced mesh has invalid geometry.");
4536
4507
  else {
4537
- let t = a.min.y, o = new C();
4508
+ let t = a.min.y, o = new w();
4538
4509
  e.getMatrixAt(r, o);
4539
- let s = new I(), c = new M(), l = new I();
4510
+ let s = new L(), c = new N(), l = new L();
4540
4511
  o.decompose(s, c, l), s.y = e.worldToLocal(n.clone()).y - t + i.y, o.compose(s, c, l), e.setMatrixAt(r, o), e.instanceMatrix.needsUpdate = !0;
4541
4512
  }
4542
4513
  }
4543
4514
  //#endregion
4544
4515
  //#region src/utils/Center.ts
4545
- function wi(e, n = new I(0, 0, 0), r = new I(0, 0, 0)) {
4546
- let i = new t().setFromObject(e).getCenter(new I()), a = new I().addVectors(n, r), o = new I().subVectors(a, i);
4516
+ function Ei(e, n = new L(0, 0, 0), r = new L(0, 0, 0)) {
4517
+ let i = new t().setFromObject(e).getCenter(new L()), a = new L().addVectors(n, r), o = new L().subVectors(a, i);
4547
4518
  e.position.add(o);
4548
4519
  }
4549
- function Ti(e, n = new I(0, 0, 0), r = new I(0, 0, 0)) {
4550
- let i = new t().setFromObject(e).getCenter(new I()), a = new I().addVectors(n, r);
4520
+ function Di(e, n = new L(0, 0, 0), r = new L(0, 0, 0)) {
4521
+ let i = new t().setFromObject(e).getCenter(new L()), a = new L().addVectors(n, r);
4551
4522
  e.translateX(a.x - i.x), e.translateY(a.y - i.y), e.translateZ(a.z - i.z), e.updateMatrixWorld(!0);
4552
4523
  }
4553
- function Ei(e, t = new I(0, 0, 0), n = new I(0, 0, 0)) {
4524
+ function Oi(e, t = new L(0, 0, 0), n = new L(0, 0, 0)) {
4554
4525
  e.geometry.computeBoundingBox();
4555
4526
  let r = e.geometry.boundingBox;
4556
4527
  if (r) {
4557
- let i = r.getCenter(new I()), a = new I().addVectors(t, n), o = new I().subVectors(a, i);
4528
+ let i = r.getCenter(new L()), a = new L().addVectors(t, n), o = new L().subVectors(a, i);
4558
4529
  e.geometry.translate(o.x, o.y, o.z);
4559
4530
  }
4560
4531
  }
4561
- var Di = {
4562
- object: wi,
4563
- objectGeometry: Ti,
4564
- meshGeometry: Ei
4532
+ var ki = {
4533
+ object: Ei,
4534
+ objectGeometry: Di,
4535
+ meshGeometry: Oi
4565
4536
  };
4566
4537
  //#endregion
4567
4538
  //#region src/utils/ColorUtils.ts
4568
- function Oi(e) {
4539
+ function Ai(e) {
4569
4540
  let t = parseInt(e.slice(1), 16);
4570
4541
  return [
4571
4542
  t >> 16 & 255,
@@ -4573,9 +4544,9 @@ function Oi(e) {
4573
4544
  t & 255
4574
4545
  ];
4575
4546
  }
4576
- function ki(e) {
4547
+ function ji(e) {
4577
4548
  let [t, n, r] = $(e);
4578
- return Pi(t, n, r);
4549
+ return Ii(t, n, r);
4579
4550
  }
4580
4551
  function $(e) {
4581
4552
  return [
@@ -4584,7 +4555,7 @@ function $(e) {
4584
4555
  e & 255
4585
4556
  ];
4586
4557
  }
4587
- function Ai(e, t, n) {
4558
+ function Mi(e, t, n) {
4588
4559
  t /= 100, n /= 100;
4589
4560
  function r(e, t, n) {
4590
4561
  return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
@@ -4602,7 +4573,7 @@ function Ai(e, t, n) {
4602
4573
  s(o)
4603
4574
  ];
4604
4575
  }
4605
- function ji(e, t, n) {
4576
+ function Ni(e, t, n) {
4606
4577
  t /= 100, n /= 100;
4607
4578
  let r = (t) => (t + e / 30) % 12, i = t * Math.min(n, 1 - n), a = (e) => n - i * Math.max(-1, Math.min(r(e) - 3, Math.min(9 - r(e), 1)));
4608
4579
  return [
@@ -4611,17 +4582,17 @@ function ji(e, t, n) {
4611
4582
  a(4) * 255
4612
4583
  ];
4613
4584
  }
4614
- function Mi(e, t, n) {
4585
+ function Pi(e, t, n) {
4615
4586
  return [
4616
4587
  e / 255,
4617
4588
  t / 255,
4618
4589
  n / 255
4619
4590
  ];
4620
4591
  }
4621
- function Ni(e, t, n) {
4592
+ function Fi(e, t, n) {
4622
4593
  return e = Math.round(e), t = Math.round(t), n = Math.round(n), (e << 16) + (t << 8) + n;
4623
4594
  }
4624
- function Pi(e, t, n) {
4595
+ function Ii(e, t, n) {
4625
4596
  e /= 255, t /= 255, n /= 255;
4626
4597
  let r = Math.max(e, t, n), i = Math.min(e, t, n), a = r - i, o = 0, s = 0, c = (r + i) / 2;
4627
4598
  a !== 0 && (r === e ? o = ((t - n) / a + (t < n ? 6 : 0)) * 60 : r === t ? o = ((n - e) / a + 2) * 60 : r === n && (o = ((e - t) / a + 4) * 60)), a !== 0 && (s = a / (1 - Math.abs(2 * c - 1))), o = Math.round(o), s = Math.round(s * 100);
@@ -4632,36 +4603,36 @@ function Pi(e, t, n) {
4632
4603
  l
4633
4604
  ];
4634
4605
  }
4635
- function Fi(e, t) {
4606
+ function Li(e, t) {
4636
4607
  return Math.sqrt((e[0] - t[0]) ** 2 + (e[1] - t[1]) ** 2 + (e[2] - t[2]) ** 2);
4637
4608
  }
4638
- function Ii(e, t) {
4609
+ function Ri(e, t) {
4639
4610
  return Math.abs(e[0] - t[0]) + Math.abs(e[1] - t[1]) + Math.abs(e[2] - t[2]);
4640
4611
  }
4641
- function Li(e, t) {
4612
+ function zi(e, t) {
4642
4613
  let n = $(e), r = null, i = Infinity;
4643
4614
  for (let e of t) {
4644
- let t = Fi(n, $(e));
4615
+ let t = Li(n, $(e));
4645
4616
  t < i && (i = t, r = e);
4646
4617
  }
4647
4618
  return r;
4648
4619
  }
4649
- function Ri(e, t) {
4620
+ function Bi(e, t) {
4650
4621
  let n = $(e), r = null, i = Infinity;
4651
4622
  for (let e of t) {
4652
- let t = Ii(n, $(e));
4623
+ let t = Ri(n, $(e));
4653
4624
  t < i && (i = t, r = e);
4654
4625
  }
4655
4626
  return r;
4656
4627
  }
4657
- function zi(e) {
4658
- return ji((e + Math.floor(-30 + Math.random() * 61)) % 360, Math.floor(60 + Math.random() * 21), Math.floor(50 + Math.random() * 21));
4628
+ function Vi(e) {
4629
+ return Ni((e + Math.floor(-30 + Math.random() * 61)) % 360, Math.floor(60 + Math.random() * 21), Math.floor(50 + Math.random() * 21));
4659
4630
  }
4660
4631
  //#endregion
4661
4632
  //#region src/utils/FindClosestPoint.ts
4662
- function Bi(e, t) {
4633
+ function Hi(e, t) {
4663
4634
  if (!t.geometry.isBufferGeometry) throw Error("Mesh must have a BufferGeometry.");
4664
- let n = t.geometry.getAttribute("position"), r = new I(), i = new I(), a = Infinity;
4635
+ let n = t.geometry.getAttribute("position"), r = new L(), i = new L(), a = Infinity;
4665
4636
  for (let t = 0; t < n.count; t++) {
4666
4637
  i.fromBufferAttribute(n, t);
4667
4638
  let o = i.distanceTo(e);
@@ -4671,81 +4642,81 @@ function Bi(e, t) {
4671
4642
  }
4672
4643
  //#endregion
4673
4644
  //#region src/utils/InterpolateCurve.ts
4674
- function Vi(e, t, n) {
4645
+ function Ui(e, t, n) {
4675
4646
  return Math.max(0, Math.min(1, (e - t) / (n - t)));
4676
4647
  }
4677
- function Hi(e, t, n, r, i, a = 20, o = 0, s = 1) {
4648
+ function Wi(e, t, n, r, i, a = 20, o = 0, s = 1) {
4678
4649
  let c = [];
4679
4650
  for (let l = 0; l <= a; l++) {
4680
- let u = l / a, d = t + e(Vi(u, o, s)) * (n - t), f = r + u * (i - r);
4681
- c.push(new F(d, f));
4651
+ let u = l / a, d = t + e(Ui(u, o, s)) * (n - t), f = r + u * (i - r);
4652
+ c.push(new I(d, f));
4682
4653
  }
4683
4654
  return c;
4684
4655
  }
4685
4656
  //#endregion
4686
4657
  //#region src/utils/ParametricCurveUtils.ts
4687
- var Ui = (e, t, n, r, i = 24) => {
4658
+ var Gi = (e, t, n, r, i = 24) => {
4688
4659
  let a = [];
4689
4660
  for (let o = 0; o <= i; o++) {
4690
- let s = o / i, c = W.cubic(s, e.x, t.x, n.x, r.x), l = W.cubic(s, e.y, t.y, n.y, r.y);
4691
- a.push(new F(c, l));
4661
+ let s = o / i, c = G.cubic(s, e.x, t.x, n.x, r.x), l = G.cubic(s, e.y, t.y, n.y, r.y);
4662
+ a.push(new I(c, l));
4692
4663
  }
4693
4664
  return a;
4694
- }, Wi = (e, t, n, r = 24) => {
4665
+ }, Ki = (e, t, n, r = 24) => {
4695
4666
  let i = [];
4696
4667
  for (let a = 0; a <= r; a++) {
4697
- let o = a / r, s = W.damped(o, n) * (t.x - e.x) + e.x, c = e.y + o * (t.y - e.y);
4698
- i.push(new F(s, c));
4668
+ let o = a / r, s = G.damped(o, n) * (t.x - e.x) + e.x, c = e.y + o * (t.y - e.y);
4669
+ i.push(new I(s, c));
4699
4670
  }
4700
4671
  return i;
4701
- }, Gi = (e, t, n, r, i = 24) => {
4672
+ }, qi = (e, t, n, r, i = 24) => {
4702
4673
  let a = [];
4703
4674
  for (let o = 0; o <= i; o++) {
4704
- let s = o / i, c = W.exponential(s, n, r) * (t.x - e.x) + e.x, l = e.y + s * (t.y - e.y);
4705
- a.push(new F(c, l));
4675
+ let s = o / i, c = G.exponential(s, n, r) * (t.x - e.x) + e.x, l = e.y + s * (t.y - e.y);
4676
+ a.push(new I(c, l));
4706
4677
  }
4707
4678
  return a;
4708
- }, Ki = (e, t, n, r, i = 24) => {
4679
+ }, Ji = (e, t, n, r, i = 24) => {
4709
4680
  let a = [];
4710
4681
  for (let o = 0; o <= i; o++) {
4711
- let s = o / i, c = W.logarithmic(s, n, r) * (t.x - e.x) + e.x, l = e.y + s * (t.y - e.y);
4712
- a.push(new F(c, l));
4682
+ let s = o / i, c = G.logarithmic(s, n, r) * (t.x - e.x) + e.x, l = e.y + s * (t.y - e.y);
4683
+ a.push(new I(c, l));
4713
4684
  }
4714
4685
  return a;
4715
- }, qi = (e, t, n, r, i, a = 24) => {
4686
+ }, Yi = (e, t, n, r, i, a = 24) => {
4716
4687
  let o = [];
4717
4688
  for (let s = 0; s <= a; s++) {
4718
4689
  let c = s / a, l = n * c * c + r * c + i + e.x, u = e.y + c * (t.y - e.y);
4719
- o.push(new F(l, u));
4690
+ o.push(new I(l, u));
4720
4691
  }
4721
4692
  return o;
4722
- }, Ji = (e, t, n, r = 24) => {
4693
+ }, Xi = (e, t, n, r = 24) => {
4723
4694
  let i = [];
4724
4695
  for (let a = 0; a <= r; a++) {
4725
- let o = a / r, s = W.quadratic(o, e.x, t.x, n.x), c = W.quadratic(o, e.y, t.y, n.y);
4726
- i.push(new F(s, c));
4696
+ let o = a / r, s = G.quadratic(o, e.x, t.x, n.x), c = G.quadratic(o, e.y, t.y, n.y);
4697
+ i.push(new I(s, c));
4727
4698
  }
4728
4699
  return i;
4729
- }, Yi = (e, t, n, r = 24) => {
4700
+ }, Zi = (e, t, n, r = 24) => {
4730
4701
  let i = [];
4731
4702
  for (let a = 0; a <= r; a++) {
4732
- let o = a / r, s = W.sigmoid(o, n) * (t.x - e.x) + e.x, c = e.y + o * (t.y - e.y);
4733
- i.push(new F(s, c));
4703
+ let o = a / r, s = G.sigmoid(o, n) * (t.x - e.x) + e.x, c = e.y + o * (t.y - e.y);
4704
+ i.push(new I(s, c));
4734
4705
  }
4735
4706
  return i;
4736
- }, Xi = {
4737
- createCubicCurvePoints: Ui,
4738
- createDampedCurvePoints: Wi,
4739
- createExponentialCurvePoints: Gi,
4740
- createLogarithmicCurvePoints: Ki,
4741
- createParabolicCurvePoints: qi,
4742
- createQuadraticCurvePoints: Ji,
4743
- createSigmoidCurvePoints: Yi
4707
+ }, Qi = {
4708
+ createCubicCurvePoints: Gi,
4709
+ createDampedCurvePoints: Ki,
4710
+ createExponentialCurvePoints: qi,
4711
+ createLogarithmicCurvePoints: Ji,
4712
+ createParabolicCurvePoints: Yi,
4713
+ createQuadraticCurvePoints: Xi,
4714
+ createSigmoidCurvePoints: Zi
4744
4715
  };
4745
4716
  //#endregion
4746
4717
  //#region src/utils/QuadUtils.ts
4747
- function Zi(e, t, n, r, i, a = [0, 0], o = [1, 0], s = [0, 1], c = [1, 1]) {
4748
- let l = i || Qi(e, t, n);
4718
+ function $i(e, t, n, r, i, a = [0, 0], o = [1, 0], s = [0, 1], c = [1, 1]) {
4719
+ let l = i || ea(e, t, n);
4749
4720
  return [
4750
4721
  {
4751
4722
  pos: e,
@@ -4779,7 +4750,7 @@ function Zi(e, t, n, r, i, a = [0, 0], o = [1, 0], s = [0, 1], c = [1, 1]) {
4779
4750
  }
4780
4751
  ];
4781
4752
  }
4782
- function Qi(e, t, n) {
4753
+ function ea(e, t, n) {
4783
4754
  let r = [
4784
4755
  t[0] - e[0],
4785
4756
  t[1] - e[1],
@@ -4797,11 +4768,11 @@ function Qi(e, t, n) {
4797
4768
  }
4798
4769
  //#endregion
4799
4770
  //#region src/utils/RandomTimer.ts
4800
- function $i(e, t, n) {
4771
+ function ta(e, t, n) {
4801
4772
  let r = t + Math.random() * (n - t);
4802
4773
  return setTimeout(e, r);
4803
4774
  }
4804
- function ea(e, t, n) {
4775
+ function na(e, t, n) {
4805
4776
  let r;
4806
4777
  function i() {
4807
4778
  let a = t + Math.random() * (n - t);
@@ -4813,7 +4784,7 @@ function ea(e, t, n) {
4813
4784
  }
4814
4785
  //#endregion
4815
4786
  //#region src/utils/UVUtils.ts
4816
- function ta(e, t) {
4787
+ function ra(e, t) {
4817
4788
  return e.map(([e, n, r]) => {
4818
4789
  switch (t) {
4819
4790
  case "x": return [n, r];
@@ -4823,36 +4794,36 @@ function ta(e, t) {
4823
4794
  }
4824
4795
  });
4825
4796
  }
4826
- function na(e) {
4797
+ function ia(e) {
4827
4798
  let [t, n, r] = e, i = Math.abs(t), a = Math.abs(n), o = Math.abs(r);
4828
4799
  return i >= a && i >= o ? [r > 0 ? r : -r, n] : a >= i && a >= o ? [t, r > 0 ? r : -r] : [t, n];
4829
4800
  }
4830
- function ra(e) {
4831
- return e.map((e) => na(e));
4801
+ function aa(e) {
4802
+ return e.map((e) => ia(e));
4832
4803
  }
4833
- function ia(e) {
4804
+ function oa(e) {
4834
4805
  return e.map(([e, t, n]) => {
4835
4806
  let r = Math.atan2(n, e), i = Math.acos(t / Math.sqrt(e ** 2 + t ** 2 + n ** 2));
4836
4807
  return [r / (2 * Math.PI) + .5, 1 - i / Math.PI];
4837
4808
  });
4838
4809
  }
4839
- function aa(e) {
4810
+ function sa(e) {
4840
4811
  return e.map(([e, t, n]) => [Math.atan2(n, e) / (2 * Math.PI) + .5, t]);
4841
4812
  }
4842
- function oa(e) {
4813
+ function ca(e) {
4843
4814
  return e.map(([e, t, n]) => {
4844
4815
  let r = Math.sqrt(e ** 2 + n ** 2);
4845
4816
  return [Math.atan2(n, e) / (2 * Math.PI) + .5, r];
4846
4817
  });
4847
4818
  }
4848
- function sa(e, t, n, r, i) {
4819
+ function la(e, t, n, r, i) {
4849
4820
  return [(e[0] - t) / (n - t), (e[1] - r) / (i - r)];
4850
4821
  }
4851
- function ca(e, t, n) {
4822
+ function ua(e, t, n) {
4852
4823
  let [r, i] = t, [a, o] = n;
4853
- return e.map((e) => sa(e, r, a, i, o));
4824
+ return e.map((e) => la(e, r, a, i, o));
4854
4825
  }
4855
- function la(e) {
4826
+ function da(e) {
4856
4827
  let t = Math.min(...e.map((e) => e[0])), n = Math.max(...e.map((e) => e[0])), r = Math.min(...e.map((e) => e[1])), i = Math.max(...e.map((e) => e[1]));
4857
4828
  return {
4858
4829
  minBounds: [t, r],
@@ -4860,6 +4831,6 @@ function la(e) {
4860
4831
  };
4861
4832
  }
4862
4833
  //#endregion
4863
- export { Sr as ArchedDiamondLatticeWindow, on as ArchedDiamondLatticeWindowGeometry, ke as Axis, pi as Bone, er as BoneGeometry, Tr as Book, mt as BookGeometry, Lr as Bookshelf, Ln as BookshelfGeometry, Gr as Boulder, Et as BoulderGeometry, U as BoxSide, Jr as BunsenBurner, ci as Burst, st as BurstGeometry, ot as BurstShape, he as CameraPlayback, Br as Candle, Vn as CandleGeometry, Di as Center, Ae as ColorPalette, kr as CrossHeadstone, kn as CrossHeadstoneGeometry, Rr as Desk, Rn as DeskGeometry, Cr as DiamondLatticeWindow, sn as DiamondLatticeWindowGeometry, V as Direction, He as DustMotesEffect, z as Easing, Ue as EffervescenceEffect, Yr as ElectricPanel, nt as EllipticLeafGeometry, We as EmissivePulseEffect, Xr as ErlenmeyerFlask, tr as ErlenmeyerFlaskGeometry, H as Falloff, Vr as Flame, Ge as FlameFlickerEffect, Bn as FlameGeometry, Zr as FlorenceFlask, ur as FlorenceFlaskGeometry, li as Gear, Yn as GearGeometry, Jn as GearShape, qe as GlowHalo, wr as GregorianLatticeWindow, un as GregorianLatticeWindowGeometry, Je as GroundFogEffect, Hr as HangingLantern, Gn as HangingLanternGeometry, ui as Heart, Zn as HeartGeometry, Xn as HeartShape, di as Hexagon, kt as HexagonGeometry, Ot as HexagonShape, Er as Jar, Cn as JarGeometry, vr as LShapedStaircase, bn as LShapedStaircaseGeometry, Wr as Lantern, Hn as LanternGeometry, zr as Leaf, zn as LeafGeometry, Qr as LeverPanel, tt as LightningEffect, En as LineEquations, Ar as Mausoleum, An as MausoleumGeometry, $r as Microscope, ei as MortarAndPestle, dr as MortarGeometry, Kr as MossyRock, Mt as MossyRockGeometry, jr as ObeliskHeadstone, jn as ObeliskHeadstoneGeometry, ti as Panel, ni as PanelLight, qn as ParallelogramBoxGeometry, W as ParametricCurve, Xi as ParametricCurveUtils, rt as PetalDriftEffect, Dr as PotionBottle, Dn as PotionBottleGeometry, at as RainEffect, Le as Random, qr as Rock, Pt as RockGeometry, Mr as RoundedHeadstone, Mn as RoundedHeadstoneGeometry, yr as SpiralStaircase, xn as SpiralStaircaseGeometry, ri as SpiralTube, Nr as SquareHeadstone, Nn as SquareHeadstoneGeometry, br as Staircase, Sn as StaircaseGeometry, ii as Stand, fr as StandGeometry, fi as Star, ft as StarFieldEffect, $n as StarGeometry, Qn as StarShape, Pr as StoneFencePost, Pn as StoneFencePostGeometry, hi as TerrainMound, hr as TerrainMoundGeometry, gi as TerrainPlane, gr as TerrainPlaneGeometry, ai as TeslaCoil, pr as TeslaCoilGeometry, oi as TestTube, mr as TestTubeGeometry, si as TestTubeRack, mi as Tree, _r as TreeGeometry, Ur as WallSconce, Kn as WallSconceGeometry, Or as WineBottle, On as WineBottleGeometry, pt as WispEffect, Fr as WroughtIronBar, Fn as WroughtIronBarGeometry, Ir as WroughtIronFence, In as WroughtIronFenceGeometry, xi as alignBufferGeometryToSurface, Ci as alignInstancedMeshIndexToSurface, Si as alignInstancedMeshToSurface, bi as alignObjectToSurface, vi as alignToEdge, yi as alignToRow, lr as appendSphericalCurve, me as applySnapshot, X as archedOpeningMetrics, nn as buildArchedDiamondLatticeCameParts, Yt as buildArchedDiamondLatticeFrameGeometry, rn as buildArchedDiamondLatticeParts, Ut as buildDiamondLatticeCameParts, Ht as buildDiamondLatticeParts, ln as buildGregorianLatticeParts, Ii as calculateChannelDifference, Fi as calculateDistance, Qi as calculateNormal, la as calculateUVBounds, wn as calculateXFromSlopeIntercept, Tn as calculateYFromSlopeIntercept, ir as capHeightFromRadius, ar as capWidthFromRadius, pe as captureSnapshot, cr as cartesianToSpherical, Ei as centerMeshGeometry, wi as centerObject, Ti as centerObjectGeometry, _i as checkerboardTexture, Gt as clipSegmentToAabb, $t as clipSegmentToArchedOpening, Ui as createCubicCurvePoints, Wi as createDampedCurvePoints, ye as createDollyClip, Gi as createExponentialCurvePoints, ve as createFlythroughClip, At as createHexagonalTilesByCount, jt as createHexagonalTilesByRadius, Ki as createLogarithmicCurvePoints, ge as createOrbitClip, qi as createParabolicCurvePoints, _e as createPendulumClip, Zi as createQuad, Ji as createQuadraticCurvePoints, G as createRandom, Yi as createSigmoidCurvePoints, be as createSpiralClip, Se as createWobbleClip, xe as createZoomClip, na as cubicUVMapping, ra as cubicUVMappingBatch, aa as cylindricalUVMapping, Ne as deriveSubSeed, Vt as diamondLatticeCellFromCount, Rt as diamondLatticeCornerSpan, zt as diamondLatticeGridFromCells, Xt as diamondLatticeSpringPhaseShift, Ce as displacementBrush, Li as findClosestColor, Ri as findClosestColorChannelWise, Bi as findClosestPoint, Bt as fitDiamondLatticeCell, we as flattenBrush, zi as getAnalogousColors, cn as gregorianLatticeGridFromCells, ki as hexToHsl, $ as hexToRgb, Ai as hslToHex, ji as hslToRgb, qt as insetArchedOpeningMetrics, Hi as interpolateCurve, Be as logarithmicRandomMax, Ve as logarithmicRandomMin, je as mulberry32, Te as noiseBrush, Mi as normalizeRgb, sa as normalizeUV, ca as normalizeUVBatch, Oi as parseHexCode, ta as planarUVMapping, oa as polarUVMapping, nr as radiusFromCapHeight, rr as radiusFromCapWidth, K as randomFloat, ze as randomInteger, Ie as randomPick, Fe as randomRange, Nt as randomTransformVertices, Ni as rgbToHex, Pi as rgbToHsl, yt as rowOfBooksByCount, bt as rowOfBooksByLength, vt as rowOfBooksByScales, Dt as scatterBoulders, Lt as scatterMossyRocks, It as scatterRocks, ea as setRandomInterval, $i as setRandomTimeout, Ee as smoothBrush, sr as sphericalToCartesian, ia as sphericalUVMapping, De as spikeBrush, Me as splitmix32, xt as stackOfBooks, or as thetaLengthForRadius, Kt as traceArchedOpeningOutline, Oe as twistBrush };
4834
+ export { wr as ArchedDiamondLatticeWindow, cn as ArchedDiamondLatticeWindowGeometry, Ae as Axis, hi as Bone, nr as BoneGeometry, Dr as Book, ht as BookGeometry, zr as Bookshelf, zn as BookshelfGeometry, qr as Boulder, Ot as BoulderGeometry, W as BoxSide, Xr as BunsenBurner, ui as Burst, ct as BurstGeometry, st as BurstShape, ge as CameraPlayback, Hr as Candle, Un as CandleGeometry, ki as Center, je as ColorPalette, jr as CrossHeadstone, jn as CrossHeadstoneGeometry, Br as Desk, Bn as DeskGeometry, Tr as DiamondLatticeWindow, ln as DiamondLatticeWindowGeometry, H as Direction, Ue as DustMotesEffect, B as Easing, We as EffervescenceEffect, Zr as ElectricPanel, rt as EllipticLeafGeometry, Ge as EmissivePulseEffect, Qr as ErlenmeyerFlask, rr as ErlenmeyerFlaskGeometry, U as Falloff, Ur as Flame, Ke as FlameFlickerEffect, Hn as FlameGeometry, $r as FlorenceFlask, fr as FlorenceFlaskGeometry, di as Gear, Zn as GearGeometry, Xn as GearShape, Je as GlowHalo, Er as GregorianLatticeWindow, fn as GregorianLatticeWindowGeometry, Ye as GroundFogEffect, Wr as HangingLantern, qn as HangingLanternGeometry, fi as Heart, $n as HeartGeometry, Qn as HeartShape, pi as Hexagon, jt as HexagonGeometry, At as HexagonShape, Or as Jar, Tn as JarGeometry, br as LShapedStaircase, Sn as LShapedStaircaseGeometry, Kr as Lantern, Wn as LanternGeometry, Vr as Leaf, Vn as LeafGeometry, ei as LeverPanel, nt as LightningEffect, On as LineEquations, Mr as Mausoleum, Mn as MausoleumGeometry, ti as Microscope, ni as MortarAndPestle, pr as MortarGeometry, Jr as MossyRock, Pt as MossyRockGeometry, Nr as ObeliskHeadstone, Nn as ObeliskHeadstoneGeometry, ri as Panel, ii as PanelLight, Yn as ParallelogramBoxGeometry, G as ParametricCurve, Qi as ParametricCurveUtils, it as PetalDriftEffect, kr as PotionBottle, kn as PotionBottleGeometry, ot as RainEffect, Re as Random, Yr as Rock, It as RockGeometry, Pr as RoundedHeadstone, Pn as RoundedHeadstoneGeometry, xr as SpiralStaircase, Cn as SpiralStaircaseGeometry, ai as SpiralTube, Fr as SquareHeadstone, Fn as SquareHeadstoneGeometry, Sr as Staircase, wn as StaircaseGeometry, oi as Stand, mr as StandGeometry, mi as Star, pt as StarFieldEffect, tr as StarGeometry, er as StarShape, Ir as StoneFencePost, In as StoneFencePostGeometry, _i as TerrainMound, _r as TerrainMoundGeometry, vi as TerrainPlane, vr as TerrainPlaneGeometry, si as TeslaCoil, hr as TeslaCoilGeometry, ci as TestTube, gr as TestTubeGeometry, li as TestTubeRack, gi as Tree, yr as TreeGeometry, Gr as WallSconce, Jn as WallSconceGeometry, Ar as WineBottle, An as WineBottleGeometry, mt as WispEffect, Lr as WroughtIronBar, Ln as WroughtIronBarGeometry, Rr as WroughtIronFence, Rn as WroughtIronFenceGeometry, Ci as alignBufferGeometryToSurface, Ti as alignInstancedMeshIndexToSurface, wi as alignInstancedMeshToSurface, Si as alignObjectToSurface, bi as alignToEdge, xi as alignToRow, dr as appendSphericalCurve, he as applySnapshot, X as archedOpeningMetrics, an as buildArchedDiamondLatticeCameParts, Zt as buildArchedDiamondLatticeFrameGeometry, on as buildArchedDiamondLatticeParts, Gt as buildDiamondLatticeCameParts, Wt as buildDiamondLatticeParts, dn as buildGregorianLatticeParts, Ri as calculateChannelDifference, Li as calculateDistance, ea as calculateNormal, da as calculateUVBounds, En as calculateXFromSlopeIntercept, Dn as calculateYFromSlopeIntercept, or as capHeightFromRadius, sr as capWidthFromRadius, me as captureSnapshot, ur as cartesianToSpherical, Oi as centerMeshGeometry, Ei as centerObject, Di as centerObjectGeometry, yi as checkerboardTexture, qt as clipSegmentToAabb, tn as clipSegmentToArchedOpening, Gi as createCubicCurvePoints, Ki as createDampedCurvePoints, be as createDollyClip, qi as createExponentialCurvePoints, ye as createFlythroughClip, Mt as createHexagonalTilesByCount, Nt as createHexagonalTilesByRadius, Ji as createLogarithmicCurvePoints, _e as createOrbitClip, Yi as createParabolicCurvePoints, ve as createPendulumClip, $i as createQuad, Xi as createQuadraticCurvePoints, K as createRandom, Zi as createSigmoidCurvePoints, xe as createSpiralClip, Ce as createWobbleClip, Se as createZoomClip, ia as cubicUVMapping, aa as cubicUVMappingBatch, sa as cylindricalUVMapping, Pe as deriveSubSeed, Ut as diamondLatticeCellFromCount, Bt as diamondLatticeCornerSpan, Vt as diamondLatticeGridFromCells, Qt as diamondLatticeSpringPhaseShift, we as displacementBrush, zi as findClosestColor, Bi as findClosestColorChannelWise, Hi as findClosestPoint, Ht as fitDiamondLatticeCell, Te as flattenBrush, Vi as getAnalogousColors, un as gregorianLatticeGridFromCells, ji as hexToHsl, $ as hexToRgb, Mi as hslToHex, Ni as hslToRgb, Yt as insetArchedOpeningMetrics, Wi as interpolateCurve, Ve as logarithmicRandomMax, He as logarithmicRandomMin, Me as mulberry32, Ee as noiseBrush, Pi as normalizeRgb, la as normalizeUV, ua as normalizeUVBatch, Ai as parseHexCode, ra as planarUVMapping, ca as polarUVMapping, ir as radiusFromCapHeight, ar as radiusFromCapWidth, q as randomFloat, Be as randomInteger, Le as randomPick, Ie as randomRange, Ft as randomTransformVertices, Fi as rgbToHex, Ii as rgbToHsl, bt as rowOfBooksByCount, xt as rowOfBooksByLength, yt as rowOfBooksByScales, kt as scatterBoulders, zt as scatterMossyRocks, Rt as scatterRocks, na as setRandomInterval, ta as setRandomTimeout, De as smoothBrush, lr as sphericalToCartesian, oa as sphericalUVMapping, Oe as spikeBrush, Ne as splitmix32, St as stackOfBooks, cr as thetaLengthForRadius, Jt as traceArchedOpeningOutline, ke as twistBrush };
4864
4835
 
4865
4836
  //# sourceMappingURL=index.mjs.map