three-low-poly 0.9.9 → 0.9.11

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