three-low-poly 0.9.9 → 0.9.10

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,10 +1,10 @@
1
- import { Vector3 as M, MathUtils as H, Quaternion as le, Group as P, SphereGeometry as B, MeshStandardMaterial as w, Mesh as h, BufferGeometry as v, Float32BufferAttribute as U, BufferAttribute as Z, BoxGeometry as g, ConeGeometry as _, CylinderGeometry as G, Vector2 as b, LatheGeometry as L, CircleGeometry as me, TorusGeometry as oe, DodecahedronGeometry as j, ShaderMaterial as K, Shape as q, ExtrudeGeometry as O, MeshBasicMaterial as ue, PointLight as se, MeshPhysicalMaterial as D, DoubleSide as z, CatmullRomCurve3 as fe, TubeGeometry as he, LineBasicMaterial as pe, Line as de, Path as we, Color as $, BackSide as ne, DataTexture as ye, RGBAFormat as xe, UnsignedByteType as Me, RepeatWrapping as W, NearestFilter as ve, Box3 as ge } from "three";
2
- import { mergeGeometries as A, mergeVertices as Se } from "three/addons/utils/BufferGeometryUtils.js";
3
- import { Sky as be } from "three/addons/objects/Sky.js";
4
- import { EffectComposer as Ge } from "three/addons/postprocessing/EffectComposer.js";
5
- import { RenderPass as ee } from "three/addons/postprocessing/RenderPass.js";
6
- import { ShaderPass as Ie } from "three/addons/postprocessing/ShaderPass.js";
7
- const F = {
1
+ import { Vector3 as M, MathUtils as D, Quaternion as de, Group as P, SphereGeometry as k, MeshStandardMaterial as w, Mesh as h, BufferGeometry as v, BufferAttribute as Y, BoxGeometry as g, InstancedMesh as pe, Matrix4 as W, Float32BufferAttribute as U, ConeGeometry as L, CylinderGeometry as S, Vector2 as b, LatheGeometry as q, CircleGeometry as we, TorusGeometry as se, DodecahedronGeometry as j, ShaderMaterial as K, Shape as O, ExtrudeGeometry as V, MeshBasicMaterial as ye, PointLight as re, MeshPhysicalMaterial as R, DoubleSide as _, CatmullRomCurve3 as xe, TubeGeometry as Me, LineBasicMaterial as ve, Line as ge, Path as be, Color as ee, BackSide as ae, DataTexture as Se, RGBAFormat as Ge, UnsignedByteType as Ie, RepeatWrapping as te, NearestFilter as Pe, Box3 as J } from "three";
2
+ import { mergeGeometries as A, mergeVertices as Ae } from "three/addons/utils/BufferGeometryUtils.js";
3
+ import { Sky as Be } from "three/addons/objects/Sky.js";
4
+ import { EffectComposer as ke } from "three/addons/postprocessing/EffectComposer.js";
5
+ import { RenderPass as oe } from "three/addons/postprocessing/RenderPass.js";
6
+ import { ShaderPass as Te } from "three/addons/postprocessing/ShaderPass.js";
7
+ const z = {
8
8
  UP: new M(0, 1, 0),
9
9
  DOWN: new M(0, -1, 0),
10
10
  LEFT: new M(-1, 0, 0),
@@ -18,840 +18,326 @@ const F = {
18
18
  XZ: new M(1, 0, 1).normalize(),
19
19
  YZ: new M(0, 1, 1).normalize(),
20
20
  XYZ: new M(1, 1, 1).normalize()
21
- }, V = {
22
- LINEAR: (l, e) => 1 - l / e,
23
- QUADRATIC: (l, e) => Math.pow(1 - l / e, 2),
24
- SQUARE_ROOT: (l, e) => Math.pow(1 - l / e, 0.5),
25
- LOGARITHMIC: (l, e) => Math.log(1 + (e - l)) / Math.log(1 + e),
26
- SINE: (l, e) => Math.cos(l / e * Math.PI / 2),
27
- EXPONENTIAL: (l, e) => Math.exp(-l / e),
28
- CUBIC: (l, e) => Math.pow(1 - l / e, 3),
29
- GAUSSIAN: (l, e) => Math.exp(-Math.pow(l, 2) / (2 * Math.pow(e / 3, 2))),
30
- INVERSE: (l, e) => e / (e + l),
31
- SMOOTHSTEP: (l, e) => {
32
- const t = Math.max(0, Math.min(1, 1 - l / e));
21
+ }, X = {
22
+ LINEAR: (r, e) => 1 - r / e,
23
+ QUADRATIC: (r, e) => Math.pow(1 - r / e, 2),
24
+ SQUARE_ROOT: (r, e) => Math.pow(1 - r / e, 0.5),
25
+ LOGARITHMIC: (r, e) => Math.log(1 + (e - r)) / Math.log(1 + e),
26
+ SINE: (r, e) => Math.cos(r / e * Math.PI / 2),
27
+ EXPONENTIAL: (r, e) => Math.exp(-r / e),
28
+ CUBIC: (r, e) => Math.pow(1 - r / e, 3),
29
+ GAUSSIAN: (r, e) => Math.exp(-Math.pow(r, 2) / (2 * Math.pow(e / 3, 2))),
30
+ INVERSE: (r, e) => e / (e + r),
31
+ SMOOTHSTEP: (r, e) => {
32
+ const t = Math.max(0, Math.min(1, 1 - r / e));
33
33
  return t * t * (3 - 2 * t);
34
34
  }
35
- }, st = (l, e, t, o, n = F.UP, a = V.LINEAR) => {
36
- const s = l.attributes.position;
37
- for (let r = 0; r < s.count; r++) {
38
- const c = new M();
39
- c.fromBufferAttribute(s, r);
40
- const i = c.distanceTo(e);
41
- if (i < t) {
42
- const u = a(i, t) * o;
43
- c.add(n.clone().multiplyScalar(u)), s.setXYZ(r, c.x, c.y, c.z);
44
- }
45
- }
46
- s.needsUpdate = !0;
47
- }, nt = (l, e, t, o, n, a = F.UP, s = V.LINEAR) => {
48
- const r = l.attributes.position;
49
- for (let c = 0; c < r.count; c++) {
35
+ }, mt = (r, e, t, o, s = z.UP, c = X.LINEAR) => {
36
+ const n = r.attributes.position;
37
+ for (let a = 0; a < n.count; a++) {
50
38
  const i = new M();
51
- i.fromBufferAttribute(r, c);
52
- const m = i.distanceTo(e);
53
- if (m < t) {
54
- const f = s(m, t) * n, d = i.dot(a.normalize()), p = o - d;
55
- i.add(a.clone().multiplyScalar(p * f)), r.setXYZ(c, i.x, i.y, i.z);
39
+ i.fromBufferAttribute(n, a);
40
+ const l = i.distanceTo(e);
41
+ if (l < t) {
42
+ const u = c(l, t) * o;
43
+ i.add(s.clone().multiplyScalar(u)), n.setXYZ(a, i.x, i.y, i.z);
56
44
  }
57
45
  }
58
- r.needsUpdate = !0;
59
- }, rt = (l, e, t, o, n = F.UP, a = V.LINEAR) => {
60
- const s = l.attributes.position;
61
- for (let r = 0; r < s.count; r++) {
62
- const c = new M();
63
- c.fromBufferAttribute(s, r);
64
- const i = c.distanceTo(e);
65
- if (i < t) {
66
- const m = a(i, t), u = o * m, f = n.clone().normalize();
67
- c.x += H.randFloatSpread(u) * f.x, c.y += H.randFloatSpread(u) * f.y, c.z += H.randFloatSpread(u) * f.z, s.setXYZ(r, c.x, c.y, c.z);
46
+ n.needsUpdate = !0;
47
+ }, ut = (r, e, t, o, s, c = z.UP, n = X.LINEAR) => {
48
+ const a = r.attributes.position;
49
+ for (let i = 0; i < a.count; i++) {
50
+ const l = new M();
51
+ l.fromBufferAttribute(a, i);
52
+ const m = l.distanceTo(e);
53
+ if (m < t) {
54
+ const f = n(m, t) * s, p = l.dot(c.normalize()), d = o - p;
55
+ l.add(c.clone().multiplyScalar(d * f)), a.setXYZ(i, l.x, l.y, l.z);
68
56
  }
69
57
  }
70
- s.needsUpdate = !0;
71
- }, at = (l, e, t, o) => {
72
- const n = l.attributes.position, a = new M();
73
- for (let s = 0; s < n.count; s++) {
74
- const r = new M();
75
- if (r.fromBufferAttribute(n, s), r.distanceTo(e) < t) {
76
- let i = new M(), m = 0;
77
- for (let u = 0; u < n.count; u++)
78
- a.fromBufferAttribute(n, u), a.distanceTo(r) < t && (i.add(a), m++);
79
- m > 0 && (i.divideScalar(m), r.lerp(i, o), n.setXYZ(s, r.x, r.y, r.z));
58
+ a.needsUpdate = !0;
59
+ }, ft = (r, e, t, o, s = z.UP, c = X.LINEAR) => {
60
+ const n = r.attributes.position;
61
+ for (let a = 0; a < n.count; a++) {
62
+ const i = new M();
63
+ i.fromBufferAttribute(n, a);
64
+ const l = i.distanceTo(e);
65
+ if (l < t) {
66
+ const m = c(l, t), u = o * m, f = s.clone().normalize();
67
+ i.x += D.randFloatSpread(u) * f.x, i.y += D.randFloatSpread(u) * f.y, i.z += D.randFloatSpread(u) * f.z, n.setXYZ(a, i.x, i.y, i.z);
80
68
  }
81
69
  }
82
70
  n.needsUpdate = !0;
83
- }, ct = (l, e, t, o, n = !1, a = V.LINEAR) => {
84
- const s = l.attributes.position;
85
- for (let r = 0; r < s.count; r++) {
86
- const c = new M();
87
- c.fromBufferAttribute(s, r);
88
- const i = c.distanceTo(e);
89
- if (i < t) {
90
- const u = a(i, t) * o * (n ? -1 : 1), f = c.clone().sub(e).normalize();
91
- c.add(f.multiplyScalar(u)), s.setXYZ(r, c.x, c.y, c.z);
71
+ }, ht = (r, e, t, o) => {
72
+ const s = r.attributes.position, c = new M();
73
+ for (let n = 0; n < s.count; n++) {
74
+ const a = new M();
75
+ if (a.fromBufferAttribute(s, n), a.distanceTo(e) < t) {
76
+ let l = new M(), m = 0;
77
+ for (let u = 0; u < s.count; u++)
78
+ c.fromBufferAttribute(s, u), c.distanceTo(a) < t && (l.add(c), m++);
79
+ m > 0 && (l.divideScalar(m), a.lerp(l, o), s.setXYZ(n, a.x, a.y, a.z));
92
80
  }
93
81
  }
94
82
  s.needsUpdate = !0;
95
- }, it = (l, e, t, o, n = F.UP, a = V.LINEAR) => {
96
- const s = l.attributes.position, r = new le();
97
- for (let c = 0; c < s.count; c++) {
83
+ }, dt = (r, e, t, o, s = !1, c = X.LINEAR) => {
84
+ const n = r.attributes.position;
85
+ for (let a = 0; a < n.count; a++) {
98
86
  const i = new M();
99
- i.fromBufferAttribute(s, c);
100
- const m = i.distanceTo(e);
87
+ i.fromBufferAttribute(n, a);
88
+ const l = i.distanceTo(e);
89
+ if (l < t) {
90
+ const u = c(l, t) * o * (s ? -1 : 1), f = i.clone().sub(e).normalize();
91
+ i.add(f.multiplyScalar(u)), n.setXYZ(a, i.x, i.y, i.z);
92
+ }
93
+ }
94
+ n.needsUpdate = !0;
95
+ }, pt = (r, e, t, o, s = z.UP, c = X.LINEAR) => {
96
+ const n = r.attributes.position, a = new de();
97
+ for (let i = 0; i < n.count; i++) {
98
+ const l = new M();
99
+ l.fromBufferAttribute(n, i);
100
+ const m = l.distanceTo(e);
101
101
  if (m < t) {
102
- const f = a(m, t) * o;
103
- r.setFromAxisAngle(n, f), i.sub(e).applyQuaternion(r).add(e), s.setXYZ(c, i.x, i.y, i.z);
102
+ const f = c(m, t) * o;
103
+ a.setFromAxisAngle(s, f), l.sub(e).applyQuaternion(a).add(e), n.setXYZ(i, l.x, l.y, l.z);
104
104
  }
105
105
  }
106
- s.needsUpdate = !0;
107
- }, lt = {
108
- LINEAR: (l) => l,
109
- QUADRATIC_EASE_IN: (l) => l * l,
110
- QUADRATIC_EASE_OUT: (l) => 1 - Math.pow(1 - l, 2),
111
- SQUARE_ROOT_EASING: (l) => Math.sqrt(l),
112
- LOGARITHMIC_EASING: (l) => Math.log(1 + l) / Math.log(2),
113
- SINE_EASE_IN: (l) => 1 - Math.cos(l * Math.PI / 2),
114
- SINE_EASE_OUT: (l) => Math.sin(l * Math.PI / 2),
115
- EXPONENTIAL_EASE_IN: (l) => Math.pow(2, 10 * (l - 1)),
116
- EXPONENTIAL_EASE_OUT: (l) => 1 - Math.pow(2, -10 * l),
117
- CUBIC_EASE_IN: (l) => l * l * l,
118
- CUBIC_EASE_OUT: (l) => 1 - Math.pow(1 - l, 3),
119
- GAUSSIAN_EASING: (l) => Math.exp(-Math.pow(l - 0.5, 2) / (2 * 0.1)),
120
- INVERSE_EASING: (l) => 1 / (1 + l),
121
- SMOOTHSTEP_EASING: (l) => l * l * (3 - 2 * l)
106
+ n.needsUpdate = !0;
107
+ }, wt = {
108
+ LINEAR: (r) => r,
109
+ QUADRATIC_EASE_IN: (r) => r * r,
110
+ QUADRATIC_EASE_OUT: (r) => 1 - Math.pow(1 - r, 2),
111
+ SQUARE_ROOT_EASING: (r) => Math.sqrt(r),
112
+ LOGARITHMIC_EASING: (r) => Math.log(1 + r) / Math.log(2),
113
+ SINE_EASE_IN: (r) => 1 - Math.cos(r * Math.PI / 2),
114
+ SINE_EASE_OUT: (r) => Math.sin(r * Math.PI / 2),
115
+ EXPONENTIAL_EASE_IN: (r) => Math.pow(2, 10 * (r - 1)),
116
+ EXPONENTIAL_EASE_OUT: (r) => 1 - Math.pow(2, -10 * r),
117
+ CUBIC_EASE_IN: (r) => r * r * r,
118
+ CUBIC_EASE_OUT: (r) => 1 - Math.pow(1 - r, 3),
119
+ GAUSSIAN_EASING: (r) => Math.exp(-Math.pow(r - 0.5, 2) / (2 * 0.1)),
120
+ INVERSE_EASING: (r) => 1 / (1 + r),
121
+ SMOOTHSTEP_EASING: (r) => r * r * (3 - 2 * r)
122
122
  };
123
- class mt extends P {
123
+ class yt extends P {
124
124
  constructor() {
125
125
  super();
126
- const e = [], t = 20, o = new B(0.1, 6, 6), n = new w({
126
+ const e = [], t = 20, o = new k(0.1, 6, 6), s = new w({
127
127
  color: 16777215,
128
128
  transparent: !0,
129
129
  opacity: 0.6,
130
130
  roughness: 0.3,
131
131
  metalness: 0.3
132
132
  });
133
- for (let r = 0; r < t; r++) {
134
- const c = new h(o, n);
135
- c.position.set(
133
+ for (let a = 0; a < t; a++) {
134
+ const i = new h(o, s);
135
+ i.position.set(
136
136
  (Math.random() - 0.5) * 1.5,
137
137
  // Random x position within flask
138
138
  Math.random() * 3,
139
139
  // Random y position within flask height
140
140
  (Math.random() - 0.5) * 1.5
141
141
  // Random z position within flask
142
- ), e.push(c), this.add(c);
142
+ ), e.push(i), this.add(i);
143
143
  }
144
- function a() {
145
- e.forEach((r) => {
146
- r.position.y += 0.02, r.position.y > 3 && (r.position.y = 0, r.position.x = (Math.random() - 0.5) * 1.5, r.position.z = (Math.random() - 0.5) * 1.5);
144
+ function c() {
145
+ e.forEach((a) => {
146
+ a.position.y += 0.02, a.position.y > 3 && (a.position.y = 0, a.position.x = (Math.random() - 0.5) * 1.5, a.position.z = (Math.random() - 0.5) * 1.5);
147
147
  });
148
148
  }
149
- function s() {
150
- requestAnimationFrame(s), a();
149
+ function n() {
150
+ requestAnimationFrame(n), c();
151
151
  }
152
- s();
153
- }
154
- }
155
- class ut extends v {
156
- constructor(e = 2, t = 0.3, o = 0.6, n = 5, a = 5, s = Math.PI / 4) {
157
- super();
158
- const r = [], c = [];
159
- for (let d = 0; d < n; d++) {
160
- const p = d * t, x = p + t, y = d * o, I = y + o;
161
- r.push(
162
- // Vertical riser
163
- -e / 2,
164
- p,
165
- y,
166
- // Bottom-left
167
- e / 2,
168
- p,
169
- y,
170
- // Bottom-right
171
- e / 2,
172
- x,
173
- y,
174
- // Top-right
175
- -e / 2,
176
- x,
177
- y,
178
- // Top-left
179
- // Horizontal tread
180
- -e / 2,
181
- x,
182
- y,
183
- // Top-left
184
- e / 2,
185
- x,
186
- y,
187
- // Top-right
188
- e / 2,
189
- x,
190
- I,
191
- // Back-right
192
- -e / 2,
193
- x,
194
- I
195
- // Back-left
196
- );
197
- const S = d * 8;
198
- c.push(
199
- S,
200
- S + 1,
201
- S + 2,
202
- S,
203
- S + 2,
204
- S + 3
205
- ), c.push(
206
- S + 4,
207
- S + 5,
208
- S + 6,
209
- S + 4,
210
- S + 6,
211
- S + 7
212
- );
213
- }
214
- const i = n * t, m = n * o, u = e * 2;
215
- r.push(
216
- // Landing platform (4 vertices)
217
- -u / 2,
218
- i,
219
- m,
220
- // Bottom-left
221
- u / 2,
222
- i,
223
- m,
224
- // Bottom-right
225
- u / 2,
226
- i,
227
- m + o,
228
- // Top-right
229
- -u / 2,
230
- i,
231
- m + o
232
- // Top-left
233
- );
234
- const f = n * 8;
235
- c.push(
236
- f,
237
- f + 1,
238
- f + 2,
239
- // First triangle for landing
240
- f,
241
- f + 2,
242
- f + 3
243
- // Second triangle for landing
244
- );
245
- for (let d = 0; d < 2; d++) {
246
- const p = d === 0 ? 1 : -1;
247
- for (let x = 0; x < a; x++) {
248
- const y = i + x * t, I = y + t, S = p * (u / 4), T = m + o, X = x * o * Math.cos(s), E = x * o * Math.sin(s), C = S + p * X - e / 2 * Math.cos(s), Y = S + p * X + e / 2 * Math.cos(s), N = T + E, ce = C + p * o * Math.cos(s), ie = Y + p * o * Math.cos(s), J = N + o * Math.sin(s);
249
- r.push(
250
- // Vertical riser
251
- C,
252
- y,
253
- N,
254
- // Bottom-left
255
- Y,
256
- y,
257
- N,
258
- // Bottom-right
259
- Y,
260
- I,
261
- N,
262
- // Top-right
263
- C,
264
- I,
265
- N,
266
- // Top-left
267
- // Horizontal tread
268
- C,
269
- I,
270
- N,
271
- // Top-left
272
- Y,
273
- I,
274
- N,
275
- // Top-right
276
- ie,
277
- I,
278
- J,
279
- // Back-right
280
- ce,
281
- I,
282
- J
283
- // Back-left
284
- );
285
- const k = f + 4 + d * a * 8 + x * 8;
286
- c.push(
287
- k,
288
- k + 1,
289
- k + 2,
290
- k,
291
- k + 2,
292
- k + 3
293
- ), c.push(
294
- k + 4,
295
- k + 5,
296
- k + 6,
297
- k + 4,
298
- k + 6,
299
- k + 7
300
- );
301
- }
302
- }
303
- this.setIndex(c), this.setAttribute("position", new U(r, 3)), this.computeVertexNormals();
304
- }
305
- }
306
- class ft extends v {
307
- constructor(e = 5, t = 3, o = 5, n = 0.2) {
308
- super();
309
- const a = [
310
- // Floor vertices
311
- -e / 2,
312
- 0,
313
- -o / 2,
314
- // 0
315
- e / 2,
316
- 0,
317
- -o / 2,
318
- // 1
319
- e / 2,
320
- 0,
321
- o / 2,
322
- // 2
323
- -e / 2,
324
- 0,
325
- o / 2,
326
- // 3
327
- // Back wall vertices
328
- -e / 2,
329
- 0,
330
- -o / 2,
331
- // 4
332
- e / 2,
333
- 0,
334
- -o / 2,
335
- // 5
336
- e / 2,
337
- t,
338
- -o / 2,
339
- // 6
340
- -e / 2,
341
- t,
342
- -o / 2,
343
- // 7
344
- // Left wall vertices
345
- -e / 2,
346
- 0,
347
- -o / 2,
348
- // 8
349
- -e / 2,
350
- 0,
351
- o / 2,
352
- // 9
353
- -e / 2,
354
- t,
355
- o / 2,
356
- // 10
357
- -e / 2,
358
- t,
359
- -o / 2
360
- // 11
361
- ], s = [
362
- // Floor
363
- 0,
364
- 1,
365
- 2,
366
- 0,
367
- 2,
368
- 3,
369
- // Back wall
370
- 4,
371
- 5,
372
- 6,
373
- 4,
374
- 6,
375
- 7,
376
- // Left wall
377
- 8,
378
- 9,
379
- 10,
380
- 8,
381
- 10,
382
- 11
383
- ];
384
- this.setIndex(s), this.setAttribute("position", new U(a, 3)), this.computeVertexNormals();
152
+ n();
385
153
  }
386
154
  }
387
- class ht extends v {
388
- constructor(e = 2, t = 0.3, o = 0.5, n = 5, a = 2) {
155
+ class ce extends v {
156
+ constructor(e = 1, t = 1.5, o = 0.5, s = 0.05, c = 0.05) {
389
157
  super();
390
- const s = [], r = [];
391
- for (let u = 0; u < n; u++) {
392
- const f = u * t, d = f + t, p = u * o, x = p + o;
393
- s.push(
394
- // Vertical riser
395
- -e / 2,
396
- f,
397
- p,
398
- // Bottom-left
399
- e / 2,
400
- f,
401
- p,
402
- // Bottom-right
403
- e / 2,
404
- d,
405
- p,
406
- // Top-right
407
- -e / 2,
408
- d,
409
- p,
410
- // Top-left
411
- // Horizontal tread
412
- -e / 2,
413
- d,
414
- p,
415
- // Top-left
416
- e / 2,
417
- d,
418
- p,
419
- // Top-right
420
- e / 2,
421
- d,
422
- x,
423
- // Back-right
424
- -e / 2,
425
- d,
426
- x
427
- // Back-left
428
- );
429
- const y = u * 8;
430
- r.push(
431
- y,
432
- y + 1,
433
- y + 2,
434
- y,
435
- y + 2,
436
- y + 3
437
- ), r.push(
438
- y + 4,
439
- y + 5,
440
- y + 6,
441
- y + 4,
442
- y + 6,
443
- y + 7
444
- );
445
- }
446
- const c = n * t, i = n * o;
447
- s.push(
448
- // Landing platform (4 vertices)
449
- -e / 2,
450
- c,
451
- i,
452
- // Bottom-left
453
- e / 2,
454
- c,
455
- i,
456
- // Bottom-right
457
- e / 2,
458
- c,
459
- i + a,
460
- // Top-right
461
- -e / 2,
462
- c,
463
- i + a
464
- // Top-left
465
- );
466
- const m = n * 8;
467
- r.push(
468
- m,
469
- m + 1,
470
- m + 2,
471
- // First triangle for landing
472
- m,
473
- m + 2,
474
- m + 3
475
- // Second triangle for landing
476
- );
477
- for (let u = 0; u < n; u++) {
478
- const f = c + u * t, d = f + t, p = -e / 2 - u * o, x = p - o;
479
- s.push(
480
- // Vertical riser
481
- p,
482
- f,
483
- i + a,
484
- // Bottom-left
485
- p,
486
- f,
487
- i + a - e,
488
- // Bottom-right
489
- p,
490
- d,
491
- i + a - e,
492
- // Top-right
493
- p,
494
- d,
495
- i + a,
496
- // Top-left
497
- // Horizontal tread
498
- p,
499
- d,
500
- i + a,
501
- // Top-left
502
- p,
503
- d,
504
- i + a - e,
505
- // Top-right
506
- x,
507
- d,
508
- i + a - e,
509
- // Back-right
510
- x,
511
- d,
512
- i + a
513
- // Back-left
514
- );
515
- const y = m + 4 + u * 8;
516
- r.push(
517
- y,
518
- y + 1,
519
- y + 2,
520
- y,
521
- y + 2,
522
- y + 3
523
- ), r.push(
524
- y + 4,
525
- y + 5,
526
- y + 6,
527
- y + 4,
528
- y + 6,
529
- y + 7
530
- );
531
- }
532
- this.setIndex(r), this.setAttribute("position", new U(s, 3)), this.computeVertexNormals();
533
- }
534
- }
535
- class pt extends v {
536
- constructor(e = 1, t = 0.4, o = 0.2, n = 20, a = 2, s = Math.PI / 8) {
537
- super();
538
- const r = [], c = [];
539
- let i = 0;
540
- for (let m = 0; m < n; m++) {
541
- const u = a * Math.cos(i), f = a * Math.sin(i), d = m * o, p = d + o;
542
- r.push(
543
- // Front face (vertical riser)
544
- u - e / 2 * Math.cos(i),
545
- d,
546
- f - e / 2 * Math.sin(i),
547
- // Bottom-left
548
- u + e / 2 * Math.cos(i),
549
- d,
550
- f + e / 2 * Math.sin(i),
551
- // Bottom-right
552
- u + e / 2 * Math.cos(i),
553
- p,
554
- f + e / 2 * Math.sin(i),
555
- // Top-right
556
- u - e / 2 * Math.cos(i),
557
- p,
558
- f - e / 2 * Math.sin(i)
559
- // Top-left
560
- ), r.push(
561
- // Top face (horizontal tread)
562
- u - e / 2 * Math.cos(i),
563
- p,
564
- f - e / 2 * Math.sin(i),
565
- // Top-left-front
566
- u + e / 2 * Math.cos(i),
567
- p,
568
- f + e / 2 * Math.sin(i),
569
- // Top-right-front
570
- u + e / 2 * Math.cos(i) - t * Math.sin(i),
571
- p,
572
- f + e / 2 * Math.sin(i) + t * Math.cos(i),
573
- // Back-right
574
- u - e / 2 * Math.cos(i) - t * Math.sin(i),
575
- p,
576
- f - e / 2 * Math.sin(i) + t * Math.cos(i)
577
- // Back-left
578
- );
579
- const x = m * 8;
580
- c.push(
581
- x,
582
- x + 1,
583
- x + 2,
584
- // First triangle for riser
585
- x,
586
- x + 2,
587
- x + 3
588
- // Second triangle for riser
589
- ), c.push(
590
- x + 4,
591
- x + 5,
592
- x + 6,
593
- // First triangle for tread
594
- x + 4,
595
- x + 6,
596
- x + 7
597
- // Second triangle for tread
598
- ), i += s;
599
- }
600
- this.setIndex(c), this.setAttribute("position", new U(r, 3)), this.computeVertexNormals();
601
- }
602
- }
603
- class dt extends v {
604
- constructor(e = 2, t = 0.3, o = 0.5, n = 10) {
605
- super();
606
- const a = [], s = [];
607
- for (let r = 0; r < n; r++) {
608
- const c = r * t, i = c + t, m = r * o, u = m + o;
609
- a.push(
610
- // Bottom face of riser (front face)
611
- -e / 2,
612
- c,
613
- m,
614
- // 0: Bottom-left-front
615
- e / 2,
616
- c,
617
- m,
618
- // 1: Bottom-right-front
619
- e / 2,
620
- i,
621
- m,
622
- // 2: Top-right-front
623
- -e / 2,
624
- i,
625
- m,
626
- // 3: Top-left-front
627
- // Top face of tread (horizontal step)
628
- -e / 2,
629
- i,
630
- m,
631
- // 4: Top-left-front (repeated)
632
- e / 2,
633
- i,
634
- m,
635
- // 5: Top-right-front (repeated)
636
- e / 2,
637
- i,
638
- u,
639
- // 6: Top-right-back
640
- -e / 2,
641
- i,
642
- u
643
- // 7: Top-left-back
644
- );
645
- const f = r * 8;
646
- s.push(
647
- f,
648
- f + 1,
649
- f + 2,
650
- // First triangle for riser
651
- f,
652
- f + 2,
653
- f + 3
654
- // Second triangle for riser
655
- ), s.push(
656
- f + 4,
657
- f + 6,
658
- f + 5,
659
- // First triangle for tread
660
- f + 4,
661
- f + 7,
662
- f + 6
663
- // Second triangle for tread
664
- );
665
- }
666
- this.setIndex(s), this.setAttribute("position", new U(a, 3)), this.computeVertexNormals();
667
- }
668
- }
669
- class Pe extends v {
670
- constructor(e = 1, t = 1.5, o = 0.5, n = 0.05, a = 0.05) {
671
- super();
672
- const s = e, r = t, c = o, i = n, m = a, u = [
158
+ const n = e, a = t, i = o, l = s, m = c, u = [
673
159
  // Front cover
674
160
  0,
675
161
  0,
676
162
  0,
677
- s,
163
+ n,
678
164
  0,
679
165
  0,
680
- s,
681
- r,
166
+ n,
167
+ a,
682
168
  0,
683
169
  0,
684
- r,
170
+ a,
685
171
  0,
686
172
  // Back cover
687
- s,
173
+ n,
688
174
  0,
689
- -c,
175
+ -i,
690
176
  0,
691
177
  0,
692
- -c,
178
+ -i,
693
179
  0,
694
- r,
695
- -c,
696
- s,
697
- r,
698
- -c,
180
+ a,
181
+ -i,
182
+ n,
183
+ a,
184
+ -i,
699
185
  // Spine
700
186
  0,
701
187
  0,
702
- -c,
703
- 0,
704
- 0,
188
+ -i,
705
189
  0,
706
190
  0,
707
- r,
708
191
  0,
709
192
  0,
710
- r,
711
- -c,
712
- // Inside front cover
713
- s,
193
+ a,
714
194
  0,
715
- -i,
716
- i,
717
195
  0,
196
+ a,
718
197
  -i,
719
- i,
720
- r,
721
- -i,
722
- s,
723
- r,
724
- -i,
198
+ // Inside front cover
199
+ n,
200
+ 0,
201
+ -l,
202
+ l,
203
+ 0,
204
+ -l,
205
+ l,
206
+ a,
207
+ -l,
208
+ n,
209
+ a,
210
+ -l,
725
211
  // Inside back cover
726
- i,
727
- 0,
728
- -c + i,
729
- s,
730
- 0,
731
- -c + i,
732
- s,
733
- r,
734
- -c + i,
735
- i,
736
- r,
737
- -c + i,
212
+ l,
213
+ 0,
214
+ -i + l,
215
+ n,
216
+ 0,
217
+ -i + l,
218
+ n,
219
+ a,
220
+ -i + l,
221
+ l,
222
+ a,
223
+ -i + l,
738
224
  // Inside spine
739
- i,
740
- 0,
741
- -i,
742
- i,
743
- 0,
744
- -c + i,
745
- i,
746
- r,
747
- -c + i,
748
- i,
749
- r,
750
- -i,
225
+ l,
226
+ 0,
227
+ -l,
228
+ l,
229
+ 0,
230
+ -i + l,
231
+ l,
232
+ a,
233
+ -i + l,
234
+ l,
235
+ a,
236
+ -l,
751
237
  // Front cover top
752
238
  0,
753
- r,
239
+ a,
754
240
  0,
755
- s,
756
- r,
241
+ n,
242
+ a,
757
243
  0,
758
- s,
759
- r,
760
- -i,
761
- i,
762
- r,
763
- -i,
244
+ n,
245
+ a,
246
+ -l,
247
+ l,
248
+ a,
249
+ -l,
764
250
  // Back cover top
765
251
  0,
766
- r,
767
- -c,
768
- i,
769
- r,
770
- -c + i,
771
- s,
772
- r,
773
- -c + i,
774
- s,
775
- r,
776
- -c,
252
+ a,
253
+ -i,
254
+ l,
255
+ a,
256
+ -i + l,
257
+ n,
258
+ a,
259
+ -i + l,
260
+ n,
261
+ a,
262
+ -i,
777
263
  // Spine cover top
778
264
  0,
779
- r,
265
+ a,
780
266
  0,
781
- i,
782
- r,
783
- -i,
784
- i,
785
- r,
786
- -c + i,
267
+ l,
268
+ a,
269
+ -l,
270
+ l,
271
+ a,
272
+ -i + l,
787
273
  0,
788
- r,
789
- -c,
274
+ a,
275
+ -i,
790
276
  // Front cover bottom
791
277
  0,
792
278
  0,
793
279
  0,
794
- i,
280
+ l,
795
281
  0,
796
- -i,
797
- s,
282
+ -l,
283
+ n,
798
284
  0,
799
- -i,
800
- s,
285
+ -l,
286
+ n,
801
287
  0,
802
288
  0,
803
289
  // Back cover bottom
804
290
  0,
805
291
  0,
806
- -c,
807
- s,
292
+ -i,
293
+ n,
808
294
  0,
809
- -c,
810
- s,
295
+ -i,
296
+ n,
811
297
  0,
812
- -c + i,
813
- i,
298
+ -i + l,
299
+ l,
814
300
  0,
815
- -c + i,
301
+ -i + l,
816
302
  // Spine cover bottom
817
303
  0,
818
304
  0,
819
305
  0,
820
306
  0,
821
307
  0,
822
- -c,
823
- i,
308
+ -i,
309
+ l,
824
310
  0,
825
- -c + i,
826
- i,
311
+ -i + l,
312
+ l,
827
313
  0,
828
- -i,
314
+ -l,
829
315
  // Front cover edge
830
- s,
316
+ n,
317
+ 0,
831
318
  0,
319
+ n,
832
320
  0,
833
- s,
321
+ -l,
322
+ n,
323
+ a,
324
+ -l,
325
+ n,
326
+ a,
327
+ 0,
328
+ // Back cover edge
329
+ n,
834
330
  0,
835
331
  -i,
836
- s,
837
- r,
332
+ n,
333
+ a,
838
334
  -i,
839
- s,
840
- r,
335
+ n,
336
+ a,
337
+ -i + l,
338
+ n,
841
339
  0,
842
- // Back cover edge
843
- s,
844
- 0,
845
- -c,
846
- s,
847
- r,
848
- -c,
849
- s,
850
- r,
851
- -c + i,
852
- s,
853
- 0,
854
- -c + i
340
+ -i + l
855
341
  ], f = [
856
342
  0,
857
343
  0,
@@ -1035,68 +521,68 @@ class Pe extends v {
1035
521
  0,
1036
522
  0
1037
523
  // Back cover edge
1038
- ], d = e / (e * 2 + o), p = (e + o) / (e * 2 + o), x = [
1039
- p,
524
+ ], p = e / (e * 2 + o), d = (e + o) / (e * 2 + o), x = [
525
+ d,
1040
526
  0,
1041
527
  1,
1042
528
  0,
1043
529
  1,
1044
530
  1,
1045
- p,
531
+ d,
1046
532
  1,
1047
533
  // Front cover
1048
534
  0,
1049
535
  0,
1050
- d,
536
+ p,
1051
537
  0,
1052
- d,
538
+ p,
1053
539
  1,
1054
540
  0,
1055
541
  1,
1056
- // Back cover
1057
- d,
1058
- 0,
542
+ // Back cover
1059
543
  p,
1060
544
  0,
1061
- p,
1062
- 1,
1063
545
  d,
546
+ 0,
547
+ d,
548
+ 1,
549
+ p,
1064
550
  1,
1065
551
  // Spine
1066
552
  1,
1067
553
  0,
1068
- p,
554
+ d,
1069
555
  0,
1070
- p,
556
+ d,
1071
557
  1,
1072
558
  1,
1073
559
  1,
1074
560
  // Inside front cover
1075
- d,
561
+ p,
1076
562
  0,
1077
563
  0,
1078
564
  0,
1079
565
  0,
1080
566
  1,
1081
- d,
567
+ p,
1082
568
  1,
1083
569
  // Inside back cover
1084
- p,
1085
- 0,
1086
570
  d,
1087
571
  0,
1088
- d,
1089
- 1,
1090
572
  p,
573
+ 0,
574
+ p,
575
+ 1,
576
+ d,
1091
577
  1,
1092
578
  // Inside spine
1093
- p,
579
+ d,
1094
580
  0,
1095
581
  1,
1096
582
  0,
1097
583
  1,
1098
584
  1,
1099
- p,
585
+ d,
1100
586
  1,
1101
587
  // Front cover top
1102
588
  0,
@@ -1261,141 +747,735 @@ class Pe extends v {
1261
747
  54,
1262
748
  55
1263
749
  // Back cover edge
1264
- ], I = new Float32Array(u), S = new Float32Array(f), T = new Float32Array(x), X = new Uint16Array(y), E = new v();
1265
- E.setAttribute("position", new Z(I, 3)), E.setAttribute("normal", new Z(S, 3)), E.setAttribute("uv", new Z(T, 2)), E.setIndex(new Z(X, 1));
1266
- const C = new g(e - i - m, r - m * 2, c - i * 2);
1267
- C.translate((e - i - m) / 2 + i, r / 2, -c / 2), this.copy(A([E, C], !0));
750
+ ], G = new Float32Array(u), I = new Float32Array(f), T = new Float32Array(x), E = new Uint16Array(y), C = new v();
751
+ C.setAttribute("position", new Y(G, 3)), C.setAttribute("normal", new Y(I, 3)), C.setAttribute("uv", new Y(T, 2)), C.setIndex(new Y(E, 1));
752
+ const F = new g(e - l - m, a - m * 2, i - l * 2);
753
+ F.translate((e - l - m) / 2 + l, a / 2, -i / 2), this.copy(A([C, F], !0));
754
+ }
755
+ }
756
+ function Ee(r = 0, e = 1) {
757
+ return Math.random() * (e - r) + r;
758
+ }
759
+ function xt(r = 0, e = 1) {
760
+ return Math.floor(Math.random() * (e - r + 1)) + r;
761
+ }
762
+ function Ce(r = 0.5, e = 0, t = 1) {
763
+ return e + (t - e) * Math.pow(Math.random(), r);
764
+ }
765
+ function Fe(r = 0.5, e = 0, t = 1) {
766
+ return e + (t - e) * Math.pow(1 - Math.random(), r);
767
+ }
768
+ function ie({
769
+ scaleXMin: r = 0.4,
770
+ scaleXMax: e = 0.7,
771
+ scaleYMin: t = 0.3,
772
+ scaleYMax: o = 0.95,
773
+ scaleZMin: s = 0.1,
774
+ scaleZMax: c = 0.5
775
+ } = {}) {
776
+ return new M(
777
+ Ee(r, e),
778
+ Ce(0.25, t, o),
779
+ Fe(0.8, s, c)
780
+ );
781
+ }
782
+ function le({ coverMaterial: r, pagesMaterial: e, scales: t = [] } = {}) {
783
+ const o = new ce(), s = new pe(o, [r, e], t.length), c = new W();
784
+ let n = 0;
785
+ for (let a = 0; a < t.length; a++) {
786
+ const i = t[a], l = new W();
787
+ l.makeScale(i.x, i.y, i.z), c.identity(), c.multiply(l), c.setPosition(0.01 + Math.random() * 0.1, 0, n + i.z * 0.5), s.setMatrixAt(a, c), n += i.z * 0.5;
788
+ }
789
+ return s;
790
+ }
791
+ function Mt({
792
+ coverMaterial: r,
793
+ pagesMaterial: e,
794
+ count: t = 10,
795
+ scaleXMin: o = 0.4,
796
+ scaleXMax: s = 0.7,
797
+ scaleYMin: c = 0.3,
798
+ scaleYMax: n = 0.95,
799
+ scaleZMin: a = 0.1,
800
+ scaleZMax: i = 0.5
801
+ } = {}) {
802
+ const l = Array.from(
803
+ { length: t },
804
+ () => ie({ scaleXMin: o, scaleXMax: s, scaleYMin: c, scaleYMax: n, scaleZMin: a, scaleZMax: i })
805
+ );
806
+ return le({ coverMaterial: r, pagesMaterial: e, scales: l });
807
+ }
808
+ function vt({
809
+ coverMaterial: r,
810
+ pagesMaterial: e,
811
+ length: t = 10,
812
+ scaleXMin: o = 0.4,
813
+ scaleXMax: s = 0.7,
814
+ scaleYMin: c = 0.3,
815
+ scaleYMax: n = 0.95,
816
+ scaleZMin: a = 0.1,
817
+ scaleZMax: i = 0.5
818
+ } = {}) {
819
+ const l = [];
820
+ let m = t;
821
+ for (; m > 0; ) {
822
+ const u = ie({ scaleXMin: o, scaleXMax: s, scaleYMin: c, scaleYMax: n, scaleZMin: a, scaleZMax: i });
823
+ u.z = Math.min(u.z, m), l.push(u), m -= u.z;
824
+ }
825
+ return le({ coverMaterial: r, pagesMaterial: e, scales: l });
826
+ }
827
+ class gt extends v {
828
+ constructor(e = 2, t = 0.3, o = 0.6, s = 5, c = 5, n = Math.PI / 4) {
829
+ super();
830
+ const a = [], i = [];
831
+ for (let p = 0; p < s; p++) {
832
+ const d = p * t, x = d + t, y = p * o, G = y + o;
833
+ a.push(
834
+ // Vertical riser
835
+ -e / 2,
836
+ d,
837
+ y,
838
+ // Bottom-left
839
+ e / 2,
840
+ d,
841
+ y,
842
+ // Bottom-right
843
+ e / 2,
844
+ x,
845
+ y,
846
+ // Top-right
847
+ -e / 2,
848
+ x,
849
+ y,
850
+ // Top-left
851
+ // Horizontal tread
852
+ -e / 2,
853
+ x,
854
+ y,
855
+ // Top-left
856
+ e / 2,
857
+ x,
858
+ y,
859
+ // Top-right
860
+ e / 2,
861
+ x,
862
+ G,
863
+ // Back-right
864
+ -e / 2,
865
+ x,
866
+ G
867
+ // Back-left
868
+ );
869
+ const I = p * 8;
870
+ i.push(
871
+ I,
872
+ I + 1,
873
+ I + 2,
874
+ I,
875
+ I + 2,
876
+ I + 3
877
+ ), i.push(
878
+ I + 4,
879
+ I + 5,
880
+ I + 6,
881
+ I + 4,
882
+ I + 6,
883
+ I + 7
884
+ );
885
+ }
886
+ const l = s * t, m = s * o, u = e * 2;
887
+ a.push(
888
+ // Landing platform (4 vertices)
889
+ -u / 2,
890
+ l,
891
+ m,
892
+ // Bottom-left
893
+ u / 2,
894
+ l,
895
+ m,
896
+ // Bottom-right
897
+ u / 2,
898
+ l,
899
+ m + o,
900
+ // Top-right
901
+ -u / 2,
902
+ l,
903
+ m + o
904
+ // Top-left
905
+ );
906
+ const f = s * 8;
907
+ i.push(
908
+ f,
909
+ f + 1,
910
+ f + 2,
911
+ // First triangle for landing
912
+ f,
913
+ f + 2,
914
+ f + 3
915
+ // Second triangle for landing
916
+ );
917
+ for (let p = 0; p < 2; p++) {
918
+ const d = p === 0 ? 1 : -1;
919
+ for (let x = 0; x < c; x++) {
920
+ const y = l + x * t, G = y + t, I = d * (u / 4), T = m + o, E = x * o * Math.cos(n), C = x * o * Math.sin(n), F = I + d * E - e / 2 * Math.cos(n), Z = I + d * E + e / 2 * Math.cos(n), N = T + C, fe = F + d * o * Math.cos(n), he = Z + d * o * Math.cos(n), $ = N + o * Math.sin(n);
921
+ a.push(
922
+ // Vertical riser
923
+ F,
924
+ y,
925
+ N,
926
+ // Bottom-left
927
+ Z,
928
+ y,
929
+ N,
930
+ // Bottom-right
931
+ Z,
932
+ G,
933
+ N,
934
+ // Top-right
935
+ F,
936
+ G,
937
+ N,
938
+ // Top-left
939
+ // Horizontal tread
940
+ F,
941
+ G,
942
+ N,
943
+ // Top-left
944
+ Z,
945
+ G,
946
+ N,
947
+ // Top-right
948
+ he,
949
+ G,
950
+ $,
951
+ // Back-right
952
+ fe,
953
+ G,
954
+ $
955
+ // Back-left
956
+ );
957
+ const B = f + 4 + p * c * 8 + x * 8;
958
+ i.push(
959
+ B,
960
+ B + 1,
961
+ B + 2,
962
+ B,
963
+ B + 2,
964
+ B + 3
965
+ ), i.push(
966
+ B + 4,
967
+ B + 5,
968
+ B + 6,
969
+ B + 4,
970
+ B + 6,
971
+ B + 7
972
+ );
973
+ }
974
+ }
975
+ this.setIndex(i), this.setAttribute("position", new U(a, 3)), this.computeVertexNormals();
976
+ }
977
+ }
978
+ class bt extends v {
979
+ constructor(e = 5, t = 3, o = 5, s = 0.2) {
980
+ super();
981
+ const c = [
982
+ // Floor vertices
983
+ -e / 2,
984
+ 0,
985
+ -o / 2,
986
+ // 0
987
+ e / 2,
988
+ 0,
989
+ -o / 2,
990
+ // 1
991
+ e / 2,
992
+ 0,
993
+ o / 2,
994
+ // 2
995
+ -e / 2,
996
+ 0,
997
+ o / 2,
998
+ // 3
999
+ // Back wall vertices
1000
+ -e / 2,
1001
+ 0,
1002
+ -o / 2,
1003
+ // 4
1004
+ e / 2,
1005
+ 0,
1006
+ -o / 2,
1007
+ // 5
1008
+ e / 2,
1009
+ t,
1010
+ -o / 2,
1011
+ // 6
1012
+ -e / 2,
1013
+ t,
1014
+ -o / 2,
1015
+ // 7
1016
+ // Left wall vertices
1017
+ -e / 2,
1018
+ 0,
1019
+ -o / 2,
1020
+ // 8
1021
+ -e / 2,
1022
+ 0,
1023
+ o / 2,
1024
+ // 9
1025
+ -e / 2,
1026
+ t,
1027
+ o / 2,
1028
+ // 10
1029
+ -e / 2,
1030
+ t,
1031
+ -o / 2
1032
+ // 11
1033
+ ], n = [
1034
+ // Floor
1035
+ 0,
1036
+ 1,
1037
+ 2,
1038
+ 0,
1039
+ 2,
1040
+ 3,
1041
+ // Back wall
1042
+ 4,
1043
+ 5,
1044
+ 6,
1045
+ 4,
1046
+ 6,
1047
+ 7,
1048
+ // Left wall
1049
+ 8,
1050
+ 9,
1051
+ 10,
1052
+ 8,
1053
+ 10,
1054
+ 11
1055
+ ];
1056
+ this.setIndex(n), this.setAttribute("position", new U(c, 3)), this.computeVertexNormals();
1057
+ }
1058
+ }
1059
+ class St extends v {
1060
+ constructor(e = 2, t = 0.3, o = 0.5, s = 5, c = 2) {
1061
+ super();
1062
+ const n = [], a = [];
1063
+ for (let u = 0; u < s; u++) {
1064
+ const f = u * t, p = f + t, d = u * o, x = d + o;
1065
+ n.push(
1066
+ // Vertical riser
1067
+ -e / 2,
1068
+ f,
1069
+ d,
1070
+ // Bottom-left
1071
+ e / 2,
1072
+ f,
1073
+ d,
1074
+ // Bottom-right
1075
+ e / 2,
1076
+ p,
1077
+ d,
1078
+ // Top-right
1079
+ -e / 2,
1080
+ p,
1081
+ d,
1082
+ // Top-left
1083
+ // Horizontal tread
1084
+ -e / 2,
1085
+ p,
1086
+ d,
1087
+ // Top-left
1088
+ e / 2,
1089
+ p,
1090
+ d,
1091
+ // Top-right
1092
+ e / 2,
1093
+ p,
1094
+ x,
1095
+ // Back-right
1096
+ -e / 2,
1097
+ p,
1098
+ x
1099
+ // Back-left
1100
+ );
1101
+ const y = u * 8;
1102
+ a.push(
1103
+ y,
1104
+ y + 1,
1105
+ y + 2,
1106
+ y,
1107
+ y + 2,
1108
+ y + 3
1109
+ ), a.push(
1110
+ y + 4,
1111
+ y + 5,
1112
+ y + 6,
1113
+ y + 4,
1114
+ y + 6,
1115
+ y + 7
1116
+ );
1117
+ }
1118
+ const i = s * t, l = s * o;
1119
+ n.push(
1120
+ // Landing platform (4 vertices)
1121
+ -e / 2,
1122
+ i,
1123
+ l,
1124
+ // Bottom-left
1125
+ e / 2,
1126
+ i,
1127
+ l,
1128
+ // Bottom-right
1129
+ e / 2,
1130
+ i,
1131
+ l + c,
1132
+ // Top-right
1133
+ -e / 2,
1134
+ i,
1135
+ l + c
1136
+ // Top-left
1137
+ );
1138
+ const m = s * 8;
1139
+ a.push(
1140
+ m,
1141
+ m + 1,
1142
+ m + 2,
1143
+ // First triangle for landing
1144
+ m,
1145
+ m + 2,
1146
+ m + 3
1147
+ // Second triangle for landing
1148
+ );
1149
+ for (let u = 0; u < s; u++) {
1150
+ const f = i + u * t, p = f + t, d = -e / 2 - u * o, x = d - o;
1151
+ n.push(
1152
+ // Vertical riser
1153
+ d,
1154
+ f,
1155
+ l + c,
1156
+ // Bottom-left
1157
+ d,
1158
+ f,
1159
+ l + c - e,
1160
+ // Bottom-right
1161
+ d,
1162
+ p,
1163
+ l + c - e,
1164
+ // Top-right
1165
+ d,
1166
+ p,
1167
+ l + c,
1168
+ // Top-left
1169
+ // Horizontal tread
1170
+ d,
1171
+ p,
1172
+ l + c,
1173
+ // Top-left
1174
+ d,
1175
+ p,
1176
+ l + c - e,
1177
+ // Top-right
1178
+ x,
1179
+ p,
1180
+ l + c - e,
1181
+ // Back-right
1182
+ x,
1183
+ p,
1184
+ l + c
1185
+ // Back-left
1186
+ );
1187
+ const y = m + 4 + u * 8;
1188
+ a.push(
1189
+ y,
1190
+ y + 1,
1191
+ y + 2,
1192
+ y,
1193
+ y + 2,
1194
+ y + 3
1195
+ ), a.push(
1196
+ y + 4,
1197
+ y + 5,
1198
+ y + 6,
1199
+ y + 4,
1200
+ y + 6,
1201
+ y + 7
1202
+ );
1203
+ }
1204
+ this.setIndex(a), this.setAttribute("position", new U(n, 3)), this.computeVertexNormals();
1205
+ }
1206
+ }
1207
+ class Gt extends v {
1208
+ constructor(e = 1, t = 0.4, o = 0.2, s = 20, c = 2, n = Math.PI / 8) {
1209
+ super();
1210
+ const a = [], i = [];
1211
+ let l = 0;
1212
+ for (let m = 0; m < s; m++) {
1213
+ const u = c * Math.cos(l), f = c * Math.sin(l), p = m * o, d = p + o;
1214
+ a.push(
1215
+ // Front face (vertical riser)
1216
+ u - e / 2 * Math.cos(l),
1217
+ p,
1218
+ f - e / 2 * Math.sin(l),
1219
+ // Bottom-left
1220
+ u + e / 2 * Math.cos(l),
1221
+ p,
1222
+ f + e / 2 * Math.sin(l),
1223
+ // Bottom-right
1224
+ u + e / 2 * Math.cos(l),
1225
+ d,
1226
+ f + e / 2 * Math.sin(l),
1227
+ // Top-right
1228
+ u - e / 2 * Math.cos(l),
1229
+ d,
1230
+ f - e / 2 * Math.sin(l)
1231
+ // Top-left
1232
+ ), a.push(
1233
+ // Top face (horizontal tread)
1234
+ u - e / 2 * Math.cos(l),
1235
+ d,
1236
+ f - e / 2 * Math.sin(l),
1237
+ // Top-left-front
1238
+ u + e / 2 * Math.cos(l),
1239
+ d,
1240
+ f + e / 2 * Math.sin(l),
1241
+ // Top-right-front
1242
+ u + e / 2 * Math.cos(l) - t * Math.sin(l),
1243
+ d,
1244
+ f + e / 2 * Math.sin(l) + t * Math.cos(l),
1245
+ // Back-right
1246
+ u - e / 2 * Math.cos(l) - t * Math.sin(l),
1247
+ d,
1248
+ f - e / 2 * Math.sin(l) + t * Math.cos(l)
1249
+ // Back-left
1250
+ );
1251
+ const x = m * 8;
1252
+ i.push(
1253
+ x,
1254
+ x + 1,
1255
+ x + 2,
1256
+ // First triangle for riser
1257
+ x,
1258
+ x + 2,
1259
+ x + 3
1260
+ // Second triangle for riser
1261
+ ), i.push(
1262
+ x + 4,
1263
+ x + 5,
1264
+ x + 6,
1265
+ // First triangle for tread
1266
+ x + 4,
1267
+ x + 6,
1268
+ x + 7
1269
+ // Second triangle for tread
1270
+ ), l += n;
1271
+ }
1272
+ this.setIndex(i), this.setAttribute("position", new U(a, 3)), this.computeVertexNormals();
1273
+ }
1274
+ }
1275
+ class It extends v {
1276
+ constructor(e = 2, t = 0.3, o = 0.5, s = 10) {
1277
+ super();
1278
+ const c = [], n = [];
1279
+ for (let a = 0; a < s; a++) {
1280
+ const i = a * t, l = i + t, m = a * o, u = m + o;
1281
+ c.push(
1282
+ // Bottom face of riser (front face)
1283
+ -e / 2,
1284
+ i,
1285
+ m,
1286
+ // 0: Bottom-left-front
1287
+ e / 2,
1288
+ i,
1289
+ m,
1290
+ // 1: Bottom-right-front
1291
+ e / 2,
1292
+ l,
1293
+ m,
1294
+ // 2: Top-right-front
1295
+ -e / 2,
1296
+ l,
1297
+ m,
1298
+ // 3: Top-left-front
1299
+ // Top face of tread (horizontal step)
1300
+ -e / 2,
1301
+ l,
1302
+ m,
1303
+ // 4: Top-left-front (repeated)
1304
+ e / 2,
1305
+ l,
1306
+ m,
1307
+ // 5: Top-right-front (repeated)
1308
+ e / 2,
1309
+ l,
1310
+ u,
1311
+ // 6: Top-right-back
1312
+ -e / 2,
1313
+ l,
1314
+ u
1315
+ // 7: Top-left-back
1316
+ );
1317
+ const f = a * 8;
1318
+ n.push(
1319
+ f,
1320
+ f + 1,
1321
+ f + 2,
1322
+ // First triangle for riser
1323
+ f,
1324
+ f + 2,
1325
+ f + 3
1326
+ // Second triangle for riser
1327
+ ), n.push(
1328
+ f + 4,
1329
+ f + 6,
1330
+ f + 5,
1331
+ // First triangle for tread
1332
+ f + 4,
1333
+ f + 7,
1334
+ f + 6
1335
+ // Second triangle for tread
1336
+ );
1337
+ }
1338
+ this.setIndex(n), this.setAttribute("position", new U(c, 3)), this.computeVertexNormals();
1268
1339
  }
1269
1340
  }
1270
- class Ae extends v {
1341
+ class Ne extends v {
1271
1342
  constructor(e = 0.4, t = 1.2, o = 0.2) {
1272
1343
  super();
1273
- const n = t * 0.6, a = new g(e / 2, n, o);
1274
- a.translate(0, n / 2, 0);
1275
- const s = e * 1.5, r = new g(s, e / 4, o);
1276
- r.translate(0, n * 0.75, 0), this.copy(A([a, r], !1)), this.computeVertexNormals();
1344
+ const s = t * 0.6, c = new g(e / 2, s, o);
1345
+ c.translate(0, s / 2, 0);
1346
+ const n = e * 1.5, a = new g(n, e / 4, o);
1347
+ a.translate(0, s * 0.75, 0), this.copy(A([c, a], !1)), this.computeVertexNormals();
1277
1348
  }
1278
1349
  }
1279
- class ke extends v {
1350
+ class ze extends v {
1280
1351
  constructor(e = 1.75, t = 0.75) {
1281
1352
  super();
1282
- const o = e * 0.05, n = e * 0.15, a = e * 0.15, s = e * 0.75;
1283
- let r = 0;
1284
- const c = new g(t, o, t);
1285
- c.translate(0, r + o / 2, 0), r += o;
1286
- const i = new g(t * 0.8, n, t * 0.8);
1287
- i.translate(0, r + n / 2, 0), r += n;
1288
- const m = new g(t * 0.6, a, t * 0.6);
1289
- m.translate(0, r + a / 2, 0), r += a;
1290
- const u = new g(t * 0.4, s, t * 0.4);
1291
- u.translate(0, r + s / 2, 0), r += s;
1292
- const f = new _(t * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
1293
- f.translate(0, r + 0.1 / 2, 0), this.copy(A([c, i, m, u, f], !1)), this.computeVertexNormals();
1294
- }
1295
- }
1296
- class Be extends v {
1297
- constructor(e = 0.6, t = 1, o = 0.2, n = 0.6) {
1353
+ const o = e * 0.05, s = e * 0.15, c = e * 0.15, n = e * 0.75;
1354
+ let a = 0;
1355
+ const i = new g(t, o, t);
1356
+ i.translate(0, a + o / 2, 0), a += o;
1357
+ const l = new g(t * 0.8, s, t * 0.8);
1358
+ l.translate(0, a + s / 2, 0), a += s;
1359
+ const m = new g(t * 0.6, c, t * 0.6);
1360
+ m.translate(0, a + c / 2, 0), a += c;
1361
+ const u = new g(t * 0.4, n, t * 0.4);
1362
+ u.translate(0, a + n / 2, 0), a += n;
1363
+ const f = new L(t * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
1364
+ f.translate(0, a + 0.1 / 2, 0), this.copy(A([i, l, m, u, f], !1)), this.computeVertexNormals();
1365
+ }
1366
+ }
1367
+ class Ue extends v {
1368
+ constructor(e = 0.6, t = 1, o = 0.2, s = 0.6) {
1298
1369
  super();
1299
- const a = t - n / 2, s = new g(e, a, o);
1300
- s.translate(0, a / 2, 0);
1301
- const r = new G(n / 2, n / 2, o, 16, 1, !1, 0, Math.PI);
1302
- r.rotateY(Math.PI / 2), r.rotateX(Math.PI / 2), r.translate(0, a, 0), this.copy(A([s, r], !1)), this.computeVertexNormals();
1370
+ const c = t - s / 2, n = new g(e, c, o);
1371
+ n.translate(0, c / 2, 0);
1372
+ const a = new S(s / 2, s / 2, o, 16, 1, !1, 0, Math.PI);
1373
+ a.rotateY(Math.PI / 2), a.rotateX(Math.PI / 2), a.translate(0, c, 0), this.copy(A([n, a], !1)), this.computeVertexNormals();
1303
1374
  }
1304
1375
  }
1305
- class Te extends v {
1376
+ class _e extends v {
1306
1377
  constructor(e = 0.5, t = 0.8, o = 0.15) {
1307
1378
  super();
1308
- const n = new g(e, t, o);
1309
- n.translate(0, t / 2, 0), this.copy(n);
1379
+ const s = new g(e, t, o);
1380
+ s.translate(0, t / 2, 0), this.copy(s);
1310
1381
  }
1311
1382
  }
1312
- class Ee extends v {
1383
+ class Le extends v {
1313
1384
  constructor({ height: e = 2.25 } = {}) {
1314
1385
  super();
1315
1386
  const t = new g(1.2, 0.5, 1.2);
1316
1387
  t.translate(0, 0.25, 0);
1317
1388
  const o = new g(1, e, 1);
1318
1389
  o.translate(0, 0.5 + e / 2, 0);
1319
- const n = new g(1.4, 0.3, 1.4);
1320
- n.translate(0, 0.5 + e + 0.15, 0), this.copy(A([t, o, n], !1));
1390
+ const s = new g(1.4, 0.3, 1.4);
1391
+ s.translate(0, 0.5 + e + 0.15, 0), this.copy(A([t, o, s], !1));
1321
1392
  }
1322
1393
  }
1323
- class re extends v {
1394
+ class me extends v {
1324
1395
  constructor({
1325
1396
  barHeight: e = 2,
1326
1397
  //
1327
1398
  barRadius: t = 0.05,
1328
1399
  spikeHeight: o = 0.3,
1329
- spikeRadius: n = 0.075,
1330
- spikeScaleZ: a = 1,
1331
- radialSegments: s = 8
1400
+ spikeRadius: s = 0.075,
1401
+ spikeScaleZ: c = 1,
1402
+ radialSegments: n = 8
1332
1403
  } = {}) {
1333
1404
  super();
1334
- const r = new G(t, t, e, s);
1335
- r.translate(0, e / 2, 0);
1336
- const c = new _(n, o, s);
1337
- c.translate(0, e + o / 2, 0), c.scale(1, 1, a), this.copy(A([r, c], !1));
1405
+ const a = new S(t, t, e, n);
1406
+ a.translate(0, e / 2, 0);
1407
+ const i = new L(s, o, n);
1408
+ i.translate(0, e + o / 2, 0), i.scale(1, 1, c), this.copy(A([a, i], !1));
1338
1409
  }
1339
1410
  }
1340
- class Ce extends v {
1411
+ class qe extends v {
1341
1412
  constructor({
1342
1413
  count: e = 20,
1343
1414
  //
1344
1415
  spacing: t = 0.4,
1345
1416
  barHeight: o = 2,
1346
- barRadius: n = 0.05,
1347
- spikeHeight: a = 0.3,
1348
- spikeRadius: s = 0.075,
1349
- spikeScaleZ: r = 1,
1350
- railHeight: c = 0.1,
1351
- railDepth: i = 0.05,
1417
+ barRadius: s = 0.05,
1418
+ spikeHeight: c = 0.3,
1419
+ spikeRadius: n = 0.075,
1420
+ spikeScaleZ: a = 1,
1421
+ railHeight: i = 0.1,
1422
+ railDepth: l = 0.05,
1352
1423
  railOffset: m = 0,
1353
1424
  radialSegments: u = 8
1354
1425
  } = {}) {
1355
1426
  super();
1356
- const f = [], d = new re({ barHeight: o, barRadius: n, spikeHeight: a, spikeRadius: s, spikeScaleZ: r, radialSegments: u }), p = new g(e * t, c, i);
1357
- for (let I = 0; I < e; I++) {
1358
- const S = d.clone();
1359
- S.translate(I * t, 0, 0), f.push(S);
1427
+ const f = [], p = new me({ barHeight: o, barRadius: s, spikeHeight: c, spikeRadius: n, spikeScaleZ: a, radialSegments: u }), d = new g(e * t, i, l);
1428
+ for (let G = 0; G < e; G++) {
1429
+ const I = p.clone();
1430
+ I.translate(G * t, 0, 0), f.push(I);
1360
1431
  }
1361
- const x = p.clone();
1362
- x.translate(t * (e - 1) / 2, o - m - c / 2, 0), f.push(x);
1363
- const y = p.clone();
1364
- y.translate(t * (e - 1) / 2, c / 2, 0), f.push(y), this.copy(A(f));
1432
+ const x = d.clone();
1433
+ x.translate(t * (e - 1) / 2, o - m - i / 2, 0), f.push(x);
1434
+ const y = d.clone();
1435
+ y.translate(t * (e - 1) / 2, i / 2, 0), f.push(y), this.copy(A(f));
1365
1436
  }
1366
1437
  }
1367
- class Ne extends v {
1438
+ class Oe extends v {
1368
1439
  constructor({
1369
1440
  width: e = 5,
1370
1441
  //
1371
1442
  height: t = 8,
1372
1443
  depth: o = 1,
1373
- shelves: n = 4,
1374
- frameThickness: a = 0.1
1444
+ shelves: s = 4,
1445
+ frameThickness: c = 0.1,
1446
+ open: n = !1
1375
1447
  } = {}) {
1376
1448
  super();
1377
- const s = t, r = e, c = o, i = new g(a, s, c), m = new g(r - 2 * a, a, c), u = i.clone();
1378
- u.translate(-r / 2 + a / 2, s / 2, 0);
1379
- const f = i.clone();
1380
- f.translate(r / 2 - a / 2, s / 2, 0);
1381
- const d = m.clone();
1382
- d.translate(0, s - a / 2, 0);
1449
+ const a = t, i = e, l = o, m = new g(c, a, l), u = new g(i - 2 * c, c, l), f = m.clone();
1450
+ f.translate(-i / 2 + c / 2, a / 2, 0);
1383
1451
  const p = m.clone();
1384
- p.translate(0, a / 2, 0);
1385
- const x = new g(r, s, a);
1386
- x.translate(0, s / 2, -c / 2 + a / 2);
1387
- const y = [], I = (s - a) / (n + 1);
1388
- for (let S = 1; S <= n; S++) {
1389
- const T = m.clone();
1390
- T.translate(0, a / 2 + S * I, 0), y.push(T);
1452
+ p.translate(i / 2 - c / 2, a / 2, 0);
1453
+ const d = u.clone();
1454
+ d.translate(0, a - c / 2, 0);
1455
+ const x = u.clone();
1456
+ x.translate(0, c / 2, 0);
1457
+ const y = new g(i, a, c);
1458
+ y.translate(0, a / 2, -l / 2 + c / 2);
1459
+ const G = [], I = (a - c) / (s + 1);
1460
+ for (let T = 1; T <= s; T++) {
1461
+ const E = u.clone();
1462
+ E.translate(0, c / 2 + T * I, 0), G.push(E);
1391
1463
  }
1392
- this.copy(A([u, f, d, p, x, ...y], !1));
1464
+ this.copy(A([
1465
+ f,
1466
+ //
1467
+ p,
1468
+ d,
1469
+ x,
1470
+ ...n ? [] : [y],
1471
+ ...G
1472
+ ], !1));
1393
1473
  }
1394
1474
  }
1395
- class wt extends v {
1475
+ class Pt extends v {
1396
1476
  constructor(e = 0.1) {
1397
1477
  super();
1398
- const t = [], o = [], n = [
1478
+ const t = [], o = [], s = [
1399
1479
  [0, 1],
1400
1480
  // Top point
1401
1481
  [0.5, 0.75],
@@ -1413,60 +1493,60 @@ class wt extends v {
1413
1493
  [-0.5, 0.75]
1414
1494
  // Left upper middle
1415
1495
  ];
1416
- for (let s = 0; s < n.length; s++) {
1417
- const [r, c] = n[s];
1418
- t.push(r * e, c * e, 0);
1496
+ for (let n = 0; n < s.length; n++) {
1497
+ const [a, i] = s[n];
1498
+ t.push(a * e, i * e, 0);
1419
1499
  }
1420
- for (let s = 1; s < n.length - 1; s++)
1421
- o.push(0, s, s + 1);
1422
- o.push(0, n.length - 1, 1);
1423
- const a = new U(t, 3);
1424
- this.setAttribute("position", a), this.setIndex(o), this.computeVertexNormals();
1500
+ for (let n = 1; n < s.length - 1; n++)
1501
+ o.push(0, n, n + 1);
1502
+ o.push(0, s.length - 1, 1);
1503
+ const c = new U(t, 3);
1504
+ this.setAttribute("position", c), this.setIndex(o), this.computeVertexNormals();
1425
1505
  }
1426
1506
  }
1427
- function Fe(l, e = F.XYZ, t = 0.5, o = 2) {
1428
- l.deleteAttribute("uv"), l.deleteAttribute("normal"), l = Se(l), l.computeVertexNormals();
1429
- const n = l.getAttribute("position");
1430
- for (let a = 0; a < n.count; a++) {
1431
- const s = new M().fromBufferAttribute(n, a), r = Math.random() * (o - t) + t, c = e.clone().multiplyScalar(r);
1432
- s.add(c), n.setXYZ(a, s.x, s.y, s.z);
1507
+ function Ve(r, e = z.XYZ, t = 0.5, o = 2) {
1508
+ r.deleteAttribute("uv"), r.deleteAttribute("normal"), r = Ae(r), r.computeVertexNormals();
1509
+ const s = r.getAttribute("position");
1510
+ for (let c = 0; c < s.count; c++) {
1511
+ const n = new M().fromBufferAttribute(s, c), a = Math.random() * (o - t) + t, i = e.clone().multiplyScalar(a);
1512
+ n.add(i), s.setXYZ(c, n.x, n.y, n.z);
1433
1513
  }
1434
- return n.needsUpdate = !0, l.computeVertexNormals(), l;
1514
+ return s.needsUpdate = !0, r.computeVertexNormals(), r;
1435
1515
  }
1436
- class Ue extends v {
1516
+ class Xe extends v {
1437
1517
  constructor(e = 1, t = 4, o = 4) {
1438
1518
  super();
1439
- const n = new B(e, t, o);
1440
- this.copy(Fe(n, F.XYZ, 0.5, 1)), this.computeVertexNormals(), this.center();
1519
+ const s = new k(e, t, o);
1520
+ this.copy(Ve(s, z.XYZ, 0.5, 1)), this.computeVertexNormals(), this.center();
1441
1521
  }
1442
1522
  }
1443
- class ze extends v {
1444
- constructor(e = 0.1, t = 0.1, o = 0.4, n = 8) {
1523
+ class Ze extends v {
1524
+ constructor(e = 0.1, t = 0.1, o = 0.4, s = 8) {
1445
1525
  super();
1446
- const a = new G(e * 0.6, t * 0.6, o, n);
1447
- a.translate(0, 0, 0);
1448
- const s = new B(e, n, n), r = s.clone(), c = s.clone(), i = s.clone(), m = s.clone();
1449
- r.translate(0, o / 2 + e * 0.6, -e * 0.6), c.translate(0, o / 2 + e * 0.6, e * 0.6), i.translate(0, -o / 2 - t * 0.6, -t * 0.6), m.translate(0, -o / 2 - t * 0.6, t * 0.6), this.copy(A([a, r, c, i, m], !1));
1526
+ const c = new S(e * 0.6, t * 0.6, o, s);
1527
+ c.translate(0, 0, 0);
1528
+ const n = new k(e, s, s), a = n.clone(), i = n.clone(), l = n.clone(), m = n.clone();
1529
+ a.translate(0, o / 2 + e * 0.6, -e * 0.6), i.translate(0, o / 2 + e * 0.6, e * 0.6), l.translate(0, -o / 2 - t * 0.6, -t * 0.6), m.translate(0, -o / 2 - t * 0.6, t * 0.6), this.copy(A([c, a, i, l, m], !1));
1450
1530
  }
1451
1531
  }
1452
- class _e extends v {
1532
+ class Ye extends v {
1453
1533
  constructor() {
1454
1534
  super();
1455
- const e = new B(1, 16, 16), t = new G(0.2, 0.2, 2, 16, 1, !0);
1535
+ const e = new k(1, 16, 16), t = new S(0.2, 0.2, 2, 16, 1, !0);
1456
1536
  t.translate(0, 1.5, 0), t.rotateX(Math.PI / 2), this.copy(A([e, t], !1));
1457
1537
  }
1458
1538
  }
1459
- class Le extends v {
1539
+ class Re extends v {
1460
1540
  constructor({
1461
1541
  flaskRadius: e = 1,
1462
1542
  //
1463
1543
  neckRadius: t = 0.3,
1464
1544
  height: o = 2.5,
1465
- neckHeight: n = 1,
1466
- radialSegments: a = 16
1545
+ neckHeight: s = 1,
1546
+ radialSegments: c = 16
1467
1547
  } = {}) {
1468
1548
  super();
1469
- const s = [
1549
+ const n = [
1470
1550
  new b(0, 0),
1471
1551
  // Bottom of the flask
1472
1552
  new b(e * 0.875, 0),
@@ -1475,15 +1555,15 @@ class Le extends v {
1475
1555
  // End of the rounded base
1476
1556
  new b(t, o),
1477
1557
  // Start of the straight neck
1478
- new b(t, o + n),
1558
+ new b(t, o + s),
1479
1559
  // End of the straight neck
1480
- new b(t * 1.1, o + n + 0.3)
1560
+ new b(t * 1.1, o + s + 0.3)
1481
1561
  // Slight outward lip at the top
1482
- ], r = new L(s, a);
1483
- this.copy(A([r], !1));
1562
+ ], a = new q(n, c);
1563
+ this.copy(A([a], !1));
1484
1564
  }
1485
1565
  }
1486
- class qe extends v {
1566
+ class De extends v {
1487
1567
  constructor() {
1488
1568
  super();
1489
1569
  const e = [
@@ -1497,107 +1577,114 @@ class qe extends v {
1497
1577
  // Flared edge
1498
1578
  new b(0.8, 1.8)
1499
1579
  // Lip of the bowl
1500
- ], t = new L(e, 12), o = new me(1, 12);
1580
+ ], t = new q(e, 12), o = new we(1, 12);
1501
1581
  o.rotateX(-Math.PI / 2), o.translate(0, 0, 0), this.copy(A([t, o], !1));
1502
1582
  }
1503
1583
  }
1504
- class Oe extends v {
1584
+ class He extends v {
1505
1585
  constructor({
1506
1586
  radius: e = 0.3,
1507
1587
  //
1508
1588
  height: t = 0.4,
1509
1589
  count: o = 3,
1510
- thickness: n = 0.03,
1511
- radialSegments: a = 16
1590
+ thickness: s = 0.03,
1591
+ radialSegments: c = 16
1512
1592
  } = {}) {
1513
1593
  super();
1514
- const s = new oe(e, n, 8, a);
1515
- s.rotateX(Math.PI / 2), s.translate(0, t, 0);
1516
- const r = new G(n * 0.6, n * 0.6, t, a), c = [];
1517
- for (let i = 0; i < o; i++) {
1518
- const m = i / o * Math.PI * 2, u = r.clone();
1519
- u.translate(Math.cos(m) * e, t / 2, Math.sin(m) * e), c.push(u);
1594
+ const n = new se(e, s, 8, c);
1595
+ n.rotateX(Math.PI / 2), n.translate(0, t, 0);
1596
+ const a = new S(s * 0.6, s * 0.6, t, c), i = [];
1597
+ for (let l = 0; l < o; l++) {
1598
+ const m = l / o * Math.PI * 2, u = a.clone();
1599
+ u.translate(Math.cos(m) * e, t / 2, Math.sin(m) * e), i.push(u);
1520
1600
  }
1521
- this.copy(A([s, ...c], !1));
1601
+ this.copy(A([n, ...i], !1));
1522
1602
  }
1523
1603
  }
1524
1604
  class Q extends v {
1525
- constructor(e = 0.2, t = 0.2, o = 3, n = 32, a = !0) {
1605
+ constructor(e = 0.2, t = 0.2, o = 3, s = 32, c = !0) {
1526
1606
  super();
1527
- const s = new G(e, t, o, n, 1, a), r = new B(t, n, n / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
1528
- r.translate(0, -(o / 2), 0), this.copy(A([s, r], !1));
1607
+ const n = new S(e, t, o, s, 1, c), a = new k(t, s, s / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
1608
+ a.translate(0, -(o / 2), 0), this.copy(A([n, a], !1));
1529
1609
  }
1530
1610
  }
1531
- class Ve extends v {
1532
- constructor({ radius: e = 0.5, neckRadius: t = 0.2, height: o = 3, neckHeight: n = 1, segments: a = 16 } = {}) {
1611
+ class Qe extends v {
1612
+ constructor({ radius: e = 0.5, neckRadius: t = 0.2, height: o = 3, neckHeight: s = 1, segments: c = 16 } = {}) {
1533
1613
  super();
1534
- const s = o - n, r = new G(e, e, s, a);
1535
- r.translate(0, s / 2, 0);
1536
- const c = 0.3, i = new G(t, e, c, a);
1537
- i.translate(0, s + c / 2, 0);
1538
- const m = new G(t, t, n, a);
1539
- m.translate(0, s + c + n / 2, 0), this.copy(A([r, i, m], !1));
1614
+ const n = o - s, a = new S(e, e, n, c);
1615
+ a.translate(0, n / 2, 0);
1616
+ const i = 0.3, l = new S(t, e, i, c);
1617
+ l.translate(0, n + i / 2, 0);
1618
+ const m = new S(t, t, s, c);
1619
+ m.translate(0, n + i + s / 2, 0), this.copy(A([a, l, m], !1));
1540
1620
  }
1541
1621
  }
1542
- class Xe extends v {
1622
+ class je extends v {
1543
1623
  constructor({
1544
1624
  radius: e = 3,
1545
1625
  //
1546
1626
  height: t = 0.6,
1547
1627
  widthSegments: o = 64,
1548
- heightSegments: n = 16,
1549
- phiStart: a = 0,
1550
- phiLength: s = Math.PI * 2
1628
+ heightSegments: s = 16,
1629
+ phiStart: c = 0,
1630
+ phiLength: n = Math.PI * 2
1551
1631
  } = {}) {
1552
- super(), this.copy(new B(e, o, n, a, s, 0, Math.PI / 2)), this.scale(1, t / e, 1);
1632
+ super(), this.copy(new k(e, o, s, c, n, 0, Math.PI / 2)), this.scale(1, t / e, 1);
1553
1633
  }
1554
1634
  }
1555
- const yt = (l, e) => l / (1 - Math.cos(e)), ae = (l, e) => l / (2 * Math.sin(e)), Ye = (l, e) => l * (1 - Math.cos(e)), xt = (l, e) => 2 * l * Math.sin(e);
1556
- class Ze extends v {
1635
+ const At = (r, e) => r / (1 - Math.cos(e)), ue = (r, e) => r / (2 * Math.sin(e)), Ke = (r, e) => r * (1 - Math.cos(e)), Bt = (r, e) => 2 * r * Math.sin(e), kt = (r, e, t) => ({
1636
+ x: r * Math.sin(t) * Math.cos(e),
1637
+ y: r * Math.sin(t) * Math.sin(e),
1638
+ z: r * Math.cos(t)
1639
+ }), Tt = (r, e, t) => {
1640
+ const o = Math.sqrt(r * r + e * e + t * t), s = Math.atan2(e, r), c = Math.acos(t / o);
1641
+ return { radius: o, theta: s, phi: c };
1642
+ };
1643
+ class Je extends v {
1557
1644
  constructor({
1558
- radius: e = ae(5, Math.PI / 10),
1645
+ radius: e = ue(5, Math.PI / 10),
1559
1646
  //
1560
1647
  widthSegments: t = 64,
1561
1648
  heightSegments: o = 32,
1562
- phiStart: n = 0,
1563
- phiLength: a = Math.PI * 2,
1564
- thetaLength: s = Math.PI / 10
1649
+ phiStart: s = 0,
1650
+ phiLength: c = Math.PI * 2,
1651
+ thetaLength: n = Math.PI / 10
1565
1652
  } = {}) {
1566
- super(), this.copy(new B(e, t, o, n, a, 0, s));
1567
- const r = Ye(e, s);
1568
- this.translate(0, -e + r, 0);
1653
+ super(), this.copy(new k(e, t, o, s, c, 0, n));
1654
+ const a = Ke(e, n);
1655
+ this.translate(0, -e + a, 0);
1569
1656
  }
1570
1657
  }
1571
- class De extends v {
1658
+ class $e extends v {
1572
1659
  constructor({
1573
1660
  trunkRadiusTop: e = 0.25,
1574
1661
  trunkRadiusBottom: t = 0.4,
1575
1662
  trunkHeight: o = 2.5,
1576
- trunkSegments: n = 14,
1577
- leafSize: a = 0.8,
1578
- leafCount: s = 6,
1579
- leafDetail: r = 0,
1580
- leafSpreadRadius: c = 1.5
1663
+ trunkSegments: s = 14,
1664
+ leafSize: c = 0.8,
1665
+ leafCount: n = 6,
1666
+ leafDetail: a = 0,
1667
+ leafSpreadRadius: i = 1.5
1581
1668
  } = {}) {
1582
1669
  super();
1583
- const i = new G(e, t, o, n);
1584
- i.translate(0, o / 2, 0);
1670
+ const l = new S(e, t, o, s);
1671
+ l.translate(0, o / 2, 0);
1585
1672
  const m = [];
1586
- for (let u = 0; u < s; u++) {
1587
- const f = new j(a, r);
1673
+ for (let u = 0; u < n; u++) {
1674
+ const f = new j(c, a);
1588
1675
  f.translate(
1589
- (Math.random() - 0.5) * c,
1590
- (Math.random() - 0.5) * a + o,
1591
- (Math.random() - 0.5) * c
1676
+ (Math.random() - 0.5) * i,
1677
+ (Math.random() - 0.5) * c + o,
1678
+ (Math.random() - 0.5) * i
1592
1679
  ), m.push(f);
1593
1680
  }
1594
- this.copy(A([i.toNonIndexed(), A(m, !1)], !0)), this.computeVertexNormals();
1681
+ this.copy(A([l.toNonIndexed(), A(m, !1)], !0)), this.computeVertexNormals();
1595
1682
  }
1596
1683
  }
1597
- class Mt extends P {
1684
+ class Et extends P {
1598
1685
  constructor() {
1599
1686
  super();
1600
- const e = new B(5, 32, 32), t = new K({
1687
+ const e = new k(5, 32, 32), t = new K({
1601
1688
  uniforms: {
1602
1689
  time: { value: 0 }
1603
1690
  },
@@ -1644,166 +1731,167 @@ class Mt extends P {
1644
1731
  this.add(o);
1645
1732
  }
1646
1733
  }
1647
- class vt extends h {
1734
+ class Ct extends h {
1648
1735
  constructor({
1649
1736
  width: e = 1,
1650
1737
  height: t = 1.5,
1651
1738
  depth: o = 0.5,
1652
- coverThickness: n = 0.05,
1653
- pageIndent: a = 0.05,
1654
- coverColor: s = 9109504,
1655
- pageColor: r = 16777215
1739
+ coverThickness: s = 0.05,
1740
+ pageIndent: c = 0.05,
1741
+ coverColor: n = 9109504,
1742
+ pageColor: a = 16777215
1656
1743
  } = {}) {
1657
- super(), this.geometry = new Pe(e, t, o, n, a), this.material = [
1658
- new w({ color: s, metalness: 0.1, roughness: 0.7, flatShading: !0 }),
1659
- new w({ color: r, flatShading: !0 })
1744
+ super(), this.geometry = new ce(e, t, o, s, c), this.material = [
1745
+ new w({ color: n, metalness: 0.1, roughness: 0.7, flatShading: !0 }),
1746
+ new w({ color: a, flatShading: !0 })
1660
1747
  ];
1661
1748
  }
1662
1749
  }
1663
- class gt extends h {
1750
+ class Ft extends h {
1664
1751
  constructor(e = 0.4, t = 1.2, o = 0.2) {
1665
- super(), this.geometry = new Ae(e, t, o), this.material = new w({ color: 7829367, roughness: 0.8 });
1752
+ super(), this.geometry = new Ne(e, t, o), this.material = new w({ color: 7829367, roughness: 0.8 });
1666
1753
  }
1667
1754
  }
1668
- class St extends P {
1755
+ class Nt extends P {
1669
1756
  constructor() {
1670
1757
  super();
1671
1758
  const e = new g(5, 1, 5), t = new w({ color: 8421504, flatShading: !0 }), o = new h(e, t);
1672
1759
  o.position.set(0, 0.5, 0), this.add(o);
1673
- const n = new g(4, 3, 4), a = new w({ color: 6908265, flatShading: !0 }), s = new h(n, a);
1674
- s.position.set(0, 2.5, 0), this.add(s);
1675
- const r = new _(3.5, 2, 4), c = new w({ color: 5263440, flatShading: !0 }), i = new h(r, c);
1676
- i.rotation.y = Math.PI / 4, i.position.set(0, 5, 0), this.add(i);
1677
- const m = new G(0.2, 0.2, 3.5, 16), u = new w({ color: 6908265, flatShading: !0 });
1760
+ const s = new g(4, 3, 4), c = new w({ color: 6908265, flatShading: !0 }), n = new h(s, c);
1761
+ n.position.set(0, 2.5, 0), this.add(n);
1762
+ const a = new L(3.5, 2, 4), i = new w({ color: 5263440, flatShading: !0 }), l = new h(a, i);
1763
+ l.rotation.y = Math.PI / 4, l.position.set(0, 5, 0), this.add(l);
1764
+ const m = new S(0.2, 0.2, 3.5, 16), u = new w({ color: 6908265, flatShading: !0 });
1678
1765
  [
1679
1766
  [-1.8, 2.3, -2.2],
1680
1767
  [1.8, 2.3, -2.2],
1681
1768
  [-1.8, 2.3, 2.2],
1682
1769
  [1.8, 2.3, 2.2]
1683
- ].forEach((S) => {
1770
+ ].forEach((I) => {
1684
1771
  const T = new h(m, u);
1685
- T.position.set(...S), this.add(T);
1772
+ T.position.set(...I), this.add(T);
1686
1773
  });
1687
- const d = new q();
1688
- d.moveTo(-1, 0), d.lineTo(-1, 2), d.absarc(0, 2, 1, Math.PI, 0, !0), d.lineTo(1, 0);
1689
- const p = {
1774
+ const p = new O();
1775
+ p.moveTo(-1, 0), p.lineTo(-1, 2), p.absarc(0, 2, 1, Math.PI, 0, !0), p.lineTo(1, 0);
1776
+ const d = {
1690
1777
  depth: 0.5,
1691
1778
  bevelEnabled: !1
1692
- }, x = new O(d, p), y = new w({ color: 4210752, flatShading: !0 }), I = new h(x, y);
1693
- I.position.set(0, 0.5, 1.7), this.add(I);
1779
+ }, x = new V(p, d), y = new w({ color: 4210752, flatShading: !0 }), G = new h(x, y);
1780
+ G.position.set(0, 0.5, 1.7), this.add(G);
1694
1781
  }
1695
1782
  }
1696
- class bt extends h {
1783
+ class zt extends h {
1697
1784
  constructor(e = 1.75, t = 0.75) {
1698
- super(), this.geometry = new ke(e, t), this.material = new w({ color: 7829367, roughness: 0.8 });
1785
+ super(), this.geometry = new ze(e, t), this.material = new w({ color: 7829367, roughness: 0.8 });
1699
1786
  }
1700
1787
  }
1701
- class Gt extends h {
1702
- constructor(e = 0.6, t = 1, o = 0.2, n = 0.6) {
1703
- super(), this.geometry = new Be(e, t, o, n), this.material = new w({ color: 7829367, roughness: 0.8 });
1788
+ class Ut extends h {
1789
+ constructor(e = 0.6, t = 1, o = 0.2, s = 0.6) {
1790
+ super(), this.geometry = new Ue(e, t, o, s), this.material = new w({ color: 7829367, roughness: 0.8 });
1704
1791
  }
1705
1792
  }
1706
- class It extends h {
1793
+ class _t extends h {
1707
1794
  constructor(e = 0.5, t = 0.8, o = 0.15) {
1708
- super(), this.geometry = new Te(e, t, o), this.material = new w({ color: 7829367, roughness: 0.8 });
1795
+ super(), this.geometry = new _e(e, t, o), this.material = new w({ color: 7829367, roughness: 0.8 });
1709
1796
  }
1710
1797
  }
1711
- class Pt extends h {
1798
+ class Lt extends h {
1712
1799
  constructor({ height: e = 2.25 } = {}) {
1713
- super(), this.geometry = new Ee({ height: e }), this.material = new w({ color: 9141627, flatShading: !0 });
1800
+ super(), this.geometry = new Le({ height: e }), this.material = new w({ color: 9141627, flatShading: !0 });
1714
1801
  }
1715
1802
  }
1716
- class At extends h {
1803
+ class qt extends h {
1717
1804
  constructor({
1718
1805
  barHeight: e = 2,
1719
1806
  //
1720
1807
  barRadius: t = 0.05,
1721
1808
  spikeHeight: o = 0.3,
1722
- spikeRadius: n = 0.075,
1723
- spikeScaleZ: a = 1,
1724
- radialSegments: s = 8
1809
+ spikeRadius: s = 0.075,
1810
+ spikeScaleZ: c = 1,
1811
+ radialSegments: n = 8
1725
1812
  } = {}) {
1726
- super(), this.geometry = new re({
1813
+ super(), this.geometry = new me({
1727
1814
  barHeight: e,
1728
1815
  barRadius: t,
1729
1816
  spikeHeight: o,
1730
- spikeRadius: n,
1731
- spikeScaleZ: a,
1732
- radialSegments: s
1817
+ spikeRadius: s,
1818
+ spikeScaleZ: c,
1819
+ radialSegments: n
1733
1820
  }), this.material = new w({ color: 3355443, metalness: 0.8, roughness: 0.4 });
1734
1821
  }
1735
1822
  }
1736
- class kt extends h {
1823
+ class Ot extends h {
1737
1824
  constructor({
1738
1825
  count: e = 20,
1739
1826
  //
1740
1827
  spacing: t = 0.4,
1741
1828
  barHeight: o = 2,
1742
- barRadius: n = 0.05,
1743
- spikeHeight: a = 0.3,
1744
- spikeRadius: s = 0.075,
1745
- spikeScaleZ: r = 1,
1746
- railHeight: c = 0.1,
1747
- railDepth: i = 0.05,
1829
+ barRadius: s = 0.05,
1830
+ spikeHeight: c = 0.3,
1831
+ spikeRadius: n = 0.075,
1832
+ spikeScaleZ: a = 1,
1833
+ railHeight: i = 0.1,
1834
+ railDepth: l = 0.05,
1748
1835
  railOffset: m = 0,
1749
1836
  radialSegments: u = 8
1750
1837
  } = {}) {
1751
- super(), this.geometry = new Ce({
1838
+ super(), this.geometry = new qe({
1752
1839
  count: e,
1753
1840
  spacing: t,
1754
1841
  barHeight: o,
1755
- barRadius: n,
1756
- spikeHeight: a,
1757
- spikeRadius: s,
1758
- spikeScaleZ: r,
1759
- railHeight: c,
1760
- railDepth: i,
1842
+ barRadius: s,
1843
+ spikeHeight: c,
1844
+ spikeRadius: n,
1845
+ spikeScaleZ: a,
1846
+ railHeight: i,
1847
+ railDepth: l,
1761
1848
  railOffset: m,
1762
1849
  radialSegments: u
1763
1850
  }), this.material = new w({ color: 3355443, metalness: 0.8, roughness: 0.4 });
1764
1851
  }
1765
1852
  }
1766
- class Bt extends h {
1853
+ class Vt extends h {
1767
1854
  constructor({
1768
1855
  width: e = 5,
1769
1856
  //
1770
1857
  height: t = 8,
1771
1858
  depth: o = 1,
1772
- shelves: n = 4,
1773
- frameThickness: a = 0.1
1859
+ shelves: s = 4,
1860
+ frameThickness: c = 0.1,
1861
+ open: n = !1
1774
1862
  } = {}) {
1775
- super(), this.geometry = new Ne({ width: e, height: t, depth: o, shelves: n, frameThickness: a }), this.material = new w({ color: 9127187 });
1863
+ super(), this.geometry = new Oe({ width: e, height: t, depth: o, shelves: s, frameThickness: c, open: n }), this.material = new w({ color: 9127187 });
1776
1864
  }
1777
1865
  }
1778
- class Tt extends P {
1866
+ class Xt extends P {
1779
1867
  constructor() {
1780
1868
  super();
1781
1869
  const e = new g(5, 0.3, 3), t = new w({ color: 9132587 }), o = new h(e, t);
1782
1870
  o.position.set(0, 3.15, 0);
1783
- const n = [];
1784
- n.push(new b(0.2, 0)), n.push(new b(0.25, 0.5)), n.push(new b(0.15, 1.5)), n.push(new b(0.3, 3));
1785
- const a = new L(n, 32), s = new w({ color: 4929057 });
1871
+ const s = [];
1872
+ s.push(new b(0.2, 0)), s.push(new b(0.25, 0.5)), s.push(new b(0.15, 1.5)), s.push(new b(0.3, 3));
1873
+ const c = new q(s, 32), n = new w({ color: 4929057 });
1786
1874
  [
1787
1875
  [2.2, 0, 1.2],
1788
1876
  // Adjust Y to 0 so legs start at ground level
1789
1877
  [-2.2, 0, 1.2],
1790
1878
  [2.2, 0, -1.2],
1791
1879
  [-2.2, 0, -1.2]
1792
- ].forEach((c) => {
1793
- const i = new h(a, s);
1794
- i.position.set(...c), this.add(i);
1880
+ ].forEach((i) => {
1881
+ const l = new h(c, n);
1882
+ l.position.set(...i), this.add(l);
1795
1883
  }), this.add(o);
1796
1884
  }
1797
1885
  }
1798
- class Et extends P {
1886
+ class Zt extends P {
1799
1887
  constructor(e = 1, t = 0.2) {
1800
1888
  super(), this.height = e, this.radius = t, this.createCandle(), this.animateFlicker();
1801
1889
  }
1802
1890
  createCandle() {
1803
- const e = new G(this.radius, this.radius, this.height, 32), t = new w({ color: 16777215 });
1891
+ const e = new S(this.radius, this.radius, this.height, 32), t = new w({ color: 16777215 });
1804
1892
  this.candle = new h(e, t), this.candle.position.set(0, this.height / 2, 0), this.add(this.candle);
1805
- const o = new B(0.05, 16, 16), n = new ue({ color: 16753920 });
1806
- this.flame = new h(o, n), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new se(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight);
1893
+ const o = new k(0.05, 16, 16), s = new ye({ color: 16753920 });
1894
+ this.flame = new h(o, s), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new re(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight);
1807
1895
  }
1808
1896
  animateFlicker() {
1809
1897
  const e = () => {
@@ -1812,52 +1900,52 @@ class Et extends P {
1812
1900
  e();
1813
1901
  }
1814
1902
  }
1815
- class Ct extends P {
1903
+ class Yt extends P {
1816
1904
  constructor(e = 1.3, t = 0.5) {
1817
1905
  super();
1818
- const o = new G(t, t, 0.2, 16), n = new w({ color: 9127187, flatShading: !0 }), a = new h(o, n);
1819
- a.position.set(0, 0, 0), this.add(a);
1820
- const s = new G(t * 0.9, t * 0.9, e), r = new w({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), c = new h(s, r);
1821
- c.position.set(0, e / 2 + 0.1, 0), this.add(c);
1822
- const i = new _(t * 1.1, 0.5, 8), m = new w({ color: 9127187, flatShading: !0 }), u = new h(i, m);
1906
+ const o = new S(t, t, 0.2, 16), s = new w({ color: 9127187, flatShading: !0 }), c = new h(o, s);
1907
+ c.position.set(0, 0, 0), this.add(c);
1908
+ const n = new S(t * 0.9, t * 0.9, e), a = new w({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), i = new h(n, a);
1909
+ i.position.set(0, e / 2 + 0.1, 0), this.add(i);
1910
+ const l = new L(t * 1.1, 0.5, 8), m = new w({ color: 9127187, flatShading: !0 }), u = new h(l, m);
1823
1911
  u.position.set(0, e + 0.35, 0), this.add(u);
1824
- const f = new oe(t * 0.8, 0.05, 8, 16), d = new w({ color: 9127187, flatShading: !0 }), p = new h(f, d);
1825
- p.position.set(0, e + 0.85, 0), this.add(p);
1826
- const x = new se(16755200, 1.5, 15);
1912
+ const f = new se(t * 0.8, 0.05, 8, 16), p = new w({ color: 9127187, flatShading: !0 }), d = new h(f, p);
1913
+ d.position.set(0, e + 0.85, 0), this.add(d);
1914
+ const x = new re(16755200, 1.5, 15);
1827
1915
  x.position.set(0, e / 2 + 0.1, 0), x.castShadow = !0, this.add(x);
1828
1916
  }
1829
1917
  }
1830
- class Nt extends P {
1918
+ class Rt extends P {
1831
1919
  constructor() {
1832
1920
  super();
1833
1921
  const e = new j(1, 0), t = new w({ color: 8421504, flatShading: !0 }), o = new w({ color: 4950843, flatShading: !0, opacity: 0.8, transparent: !0 });
1834
- for (let n = 0; n < 5; n++) {
1835
- const a = new h(e, t);
1836
- 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);
1837
- const s = new h(e, o);
1838
- 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);
1922
+ for (let s = 0; s < 5; s++) {
1923
+ const c = new h(e, t);
1924
+ c.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), c.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), c.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(c);
1925
+ const n = new h(e, o);
1926
+ n.scale.set(c.scale.x * 0.9, c.scale.y * 0.5, c.scale.z * 0.9), n.rotation.copy(c.rotation), n.position.copy(c.position), n.position.y += 0.3, this.add(n);
1839
1927
  }
1840
1928
  }
1841
1929
  }
1842
- class Ft extends h {
1930
+ class Dt extends h {
1843
1931
  constructor(e = 1, t = 4, o = 4) {
1844
- super(), this.geometry = new Ue(e, t, o), this.material = new w({ color: 8421504, flatShading: !0 });
1932
+ super(), this.geometry = new Xe(e, t, o), this.material = new w({ color: 8421504, flatShading: !0 });
1845
1933
  }
1846
1934
  }
1847
- class Ut extends P {
1935
+ class Ht extends P {
1848
1936
  constructor() {
1849
1937
  super();
1850
1938
  const e = new j(1, 0), t = new w({ color: 8421504, flatShading: !0 });
1851
1939
  for (let o = 0; o < 5; o++) {
1852
- const n = new h(e, t);
1853
- n.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), n.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), n.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(n);
1940
+ const s = new h(e, t);
1941
+ 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);
1854
1942
  }
1855
1943
  }
1856
1944
  }
1857
- class zt extends P {
1945
+ class Qt extends P {
1858
1946
  constructor() {
1859
1947
  super();
1860
- const e = new _e(), t = new D({
1948
+ const e = new Ye(), t = new R({
1861
1949
  color: 8965375,
1862
1950
  transparent: !0,
1863
1951
  opacity: 0.4,
@@ -1865,12 +1953,12 @@ class zt extends P {
1865
1953
  metalness: 0.1,
1866
1954
  reflectivity: 0.8,
1867
1955
  transmission: 0.9,
1868
- side: z
1956
+ side: _
1869
1957
  }), o = new h(e, t);
1870
1958
  o.rotation.x = -Math.PI / 2, this.add(o);
1871
1959
  }
1872
1960
  }
1873
- class _t extends P {
1961
+ class jt extends P {
1874
1962
  constructor() {
1875
1963
  super();
1876
1964
  const e = [
@@ -1884,98 +1972,98 @@ class _t extends P {
1884
1972
  // Neck
1885
1973
  new b(0.6, 2.5)
1886
1974
  // Mouth
1887
- ], t = new L(e, 10), o = new G(0.3, 0.4, 0.2, 8), n = new w({
1975
+ ], t = new q(e, 10), o = new S(0.3, 0.4, 0.2, 8), s = new w({
1888
1976
  color: 8965375,
1889
1977
  transparent: !0,
1890
1978
  opacity: 0.5,
1891
1979
  roughness: 0.1,
1892
1980
  metalness: 0.3
1893
- }), a = new w({
1981
+ }), c = new w({
1894
1982
  color: 16724838,
1895
1983
  // Vibrant potion color
1896
1984
  transparent: !0,
1897
1985
  opacity: 0.6
1898
- }), s = new w({
1986
+ }), n = new w({
1899
1987
  color: 9127187,
1900
1988
  roughness: 1
1901
- }), r = new h(t, n), c = new h(t, a), i = new h(o, s);
1902
- c.scale.set(0.8, 0.8, 0.8), c.position.y = 0.1, i.position.y = 2.5;
1989
+ }), a = new h(t, s), i = new h(t, c), l = new h(o, n);
1990
+ i.scale.set(0.8, 0.8, 0.8), i.position.y = 0.1, l.position.y = 2.5;
1903
1991
  const m = new P();
1904
- m.add(r, c, i), this.add(m);
1992
+ m.add(a, i, l), this.add(m);
1905
1993
  }
1906
1994
  }
1907
- class Lt extends P {
1995
+ class Kt extends P {
1908
1996
  constructor() {
1909
1997
  super();
1910
- const e = new G(0.3, 0.4, 0.1, 16), t = new w({
1998
+ const e = new S(0.3, 0.4, 0.1, 16), t = new w({
1911
1999
  color: 3355443,
1912
2000
  roughness: 0.6,
1913
2001
  metalness: 0.3
1914
2002
  }), o = new h(e, t);
1915
2003
  o.position.y = 0.05;
1916
- const n = new G(0.1, 0.1, 0.7, 16), a = new w({
2004
+ const s = new S(0.1, 0.1, 0.7, 16), c = new w({
1917
2005
  color: 5592405,
1918
2006
  roughness: 0.5,
1919
2007
  metalness: 0.4
1920
- }), s = new h(n, a);
1921
- s.position.y = 0.4;
1922
- const r = new _(0.075, 0.2, 16), c = new w({
2008
+ }), n = new h(s, c);
2009
+ n.position.y = 0.4;
2010
+ const a = new L(0.075, 0.2, 16), i = new w({
1923
2011
  color: 16733440,
1924
2012
  emissive: 16733440,
1925
2013
  emissiveIntensity: 0.6,
1926
2014
  transparent: !0,
1927
2015
  opacity: 0.8
1928
- }), i = new h(r, c);
1929
- i.position.y = 0.8, this.add(o, s, i);
2016
+ }), l = new h(a, i);
2017
+ l.position.y = 0.8, this.add(o, n, l);
1930
2018
  }
1931
2019
  }
1932
- class qt extends P {
2020
+ class Jt extends P {
1933
2021
  constructor() {
1934
2022
  super();
1935
2023
  const e = new g(3, 4, 0.1), t = new w({
1936
2024
  color: 3026478,
1937
2025
  roughness: 0.8,
1938
2026
  metalness: 0.6
1939
- }), o = new g(0.2, 0.5, 0.2), n = new w({
2027
+ }), o = new g(0.2, 0.5, 0.2), s = new w({
1940
2028
  color: 11184810,
1941
2029
  roughness: 0.5,
1942
2030
  metalness: 0.7
1943
- }), a = new G(0.3, 0.3, 0.1, 16), s = new w({
2031
+ }), c = new S(0.3, 0.3, 0.1, 16), n = new w({
1944
2032
  color: 5592405,
1945
2033
  roughness: 0.7,
1946
2034
  metalness: 0.5
1947
- }), r = new h(e, t);
2035
+ }), a = new h(e, t);
1948
2036
  for (let y = -1; y <= 1; y++) {
1949
- const I = new h(o, n);
1950
- I.position.set(y, 1.5, 0.1), r.add(I);
2037
+ const G = new h(o, s);
2038
+ G.position.set(y, 1.5, 0.1), a.add(G);
1951
2039
  }
1952
- const c = new h(a, s);
1953
- c.rotation.x = Math.PI / 2, c.position.set(0, 0.5, 0.15), r.add(c);
1954
- const i = new B(0.15, 8, 8), m = new w({
2040
+ const i = new h(c, n);
2041
+ i.rotation.x = Math.PI / 2, i.position.set(0, 0.5, 0.15), a.add(i);
2042
+ const l = new k(0.15, 8, 8), m = new w({
1955
2043
  color: 16711680,
1956
2044
  emissive: 16711680,
1957
2045
  emissiveIntensity: 0.5
1958
- }), u = new h(i, m);
1959
- u.position.set(0, -1, 0.1), r.add(u), this.add(r);
1960
- let f = 0.015, d = 0.8, p = 0.2;
2046
+ }), u = new h(l, m);
2047
+ u.position.set(0, -1, 0.1), a.add(u), this.add(a);
2048
+ let f = 0.015, p = 0.8, d = 0.2;
1961
2049
  function x() {
1962
2050
  requestAnimationFrame(x);
1963
- const y = p + Math.abs(Math.sin(Date.now() * f)) * (d - p);
2051
+ const y = d + Math.abs(Math.sin(Date.now() * f)) * (p - d);
1964
2052
  u.material.emissiveIntensity = y;
1965
2053
  }
1966
2054
  x();
1967
2055
  }
1968
2056
  }
1969
- class Ot extends h {
2057
+ class $t extends h {
1970
2058
  constructor({
1971
2059
  flaskRadius: e = 1,
1972
2060
  //
1973
2061
  neckRadius: t = 0.3,
1974
2062
  height: o = 2.5,
1975
- neckHeight: n = 1,
1976
- radialSegments: a = 16
2063
+ neckHeight: s = 1,
2064
+ radialSegments: c = 16
1977
2065
  } = {}) {
1978
- super(), this.geometry = new Le({ flaskRadius: e, neckRadius: t, height: o, neckHeight: n, radialSegments: a }), this.material = new D({
2066
+ super(), this.geometry = new Re({ flaskRadius: e, neckRadius: t, height: o, neckHeight: s, radialSegments: c }), this.material = new R({
1979
2067
  color: 8965375,
1980
2068
  transparent: !0,
1981
2069
  opacity: 0.4,
@@ -1983,12 +2071,12 @@ class Ot extends h {
1983
2071
  metalness: 0.1,
1984
2072
  reflectivity: 0.8,
1985
2073
  transmission: 0.9,
1986
- side: z,
2074
+ side: _,
1987
2075
  wireframe: !1
1988
2076
  });
1989
2077
  }
1990
2078
  }
1991
- class Vt extends P {
2079
+ class Wt extends P {
1992
2080
  constructor() {
1993
2081
  super();
1994
2082
  const e = [
@@ -2002,41 +2090,41 @@ class Vt extends P {
2002
2090
  // Narrow neck
2003
2091
  new b(0.6, 3.5)
2004
2092
  // Mouth of the flask
2005
- ], t = new L(e, 12), o = new G(0.6, 0.7, 0.3, 8), n = new w({
2093
+ ], t = new q(e, 12), o = new S(0.6, 0.7, 0.3, 8), s = new w({
2006
2094
  color: 8965290,
2007
2095
  transparent: !0,
2008
2096
  opacity: 0.4,
2009
2097
  roughness: 0.1,
2010
2098
  metalness: 0.5
2011
- }), a = new w({
2099
+ }), c = new w({
2012
2100
  color: 9127187,
2013
2101
  roughness: 1
2014
- }), s = new h(t, n), r = new h(o, a);
2015
- r.position.y = 3.5, this.add(s, r);
2102
+ }), n = new h(t, s), a = new h(o, c);
2103
+ a.position.y = 3.5, this.add(n, a);
2016
2104
  }
2017
2105
  }
2018
- class Xt extends P {
2106
+ class eo extends P {
2019
2107
  constructor() {
2020
2108
  super();
2021
2109
  const e = new g(2, 3, 0.1), t = new w({
2022
2110
  color: 3355443,
2023
2111
  roughness: 0.8,
2024
2112
  metalness: 0.5
2025
- }), o = new h(e, t), n = new G(0.1, 0.1, 0.2, 8), a = new G(0.05, 0.05, 1, 8), s = new w({
2113
+ }), o = new h(e, t), s = new S(0.1, 0.1, 0.2, 8), c = new S(0.05, 0.05, 1, 8), n = new w({
2026
2114
  color: 11184810,
2027
2115
  roughness: 0.5,
2028
2116
  metalness: 0.7
2029
2117
  });
2030
- for (let r = -0.5; r <= 0.5; r += 0.5) {
2031
- const c = new h(n, s);
2032
- c.position.set(r, 1, 0.1);
2033
- const i = new h(a, s);
2034
- i.position.y = 0.5, c.add(i), this.add(c);
2118
+ for (let a = -0.5; a <= 0.5; a += 0.5) {
2119
+ const i = new h(s, n);
2120
+ i.position.set(a, 1, 0.1);
2121
+ const l = new h(c, n);
2122
+ l.position.y = 0.5, i.add(l), this.add(i);
2035
2123
  }
2036
2124
  this.add(o);
2037
2125
  }
2038
2126
  }
2039
- class Yt extends P {
2127
+ class to extends P {
2040
2128
  constructor() {
2041
2129
  super();
2042
2130
  const e = new g(1, 0.2, 0.5), t = new w({
@@ -2045,48 +2133,48 @@ class Yt extends P {
2045
2133
  metalness: 0.3
2046
2134
  }), o = new h(e, t);
2047
2135
  o.position.y = 0.1;
2048
- const n = new g(0.2, 1, 0.2), a = new h(n, t);
2049
- a.position.set(0, 0.6, -0.2);
2050
- const s = new G(0.1, 0.1, 0.4, 8), r = new w({
2136
+ const s = new g(0.2, 1, 0.2), c = new h(s, t);
2137
+ c.position.set(0, 0.6, -0.2);
2138
+ const n = new S(0.1, 0.1, 0.4, 8), a = new w({
2051
2139
  color: 3355443,
2052
2140
  roughness: 0.5,
2053
2141
  metalness: 0.6
2054
- }), c = new h(s, r);
2055
- c.position.set(0, 1.1, -0.35), c.rotation.x = -Math.PI / 4;
2056
- const i = new g(0.6, 0.1, 0.6), m = new w({
2142
+ }), i = new h(n, a);
2143
+ i.position.set(0, 1.1, -0.35), i.rotation.x = -Math.PI / 4;
2144
+ const l = new g(0.6, 0.1, 0.6), m = new w({
2057
2145
  color: 5592405,
2058
2146
  roughness: 0.8,
2059
2147
  metalness: 0.2
2060
- }), u = new h(i, m);
2061
- u.position.set(0, 0.6, 0), this.add(o, a, c, u);
2148
+ }), u = new h(l, m);
2149
+ u.position.set(0, 0.6, 0), this.add(o, c, i, u);
2062
2150
  }
2063
2151
  }
2064
- class Zt extends P {
2152
+ class oo extends P {
2065
2153
  constructor() {
2066
2154
  super();
2067
- const e = new qe(), t = new G(0.2, 0.3, 1.5, 8);
2155
+ const e = new De(), t = new S(0.2, 0.3, 1.5, 8);
2068
2156
  t.translate(0, 0.75, 0);
2069
2157
  const o = new w({
2070
2158
  color: 6045747,
2071
2159
  // Dark earthy tone
2072
2160
  roughness: 1,
2073
2161
  metalness: 0,
2074
- side: z
2162
+ side: _
2075
2163
  // Render inside and outside
2076
- }), n = new w({
2164
+ }), s = new w({
2077
2165
  color: 9132587,
2078
2166
  // Slightly lighter earthy color
2079
2167
  roughness: 0.8,
2080
2168
  metalness: 0.1
2081
- }), a = new h(e, o), s = new h(t, n);
2082
- s.position.set(0.3, 1.3, 0), s.rotation.z = Math.PI / 4, this.add(a, s);
2169
+ }), c = new h(e, o), n = new h(t, s);
2170
+ n.position.set(0.3, 1.3, 0), n.rotation.z = Math.PI / 4, this.add(c, n);
2083
2171
  }
2084
2172
  }
2085
- class Dt extends P {
2173
+ class no extends P {
2086
2174
  constructor() {
2087
2175
  super();
2088
- const e = 100, t = 0.05, o = new fe(
2089
- Array.from({ length: e }, (i, m) => {
2176
+ const e = 100, t = 0.05, o = new xe(
2177
+ Array.from({ length: e }, (l, m) => {
2090
2178
  const u = m * 0.2;
2091
2179
  return new M(
2092
2180
  Math.cos(u) * 0.4,
@@ -2095,73 +2183,73 @@ class Dt extends P {
2095
2183
  Math.sin(u) * 0.4
2096
2184
  );
2097
2185
  })
2098
- ), n = new he(o, 200, 0.1, 8, !1), a = new w({
2186
+ ), s = new Me(o, 200, 0.1, 8, !1), c = new w({
2099
2187
  color: 8965375,
2100
2188
  transparent: !0,
2101
2189
  opacity: 0.3,
2102
2190
  roughness: 0.1,
2103
2191
  metalness: 0.2,
2104
2192
  emissive: 8965375
2105
- }), s = new h(n, a);
2106
- this.add(s);
2107
- function r() {
2108
- a.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
2193
+ }), n = new h(s, c);
2194
+ this.add(n);
2195
+ function a() {
2196
+ c.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
2109
2197
  }
2110
- function c() {
2111
- requestAnimationFrame(c), r();
2198
+ function i() {
2199
+ requestAnimationFrame(i), a();
2112
2200
  }
2113
- c();
2201
+ i();
2114
2202
  }
2115
2203
  }
2116
- class Ht extends h {
2204
+ class so extends h {
2117
2205
  constructor({
2118
2206
  radius: e = 0.3,
2119
2207
  //
2120
2208
  height: t = 0.4,
2121
2209
  count: o = 3,
2122
- thickness: n = 0.03,
2123
- radialSegments: a = 16
2210
+ thickness: s = 0.03,
2211
+ radialSegments: c = 16
2124
2212
  } = {}) {
2125
- super(), this.geometry = new Oe({ radius: e, height: t, count: o, thickness: n, radialSegments: a }), this.material = new w({
2213
+ super(), this.geometry = new He({ radius: e, height: t, count: o, thickness: s, radialSegments: c }), this.material = new w({
2126
2214
  color: 8947848,
2127
2215
  roughness: 0.7,
2128
2216
  metalness: 0.3
2129
2217
  });
2130
2218
  }
2131
2219
  }
2132
- class Rt extends P {
2220
+ class ro extends P {
2133
2221
  constructor() {
2134
2222
  super();
2135
- const e = new G(0.5, 0.6, 0.3, 16), t = new w({
2223
+ const e = new S(0.5, 0.6, 0.3, 16), t = new w({
2136
2224
  color: 3355443,
2137
2225
  roughness: 0.6,
2138
2226
  metalness: 0.5
2139
2227
  }), o = new h(e, t);
2140
2228
  o.position.y = 0.15;
2141
- const n = new G(0.15, 0.15, 2, 12, 1, !0), a = new w({
2229
+ const s = new S(0.15, 0.15, 2, 12, 1, !0), c = new w({
2142
2230
  color: 16737792,
2143
2231
  roughness: 0.5,
2144
2232
  metalness: 0.8,
2145
- side: z
2146
- }), s = new h(n, a);
2147
- s.position.y = 1.3;
2148
- const r = new B(0.3, 16, 16), c = new h(r, a);
2149
- c.position.y = 2.4, this.add(o, s, c);
2150
- const i = [];
2233
+ side: _
2234
+ }), n = new h(s, c);
2235
+ n.position.y = 1.3;
2236
+ const a = new k(0.3, 16, 16), i = new h(a, c);
2237
+ i.position.y = 2.4, this.add(o, n, i);
2238
+ const l = [];
2151
2239
  for (let f = 0; f < 5; f++) {
2152
- const d = new pe({ color: 10079487 }), p = [
2240
+ const p = new ve({ color: 10079487 }), d = [
2153
2241
  new M(0, 2.4, 0),
2154
2242
  new M((Math.random() - 0.5) * 1.5, Math.random() * 2.4, (Math.random() - 0.5) * 1.5)
2155
- ], x = new v().setFromPoints(p), y = new de(x, d);
2156
- this.add(y), i.push(y);
2243
+ ], x = new v().setFromPoints(d), y = new ge(x, p);
2244
+ this.add(y), l.push(y);
2157
2245
  }
2158
2246
  function m() {
2159
- i.forEach((f) => {
2160
- const d = [
2247
+ l.forEach((f) => {
2248
+ const p = [
2161
2249
  new M(0, 2.4, 0),
2162
2250
  new M((Math.random() - 0.5) * 1.5, Math.random() * 2.4, (Math.random() - 0.5) * 1.5)
2163
2251
  ];
2164
- f.geometry.setFromPoints(d);
2252
+ f.geometry.setFromPoints(p);
2165
2253
  });
2166
2254
  }
2167
2255
  function u() {
@@ -2170,10 +2258,10 @@ class Rt extends P {
2170
2258
  u();
2171
2259
  }
2172
2260
  }
2173
- class Qt extends P {
2174
- constructor(e = 0.2, t = 0.2, o = 3, n = 32) {
2261
+ class ao extends P {
2262
+ constructor(e = 0.2, t = 0.2, o = 3, s = 32) {
2175
2263
  super();
2176
- const a = new Q(e, t, o, n), s = new D({
2264
+ const c = new Q(e, t, o, s), n = new R({
2177
2265
  color: 8965375,
2178
2266
  transparent: !0,
2179
2267
  opacity: 0.4,
@@ -2182,48 +2270,48 @@ class Qt extends P {
2182
2270
  reflectivity: 0.8,
2183
2271
  transmission: 0.9,
2184
2272
  // For glass effect
2185
- side: z
2186
- }), r = new h(a, s);
2187
- this.add(r);
2273
+ side: _
2274
+ }), a = new h(c, n);
2275
+ this.add(a);
2188
2276
  }
2189
2277
  }
2190
- class jt extends P {
2278
+ class co extends P {
2191
2279
  constructor(e = 3, t = [65450, 16711850, 11141375]) {
2192
2280
  super();
2193
- const o = new g(3, 0.2, 1), n = new w({
2281
+ const o = new g(3, 0.2, 1), s = new w({
2194
2282
  color: 9127187,
2195
2283
  // Wooden color or change to metallic tone
2196
2284
  roughness: 0.7,
2197
2285
  metalness: 0.3
2198
- }), a = new h(o, n);
2199
- a.position.y = 0.5;
2200
- const s = new Q(0.1, 0.1, 1, 16), r = new w({
2286
+ }), c = new h(o, s);
2287
+ c.position.y = 0.5;
2288
+ const n = new Q(0.1, 0.1, 1, 16), a = new w({
2201
2289
  color: 11184810,
2202
2290
  transparent: !0,
2203
2291
  opacity: 0.4,
2204
2292
  roughness: 0.1,
2205
2293
  metalness: 0.5,
2206
- side: z
2294
+ side: _
2207
2295
  });
2208
- for (let c = 0; c < e; c++) {
2209
- const i = new h(s, r), m = (c - (e - 1) / 2) * 0.8;
2210
- i.position.set(m, 1, 0);
2211
- const u = new Q(0.099, 0.099, 0.5, 16, !1), f = t[c % t.length], d = new w({
2296
+ for (let i = 0; i < e; i++) {
2297
+ const l = new h(n, a), m = (i - (e - 1) / 2) * 0.8;
2298
+ l.position.set(m, 1, 0);
2299
+ const u = new Q(0.099, 0.099, 0.5, 16, !1), f = t[i % t.length], p = new w({
2212
2300
  color: f,
2213
2301
  emissive: f,
2214
2302
  emissiveIntensity: 0.5,
2215
2303
  transparent: !0,
2216
2304
  opacity: 0.6
2217
- }), p = new h(u, d);
2218
- p.position.set(0, -0.25, 0), i.add(p), a.add(i);
2305
+ }), d = new h(u, p);
2306
+ d.position.set(0, -0.25, 0), l.add(d), c.add(l);
2219
2307
  }
2220
- this.add(a);
2308
+ this.add(c);
2221
2309
  }
2222
2310
  }
2223
- class Kt extends h {
2311
+ class io extends h {
2224
2312
  constructor() {
2225
2313
  super();
2226
- const e = new Ve(), t = new D({
2314
+ const e = new Qe(), t = new R({
2227
2315
  color: 5597999,
2228
2316
  roughness: 0.1,
2229
2317
  transmission: 0.9,
@@ -2236,27 +2324,27 @@ class Kt extends h {
2236
2324
  this.geometry = e, this.material = t;
2237
2325
  }
2238
2326
  }
2239
- class He extends q {
2327
+ class We extends O {
2240
2328
  constructor(e = 5, t = 0.5, o = 1) {
2241
2329
  super();
2242
- const n = Math.PI * 2 / e, a = n / 2, s = n / 4;
2330
+ const s = Math.PI * 2 / e, c = s / 2, n = s / 4;
2243
2331
  this.moveTo(Math.cos(0) * o, -Math.sin(0) * o);
2244
- for (let r = 1; r <= e; ++r) {
2245
- let c = Math.cos(n * r - s * 3) * (t / Math.cos(s)), i = -Math.sin(n * r - s * 3) * (t / Math.cos(s)), m = Math.cos(n * r - a) * t, u = -Math.sin(n * r - a) * t;
2246
- this.quadraticCurveTo(c, i, m, u), c = Math.cos(n * r - s) * (t / Math.cos(s)), i = -Math.sin(n * r - s) * (t / Math.cos(s)), m = Math.cos(n * r) * o, u = -Math.sin(n * r) * o, this.quadraticCurveTo(c, i, m, u);
2332
+ for (let a = 1; a <= e; ++a) {
2333
+ let i = Math.cos(s * a - n * 3) * (t / Math.cos(n)), l = -Math.sin(s * a - n * 3) * (t / Math.cos(n)), m = Math.cos(s * a - c) * t, u = -Math.sin(s * a - c) * t;
2334
+ this.quadraticCurveTo(i, l, m, u), i = Math.cos(s * a - n) * (t / Math.cos(n)), l = -Math.sin(s * a - n) * (t / Math.cos(n)), m = Math.cos(s * a) * o, u = -Math.sin(s * a) * o, this.quadraticCurveTo(i, l, m, u);
2247
2335
  }
2248
2336
  this.closePath();
2249
2337
  }
2250
2338
  }
2251
- class Jt extends h {
2252
- constructor(e = 5, t = 0.5, o = 1, n = 0.25) {
2339
+ class lo extends h {
2340
+ constructor(e = 5, t = 0.5, o = 1, s = 0.25) {
2253
2341
  super();
2254
- const a = new He(e, t, o), s = new O(a, {
2255
- depth: n,
2256
- bevelEnabled: n > 0,
2342
+ const c = new We(e, t, o), n = new V(c, {
2343
+ depth: s,
2344
+ bevelEnabled: s > 0,
2257
2345
  bevelThickness: 0,
2258
2346
  bevelSize: 0
2259
- }), r = new w({
2347
+ }), a = new w({
2260
2348
  color: 16776960,
2261
2349
  emissive: 16766720,
2262
2350
  emissiveIntensity: 0.25,
@@ -2264,44 +2352,44 @@ class Jt extends h {
2264
2352
  roughness: 0.3,
2265
2353
  flatShading: !0
2266
2354
  });
2267
- s.center(), this.geometry = s, this.material = r;
2355
+ n.center(), this.geometry = n, this.material = a;
2268
2356
  }
2269
2357
  }
2270
- class Re extends q {
2271
- constructor(e = 5, t = 0.5, o = 1, n = 5, a = 0.25) {
2358
+ class et extends O {
2359
+ constructor(e = 5, t = 0.5, o = 1, s = 5, c = 0.25) {
2272
2360
  super();
2273
- const s = Math.PI * 2 / e, r = s / 4;
2361
+ const n = Math.PI * 2 / e, a = n / 4;
2274
2362
  this.moveTo(Math.cos(0) * o, -Math.sin(0) * o);
2275
- for (let c = 1; c <= e; ++c)
2276
- this.lineTo(Math.cos(s * c - r * 3) * t, -Math.sin(s * c - r * 3) * t), this.lineTo(Math.cos(s * c - r * 2) * t, -Math.sin(s * c - r * 2) * t), this.lineTo(Math.cos(s * c - r) * o, -Math.sin(s * c - r) * o), this.lineTo(Math.cos(s * c) * o, -Math.sin(s * c) * o);
2277
- if (this.closePath(), a > 0 && n > 2) {
2278
- const c = new we(), i = Math.PI * 2 / n;
2279
- c.moveTo(Math.cos(0) * a, -Math.sin(0) * a);
2280
- for (let m = 1; m < n; ++m)
2281
- c.lineTo(Math.cos(i * m) * a, -Math.sin(i * m) * a);
2282
- c.lineTo(Math.cos(0) * a, -Math.sin(0) * a), this.holes.push(c);
2363
+ for (let i = 1; i <= e; ++i)
2364
+ this.lineTo(Math.cos(n * i - a * 3) * t, -Math.sin(n * i - a * 3) * t), this.lineTo(Math.cos(n * i - a * 2) * t, -Math.sin(n * i - a * 2) * t), this.lineTo(Math.cos(n * i - a) * o, -Math.sin(n * i - a) * o), this.lineTo(Math.cos(n * i) * o, -Math.sin(n * i) * o);
2365
+ if (this.closePath(), c > 0 && s > 2) {
2366
+ const i = new be(), l = Math.PI * 2 / s;
2367
+ i.moveTo(Math.cos(0) * c, -Math.sin(0) * c);
2368
+ for (let m = 1; m < s; ++m)
2369
+ i.lineTo(Math.cos(l * m) * c, -Math.sin(l * m) * c);
2370
+ i.lineTo(Math.cos(0) * c, -Math.sin(0) * c), this.holes.push(i);
2283
2371
  }
2284
2372
  }
2285
2373
  }
2286
- class $t extends h {
2287
- constructor(e = 5, t = 0.5, o = 1, n = 5, a = 0.25, s = 0.25) {
2374
+ class mo extends h {
2375
+ constructor(e = 5, t = 0.5, o = 1, s = 5, c = 0.25, n = 0.25) {
2288
2376
  super();
2289
- const r = new Re(e, t, o, n, a), c = new O(r, {
2290
- depth: s,
2291
- bevelEnabled: s > 0,
2377
+ const a = new et(e, t, o, s, c), i = new V(a, {
2378
+ depth: n,
2379
+ bevelEnabled: n > 0,
2292
2380
  bevelThickness: 0,
2293
2381
  bevelSize: 0
2294
- }), i = new w({
2382
+ }), l = new w({
2295
2383
  color: 11184810,
2296
2384
  metalness: 0.8,
2297
2385
  roughness: 0.2,
2298
2386
  reflectivity: 0.5
2299
2387
  });
2300
- c.center(), this.geometry = c, this.material = i;
2388
+ i.center(), this.geometry = i, this.material = l;
2301
2389
  }
2302
2390
  }
2303
- class Qe extends q {
2304
- constructor(e = 1, t = 2.1, o = 1.4, n = 1.6) {
2391
+ class tt extends O {
2392
+ constructor(e = 1, t = 2.1, o = 1.4, s = 1.6) {
2305
2393
  super(), this.moveTo(0, o * e / 3), this.bezierCurveTo(
2306
2394
  -t * 0.375 * e,
2307
2395
  o * e,
@@ -2310,7 +2398,7 @@ class Qe extends q {
2310
2398
  o * e / 3,
2311
2399
  // Control point 2 for the left side of the heart
2312
2400
  0,
2313
- -n * e
2401
+ -s * e
2314
2402
  // Bottom tip of the heart, controlled by `tipDepth`
2315
2403
  ), this.bezierCurveTo(
2316
2404
  t * e,
@@ -2325,15 +2413,15 @@ class Qe extends q {
2325
2413
  );
2326
2414
  }
2327
2415
  }
2328
- class Wt extends h {
2329
- constructor(e = 1, t = 1, o = 1, n = 10, a = 0.25) {
2416
+ class uo extends h {
2417
+ constructor(e = 1, t = 1, o = 1, s = 10, c = 0.25) {
2330
2418
  super();
2331
- const s = new Qe(e, t, o, n), r = new O(s, {
2332
- depth: a,
2333
- bevelEnabled: a > 0,
2419
+ const n = new tt(e, t, o, s), a = new V(n, {
2420
+ depth: c,
2421
+ bevelEnabled: c > 0,
2334
2422
  bevelThickness: 0,
2335
2423
  bevelSize: 0
2336
- }), c = new w({
2424
+ }), i = new w({
2337
2425
  color: 12986408,
2338
2426
  emissive: 12981270,
2339
2427
  emissiveIntensity: 0.25,
@@ -2341,28 +2429,28 @@ class Wt extends h {
2341
2429
  roughness: 0.3,
2342
2430
  flatShading: !0
2343
2431
  });
2344
- r.center(), this.geometry = r, this.material = c;
2432
+ a.center(), this.geometry = a, this.material = i;
2345
2433
  }
2346
2434
  }
2347
- class je extends q {
2435
+ class ot extends O {
2348
2436
  constructor(e = 5, t = 0.5, o = 1) {
2349
2437
  super();
2350
- const n = Math.PI * 2 / e, a = n / 2;
2438
+ const s = Math.PI * 2 / e, c = s / 2;
2351
2439
  this.moveTo(Math.cos(0) * o, Math.sin(0) * o);
2352
- for (let s = 1; s <= e; ++s)
2353
- this.lineTo(Math.cos(n * s - a) * t, Math.sin(n * s - a) * t), this.lineTo(Math.cos(n * s) * o, Math.sin(n * s) * o);
2440
+ for (let n = 1; n <= e; ++n)
2441
+ this.lineTo(Math.cos(s * n - c) * t, Math.sin(s * n - c) * t), this.lineTo(Math.cos(s * n) * o, Math.sin(s * n) * o);
2354
2442
  this.closePath();
2355
2443
  }
2356
2444
  }
2357
- class eo extends h {
2358
- constructor(e = 5, t = 0.5, o = 1, n = 0.25) {
2445
+ class fo extends h {
2446
+ constructor(e = 5, t = 0.5, o = 1, s = 0.25) {
2359
2447
  super();
2360
- const a = new je(e, t, o), s = new O(a, {
2361
- depth: n,
2362
- bevelEnabled: n > 0,
2448
+ const c = new ot(e, t, o), n = new V(c, {
2449
+ depth: s,
2450
+ bevelEnabled: s > 0,
2363
2451
  bevelThickness: 0,
2364
2452
  bevelSize: 0
2365
- }), r = new w({
2453
+ }), a = new w({
2366
2454
  color: 16776960,
2367
2455
  emissive: 16766720,
2368
2456
  emissiveIntensity: 0.25,
@@ -2370,96 +2458,96 @@ class eo extends h {
2370
2458
  roughness: 0.3,
2371
2459
  flatShading: !0
2372
2460
  });
2373
- s.center(), this.geometry = s, this.material = r;
2461
+ n.center(), this.geometry = n, this.material = a;
2374
2462
  }
2375
2463
  }
2376
- class to extends h {
2464
+ class ho extends h {
2377
2465
  constructor() {
2378
- super(), this.geometry = new ze(), this.material = new w({ color: 16777215 });
2466
+ super(), this.geometry = new Ze(), this.material = new w({ color: 16777215 });
2379
2467
  }
2380
2468
  }
2381
- class oo extends h {
2469
+ class po extends h {
2382
2470
  constructor({
2383
2471
  trunkRadiusTop: e = 0.25,
2384
2472
  trunkRadiusBottom: t = 0.4,
2385
2473
  trunkHeight: o = 2.5,
2386
- trunkSegments: n = 14,
2387
- trunkColor: a = 9127187,
2388
- leafSize: s = 0.8,
2389
- leafCount: r = 6,
2390
- leafDetail: c = 0,
2391
- leafSpreadRadius: i = 1.5,
2474
+ trunkSegments: s = 14,
2475
+ trunkColor: c = 9127187,
2476
+ leafSize: n = 0.8,
2477
+ leafCount: a = 6,
2478
+ leafDetail: i = 0,
2479
+ leafSpreadRadius: l = 1.5,
2392
2480
  leafColor: m = 2263842
2393
2481
  } = {}) {
2394
2482
  super();
2395
- const u = new De({
2483
+ const u = new $e({
2396
2484
  trunkRadiusTop: e,
2397
2485
  trunkRadiusBottom: t,
2398
2486
  trunkHeight: o,
2399
- trunkSegments: n,
2400
- trunkColor: a,
2401
- leafSize: s,
2402
- leafCount: r,
2403
- leafDetail: c,
2404
- leafSpreadRadius: i,
2487
+ trunkSegments: s,
2488
+ trunkColor: c,
2489
+ leafSize: n,
2490
+ leafCount: a,
2491
+ leafDetail: i,
2492
+ leafSpreadRadius: l,
2405
2493
  leafColor: m
2406
2494
  }), f = new w({
2407
- color: a,
2495
+ color: c,
2408
2496
  roughness: 0.9,
2409
2497
  metalness: 0,
2410
2498
  flatShading: !0
2411
- }), d = new w({
2499
+ }), p = new w({
2412
2500
  color: m,
2413
2501
  roughness: 0.8,
2414
2502
  metalness: 0,
2415
2503
  flatShading: !0
2416
2504
  });
2417
- this.geometry = u, this.material = [f, d];
2505
+ this.geometry = u, this.material = [f, p];
2418
2506
  }
2419
2507
  }
2420
- class so extends h {
2508
+ class wo extends h {
2421
2509
  constructor({
2422
2510
  radius: e = 3,
2423
2511
  //
2424
2512
  height: t = 0.6,
2425
2513
  widthSegments: o = 64,
2426
- heightSegments: n = 16,
2427
- phiStart: a = 0,
2428
- phiLength: s = Math.PI * 2
2514
+ heightSegments: s = 16,
2515
+ phiStart: c = 0,
2516
+ phiLength: n = Math.PI * 2
2429
2517
  } = {}) {
2430
- super(), this.geometry = new Xe({
2518
+ super(), this.geometry = new je({
2431
2519
  radius: e,
2432
2520
  height: t,
2433
2521
  widthSegments: o,
2434
- heightSegments: n,
2435
- phiStart: a,
2436
- phiLength: s
2522
+ heightSegments: s,
2523
+ phiStart: c,
2524
+ phiLength: n
2437
2525
  }), this.material = new w({ color: 65280, flatShading: !0 });
2438
2526
  }
2439
2527
  }
2440
- class no extends h {
2528
+ class yo extends h {
2441
2529
  constructor({
2442
- radius: e = ae(5, Math.PI / 10),
2530
+ radius: e = ue(5, Math.PI / 10),
2443
2531
  //
2444
2532
  widthSegments: t = 64,
2445
2533
  heightSegments: o = 32,
2446
- phiStart: n = 0,
2447
- phiLength: a = Math.PI * 2,
2448
- thetaLength: s = Math.PI / 10
2534
+ phiStart: s = 0,
2535
+ phiLength: c = Math.PI * 2,
2536
+ thetaLength: n = Math.PI / 10
2449
2537
  } = {}) {
2450
- super(), this.geometry = new Ze({
2538
+ super(), this.geometry = new Je({
2451
2539
  radius: e,
2452
2540
  widthSegments: t,
2453
2541
  heightSegments: o,
2454
- phiStart: n,
2455
- phiLength: a,
2456
- thetaLength: s
2542
+ phiStart: s,
2543
+ phiLength: c,
2544
+ thetaLength: n
2457
2545
  }), this.material = new w({ color: 65280, flatShading: !0 });
2458
2546
  }
2459
2547
  }
2460
- function ro(l, { time: e = 0, waveFrequency: t = 0.2, waveAmplitude: o = 0.5 } = {}) {
2461
- l.onBeforeCompile = (n) => {
2462
- n.uniforms.time = { value: e }, n.uniforms.waveFrequency = { value: t }, n.uniforms.waveAmplitude = { value: o }, n.vertexShader = `
2548
+ function xo(r, { time: e = 0, waveFrequency: t = 0.2, waveAmplitude: o = 0.5 } = {}) {
2549
+ r.onBeforeCompile = (s) => {
2550
+ s.uniforms.time = { value: e }, s.uniforms.waveFrequency = { value: t }, s.uniforms.waveAmplitude = { value: o }, s.vertexShader = `
2463
2551
  uniform float time;
2464
2552
  uniform float waveFrequency;
2465
2553
  uniform float waveAmplitude;
@@ -2473,20 +2561,20 @@ function ro(l, { time: e = 0, waveFrequency: t = 0.2, waveAmplitude: o = 0.5 } =
2473
2561
 
2474
2562
  return displaced;
2475
2563
  }
2476
- ` + n.vertexShader, n.vertexShader = n.vertexShader.replace(
2564
+ ` + s.vertexShader, s.vertexShader = s.vertexShader.replace(
2477
2565
  "#include <begin_vertex>",
2478
2566
  `
2479
2567
  vec3 transformed = waterDisplacement(position, normal);
2480
2568
  `
2481
- ), l.userData.shader = n;
2569
+ ), r.userData.shader = s;
2482
2570
  };
2483
2571
  }
2484
- function ao(l, e) {
2485
- l.userData.shader && (l.userData.shader.uniforms.time.value += e);
2572
+ function Mo(r, e) {
2573
+ r.userData.shader && (r.userData.shader.uniforms.time.value += e);
2486
2574
  }
2487
- function co(l, { time: e = 0, intensity: t = 1, direction: o = F.XYZ, scale: n = 10 } = {}) {
2488
- l.onBeforeCompile = (a) => {
2489
- a.uniforms.time = { value: e }, a.uniforms.direction = { value: o }, a.uniforms.intensity = { value: t }, a.uniforms.scale = { value: n }, a.vertexShader = `
2575
+ function vo(r, { time: e = 0, intensity: t = 1, direction: o = z.XYZ, scale: s = 10 } = {}) {
2576
+ r.onBeforeCompile = (c) => {
2577
+ c.uniforms.time = { value: e }, c.uniforms.direction = { value: o }, c.uniforms.intensity = { value: t }, c.uniforms.scale = { value: s }, c.vertexShader = `
2490
2578
  uniform float time;
2491
2579
  uniform vec3 direction;
2492
2580
  uniform float intensity;
@@ -2517,7 +2605,7 @@ function co(l, { time: e = 0, intensity: t = 1, direction: o = F.XYZ, scale: n =
2517
2605
 
2518
2606
  return o4.y * d.y + o4.x * (1.0 - d.y);
2519
2607
  }
2520
- ` + a.vertexShader, a.vertexShader = a.vertexShader.replace(
2608
+ ` + c.vertexShader, c.vertexShader = c.vertexShader.replace(
2521
2609
  "#include <begin_vertex>",
2522
2610
  `
2523
2611
  vec3 transformed = vec3(position);
@@ -2525,13 +2613,13 @@ function co(l, { time: e = 0, intensity: t = 1, direction: o = F.XYZ, scale: n =
2525
2613
  transformed += normalize(direction) * n * intensity;
2526
2614
  vec3 transformedNormal = normal;
2527
2615
  `
2528
- ), l.userData.shader = a;
2616
+ ), r.userData.shader = c;
2529
2617
  };
2530
2618
  }
2531
- function io(l, e) {
2532
- l.userData.shader && (l.userData.shader.uniforms.time.value += e);
2619
+ function go(r, e) {
2620
+ r.userData.shader && (r.userData.shader.uniforms.time.value += e);
2533
2621
  }
2534
- const te = {
2622
+ const ne = {
2535
2623
  uniforms: {},
2536
2624
  vertexShader: `
2537
2625
  varying vec3 vPosition;
@@ -2549,7 +2637,7 @@ const te = {
2549
2637
  gl_FragColor = vec4(mix(bottomColor, topColor, y), 1.0);
2550
2638
  }
2551
2639
  `
2552
- }, Ke = {
2640
+ }, nt = {
2553
2641
  uniforms: {
2554
2642
  tDiffuse: { value: null },
2555
2643
  opacity: { value: 1 }
@@ -2570,10 +2658,10 @@ const te = {
2570
2658
  gl_FragColor = opacity * texel;
2571
2659
  }
2572
2660
  `
2573
- }, R = {
2661
+ }, H = {
2574
2662
  uniforms: {
2575
- topColor: { value: new $(51) },
2576
- bottomColor: { value: new $(17) },
2663
+ topColor: { value: new ee(51) },
2664
+ bottomColor: { value: new ee(17) },
2577
2665
  offset: { value: 33 },
2578
2666
  exponent: { value: 0.6 }
2579
2667
  },
@@ -2597,180 +2685,207 @@ const te = {
2597
2685
  }
2598
2686
  `
2599
2687
  };
2600
- class lo extends h {
2688
+ class bo extends h {
2601
2689
  constructor(e = 1e3) {
2602
2690
  super(), this.geometry = new g(e, e, e), this.material = new K({
2603
- vertexShader: te.vertexShader,
2604
- fragmentShader: te.fragmentShader,
2605
- side: ne
2691
+ vertexShader: ne.vertexShader,
2692
+ fragmentShader: ne.fragmentShader,
2693
+ side: ae
2606
2694
  });
2607
2695
  }
2608
2696
  }
2609
- class mo extends h {
2697
+ class So extends h {
2610
2698
  constructor(e = 1e3) {
2611
- super(), this.geometry = new B(e, 32, 15), this.material = new K({
2612
- vertexShader: R.vertexShader,
2613
- fragmentShader: R.fragmentShader,
2614
- uniforms: R.uniforms,
2615
- side: ne
2699
+ super(), this.geometry = new k(e, 32, 15), this.material = new K({
2700
+ vertexShader: H.vertexShader,
2701
+ fragmentShader: H.fragmentShader,
2702
+ uniforms: H.uniforms,
2703
+ side: ae
2616
2704
  });
2617
2705
  }
2618
2706
  }
2619
- class uo extends h {
2620
- constructor(e = Math.PI * 0.49, t = 2 * Math.PI * 0.25, o = 10, n = 2, a = 5e-3, s = 0.8) {
2707
+ class Go extends h {
2708
+ constructor(e = Math.PI * 0.49, t = 2 * Math.PI * 0.25, o = 10, s = 2, c = 5e-3, n = 0.8) {
2621
2709
  super();
2622
- const r = new be();
2623
- r.scale.setScalar(45e4), this.add(r);
2624
- const c = r.material.uniforms;
2625
- c.turbidity.value = o, c.rayleigh.value = n, c.mieCoefficient.value = a, c.mieDirectionalG.value = s, this.skyUniforms = c, this.sunPosition(e, t);
2710
+ const a = new Be();
2711
+ a.scale.setScalar(45e4), this.add(a);
2712
+ const i = a.material.uniforms;
2713
+ i.turbidity.value = o, i.rayleigh.value = s, i.mieCoefficient.value = c, i.mieDirectionalG.value = n, this.skyUniforms = i, this.sunPosition(e, t);
2626
2714
  }
2627
2715
  sunPosition(e, t) {
2628
- const o = new M(), n = this.skyUniforms;
2629
- o.setFromSphericalCoords(1, e, t), n.sunPosition.value.copy(o);
2716
+ const o = new M(), s = this.skyUniforms;
2717
+ o.setFromSphericalCoords(1, e, t), s.sunPosition.value.copy(o);
2630
2718
  }
2631
2719
  }
2632
- const fo = (l) => {
2633
- const e = new Uint8Array(4 * l * l);
2634
- for (let o = 0; o < l * l; o++) {
2635
- const n = o * 4, a = (o % l ^ Math.floor(o / l)) & 1 ? 255 : 0;
2636
- e[n] = a, e[n + 1] = a, e[n + 2] = a, e[n + 3] = 255;
2720
+ const Io = (r) => {
2721
+ const e = new Uint8Array(4 * r * r);
2722
+ for (let o = 0; o < r * r; o++) {
2723
+ const s = o * 4, c = (o % r ^ Math.floor(o / r)) & 1 ? 255 : 0;
2724
+ e[s] = c, e[s + 1] = c, e[s + 2] = c, e[s + 3] = 255;
2637
2725
  }
2638
- const t = new ye(e, l, l, xe, Me);
2639
- return t.wrapS = W, t.wrapT = W, t.minFilter = ve, t.needsUpdate = !0, t;
2726
+ const t = new Se(e, r, r, Ge, Ie);
2727
+ return t.wrapS = te, t.wrapT = te, t.minFilter = Pe, t.needsUpdate = !0, t;
2640
2728
  };
2641
- function ho(l) {
2642
- const t = new ge().setFromObject(l).getCenter(new M());
2643
- l.translateX(-t.x), l.translateY(-t.y), l.translateZ(-t.z), l.updateMatrixWorld(!0);
2644
- }
2645
- function po(l) {
2646
- l.geometry.computeBoundingBox();
2647
- const t = l.geometry.boundingBox.getCenter(new M());
2648
- l.geometry.translate(-t.x, -t.y, -t.z);
2649
- }
2650
- class wo {
2729
+ function Po(r) {
2730
+ const e = new J().setFromObject(r), t = new M();
2731
+ e.getCenter(t), r.position.sub(t);
2732
+ }
2733
+ function Ao(r, e = new M(0, 0, 0)) {
2734
+ const t = new J().setFromObject(r), o = new M();
2735
+ t.getCenter(o);
2736
+ const s = new M().subVectors(e, o);
2737
+ r.position.add(s);
2738
+ }
2739
+ function Bo(r) {
2740
+ r.computeBoundingBox();
2741
+ const t = r.boundingBox.getCenter(new M());
2742
+ r.translateX(-t.x), r.translateY(-t.y), r.translateZ(-t.z);
2743
+ }
2744
+ function ko(r) {
2745
+ const t = new J().setFromObject(r).getCenter(new M());
2746
+ r.translateX(-t.x), r.translateY(-t.y), r.translateZ(-t.z), r.updateMatrixWorld(!0);
2747
+ }
2748
+ function To(r) {
2749
+ r.geometry.computeBoundingBox();
2750
+ const t = r.geometry.boundingBox.getCenter(new M());
2751
+ r.geometry.translate(-t.x, -t.y, -t.z);
2752
+ }
2753
+ class Eo {
2651
2754
  static dispose(e) {
2652
2755
  e == null || e.traverse((t) => {
2653
2756
  t.geometry && t.geometry.dispose(), t.material && (Array.isArray(t.material) ? t.material.forEach((o) => o.dispose()) : t.material.dispose());
2654
2757
  });
2655
2758
  }
2656
- static fadeBetween(e, t, o, n, a = 1) {
2657
- const s = new Ge(e), r = new ee(o, t);
2658
- s.addPass(r);
2659
- const c = new Ie(Ke);
2660
- c.uniforms.opacity.value = 1, s.addPass(c);
2661
- let i = null;
2759
+ static fadeBetween(e, t, o, s, c = 1) {
2760
+ const n = new ke(e), a = new oe(o, t);
2761
+ n.addPass(a);
2762
+ const i = new Te(nt);
2763
+ i.uniforms.opacity.value = 1, n.addPass(i);
2764
+ let l = null;
2662
2765
  function m(f) {
2663
- i || (i = f);
2664
- const p = (f - i) / 1e3 / a;
2665
- c.uniforms.opacity.value = Math.max(1 - p, 0), p < 1 ? (s.render(), requestAnimationFrame(m)) : (s.passes[0] = new ee(n, t), i = null, requestAnimationFrame(u));
2766
+ l || (l = f);
2767
+ const d = (f - l) / 1e3 / c;
2768
+ i.uniforms.opacity.value = Math.max(1 - d, 0), d < 1 ? (n.render(), requestAnimationFrame(m)) : (n.passes[0] = new oe(s, t), l = null, requestAnimationFrame(u));
2666
2769
  }
2667
2770
  function u(f) {
2668
- i || (i = f);
2669
- const p = (f - i) / 1e3 / a;
2670
- c.uniforms.opacity.value = Math.min(p, 1), p < 1 && (s.render(), requestAnimationFrame(u));
2771
+ l || (l = f);
2772
+ const d = (f - l) / 1e3 / c;
2773
+ i.uniforms.opacity.value = Math.min(d, 1), d < 1 && (n.render(), requestAnimationFrame(u));
2671
2774
  }
2672
2775
  requestAnimationFrame(m);
2673
2776
  }
2674
2777
  }
2675
2778
  export {
2676
- zt as Beaker,
2677
- _e as BeakerGeometry,
2678
- ut as BifurcatedStaircaseGeometry,
2679
- to as Bone,
2680
- ze as BoneGeometry,
2681
- vt as Book,
2682
- Pe as BookGeometry,
2683
- Bt as Bookshelf,
2684
- Ne as BookshelfGeometry,
2685
- _t as Bottle,
2686
- mt as Bubbling,
2687
- Lt as BunsenBurner,
2688
- Jt as Burst,
2689
- He as BurstShape,
2690
- Et as Candle,
2691
- gt as CrossHeadstone,
2692
- Ae as CrossHeadstoneGeometry,
2693
- lo as DaySkybox,
2694
- Tt as Desk,
2695
- ft as DioramaGeometry,
2696
- F as Direction,
2697
- lt as Easing,
2698
- qt as ElectricPanel,
2699
- Ot as ErlenmeyerFlask,
2700
- Le as ErlenmeyerFlaskGeometry,
2701
- V as Falloff,
2702
- Pt as FenceColumn,
2703
- Ee as FenceColumnGeometry,
2704
- Vt as Flask,
2705
- $t as Gear,
2706
- Re as GearShape,
2707
- Wt as Heart,
2708
- Qe as HeartShape,
2709
- so as Hill,
2710
- Xe as HillGeometry,
2711
- ht as LShapedStaircaseGeometry,
2712
- Ct as Lantern,
2713
- Xt as LeverPanel,
2714
- St as Mausoleum,
2715
- Yt as Microscope,
2716
- Mt as Moon,
2717
- Zt as MortarAndPestle,
2718
- qe as MortarGeometry,
2719
- Nt as MossyRocks,
2720
- no as Mound,
2721
- Ze as MoundGeometry,
2722
- mo as NightSkybox,
2723
- bt as ObeliskHeadstone,
2724
- ke as ObeliskHeadstoneGeometry,
2725
- Ft as Rock,
2726
- Ue as RockGeometry,
2727
- Ut as Rocks,
2728
- Gt as RoundedHeadstone,
2729
- Be as RoundedHeadstoneGeometry,
2730
- wo as SceneUtils,
2731
- wt as SimpleLeafGeometry,
2732
- pt as SpiralStaircaseGeometry,
2733
- Dt as SpiralTube,
2734
- It as SquareHeadstone,
2735
- Te as SquareHeadstoneGeometry,
2736
- dt as StaircaseGeometry,
2737
- Ht as Stand,
2738
- Oe as StandGeometry,
2739
- eo as Star,
2740
- je as StarShape,
2741
- Rt as TeslaCoil,
2742
- Qt as TestTube,
2779
+ Qt as Beaker,
2780
+ Ye as BeakerGeometry,
2781
+ gt as BifurcatedStaircaseGeometry,
2782
+ ho as Bone,
2783
+ Ze as BoneGeometry,
2784
+ Ct as Book,
2785
+ ce as BookGeometry,
2786
+ Vt as Bookshelf,
2787
+ Oe as BookshelfGeometry,
2788
+ jt as Bottle,
2789
+ yt as Bubbling,
2790
+ Kt as BunsenBurner,
2791
+ lo as Burst,
2792
+ We as BurstShape,
2793
+ Zt as Candle,
2794
+ Ft as CrossHeadstone,
2795
+ Ne as CrossHeadstoneGeometry,
2796
+ bo as DaySkybox,
2797
+ Xt as Desk,
2798
+ bt as DioramaGeometry,
2799
+ z as Direction,
2800
+ wt as Easing,
2801
+ Jt as ElectricPanel,
2802
+ $t as ErlenmeyerFlask,
2803
+ Re as ErlenmeyerFlaskGeometry,
2804
+ X as Falloff,
2805
+ Lt as FenceColumn,
2806
+ Le as FenceColumnGeometry,
2807
+ Wt as Flask,
2808
+ mo as Gear,
2809
+ et as GearShape,
2810
+ uo as Heart,
2811
+ tt as HeartShape,
2812
+ wo as Hill,
2813
+ je as HillGeometry,
2814
+ St as LShapedStaircaseGeometry,
2815
+ Yt as Lantern,
2816
+ eo as LeverPanel,
2817
+ Nt as Mausoleum,
2818
+ to as Microscope,
2819
+ Et as Moon,
2820
+ oo as MortarAndPestle,
2821
+ De as MortarGeometry,
2822
+ Rt as MossyRocks,
2823
+ yo as Mound,
2824
+ Je as MoundGeometry,
2825
+ So as NightSkybox,
2826
+ zt as ObeliskHeadstone,
2827
+ ze as ObeliskHeadstoneGeometry,
2828
+ Dt as Rock,
2829
+ Xe as RockGeometry,
2830
+ Ht as Rocks,
2831
+ Ut as RoundedHeadstone,
2832
+ Ue as RoundedHeadstoneGeometry,
2833
+ Eo as SceneUtils,
2834
+ Pt as SimpleLeafGeometry,
2835
+ Gt as SpiralStaircaseGeometry,
2836
+ no as SpiralTube,
2837
+ _t as SquareHeadstone,
2838
+ _e as SquareHeadstoneGeometry,
2839
+ It as StaircaseGeometry,
2840
+ so as Stand,
2841
+ He as StandGeometry,
2842
+ fo as Star,
2843
+ ot as StarShape,
2844
+ ro as TeslaCoil,
2845
+ ao as TestTube,
2743
2846
  Q as TestTubeGeometry,
2744
- jt as TestTubeRack,
2745
- oo as Tree,
2746
- De as TreeGeometry,
2747
- uo as TwilightSkybox,
2748
- Kt as WineBottle,
2749
- Ve as WineBottleGeometry,
2750
- At as WroughtIronBar,
2751
- re as WroughtIronBarGeometry,
2752
- kt as WroughtIronFence,
2753
- Ce as WroughtIronFenceGeometry,
2754
- co as addNoiseDisplacement,
2755
- ro as addWaterDisplacement,
2756
- Ye as calculateSphereCapHeight,
2757
- xt as calculateSphereCapWidth,
2758
- ho as centerMesh,
2759
- po as centerMeshGeometry,
2760
- fo as checkerboardTexture,
2761
- te as daySkyShader,
2762
- st as displacementBrush,
2763
- Ke as fadeShader,
2764
- nt as flattenBrush,
2765
- R as nightSkyShader,
2766
- rt as noiseBrush,
2767
- yt as radiusForSphereCapHeight,
2768
- ae as radiusForSphereCapWidth,
2769
- Fe as randomTransformVertices,
2770
- at as smoothBrush,
2771
- ct as spikeBrush,
2772
- it as twistBrush,
2773
- io as updateNoiseDisplacementTime,
2774
- ao as updateWaterDisplacementTime
2847
+ co as TestTubeRack,
2848
+ po as Tree,
2849
+ $e as TreeGeometry,
2850
+ Go as TwilightSkybox,
2851
+ io as WineBottle,
2852
+ Qe as WineBottleGeometry,
2853
+ qt as WroughtIronBar,
2854
+ me as WroughtIronBarGeometry,
2855
+ Ot as WroughtIronFence,
2856
+ qe as WroughtIronFenceGeometry,
2857
+ vo as addNoiseDisplacement,
2858
+ xo as addWaterDisplacement,
2859
+ Ke as capHeightFromRadius,
2860
+ Bt as capWidthFromRadius,
2861
+ Tt as cartesianToSpherical,
2862
+ Po as centerGroup,
2863
+ Ao as centerGroupAtTarget,
2864
+ Bo as centerInstancedMesh,
2865
+ ko as centerMesh,
2866
+ To as centerMeshGeometry,
2867
+ Io as checkerboardTexture,
2868
+ ne as daySkyShader,
2869
+ mt as displacementBrush,
2870
+ nt as fadeShader,
2871
+ ut as flattenBrush,
2872
+ Ce as logarithmicRandomMax,
2873
+ Fe as logarithmicRandomMin,
2874
+ H as nightSkyShader,
2875
+ ft as noiseBrush,
2876
+ At as radiusFromCapHeight,
2877
+ ue as radiusFromCapWidth,
2878
+ Ee as randomFloat,
2879
+ xt as randomInteger,
2880
+ Ve as randomTransformVertices,
2881
+ Mt as rowOfBooksByCount,
2882
+ vt as rowOfBooksByLength,
2883
+ le as rowOfBooksByScales,
2884
+ ht as smoothBrush,
2885
+ kt as sphericalToCartesian,
2886
+ dt as spikeBrush,
2887
+ pt as twistBrush,
2888
+ go as updateNoiseDisplacementTime,
2889
+ Mo as updateWaterDisplacementTime
2775
2890
  };
2776
2891
  //# sourceMappingURL=index.es.js.map