three-low-poly 0.9.14 → 0.9.16

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.es.js CHANGED
@@ -1,123 +1,116 @@
1
- var vt = Object.defineProperty;
2
- var xt = (e, t, o) => t in e ? vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
- var E = (e, t, o) => xt(e, typeof t != "symbol" ? t + "" : t, o);
4
- import { Vector3 as g, MathUtils as _, Quaternion as gt, InstancedMesh as rt, SphereGeometry as N, MeshStandardMaterial as M, Matrix4 as Z, BufferGeometry as I, Float32BufferAttribute as D, DoubleSide as L, Euler as bt, BufferAttribute as R, BoxGeometry as A, ConeGeometry as j, CylinderGeometry as S, Vector2 as b, LatheGeometry as Y, CircleGeometry as At, TorusGeometry as mt, DodecahedronGeometry as at, Group as P, ShaderMaterial as J, Mesh as y, Shape as H, ExtrudeGeometry as Q, MeshBasicMaterial as It, PointLight as ht, MeshPhysicalMaterial as W, CatmullRomCurve3 as St, TubeGeometry as Et, Path as Pt, Color as $, BackSide as it, DataTexture as Tt, RGBAFormat as Gt, UnsignedByteType as Ct, RepeatWrapping as lt, NearestFilter as Bt, Box3 as ct } from "three";
5
- function We(e, t, o, n) {
6
- const r = e.position.clone(), a = r.clone().add(e.getWorldDirection(new g()).multiplyScalar(-t));
7
- let s = null;
1
+ var It = Object.defineProperty;
2
+ var Et = (e, t, o) => t in e ? It(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
+ var g = (e, t, o) => Et(e, typeof t != "symbol" ? t + "" : t, o);
4
+ import { Vector3 as b, MathUtils as z, Quaternion as At, InstancedMesh as at, SphereGeometry as U, MeshStandardMaterial as y, Matrix4 as H, BufferGeometry as A, Float32BufferAttribute as D, DoubleSide as k, Euler as St, BufferAttribute as L, BoxGeometry as E, ConeGeometry as Y, CylinderGeometry as S, Vector2 as I, LatheGeometry as Z, CircleGeometry as Pt, TorusGeometry as dt, DodecahedronGeometry as it, Mesh as M, ShaderMaterial as J, Group as B, Shape as j, ExtrudeGeometry as Q, MeshBasicMaterial as Tt, PointLight as pt, MeshPhysicalMaterial as W, CatmullRomCurve3 as Gt, TubeGeometry as Ct, Path as Bt, Color as $, BackSide as ct, DataTexture as Rt, RGBAFormat as Nt, UnsignedByteType as Ut, RepeatWrapping as ht, NearestFilter as _t, Box3 as lt } from "three";
5
+ function mo(e, t, o, n) {
6
+ const r = e.position.clone(), s = r.clone().add(e.getWorldDirection(new b()).multiplyScalar(-t));
7
+ let a = null;
8
8
  function i(c) {
9
- s === null && (s = c);
10
- const u = (c - s) / o;
9
+ a === null && (a = c);
10
+ const u = (c - a) / o;
11
11
  if (u >= 1) {
12
- e.position.copy(a), n && n();
12
+ e.position.copy(s), n && n();
13
13
  return;
14
14
  }
15
- e.position.lerpVectors(r, a, u), requestAnimationFrame(i);
15
+ e.position.lerpVectors(r, s, u), requestAnimationFrame(i);
16
16
  }
17
17
  requestAnimationFrame(i);
18
18
  }
19
- function to(e, t, o, n) {
19
+ function fo(e, t, o, n) {
20
20
  const r = t.length - 1;
21
- let a = null;
22
- function s(i) {
23
- a === null && (a = i);
24
- const l = (i - a) / o;
21
+ let s = null;
22
+ function a(i) {
23
+ s === null && (s = i);
24
+ const l = (i - s) / o;
25
25
  if (l >= 1) {
26
26
  e.position.copy(t[t.length - 1]), n && n();
27
27
  return;
28
28
  }
29
- const u = l * r, m = Math.floor(u), h = u - m, f = t[m], p = t[m + 1];
30
- e.position.lerpVectors(f, p, h), e.lookAt(p), requestAnimationFrame(s);
29
+ const u = l * r, h = Math.floor(u), m = u - h, f = t[h], d = t[h + 1];
30
+ e.position.lerpVectors(f, d, m), e.lookAt(d), requestAnimationFrame(a);
31
31
  }
32
- requestAnimationFrame(s);
32
+ requestAnimationFrame(a);
33
33
  }
34
- function eo(e, t, o, n, r) {
35
- let a = null;
36
- function s(i) {
37
- a || (a = i);
38
- const l = (i - a) / n;
34
+ function po(e, t, o, n, r) {
35
+ let s = null;
36
+ function a(i) {
37
+ s || (s = i);
38
+ const l = (i - s) / n;
39
39
  if (l >= 1) {
40
40
  r && r();
41
41
  return;
42
42
  }
43
- const u = l * Math.PI * 2, m = t.x + o * Math.cos(u), h = t.z + o * Math.sin(u);
44
- e.position.set(m, e.position.y, h), e.lookAt(t), requestAnimationFrame(s);
43
+ const u = l * Math.PI * 2, h = t.x + o * Math.cos(u), m = t.z + o * Math.sin(u);
44
+ e.position.set(h, e.position.y, m), e.lookAt(t), requestAnimationFrame(a);
45
45
  }
46
- requestAnimationFrame(s);
46
+ requestAnimationFrame(a);
47
47
  }
48
- function oo(e, t, o, n, r, a) {
49
- let s = null, i = 0;
48
+ function Mo(e, t, o, n, r, s) {
49
+ let a = null, i = 0;
50
50
  function c(l) {
51
- s === null && (s = l);
52
- const u = l - s, m = n / r, h = u % m / m, f = Math.sin(h * Math.PI * 2) * Math.PI / 6, p = t.x + o * Math.sin(f), d = t.z + o * Math.cos(f);
53
- if (e.position.set(p, e.position.y, d), e.lookAt(t), u >= (i + 1) * m && i++, i >= r) {
54
- a && a();
51
+ a === null && (a = l);
52
+ const u = l - a, h = n / r, m = u % h / h, f = Math.sin(m * Math.PI * 2) * Math.PI / 6, d = t.x + o * Math.sin(f), p = t.z + o * Math.cos(f);
53
+ if (e.position.set(d, e.position.y, p), e.lookAt(t), u >= (i + 1) * h && i++, i >= r) {
54
+ s && s();
55
55
  return;
56
56
  }
57
57
  requestAnimationFrame(c);
58
58
  }
59
59
  requestAnimationFrame(c);
60
60
  }
61
- function no(e, t, o, n, r, a, s) {
61
+ function yo(e, t, o, n, r, s, a) {
62
62
  let i = null;
63
63
  function c(l) {
64
64
  i === null && (i = l);
65
- const m = (l - i) / a;
66
- if (m >= 1) {
67
- s && s();
65
+ const h = (l - i) / s;
66
+ if (h >= 1) {
67
+ a && a();
68
68
  return;
69
69
  }
70
- const h = m * Math.PI * 2 * r, f = t.x + o * Math.cos(h), p = t.z + o * Math.sin(h), d = t.y + n * m;
71
- e.position.set(f, d, p), e.lookAt(t), requestAnimationFrame(c);
70
+ const m = h * Math.PI * 2 * r, f = t.x + o * Math.cos(m), d = t.z + o * Math.sin(m), p = t.y + n * h;
71
+ e.position.set(f, p, d), e.lookAt(t), requestAnimationFrame(c);
72
72
  }
73
73
  requestAnimationFrame(c);
74
74
  }
75
- function so(e, t, o, n) {
75
+ function wo(e, t, o, n) {
76
76
  const r = e.position.clone();
77
- let a = null;
78
- function s(i) {
79
- if (a === null && (a = i), (i - a) / o >= 1) {
77
+ let s = null;
78
+ function a(i) {
79
+ if (s === null && (s = i), (i - s) / o >= 1) {
80
80
  e.position.copy(r), n && n();
81
81
  return;
82
82
  }
83
- const u = new g(
83
+ const u = new b(
84
84
  (Math.random() - 0.5) * t,
85
85
  (Math.random() - 0.5) * t,
86
86
  (Math.random() - 0.5) * t
87
87
  );
88
- e.position.copy(r).add(u), requestAnimationFrame(s);
88
+ e.position.copy(r).add(u), requestAnimationFrame(a);
89
89
  }
90
- requestAnimationFrame(s);
90
+ requestAnimationFrame(a);
91
91
  }
92
- function ro(e, t, o, n, r, a) {
93
- const s = e.fov;
92
+ function vo(e, t, o, n, r, s) {
93
+ const a = e.fov;
94
94
  e.fov = o, e.updateProjectionMatrix();
95
95
  let i = null;
96
96
  function c(l) {
97
97
  i === null && (i = l);
98
- const m = (l - i) / r;
99
- if (m >= 1) {
100
- e.fov = n, e.updateProjectionMatrix(), e.lookAt(t), e.fov = s, e.updateProjectionMatrix(), a && a();
98
+ const h = (l - i) / r;
99
+ if (h >= 1) {
100
+ e.fov = n, e.updateProjectionMatrix(), e.lookAt(t), e.fov = a, e.updateProjectionMatrix(), s && s();
101
101
  return;
102
102
  }
103
- e.fov = _.lerp(o, n, m), e.updateProjectionMatrix(), e.lookAt(t), requestAnimationFrame(c);
103
+ e.fov = z.lerp(o, n, h), e.updateProjectionMatrix(), e.lookAt(t), requestAnimationFrame(c);
104
104
  }
105
105
  requestAnimationFrame(c);
106
106
  }
107
- const q = {
108
- UP: new g(0, 1, 0),
109
- DOWN: new g(0, -1, 0),
110
- LEFT: new g(-1, 0, 0),
111
- RIGHT: new g(1, 0, 0),
112
- FORWARD: new g(0, 0, 1),
113
- BACKWARD: new g(0, 0, -1),
114
- X: new g(1, 0, 0),
115
- Y: new g(0, 1, 0),
116
- Z: new g(0, 0, 1),
117
- XY: new g(1, 1, 0).normalize(),
118
- XZ: new g(1, 0, 1).normalize(),
119
- YZ: new g(0, 1, 1).normalize(),
120
- XYZ: new g(1, 1, 1).normalize()
107
+ const tt = {
108
+ UP: new b(0, 1, 0),
109
+ DOWN: new b(0, -1, 0),
110
+ LEFT: new b(-1, 0, 0),
111
+ RIGHT: new b(1, 0, 0),
112
+ FORWARD: new b(0, 0, 1),
113
+ BACKWARD: new b(0, 0, -1)
121
114
  }, K = {
122
115
  LINEAR: (e, t) => 1 - e / t,
123
116
  QUADRATIC: (e, t) => Math.pow(1 - e / t, 2),
@@ -132,149 +125,268 @@ const q = {
132
125
  const o = Math.max(0, Math.min(1, 1 - e / t));
133
126
  return o * o * (3 - 2 * o);
134
127
  }
135
- }, ao = (e, t, o, n, r = q.UP, a = K.LINEAR) => {
136
- const s = e.attributes.position;
137
- for (let i = 0; i < s.count; i++) {
138
- const c = new g();
139
- c.fromBufferAttribute(s, i);
128
+ }, xo = (e, t, o, n, r = tt.UP, s = K.LINEAR) => {
129
+ const a = e.attributes.position;
130
+ for (let i = 0; i < a.count; i++) {
131
+ const c = new b();
132
+ c.fromBufferAttribute(a, i);
140
133
  const l = c.distanceTo(t);
141
134
  if (l < o) {
142
- const m = a(l, o) * n;
143
- c.add(r.clone().multiplyScalar(m)), s.setXYZ(i, c.x, c.y, c.z);
135
+ const h = s(l, o) * n;
136
+ c.add(r.clone().multiplyScalar(h)), a.setXYZ(i, c.x, c.y, c.z);
144
137
  }
145
138
  }
146
- s.needsUpdate = !0;
147
- }, io = (e, t, o, n, r, a = q.UP, s = K.LINEAR) => {
139
+ a.needsUpdate = !0;
140
+ }, go = (e, t, o, n, r, s = tt.UP, a = K.LINEAR) => {
148
141
  const i = e.attributes.position;
149
142
  for (let c = 0; c < i.count; c++) {
150
- const l = new g();
143
+ const l = new b();
151
144
  l.fromBufferAttribute(i, c);
152
145
  const u = l.distanceTo(t);
153
146
  if (u < o) {
154
- const h = s(u, o) * r, f = l.dot(a.normalize()), p = n - f;
155
- l.add(a.clone().multiplyScalar(p * h)), i.setXYZ(c, l.x, l.y, l.z);
147
+ const m = a(u, o) * r, f = l.dot(s.normalize()), d = n - f;
148
+ l.add(s.clone().multiplyScalar(d * m)), i.setXYZ(c, l.x, l.y, l.z);
156
149
  }
157
150
  }
158
151
  i.needsUpdate = !0;
159
- }, co = (e, t, o, n, r = q.UP, a = K.LINEAR) => {
160
- const s = e.attributes.position;
161
- for (let i = 0; i < s.count; i++) {
162
- const c = new g();
163
- c.fromBufferAttribute(s, i);
152
+ }, bo = (e, t, o, n, r = tt.UP, s = K.LINEAR) => {
153
+ const a = e.attributes.position;
154
+ for (let i = 0; i < a.count; i++) {
155
+ const c = new b();
156
+ c.fromBufferAttribute(a, i);
164
157
  const l = c.distanceTo(t);
165
158
  if (l < o) {
166
- const u = a(l, o), m = n * u, h = r.clone().normalize();
167
- c.x += _.randFloatSpread(m) * h.x, c.y += _.randFloatSpread(m) * h.y, c.z += _.randFloatSpread(m) * h.z, s.setXYZ(i, c.x, c.y, c.z);
159
+ const u = s(l, o), h = n * u, m = r.clone().normalize();
160
+ c.x += z.randFloatSpread(h) * m.x, c.y += z.randFloatSpread(h) * m.y, c.z += z.randFloatSpread(h) * m.z, a.setXYZ(i, c.x, c.y, c.z);
168
161
  }
169
162
  }
170
- s.needsUpdate = !0;
171
- }, lo = (e, t, o, n) => {
172
- const r = e.attributes.position, a = new g();
173
- for (let s = 0; s < r.count; s++) {
174
- const i = new g();
175
- if (i.fromBufferAttribute(r, s), i.distanceTo(t) < o) {
176
- let l = new g(), u = 0;
177
- for (let m = 0; m < r.count; m++)
178
- a.fromBufferAttribute(r, m), a.distanceTo(i) < o && (l.add(a), u++);
179
- u > 0 && (l.divideScalar(u), i.lerp(l, n), r.setXYZ(s, i.x, i.y, i.z));
163
+ a.needsUpdate = !0;
164
+ }, Io = (e, t, o, n) => {
165
+ const r = e.attributes.position, s = new b();
166
+ for (let a = 0; a < r.count; a++) {
167
+ const i = new b();
168
+ if (i.fromBufferAttribute(r, a), i.distanceTo(t) < o) {
169
+ let l = new b(), u = 0;
170
+ for (let h = 0; h < r.count; h++)
171
+ s.fromBufferAttribute(r, h), s.distanceTo(i) < o && (l.add(s), u++);
172
+ u > 0 && (l.divideScalar(u), i.lerp(l, n), r.setXYZ(a, i.x, i.y, i.z));
180
173
  }
181
174
  }
182
175
  r.needsUpdate = !0;
183
- }, uo = (e, t, o, n, r = !1, a = K.LINEAR) => {
184
- const s = e.attributes.position;
185
- for (let i = 0; i < s.count; i++) {
186
- const c = new g();
187
- c.fromBufferAttribute(s, i);
176
+ }, Eo = (e, t, o, n, r = !1, s = K.LINEAR) => {
177
+ const a = e.attributes.position;
178
+ for (let i = 0; i < a.count; i++) {
179
+ const c = new b();
180
+ c.fromBufferAttribute(a, i);
188
181
  const l = c.distanceTo(t);
189
182
  if (l < o) {
190
- const m = a(l, o) * n * (r ? -1 : 1), h = c.clone().sub(t).normalize();
191
- c.add(h.multiplyScalar(m)), s.setXYZ(i, c.x, c.y, c.z);
183
+ const h = s(l, o) * n * (r ? -1 : 1), m = c.clone().sub(t).normalize();
184
+ c.add(m.multiplyScalar(h)), a.setXYZ(i, c.x, c.y, c.z);
192
185
  }
193
186
  }
194
- s.needsUpdate = !0;
195
- }, mo = (e, t, o, n, r = q.UP, a = K.LINEAR) => {
196
- const s = e.attributes.position, i = new gt();
197
- for (let c = 0; c < s.count; c++) {
198
- const l = new g();
199
- l.fromBufferAttribute(s, c);
187
+ a.needsUpdate = !0;
188
+ }, Ao = (e, t, o, n, r = tt.UP, s = K.LINEAR) => {
189
+ const a = e.attributes.position, i = new At();
190
+ for (let c = 0; c < a.count; c++) {
191
+ const l = new b();
192
+ l.fromBufferAttribute(a, c);
200
193
  const u = l.distanceTo(t);
201
194
  if (u < o) {
202
- const h = a(u, o) * n;
203
- i.setFromAxisAngle(r, h), l.sub(t).applyQuaternion(i).add(t), s.setXYZ(c, l.x, l.y, l.z);
195
+ const m = s(u, o) * n;
196
+ i.setFromAxisAngle(r, m), l.sub(t).applyQuaternion(i).add(t), a.setXYZ(c, l.x, l.y, l.z);
204
197
  }
205
198
  }
206
- s.needsUpdate = !0;
207
- }, Ut = (e) => 1 - Math.cos(e * Math.PI / 2), zt = (e) => Math.sin(e * Math.PI / 2), kt = (e) => -0.5 * (Math.cos(Math.PI * e) - 1), Nt = (e) => e * e, Ot = (e) => 1 - Math.pow(1 - e, 2), _t = (e) => e < 0.5 ? 2 * e * e : 1 - Math.pow(-2 * e + 2, 2) / 2, Ft = (e) => e * e * e, Rt = (e) => 1 - Math.pow(1 - e, 3), Lt = (e) => e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2, qt = (e) => e * e * e * e, Dt = (e) => 1 - Math.pow(1 - e, 4), Vt = (e) => e < 0.5 ? 8 * e * e * e * e : 1 - Math.pow(-2 * e + 2, 4) / 2, Xt = (e) => e * e * e * e * e, Zt = (e) => 1 - Math.pow(1 - e, 5), jt = (e) => e < 0.5 ? 16 * e * e * e * e * e : 1 - Math.pow(-2 * e + 2, 5) / 2, Yt = (e) => e === 0 ? 0 : Math.pow(2, 10 * e - 10), Ht = (e) => e === 1 ? 1 : 1 - Math.pow(2, -10 * e), Qt = (e) => e === 0 ? 0 : e === 1 ? 1 : e < 0.5 ? Math.pow(2, 20 * e - 10) / 2 : (2 - Math.pow(2, -20 * e + 10)) / 2, Kt = (e) => 1 - Math.sqrt(1 - Math.pow(e, 2)), $t = (e) => Math.sqrt(1 - Math.pow(e - 1, 2)), Jt = (e) => e < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * e, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * e + 2, 2)) + 1) / 2, Wt = (e) => e, te = (e) => e * e * (3 - 2 * e), ee = (e) => 1 - Math.pow(1 - e, 0.3), oe = (e) => Math.pow(e, 0.3), ne = (e) => Math.log(Math.max(0.01, e)) / Math.log(2), se = (e) => Math.sqrt(e), re = (e) => 1 - e, ae = (e) => Math.exp(-Math.pow(e - 0.5, 2) / (2 * 0.5)), ho = {
208
- SINE_EASE_IN: Ut,
199
+ a.needsUpdate = !0;
200
+ }, ut = {
201
+ X: new b(1, 0, 0),
202
+ Y: new b(0, 1, 0),
203
+ Z: new b(0, 0, 1),
204
+ XY: new b(1, 1, 0).normalize(),
205
+ XZ: new b(1, 0, 1).normalize(),
206
+ YZ: new b(0, 1, 1).normalize(),
207
+ XYZ: new b(1, 1, 1).normalize()
208
+ }, mt = {
209
+ // Red
210
+ CARDINAL_RED: 12981270,
211
+ // Bright Crimson or Cardinal Red. It’s a vivid, bold red shade with warm undertones.
212
+ CHERRY_RED: 14165028,
213
+ // Bold red with slightly warm undertones.
214
+ CRIMSON: 12986408,
215
+ // Crimson Red or Firebrick Red. It’s a bold, deep red with a slightly cool undertone.
216
+ RUST: 12731693,
217
+ // Red clay or Brick Red. It’s a warm, earthy red-orange shade, often associated with weathered metal, autumn leaves, or natural clay tones.
218
+ DARK_RED: 9109504,
219
+ // Dark Red. It’s a deep, rich red shade resembling the color of garnets or dried blood.
220
+ // Orange
221
+ TANGERINE: 16733440,
222
+ // Tangerine or Bright Orange-Red. It’s a vibrant, warm shade of orange with red undertones with a tropical feel.
223
+ ORANGE_PEEL: 16737792,
224
+ // Orange Peel or Bright Orange. It’s a vivid, energetic orange.
225
+ ORANGE: 16753920,
226
+ // Bright, vibrant hue associated with sunsets, citrus fruits, and autumn tones.
227
+ // Yellow
228
+ AMBER: 16755200,
229
+ // Bright Orange. It’s a warm, vibrant shade of orange with golden-yellow undertones, associated with autumn hues.
230
+ GOLD: 16766720,
231
+ // Rich, vibrant yellow with warm undertones, resembling the color of metallic gold.
232
+ YELLOW: 16776960,
233
+ // Bright, pure yellow shade.
234
+ // Green
235
+ LIME_GREEN: 10798080,
236
+ // Lime Green or Bright Chartreuse. It’s a vivid, energetic yellow-green shade
237
+ SPRING_GREEN: 8965205,
238
+ // Fresh, vibrant appearance, resembling new leaves or spring foliage
239
+ MOSS_GREEN: 8956467,
240
+ // Medium-light shade of green with yellow undertones, often seen in natural foliage.
241
+ FERN_GREEN: 4950843,
242
+ // It's a natural, medium-dark green with slightly muted tones, resembling the lush greenery of ferns or foliage.
243
+ FOREST_GREEN: 2263842,
244
+ // Rich, deep green shade, often associated with dense woodland and nature.
245
+ OLIVE_DRAB: 5597999,
246
+ // Muted earthy green with brownish undertones.
247
+ MINT_GREEN: 8965290,
248
+ // Mint Green or Light Jade. It’s a soft, pastel green with subtle blue undertones.
249
+ AQUAMARINE: 65450,
250
+ // Aquamarine or Mint Green. It’s a bright, vibrant turquoise shade that blends green and blue.
251
+ // Blue
252
+ SKY_BLUE: 8965375,
253
+ // Sky Blue or Baby Blue. It’s a light, cheerful shade of blue with a slightly soft and pastel tone, evoking a sense of openness like a clear daytime sky.
254
+ CERULEAN_BLUE: 6139362,
255
+ // Cerulean Blue or Sky Blue. It’s a bright, vivid shade of blue with a slightly cool undertone, often associated with clear skies or tropical waters.
256
+ AZURE: 30719,
257
+ // Azure Blue or Bright Blue. It’s a vibrant, rich shade of blue with a cool undertone, often associated with clear skies or digital interfaces.
258
+ OCEAN_BLUE: 30654,
259
+ // Ocean Blue or Azure Blue. It’s a vibrant medium blue shade with a slight teal undertone, often associated with clear skies or tropical waters.
260
+ ROYAL_BLUE: 5592575,
261
+ // Royal Blue or Bright Indigo. It’s a vibrant medium blue shade with a slightly cool and saturated tone.
262
+ MIDNIGHT_BLUE: 51,
263
+ // A very deep, dark blue shade that evokes the feeling of a starless night sky or deep ocean depths, with subtle blue undertones.
264
+ // Purple
265
+ CORAL_PINK: 16724838,
266
+ // Bright Rose or Coral Pink. It’s a vivid, bold pinkish-red shade with warm undertones.
267
+ VIVID_MAGENTA: 16720639,
268
+ // It's an intense, electric shade of pink with equal parts red and blue.
269
+ MAGENTA: 16711935,
270
+ // Bright, vivid hue that is a mix of equal parts red and blue, sometimes called Fuchsia.
271
+ HOT_PINK: 16711850,
272
+ // Hot Pink or Fuchsia Rose. It’s a vivid and bold pink with a magenta undertone.
273
+ PINK_SHERBET: 16751052,
274
+ // Pink Sherbet or Light Pink. It’s a soft, playful pink shade with a hint of warmth.
275
+ SOFT_PINK: 16762823,
276
+ // Blush Pink or Soft Pink. It’s a pale, delicate pink with warm undertones.
277
+ DEEP_VIOLET: 11141375,
278
+ // Electric Purple or Deep Violet. It’s a bright, vibrant shade of purple with a strong blue undertone.
279
+ // Brown
280
+ TAUPE: 9141627,
281
+ // Rosy Brown or Taupe Gray. It’s a muted, earthy tone with a mix of brown and gray.
282
+ SIENNA: 9132587,
283
+ // Dark Goldenrod Brown. It’s a warm, earthy brown with reddish and golden undertones, often associated with natural clay or autumn leaves.
284
+ SADDLE_BROWN: 9127187,
285
+ // Rich, earthy brown with reddish undertones, often associated with leather, wood, or other natural materials.
286
+ COFFEE_BROWN: 6045747,
287
+ // Rich, earthy tone with hints of red and gray, resembling the color of natural wood or dark leather.
288
+ DARK_UMBER: 4929057,
289
+ // Coffee Brown or Dark Umber. It’s a deep, rich brown with warm, earthy undertones, often resembling dark wood or roasted coffee beans.
290
+ // Gray
291
+ ONYX: 197379,
292
+ // Extremely deep, almost black shade with a neutral tone.
293
+ CARBON: 3026478,
294
+ // Deep, neutral gray.
295
+ CHARCOAL: 3355443,
296
+ // Rich, neutral gray.
297
+ SLATE_GRAY: 4210752,
298
+ // Medium-dark shade of gray
299
+ ASH_GRAY: 4473924,
300
+ // Ash Gray or Dark Slate Gray.
301
+ STEEL_GRAY: 5592405,
302
+ // Medium Gray or Steel Gray.
303
+ COOL_GRAY: 6710886,
304
+ // It’s a medium-dark neutral gray.
305
+ IRON: 7829367,
306
+ // It’s a medium gray neutral.
307
+ GRAY: 8421504,
308
+ // It is a neutral, medium-gray tone that sits exactly halfway between black and white.
309
+ STONE: 8947848,
310
+ // It’s a medium-light neutral.
311
+ SILVER: 11184810,
312
+ // Light Gray. It’s a soft, pale gray shade with a slightly metallic undertone.
313
+ PALE_GRAY: 15658734,
314
+ // Very Light Gray or Soft Gray. It’s a pale, almost white shade of gray.
315
+ WHITE_SMOKE: 16119285,
316
+ // White Smoke or Light Gray. It’s a soft, pale gray shade with a hint of warmth.
317
+ WHITE: 16777215
318
+ // Pure white, the brightest color possible.
319
+ }, Ot = (e) => 1 - Math.cos(e * Math.PI / 2), zt = (e) => Math.sin(e * Math.PI / 2), Ft = (e) => -0.5 * (Math.cos(Math.PI * e) - 1), Lt = (e) => e * e, kt = (e) => 1 - Math.pow(1 - e, 2), Dt = (e) => e < 0.5 ? 2 * e * e : 1 - Math.pow(-2 * e + 2, 2) / 2, qt = (e) => e * e * e, Vt = (e) => 1 - Math.pow(1 - e, 3), Ht = (e) => e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2, Xt = (e) => e * e * e * e, Yt = (e) => 1 - Math.pow(1 - e, 4), Zt = (e) => e < 0.5 ? 8 * e * e * e * e : 1 - Math.pow(-2 * e + 2, 4) / 2, jt = (e) => e * e * e * e * e, Qt = (e) => 1 - Math.pow(1 - e, 5), Kt = (e) => e < 0.5 ? 16 * e * e * e * e * e : 1 - Math.pow(-2 * e + 2, 5) / 2, $t = (e) => e === 0 ? 0 : Math.pow(2, 10 * e - 10), Jt = (e) => e === 1 ? 1 : 1 - Math.pow(2, -10 * e), Wt = (e) => e === 0 ? 0 : e === 1 ? 1 : e < 0.5 ? Math.pow(2, 20 * e - 10) / 2 : (2 - Math.pow(2, -20 * e + 10)) / 2, te = (e) => 1 - Math.sqrt(1 - Math.pow(e, 2)), ee = (e) => Math.sqrt(1 - Math.pow(e - 1, 2)), oe = (e) => e < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * e, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * e + 2, 2)) + 1) / 2, ne = (e) => e, se = (e) => e * e * (3 - 2 * e), re = (e) => 1 - Math.pow(1 - e, 0.3), ae = (e) => Math.pow(e, 0.3), ie = (e) => Math.log(Math.max(0.01, e)) / Math.log(2), ce = (e) => Math.sqrt(e), le = (e) => 1 - e, ue = (e) => Math.exp(-Math.pow(e - 0.5, 2) / (2 * 0.5)), So = {
320
+ SINE_EASE_IN: Ot,
209
321
  SINE_EASE_OUT: zt,
210
- SINE_EASE_IN_OUT: kt,
211
- QUADRATIC_EASE_IN: Nt,
212
- QUADRATIC_EASE_OUT: Ot,
213
- QUADRATIC_EASE_IN_OUT: _t,
214
- CUBIC_EASE_IN: Ft,
215
- CUBIC_EASE_OUT: Rt,
216
- CUBIC_EASE_IN_OUT: Lt,
217
- QUARTIC_EASE_IN: qt,
218
- QUARTIC_EASE_OUT: Dt,
219
- QUARTIC_EASE_IN_OUT: Vt,
220
- QUINTIC_EASE_IN: Xt,
221
- QUINTIC_EASE_OUT: Zt,
222
- QUINTIC_EASE_IN_OUT: jt,
223
- EXPONENTIAL_EASE_IN: Yt,
224
- EXPONENTIAL_EASE_OUT: Ht,
225
- EXPONENTIAL_EASE_IN_OUT: Qt,
226
- CIRCULAR_EASE_IN: Kt,
227
- CIRCULAR_EASE_OUT: $t,
228
- CIRCULAR_EASE_IN_OUT: Jt,
229
- LINEAR: Wt,
230
- SMOOTHSTEP: te,
231
- CONCAVE: ee,
232
- CONVEX: oe,
233
- LOGARITHMIC: ne,
234
- SQUARE_ROOT: se,
235
- INVERSE: re,
236
- GAUSSIAN: ae
237
- }, ie = (e, t, o, n, r) => {
238
- const a = Math.max(0, Math.min(1, e)), s = 1 - a;
239
- return s * s * s * t + 3 * s * s * a * o + 3 * s * a * a * n + a * a * a * r;
240
- }, ce = (e, t = 1) => {
322
+ SINE_EASE_IN_OUT: Ft,
323
+ QUADRATIC_EASE_IN: Lt,
324
+ QUADRATIC_EASE_OUT: kt,
325
+ QUADRATIC_EASE_IN_OUT: Dt,
326
+ CUBIC_EASE_IN: qt,
327
+ CUBIC_EASE_OUT: Vt,
328
+ CUBIC_EASE_IN_OUT: Ht,
329
+ QUARTIC_EASE_IN: Xt,
330
+ QUARTIC_EASE_OUT: Yt,
331
+ QUARTIC_EASE_IN_OUT: Zt,
332
+ QUINTIC_EASE_IN: jt,
333
+ QUINTIC_EASE_OUT: Qt,
334
+ QUINTIC_EASE_IN_OUT: Kt,
335
+ EXPONENTIAL_EASE_IN: $t,
336
+ EXPONENTIAL_EASE_OUT: Jt,
337
+ EXPONENTIAL_EASE_IN_OUT: Wt,
338
+ CIRCULAR_EASE_IN: te,
339
+ CIRCULAR_EASE_OUT: ee,
340
+ CIRCULAR_EASE_IN_OUT: oe,
341
+ LINEAR: ne,
342
+ SMOOTHSTEP: se,
343
+ CONCAVE: re,
344
+ CONVEX: ae,
345
+ LOGARITHMIC: ie,
346
+ SQUARE_ROOT: ce,
347
+ INVERSE: le,
348
+ GAUSSIAN: ue
349
+ }, he = (e, t, o, n, r) => {
350
+ const s = Math.max(0, Math.min(1, e)), a = 1 - s;
351
+ return a * a * a * t + 3 * a * a * s * o + 3 * a * s * s * n + s * s * s * r;
352
+ }, me = (e, t = 1) => {
241
353
  const o = Math.max(1e-3, t);
242
354
  return (1 - Math.exp(-o * e)) / (1 - Math.exp(-o));
243
- }, le = (e, t = 1, o = 1) => {
355
+ }, fe = (e, t = 1, o = 1) => {
244
356
  const n = Math.max(0, Math.min(1, e));
245
357
  return t * Math.pow(n, o);
246
- }, ue = (e, t = 1, o = 1) => {
358
+ }, de = (e, t = 1, o = 1) => {
247
359
  const n = Math.max(1e-3, Math.min(1, e));
248
360
  return t * Math.log(o * n + 1);
249
- }, me = (e, t = 1, o = 0, n = 0) => {
361
+ }, pe = (e, t = 1, o = 0, n = 0) => {
250
362
  const r = Math.max(0, Math.min(1, e));
251
363
  return t * r * r + o * r + n;
252
- }, he = (e, t, o, n) => {
253
- const r = Math.max(0, Math.min(1, e)), a = 1 - r;
254
- return a * a * t + 2 * a * r * o + r * r * n;
255
- }, fe = (e, t = 10) => {
364
+ }, Me = (e, t, o, n) => {
365
+ const r = Math.max(0, Math.min(1, e)), s = 1 - r;
366
+ return s * s * t + 2 * s * r * o + r * r * n;
367
+ }, ye = (e, t = 10) => {
256
368
  const o = Math.max(0, Math.min(1, e));
257
369
  return 1 / (1 + Math.exp(-t * (o - 0.5)));
258
- }, pe = (e) => Math.sin(e * Math.PI * 0.5), F = {
259
- CUBIC: ie,
260
- DAMPED: ce,
261
- EXPONENTIAL: le,
262
- LOGARITHMIC: ue,
263
- PARABOLIC: me,
264
- QUADRATIC: he,
265
- SIGMOID: fe,
266
- SINUSOIDAL: pe
370
+ }, we = (e) => Math.sin(e * Math.PI * 0.5), F = {
371
+ CUBIC: he,
372
+ DAMPED: me,
373
+ EXPONENTIAL: fe,
374
+ LOGARITHMIC: de,
375
+ PARABOLIC: pe,
376
+ QUADRATIC: Me,
377
+ SIGMOID: ye,
378
+ SINUSOIDAL: we
267
379
  };
268
- class fo extends rt {
380
+ class Po extends at {
269
381
  constructor(o = {}) {
270
382
  const {
271
383
  count: n = 20,
272
384
  width: r = 1.5,
273
- height: a = 3,
274
- depth: s = 1.5,
275
- geometry: i = new N(0.1, 6, 6),
385
+ height: s = 3,
386
+ depth: a = 1.5,
387
+ geometry: i = new U(0.1, 6, 6),
276
388
  // Small spheres
277
- material: c = new M({
389
+ material: c = new y({
278
390
  color: 16777215,
279
391
  transparent: !0,
280
392
  opacity: 0.6,
@@ -283,17 +395,17 @@ class fo extends rt {
283
395
  })
284
396
  } = o;
285
397
  super(i, c, n);
286
- E(this, "bubblePositions", []);
287
- E(this, "velocities", []);
288
- E(this, "width");
289
- E(this, "height");
290
- E(this, "depth");
291
- this.height = a, this.width = r, this.depth = s;
398
+ g(this, "bubblePositions", []);
399
+ g(this, "velocities", []);
400
+ g(this, "width");
401
+ g(this, "height");
402
+ g(this, "depth");
403
+ this.height = s, this.width = r, this.depth = a;
292
404
  for (let l = 0; l < this.count; l++) {
293
- const u = new g(
405
+ const u = new b(
294
406
  (Math.random() - 0.5) * r,
295
- Math.random() * (a - 1) + 0.5,
296
- (Math.random() - 0.5) * s
407
+ Math.random() * (s - 1) + 0.5,
408
+ (Math.random() - 0.5) * a
297
409
  );
298
410
  this.bubblePositions.push(u), this.velocities.push(0.01 + Math.random() * 0.02), this.updateInstanceMatrix(l);
299
411
  }
@@ -302,7 +414,7 @@ class fo extends rt {
302
414
  * Updates the position of a specific bubble instance in the InstancedMesh.
303
415
  */
304
416
  updateInstanceMatrix(o) {
305
- const n = this.bubblePositions[o], r = new Z().setPosition(n);
417
+ const n = this.bubblePositions[o], r = new H().setPosition(n);
306
418
  this.setMatrixAt(o, r), this.instanceMatrix.needsUpdate = !0;
307
419
  }
308
420
  /**
@@ -316,7 +428,36 @@ class fo extends rt {
316
428
  }
317
429
  }
318
430
  }
319
- class de extends I {
431
+ class To {
432
+ constructor(t) {
433
+ g(this, "speed");
434
+ g(this, "maxIntensity");
435
+ g(this, "minIntensity");
436
+ g(this, "material");
437
+ const {
438
+ speed: o = 2,
439
+ //
440
+ maxIntensity: n = 0.8,
441
+ minIntensity: r = 0.2
442
+ } = t;
443
+ this.speed = o, this.maxIntensity = n, this.minIntensity = r, this.material = t.material;
444
+ }
445
+ /**
446
+ * Update the emissive intensity of the material.
447
+ *
448
+ * Use Three.Clock getElapsedTime()
449
+ *
450
+ * Example:
451
+ * ```
452
+ * const clock = new THREE.Clock();
453
+ * effect.update(clock.getElapsedTime());
454
+ * ```
455
+ */
456
+ update(t = 0) {
457
+ this.material.emissiveIntensity = this.minIntensity + Math.abs(Math.sin(t * this.speed)) * (this.maxIntensity - this.minIntensity);
458
+ }
459
+ }
460
+ class ve extends A {
320
461
  constructor(t = 0.1) {
321
462
  super();
322
463
  const o = [], n = [], r = [
@@ -337,94 +478,149 @@ class de extends I {
337
478
  [-0.5, 0.75]
338
479
  // Left upper middle
339
480
  ];
340
- for (let s = 0; s < r.length; s++) {
341
- const [i, c] = r[s];
481
+ for (let a = 0; a < r.length; a++) {
482
+ const [i, c] = r[a];
342
483
  o.push(i * t, c * t, 0);
343
484
  }
344
- for (let s = 1; s < r.length - 1; s++)
345
- n.push(0, s, s + 1);
485
+ for (let a = 1; a < r.length - 1; a++)
486
+ n.push(0, a, a + 1);
346
487
  n.push(0, r.length - 1, 1);
347
- const a = new D(o, 3);
348
- this.setAttribute("position", a), this.setIndex(n), this.computeVertexNormals();
488
+ const s = new D(o, 3);
489
+ this.setAttribute("position", s), this.setIndex(n), this.computeVertexNormals();
349
490
  }
350
491
  }
351
- class po extends rt {
492
+ class Go extends at {
352
493
  constructor(o = {}) {
353
494
  const {
354
495
  count: n = 200,
355
496
  width: r = 20,
356
- height: a = 10,
357
- depth: s = 20,
358
- geometry: i = new de(),
359
- material: c = new M({
497
+ height: s = 10,
498
+ depth: a = 20,
499
+ geometry: i = new ve(),
500
+ material: c = new y({
360
501
  color: 8956467,
361
502
  metalness: 0.1,
362
503
  roughness: 0.8,
363
504
  flatShading: !0,
364
- side: L
505
+ side: k
365
506
  })
366
507
  } = o;
367
508
  super(i, c, n);
368
- E(this, "dummyMatrix");
369
- E(this, "velocities");
370
- E(this, "width");
371
- E(this, "height");
372
- E(this, "depth");
373
- this.dummyMatrix = new Z(), this.velocities = [], this.width = r, this.height = a, this.depth = s;
509
+ g(this, "dummyMatrix");
510
+ g(this, "velocities");
511
+ g(this, "width");
512
+ g(this, "height");
513
+ g(this, "depth");
514
+ this.dummyMatrix = new H(), this.velocities = [], this.width = r, this.height = s, this.depth = a;
374
515
  for (let l = 0; l < n; l++) {
375
- const u = (Math.random() - 0.5) * r, m = Math.random() * (a - 1) + 0.5, h = (Math.random() - 0.5) * s, f = (Math.random() - 0.5) * Math.PI, p = (Math.random() - 0.5) * Math.PI, d = (Math.random() - 0.5) * Math.PI;
376
- this.dummyMatrix.makeRotationFromEuler(new bt(f, p, d)), this.dummyMatrix.setPosition(u, m, h), this.setMatrixAt(l, this.dummyMatrix);
377
- const w = new g((Math.random() - 0.5) * 0.01, -5e-3, (Math.random() - 0.5) * 0.01);
516
+ const u = (Math.random() - 0.5) * r, h = Math.random() * (s - 1) + 0.5, m = (Math.random() - 0.5) * a, f = (Math.random() - 0.5) * Math.PI, d = (Math.random() - 0.5) * Math.PI, p = (Math.random() - 0.5) * Math.PI;
517
+ this.dummyMatrix.makeRotationFromEuler(new St(f, d, p)), this.dummyMatrix.setPosition(u, h, m), this.setMatrixAt(l, this.dummyMatrix);
518
+ const w = new b((Math.random() - 0.5) * 0.01, -5e-3, (Math.random() - 0.5) * 0.01);
378
519
  this.velocities.push(w);
379
520
  }
380
521
  this.instanceMatrix.needsUpdate = !0;
381
522
  }
382
523
  update() {
383
524
  for (let o = 0; o < this.count; o++) {
384
- const n = new Z();
525
+ const n = new H();
385
526
  this.getMatrixAt(o, n);
386
- const r = new g();
527
+ const r = new b();
387
528
  r.setFromMatrixPosition(n);
388
- const a = this.velocities[o];
389
- r.add(a), r.y < 0 && (r.set(
529
+ const s = this.velocities[o];
530
+ r.add(s), r.y < 0 && (r.set(
390
531
  (Math.random() - 0.5) * this.width,
391
532
  Math.random() * (this.height - 1) + 0.5,
392
533
  (Math.random() - 0.5) * this.depth
393
- ), a.set((Math.random() - 0.5) * 0.01, -5e-3, (Math.random() - 0.5) * 0.01)), n.setPosition(r), this.setMatrixAt(o, n);
534
+ ), s.set((Math.random() - 0.5) * 0.01, -5e-3, (Math.random() - 0.5) * 0.01)), n.setPosition(r), this.setMatrixAt(o, n);
394
535
  }
395
536
  this.instanceMatrix.needsUpdate = !0;
396
537
  }
397
538
  }
398
- const B = (e, t) => {
399
- const o = e[0].index !== null, n = new Set(Object.keys(e[0].attributes)), r = new Set(Object.keys(e[0].morphAttributes)), a = {}, s = {}, i = e[0].morphTargetsRelative, c = new I();
539
+ function Mt(e = 0, t = 1) {
540
+ return Math.random() * (t - e) + e;
541
+ }
542
+ function Co(e = 0, t = 1) {
543
+ return Math.floor(Math.random() * (t - e + 1)) + e;
544
+ }
545
+ function xe(e = 0.5, t = 0, o = 1) {
546
+ return t + (o - t) * Math.pow(Math.random(), e);
547
+ }
548
+ function ge(e = 0.5, t = 0, o = 1) {
549
+ return t + (o - t) * Math.pow(1 - Math.random(), e);
550
+ }
551
+ function be(e, t, o) {
552
+ const n = t + Math.random() * (o - t);
553
+ return setTimeout(e, n);
554
+ }
555
+ function Bo(e, t, o) {
556
+ let n;
557
+ function r() {
558
+ const s = t + Math.random() * (o - t);
559
+ n = setTimeout(() => {
560
+ e(), r();
561
+ }, s);
562
+ }
563
+ return r(), () => clearTimeout(n);
564
+ }
565
+ class Ro {
566
+ constructor({
567
+ light: t,
568
+ //
569
+ minIntensity: o = 15,
570
+ maxIntensity: n = 20,
571
+ minDuration: r = 50,
572
+ maxDuration: s = 250
573
+ } = {}) {
574
+ g(this, "light");
575
+ g(this, "minIntensity");
576
+ g(this, "maxIntensity");
577
+ g(this, "minDuration");
578
+ g(this, "maxDuration");
579
+ this.light = t, this.minIntensity = o, this.maxIntensity = n, this.minDuration = r, this.maxDuration = s;
580
+ }
581
+ triggerLightning() {
582
+ this.light && (this.light.intensity = Mt(this.minIntensity, this.maxIntensity)), be(
583
+ () => {
584
+ this.light && (this.light.intensity = 0);
585
+ },
586
+ this.minDuration,
587
+ this.maxDuration
588
+ );
589
+ }
590
+ update() {
591
+ Math.random() > 0.98 && this.triggerLightning();
592
+ }
593
+ }
594
+ const T = (e, t) => {
595
+ const o = e[0].index !== null, n = new Set(Object.keys(e[0].attributes)), r = new Set(Object.keys(e[0].morphAttributes)), s = {}, a = {}, i = e[0].morphTargetsRelative, c = new A();
400
596
  let l = 0;
401
- if (e.forEach((u, m) => {
402
- let h = 0;
597
+ if (e.forEach((u, h) => {
598
+ let m = 0;
403
599
  if (o !== (u.index !== null))
404
600
  return console.error(
405
- "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + m + ". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."
601
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + h + ". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."
406
602
  ), null;
407
603
  for (let f in u.attributes) {
408
604
  if (!n.has(f))
409
605
  return console.error(
410
- "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + m + '. All geometries must have compatible attributes; make sure "' + f + '" attribute exists among all geometries, or in none of them.'
606
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + h + '. All geometries must have compatible attributes; make sure "' + f + '" attribute exists among all geometries, or in none of them.'
411
607
  ), null;
412
- a[f] === void 0 && (a[f] = []), a[f].push(u.attributes[f]), h++;
608
+ s[f] === void 0 && (s[f] = []), s[f].push(u.attributes[f]), m++;
413
609
  }
414
- if (h !== n.size)
610
+ if (m !== n.size)
415
611
  return console.error(
416
- "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + m + ". Make sure all geometries have the same number of attributes."
612
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + h + ". Make sure all geometries have the same number of attributes."
417
613
  ), null;
418
614
  if (i !== u.morphTargetsRelative)
419
615
  return console.error(
420
- "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + m + ". .morphTargetsRelative must be consistent throughout all geometries."
616
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + h + ". .morphTargetsRelative must be consistent throughout all geometries."
421
617
  ), null;
422
618
  for (let f in u.morphAttributes) {
423
619
  if (!r.has(f))
424
620
  return console.error(
425
- "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + m + ". .morphAttributes must be consistent throughout all geometries."
621
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + h + ". .morphAttributes must be consistent throughout all geometries."
426
622
  ), null;
427
- s[f] === void 0 && (s[f] = []), s[f].push(u.morphAttributes[f]);
623
+ a[f] === void 0 && (a[f] = []), a[f].push(u.morphAttributes[f]);
428
624
  }
429
625
  if (c.userData.mergedUserData = c.userData.mergedUserData || [], c.userData.mergedUserData.push(u.userData), t) {
430
626
  let f;
@@ -434,135 +630,135 @@ const B = (e, t) => {
434
630
  f = u.attributes.position.count;
435
631
  else
436
632
  return console.error(
437
- "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + m + ". The geometry must have either an index or a position attribute"
633
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + h + ". The geometry must have either an index or a position attribute"
438
634
  ), null;
439
- c.addGroup(l, f, m), l += f;
635
+ c.addGroup(l, f, h), l += f;
440
636
  }
441
637
  }), o) {
442
638
  let u = 0;
443
- const m = [];
444
- e.forEach((h) => {
445
- const f = h.index;
446
- for (let p = 0; p < f.count; ++p)
447
- m.push(f.getX(p) + u);
448
- u += h.attributes.position.count;
449
- }), c.setIndex(m);
639
+ const h = [];
640
+ e.forEach((m) => {
641
+ const f = m.index;
642
+ for (let d = 0; d < f.count; ++d)
643
+ h.push(f.getX(d) + u);
644
+ u += m.attributes.position.count;
645
+ }), c.setIndex(h);
450
646
  }
451
- for (let u in a) {
452
- const m = ut(a[u]);
453
- if (!m)
647
+ for (let u in s) {
648
+ const h = ft(s[u]);
649
+ if (!h)
454
650
  return console.error(
455
651
  "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the " + u + " attribute."
456
652
  ), null;
457
- c.setAttribute(u, m);
653
+ c.setAttribute(u, h);
458
654
  }
459
- for (let u in s) {
460
- const m = s[u][0].length;
461
- if (m === 0)
655
+ for (let u in a) {
656
+ const h = a[u][0].length;
657
+ if (h === 0)
462
658
  break;
463
659
  c.morphAttributes = c.morphAttributes || {}, c.morphAttributes[u] = [];
464
- for (let h = 0; h < m; ++h) {
660
+ for (let m = 0; m < h; ++m) {
465
661
  const f = [];
466
- for (let d = 0; d < s[u].length; ++d)
467
- f.push(s[u][d][h]);
468
- const p = ut(f);
469
- if (!p)
662
+ for (let p = 0; p < a[u].length; ++p)
663
+ f.push(a[u][p][m]);
664
+ const d = ft(f);
665
+ if (!d)
470
666
  return console.error(
471
667
  "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the " + u + " morphAttribute."
472
668
  ), null;
473
- c.morphAttributes[u].push(p);
669
+ c.morphAttributes[u].push(d);
474
670
  }
475
671
  }
476
672
  return c;
477
- }, ut = (e) => {
673
+ }, ft = (e) => {
478
674
  let t, o, n, r = 0;
479
- if (e.forEach((a) => {
480
- if (t === void 0 && (t = a.array.constructor), t !== a.array.constructor)
675
+ if (e.forEach((s) => {
676
+ if (t === void 0 && (t = s.array.constructor), t !== s.array.constructor)
481
677
  return console.error(
482
678
  "THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."
483
679
  ), null;
484
- if (o === void 0 && (o = a.itemSize), o !== a.itemSize)
680
+ if (o === void 0 && (o = s.itemSize), o !== s.itemSize)
485
681
  return console.error(
486
682
  "THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."
487
683
  ), null;
488
- if (n === void 0 && (n = a.normalized), n !== a.normalized)
684
+ if (n === void 0 && (n = s.normalized), n !== s.normalized)
489
685
  return console.error(
490
686
  "THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."
491
687
  ), null;
492
- r += a.array.length;
688
+ r += s.array.length;
493
689
  }), t && o) {
494
- const a = new t(r);
495
- let s = 0;
690
+ const s = new t(r);
691
+ let a = 0;
496
692
  return e.forEach((i) => {
497
- a.set(i.array, s), s += i.array.length;
498
- }), new R(a, o, n);
693
+ s.set(i.array, a), a += i.array.length;
694
+ }), new L(s, o, n);
499
695
  }
500
696
  };
501
- function ye(e, t = 1e-4) {
697
+ function Ie(e, t = 1e-4) {
502
698
  t = Math.max(t, Number.EPSILON);
503
- const o = {}, n = e.getIndex(), r = e.getAttribute("position"), a = n ? n.count : r.count;
504
- let s = 0;
505
- const i = Object.keys(e.attributes), c = {}, l = {}, u = [], m = ["getX", "getY", "getZ", "getW"];
506
- for (let d = 0, w = i.length; d < w; d++) {
507
- const v = i[d];
699
+ const o = {}, n = e.getIndex(), r = e.getAttribute("position"), s = n ? n.count : r.count;
700
+ let a = 0;
701
+ const i = Object.keys(e.attributes), c = {}, l = {}, u = [], h = ["getX", "getY", "getZ", "getW"];
702
+ for (let p = 0, w = i.length; p < w; p++) {
703
+ const v = i[p];
508
704
  c[v] = [];
509
705
  const x = e.morphAttributes[v];
510
706
  x && (l[v] = new Array(x.length).fill(0).map(() => []));
511
707
  }
512
- const h = Math.log10(1 / t), f = Math.pow(10, h);
513
- for (let d = 0; d < a; d++) {
514
- const w = n ? n.getX(d) : d;
708
+ const m = Math.log10(1 / t), f = Math.pow(10, m);
709
+ for (let p = 0; p < s; p++) {
710
+ const w = n ? n.getX(p) : p;
515
711
  let v = "";
516
- for (let x = 0, U = i.length; x < U; x++) {
517
- const z = i[x], T = e.getAttribute(z), G = T.itemSize;
518
- for (let k = 0; k < G; k++)
519
- v += `${~~(T[m[k]](w) * f)},`;
712
+ for (let x = 0, R = i.length; x < R; x++) {
713
+ const N = i[x], P = e.getAttribute(N), G = P.itemSize;
714
+ for (let _ = 0; _ < G; _++)
715
+ v += `${~~(P[h[_]](w) * f)},`;
520
716
  }
521
717
  if (v in o)
522
718
  u.push(o[v]);
523
719
  else {
524
- for (let x = 0, U = i.length; x < U; x++) {
525
- const z = i[x], T = e.getAttribute(z), G = e.morphAttributes[z], k = T.itemSize, O = c[z], tt = l[z];
526
- for (let V = 0; V < k; V++) {
527
- const X = m[V];
528
- if (O.push(T[X](w)), G)
529
- for (let C = 0, Mt = G.length; C < Mt; C++)
530
- tt[C].push(G[C][X](w));
720
+ for (let x = 0, R = i.length; x < R; x++) {
721
+ const N = i[x], P = e.getAttribute(N), G = e.morphAttributes[N], _ = P.itemSize, O = c[N], et = l[N];
722
+ for (let q = 0; q < _; q++) {
723
+ const V = h[q];
724
+ if (O.push(P[V](w)), G)
725
+ for (let C = 0, bt = G.length; C < bt; C++)
726
+ et[C].push(G[C][V](w));
531
727
  }
532
728
  }
533
- o[v] = s, u.push(s), s++;
729
+ o[v] = a, u.push(a), a++;
534
730
  }
535
731
  }
536
- const p = e.clone();
537
- for (let d = 0, w = i.length; d < w; d++) {
538
- const v = i[d], x = e.getAttribute(v), U = new x.array.constructor(c[v]), z = new R(U, x.itemSize, x.normalized);
539
- if (p.setAttribute(v, z), v in l)
540
- for (let T = 0; T < l[v].length; T++) {
541
- const G = e.morphAttributes[v][T], k = new G.array.constructor(l[v][T]), O = new R(k, G.itemSize, G.normalized);
542
- p.morphAttributes[v][T] = O;
732
+ const d = e.clone();
733
+ for (let p = 0, w = i.length; p < w; p++) {
734
+ const v = i[p], x = e.getAttribute(v), R = new x.array.constructor(c[v]), N = new L(R, x.itemSize, x.normalized);
735
+ if (d.setAttribute(v, N), v in l)
736
+ for (let P = 0; P < l[v].length; P++) {
737
+ const G = e.morphAttributes[v][P], _ = new G.array.constructor(l[v][P]), O = new L(_, G.itemSize, G.normalized);
738
+ d.morphAttributes[v][P] = O;
543
739
  }
544
740
  }
545
- return p.setIndex(u), p;
741
+ return d.setIndex(u), d;
546
742
  }
547
- class ft extends I {
548
- constructor(t = 1, o = 1.5, n = 0.5, r = 0.05, a = 0.05) {
743
+ class yt extends A {
744
+ constructor(t = 1, o = 1.5, n = 0.5, r = 0.05, s = 0.05) {
549
745
  super();
550
- const s = t, i = o, c = n, l = r, u = a, m = [
746
+ const a = t, i = o, c = n, l = r, u = s, h = [
551
747
  // Front cover
552
748
  0,
553
749
  0,
554
750
  0,
555
- s,
751
+ a,
556
752
  0,
557
753
  0,
558
- s,
754
+ a,
559
755
  i,
560
756
  0,
561
757
  0,
562
758
  i,
563
759
  0,
564
760
  // Back cover
565
- s,
761
+ a,
566
762
  0,
567
763
  -c,
568
764
  0,
@@ -571,7 +767,7 @@ class ft extends I {
571
767
  0,
572
768
  i,
573
769
  -c,
574
- s,
770
+ a,
575
771
  i,
576
772
  -c,
577
773
  // Spine
@@ -588,7 +784,7 @@ class ft extends I {
588
784
  i,
589
785
  -c,
590
786
  // Inside front cover
591
- s,
787
+ a,
592
788
  0,
593
789
  -l,
594
790
  l,
@@ -597,17 +793,17 @@ class ft extends I {
597
793
  l,
598
794
  i,
599
795
  -l,
600
- s,
796
+ a,
601
797
  i,
602
798
  -l,
603
799
  // Inside back cover
604
800
  l,
605
801
  0,
606
802
  -c + l,
607
- s,
803
+ a,
608
804
  0,
609
805
  -c + l,
610
- s,
806
+ a,
611
807
  i,
612
808
  -c + l,
613
809
  l,
@@ -630,10 +826,10 @@ class ft extends I {
630
826
  0,
631
827
  i,
632
828
  0,
633
- s,
829
+ a,
634
830
  i,
635
831
  0,
636
- s,
832
+ a,
637
833
  i,
638
834
  -l,
639
835
  l,
@@ -646,10 +842,10 @@ class ft extends I {
646
842
  l,
647
843
  i,
648
844
  -c + l,
649
- s,
845
+ a,
650
846
  i,
651
847
  -c + l,
652
- s,
848
+ a,
653
849
  i,
654
850
  -c,
655
851
  // Spine cover top
@@ -672,20 +868,20 @@ class ft extends I {
672
868
  l,
673
869
  0,
674
870
  -l,
675
- s,
871
+ a,
676
872
  0,
677
873
  -l,
678
- s,
874
+ a,
679
875
  0,
680
876
  0,
681
877
  // Back cover bottom
682
878
  0,
683
879
  0,
684
880
  -c,
685
- s,
881
+ a,
686
882
  0,
687
883
  -c,
688
- s,
884
+ a,
689
885
  0,
690
886
  -c + l,
691
887
  l,
@@ -705,32 +901,32 @@ class ft extends I {
705
901
  0,
706
902
  -l,
707
903
  // Front cover edge
708
- s,
904
+ a,
709
905
  0,
710
906
  0,
711
- s,
907
+ a,
712
908
  0,
713
909
  -l,
714
- s,
910
+ a,
715
911
  i,
716
912
  -l,
717
- s,
913
+ a,
718
914
  i,
719
915
  0,
720
916
  // Back cover edge
721
- s,
917
+ a,
722
918
  0,
723
919
  -c,
724
- s,
920
+ a,
725
921
  i,
726
922
  -c,
727
- s,
923
+ a,
728
924
  i,
729
925
  -c + l,
730
- s,
926
+ a,
731
927
  0,
732
928
  -c + l
733
- ], h = [
929
+ ], m = [
734
930
  0,
735
931
  0,
736
932
  1,
@@ -913,14 +1109,14 @@ class ft extends I {
913
1109
  0,
914
1110
  0
915
1111
  // Back cover edge
916
- ], f = t / (t * 2 + n), p = (t + n) / (t * 2 + n), d = [
917
- p,
1112
+ ], f = t / (t * 2 + n), d = (t + n) / (t * 2 + n), p = [
1113
+ d,
918
1114
  0,
919
1115
  1,
920
1116
  0,
921
1117
  1,
922
1118
  1,
923
- p,
1119
+ d,
924
1120
  1,
925
1121
  // Front cover
926
1122
  0,
@@ -934,18 +1130,18 @@ class ft extends I {
934
1130
  // Back cover
935
1131
  f,
936
1132
  0,
937
- p,
1133
+ d,
938
1134
  0,
939
- p,
1135
+ d,
940
1136
  1,
941
1137
  f,
942
1138
  1,
943
1139
  // Spine
944
1140
  1,
945
1141
  0,
946
- p,
1142
+ d,
947
1143
  0,
948
- p,
1144
+ d,
949
1145
  1,
950
1146
  1,
951
1147
  1,
@@ -959,22 +1155,22 @@ class ft extends I {
959
1155
  f,
960
1156
  1,
961
1157
  // Inside back cover
962
- p,
1158
+ d,
963
1159
  0,
964
1160
  f,
965
1161
  0,
966
1162
  f,
967
1163
  1,
968
- p,
1164
+ d,
969
1165
  1,
970
1166
  // Inside spine
971
- p,
1167
+ d,
972
1168
  0,
973
1169
  1,
974
1170
  0,
975
1171
  1,
976
1172
  1,
977
- p,
1173
+ d,
978
1174
  1,
979
1175
  // Front cover top
980
1176
  0,
@@ -1139,126 +1335,114 @@ class ft extends I {
1139
1335
  54,
1140
1336
  55
1141
1337
  // Back cover edge
1142
- ], v = new Float32Array(m), x = new Float32Array(h), U = new Float32Array(d), z = new Uint16Array(w), T = new I();
1143
- T.setAttribute("position", new R(v, 3)), T.setAttribute("normal", new R(x, 3)), T.setAttribute("uv", new R(U, 2)), T.setIndex(new R(z, 1));
1144
- const G = new A(t - l - u, i - u * 2, c - l * 2);
1145
- G.translate((t - l - u) / 2 + l, i / 2, -c / 2), this.copy(B([T, G], !0));
1338
+ ], v = new Float32Array(h), x = new Float32Array(m), R = new Float32Array(p), N = new Uint16Array(w), P = new A();
1339
+ P.setAttribute("position", new L(v, 3)), P.setAttribute("normal", new L(x, 3)), P.setAttribute("uv", new L(R, 2)), P.setIndex(new L(N, 1));
1340
+ const G = new E(t - l - u, i - u * 2, c - l * 2);
1341
+ G.translate((t - l - u) / 2 + l, i / 2, -c / 2), this.copy(T([P, G], !0));
1146
1342
  }
1147
1343
  }
1148
- function we(e = 0, t = 1) {
1149
- return Math.random() * (t - e) + e;
1150
- }
1151
- function yo(e = 0, t = 1) {
1152
- return Math.floor(Math.random() * (t - e + 1)) + e;
1153
- }
1154
- function Me(e = 0.5, t = 0, o = 1) {
1155
- return t + (o - t) * Math.pow(Math.random(), e);
1156
- }
1157
- function ve(e = 0.5, t = 0, o = 1) {
1158
- return t + (o - t) * Math.pow(1 - Math.random(), e);
1159
- }
1160
- function pt({
1344
+ function wt({
1161
1345
  scaleXMin: e = 0.4,
1162
1346
  scaleXMax: t = 0.7,
1163
1347
  scaleYMin: o = 0.3,
1164
1348
  scaleYMax: n = 0.95,
1165
1349
  scaleZMin: r = 0.1,
1166
- scaleZMax: a = 0.5
1350
+ scaleZMax: s = 0.5
1167
1351
  } = {}) {
1168
- return new g(
1169
- we(e, t),
1170
- Me(0.25, o, n),
1171
- ve(0.8, r, a)
1352
+ return new b(
1353
+ Mt(e, t),
1354
+ xe(0.25, o, n),
1355
+ ge(0.8, r, s)
1172
1356
  );
1173
1357
  }
1174
- function dt({
1358
+ function vt({
1175
1359
  coverMaterial: e,
1176
1360
  pagesMaterial: t,
1177
1361
  scales: o
1178
1362
  }) {
1179
- const n = new ft(), r = new rt(n, [e, t], o.length), a = new Z();
1180
- let s = 0;
1363
+ const n = new yt(), r = new at(n, [e, t], o.length), s = new H();
1364
+ let a = 0;
1181
1365
  for (let i = 0; i < o.length; i++) {
1182
- const c = o[i], l = new Z();
1183
- l.makeScale(c.x, c.y, c.z), a.identity(), a.multiply(l), a.setPosition(0.01 + Math.random() * 0.1, 0, s + c.z * 0.5), r.setMatrixAt(i, a), s += c.z * 0.5;
1366
+ const c = o[i], l = new H();
1367
+ l.makeScale(c.x, c.y, c.z), s.identity(), s.multiply(l), s.setPosition(0.01 + Math.random() * 0.1, 0, a + c.z * 0.5), r.setMatrixAt(i, s), a += c.z * 0.5;
1184
1368
  }
1185
1369
  return r;
1186
1370
  }
1187
- function wo({
1371
+ function No({
1188
1372
  coverMaterial: e,
1189
1373
  pagesMaterial: t,
1190
1374
  count: o = 10,
1191
1375
  scaleXMin: n = 0.4,
1192
1376
  scaleXMax: r = 0.7,
1193
- scaleYMin: a = 0.3,
1194
- scaleYMax: s = 0.95,
1377
+ scaleYMin: s = 0.3,
1378
+ scaleYMax: a = 0.95,
1195
1379
  scaleZMin: i = 0.1,
1196
1380
  scaleZMax: c = 0.5
1197
1381
  }) {
1198
1382
  const l = Array.from(
1199
1383
  { length: o },
1200
- () => pt({ scaleXMin: n, scaleXMax: r, scaleYMin: a, scaleYMax: s, scaleZMin: i, scaleZMax: c })
1384
+ () => wt({ scaleXMin: n, scaleXMax: r, scaleYMin: s, scaleYMax: a, scaleZMin: i, scaleZMax: c })
1201
1385
  );
1202
- return dt({ coverMaterial: e, pagesMaterial: t, scales: l });
1386
+ return vt({ coverMaterial: e, pagesMaterial: t, scales: l });
1203
1387
  }
1204
- function Mo({
1388
+ function Uo({
1205
1389
  coverMaterial: e,
1206
1390
  pagesMaterial: t,
1207
1391
  length: o = 10,
1208
1392
  scaleXMin: n = 0.4,
1209
1393
  scaleXMax: r = 0.7,
1210
- scaleYMin: a = 0.3,
1211
- scaleYMax: s = 0.95,
1394
+ scaleYMin: s = 0.3,
1395
+ scaleYMax: a = 0.95,
1212
1396
  scaleZMin: i = 0.1,
1213
1397
  scaleZMax: c = 0.5
1214
1398
  }) {
1215
1399
  const l = [];
1216
1400
  let u = o;
1217
1401
  for (; u > 0; ) {
1218
- const m = pt({ scaleXMin: n, scaleXMax: r, scaleYMin: a, scaleYMax: s, scaleZMin: i, scaleZMax: c });
1219
- m.z = Math.min(m.z, u), l.push(m), u -= m.z;
1402
+ const h = wt({ scaleXMin: n, scaleXMax: r, scaleYMin: s, scaleYMax: a, scaleZMin: i, scaleZMax: c });
1403
+ h.z = Math.min(h.z, u), l.push(h), u -= h.z;
1220
1404
  }
1221
- return dt({ coverMaterial: e, pagesMaterial: t, scales: l });
1405
+ return vt({ coverMaterial: e, pagesMaterial: t, scales: l });
1222
1406
  }
1223
- class vo extends I {
1224
- constructor(t = 2, o = 0.3, n = 0.6, r = 5, a = 5, s = Math.PI / 4) {
1407
+ class _o extends A {
1408
+ constructor(t = 2, o = 0.3, n = 0.6, r = 5, s = 5, a = Math.PI / 4) {
1225
1409
  super();
1226
1410
  const i = [], c = [];
1227
1411
  for (let f = 0; f < r; f++) {
1228
- const p = f * o, d = p + o, w = f * n, v = w + n;
1412
+ const d = f * o, p = d + o, w = f * n, v = w + n;
1229
1413
  i.push(
1230
1414
  // Vertical riser
1231
1415
  -t / 2,
1232
- p,
1416
+ d,
1233
1417
  w,
1234
1418
  // Bottom-left
1235
1419
  t / 2,
1236
- p,
1420
+ d,
1237
1421
  w,
1238
1422
  // Bottom-right
1239
1423
  t / 2,
1240
- d,
1424
+ p,
1241
1425
  w,
1242
1426
  // Top-right
1243
1427
  -t / 2,
1244
- d,
1428
+ p,
1245
1429
  w,
1246
1430
  // Top-left
1247
1431
  // Horizontal tread
1248
1432
  -t / 2,
1249
- d,
1433
+ p,
1250
1434
  w,
1251
1435
  // Top-left
1252
1436
  t / 2,
1253
- d,
1437
+ p,
1254
1438
  w,
1255
1439
  // Top-right
1256
1440
  t / 2,
1257
- d,
1441
+ p,
1258
1442
  v,
1259
1443
  // Back-right
1260
1444
  -t / 2,
1261
- d,
1445
+ p,
1262
1446
  v
1263
1447
  // Back-left
1264
1448
  );
@@ -1279,52 +1463,52 @@ class vo extends I {
1279
1463
  x + 7
1280
1464
  );
1281
1465
  }
1282
- const l = r * o, u = r * n, m = t * 2;
1466
+ const l = r * o, u = r * n, h = t * 2;
1283
1467
  i.push(
1284
1468
  // Landing platform (4 vertices)
1285
- -m / 2,
1469
+ -h / 2,
1286
1470
  l,
1287
1471
  u,
1288
1472
  // Bottom-left
1289
- m / 2,
1473
+ h / 2,
1290
1474
  l,
1291
1475
  u,
1292
1476
  // Bottom-right
1293
- m / 2,
1477
+ h / 2,
1294
1478
  l,
1295
1479
  u + n,
1296
1480
  // Top-right
1297
- -m / 2,
1481
+ -h / 2,
1298
1482
  l,
1299
1483
  u + n
1300
1484
  // Top-left
1301
1485
  );
1302
- const h = r * 8;
1486
+ const m = r * 8;
1303
1487
  c.push(
1304
- h,
1305
- h + 1,
1306
- h + 2,
1488
+ m,
1489
+ m + 1,
1490
+ m + 2,
1307
1491
  // First triangle for landing
1308
- h,
1309
- h + 2,
1310
- h + 3
1492
+ m,
1493
+ m + 2,
1494
+ m + 3
1311
1495
  // Second triangle for landing
1312
1496
  );
1313
1497
  for (let f = 0; f < 2; f++) {
1314
- const p = f === 0 ? 1 : -1;
1315
- for (let d = 0; d < a; d++) {
1316
- const w = l + d * o, v = w + o, x = p * (m / 4), U = u + n, z = d * n * Math.cos(s), T = d * n * Math.sin(s), G = x + p * z - t / 2 * Math.cos(s), k = x + p * z + t / 2 * Math.cos(s), O = U + T, tt = G + p * n * Math.cos(s), V = k + p * n * Math.cos(s), X = O + n * Math.sin(s);
1498
+ const d = f === 0 ? 1 : -1;
1499
+ for (let p = 0; p < s; p++) {
1500
+ const w = l + p * o, v = w + o, x = d * (h / 4), R = u + n, N = p * n * Math.cos(a), P = p * n * Math.sin(a), G = x + d * N - t / 2 * Math.cos(a), _ = x + d * N + t / 2 * Math.cos(a), O = R + P, et = G + d * n * Math.cos(a), q = _ + d * n * Math.cos(a), V = O + n * Math.sin(a);
1317
1501
  i.push(
1318
1502
  // Vertical riser
1319
1503
  G,
1320
1504
  w,
1321
1505
  O,
1322
1506
  // Bottom-left
1323
- k,
1507
+ _,
1324
1508
  w,
1325
1509
  O,
1326
1510
  // Bottom-right
1327
- k,
1511
+ _,
1328
1512
  v,
1329
1513
  O,
1330
1514
  // Top-right
@@ -1337,20 +1521,20 @@ class vo extends I {
1337
1521
  v,
1338
1522
  O,
1339
1523
  // Top-left
1340
- k,
1524
+ _,
1341
1525
  v,
1342
1526
  O,
1343
1527
  // Top-right
1344
- V,
1528
+ q,
1345
1529
  v,
1346
- X,
1530
+ V,
1347
1531
  // Back-right
1348
- tt,
1532
+ et,
1349
1533
  v,
1350
- X
1534
+ V
1351
1535
  // Back-left
1352
1536
  );
1353
- const C = h + 4 + f * a * 8 + d * 8;
1537
+ const C = m + 4 + f * s * 8 + p * 8;
1354
1538
  c.push(
1355
1539
  C,
1356
1540
  C + 1,
@@ -1371,10 +1555,10 @@ class vo extends I {
1371
1555
  this.setIndex(c), this.setAttribute("position", new D(i, 3)), this.computeVertexNormals();
1372
1556
  }
1373
1557
  }
1374
- class xo extends I {
1558
+ class Oo extends A {
1375
1559
  constructor(t = 5, o = 3, n = 5, r = 0.2) {
1376
1560
  super();
1377
- const a = [
1561
+ const s = [
1378
1562
  // Floor vertices
1379
1563
  -t / 2,
1380
1564
  0,
@@ -1426,7 +1610,7 @@ class xo extends I {
1426
1610
  o,
1427
1611
  -n / 2
1428
1612
  // 11
1429
- ], s = [
1613
+ ], a = [
1430
1614
  // Floor
1431
1615
  0,
1432
1616
  1,
@@ -1449,52 +1633,52 @@ class xo extends I {
1449
1633
  10,
1450
1634
  11
1451
1635
  ];
1452
- this.setIndex(s), this.setAttribute("position", new D(a, 3)), this.computeVertexNormals();
1636
+ this.setIndex(a), this.setAttribute("position", new D(s, 3)), this.computeVertexNormals();
1453
1637
  }
1454
1638
  }
1455
- class go extends I {
1456
- constructor(t = 2, o = 0.3, n = 0.5, r = 5, a = 2) {
1639
+ class zo extends A {
1640
+ constructor(t = 2, o = 0.3, n = 0.5, r = 5, s = 2) {
1457
1641
  super();
1458
- const s = [], i = [];
1459
- for (let m = 0; m < r; m++) {
1460
- const h = m * o, f = h + o, p = m * n, d = p + n;
1461
- s.push(
1642
+ const a = [], i = [];
1643
+ for (let h = 0; h < r; h++) {
1644
+ const m = h * o, f = m + o, d = h * n, p = d + n;
1645
+ a.push(
1462
1646
  // Vertical riser
1463
1647
  -t / 2,
1464
- h,
1465
- p,
1648
+ m,
1649
+ d,
1466
1650
  // Bottom-left
1467
1651
  t / 2,
1468
- h,
1469
- p,
1652
+ m,
1653
+ d,
1470
1654
  // Bottom-right
1471
1655
  t / 2,
1472
1656
  f,
1473
- p,
1657
+ d,
1474
1658
  // Top-right
1475
1659
  -t / 2,
1476
1660
  f,
1477
- p,
1661
+ d,
1478
1662
  // Top-left
1479
1663
  // Horizontal tread
1480
1664
  -t / 2,
1481
1665
  f,
1482
- p,
1666
+ d,
1483
1667
  // Top-left
1484
1668
  t / 2,
1485
1669
  f,
1486
- p,
1670
+ d,
1487
1671
  // Top-right
1488
1672
  t / 2,
1489
1673
  f,
1490
- d,
1674
+ p,
1491
1675
  // Back-right
1492
1676
  -t / 2,
1493
1677
  f,
1494
- d
1678
+ p
1495
1679
  // Back-left
1496
1680
  );
1497
- const w = m * 8;
1681
+ const w = h * 8;
1498
1682
  i.push(
1499
1683
  w,
1500
1684
  w + 1,
@@ -1512,7 +1696,7 @@ class go extends I {
1512
1696
  );
1513
1697
  }
1514
1698
  const c = r * o, l = r * n;
1515
- s.push(
1699
+ a.push(
1516
1700
  // Landing platform (4 vertices)
1517
1701
  -t / 2,
1518
1702
  c,
@@ -1524,11 +1708,11 @@ class go extends I {
1524
1708
  // Bottom-right
1525
1709
  t / 2,
1526
1710
  c,
1527
- l + a,
1711
+ l + s,
1528
1712
  // Top-right
1529
1713
  -t / 2,
1530
1714
  c,
1531
- l + a
1715
+ l + s
1532
1716
  // Top-left
1533
1717
  );
1534
1718
  const u = r * 8;
@@ -1542,45 +1726,45 @@ class go extends I {
1542
1726
  u + 3
1543
1727
  // Second triangle for landing
1544
1728
  );
1545
- for (let m = 0; m < r; m++) {
1546
- const h = c + m * o, f = h + o, p = -t / 2 - m * n, d = p - n;
1547
- s.push(
1729
+ for (let h = 0; h < r; h++) {
1730
+ const m = c + h * o, f = m + o, d = -t / 2 - h * n, p = d - n;
1731
+ a.push(
1548
1732
  // Vertical riser
1549
- p,
1550
- h,
1551
- l + a,
1733
+ d,
1734
+ m,
1735
+ l + s,
1552
1736
  // Bottom-left
1553
- p,
1554
- h,
1555
- l + a - t,
1737
+ d,
1738
+ m,
1739
+ l + s - t,
1556
1740
  // Bottom-right
1557
- p,
1741
+ d,
1558
1742
  f,
1559
- l + a - t,
1743
+ l + s - t,
1560
1744
  // Top-right
1561
- p,
1745
+ d,
1562
1746
  f,
1563
- l + a,
1747
+ l + s,
1564
1748
  // Top-left
1565
1749
  // Horizontal tread
1566
- p,
1750
+ d,
1567
1751
  f,
1568
- l + a,
1752
+ l + s,
1569
1753
  // Top-left
1570
- p,
1754
+ d,
1571
1755
  f,
1572
- l + a - t,
1756
+ l + s - t,
1573
1757
  // Top-right
1574
- d,
1758
+ p,
1575
1759
  f,
1576
- l + a - t,
1760
+ l + s - t,
1577
1761
  // Back-right
1578
- d,
1762
+ p,
1579
1763
  f,
1580
- l + a
1764
+ l + s
1581
1765
  // Back-left
1582
1766
  );
1583
- const w = u + 4 + m * 8;
1767
+ const w = u + 4 + h * 8;
1584
1768
  i.push(
1585
1769
  w,
1586
1770
  w + 1,
@@ -1597,84 +1781,84 @@ class go extends I {
1597
1781
  w + 7
1598
1782
  );
1599
1783
  }
1600
- this.setIndex(i), this.setAttribute("position", new D(s, 3)), this.computeVertexNormals();
1784
+ this.setIndex(i), this.setAttribute("position", new D(a, 3)), this.computeVertexNormals();
1601
1785
  }
1602
1786
  }
1603
- class bo extends I {
1604
- constructor(t = 1, o = 0.4, n = 0.2, r = 20, a = 2, s = Math.PI / 8) {
1787
+ class Fo extends A {
1788
+ constructor(t = 1, o = 0.4, n = 0.2, r = 20, s = 2, a = Math.PI / 8) {
1605
1789
  super();
1606
1790
  const i = [], c = [];
1607
1791
  let l = 0;
1608
1792
  for (let u = 0; u < r; u++) {
1609
- const m = a * Math.cos(l), h = a * Math.sin(l), f = u * n, p = f + n;
1793
+ const h = s * Math.cos(l), m = s * Math.sin(l), f = u * n, d = f + n;
1610
1794
  i.push(
1611
1795
  // Front face (vertical riser)
1612
- m - t / 2 * Math.cos(l),
1796
+ h - t / 2 * Math.cos(l),
1613
1797
  f,
1614
- h - t / 2 * Math.sin(l),
1798
+ m - t / 2 * Math.sin(l),
1615
1799
  // Bottom-left
1616
- m + t / 2 * Math.cos(l),
1800
+ h + t / 2 * Math.cos(l),
1617
1801
  f,
1618
- h + t / 2 * Math.sin(l),
1802
+ m + t / 2 * Math.sin(l),
1619
1803
  // Bottom-right
1620
- m + t / 2 * Math.cos(l),
1621
- p,
1622
- h + t / 2 * Math.sin(l),
1804
+ h + t / 2 * Math.cos(l),
1805
+ d,
1806
+ m + t / 2 * Math.sin(l),
1623
1807
  // Top-right
1624
- m - t / 2 * Math.cos(l),
1625
- p,
1626
- h - t / 2 * Math.sin(l)
1808
+ h - t / 2 * Math.cos(l),
1809
+ d,
1810
+ m - t / 2 * Math.sin(l)
1627
1811
  // Top-left
1628
1812
  ), i.push(
1629
1813
  // Top face (horizontal tread)
1630
- m - t / 2 * Math.cos(l),
1631
- p,
1632
- h - t / 2 * Math.sin(l),
1814
+ h - t / 2 * Math.cos(l),
1815
+ d,
1816
+ m - t / 2 * Math.sin(l),
1633
1817
  // Top-left-front
1634
- m + t / 2 * Math.cos(l),
1635
- p,
1636
- h + t / 2 * Math.sin(l),
1818
+ h + t / 2 * Math.cos(l),
1819
+ d,
1820
+ m + t / 2 * Math.sin(l),
1637
1821
  // Top-right-front
1638
- m + t / 2 * Math.cos(l) - o * Math.sin(l),
1639
- p,
1640
- h + t / 2 * Math.sin(l) + o * Math.cos(l),
1822
+ h + t / 2 * Math.cos(l) - o * Math.sin(l),
1823
+ d,
1824
+ m + t / 2 * Math.sin(l) + o * Math.cos(l),
1641
1825
  // Back-right
1642
- m - t / 2 * Math.cos(l) - o * Math.sin(l),
1643
- p,
1644
- h - t / 2 * Math.sin(l) + o * Math.cos(l)
1826
+ h - t / 2 * Math.cos(l) - o * Math.sin(l),
1827
+ d,
1828
+ m - t / 2 * Math.sin(l) + o * Math.cos(l)
1645
1829
  // Back-left
1646
1830
  );
1647
- const d = u * 8;
1831
+ const p = u * 8;
1648
1832
  c.push(
1649
- d,
1650
- d + 1,
1651
- d + 2,
1833
+ p,
1834
+ p + 1,
1835
+ p + 2,
1652
1836
  // First triangle for riser
1653
- d,
1654
- d + 2,
1655
- d + 3
1837
+ p,
1838
+ p + 2,
1839
+ p + 3
1656
1840
  // Second triangle for riser
1657
1841
  ), c.push(
1658
- d + 4,
1659
- d + 5,
1660
- d + 6,
1842
+ p + 4,
1843
+ p + 5,
1844
+ p + 6,
1661
1845
  // First triangle for tread
1662
- d + 4,
1663
- d + 6,
1664
- d + 7
1846
+ p + 4,
1847
+ p + 6,
1848
+ p + 7
1665
1849
  // Second triangle for tread
1666
- ), l += s;
1850
+ ), l += a;
1667
1851
  }
1668
1852
  this.setIndex(c), this.setAttribute("position", new D(i, 3)), this.computeVertexNormals();
1669
1853
  }
1670
1854
  }
1671
- class Ao extends I {
1855
+ class Lo extends A {
1672
1856
  constructor(t = 2, o = 0.3, n = 0.5, r = 10) {
1673
1857
  super();
1674
- const a = [], s = [];
1858
+ const s = [], a = [];
1675
1859
  for (let i = 0; i < r; i++) {
1676
- const c = i * o, l = c + o, u = i * n, m = u + n;
1677
- a.push(
1860
+ const c = i * o, l = c + o, u = i * n, h = u + n;
1861
+ s.push(
1678
1862
  // Bottom face of riser (front face)
1679
1863
  -t / 2,
1680
1864
  c,
@@ -1703,330 +1887,355 @@ class Ao extends I {
1703
1887
  // 5: Top-right-front (repeated)
1704
1888
  t / 2,
1705
1889
  l,
1706
- m,
1890
+ h,
1707
1891
  // 6: Top-right-back
1708
1892
  -t / 2,
1709
1893
  l,
1710
- m
1894
+ h
1711
1895
  // 7: Top-left-back
1712
1896
  );
1713
- const h = i * 8;
1714
- s.push(
1715
- h,
1716
- h + 1,
1717
- h + 2,
1897
+ const m = i * 8;
1898
+ a.push(
1899
+ m,
1900
+ m + 1,
1901
+ m + 2,
1718
1902
  // First triangle for riser
1719
- h,
1720
- h + 2,
1721
- h + 3
1903
+ m,
1904
+ m + 2,
1905
+ m + 3
1722
1906
  // Second triangle for riser
1723
- ), s.push(
1724
- h + 4,
1725
- h + 6,
1726
- h + 5,
1907
+ ), a.push(
1908
+ m + 4,
1909
+ m + 6,
1910
+ m + 5,
1727
1911
  // First triangle for tread
1728
- h + 4,
1729
- h + 7,
1730
- h + 6
1912
+ m + 4,
1913
+ m + 7,
1914
+ m + 6
1731
1915
  // Second triangle for tread
1732
1916
  );
1733
1917
  }
1734
- this.setIndex(s), this.setAttribute("position", new D(a, 3)), this.computeVertexNormals();
1918
+ this.setIndex(a), this.setAttribute("position", new D(s, 3)), this.computeVertexNormals();
1735
1919
  }
1736
1920
  }
1737
- class xe extends I {
1921
+ class Ee extends A {
1738
1922
  constructor(t = 0.4, o = 1.2, n = 0.2) {
1739
1923
  super();
1740
- const r = o * 0.6, a = new A(t / 2, r, n);
1741
- a.translate(0, r / 2, 0);
1742
- const s = t * 1.5, i = new A(s, t / 4, n);
1743
- i.translate(0, r * 0.75, 0), this.copy(B([a, i], !1)), this.computeVertexNormals();
1924
+ const r = o * 0.6, s = new E(t / 2, r, n);
1925
+ s.translate(0, r / 2, 0);
1926
+ const a = t * 1.5, i = new E(a, t / 4, n);
1927
+ i.translate(0, r * 0.75, 0), this.copy(T([s, i], !1)), this.computeVertexNormals();
1744
1928
  }
1745
1929
  }
1746
- class ge extends I {
1930
+ class Ae extends A {
1747
1931
  constructor(t = 1.75, o = 0.75) {
1748
1932
  super();
1749
- const n = t * 0.05, r = t * 0.15, a = t * 0.15, s = t * 0.75;
1933
+ const n = t * 0.05, r = t * 0.15, s = t * 0.15, a = t * 0.75;
1750
1934
  let i = 0;
1751
- const c = new A(o, n, o);
1935
+ const c = new E(o, n, o);
1752
1936
  c.translate(0, i + n / 2, 0), i += n;
1753
- const l = new A(o * 0.8, r, o * 0.8);
1937
+ const l = new E(o * 0.8, r, o * 0.8);
1754
1938
  l.translate(0, i + r / 2, 0), i += r;
1755
- const u = new A(o * 0.6, a, o * 0.6);
1756
- u.translate(0, i + a / 2, 0), i += a;
1757
- const m = new A(o * 0.4, s, o * 0.4);
1758
- m.translate(0, i + s / 2, 0), i += s;
1759
- const h = new j(o * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
1760
- h.translate(0, i + 0.1 / 2, 0), this.copy(B([c, l, u, m, h], !1)), this.computeVertexNormals();
1939
+ const u = new E(o * 0.6, s, o * 0.6);
1940
+ u.translate(0, i + s / 2, 0), i += s;
1941
+ const h = new E(o * 0.4, a, o * 0.4);
1942
+ h.translate(0, i + a / 2, 0), i += a;
1943
+ const m = new Y(o * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
1944
+ m.translate(0, i + 0.1 / 2, 0), this.copy(T([c, l, u, h, m], !1)), this.computeVertexNormals();
1761
1945
  }
1762
1946
  }
1763
- class be extends I {
1947
+ class Se extends A {
1764
1948
  constructor(t = 0.6, o = 1, n = 0.2, r = 0.6) {
1765
1949
  super();
1766
- const a = o - r / 2, s = new A(t, a, n);
1767
- s.translate(0, a / 2, 0);
1950
+ const s = o - r / 2, a = new E(t, s, n);
1951
+ a.translate(0, s / 2, 0);
1768
1952
  const i = new S(r / 2, r / 2, n, 16, 1, !1, 0, Math.PI);
1769
- i.rotateY(Math.PI / 2), i.rotateX(Math.PI / 2), i.translate(0, a, 0), this.copy(B([s, i], !1)), this.computeVertexNormals();
1953
+ i.rotateY(Math.PI / 2), i.rotateX(Math.PI / 2), i.translate(0, s, 0), this.copy(T([a, i], !1)), this.computeVertexNormals();
1770
1954
  }
1771
1955
  }
1772
- class Ae extends I {
1956
+ class Pe extends A {
1773
1957
  constructor(t = 0.5, o = 0.8, n = 0.15) {
1774
1958
  super();
1775
- const r = new A(t, o, n);
1959
+ const r = new E(t, o, n);
1776
1960
  r.translate(0, o / 2, 0), this.copy(r);
1777
1961
  }
1778
1962
  }
1779
- class Ie extends I {
1963
+ class Te extends A {
1780
1964
  constructor({ height: t = 2.25 } = {}) {
1781
1965
  super();
1782
- const o = new A(1.2, 0.5, 1.2);
1966
+ const o = new E(1.2, 0.5, 1.2);
1783
1967
  o.translate(0, 0.25, 0);
1784
- const n = new A(1, t, 1);
1968
+ const n = new E(1, t, 1);
1785
1969
  n.translate(0, 0.5 + t / 2, 0);
1786
- const r = new A(1.4, 0.3, 1.4);
1787
- r.translate(0, 0.5 + t + 0.15, 0), this.copy(B([o, n, r], !1));
1970
+ const r = new E(1.4, 0.3, 1.4);
1971
+ r.translate(0, 0.5 + t + 0.15, 0), this.copy(T([o, n, r], !1));
1788
1972
  }
1789
1973
  }
1790
- class yt extends I {
1974
+ class xt extends A {
1791
1975
  constructor({
1792
1976
  barHeight: t = 2,
1793
1977
  //
1794
1978
  barRadius: o = 0.05,
1795
1979
  spikeHeight: n = 0.3,
1796
1980
  spikeRadius: r = 0.075,
1797
- spikeScaleZ: a = 1,
1798
- radialSegments: s = 8
1981
+ spikeScaleZ: s = 1,
1982
+ radialSegments: a = 8
1799
1983
  } = {}) {
1800
1984
  super();
1801
- const i = new S(o, o, t, s);
1985
+ const i = new S(o, o, t, a);
1802
1986
  i.translate(0, t / 2, 0);
1803
- const c = new j(r, n, s);
1804
- c.translate(0, t + n / 2, 0), c.scale(1, 1, a), this.copy(B([i, c], !1));
1987
+ const c = new Y(r, n, a);
1988
+ c.translate(0, t + n / 2, 0), c.scale(1, 1, s), this.copy(T([i, c], !1));
1805
1989
  }
1806
1990
  }
1807
- class Se extends I {
1991
+ class Ge extends A {
1808
1992
  constructor({
1809
1993
  count: t = 20,
1810
1994
  //
1811
1995
  spacing: o = 0.4,
1812
1996
  barHeight: n = 2,
1813
1997
  barRadius: r = 0.05,
1814
- spikeHeight: a = 0.3,
1815
- spikeRadius: s = 0.075,
1998
+ spikeHeight: s = 0.3,
1999
+ spikeRadius: a = 0.075,
1816
2000
  spikeScaleZ: i = 1,
1817
2001
  railHeight: c = 0.1,
1818
2002
  railDepth: l = 0.05,
1819
2003
  railOffset: u = 0,
1820
- radialSegments: m = 8
2004
+ radialSegments: h = 8
1821
2005
  } = {}) {
1822
2006
  super();
1823
- const h = [], f = new yt({ barHeight: n, barRadius: r, spikeHeight: a, spikeRadius: s, spikeScaleZ: i, radialSegments: m }), p = new A(t * o, c, l);
2007
+ const m = [], f = new xt({ barHeight: n, barRadius: r, spikeHeight: s, spikeRadius: a, spikeScaleZ: i, radialSegments: h }), d = new E(t * o, c, l);
1824
2008
  for (let v = 0; v < t; v++) {
1825
2009
  const x = f.clone();
1826
- x.translate(v * o, 0, 0), h.push(x);
2010
+ x.translate(v * o, 0, 0), m.push(x);
1827
2011
  }
1828
- const d = p.clone();
1829
- d.translate(o * (t - 1) / 2, n - u - c / 2, 0), h.push(d);
1830
- const w = p.clone();
1831
- w.translate(o * (t - 1) / 2, c / 2, 0), h.push(w), this.copy(B(h));
2012
+ const p = d.clone();
2013
+ p.translate(o * (t - 1) / 2, n - u - c / 2, 0), m.push(p);
2014
+ const w = d.clone();
2015
+ w.translate(o * (t - 1) / 2, c / 2, 0), m.push(w), this.copy(T(m));
1832
2016
  }
1833
2017
  }
1834
- class Ee extends I {
2018
+ class Ce extends A {
1835
2019
  constructor({
1836
2020
  width: t = 5,
1837
2021
  //
1838
2022
  height: o = 8,
1839
2023
  depth: n = 1,
1840
2024
  shelves: r = 4,
1841
- frameThickness: a = 0.1,
1842
- open: s = !1
2025
+ frameThickness: s = 0.1,
2026
+ open: a = !1
1843
2027
  } = {}) {
1844
2028
  super();
1845
- const i = o, c = t, l = n, u = new A(a, i, l), m = new A(c - 2 * a, a, l), h = u.clone();
1846
- h.translate(-c / 2 + a / 2, i / 2, 0);
2029
+ const i = o, c = t, l = n, u = new E(s, i, l), h = new E(c - 2 * s, s, l), m = u.clone();
2030
+ m.translate(-c / 2 + s / 2, i / 2, 0);
1847
2031
  const f = u.clone();
1848
- f.translate(c / 2 - a / 2, i / 2, 0);
1849
- const p = m.clone();
1850
- p.translate(0, i - a / 2, 0);
1851
- const d = m.clone();
1852
- d.translate(0, a / 2, 0);
1853
- const w = new A(c, i, a);
1854
- w.translate(0, i / 2, -l / 2 + a / 2);
1855
- const v = [], x = (i - a) / (r + 1);
1856
- for (let U = 1; U <= r; U++) {
1857
- const z = m.clone();
1858
- z.translate(0, a / 2 + U * x, 0), v.push(z);
2032
+ f.translate(c / 2 - s / 2, i / 2, 0);
2033
+ const d = h.clone();
2034
+ d.translate(0, i - s / 2, 0);
2035
+ const p = h.clone();
2036
+ p.translate(0, s / 2, 0);
2037
+ const w = new E(c, i, s);
2038
+ w.translate(0, i / 2, -l / 2 + s / 2);
2039
+ const v = [], x = (i - s) / (r + 1);
2040
+ for (let R = 1; R <= r; R++) {
2041
+ const N = h.clone();
2042
+ N.translate(0, s / 2 + R * x, 0), v.push(N);
1859
2043
  }
1860
- this.copy(B([
1861
- h,
2044
+ this.copy(T([
2045
+ m,
1862
2046
  //
1863
2047
  f,
1864
- p,
1865
2048
  d,
1866
- ...s ? [] : [w],
2049
+ p,
2050
+ ...a ? [] : [w],
1867
2051
  ...v
1868
2052
  ], !1));
1869
2053
  }
1870
2054
  }
1871
- function Pe(e, t = q.XYZ, o = 0.5, n = 2) {
1872
- e.deleteAttribute("uv"), e.deleteAttribute("normal"), e = ye(e), e.computeVertexNormals();
2055
+ class Be extends A {
2056
+ constructor() {
2057
+ super();
2058
+ const t = new E(5, 0.3, 3);
2059
+ t.translate(0, 3.15, 0);
2060
+ const o = [
2061
+ new I(0.2, 0),
2062
+ //
2063
+ new I(0.25, 0.5),
2064
+ new I(0.15, 1.5),
2065
+ new I(0.3, 3)
2066
+ ], n = new Z(o, 32), s = T(
2067
+ [
2068
+ [2.1, 0, 1.1],
2069
+ [-2.1, 0, 1.1],
2070
+ [2.1, 0, -1.1],
2071
+ [-2.1, 0, -1.1]
2072
+ ].map((a) => {
2073
+ const i = n.clone();
2074
+ return i.translate(a[0], a[1], a[2]), i;
2075
+ })
2076
+ );
2077
+ this.copy(T([t, s], !0));
2078
+ }
2079
+ }
2080
+ function Re(e, t = ut.XYZ, o = 0.5, n = 2) {
2081
+ e.deleteAttribute("uv"), e.deleteAttribute("normal"), e = Ie(e), e.computeVertexNormals();
1873
2082
  const r = e.getAttribute("position");
1874
- for (let a = 0; a < r.count; a++) {
1875
- const s = new g().fromBufferAttribute(r, a), i = Math.random() * (n - o) + o, c = t.clone().multiplyScalar(i);
1876
- s.add(c), r.setXYZ(a, s.x, s.y, s.z);
2083
+ for (let s = 0; s < r.count; s++) {
2084
+ const a = new b().fromBufferAttribute(r, s), i = Math.random() * (n - o) + o, c = t.clone().multiplyScalar(i);
2085
+ a.add(c), r.setXYZ(s, a.x, a.y, a.z);
1877
2086
  }
1878
2087
  return r.needsUpdate = !0, e.computeVertexNormals(), e;
1879
2088
  }
1880
- class Te extends I {
2089
+ class Ne extends A {
1881
2090
  constructor(t = 1, o = 4, n = 4) {
1882
2091
  super();
1883
- const r = new N(t, o, n);
1884
- this.copy(Pe(r, q.XYZ, 0.5, 1)), this.computeVertexNormals(), this.center();
2092
+ const r = new U(t, o, n);
2093
+ this.copy(Re(r, ut.XYZ, 0.5, 1)), this.computeVertexNormals(), this.center();
1885
2094
  }
1886
2095
  }
1887
- class Ge extends I {
2096
+ class Ue extends A {
1888
2097
  constructor(t = 0.1, o = 0.1, n = 0.4, r = 8) {
1889
2098
  super();
1890
- const a = new S(t * 0.6, o * 0.6, n, r);
1891
- a.translate(0, 0, 0);
1892
- const s = new N(t, r, r), i = s.clone(), c = s.clone(), l = s.clone(), u = s.clone();
1893
- i.translate(0, n / 2 + t * 0.6, -t * 0.6), c.translate(0, n / 2 + t * 0.6, t * 0.6), l.translate(0, -n / 2 - o * 0.6, -o * 0.6), u.translate(0, -n / 2 - o * 0.6, o * 0.6), this.copy(B([a, i, c, l, u], !1));
2099
+ const s = new S(t * 0.6, o * 0.6, n, r);
2100
+ s.translate(0, 0, 0);
2101
+ const a = new U(t, r, r), i = a.clone(), c = a.clone(), l = a.clone(), u = a.clone();
2102
+ i.translate(0, n / 2 + t * 0.6, -t * 0.6), c.translate(0, n / 2 + t * 0.6, t * 0.6), l.translate(0, -n / 2 - o * 0.6, -o * 0.6), u.translate(0, -n / 2 - o * 0.6, o * 0.6), this.copy(T([s, i, c, l, u], !1));
1894
2103
  }
1895
2104
  }
1896
- class Ce extends I {
1897
- constructor() {
1898
- super();
1899
- const t = new N(1, 16, 16), o = new S(0.2, 0.2, 2, 16, 1, !0);
1900
- o.translate(0, 1.5, 0), o.rotateX(Math.PI / 2), this.copy(B([t, o], !1));
1901
- }
1902
- }
1903
- class Be extends I {
2105
+ class _e extends A {
1904
2106
  constructor({
1905
2107
  flaskRadius: t = 1,
1906
2108
  //
1907
2109
  neckRadius: o = 0.3,
1908
2110
  height: n = 2.5,
1909
2111
  neckHeight: r = 1,
1910
- radialSegments: a = 16
2112
+ radialSegments: s = 16
1911
2113
  } = {}) {
1912
2114
  super();
1913
- const s = [
1914
- new b(0, 0),
2115
+ const a = [
2116
+ new I(0, 0),
1915
2117
  // Bottom of the flask
1916
- new b(t * 0.875, 0),
2118
+ new I(t * 0.875, 0),
1917
2119
  // Flat base with minimum width
1918
- new b(t, 0.1),
2120
+ new I(t, 0.1),
1919
2121
  // End of the rounded base
1920
- new b(o, n),
2122
+ new I(o, n),
1921
2123
  // Start of the straight neck
1922
- new b(o, n + r),
2124
+ new I(o, n + r),
1923
2125
  // End of the straight neck
1924
- new b(o * 1.1, n + r + 0.3)
2126
+ new I(o * 1.1, n + r + 0.3)
1925
2127
  // Slight outward lip at the top
1926
- ], i = new Y(s, a);
1927
- this.copy(B([i], !1));
2128
+ ], i = new Z(a, s);
2129
+ this.copy(T([i], !1));
1928
2130
  }
1929
2131
  }
1930
- class Ue extends I {
2132
+ class Oe extends A {
2133
+ constructor() {
2134
+ super();
2135
+ const t = new U(1, 16, 16), o = new S(0.2, 0.2, 2, 16, 1, !0);
2136
+ o.translate(0, 1.5, 0), o.rotateX(Math.PI / 2), this.copy(T([t, o], !1));
2137
+ }
2138
+ }
2139
+ class ze extends A {
1931
2140
  constructor() {
1932
2141
  super();
1933
2142
  const t = [
1934
- new b(1, 0),
2143
+ new I(1, 0),
1935
2144
  // Bottom of the bowl
1936
- new b(1.2, 0.5),
2145
+ new I(1.2, 0.5),
1937
2146
  // Slight flare at the base
1938
- new b(1.4, 1.5),
2147
+ new I(1.4, 1.5),
1939
2148
  // Outer wall
1940
- new b(1.3, 1.8),
2149
+ new I(1.3, 1.8),
1941
2150
  // Flared edge
1942
- new b(0.8, 1.8)
2151
+ new I(0.8, 1.8)
1943
2152
  // Lip of the bowl
1944
- ], o = new Y(t, 12), n = new At(1, 12);
1945
- n.rotateX(-Math.PI / 2), n.translate(0, 0, 0), this.copy(B([o, n], !1));
2153
+ ], o = new Z(t, 12), n = new Pt(1, 12);
2154
+ n.rotateX(-Math.PI / 2), n.translate(0, 0, 0), this.copy(T([o, n], !1));
1946
2155
  }
1947
2156
  }
1948
- class ze extends I {
2157
+ class Fe extends A {
1949
2158
  constructor({
1950
2159
  radius: t = 0.3,
1951
2160
  //
1952
2161
  height: o = 0.4,
1953
2162
  count: n = 3,
1954
2163
  thickness: r = 0.03,
1955
- radialSegments: a = 16
2164
+ radialSegments: s = 16
1956
2165
  } = {}) {
1957
2166
  super();
1958
- const s = new mt(t, r, 8, a);
1959
- s.rotateX(Math.PI / 2), s.translate(0, o, 0);
1960
- const i = new S(r * 0.6, r * 0.6, o, a), c = [];
2167
+ const a = new dt(t, r, 8, s);
2168
+ a.rotateX(Math.PI / 2), a.translate(0, o, 0);
2169
+ const i = new S(r * 0.6, r * 0.6, o, s), c = [];
1961
2170
  for (let l = 0; l < n; l++) {
1962
- const u = l / n * Math.PI * 2, m = i.clone();
1963
- m.translate(Math.cos(u) * t, o / 2, Math.sin(u) * t), c.push(m);
2171
+ const u = l / n * Math.PI * 2, h = i.clone();
2172
+ h.translate(Math.cos(u) * t, o / 2, Math.sin(u) * t), c.push(h);
1964
2173
  }
1965
- this.copy(B([s, ...c], !1));
2174
+ this.copy(T([a, ...c], !1));
1966
2175
  }
1967
2176
  }
1968
- class st extends I {
1969
- constructor(t = 0.2, o = 0.2, n = 3, r = 32, a = !0) {
2177
+ class rt extends A {
2178
+ constructor(t = 0.2, o = 0.2, n = 3, r = 32, s = !0) {
1970
2179
  super();
1971
- const s = new S(t, o, n, r, 1, a), i = new N(o, r, r / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
1972
- i.translate(0, -(n / 2), 0), this.copy(B([s, i], !1));
2180
+ const a = new S(t, o, n, r, 1, s), i = new U(o, r, r / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
2181
+ i.translate(0, -(n / 2), 0), this.copy(T([a, i], !1));
1973
2182
  }
1974
2183
  }
1975
- class ke extends I {
1976
- constructor({ radius: t = 0.5, neckRadius: o = 0.2, height: n = 3, neckHeight: r = 1, segments: a = 16 } = {}) {
2184
+ class Le extends A {
2185
+ constructor({ radius: t = 0.5, neckRadius: o = 0.2, height: n = 3, neckHeight: r = 1, segments: s = 16 } = {}) {
1977
2186
  super();
1978
- const s = n - r, i = new S(t, t, s, a);
1979
- i.translate(0, s / 2, 0);
1980
- const c = 0.3, l = new S(o, t, c, a);
1981
- l.translate(0, s + c / 2, 0);
1982
- const u = new S(o, o, r, a);
1983
- u.translate(0, s + c + r / 2, 0), this.copy(B([i, l, u], !1));
2187
+ const a = n - r, i = new S(t, t, a, s);
2188
+ i.translate(0, a / 2, 0);
2189
+ const c = 0.3, l = new S(o, t, c, s);
2190
+ l.translate(0, a + c / 2, 0);
2191
+ const u = new S(o, o, r, s);
2192
+ u.translate(0, a + c + r / 2, 0), this.copy(T([i, l, u], !1));
1984
2193
  }
1985
2194
  }
1986
- class Ne extends I {
2195
+ class ke extends A {
1987
2196
  constructor({
1988
2197
  radius: t = 3,
1989
2198
  //
1990
2199
  height: o = 0.6,
1991
2200
  widthSegments: n = 64,
1992
2201
  heightSegments: r = 16,
1993
- phiStart: a = 0,
1994
- phiLength: s = Math.PI * 2
2202
+ phiStart: s = 0,
2203
+ phiLength: a = Math.PI * 2
1995
2204
  } = {}) {
1996
- super(), this.copy(new N(t, n, r, a, s, 0, Math.PI / 2)), this.scale(1, o / t, 1);
2205
+ super(), this.copy(new U(t, n, r, s, a, 0, Math.PI / 2)), this.scale(1, o / t, 1);
1997
2206
  }
1998
2207
  }
1999
- const Io = (e, t) => e / (1 - Math.cos(t)), wt = (e, t) => e / (2 * Math.sin(t)), Oe = (e, t) => e * (1 - Math.cos(t)), So = (e, t) => 2 * e * Math.sin(t), Eo = (e, t, o) => ({
2208
+ const ko = (e, t) => e / (1 - Math.cos(t)), gt = (e, t) => e / (2 * Math.sin(t)), De = (e, t) => e * (1 - Math.cos(t)), Do = (e, t) => 2 * e * Math.sin(t), qo = (e, t, o) => ({
2000
2209
  x: e * Math.sin(o) * Math.cos(t),
2001
2210
  y: e * Math.sin(o) * Math.sin(t),
2002
2211
  z: e * Math.cos(o)
2003
- }), Po = (e, t, o) => {
2004
- const n = Math.sqrt(e * e + t * t + o * o), r = Math.atan2(t, e), a = Math.acos(o / n);
2005
- return { radius: n, theta: r, phi: a };
2212
+ }), Vo = (e, t, o) => {
2213
+ const n = Math.sqrt(e * e + t * t + o * o), r = Math.atan2(t, e), s = Math.acos(o / n);
2214
+ return { radius: n, theta: r, phi: s };
2006
2215
  };
2007
- class _e extends I {
2216
+ class qe extends A {
2008
2217
  constructor({
2009
- radius: t = wt(5, Math.PI / 10),
2218
+ radius: t = gt(5, Math.PI / 10),
2010
2219
  //
2011
2220
  widthSegments: o = 64,
2012
2221
  heightSegments: n = 32,
2013
2222
  phiStart: r = 0,
2014
- phiLength: a = Math.PI * 2,
2015
- thetaLength: s = Math.PI / 10
2223
+ phiLength: s = Math.PI * 2,
2224
+ thetaLength: a = Math.PI / 10
2016
2225
  } = {}) {
2017
- super(), this.copy(new N(t, o, n, r, a, 0, s));
2018
- const i = Oe(t, s);
2226
+ super(), this.copy(new U(t, o, n, r, s, 0, a));
2227
+ const i = De(t, a);
2019
2228
  this.translate(0, -t + i, 0);
2020
2229
  }
2021
2230
  }
2022
- class Fe extends I {
2231
+ class Ve extends A {
2023
2232
  constructor({
2024
2233
  trunkRadiusTop: t = 0.25,
2025
2234
  trunkRadiusBottom: o = 0.4,
2026
2235
  trunkHeight: n = 2.5,
2027
2236
  trunkSegments: r = 14,
2028
- leafSize: a = 0.8,
2029
- leafCount: s = 6,
2237
+ leafSize: s = 0.8,
2238
+ leafCount: a = 6,
2030
2239
  leafDetail: i = 0,
2031
2240
  leafSpreadRadius: c = 1.5
2032
2241
  } = {}) {
@@ -2034,238 +2243,255 @@ class Fe extends I {
2034
2243
  const l = new S(t, o, n, r);
2035
2244
  l.translate(0, n / 2, 0);
2036
2245
  const u = [];
2037
- for (let m = 0; m < s; m++) {
2038
- const h = new at(a, i);
2039
- h.translate(
2246
+ for (let h = 0; h < a; h++) {
2247
+ const m = new it(s, i);
2248
+ m.translate(
2040
2249
  (Math.random() - 0.5) * c,
2041
- (Math.random() - 0.5) * a + n,
2250
+ (Math.random() - 0.5) * s + n,
2042
2251
  (Math.random() - 0.5) * c
2043
- ), u.push(h);
2252
+ ), u.push(m);
2044
2253
  }
2045
- this.copy(B([l.toNonIndexed(), B(u, !1)], !0)), this.computeVertexNormals();
2254
+ this.copy(T([l.toNonIndexed(), T(u, !1)], !0)), this.computeVertexNormals();
2046
2255
  }
2047
2256
  }
2048
- class To extends P {
2049
- constructor() {
2050
- super();
2051
- const t = new N(5, 32, 32), o = new J({
2052
- uniforms: {
2053
- time: { value: 0 }
2054
- },
2055
- vertexShader: `
2056
- varying vec3 vNormal;
2057
- varying vec3 vPosition;
2058
- void main() {
2059
- vNormal = normalize(normal);
2060
- vPosition = position;
2061
- gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
2062
- }
2063
- `,
2064
- fragmentShader: `
2065
- varying vec3 vNormal;
2066
- varying vec3 vPosition;
2257
+ const He = {
2258
+ uniforms: {
2259
+ time: { value: 0 }
2260
+ },
2261
+ vertexShader: `
2262
+ varying vec3 vNormal;
2263
+ varying vec3 vPosition;
2264
+ void main() {
2265
+ vNormal = normalize(normal);
2266
+ vPosition = position;
2267
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
2268
+ }
2269
+ `,
2270
+ fragmentShader: `
2271
+ varying vec3 vNormal;
2272
+ varying vec3 vPosition;
2067
2273
 
2068
- // Simple 3D noise function
2069
- float hash(vec3 p) {
2070
- p = fract(p * 0.3183099 + vec3(0.71, 0.113, 0.419));
2071
- p *= 17.0;
2072
- return fract(p.x * p.y * p.z * (p.x + p.y + p.z));
2073
- }
2274
+ // Simple 3D noise function
2275
+ float hash(vec3 p) {
2276
+ p = fract(p * 0.3183099 + vec3(0.71, 0.113, 0.419));
2277
+ p *= 17.0;
2278
+ return fract(p.x * p.y * p.z * (p.x + p.y + p.z));
2279
+ }
2074
2280
 
2075
- float noise(vec3 p) {
2076
- vec3 ip = floor(p);
2077
- vec3 fp = fract(p);
2078
- fp = fp * fp * (3.0 - 2.0 * fp); // Smoothstep
2079
- return mix(
2080
- mix(mix(hash(ip), hash(ip + vec3(1.0, 0.0, 0.0)), fp.x),
2081
- mix(hash(ip + vec3(0.0, 1.0, 0.0)), hash(ip + vec3(1.0, 1.0, 0.0)), fp.x), fp.y),
2082
- mix(mix(hash(ip + vec3(0.0, 0.0, 1.0)), hash(ip + vec3(1.0, 0.0, 1.0)), fp.x),
2083
- mix(hash(ip + vec3(0.0, 1.0, 1.0)), hash(ip + vec3(1.0, 1.0, 1.0)), fp.x), fp.y),
2084
- fp.z);
2085
- }
2281
+ float noise(vec3 p) {
2282
+ vec3 ip = floor(p);
2283
+ vec3 fp = fract(p);
2284
+ fp = fp * fp * (3.0 - 2.0 * fp); // Smoothstep
2285
+ return mix(
2286
+ mix(mix(hash(ip), hash(ip + vec3(1.0, 0.0, 0.0)), fp.x),
2287
+ mix(hash(ip + vec3(0.0, 1.0, 0.0)), hash(ip + vec3(1.0, 1.0, 0.0)), fp.x), fp.y),
2288
+ mix(mix(hash(ip + vec3(0.0, 0.0, 1.0)), hash(ip + vec3(1.0, 0.0, 1.0)), fp.x),
2289
+ mix(hash(ip + vec3(0.0, 1.0, 1.0)), hash(ip + vec3(1.0, 1.0, 1.0)), fp.x), fp.y),
2290
+ fp.z);
2291
+ }
2086
2292
 
2087
- void main() {
2088
- vec3 color = vec3(0.8, 0.8, 0.7); // Base moon color
2089
- float n = noise(vPosition * 0.5); // Apply noise with frequency
2090
- color *= 0.8 + 0.2 * n; // Modulate color by noise
2091
- gl_FragColor = vec4(color, 1.0);
2092
- }
2093
- `
2094
- }), n = new y(t, o);
2095
- this.add(n);
2293
+ void main() {
2294
+ vec3 color = vec3(0.8, 0.8, 0.7); // Base moon color
2295
+ float n = noise(vPosition * 0.5); // Apply noise with frequency
2296
+ color *= 0.8 + 0.2 * n; // Modulate color by noise
2297
+ gl_FragColor = vec4(color, 1.0);
2298
+ }
2299
+ `
2300
+ };
2301
+ class Ho extends M {
2302
+ constructor() {
2303
+ super(
2304
+ new U(5, 32, 32),
2305
+ new J(He)
2306
+ );
2096
2307
  }
2097
2308
  }
2098
- class Go extends y {
2309
+ class Xo extends M {
2099
2310
  constructor({
2100
2311
  width: t = 1,
2101
2312
  height: o = 1.5,
2102
2313
  depth: n = 0.5,
2103
2314
  coverThickness: r = 0.05,
2104
- pageIndent: a = 0.05,
2105
- coverColor: s = 9109504,
2106
- pageColor: i = 16777215
2315
+ pageIndent: s = 0.05,
2316
+ coverColor: a = mt.DARK_RED,
2317
+ pageColor: i = mt.WHITE
2107
2318
  } = {}) {
2108
- super(), this.geometry = new ft(t, o, n, r, a), this.material = [
2109
- new M({ color: s, metalness: 0.1, roughness: 0.7, flatShading: !0 }),
2110
- new M({ color: i, flatShading: !0 })
2111
- ];
2319
+ super(
2320
+ new yt(t, o, n, r, s),
2321
+ [
2322
+ new y({ color: a, metalness: 0.1, roughness: 0.7, flatShading: !0 }),
2323
+ new y({ color: i, flatShading: !0 })
2324
+ ]
2325
+ );
2112
2326
  }
2113
2327
  }
2114
- class Co extends y {
2328
+ class Yo extends M {
2115
2329
  constructor({
2116
2330
  width: t = 0.4,
2117
2331
  height: o = 1.2,
2118
- depth: n = 0.2,
2119
- material: r = new M({ color: 7829367, roughness: 0.8 })
2332
+ depth: n = 0.2
2120
2333
  } = {}) {
2121
- const a = new xe(t, o, n);
2122
- super(a, r);
2334
+ super(
2335
+ new Ee(t, o, n),
2336
+ new y({ color: 7829367, roughness: 0.8 })
2337
+ );
2123
2338
  }
2124
2339
  }
2125
- class Bo extends P {
2340
+ class Zo extends B {
2126
2341
  constructor() {
2127
2342
  super();
2128
- const t = new A(5, 1, 5), o = new M({ color: 8421504, flatShading: !0 }), n = new y(t, o);
2343
+ const t = new E(5, 1, 5), o = new y({ color: 8421504, flatShading: !0 }), n = new M(t, o);
2129
2344
  n.position.set(0, 0.5, 0), this.add(n);
2130
- const r = new A(4, 3, 4), a = new M({ color: 6908265, flatShading: !0 }), s = new y(r, a);
2131
- s.position.set(0, 2.5, 0), this.add(s);
2132
- const i = new j(3.5, 2, 4), c = new M({ color: 5263440, flatShading: !0 }), l = new y(i, c);
2345
+ const r = new E(4, 3, 4), s = new y({ color: 6908265, flatShading: !0 }), a = new M(r, s);
2346
+ a.position.set(0, 2.5, 0), this.add(a);
2347
+ const i = new Y(3.5, 2, 4), c = new y({ color: 5263440, flatShading: !0 }), l = new M(i, c);
2133
2348
  l.rotation.y = Math.PI / 4, l.position.set(0, 5, 0), this.add(l);
2134
- const u = new S(0.2, 0.2, 3.5, 16), m = new M({ color: 6908265, flatShading: !0 });
2349
+ const u = new S(0.2, 0.2, 3.5, 16), h = new y({ color: 6908265, flatShading: !0 });
2135
2350
  [
2136
2351
  [-1.8, 2.3, -2.2],
2137
2352
  [1.8, 2.3, -2.2],
2138
2353
  [-1.8, 2.3, 2.2],
2139
2354
  [1.8, 2.3, 2.2]
2140
2355
  ].forEach((x) => {
2141
- const U = new y(u, m);
2142
- U.position.set(x[0], x[1], x[2]), this.add(U);
2356
+ const R = new M(u, h);
2357
+ R.position.set(x[0], x[1], x[2]), this.add(R);
2143
2358
  });
2144
- const f = new H();
2359
+ const f = new j();
2145
2360
  f.moveTo(-1, 0), f.lineTo(-1, 2), f.absarc(0, 2, 1, Math.PI, 0, !0), f.lineTo(1, 0);
2146
- const p = {
2361
+ const d = {
2147
2362
  depth: 0.5,
2148
2363
  bevelEnabled: !1
2149
- }, d = new Q(f, p), w = new M({ color: 4210752, flatShading: !0 }), v = new y(d, w);
2364
+ }, p = new Q(f, d), w = new y({ color: 4210752, flatShading: !0 }), v = new M(p, w);
2150
2365
  v.position.set(0, 0.5, 1.7), this.add(v);
2151
2366
  }
2152
2367
  }
2153
- class Uo extends y {
2368
+ class jo extends M {
2154
2369
  constructor({ totalHeight: t = 1.75, baseWidth: o = 0.75 } = {}) {
2155
- super(), this.geometry = new ge(t, o), this.material = new M({ color: 7829367, roughness: 0.8 });
2370
+ super(
2371
+ new Ae(t, o),
2372
+ new y({ color: 7829367, roughness: 0.8 })
2373
+ );
2156
2374
  }
2157
2375
  }
2158
- class zo extends y {
2376
+ class Qo extends M {
2159
2377
  constructor(t = 0.6, o = 1, n = 0.2, r = 0.6) {
2160
- super(), this.geometry = new be(t, o, n, r), this.material = new M({ color: 7829367, roughness: 0.8 });
2378
+ super(
2379
+ new Se(t, o, n, r),
2380
+ new y({ color: 7829367, roughness: 0.8 })
2381
+ );
2161
2382
  }
2162
2383
  }
2163
- class ko extends y {
2384
+ class Ko extends M {
2164
2385
  constructor(t = 0.5, o = 0.8, n = 0.15) {
2165
- super(), this.geometry = new Ae(t, o, n), this.material = new M({ color: 7829367, roughness: 0.8 });
2386
+ super(
2387
+ new Pe(t, o, n),
2388
+ new y({ color: 7829367, roughness: 0.8 })
2389
+ );
2166
2390
  }
2167
2391
  }
2168
- class No extends y {
2392
+ class $o extends M {
2169
2393
  constructor({ height: t = 2.25 } = {}) {
2170
- super(), this.geometry = new Ie({ height: t }), this.material = new M({ color: 9141627, flatShading: !0 });
2394
+ super(
2395
+ new Te({ height: t }),
2396
+ new y({ color: 9141627, flatShading: !0 })
2397
+ );
2171
2398
  }
2172
2399
  }
2173
- class Oo extends y {
2400
+ class Jo extends M {
2174
2401
  constructor({
2175
2402
  barHeight: t = 2,
2176
2403
  //
2177
2404
  barRadius: o = 0.05,
2178
2405
  spikeHeight: n = 0.3,
2179
2406
  spikeRadius: r = 0.075,
2180
- spikeScaleZ: a = 1,
2181
- radialSegments: s = 8
2407
+ spikeScaleZ: s = 1,
2408
+ radialSegments: a = 8
2182
2409
  } = {}) {
2183
- super(), this.geometry = new yt({
2184
- barHeight: t,
2185
- barRadius: o,
2186
- spikeHeight: n,
2187
- spikeRadius: r,
2188
- spikeScaleZ: a,
2189
- radialSegments: s
2190
- }), this.material = new M({ color: 3355443, metalness: 0.8, roughness: 0.4 });
2410
+ super(
2411
+ new xt({
2412
+ barHeight: t,
2413
+ barRadius: o,
2414
+ spikeHeight: n,
2415
+ spikeRadius: r,
2416
+ spikeScaleZ: s,
2417
+ radialSegments: a
2418
+ }),
2419
+ new y({ color: 3355443, metalness: 0.8, roughness: 0.4 })
2420
+ );
2191
2421
  }
2192
2422
  }
2193
- class _o extends y {
2423
+ class Wo extends M {
2194
2424
  constructor({
2195
2425
  count: t = 20,
2196
2426
  //
2197
2427
  spacing: o = 0.4,
2198
2428
  barHeight: n = 2,
2199
2429
  barRadius: r = 0.05,
2200
- spikeHeight: a = 0.3,
2201
- spikeRadius: s = 0.075,
2430
+ spikeHeight: s = 0.3,
2431
+ spikeRadius: a = 0.075,
2202
2432
  spikeScaleZ: i = 1,
2203
2433
  railHeight: c = 0.1,
2204
2434
  railDepth: l = 0.05,
2205
2435
  railOffset: u = 0,
2206
- radialSegments: m = 8
2436
+ radialSegments: h = 8
2207
2437
  } = {}) {
2208
- super(), this.geometry = new Se({
2209
- count: t,
2210
- spacing: o,
2211
- barHeight: n,
2212
- barRadius: r,
2213
- spikeHeight: a,
2214
- spikeRadius: s,
2215
- spikeScaleZ: i,
2216
- railHeight: c,
2217
- railDepth: l,
2218
- railOffset: u,
2219
- radialSegments: m
2220
- }), this.material = new M({ color: 3355443, metalness: 0.8, roughness: 0.4 });
2221
- }
2222
- }
2223
- class Fo extends y {
2438
+ super(
2439
+ new Ge({
2440
+ count: t,
2441
+ spacing: o,
2442
+ barHeight: n,
2443
+ barRadius: r,
2444
+ spikeHeight: s,
2445
+ spikeRadius: a,
2446
+ spikeScaleZ: i,
2447
+ railHeight: c,
2448
+ railDepth: l,
2449
+ railOffset: u,
2450
+ radialSegments: h
2451
+ }),
2452
+ new y({ color: 3355443, metalness: 0.8, roughness: 0.4 })
2453
+ );
2454
+ }
2455
+ }
2456
+ class tn extends M {
2224
2457
  constructor({
2225
2458
  width: t = 5,
2226
2459
  //
2227
2460
  height: o = 8,
2228
2461
  depth: n = 1,
2229
2462
  shelves: r = 4,
2230
- frameThickness: a = 0.1,
2231
- open: s = !1
2463
+ frameThickness: s = 0.1,
2464
+ open: a = !1
2232
2465
  } = {}) {
2233
- super(), this.geometry = new Ee({ width: t, height: o, depth: n, shelves: r, frameThickness: a, open: s }), this.material = new M({ color: 9127187 });
2466
+ super(), this.geometry = new Ce({ width: t, height: o, depth: n, shelves: r, frameThickness: s, open: a }), this.material = new y({ color: 9127187 });
2234
2467
  }
2235
2468
  }
2236
- class Ro extends P {
2469
+ class en extends M {
2237
2470
  constructor() {
2238
2471
  super();
2239
- const t = new A(5, 0.3, 3), o = new M({ color: 9132587 }), n = new y(t, o);
2240
- n.position.set(0, 3.15, 0);
2241
- const r = [];
2242
- r.push(new b(0.2, 0)), r.push(new b(0.25, 0.5)), r.push(new b(0.15, 1.5)), r.push(new b(0.3, 3));
2243
- const a = new Y(r, 32), s = new M({ color: 4929057 });
2244
- [
2245
- [2.2, 0, 1.2],
2246
- // Adjust Y to 0 so legs start at ground level
2247
- [-2.2, 0, 1.2],
2248
- [2.2, 0, -1.2],
2249
- [-2.2, 0, -1.2]
2250
- ].forEach((c) => {
2251
- const l = new y(a, s);
2252
- l.position.set(c[0], c[1], c[2]), this.add(l);
2253
- }), this.add(n);
2254
- }
2255
- }
2256
- class Lo extends P {
2472
+ g(this, "geometry");
2473
+ g(this, "material");
2474
+ this.geometry = new Be(), this.material = [
2475
+ new y({ color: 9132587 }),
2476
+ // Desk surface
2477
+ new y({ color: 4929057 })
2478
+ // Desk legs
2479
+ ];
2480
+ }
2481
+ }
2482
+ class on extends B {
2257
2483
  constructor(o = 1, n = 0.2) {
2258
2484
  super();
2259
- E(this, "candle");
2260
- E(this, "flame");
2261
- E(this, "candleLight");
2262
- E(this, "height");
2263
- E(this, "radius");
2485
+ g(this, "candle");
2486
+ g(this, "flame");
2487
+ g(this, "candleLight");
2488
+ g(this, "height");
2489
+ g(this, "radius");
2264
2490
  this.height = o, this.radius = n;
2265
- const r = new S(this.radius, this.radius, this.height, 32), a = new M({ color: 16777215 });
2266
- this.candle = new y(r, a), this.candle.position.set(0, this.height / 2, 0), this.add(this.candle);
2267
- const s = new N(0.05, 16, 16), i = new It({ color: 16753920 });
2268
- this.flame = new y(s, i), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new ht(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight), this.animateFlicker();
2491
+ const r = new S(this.radius, this.radius, this.height, 32), s = new y({ color: 16777215 });
2492
+ this.candle = new M(r, s), this.candle.position.set(0, this.height / 2, 0), this.add(this.candle);
2493
+ const a = new U(0.05, 16, 16), i = new Tt({ color: 16753920 });
2494
+ this.flame = new M(a, i), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new pt(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight), this.animateFlicker();
2269
2495
  }
2270
2496
  animateFlicker() {
2271
2497
  const o = () => {
@@ -2274,170 +2500,156 @@ class Lo extends P {
2274
2500
  o();
2275
2501
  }
2276
2502
  }
2277
- class qo extends P {
2503
+ class nn extends B {
2278
2504
  constructor(t = 1.3, o = 0.5) {
2279
2505
  super();
2280
- const n = new S(o, o, 0.2, 16), r = new M({ color: 9127187, flatShading: !0 }), a = new y(n, r);
2281
- a.position.set(0, 0, 0), this.add(a);
2282
- const s = new S(o * 0.9, o * 0.9, t), i = new M({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), c = new y(s, i);
2506
+ const n = new S(o, o, 0.2, 16), r = new y({ color: 9127187, flatShading: !0 }), s = new M(n, r);
2507
+ s.position.set(0, 0, 0), this.add(s);
2508
+ const a = new S(o * 0.9, o * 0.9, t), i = new y({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), c = new M(a, i);
2283
2509
  c.position.set(0, t / 2 + 0.1, 0), this.add(c);
2284
- const l = new j(o * 1.1, 0.5, 8), u = new M({ color: 9127187, flatShading: !0 }), m = new y(l, u);
2285
- m.position.set(0, t + 0.35, 0), this.add(m);
2286
- const h = new mt(o * 0.8, 0.05, 8, 16), f = new M({ color: 9127187, flatShading: !0 }), p = new y(h, f);
2287
- p.position.set(0, t + 0.85, 0), this.add(p);
2288
- const d = new ht(16755200, 1.5, 15);
2289
- d.position.set(0, t / 2 + 0.1, 0), d.castShadow = !0, this.add(d);
2510
+ const l = new Y(o * 1.1, 0.5, 8), u = new y({ color: 9127187, flatShading: !0 }), h = new M(l, u);
2511
+ h.position.set(0, t + 0.35, 0), this.add(h);
2512
+ const m = new dt(o * 0.8, 0.05, 8, 16), f = new y({ color: 9127187, flatShading: !0 }), d = new M(m, f);
2513
+ d.position.set(0, t + 0.85, 0), this.add(d);
2514
+ const p = new pt(16755200, 1.5, 15);
2515
+ p.position.set(0, t / 2 + 0.1, 0), p.castShadow = !0, this.add(p);
2290
2516
  }
2291
2517
  }
2292
- class Do extends P {
2518
+ class sn extends B {
2293
2519
  constructor() {
2294
2520
  super();
2295
- const t = new at(1, 0), o = new M({ color: 8421504, flatShading: !0 }), n = new M({ color: 4950843, flatShading: !0, opacity: 0.8, transparent: !0 });
2521
+ const t = new it(1, 0), o = new y({ color: 8421504, flatShading: !0 }), n = new y({ color: 4950843, flatShading: !0, opacity: 0.8, transparent: !0 });
2296
2522
  for (let r = 0; r < 5; r++) {
2297
- const a = new y(t, o);
2298
- a.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), a.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), a.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(a);
2299
- const s = new y(t, n);
2300
- s.scale.set(a.scale.x * 0.9, a.scale.y * 0.5, a.scale.z * 0.9), s.rotation.copy(a.rotation), s.position.copy(a.position), s.position.y += 0.3, this.add(s);
2523
+ const s = new M(t, o);
2524
+ s.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), s.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), s.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(s);
2525
+ const a = new M(t, n);
2526
+ a.scale.set(s.scale.x * 0.9, s.scale.y * 0.5, s.scale.z * 0.9), a.rotation.copy(s.rotation), a.position.copy(s.position), a.position.y += 0.3, this.add(a);
2301
2527
  }
2302
2528
  }
2303
2529
  }
2304
- class Vo extends y {
2530
+ class rn extends M {
2305
2531
  constructor(t = 1, o = 4, n = 4) {
2306
- super(), this.geometry = new Te(t, o, n), this.material = new M({ color: 8421504, flatShading: !0 });
2532
+ super(), this.geometry = new Ne(t, o, n), this.material = new y({ color: 8421504, flatShading: !0 });
2307
2533
  }
2308
2534
  }
2309
- class Xo extends P {
2535
+ class an extends B {
2310
2536
  constructor() {
2311
2537
  super();
2312
- const t = new at(1, 0), o = new M({ color: 8421504, flatShading: !0 });
2538
+ const t = new it(1, 0), o = new y({ color: 8421504, flatShading: !0 });
2313
2539
  for (let n = 0; n < 5; n++) {
2314
- const r = new y(t, o);
2540
+ const r = new M(t, o);
2315
2541
  r.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), r.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), r.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(r);
2316
2542
  }
2317
2543
  }
2318
2544
  }
2319
- class Zo extends P {
2320
- constructor() {
2321
- super();
2322
- const t = new Ce(), o = new W({
2323
- color: 8965375,
2324
- transparent: !0,
2325
- opacity: 0.4,
2326
- roughness: 0.1,
2327
- metalness: 0.1,
2328
- reflectivity: 0.8,
2329
- transmission: 0.9,
2330
- side: L
2331
- }), n = new y(t, o);
2332
- n.rotation.x = -Math.PI / 2, this.add(n);
2333
- }
2334
- }
2335
- class jo extends P {
2545
+ class cn extends B {
2336
2546
  constructor() {
2337
2547
  super();
2338
2548
  const t = [
2339
- new b(0, 0),
2549
+ new I(0, 0),
2340
2550
  // Bottom
2341
- new b(0.8, 0),
2551
+ new I(0.8, 0),
2342
2552
  // Base
2343
- new b(1, 1.5),
2553
+ new I(1, 1.5),
2344
2554
  // Rounded body
2345
- new b(0.5, 2.2),
2555
+ new I(0.5, 2.2),
2346
2556
  // Neck
2347
- new b(0.6, 2.5)
2557
+ new I(0.6, 2.5)
2348
2558
  // Mouth
2349
- ], o = new Y(t, 10), n = new S(0.3, 0.4, 0.2, 8), r = new M({
2559
+ ], o = new Z(t, 10), n = new S(0.3, 0.4, 0.2, 8), r = new y({
2350
2560
  color: 8965375,
2351
2561
  transparent: !0,
2352
2562
  opacity: 0.5,
2353
2563
  roughness: 0.1,
2354
2564
  metalness: 0.3
2355
- }), a = new M({
2565
+ }), s = new y({
2356
2566
  color: 16724838,
2357
2567
  // Vibrant potion color
2358
2568
  transparent: !0,
2359
2569
  opacity: 0.6
2360
- }), s = new M({
2570
+ }), a = new y({
2361
2571
  color: 9127187,
2362
2572
  roughness: 1
2363
- }), i = new y(o, r), c = new y(o, a), l = new y(n, s);
2573
+ }), i = new M(o, r);
2574
+ i.castShadow = !0;
2575
+ const c = new M(o, s), l = new M(n, a);
2364
2576
  c.scale.set(0.8, 0.8, 0.8), c.position.y = 0.1, l.position.y = 2.5;
2365
- const u = new P();
2577
+ const u = new B();
2366
2578
  u.add(i, c, l), this.add(u);
2367
2579
  }
2368
2580
  }
2369
- class Yo extends P {
2581
+ class ln extends B {
2370
2582
  constructor() {
2371
2583
  super();
2372
- const t = new S(0.3, 0.4, 0.1, 16), o = new M({
2584
+ const t = new S(0.3, 0.4, 0.1, 16), o = new y({
2373
2585
  color: 3355443,
2374
2586
  roughness: 0.6,
2375
2587
  metalness: 0.3
2376
- }), n = new y(t, o);
2588
+ }), n = new M(t, o);
2377
2589
  n.position.y = 0.05;
2378
- const r = new S(0.1, 0.1, 0.7, 16), a = new M({
2590
+ const r = new S(0.1, 0.1, 0.7, 16), s = new y({
2379
2591
  color: 5592405,
2380
2592
  roughness: 0.5,
2381
2593
  metalness: 0.4
2382
- }), s = new y(r, a);
2383
- s.position.y = 0.4;
2384
- const i = new j(0.075, 0.2, 16), c = new M({
2594
+ }), a = new M(r, s);
2595
+ a.position.y = 0.4;
2596
+ const i = new Y(0.075, 0.2, 16), c = new y({
2385
2597
  color: 16733440,
2386
2598
  emissive: 16733440,
2387
2599
  emissiveIntensity: 0.6,
2388
2600
  transparent: !0,
2389
2601
  opacity: 0.8
2390
- }), l = new y(i, c);
2391
- l.position.y = 0.8, this.add(n, s, l);
2602
+ }), l = new M(i, c);
2603
+ l.position.y = 0.8, this.add(n, a, l);
2392
2604
  }
2393
2605
  }
2394
- class Ho extends P {
2606
+ class un extends B {
2395
2607
  constructor() {
2396
2608
  super();
2397
- const t = new A(3, 4, 0.1), o = new M({
2609
+ const t = new E(3, 4, 0.1), o = new y({
2398
2610
  color: 3026478,
2399
2611
  roughness: 0.8,
2400
2612
  metalness: 0.6
2401
- }), n = new A(0.2, 0.5, 0.2), r = new M({
2613
+ }), n = new E(0.2, 0.5, 0.2), r = new y({
2402
2614
  color: 11184810,
2403
2615
  roughness: 0.5,
2404
2616
  metalness: 0.7
2405
- }), a = new S(0.3, 0.3, 0.1, 16), s = new M({
2617
+ }), s = new S(0.3, 0.3, 0.1, 16), a = new y({
2406
2618
  color: 5592405,
2407
2619
  roughness: 0.7,
2408
2620
  metalness: 0.5
2409
- }), i = new y(t, o);
2621
+ }), i = new M(t, o);
2410
2622
  for (let w = -1; w <= 1; w++) {
2411
- const v = new y(n, r);
2623
+ const v = new M(n, r);
2412
2624
  v.position.set(w, 1.5, 0.1), i.add(v);
2413
2625
  }
2414
- const c = new y(a, s);
2626
+ const c = new M(s, a);
2415
2627
  c.rotation.x = Math.PI / 2, c.position.set(0, 0.5, 0.15), i.add(c);
2416
- const l = new N(0.15, 8, 8), u = new M({
2628
+ const l = new U(0.15, 8, 8), u = new y({
2417
2629
  color: 16711680,
2418
2630
  emissive: 16711680,
2419
2631
  emissiveIntensity: 0.5
2420
- }), m = new y(l, u);
2421
- m.position.set(0, -1, 0.1), i.add(m), this.add(i);
2422
- let h = 0.015, f = 0.8, p = 0.2;
2423
- function d() {
2424
- requestAnimationFrame(d);
2425
- const w = p + Math.abs(Math.sin(Date.now() * h)) * (f - p);
2426
- m.material.emissiveIntensity = w;
2632
+ }), h = new M(l, u);
2633
+ h.position.set(0, -1, 0.1), i.add(h), this.add(i);
2634
+ let m = 0.015, f = 0.8, d = 0.2;
2635
+ function p() {
2636
+ requestAnimationFrame(p);
2637
+ const w = d + Math.abs(Math.sin(Date.now() * m)) * (f - d);
2638
+ h.material.emissiveIntensity = w;
2427
2639
  }
2428
- d();
2640
+ p();
2429
2641
  }
2430
2642
  }
2431
- class Qo extends y {
2643
+ class hn extends M {
2432
2644
  constructor({
2433
2645
  flaskRadius: t = 1,
2434
2646
  //
2435
2647
  neckRadius: o = 0.3,
2436
2648
  height: n = 2.5,
2437
2649
  neckHeight: r = 1,
2438
- radialSegments: a = 16
2650
+ radialSegments: s = 16
2439
2651
  } = {}) {
2440
- super(), this.geometry = new Be({ flaskRadius: t, neckRadius: o, height: n, neckHeight: r, radialSegments: a }), this.material = new W({
2652
+ super(), this.geometry = new _e({ flaskRadius: t, neckRadius: o, height: n, neckHeight: r, radialSegments: s }), this.material = new W({
2441
2653
  color: 8965375,
2442
2654
  transparent: !0,
2443
2655
  opacity: 0.4,
@@ -2445,130 +2657,181 @@ class Qo extends y {
2445
2657
  metalness: 0.1,
2446
2658
  reflectivity: 0.8,
2447
2659
  transmission: 0.9,
2448
- side: L,
2660
+ side: k,
2449
2661
  wireframe: !1
2450
2662
  });
2451
2663
  }
2452
2664
  }
2453
- class Ko extends P {
2665
+ class mn extends B {
2454
2666
  constructor() {
2455
2667
  super();
2456
2668
  const t = [
2457
- new b(0, 0),
2669
+ new I(0, 0),
2458
2670
  // Bottom of the flask
2459
- new b(1.2, 0),
2671
+ new I(1.2, 0),
2460
2672
  // Base
2461
- new b(1.5, 1.5),
2673
+ new I(1.5, 1.5),
2462
2674
  // Mid-body
2463
- new b(1, 3),
2675
+ new I(1, 3),
2464
2676
  // Narrow neck
2465
- new b(0.6, 3.5)
2677
+ new I(0.6, 3.5)
2466
2678
  // Mouth of the flask
2467
- ], o = new Y(t, 12), n = new S(0.6, 0.7, 0.3, 8), r = new M({
2679
+ ], o = new Z(t, 12), n = new S(0.6, 0.7, 0.3, 8), r = new y({
2468
2680
  color: 8965290,
2469
2681
  transparent: !0,
2470
2682
  opacity: 0.4,
2471
2683
  roughness: 0.1,
2472
2684
  metalness: 0.5,
2473
2685
  depthWrite: !1
2474
- }), a = new M({
2686
+ }), s = new y({
2475
2687
  color: 9127187,
2476
2688
  roughness: 1
2477
- }), s = new y(o, r), i = new y(n, a);
2478
- i.position.y = 3.5, this.add(s, i);
2689
+ }), a = new M(o, r);
2690
+ a.castShadow = !0;
2691
+ const i = new M(n, s);
2692
+ i.position.y = 3.5, this.add(a, i);
2479
2693
  }
2480
2694
  }
2481
- class $o extends P {
2695
+ class fn extends M {
2482
2696
  constructor() {
2483
2697
  super();
2484
- const t = new A(2, 3, 0.1), o = new M({
2698
+ g(this, "geometry");
2699
+ g(this, "material");
2700
+ this.geometry = new Oe(), this.material = new W({
2701
+ color: 8965375,
2702
+ transparent: !0,
2703
+ opacity: 0.4,
2704
+ roughness: 0.1,
2705
+ metalness: 0.1,
2706
+ reflectivity: 0.8,
2707
+ transmission: 0.9,
2708
+ side: k
2709
+ }), this.rotation.x = -Math.PI / 2;
2710
+ }
2711
+ }
2712
+ class dn extends B {
2713
+ constructor() {
2714
+ super();
2715
+ const t = new E(2, 3, 0.1), o = new y({
2485
2716
  color: 3355443,
2486
2717
  roughness: 0.8,
2487
2718
  metalness: 0.5
2488
- }), n = new y(t, o), r = new S(0.1, 0.1, 0.2, 8), a = new S(0.05, 0.05, 1, 8), s = new M({
2719
+ }), n = new M(t, o), r = new S(0.1, 0.1, 0.2, 8), s = new S(0.05, 0.05, 1, 8), a = new y({
2489
2720
  color: 11184810,
2490
2721
  roughness: 0.5,
2491
2722
  metalness: 0.7
2492
2723
  });
2493
2724
  for (let i = -0.5; i <= 0.5; i += 0.5) {
2494
- const c = new y(r, s);
2725
+ const c = new M(r, a);
2495
2726
  c.position.set(i, 1, 0.1);
2496
- const l = new y(a, s);
2727
+ const l = new M(s, a);
2497
2728
  l.position.y = 0.5, c.add(l), this.add(c);
2498
2729
  }
2499
2730
  this.add(n);
2500
2731
  }
2501
2732
  }
2502
- class Jo extends P {
2733
+ class pn extends B {
2503
2734
  constructor() {
2504
2735
  super();
2505
- const t = new A(1, 0.2, 0.5), o = new M({
2736
+ const t = new E(1, 0.2, 0.5), o = new y({
2506
2737
  color: 4473924,
2507
2738
  roughness: 0.6,
2508
2739
  metalness: 0.3
2509
- }), n = new y(t, o);
2740
+ }), n = new M(t, o);
2510
2741
  n.position.y = 0.1;
2511
- const r = new A(0.2, 1, 0.2), a = new y(r, o);
2512
- a.position.set(0, 0.6, -0.2);
2513
- const s = new S(0.1, 0.1, 0.4, 8), i = new M({
2742
+ const r = new E(0.2, 1, 0.2), s = new M(r, o);
2743
+ s.position.set(0, 0.6, -0.2);
2744
+ const a = new S(0.1, 0.1, 0.4, 8), i = new y({
2514
2745
  color: 3355443,
2515
2746
  roughness: 0.5,
2516
2747
  metalness: 0.6
2517
- }), c = new y(s, i);
2748
+ }), c = new M(a, i);
2518
2749
  c.position.set(0, 1.1, -0.35), c.rotation.x = -Math.PI / 4;
2519
- const l = new A(0.6, 0.1, 0.6), u = new M({
2750
+ const l = new E(0.6, 0.1, 0.6), u = new y({
2520
2751
  color: 5592405,
2521
2752
  roughness: 0.8,
2522
2753
  metalness: 0.2
2523
- }), m = new y(l, u);
2524
- m.position.set(0, 0.6, 0), this.add(n, a, c, m);
2754
+ }), h = new M(l, u);
2755
+ h.position.set(0, 0.6, 0), this.add(n, s, c, h);
2525
2756
  }
2526
2757
  }
2527
- class Wo extends P {
2758
+ class Mn extends B {
2528
2759
  constructor() {
2529
2760
  super();
2530
- const t = new Ue(), o = new S(0.2, 0.3, 1.5, 8);
2761
+ const t = new ze(), o = new S(0.2, 0.3, 1.5, 8);
2531
2762
  o.translate(0, 0.75, 0);
2532
- const n = new M({
2763
+ const n = new y({
2533
2764
  color: 6045747,
2534
2765
  // Dark earthy tone
2535
2766
  roughness: 1,
2536
2767
  metalness: 0,
2537
- side: L
2768
+ side: k
2538
2769
  // Render inside and outside
2539
- }), r = new M({
2770
+ }), r = new y({
2540
2771
  color: 9132587,
2541
2772
  // Slightly lighter earthy color
2542
2773
  roughness: 0.8,
2543
2774
  metalness: 0.1
2544
- }), a = new y(t, n), s = new y(o, r);
2545
- s.position.set(0.3, 1.3, 0), s.rotation.z = Math.PI / 4, this.add(a, s);
2775
+ }), s = new M(t, n);
2776
+ s.castShadow = !0;
2777
+ const a = new M(o, r);
2778
+ a.castShadow = !0, a.position.set(0.3, 1.3, 0), a.rotation.z = Math.PI / 4, this.add(s, a);
2546
2779
  }
2547
2780
  }
2548
- class tn extends P {
2781
+ class yn extends M {
2782
+ constructor({ width: o = 3, height: n = 4, depth: r = 0.1 } = {}) {
2783
+ super();
2784
+ g(this, "geometry");
2785
+ g(this, "material");
2786
+ this.geometry = new E(o, n, r), this.material = new y({
2787
+ color: 3026478,
2788
+ roughness: 0.8,
2789
+ metalness: 0.6
2790
+ });
2791
+ }
2792
+ }
2793
+ class wn extends M {
2794
+ constructor({
2795
+ radius: o = 0.15,
2796
+ //
2797
+ color: n = 16762823,
2798
+ emissive: r = 16711680,
2799
+ emissiveIntensity: s = 0.5
2800
+ } = {}) {
2801
+ super();
2802
+ g(this, "geometry");
2803
+ g(this, "material");
2804
+ this.geometry = new U(o, 8, 8), this.material = new y({
2805
+ color: n,
2806
+ emissive: r,
2807
+ emissiveIntensity: s
2808
+ });
2809
+ }
2810
+ }
2811
+ class vn extends B {
2549
2812
  constructor() {
2550
2813
  super();
2551
- const t = 100, o = 0.05, n = new St(
2814
+ const t = 100, o = 0.05, n = new Gt(
2552
2815
  Array.from({ length: t }, (l, u) => {
2553
- const m = u * 0.2;
2554
- return new g(
2555
- Math.cos(m) * 0.4,
2816
+ const h = u * 0.2;
2817
+ return new b(
2818
+ Math.cos(h) * 0.4,
2556
2819
  u * o,
2557
2820
  // Gradual height increase
2558
- Math.sin(m) * 0.4
2821
+ Math.sin(h) * 0.4
2559
2822
  );
2560
2823
  })
2561
- ), r = new Et(n, 200, 0.1, 8, !1), a = new M({
2824
+ ), r = new Ct(n, 200, 0.1, 8, !1), s = new y({
2562
2825
  color: 8965375,
2563
2826
  transparent: !0,
2564
2827
  opacity: 0.3,
2565
2828
  roughness: 0.1,
2566
2829
  metalness: 0.2,
2567
2830
  emissive: 8965375
2568
- }), s = new y(r, a);
2569
- this.add(s);
2831
+ }), a = new M(r, s);
2832
+ this.add(a);
2570
2833
  function i() {
2571
- a.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
2834
+ s.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
2572
2835
  }
2573
2836
  function c() {
2574
2837
  requestAnimationFrame(c), i();
@@ -2576,46 +2839,49 @@ class tn extends P {
2576
2839
  c();
2577
2840
  }
2578
2841
  }
2579
- class en extends y {
2842
+ class xn extends M {
2580
2843
  constructor({
2581
- radius: t = 0.3,
2844
+ radius: o = 0.3,
2582
2845
  //
2583
- height: o = 0.4,
2584
- count: n = 3,
2585
- thickness: r = 0.03,
2846
+ height: n = 0.4,
2847
+ count: r = 3,
2848
+ thickness: s = 0.03,
2586
2849
  radialSegments: a = 16
2587
2850
  } = {}) {
2588
- super(), this.geometry = new ze({ radius: t, height: o, count: n, thickness: r, radialSegments: a }), this.material = new M({
2851
+ super();
2852
+ g(this, "geometry");
2853
+ g(this, "material");
2854
+ this.geometry = new Fe({ radius: o, height: n, count: r, thickness: s, radialSegments: a }), this.material = new y({
2589
2855
  color: 8947848,
2590
2856
  roughness: 0.7,
2591
2857
  metalness: 0.3
2592
2858
  });
2593
2859
  }
2594
2860
  }
2595
- class on extends P {
2861
+ class gn extends B {
2596
2862
  constructor() {
2597
2863
  super();
2598
- const t = new S(0.5, 0.6, 0.3, 16), o = new M({
2864
+ const t = new S(0.5, 0.6, 0.3, 16), o = new y({
2599
2865
  color: 3355443,
2600
2866
  roughness: 0.6,
2601
2867
  metalness: 0.5
2602
- }), n = new y(t, o);
2868
+ }), n = new M(t, o);
2603
2869
  n.position.y = 0.15;
2604
- const r = new S(0.15, 0.15, 2, 12, 1, !0), a = new M({
2870
+ const r = new S(0.15, 0.15, 2, 12, 1, !0), s = new y({
2605
2871
  color: 16737792,
2606
2872
  roughness: 0.5,
2607
2873
  metalness: 0.8,
2608
- side: L
2609
- }), s = new y(r, a);
2610
- s.position.y = 1.3;
2611
- const i = new N(0.3, 16, 16), c = new y(i, a);
2612
- c.position.y = 2.4, this.add(n, s, c);
2874
+ side: k
2875
+ }), a = new M(r, s);
2876
+ a.position.y = 1.3;
2877
+ const i = new U(0.3, 16, 16), c = new M(i, s);
2878
+ c.position.y = 2.4, this.add(n, a, c);
2613
2879
  }
2614
2880
  }
2615
- class nn extends P {
2881
+ class bn extends B {
2616
2882
  constructor(t = 0.2, o = 0.2, n = 3, r = 32) {
2617
2883
  super();
2618
- const a = new st(t, o, n, r), s = new W({
2884
+ const s = new rt(t, o, n, r), a = new W({
2619
2885
  color: 8965375,
2620
2886
  transparent: !0,
2621
2887
  opacity: 0.4,
@@ -2625,49 +2891,49 @@ class nn extends P {
2625
2891
  transmission: 0.9,
2626
2892
  // For glass effect
2627
2893
  depthWrite: !1,
2628
- side: L
2629
- }), i = new y(a, s);
2894
+ side: k
2895
+ }), i = new M(s, a);
2630
2896
  this.add(i);
2631
2897
  }
2632
2898
  }
2633
- class sn extends P {
2899
+ class In extends B {
2634
2900
  constructor(t = 3, o = [65450, 16711850, 11141375]) {
2635
2901
  super();
2636
- const n = new A(3, 0.2, 1), r = new M({
2902
+ const n = new E(3, 0.2, 1), r = new y({
2637
2903
  color: 9127187,
2638
2904
  // Wooden color or change to metallic tone
2639
2905
  roughness: 0.7,
2640
2906
  metalness: 0.3
2641
- }), a = new y(n, r);
2642
- a.position.y = 0.5;
2643
- const s = new st(0.1, 0.1, 1, 16), i = new M({
2907
+ }), s = new M(n, r);
2908
+ s.position.y = 0.5, s.castShadow = !0;
2909
+ const a = new rt(0.1, 0.1, 1, 16), i = new y({
2644
2910
  color: 11184810,
2645
2911
  transparent: !0,
2646
2912
  opacity: 0.4,
2647
2913
  roughness: 0.1,
2648
2914
  metalness: 0.5,
2649
2915
  depthWrite: !1,
2650
- side: L
2916
+ side: k
2651
2917
  });
2652
2918
  for (let c = 0; c < t; c++) {
2653
- const l = new y(s, i), u = (c - (t - 1) / 2) * 0.8;
2654
- l.position.set(u, 1, 0);
2655
- const m = new st(0.099, 0.099, 0.5, 16, !1), h = o[c % o.length], f = new M({
2656
- color: h,
2657
- emissive: h,
2919
+ const l = new M(a, i), u = (c - (t - 1) / 2) * 0.8;
2920
+ l.position.set(u, 1, 0), l.castShadow = !0;
2921
+ const h = new rt(0.099, 0.099, 0.5, 16, !1), m = o[c % o.length], f = new y({
2922
+ color: m,
2923
+ emissive: m,
2658
2924
  emissiveIntensity: 0.5,
2659
2925
  transparent: !0,
2660
2926
  opacity: 0.6
2661
- }), p = new y(m, f);
2662
- p.position.set(0, -0.25, 0), l.add(p), a.add(l);
2927
+ }), d = new M(h, f);
2928
+ d.position.set(0, -0.25, 0), l.add(d), s.add(l);
2663
2929
  }
2664
- this.add(a);
2930
+ this.add(s);
2665
2931
  }
2666
2932
  }
2667
- class rn extends y {
2933
+ class En extends M {
2668
2934
  constructor() {
2669
2935
  super();
2670
- const t = new ke(), o = new W({
2936
+ const t = new Le(), o = new W({
2671
2937
  color: 5597999,
2672
2938
  roughness: 0.1,
2673
2939
  transmission: 0.9,
@@ -2680,27 +2946,27 @@ class rn extends y {
2680
2946
  this.geometry = t, this.material = o;
2681
2947
  }
2682
2948
  }
2683
- class Re extends H {
2949
+ class Xe extends j {
2684
2950
  constructor(t = 5, o = 0.5, n = 1) {
2685
2951
  super();
2686
- const r = Math.PI * 2 / t, a = r / 2, s = r / 4;
2952
+ const r = Math.PI * 2 / t, s = r / 2, a = r / 4;
2687
2953
  this.moveTo(Math.cos(0) * n, -Math.sin(0) * n);
2688
2954
  for (let i = 1; i <= t; ++i) {
2689
- let c = Math.cos(r * i - s * 3) * (o / Math.cos(s)), l = -Math.sin(r * i - s * 3) * (o / Math.cos(s)), u = Math.cos(r * i - a) * o, m = -Math.sin(r * i - a) * o;
2690
- this.quadraticCurveTo(c, l, u, m), c = Math.cos(r * i - s) * (o / Math.cos(s)), l = -Math.sin(r * i - s) * (o / Math.cos(s)), u = Math.cos(r * i) * n, m = -Math.sin(r * i) * n, this.quadraticCurveTo(c, l, u, m);
2955
+ let c = Math.cos(r * i - a * 3) * (o / Math.cos(a)), l = -Math.sin(r * i - a * 3) * (o / Math.cos(a)), u = Math.cos(r * i - s) * o, h = -Math.sin(r * i - s) * o;
2956
+ this.quadraticCurveTo(c, l, u, h), c = Math.cos(r * i - a) * (o / Math.cos(a)), l = -Math.sin(r * i - a) * (o / Math.cos(a)), u = Math.cos(r * i) * n, h = -Math.sin(r * i) * n, this.quadraticCurveTo(c, l, u, h);
2691
2957
  }
2692
2958
  this.closePath();
2693
2959
  }
2694
2960
  }
2695
- class an extends y {
2961
+ class An extends M {
2696
2962
  constructor(t = 5, o = 0.5, n = 1, r = 0.25) {
2697
2963
  super();
2698
- const a = new Re(t, o, n), s = new Q(a, {
2964
+ const s = new Xe(t, o, n), a = new Q(s, {
2699
2965
  depth: r,
2700
2966
  bevelEnabled: r > 0,
2701
2967
  bevelThickness: 0,
2702
2968
  bevelSize: 0
2703
- }), i = new M({
2969
+ }), i = new y({
2704
2970
  color: 16776960,
2705
2971
  emissive: 16766720,
2706
2972
  emissiveIntensity: 0.25,
@@ -2708,34 +2974,34 @@ class an extends y {
2708
2974
  roughness: 0.3,
2709
2975
  flatShading: !0
2710
2976
  });
2711
- s.center(), this.geometry = s, this.material = i;
2977
+ a.center(), this.geometry = a, this.material = i;
2712
2978
  }
2713
2979
  }
2714
- class Le extends H {
2715
- constructor(t = 5, o = 0.5, n = 1, r = 5, a = 0.25) {
2980
+ class Ye extends j {
2981
+ constructor(t = 5, o = 0.5, n = 1, r = 5, s = 0.25) {
2716
2982
  super();
2717
- const s = Math.PI * 2 / t, i = s / 4;
2983
+ const a = Math.PI * 2 / t, i = a / 4;
2718
2984
  this.moveTo(Math.cos(0) * n, -Math.sin(0) * n);
2719
2985
  for (let c = 1; c <= t; ++c)
2720
- this.lineTo(Math.cos(s * c - i * 3) * o, -Math.sin(s * c - i * 3) * o), this.lineTo(Math.cos(s * c - i * 2) * o, -Math.sin(s * c - i * 2) * o), this.lineTo(Math.cos(s * c - i) * n, -Math.sin(s * c - i) * n), this.lineTo(Math.cos(s * c) * n, -Math.sin(s * c) * n);
2721
- if (this.closePath(), a > 0 && r > 2) {
2722
- const c = new Pt(), l = Math.PI * 2 / r;
2723
- c.moveTo(Math.cos(0) * a, -Math.sin(0) * a);
2986
+ this.lineTo(Math.cos(a * c - i * 3) * o, -Math.sin(a * c - i * 3) * o), this.lineTo(Math.cos(a * c - i * 2) * o, -Math.sin(a * c - i * 2) * o), this.lineTo(Math.cos(a * c - i) * n, -Math.sin(a * c - i) * n), this.lineTo(Math.cos(a * c) * n, -Math.sin(a * c) * n);
2987
+ if (this.closePath(), s > 0 && r > 2) {
2988
+ const c = new Bt(), l = Math.PI * 2 / r;
2989
+ c.moveTo(Math.cos(0) * s, -Math.sin(0) * s);
2724
2990
  for (let u = 1; u < r; ++u)
2725
- c.lineTo(Math.cos(l * u) * a, -Math.sin(l * u) * a);
2726
- c.lineTo(Math.cos(0) * a, -Math.sin(0) * a), this.holes.push(c);
2991
+ c.lineTo(Math.cos(l * u) * s, -Math.sin(l * u) * s);
2992
+ c.lineTo(Math.cos(0) * s, -Math.sin(0) * s), this.holes.push(c);
2727
2993
  }
2728
2994
  }
2729
2995
  }
2730
- class cn extends y {
2731
- constructor(t = 5, o = 0.5, n = 1, r = 5, a = 0.25, s = 0.25) {
2996
+ class Sn extends M {
2997
+ constructor(t = 5, o = 0.5, n = 1, r = 5, s = 0.25, a = 0.25) {
2732
2998
  super();
2733
- const i = new Le(t, o, n, r, a), c = new Q(i, {
2734
- depth: s,
2735
- bevelEnabled: s > 0,
2999
+ const i = new Ye(t, o, n, r, s), c = new Q(i, {
3000
+ depth: a,
3001
+ bevelEnabled: a > 0,
2736
3002
  bevelThickness: 0,
2737
3003
  bevelSize: 0
2738
- }), l = new M({
3004
+ }), l = new y({
2739
3005
  color: 11184810,
2740
3006
  metalness: 0.8,
2741
3007
  roughness: 0.2
@@ -2743,7 +3009,7 @@ class cn extends y {
2743
3009
  c.center(), this.geometry = c, this.material = l;
2744
3010
  }
2745
3011
  }
2746
- class qe extends H {
3012
+ class Ze extends j {
2747
3013
  constructor(t = 1, o = 2.1, n = 1.4, r = 1.6) {
2748
3014
  super(), this.moveTo(0, n * t / 3), this.bezierCurveTo(
2749
3015
  -o * 0.375 * t,
@@ -2768,15 +3034,15 @@ class qe extends H {
2768
3034
  );
2769
3035
  }
2770
3036
  }
2771
- class ln extends y {
2772
- constructor(t = 1, o = 1, n = 1, r = 10, a = 0.25) {
3037
+ class Pn extends M {
3038
+ constructor(t = 1, o = 1, n = 1, r = 10, s = 0.25) {
2773
3039
  super();
2774
- const s = new qe(t, o, n, r), i = new Q(s, {
2775
- depth: a,
2776
- bevelEnabled: a > 0,
3040
+ const a = new Ze(t, o, n, r), i = new Q(a, {
3041
+ depth: s,
3042
+ bevelEnabled: s > 0,
2777
3043
  bevelThickness: 0,
2778
3044
  bevelSize: 0
2779
- }), c = new M({
3045
+ }), c = new y({
2780
3046
  color: 12986408,
2781
3047
  emissive: 12981270,
2782
3048
  emissiveIntensity: 0.25,
@@ -2787,25 +3053,25 @@ class ln extends y {
2787
3053
  i.center(), this.geometry = i, this.material = c;
2788
3054
  }
2789
3055
  }
2790
- class De extends H {
3056
+ class je extends j {
2791
3057
  constructor(t = 5, o = 0.5, n = 1) {
2792
3058
  super();
2793
- const r = Math.PI * 2 / t, a = r / 2;
3059
+ const r = Math.PI * 2 / t, s = r / 2;
2794
3060
  this.moveTo(Math.cos(0) * n, Math.sin(0) * n);
2795
- for (let s = 1; s <= t; ++s)
2796
- this.lineTo(Math.cos(r * s - a) * o, Math.sin(r * s - a) * o), this.lineTo(Math.cos(r * s) * n, Math.sin(r * s) * n);
3061
+ for (let a = 1; a <= t; ++a)
3062
+ this.lineTo(Math.cos(r * a - s) * o, Math.sin(r * a - s) * o), this.lineTo(Math.cos(r * a) * n, Math.sin(r * a) * n);
2797
3063
  this.closePath();
2798
3064
  }
2799
3065
  }
2800
- class un extends y {
3066
+ class Tn extends M {
2801
3067
  constructor(t = 5, o = 0.5, n = 1, r = 0.25) {
2802
3068
  super();
2803
- const a = new De(t, o, n), s = new Q(a, {
3069
+ const s = new je(t, o, n), a = new Q(s, {
2804
3070
  depth: r,
2805
3071
  bevelEnabled: r > 0,
2806
3072
  bevelThickness: 0,
2807
3073
  bevelSize: 0
2808
- }), i = new M({
3074
+ }), i = new y({
2809
3075
  color: 16776960,
2810
3076
  emissive: 16766720,
2811
3077
  emissiveIntensity: 0.25,
@@ -2813,92 +3079,92 @@ class un extends y {
2813
3079
  roughness: 0.3,
2814
3080
  flatShading: !0
2815
3081
  });
2816
- s.center(), this.geometry = s, this.material = i;
3082
+ a.center(), this.geometry = a, this.material = i;
2817
3083
  }
2818
3084
  }
2819
- class mn extends y {
3085
+ class Gn extends M {
2820
3086
  constructor() {
2821
- super(), this.geometry = new Ge(), this.material = new M({ color: 16777215 });
3087
+ super(), this.geometry = new Ue(), this.material = new y({ color: 16777215 });
2822
3088
  }
2823
3089
  }
2824
- class hn extends y {
3090
+ class Cn extends M {
2825
3091
  constructor({
2826
3092
  trunkRadiusTop: t = 0.25,
2827
3093
  trunkRadiusBottom: o = 0.4,
2828
3094
  trunkHeight: n = 2.5,
2829
3095
  trunkSegments: r = 14,
2830
- trunkColor: a = 9127187,
2831
- leafSize: s = 0.8,
3096
+ trunkColor: s = 9127187,
3097
+ leafSize: a = 0.8,
2832
3098
  leafCount: i = 6,
2833
3099
  leafDetail: c = 0,
2834
3100
  leafSpreadRadius: l = 1.5,
2835
3101
  leafColor: u = 2263842
2836
3102
  } = {}) {
2837
3103
  super();
2838
- const m = new Fe({
3104
+ const h = new Ve({
2839
3105
  trunkRadiusTop: t,
2840
3106
  trunkRadiusBottom: o,
2841
3107
  trunkHeight: n,
2842
3108
  trunkSegments: r,
2843
- leafSize: s,
3109
+ leafSize: a,
2844
3110
  leafCount: i,
2845
3111
  leafDetail: c,
2846
3112
  leafSpreadRadius: l
2847
- }), h = new M({
2848
- color: a,
3113
+ }), m = new y({
3114
+ color: s,
2849
3115
  roughness: 0.9,
2850
3116
  metalness: 0,
2851
3117
  flatShading: !0
2852
- }), f = new M({
3118
+ }), f = new y({
2853
3119
  color: u,
2854
3120
  roughness: 0.8,
2855
3121
  metalness: 0,
2856
3122
  flatShading: !0
2857
3123
  });
2858
- this.geometry = m, this.material = [h, f];
3124
+ this.geometry = h, this.material = [m, f];
2859
3125
  }
2860
3126
  }
2861
- class fn extends y {
3127
+ class Bn extends M {
2862
3128
  constructor({
2863
3129
  radius: t = 3,
2864
3130
  //
2865
3131
  height: o = 0.6,
2866
3132
  widthSegments: n = 64,
2867
3133
  heightSegments: r = 16,
2868
- phiStart: a = 0,
2869
- phiLength: s = Math.PI * 2
3134
+ phiStart: s = 0,
3135
+ phiLength: a = Math.PI * 2
2870
3136
  } = {}) {
2871
- super(), this.geometry = new Ne({
3137
+ super(), this.geometry = new ke({
2872
3138
  radius: t,
2873
3139
  height: o,
2874
3140
  widthSegments: n,
2875
3141
  heightSegments: r,
2876
- phiStart: a,
2877
- phiLength: s
2878
- }), this.material = new M({ color: 65280, flatShading: !0 });
3142
+ phiStart: s,
3143
+ phiLength: a
3144
+ }), this.material = new y({ color: 65280, flatShading: !0 });
2879
3145
  }
2880
3146
  }
2881
- class pn extends y {
3147
+ class Rn extends M {
2882
3148
  constructor({
2883
- radius: t = wt(5, Math.PI / 10),
3149
+ radius: t = gt(5, Math.PI / 10),
2884
3150
  //
2885
3151
  widthSegments: o = 64,
2886
3152
  heightSegments: n = 32,
2887
3153
  phiStart: r = 0,
2888
- phiLength: a = Math.PI * 2,
2889
- thetaLength: s = Math.PI / 10
3154
+ phiLength: s = Math.PI * 2,
3155
+ thetaLength: a = Math.PI / 10
2890
3156
  } = {}) {
2891
- super(), this.geometry = new _e({
3157
+ super(), this.geometry = new qe({
2892
3158
  radius: t,
2893
3159
  widthSegments: o,
2894
3160
  heightSegments: n,
2895
3161
  phiStart: r,
2896
- phiLength: a,
2897
- thetaLength: s
2898
- }), this.material = new M({ color: 65280, flatShading: !0 });
3162
+ phiLength: s,
3163
+ thetaLength: a
3164
+ }), this.material = new y({ color: 65280, flatShading: !0 });
2899
3165
  }
2900
3166
  }
2901
- function dn(e, { time: t = 0, waveFrequency: o = 0.2, waveAmplitude: n = 0.5 } = {}) {
3167
+ function Nn(e, { time: t = 0, waveFrequency: o = 0.2, waveAmplitude: n = 0.5 } = {}) {
2902
3168
  e.onBeforeCompile = (r) => {
2903
3169
  r.uniforms.time = { value: t }, r.uniforms.waveFrequency = { value: o }, r.uniforms.waveAmplitude = { value: n }, r.vertexShader = `
2904
3170
  uniform float time;
@@ -2922,14 +3188,14 @@ function dn(e, { time: t = 0, waveFrequency: o = 0.2, waveAmplitude: n = 0.5 } =
2922
3188
  ), e.userData.shader = r;
2923
3189
  };
2924
3190
  }
2925
- function yn(e, t) {
3191
+ function Un(e, t) {
2926
3192
  e.userData.shader && (e.userData.shader.uniforms.time.value += t);
2927
3193
  }
2928
- function wn(e, { time: t = 0, intensity: o = 1, direction: n = q.XYZ, scale: r = 10 } = {}) {
2929
- e.onBeforeCompile = (a) => {
2930
- a.uniforms.time = { value: t }, a.uniforms.direction = { value: n }, a.uniforms.intensity = { value: o }, a.uniforms.scale = { value: r }, a.vertexShader = `
3194
+ function _n(e, { time: t = 0, intensity: o = 1, axis: n = ut.XYZ, scale: r = 10 } = {}) {
3195
+ e.onBeforeCompile = (s) => {
3196
+ s.uniforms.time = { value: t }, s.uniforms.axis = { value: n }, s.uniforms.intensity = { value: o }, s.uniforms.scale = { value: r }, s.vertexShader = `
2931
3197
  uniform float time;
2932
- uniform vec3 direction;
3198
+ uniform vec3 axis;
2933
3199
  uniform float intensity;
2934
3200
  uniform float scale;
2935
3201
 
@@ -2958,28 +3224,28 @@ function wn(e, { time: t = 0, intensity: o = 1, direction: n = q.XYZ, scale: r =
2958
3224
 
2959
3225
  return o4.y * d.y + o4.x * (1.0 - d.y);
2960
3226
  }
2961
- ` + a.vertexShader, a.vertexShader = a.vertexShader.replace(
3227
+ ` + s.vertexShader, s.vertexShader = s.vertexShader.replace(
2962
3228
  "#include <begin_vertex>",
2963
3229
  `
2964
3230
  vec3 transformed = vec3(position);
2965
3231
  float n = noise(transformed * scale + time);
2966
- transformed += normalize(direction) * n * intensity;
3232
+ transformed += normalize(axis) * n * intensity;
2967
3233
  vec3 transformedNormal = normal;
2968
3234
  `
2969
- ), e.userData.shader = a;
3235
+ ), e.userData.shader = s;
2970
3236
  };
2971
3237
  }
2972
- function Mn(e, t) {
3238
+ function On(e, t) {
2973
3239
  e.userData.shader && (e.userData.shader.uniforms.time.value += t);
2974
3240
  }
2975
- const et = {
3241
+ const ot = {
2976
3242
  uniforms: {
2977
3243
  turbidity: { value: 10 },
2978
3244
  rayleigh: { value: 2 },
2979
3245
  mieCoefficient: { value: 5e-3 },
2980
3246
  mieDirectionalG: { value: 0.8 },
2981
- sunPosition: { value: new g().setFromSphericalCoords(1, _.degToRad(90), _.degToRad(180)) },
2982
- up: { value: new g(0, 1, 0) }
3247
+ sunPosition: { value: new b().setFromSphericalCoords(1, z.degToRad(90), z.degToRad(180)) },
3248
+ up: { value: new b(0, 1, 0) }
2983
3249
  },
2984
3250
  vertexShader: `
2985
3251
  uniform vec3 sunPosition;
@@ -3134,7 +3400,7 @@ const et = {
3134
3400
  #include <colorspace_fragment>
3135
3401
  }
3136
3402
  `
3137
- }, ot = {
3403
+ }, nt = {
3138
3404
  uniforms: {
3139
3405
  topColor: { value: new $(0.5, 0.8, 1) },
3140
3406
  bottomColor: { value: new $(1, 1, 1) }
@@ -3155,7 +3421,7 @@ const et = {
3155
3421
  gl_FragColor = vec4(mix(bottomColor, topColor, y), 1.0);
3156
3422
  }
3157
3423
  `
3158
- }, vn = {
3424
+ }, zn = {
3159
3425
  uniforms: {
3160
3426
  tDiffuse: { value: null },
3161
3427
  opacity: { value: 1 }
@@ -3176,7 +3442,7 @@ const et = {
3176
3442
  gl_FragColor = opacity * texel;
3177
3443
  }
3178
3444
  `
3179
- }, nt = {
3445
+ }, st = {
3180
3446
  uniforms: {
3181
3447
  topColor: { value: new $(51) },
3182
3448
  bottomColor: { value: new $(17) },
@@ -3203,19 +3469,19 @@ const et = {
3203
3469
  }
3204
3470
  `
3205
3471
  };
3206
- class xn extends y {
3472
+ class Fn extends M {
3207
3473
  constructor() {
3208
3474
  super();
3209
- E(this, "geometry");
3210
- E(this, "material");
3211
- this.geometry = new A(1, 1, 1), this.material = new J({
3212
- uniforms: et.uniforms,
3213
- vertexShader: et.vertexShader,
3214
- fragmentShader: et.fragmentShader,
3475
+ g(this, "geometry");
3476
+ g(this, "material");
3477
+ this.geometry = new E(1, 1, 1), this.material = new J({
3478
+ uniforms: ot.uniforms,
3479
+ vertexShader: ot.vertexShader,
3480
+ fragmentShader: ot.fragmentShader,
3215
3481
  depthWrite: !1,
3216
- side: it
3482
+ side: ct
3217
3483
  }), this.scale.setScalar(45e4);
3218
- const o = _.degToRad(89), n = _.degToRad(180), r = new g().setFromSphericalCoords(1, o, n);
3484
+ const o = z.degToRad(89), n = z.degToRad(180), r = new b().setFromSphericalCoords(1, o, n);
3219
3485
  this.material.uniforms.sunPosition.value = r;
3220
3486
  }
3221
3487
  /**
@@ -3232,309 +3498,514 @@ class xn extends y {
3232
3498
  * - This is the horizontal angle in the xy-plane.
3233
3499
  */
3234
3500
  sunPosition(o, n) {
3235
- const r = new g();
3501
+ const r = new b();
3236
3502
  r.setFromSphericalCoords(1, o, n), this.material.uniforms.sunPosition.value = r;
3237
3503
  }
3238
3504
  }
3239
- class gn extends y {
3505
+ class Ln extends M {
3240
3506
  constructor(o = 1e3) {
3241
3507
  super();
3242
- E(this, "geometry");
3243
- E(this, "material");
3244
- this.geometry = new A(o, o, o), this.material = new J({
3245
- uniforms: ot.uniforms,
3246
- vertexShader: ot.vertexShader,
3247
- fragmentShader: ot.fragmentShader,
3248
- side: it
3508
+ g(this, "geometry");
3509
+ g(this, "material");
3510
+ this.geometry = new E(o, o, o), this.material = new J({
3511
+ uniforms: nt.uniforms,
3512
+ vertexShader: nt.vertexShader,
3513
+ fragmentShader: nt.fragmentShader,
3514
+ side: ct
3249
3515
  });
3250
3516
  }
3251
3517
  }
3252
- class bn extends y {
3518
+ class kn extends M {
3253
3519
  constructor(o = 1e3) {
3254
3520
  super();
3255
- E(this, "geometry");
3256
- E(this, "material");
3257
- this.geometry = new N(o, 32, 15), this.material = new J({
3258
- vertexShader: nt.vertexShader,
3259
- fragmentShader: nt.fragmentShader,
3260
- uniforms: nt.uniforms,
3261
- side: it
3521
+ g(this, "geometry");
3522
+ g(this, "material");
3523
+ this.geometry = new U(o, 32, 15), this.material = new J({
3524
+ vertexShader: st.vertexShader,
3525
+ fragmentShader: st.fragmentShader,
3526
+ uniforms: st.uniforms,
3527
+ side: ct
3262
3528
  });
3263
3529
  }
3264
3530
  }
3265
- const An = (e) => {
3531
+ const Dn = (e) => {
3266
3532
  const t = new Uint8Array(4 * e * e);
3267
3533
  for (let n = 0; n < e * e; n++) {
3268
- const r = n * 4, a = (n % e ^ Math.floor(n / e)) & 1 ? 255 : 0;
3269
- t[r] = a, t[r + 1] = a, t[r + 2] = a, t[r + 3] = 255;
3534
+ const r = n * 4, s = (n % e ^ Math.floor(n / e)) & 1 ? 255 : 0;
3535
+ t[r] = s, t[r + 1] = s, t[r + 2] = s, t[r + 3] = 255;
3270
3536
  }
3271
- const o = new Tt(t, e, e, Gt, Ct);
3272
- return o.wrapS = lt, o.wrapT = lt, o.minFilter = Bt, o.needsUpdate = !0, o;
3537
+ const o = new Rt(t, e, e, Nt, Ut);
3538
+ return o.wrapS = ht, o.wrapT = ht, o.minFilter = _t, o.needsUpdate = !0, o;
3273
3539
  };
3274
- function In(e) {
3275
- const t = new ct().setFromObject(e), o = new g();
3540
+ function qn(e) {
3541
+ const t = parseInt(e.slice(1), 16);
3542
+ return [
3543
+ t >> 16 & 255,
3544
+ // r
3545
+ t >> 8 & 255,
3546
+ // g
3547
+ t & 255
3548
+ // b
3549
+ ];
3550
+ }
3551
+ function Vn(e) {
3552
+ const [t, o, n] = X(e);
3553
+ return Ke(t, o, n);
3554
+ }
3555
+ function X(e) {
3556
+ const t = e >> 16 & 255, o = e >> 8 & 255, n = e & 255;
3557
+ return [t, o, n];
3558
+ }
3559
+ function Hn(e, t, o) {
3560
+ t /= 100, o /= 100;
3561
+ function n(c, l, u) {
3562
+ return u < 0 && (u += 1), u > 1 && (u -= 1), u < 1 / 6 ? c + (l - c) * 6 * u : u < 1 / 2 ? l : u < 2 / 3 ? c + (l - c) * (2 / 3 - u) * 6 : c;
3563
+ }
3564
+ let r, s, a;
3565
+ if (t === 0)
3566
+ r = s = a = o;
3567
+ else {
3568
+ const c = o < 0.5 ? o * (1 + t) : o + t - o * t, l = 2 * o - c;
3569
+ r = n(l, c, e / 360 + 1 / 3), s = n(l, c, e / 360), a = n(l, c, e / 360 - 1 / 3);
3570
+ }
3571
+ const i = (c) => Math.round(c * 255);
3572
+ return [
3573
+ i(r),
3574
+ i(s),
3575
+ i(a)
3576
+ ];
3577
+ }
3578
+ function Qe(e, t, o) {
3579
+ t /= 100, o /= 100;
3580
+ const n = (a) => (a + e / 30) % 12, r = t * Math.min(o, 1 - o), s = (a) => o - r * Math.max(-1, Math.min(n(a) - 3, Math.min(9 - n(a), 1)));
3581
+ return [s(0) * 255, s(8) * 255, s(4) * 255];
3582
+ }
3583
+ function Xn(e, t, o) {
3584
+ return [e / 255, t / 255, o / 255];
3585
+ }
3586
+ function Yn(e, t, o) {
3587
+ return e = Math.round(e), t = Math.round(t), o = Math.round(o), (e << 16) + (t << 8) + o;
3588
+ }
3589
+ function Ke(e, t, o) {
3590
+ e /= 255, t /= 255, o /= 255;
3591
+ const n = Math.max(e, t, o), r = Math.min(e, t, o), s = n - r;
3592
+ let a = 0, i = 0;
3593
+ const c = (n + r) / 2;
3594
+ s !== 0 && (n === e ? a = ((t - o) / s + (t < o ? 6 : 0)) * 60 : n === t ? a = ((o - e) / s + 2) * 60 : n === o && (a = ((e - t) / s + 4) * 60)), s !== 0 && (i = s / (1 - Math.abs(2 * c - 1))), a = Math.round(a), i = Math.round(i * 100);
3595
+ const l = Math.round(c * 100);
3596
+ return [a, i, l];
3597
+ }
3598
+ function $e(e, t) {
3599
+ return Math.sqrt(
3600
+ Math.pow(e[0] - t[0], 2) + Math.pow(e[1] - t[1], 2) + Math.pow(e[2] - t[2], 2)
3601
+ );
3602
+ }
3603
+ function Je(e, t) {
3604
+ return Math.abs(e[0] - t[0]) + //
3605
+ Math.abs(e[1] - t[1]) + Math.abs(e[2] - t[2]);
3606
+ }
3607
+ function Zn(e, t) {
3608
+ const o = X(e);
3609
+ let n = null, r = 1 / 0;
3610
+ for (const s of t) {
3611
+ const a = X(s), i = $e(o, a);
3612
+ i < r && (r = i, n = s);
3613
+ }
3614
+ return n;
3615
+ }
3616
+ function jn(e, t) {
3617
+ const o = X(e);
3618
+ let n = null, r = 1 / 0;
3619
+ for (const s of t) {
3620
+ const a = X(s), i = Je(o, a);
3621
+ i < r && (r = i, n = s);
3622
+ }
3623
+ return n;
3624
+ }
3625
+ function Qn(e) {
3626
+ const t = (e + Math.floor(-30 + Math.random() * 61)) % 360, o = Math.floor(60 + Math.random() * 21), n = Math.floor(50 + Math.random() * 21);
3627
+ return Qe(t, o, n);
3628
+ }
3629
+ function Kn(e) {
3630
+ const t = new lt().setFromObject(e), o = new b();
3276
3631
  t.getCenter(o), e.position.sub(o);
3277
3632
  }
3278
- function Sn(e, t = new g(0, 0, 0)) {
3279
- const o = new ct().setFromObject(e), n = new g();
3633
+ function $n(e, t = new b(0, 0, 0)) {
3634
+ const o = new lt().setFromObject(e), n = new b();
3280
3635
  o.getCenter(n);
3281
- const r = new g().subVectors(t, n);
3636
+ const r = new b().subVectors(t, n);
3282
3637
  e.position.add(r);
3283
3638
  }
3284
- function En(e) {
3639
+ function Jn(e) {
3285
3640
  e.computeBoundingBox();
3286
3641
  const t = e.boundingBox;
3287
3642
  if (t) {
3288
- const o = t.getCenter(new g());
3643
+ const o = t.getCenter(new b());
3289
3644
  e.translateX(-o.x), e.translateY(-o.y), e.translateZ(-o.z);
3290
3645
  }
3291
3646
  }
3292
- function Ve(e, t, o) {
3647
+ function We(e, t, o) {
3293
3648
  return Math.max(0, Math.min(1, (e - t) / (o - t)));
3294
3649
  }
3295
- function Pn(e, t, o, n, r, a = 20, s = 0, i = 1) {
3650
+ function Wn(e, t, o, n, r, s = 20, a = 0, i = 1) {
3296
3651
  const c = [];
3297
- for (let l = 0; l <= a; l++) {
3298
- const u = l / a, m = e(Ve(u, s, i)), h = t + m * (o - t), f = n + u * (r - n);
3299
- c.push(new b(h, f));
3652
+ for (let l = 0; l <= s; l++) {
3653
+ const u = l / s, h = e(We(u, a, i)), m = t + h * (o - t), f = n + u * (r - n);
3654
+ c.push(new I(m, f));
3300
3655
  }
3301
3656
  return c;
3302
3657
  }
3303
- function Tn(e) {
3304
- const o = new ct().setFromObject(e).getCenter(new g());
3658
+ function ts(e) {
3659
+ const o = new lt().setFromObject(e).getCenter(new b());
3305
3660
  e.translateX(-o.x), e.translateY(-o.y), e.translateZ(-o.z), e.updateMatrixWorld(!0);
3306
3661
  }
3307
- function Gn(e) {
3662
+ function es(e) {
3308
3663
  e.geometry.computeBoundingBox();
3309
3664
  const t = e.geometry.boundingBox;
3310
3665
  if (t) {
3311
- const o = t.getCenter(new g());
3666
+ const o = t.getCenter(new b());
3312
3667
  e.geometry.translate(-o.x, -o.y, -o.z);
3313
3668
  }
3314
3669
  }
3315
- const Xe = (e, t, o, n, r = 24) => {
3316
- let a = [];
3317
- for (let s = 0; s <= r; s++) {
3318
- const i = s / r, c = F.CUBIC(i, e.x, t.x, o.x, n.x), l = F.CUBIC(i, e.y, t.y, o.y, n.y);
3319
- a.push(new b(c, l));
3670
+ const to = (e, t, o, n, r = 24) => {
3671
+ let s = [];
3672
+ for (let a = 0; a <= r; a++) {
3673
+ const i = a / r, c = F.CUBIC(i, e.x, t.x, o.x, n.x), l = F.CUBIC(i, e.y, t.y, o.y, n.y);
3674
+ s.push(new I(c, l));
3320
3675
  }
3321
- return a;
3322
- }, Ze = (e, t, o, n = 24) => {
3676
+ return s;
3677
+ }, eo = (e, t, o, n = 24) => {
3323
3678
  let r = [];
3324
- for (let a = 0; a <= n; a++) {
3325
- const s = a / n, i = F.DAMPED(s, o) * (t.x - e.x) + e.x, c = e.y + s * (t.y - e.y);
3326
- r.push(new b(i, c));
3679
+ for (let s = 0; s <= n; s++) {
3680
+ const a = s / n, i = F.DAMPED(a, o) * (t.x - e.x) + e.x, c = e.y + a * (t.y - e.y);
3681
+ r.push(new I(i, c));
3327
3682
  }
3328
3683
  return r;
3329
- }, je = (e, t, o, n, r = 24) => {
3330
- let a = [];
3331
- for (let s = 0; s <= r; s++) {
3332
- const i = s / r, c = F.EXPONENTIAL(i, o, n) * (t.x - e.x) + e.x, l = e.y + i * (t.y - e.y);
3333
- a.push(new b(c, l));
3334
- }
3335
- return a;
3336
- }, Ye = (e, t, o, n, r = 24) => {
3337
- let a = [];
3338
- for (let s = 0; s <= r; s++) {
3339
- const i = s / r, c = F.LOGARITHMIC(i, o, n) * (t.x - e.x) + e.x, l = e.y + i * (t.y - e.y);
3340
- a.push(new b(c, l));
3684
+ }, oo = (e, t, o, n, r = 24) => {
3685
+ let s = [];
3686
+ for (let a = 0; a <= r; a++) {
3687
+ const i = a / r, c = F.EXPONENTIAL(i, o, n) * (t.x - e.x) + e.x, l = e.y + i * (t.y - e.y);
3688
+ s.push(new I(c, l));
3341
3689
  }
3342
- return a;
3343
- }, He = (e, t, o, n, r, a = 24) => {
3690
+ return s;
3691
+ }, no = (e, t, o, n, r = 24) => {
3344
3692
  let s = [];
3345
- for (let i = 0; i <= a; i++) {
3346
- const c = i / a, l = o * c * c + n * c + r + e.x, u = e.y + c * (t.y - e.y);
3347
- s.push(new b(l, u));
3693
+ for (let a = 0; a <= r; a++) {
3694
+ const i = a / r, c = F.LOGARITHMIC(i, o, n) * (t.x - e.x) + e.x, l = e.y + i * (t.y - e.y);
3695
+ s.push(new I(c, l));
3348
3696
  }
3349
3697
  return s;
3350
- }, Qe = (e, t, o, n = 24) => {
3698
+ }, so = (e, t, o, n, r, s = 24) => {
3699
+ let a = [];
3700
+ for (let i = 0; i <= s; i++) {
3701
+ const c = i / s, l = o * c * c + n * c + r + e.x, u = e.y + c * (t.y - e.y);
3702
+ a.push(new I(l, u));
3703
+ }
3704
+ return a;
3705
+ }, ro = (e, t, o, n = 24) => {
3351
3706
  let r = [];
3352
- for (let a = 0; a <= n; a++) {
3353
- const s = a / n, i = F.QUADRATIC(s, e.x, t.x, o.x), c = F.QUADRATIC(s, e.y, t.y, o.y);
3354
- r.push(new b(i, c));
3707
+ for (let s = 0; s <= n; s++) {
3708
+ const a = s / n, i = F.QUADRATIC(a, e.x, t.x, o.x), c = F.QUADRATIC(a, e.y, t.y, o.y);
3709
+ r.push(new I(i, c));
3355
3710
  }
3356
3711
  return r;
3357
- }, Ke = (e, t, o, n = 24) => {
3712
+ }, ao = (e, t, o, n = 24) => {
3358
3713
  let r = [];
3359
- for (let a = 0; a <= n; a++) {
3360
- const s = a / n, i = F.SIGMOID(s, o) * (t.x - e.x) + e.x, c = e.y + s * (t.y - e.y);
3361
- r.push(new b(i, c));
3714
+ for (let s = 0; s <= n; s++) {
3715
+ const a = s / n, i = F.SIGMOID(a, o) * (t.x - e.x) + e.x, c = e.y + a * (t.y - e.y);
3716
+ r.push(new I(i, c));
3362
3717
  }
3363
3718
  return r;
3364
- }, Cn = {
3365
- createCubicCurvePoints: Xe,
3366
- createDampedCurvePoints: Ze,
3367
- createExponentialCurvePoints: je,
3368
- createLogarithmicCurvePoints: Ye,
3369
- createParabolicCurvePoints: He,
3370
- createQuadraticCurvePoints: Qe,
3371
- createSigmoidCurvePoints: Ke
3719
+ }, os = {
3720
+ createCubicCurvePoints: to,
3721
+ createDampedCurvePoints: eo,
3722
+ createExponentialCurvePoints: oo,
3723
+ createLogarithmicCurvePoints: no,
3724
+ createParabolicCurvePoints: so,
3725
+ createQuadraticCurvePoints: ro,
3726
+ createSigmoidCurvePoints: ao
3372
3727
  };
3728
+ function ns(e, t, o, n, r, s = [0, 0], a = [1, 0], i = [0, 1], c = [1, 1]) {
3729
+ const l = r || io(e, t, o);
3730
+ return [
3731
+ // Triangle 1
3732
+ { pos: e, norm: l, uv: s },
3733
+ { pos: t, norm: l, uv: a },
3734
+ { pos: n, norm: l, uv: c },
3735
+ // Triangle 2
3736
+ { pos: e, norm: l, uv: s },
3737
+ { pos: n, norm: l, uv: c },
3738
+ { pos: o, norm: l, uv: i }
3739
+ ];
3740
+ }
3741
+ function io(e, t, o) {
3742
+ const n = [
3743
+ t[0] - e[0],
3744
+ t[1] - e[1],
3745
+ t[2] - e[2]
3746
+ ], r = [
3747
+ o[0] - e[0],
3748
+ o[1] - e[1],
3749
+ o[2] - e[2]
3750
+ ], s = [
3751
+ n[1] * r[2] - n[2] * r[1],
3752
+ n[2] * r[0] - n[0] * r[2],
3753
+ n[0] * r[1] - n[1] * r[0]
3754
+ ], a = Math.sqrt(s[0] ** 2 + s[1] ** 2 + s[2] ** 2);
3755
+ return s.map((i) => i / a);
3756
+ }
3757
+ function ss(e, t) {
3758
+ return e.map(([o, n, r]) => {
3759
+ switch (t) {
3760
+ case "x":
3761
+ return [n, r];
3762
+ case "y":
3763
+ return [o, r];
3764
+ case "z":
3765
+ return [o, n];
3766
+ default:
3767
+ throw new Error(`Invalid axis: ${t}`);
3768
+ }
3769
+ });
3770
+ }
3771
+ function co(e) {
3772
+ const [t, o, n] = e, r = Math.abs(t), s = Math.abs(o), a = Math.abs(n);
3773
+ return r >= s && r >= a ? [n > 0 ? n : -n, o] : s >= r && s >= a ? [t, n > 0 ? n : -n] : [t, o];
3774
+ }
3775
+ function rs(e) {
3776
+ return e.map((t) => co(t));
3777
+ }
3778
+ function as(e) {
3779
+ return e.map(([t, o, n]) => {
3780
+ const r = Math.atan2(n, t), s = Math.acos(o / Math.sqrt(t ** 2 + o ** 2 + n ** 2)), a = r / (2 * Math.PI) + 0.5, i = 1 - s / Math.PI;
3781
+ return [a, i];
3782
+ });
3783
+ }
3784
+ function is(e) {
3785
+ return e.map(([t, o, n]) => [Math.atan2(n, t) / (2 * Math.PI) + 0.5, o]);
3786
+ }
3787
+ function cs(e) {
3788
+ return e.map(([t, o, n]) => {
3789
+ const r = Math.sqrt(t ** 2 + n ** 2);
3790
+ return [Math.atan2(n, t) / (2 * Math.PI) + 0.5, r];
3791
+ });
3792
+ }
3793
+ function lo(e, t, o, n, r) {
3794
+ return [
3795
+ (e[0] - t) / (o - t),
3796
+ (e[1] - n) / (r - n)
3797
+ ];
3798
+ }
3799
+ function ls(e, t, o) {
3800
+ const [n, r] = t, [s, a] = o;
3801
+ return e.map((i) => lo(i, n, s, r, a));
3802
+ }
3803
+ function us(e) {
3804
+ const t = Math.min(...e.map((s) => s[0])), o = Math.max(...e.map((s) => s[0])), n = Math.min(...e.map((s) => s[1])), r = Math.max(...e.map((s) => s[1]));
3805
+ return {
3806
+ minBounds: [t, n],
3807
+ maxBounds: [o, r]
3808
+ };
3809
+ }
3373
3810
  export {
3374
- xn as AtmosphericSkybox,
3375
- Zo as Beaker,
3376
- Ce as BeakerGeometry,
3377
- vo as BifurcatedStaircaseGeometry,
3378
- mn as Bone,
3379
- Ge as BoneGeometry,
3380
- Go as Book,
3381
- ft as BookGeometry,
3382
- Fo as Bookshelf,
3383
- Ee as BookshelfGeometry,
3384
- jo as Bottle,
3385
- fo as BubblingEffect,
3386
- Yo as BunsenBurner,
3387
- an as Burst,
3388
- Re as BurstShape,
3389
- Lo as Candle,
3390
- Co as CrossHeadstone,
3391
- xe as CrossHeadstoneGeometry,
3392
- gn as DaySkybox,
3393
- Ro as Desk,
3394
- xo as DioramaGeometry,
3395
- q as Direction,
3396
- ho as Easing,
3397
- Ho as ElectricPanel,
3398
- de as EllipticLeafGeometry,
3399
- Qo as ErlenmeyerFlask,
3400
- Be as ErlenmeyerFlaskGeometry,
3811
+ Fn as AtmosphericSkybox,
3812
+ ut as Axis,
3813
+ _o as BifurcatedStaircaseGeometry,
3814
+ Gn as Bone,
3815
+ Ue as BoneGeometry,
3816
+ Xo as Book,
3817
+ yt as BookGeometry,
3818
+ tn as Bookshelf,
3819
+ Ce as BookshelfGeometry,
3820
+ cn as Bottle,
3821
+ Po as BubblingEffect,
3822
+ ln as BunsenBurner,
3823
+ An as Burst,
3824
+ Xe as BurstShape,
3825
+ on as Candle,
3826
+ mt as ColorPalette,
3827
+ Yo as CrossHeadstone,
3828
+ Ee as CrossHeadstoneGeometry,
3829
+ Ln as DaySkybox,
3830
+ en as Desk,
3831
+ Be as DeskGeometry,
3832
+ Oo as DioramaGeometry,
3833
+ tt as Direction,
3834
+ So as Easing,
3835
+ un as ElectricPanel,
3836
+ ve as EllipticLeafGeometry,
3837
+ To as EmissivePulseEffect,
3838
+ hn as ErlenmeyerFlask,
3839
+ _e as ErlenmeyerFlaskGeometry,
3401
3840
  K as Falloff,
3402
- No as FenceColumn,
3403
- Ie as FenceColumnGeometry,
3404
- Ko as Flask,
3405
- cn as Gear,
3406
- Le as GearShape,
3407
- ln as Heart,
3408
- qe as HeartShape,
3409
- fn as Hill,
3410
- Ne as HillGeometry,
3411
- go as LShapedStaircaseGeometry,
3412
- qo as Lantern,
3413
- po as LeafEffect,
3414
- $o as LeverPanel,
3415
- Bo as Mausoleum,
3416
- Jo as Microscope,
3417
- To as Moon,
3418
- Wo as MortarAndPestle,
3419
- Ue as MortarGeometry,
3420
- Do as MossyRocks,
3421
- pn as Mound,
3422
- _e as MoundGeometry,
3423
- bn as NightSkybox,
3424
- Uo as ObeliskHeadstone,
3425
- ge as ObeliskHeadstoneGeometry,
3841
+ $o as FenceColumn,
3842
+ Te as FenceColumnGeometry,
3843
+ mn as Flask,
3844
+ fn as FlorenceFlask,
3845
+ Oe as FlorenceFlaskGeometry,
3846
+ Sn as Gear,
3847
+ Ye as GearShape,
3848
+ Pn as Heart,
3849
+ Ze as HeartShape,
3850
+ Bn as Hill,
3851
+ ke as HillGeometry,
3852
+ zo as LShapedStaircaseGeometry,
3853
+ nn as Lantern,
3854
+ Go as LeafEffect,
3855
+ dn as LeverPanel,
3856
+ Ro as LightningEffect,
3857
+ Zo as Mausoleum,
3858
+ pn as Microscope,
3859
+ Ho as Moon,
3860
+ Mn as MortarAndPestle,
3861
+ ze as MortarGeometry,
3862
+ sn as MossyRocks,
3863
+ Rn as Mound,
3864
+ qe as MoundGeometry,
3865
+ kn as NightSkybox,
3866
+ jo as ObeliskHeadstone,
3867
+ Ae as ObeliskHeadstoneGeometry,
3868
+ yn as Panel,
3869
+ wn as PanelLight,
3426
3870
  F as ParametricCurve,
3427
- Cn as ParametricCurveUtils,
3428
- Vo as Rock,
3429
- Te as RockGeometry,
3430
- Xo as Rocks,
3431
- zo as RoundedHeadstone,
3432
- be as RoundedHeadstoneGeometry,
3433
- bo as SpiralStaircaseGeometry,
3434
- tn as SpiralTube,
3435
- ko as SquareHeadstone,
3436
- Ae as SquareHeadstoneGeometry,
3437
- Ao as StaircaseGeometry,
3438
- en as Stand,
3439
- ze as StandGeometry,
3440
- un as Star,
3441
- De as StarShape,
3442
- on as TeslaCoil,
3443
- nn as TestTube,
3444
- st as TestTubeGeometry,
3445
- sn as TestTubeRack,
3446
- hn as Tree,
3447
- Fe as TreeGeometry,
3448
- rn as WineBottle,
3449
- ke as WineBottleGeometry,
3450
- Oo as WroughtIronBar,
3451
- yt as WroughtIronBarGeometry,
3452
- _o as WroughtIronFence,
3453
- Se as WroughtIronFenceGeometry,
3454
- wn as addNoiseDisplacement,
3455
- dn as addWaterDisplacement,
3456
- et as atmosphericShader,
3457
- Oe as capHeightFromRadius,
3458
- So as capWidthFromRadius,
3459
- Po as cartesianToSpherical,
3460
- In as centerGroup,
3461
- Sn as centerGroupAtTarget,
3462
- En as centerInstancedMesh,
3463
- Tn as centerMesh,
3464
- Gn as centerMeshGeometry,
3465
- An as checkerboardTexture,
3466
- Kt as circularEaseIn,
3467
- Jt as circularEaseInOut,
3468
- $t as circularEaseOut,
3469
- ee as concave,
3470
- oe as convex,
3471
- Xe as createCubicCurvePoints,
3472
- Ze as createDampedCurvePoints,
3473
- je as createExponentialCurvePoints,
3474
- Ye as createLogarithmicCurvePoints,
3475
- He as createParabolicCurvePoints,
3476
- Qe as createQuadraticCurvePoints,
3477
- Ke as createSigmoidCurvePoints,
3478
- ie as cubicCurve,
3479
- Ft as cubicEaseIn,
3480
- Lt as cubicEaseInOut,
3481
- Rt as cubicEaseOut,
3482
- ce as dampedCurve,
3483
- ot as daySkyShader,
3484
- ao as displacementBrush,
3485
- We as dollyAnimation,
3486
- le as exponentialCurve,
3487
- Yt as exponentialEaseIn,
3488
- Qt as exponentialEaseInOut,
3489
- Ht as exponentialEaseOut,
3490
- vn as fadeShader,
3491
- io as flattenBrush,
3492
- to as flythroughAnimation,
3493
- ae as gaussian,
3494
- Pn as interpolateCurve,
3495
- re as inverse,
3496
- Wt as linear,
3497
- ne as logarithmic,
3498
- ue as logarithmicCurve,
3499
- Me as logarithmicRandomMax,
3500
- ve as logarithmicRandomMin,
3501
- nt as nightSkyShader,
3502
- co as noiseBrush,
3503
- eo as orbitAnimation,
3504
- me as parabolicCurve,
3505
- oo as pendulumAnimation,
3506
- he as quadraticCurve,
3507
- Nt as quadraticEaseIn,
3508
- _t as quadraticEaseInOut,
3509
- Ot as quadraticEaseOut,
3510
- qt as quarticEaseIn,
3511
- Vt as quarticEaseInOut,
3512
- Dt as quarticEaseOut,
3513
- Xt as quinticEaseIn,
3514
- jt as quinticEaseInOut,
3515
- Zt as quinticEaseOut,
3516
- Io as radiusFromCapHeight,
3517
- wt as radiusFromCapWidth,
3518
- we as randomFloat,
3519
- yo as randomInteger,
3520
- Pe as randomTransformVertices,
3521
- wo as rowOfBooksByCount,
3522
- Mo as rowOfBooksByLength,
3523
- dt as rowOfBooksByScales,
3524
- fe as sigmoidCurve,
3525
- Ut as sineEaseIn,
3526
- kt as sineEaseInOut,
3871
+ os as ParametricCurveUtils,
3872
+ rn as Rock,
3873
+ Ne as RockGeometry,
3874
+ an as Rocks,
3875
+ Qo as RoundedHeadstone,
3876
+ Se as RoundedHeadstoneGeometry,
3877
+ Fo as SpiralStaircaseGeometry,
3878
+ vn as SpiralTube,
3879
+ Ko as SquareHeadstone,
3880
+ Pe as SquareHeadstoneGeometry,
3881
+ Lo as StaircaseGeometry,
3882
+ xn as Stand,
3883
+ Fe as StandGeometry,
3884
+ Tn as Star,
3885
+ je as StarShape,
3886
+ gn as TeslaCoil,
3887
+ bn as TestTube,
3888
+ rt as TestTubeGeometry,
3889
+ In as TestTubeRack,
3890
+ Cn as Tree,
3891
+ Ve as TreeGeometry,
3892
+ En as WineBottle,
3893
+ Le as WineBottleGeometry,
3894
+ Jo as WroughtIronBar,
3895
+ xt as WroughtIronBarGeometry,
3896
+ Wo as WroughtIronFence,
3897
+ Ge as WroughtIronFenceGeometry,
3898
+ _n as addNoiseDisplacement,
3899
+ Nn as addWaterDisplacement,
3900
+ ot as atmosphericShader,
3901
+ Je as calculateChannelDifference,
3902
+ $e as calculateDistance,
3903
+ io as calculateNormal,
3904
+ us as calculateUVBounds,
3905
+ De as capHeightFromRadius,
3906
+ Do as capWidthFromRadius,
3907
+ Vo as cartesianToSpherical,
3908
+ Kn as centerGroup,
3909
+ $n as centerGroupAtTarget,
3910
+ Jn as centerInstancedMesh,
3911
+ ts as centerMesh,
3912
+ es as centerMeshGeometry,
3913
+ Dn as checkerboardTexture,
3914
+ te as circularEaseIn,
3915
+ oe as circularEaseInOut,
3916
+ ee as circularEaseOut,
3917
+ re as concave,
3918
+ ae as convex,
3919
+ to as createCubicCurvePoints,
3920
+ eo as createDampedCurvePoints,
3921
+ oo as createExponentialCurvePoints,
3922
+ no as createLogarithmicCurvePoints,
3923
+ so as createParabolicCurvePoints,
3924
+ ns as createQuad,
3925
+ ro as createQuadraticCurvePoints,
3926
+ ao as createSigmoidCurvePoints,
3927
+ he as cubicCurve,
3928
+ qt as cubicEaseIn,
3929
+ Ht as cubicEaseInOut,
3930
+ Vt as cubicEaseOut,
3931
+ co as cubicUVMapping,
3932
+ rs as cubicUVMappingBatch,
3933
+ is as cylindricalUVMapping,
3934
+ me as dampedCurve,
3935
+ nt as daySkyShader,
3936
+ xo as displacementBrush,
3937
+ mo as dollyAnimation,
3938
+ fe as exponentialCurve,
3939
+ $t as exponentialEaseIn,
3940
+ Wt as exponentialEaseInOut,
3941
+ Jt as exponentialEaseOut,
3942
+ zn as fadeShader,
3943
+ Zn as findClosestColor,
3944
+ jn as findClosestColorChannelWise,
3945
+ go as flattenBrush,
3946
+ fo as flythroughAnimation,
3947
+ ue as gaussian,
3948
+ Qn as getAnalogousColors,
3949
+ Vn as hexToHsl,
3950
+ X as hexToRgb,
3951
+ Hn as hslToHex,
3952
+ Qe as hslToRgb,
3953
+ Wn as interpolateCurve,
3954
+ le as inverse,
3955
+ ne as linear,
3956
+ ie as logarithmic,
3957
+ de as logarithmicCurve,
3958
+ xe as logarithmicRandomMax,
3959
+ ge as logarithmicRandomMin,
3960
+ He as moonShader,
3961
+ st as nightSkyShader,
3962
+ bo as noiseBrush,
3963
+ Xn as normalizeRgb,
3964
+ lo as normalizeUV,
3965
+ ls as normalizeUVBatch,
3966
+ po as orbitAnimation,
3967
+ pe as parabolicCurve,
3968
+ qn as parseHexCode,
3969
+ Mo as pendulumAnimation,
3970
+ ss as planarUVMapping,
3971
+ cs as polarUVMapping,
3972
+ Me as quadraticCurve,
3973
+ Lt as quadraticEaseIn,
3974
+ Dt as quadraticEaseInOut,
3975
+ kt as quadraticEaseOut,
3976
+ Xt as quarticEaseIn,
3977
+ Zt as quarticEaseInOut,
3978
+ Yt as quarticEaseOut,
3979
+ jt as quinticEaseIn,
3980
+ Kt as quinticEaseInOut,
3981
+ Qt as quinticEaseOut,
3982
+ ko as radiusFromCapHeight,
3983
+ gt as radiusFromCapWidth,
3984
+ Mt as randomFloat,
3985
+ Co as randomInteger,
3986
+ Re as randomTransformVertices,
3987
+ Yn as rgbToHex,
3988
+ Ke as rgbToHsl,
3989
+ No as rowOfBooksByCount,
3990
+ Uo as rowOfBooksByLength,
3991
+ vt as rowOfBooksByScales,
3992
+ Bo as setRandomInterval,
3993
+ be as setRandomTimeout,
3994
+ ye as sigmoidCurve,
3995
+ Ot as sineEaseIn,
3996
+ Ft as sineEaseInOut,
3527
3997
  zt as sineEaseOut,
3528
- lo as smoothBrush,
3529
- te as smoothstep,
3530
- Eo as sphericalToCartesian,
3531
- uo as spikeBrush,
3532
- no as spiralAscensionAnimation,
3533
- se as squareRoot,
3534
- mo as twistBrush,
3535
- Mn as updateNoiseDisplacementTime,
3536
- yn as updateWaterDisplacementTime,
3537
- so as wobbleAnimation,
3538
- ro as zoomInAnimation
3998
+ Io as smoothBrush,
3999
+ se as smoothstep,
4000
+ qo as sphericalToCartesian,
4001
+ as as sphericalUVMapping,
4002
+ Eo as spikeBrush,
4003
+ yo as spiralAscensionAnimation,
4004
+ ce as squareRoot,
4005
+ Ao as twistBrush,
4006
+ On as updateNoiseDisplacementTime,
4007
+ Un as updateWaterDisplacementTime,
4008
+ wo as wobbleAnimation,
4009
+ vo as zoomInAnimation
3539
4010
  };
3540
4011
  //# sourceMappingURL=index.es.js.map