three-low-poly 0.9.2 → 0.9.3

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,16 +1,16 @@
1
- import { Group as b, SphereGeometry as B, MeshStandardMaterial as y, Mesh as m, BufferGeometry as v, Float32BufferAttribute as z, BoxGeometry as x, ConeGeometry as F, CylinderGeometry as G, Vector2 as g, LatheGeometry as V, CircleGeometry as Q, ShaderMaterial as U, Shape as $, ExtrudeGeometry as H, MeshBasicMaterial as D, PointLight as O, TorusGeometry as X, DodecahedronGeometry as _, MeshPhysicalMaterial as Y, DoubleSide as C, CatmullRomCurve3 as W, Vector3 as L, TubeGeometry as ee, LineBasicMaterial as te, Line as oe } from "three";
1
+ import { Group as v, SphereGeometry as B, MeshStandardMaterial as d, Mesh as m, BufferGeometry as b, Float32BufferAttribute as F, BoxGeometry as x, ConeGeometry as C, CylinderGeometry as G, Vector2 as g, LatheGeometry as V, CircleGeometry as Q, ShaderMaterial as $, Shape as H, ExtrudeGeometry as D, MeshBasicMaterial as W, PointLight as Z, TorusGeometry as j, DodecahedronGeometry as O, MeshPhysicalMaterial as U, DoubleSide as q, CatmullRomCurve3 as ee, Vector3 as L, TubeGeometry as te, LineBasicMaterial as oe, Line as se, DataTexture as ne, RGBAFormat as ae, UnsignedByteType as re, RepeatWrapping as _, NearestFilter as ce } from "three";
2
2
  import { mergeGeometries as S } from "three/addons/utils/BufferGeometryUtils.js";
3
- class ie extends b {
3
+ class he extends v {
4
4
  constructor() {
5
5
  super();
6
- const e = [], t = 20, o = new B(0.1, 6, 6), s = new y({
6
+ const e = [], t = 20, o = new B(0.1, 6, 6), s = new d({
7
7
  color: 16777215,
8
8
  transparent: !0,
9
9
  opacity: 0.6,
10
10
  roughness: 0.3,
11
11
  metalness: 0.3
12
12
  });
13
- for (let a = 0; a < t; a++) {
13
+ for (let r = 0; r < t; r++) {
14
14
  const i = new m(o, s);
15
15
  i.position.set(
16
16
  (Math.random() - 0.5) * 1.5,
@@ -21,60 +21,60 @@ class ie extends b {
21
21
  // Random z position within flask
22
22
  ), e.push(i), this.add(i);
23
23
  }
24
- function r() {
25
- e.forEach((a) => {
26
- a.position.y += 0.02, a.position.y > 3 && (a.position.y = 0, a.position.x = (Math.random() - 0.5) * 1.5, a.position.z = (Math.random() - 0.5) * 1.5);
24
+ function n() {
25
+ e.forEach((r) => {
26
+ 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);
27
27
  });
28
28
  }
29
- function n() {
30
- requestAnimationFrame(n), r();
29
+ function a() {
30
+ requestAnimationFrame(a), n();
31
31
  }
32
- n();
32
+ a();
33
33
  }
34
34
  }
35
- class le extends v {
36
- constructor(e = 2, t = 0.3, o = 0.6, s = 5, r = 5, n = Math.PI / 4) {
35
+ class ye extends b {
36
+ constructor(e = 2, t = 0.3, o = 0.6, s = 5, n = 5, a = Math.PI / 4) {
37
37
  super();
38
- const a = [], i = [];
39
- for (let d = 0; d < s; d++) {
40
- const M = d * t, f = M + t, h = d * o, I = h + o;
41
- a.push(
38
+ const r = [], i = [];
39
+ for (let M = 0; M < s; M++) {
40
+ const f = M * t, p = f + t, y = M * o, I = y + o;
41
+ r.push(
42
42
  // Vertical riser
43
43
  -e / 2,
44
- M,
45
- h,
44
+ f,
45
+ y,
46
46
  // Bottom-left
47
47
  e / 2,
48
- M,
49
- h,
48
+ f,
49
+ y,
50
50
  // Bottom-right
51
51
  e / 2,
52
- f,
53
- h,
52
+ p,
53
+ y,
54
54
  // Top-right
55
55
  -e / 2,
56
- f,
57
- h,
56
+ p,
57
+ y,
58
58
  // Top-left
59
59
  // Horizontal tread
60
60
  -e / 2,
61
- f,
62
- h,
61
+ p,
62
+ y,
63
63
  // Top-left
64
64
  e / 2,
65
- f,
66
- h,
65
+ p,
66
+ y,
67
67
  // Top-right
68
68
  e / 2,
69
- f,
69
+ p,
70
70
  I,
71
71
  // Back-right
72
72
  -e / 2,
73
- f,
73
+ p,
74
74
  I
75
75
  // Back-left
76
76
  );
77
- const k = d * 8;
77
+ const k = M * 8;
78
78
  i.push(
79
79
  k,
80
80
  k + 1,
@@ -92,7 +92,7 @@ class le extends v {
92
92
  );
93
93
  }
94
94
  const c = s * t, l = s * o, w = e * 2;
95
- a.push(
95
+ r.push(
96
96
  // Landing platform (4 vertices)
97
97
  -w / 2,
98
98
  c,
@@ -122,30 +122,30 @@ class le extends v {
122
122
  u + 3
123
123
  // Second triangle for landing
124
124
  );
125
- for (let d = 0; d < 2; d++) {
126
- const M = d === 0 ? 1 : -1;
127
- for (let f = 0; f < r; f++) {
128
- const h = c + f * t, I = h + t, k = M * (w / 4), q = l + o, R = f * o * Math.cos(n), j = f * o * Math.sin(n), A = k + M * R - e / 2 * Math.cos(n), N = k + M * R + e / 2 * Math.cos(n), T = q + j, J = A + M * o * Math.cos(n), K = N + M * o * Math.cos(n), Z = T + o * Math.sin(n);
129
- a.push(
125
+ for (let M = 0; M < 2; M++) {
126
+ const f = M === 0 ? 1 : -1;
127
+ for (let p = 0; p < n; p++) {
128
+ const y = c + p * t, I = y + t, k = f * (w / 4), A = l + o, R = p * o * Math.cos(a), X = p * o * Math.sin(a), z = k + f * R - e / 2 * Math.cos(a), N = k + f * R + e / 2 * Math.cos(a), T = A + X, J = z + f * o * Math.cos(a), K = N + f * o * Math.cos(a), Y = T + o * Math.sin(a);
129
+ r.push(
130
130
  // Vertical riser
131
- A,
132
- h,
131
+ z,
132
+ y,
133
133
  T,
134
134
  // Bottom-left
135
135
  N,
136
- h,
136
+ y,
137
137
  T,
138
138
  // Bottom-right
139
139
  N,
140
140
  I,
141
141
  T,
142
142
  // Top-right
143
- A,
143
+ z,
144
144
  I,
145
145
  T,
146
146
  // Top-left
147
147
  // Horizontal tread
148
- A,
148
+ z,
149
149
  I,
150
150
  T,
151
151
  // Top-left
@@ -155,14 +155,14 @@ class le extends v {
155
155
  // Top-right
156
156
  K,
157
157
  I,
158
- Z,
158
+ Y,
159
159
  // Back-right
160
160
  J,
161
161
  I,
162
- Z
162
+ Y
163
163
  // Back-left
164
164
  );
165
- const P = u + 4 + d * r * 8 + f * 8;
165
+ const P = u + 4 + M * n * 8 + p * 8;
166
166
  i.push(
167
167
  P,
168
168
  P + 1,
@@ -180,13 +180,13 @@ class le extends v {
180
180
  );
181
181
  }
182
182
  }
183
- this.setIndex(i), this.setAttribute("position", new z(a, 3)), this.computeVertexNormals();
183
+ this.setIndex(i), this.setAttribute("position", new F(r, 3)), this.computeVertexNormals();
184
184
  }
185
185
  }
186
- class me extends v {
186
+ class de extends b {
187
187
  constructor(e = 5, t = 3, o = 5, s = 0.2) {
188
188
  super();
189
- const r = [
189
+ const n = [
190
190
  // Floor vertices
191
191
  -e / 2,
192
192
  0,
@@ -238,7 +238,7 @@ class me extends v {
238
238
  t,
239
239
  -o / 2
240
240
  // 11
241
- ], n = [
241
+ ], a = [
242
242
  // Floor
243
243
  0,
244
244
  1,
@@ -261,70 +261,70 @@ class me extends v {
261
261
  10,
262
262
  11
263
263
  ];
264
- this.setIndex(n), this.setAttribute("position", new z(r, 3)), this.computeVertexNormals();
264
+ this.setIndex(a), this.setAttribute("position", new F(n, 3)), this.computeVertexNormals();
265
265
  }
266
266
  }
267
- class ue extends v {
268
- constructor(e = 2, t = 0.3, o = 0.5, s = 5, r = 2) {
267
+ class fe extends b {
268
+ constructor(e = 2, t = 0.3, o = 0.5, s = 5, n = 2) {
269
269
  super();
270
- const n = [], a = [];
270
+ const a = [], r = [];
271
271
  for (let w = 0; w < s; w++) {
272
- const u = w * t, d = u + t, M = w * o, f = M + o;
273
- n.push(
272
+ const u = w * t, M = u + t, f = w * o, p = f + o;
273
+ a.push(
274
274
  // Vertical riser
275
275
  -e / 2,
276
276
  u,
277
- M,
277
+ f,
278
278
  // Bottom-left
279
279
  e / 2,
280
280
  u,
281
- M,
281
+ f,
282
282
  // Bottom-right
283
283
  e / 2,
284
- d,
285
284
  M,
285
+ f,
286
286
  // Top-right
287
287
  -e / 2,
288
- d,
289
288
  M,
289
+ f,
290
290
  // Top-left
291
291
  // Horizontal tread
292
292
  -e / 2,
293
- d,
294
293
  M,
294
+ f,
295
295
  // Top-left
296
296
  e / 2,
297
- d,
298
297
  M,
298
+ f,
299
299
  // Top-right
300
300
  e / 2,
301
- d,
302
- f,
301
+ M,
302
+ p,
303
303
  // Back-right
304
304
  -e / 2,
305
- d,
306
- f
305
+ M,
306
+ p
307
307
  // Back-left
308
308
  );
309
- const h = w * 8;
310
- a.push(
311
- h,
312
- h + 1,
313
- h + 2,
314
- h,
315
- h + 2,
316
- h + 3
317
- ), a.push(
318
- h + 4,
319
- h + 5,
320
- h + 6,
321
- h + 4,
322
- h + 6,
323
- h + 7
309
+ const y = w * 8;
310
+ r.push(
311
+ y,
312
+ y + 1,
313
+ y + 2,
314
+ y,
315
+ y + 2,
316
+ y + 3
317
+ ), r.push(
318
+ y + 4,
319
+ y + 5,
320
+ y + 6,
321
+ y + 4,
322
+ y + 6,
323
+ y + 7
324
324
  );
325
325
  }
326
326
  const i = s * t, c = s * o;
327
- n.push(
327
+ a.push(
328
328
  // Landing platform (4 vertices)
329
329
  -e / 2,
330
330
  i,
@@ -336,15 +336,15 @@ class ue extends v {
336
336
  // Bottom-right
337
337
  e / 2,
338
338
  i,
339
- c + r,
339
+ c + n,
340
340
  // Top-right
341
341
  -e / 2,
342
342
  i,
343
- c + r
343
+ c + n
344
344
  // Top-left
345
345
  );
346
346
  const l = s * 8;
347
- a.push(
347
+ r.push(
348
348
  l,
349
349
  l + 1,
350
350
  l + 2,
@@ -355,138 +355,138 @@ class ue extends v {
355
355
  // Second triangle for landing
356
356
  );
357
357
  for (let w = 0; w < s; w++) {
358
- const u = i + w * t, d = u + t, M = -e / 2 - w * o, f = M - o;
359
- n.push(
358
+ const u = i + w * t, M = u + t, f = -e / 2 - w * o, p = f - o;
359
+ a.push(
360
360
  // Vertical riser
361
- M,
361
+ f,
362
362
  u,
363
- c + r,
363
+ c + n,
364
364
  // Bottom-left
365
- M,
365
+ f,
366
366
  u,
367
- c + r - e,
367
+ c + n - e,
368
368
  // Bottom-right
369
+ f,
369
370
  M,
370
- d,
371
- c + r - e,
371
+ c + n - e,
372
372
  // Top-right
373
+ f,
373
374
  M,
374
- d,
375
- c + r,
375
+ c + n,
376
376
  // Top-left
377
377
  // Horizontal tread
378
+ f,
378
379
  M,
379
- d,
380
- c + r,
380
+ c + n,
381
381
  // Top-left
382
+ f,
382
383
  M,
383
- d,
384
- c + r - e,
384
+ c + n - e,
385
385
  // Top-right
386
- f,
387
- d,
388
- c + r - e,
386
+ p,
387
+ M,
388
+ c + n - e,
389
389
  // Back-right
390
- f,
391
- d,
392
- c + r
390
+ p,
391
+ M,
392
+ c + n
393
393
  // Back-left
394
394
  );
395
- const h = l + 4 + w * 8;
396
- a.push(
397
- h,
398
- h + 1,
399
- h + 2,
400
- h,
401
- h + 2,
402
- h + 3
403
- ), a.push(
404
- h + 4,
405
- h + 5,
406
- h + 6,
407
- h + 4,
408
- h + 6,
409
- h + 7
395
+ const y = l + 4 + w * 8;
396
+ r.push(
397
+ y,
398
+ y + 1,
399
+ y + 2,
400
+ y,
401
+ y + 2,
402
+ y + 3
403
+ ), r.push(
404
+ y + 4,
405
+ y + 5,
406
+ y + 6,
407
+ y + 4,
408
+ y + 6,
409
+ y + 7
410
410
  );
411
411
  }
412
- this.setIndex(a), this.setAttribute("position", new z(n, 3)), this.computeVertexNormals();
412
+ this.setIndex(r), this.setAttribute("position", new F(a, 3)), this.computeVertexNormals();
413
413
  }
414
414
  }
415
- class we extends v {
416
- constructor(e = 1, t = 0.4, o = 0.2, s = 20, r = 2, n = Math.PI / 8) {
415
+ class Me extends b {
416
+ constructor(e = 1, t = 0.4, o = 0.2, s = 20, n = 2, a = Math.PI / 8) {
417
417
  super();
418
- const a = [], i = [];
418
+ const r = [], i = [];
419
419
  let c = 0;
420
420
  for (let l = 0; l < s; l++) {
421
- const w = r * Math.cos(c), u = r * Math.sin(c), d = l * o, M = d + o;
422
- a.push(
421
+ const w = n * Math.cos(c), u = n * Math.sin(c), M = l * o, f = M + o;
422
+ r.push(
423
423
  // Front face (vertical riser)
424
424
  w - e / 2 * Math.cos(c),
425
- d,
425
+ M,
426
426
  u - e / 2 * Math.sin(c),
427
427
  // Bottom-left
428
428
  w + e / 2 * Math.cos(c),
429
- d,
429
+ M,
430
430
  u + e / 2 * Math.sin(c),
431
431
  // Bottom-right
432
432
  w + e / 2 * Math.cos(c),
433
- M,
433
+ f,
434
434
  u + e / 2 * Math.sin(c),
435
435
  // Top-right
436
436
  w - e / 2 * Math.cos(c),
437
- M,
437
+ f,
438
438
  u - e / 2 * Math.sin(c)
439
439
  // Top-left
440
- ), a.push(
440
+ ), r.push(
441
441
  // Top face (horizontal tread)
442
442
  w - e / 2 * Math.cos(c),
443
- M,
443
+ f,
444
444
  u - e / 2 * Math.sin(c),
445
445
  // Top-left-front
446
446
  w + e / 2 * Math.cos(c),
447
- M,
447
+ f,
448
448
  u + e / 2 * Math.sin(c),
449
449
  // Top-right-front
450
450
  w + e / 2 * Math.cos(c) - t * Math.sin(c),
451
- M,
451
+ f,
452
452
  u + e / 2 * Math.sin(c) + t * Math.cos(c),
453
453
  // Back-right
454
454
  w - e / 2 * Math.cos(c) - t * Math.sin(c),
455
- M,
455
+ f,
456
456
  u - e / 2 * Math.sin(c) + t * Math.cos(c)
457
457
  // Back-left
458
458
  );
459
- const f = l * 8;
459
+ const p = l * 8;
460
460
  i.push(
461
- f,
462
- f + 1,
463
- f + 2,
461
+ p,
462
+ p + 1,
463
+ p + 2,
464
464
  // First triangle for riser
465
- f,
466
- f + 2,
467
- f + 3
465
+ p,
466
+ p + 2,
467
+ p + 3
468
468
  // Second triangle for riser
469
469
  ), i.push(
470
- f + 4,
471
- f + 5,
472
- f + 6,
470
+ p + 4,
471
+ p + 5,
472
+ p + 6,
473
473
  // First triangle for tread
474
- f + 4,
475
- f + 6,
476
- f + 7
474
+ p + 4,
475
+ p + 6,
476
+ p + 7
477
477
  // Second triangle for tread
478
- ), c += n;
478
+ ), c += a;
479
479
  }
480
- this.setIndex(i), this.setAttribute("position", new z(a, 3)), this.computeVertexNormals();
480
+ this.setIndex(i), this.setAttribute("position", new F(r, 3)), this.computeVertexNormals();
481
481
  }
482
482
  }
483
- class he extends v {
483
+ class pe extends b {
484
484
  constructor(e = 2, t = 0.3, o = 0.5, s = 10) {
485
485
  super();
486
- const r = [], n = [];
487
- for (let a = 0; a < s; a++) {
488
- const i = a * t, c = i + t, l = a * o, w = l + o;
489
- r.push(
486
+ const n = [], a = [];
487
+ for (let r = 0; r < s; r++) {
488
+ const i = r * t, c = i + t, l = r * o, w = l + o;
489
+ n.push(
490
490
  // Bottom face of riser (front face)
491
491
  -e / 2,
492
492
  i,
@@ -522,8 +522,8 @@ class he extends v {
522
522
  w
523
523
  // 7: Top-left-back
524
524
  );
525
- const u = a * 8;
526
- n.push(
525
+ const u = r * 8;
526
+ a.push(
527
527
  u,
528
528
  u + 1,
529
529
  u + 2,
@@ -532,7 +532,7 @@ class he extends v {
532
532
  u + 2,
533
533
  u + 3
534
534
  // Second triangle for riser
535
- ), n.push(
535
+ ), a.push(
536
536
  u + 4,
537
537
  u + 6,
538
538
  u + 5,
@@ -543,54 +543,54 @@ class he extends v {
543
543
  // Second triangle for tread
544
544
  );
545
545
  }
546
- this.setIndex(n), this.setAttribute("position", new z(r, 3)), this.computeVertexNormals();
546
+ this.setIndex(a), this.setAttribute("position", new F(n, 3)), this.computeVertexNormals();
547
547
  }
548
548
  }
549
- class ye extends v {
549
+ class xe extends b {
550
550
  constructor(e = 0.4, t = 1.2, o = 0.2) {
551
551
  super();
552
- const s = t * 0.6, r = new x(e / 2, s, o);
553
- r.translate(0, s / 2, 0);
554
- const n = e * 1.5, a = new x(n, e / 4, o);
555
- a.translate(0, s * 0.75, 0), this.copy(S([r, a], !0));
552
+ const s = t * 0.6, n = new x(e / 2, s, o);
553
+ n.translate(0, s / 2, 0);
554
+ const a = e * 1.5, r = new x(a, e / 4, o);
555
+ r.translate(0, s * 0.75, 0), this.copy(S([n, r], !0));
556
556
  }
557
557
  }
558
- class Me extends v {
558
+ class Ge extends b {
559
559
  constructor(e = 1.75, t = 0.75) {
560
560
  super();
561
- const o = e * 0.05, s = e * 0.15, r = e * 0.15, n = e * 0.75;
562
- let a = 0;
561
+ const o = e * 0.05, s = e * 0.15, n = e * 0.15, a = e * 0.75;
562
+ let r = 0;
563
563
  const i = new x(t, o, t);
564
- i.translate(0, a + o / 2, 0), a += o;
564
+ i.translate(0, r + o / 2, 0), r += o;
565
565
  const c = new x(t * 0.8, s, t * 0.8);
566
- c.translate(0, a + s / 2, 0), a += s;
567
- const l = new x(t * 0.6, r, t * 0.6);
568
- l.translate(0, a + r / 2, 0), a += r;
569
- const w = new x(t * 0.4, n, t * 0.4);
570
- w.translate(0, a + n / 2, 0), a += n;
571
- const u = new F(t * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
572
- u.translate(0, a + 0.1 / 2, 0), this.copy(
566
+ c.translate(0, r + s / 2, 0), r += s;
567
+ const l = new x(t * 0.6, n, t * 0.6);
568
+ l.translate(0, r + n / 2, 0), r += n;
569
+ const w = new x(t * 0.4, a, t * 0.4);
570
+ w.translate(0, r + a / 2, 0), r += a;
571
+ const u = new C(t * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
572
+ u.translate(0, r + 0.1 / 2, 0), this.copy(
573
573
  S([i, c, l, w, u], !0)
574
574
  );
575
575
  }
576
576
  }
577
- class de extends v {
577
+ class ve extends b {
578
578
  constructor(e = 0.6, t = 1, o = 0.2) {
579
579
  super();
580
- const s = t * 0.7, r = new x(e, s, o);
581
- r.translate(0, s / 2, 0);
582
- const n = t - s, a = new G(e / 2, e / 2, o, 16, 1, !1, 0, Math.PI);
583
- a.rotateY(Math.PI / 2), a.rotateX(Math.PI / 2), a.translate(0, s + n / 2 - o / 2 - 0.05, 0), this.copy(S([r, a], !0));
580
+ const s = t * 0.7, n = new x(e, s, o);
581
+ n.translate(0, s / 2, 0);
582
+ const a = t - s, r = new G(e / 2, e / 2, o, 16, 1, !1, 0, Math.PI);
583
+ r.rotateY(Math.PI / 2), r.rotateX(Math.PI / 2), r.translate(0, s + a / 2 - o / 2 - 0.05, 0), this.copy(S([n, r], !0));
584
584
  }
585
585
  }
586
- class fe extends v {
586
+ class ge extends b {
587
587
  constructor(e = 0.5, t = 0.8, o = 0.15) {
588
588
  super();
589
589
  const s = new x(e, t, o);
590
590
  s.translate(0, t / 2, 0), this.copy(s);
591
591
  }
592
592
  }
593
- class pe extends v {
593
+ class be extends b {
594
594
  constructor(e = 2.25) {
595
595
  super();
596
596
  const t = new x(1.2, 0.5, 1.2);
@@ -601,16 +601,16 @@ class pe extends v {
601
601
  s.translate(0, 0.5 + e + 0.15, 0), this.copy(S([t, o, s], !0));
602
602
  }
603
603
  }
604
- class xe extends v {
604
+ class ke extends b {
605
605
  constructor(e = 2, t = 0.05, o = 0.3) {
606
606
  super();
607
607
  const s = new G(t, t, e, 8);
608
608
  s.translate(0, e / 2, 0);
609
- const r = new F(t * 1.5, o, 8);
610
- r.translate(0, e + o / 2, 0), this.copy(S([s, r], !0));
609
+ const n = new C(t * 1.5, o, 8);
610
+ n.translate(0, e + o / 2, 0), this.copy(S([s, n], !0));
611
611
  }
612
612
  }
613
- class Ge extends v {
613
+ class Ie extends b {
614
614
  constructor(e = 0.1) {
615
615
  super();
616
616
  const t = [], o = [], s = [
@@ -631,34 +631,34 @@ class Ge extends v {
631
631
  [-0.5, 0.75]
632
632
  // Left upper middle
633
633
  ];
634
- for (let n = 0; n < s.length; n++) {
635
- const [a, i] = s[n];
636
- t.push(a * e, i * e, 0);
634
+ for (let a = 0; a < s.length; a++) {
635
+ const [r, i] = s[a];
636
+ t.push(r * e, i * e, 0);
637
637
  }
638
- for (let n = 1; n < s.length - 1; n++)
639
- o.push(0, n, n + 1);
638
+ for (let a = 1; a < s.length - 1; a++)
639
+ o.push(0, a, a + 1);
640
640
  o.push(0, s.length - 1, 1);
641
- const r = new z(t, 3);
642
- this.setAttribute("position", r), this.setIndex(o), this.computeVertexNormals();
641
+ const n = new F(t, 3);
642
+ this.setAttribute("position", n), this.setIndex(o), this.computeVertexNormals();
643
643
  }
644
644
  }
645
- class be extends v {
645
+ class Pe extends b {
646
646
  constructor(e = 0.1, t = 0.1, o = 0.4, s = 8) {
647
647
  super();
648
- const r = new G(e * 0.6, t * 0.6, o, s);
649
- r.translate(0, 0, 0);
650
- const n = new B(e, s, s), a = n.clone(), i = n.clone(), c = n.clone(), l = n.clone();
651
- a.translate(0, o / 2 + e * 0.6, -e * 0.6), i.translate(0, o / 2 + e * 0.6, e * 0.6), c.translate(0, -o / 2 - t * 0.6, -t * 0.6), l.translate(0, -o / 2 - t * 0.6, t * 0.6), this.copy(S([r, a, i, c, l], !0));
648
+ const n = new G(e * 0.6, t * 0.6, o, s);
649
+ n.translate(0, 0, 0);
650
+ const a = new B(e, s, s), r = a.clone(), i = a.clone(), c = a.clone(), l = a.clone();
651
+ r.translate(0, o / 2 + e * 0.6, -e * 0.6), i.translate(0, o / 2 + e * 0.6, e * 0.6), c.translate(0, -o / 2 - t * 0.6, -t * 0.6), l.translate(0, -o / 2 - t * 0.6, t * 0.6), this.copy(S([n, r, i, c, l], !0));
652
652
  }
653
653
  }
654
- class se extends v {
654
+ class ie extends b {
655
655
  constructor() {
656
656
  super();
657
657
  const e = new B(1, 16, 16), t = new G(0.2, 0.2, 2, 16, 1, !0);
658
658
  t.translate(0, 1.5, 0), t.rotateX(Math.PI / 2), this.copy(S([e, t], !0));
659
659
  }
660
660
  }
661
- class ne extends v {
661
+ class le extends b {
662
662
  constructor() {
663
663
  super();
664
664
  const e = [
@@ -676,28 +676,28 @@ class ne extends v {
676
676
  o.rotateX(-Math.PI / 2), o.translate(0, 0, 0), this.copy(S([t, o], !0));
677
677
  }
678
678
  }
679
- class E extends v {
680
- constructor(e = 0.2, t = 0.2, o = 3, s = 32, r = !0) {
679
+ class E extends b {
680
+ constructor(e = 0.2, t = 0.2, o = 3, s = 32, n = !0) {
681
681
  super();
682
- const n = new G(e, t, o, s, 1, r), a = new B(t, s, s / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
683
- a.translate(0, -(o / 2), 0), this.copy(S([n, a], !0));
682
+ const a = new G(e, t, o, s, 1, n), r = new B(t, s, s / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
683
+ r.translate(0, -(o / 2), 0), this.copy(S([a, r], !0));
684
684
  }
685
685
  }
686
- class ae extends v {
687
- constructor({ radius: e = 0.5, neckRadius: t = 0.2, height: o = 3, neckHeight: s = 1, segments: r = 16 } = {}) {
686
+ class me extends b {
687
+ constructor({ radius: e = 0.5, neckRadius: t = 0.2, height: o = 3, neckHeight: s = 1, segments: n = 16 } = {}) {
688
688
  super();
689
- const n = o - s, a = new G(e, e, n, r);
690
- a.translate(0, n / 2, 0);
691
- const i = 0.3, c = new G(t, e, i, r);
692
- c.translate(0, n + i / 2, 0);
693
- const l = new G(t, t, s, r);
694
- l.translate(0, n + i + s / 2, 0), this.copy(S([a, c, l], !0));
689
+ const a = o - s, r = new G(e, e, a, n);
690
+ r.translate(0, a / 2, 0);
691
+ const i = 0.3, c = new G(t, e, i, n);
692
+ c.translate(0, a + i / 2, 0);
693
+ const l = new G(t, t, s, n);
694
+ l.translate(0, a + i + s / 2, 0), this.copy(S([r, c, l], !0));
695
695
  }
696
696
  }
697
- class ge extends b {
697
+ class Se extends v {
698
698
  constructor() {
699
699
  super();
700
- const e = new B(5, 32, 32), t = new U({
700
+ const e = new B(5, 32, 32), t = new $({
701
701
  uniforms: {
702
702
  time: { value: 0 }
703
703
  },
@@ -744,42 +744,42 @@ class ge extends b {
744
744
  this.add(o);
745
745
  }
746
746
  }
747
- class ve extends b {
747
+ class Be extends v {
748
748
  constructor() {
749
749
  super();
750
- const e = new x(5, 1, 5), t = new y({ color: 8421504, flatShading: !0 }), o = new m(e, t);
750
+ const e = new x(5, 1, 5), t = new d({ color: 8421504, flatShading: !0 }), o = new m(e, t);
751
751
  o.position.set(0, 0.5, 0), this.add(o);
752
- const s = new x(4, 3, 4), r = new y({ color: 6908265, flatShading: !0 }), n = new m(s, r);
753
- n.position.set(0, 2.5, 0), this.add(n);
754
- const a = new F(3.5, 2, 4), i = new y({ color: 5263440, flatShading: !0 }), c = new m(a, i);
752
+ const s = new x(4, 3, 4), n = new d({ color: 6908265, flatShading: !0 }), a = new m(s, n);
753
+ a.position.set(0, 2.5, 0), this.add(a);
754
+ const r = new C(3.5, 2, 4), i = new d({ color: 5263440, flatShading: !0 }), c = new m(r, i);
755
755
  c.rotation.y = Math.PI / 4, c.position.set(0, 5, 0), this.add(c);
756
- const l = new G(0.2, 0.2, 3.5, 16), w = new y({ color: 6908265, flatShading: !0 });
756
+ const l = new G(0.2, 0.2, 3.5, 16), w = new d({ color: 6908265, flatShading: !0 });
757
757
  [
758
758
  [-1.8, 2.3, -2.2],
759
759
  [1.8, 2.3, -2.2],
760
760
  [-1.8, 2.3, 2.2],
761
761
  [1.8, 2.3, 2.2]
762
762
  ].forEach((k) => {
763
- const q = new m(l, w);
764
- q.position.set(...k), this.add(q);
763
+ const A = new m(l, w);
764
+ A.position.set(...k), this.add(A);
765
765
  });
766
- const d = new $();
767
- d.moveTo(-1, 0), d.lineTo(-1, 2), d.absarc(0, 2, 1, Math.PI, 0, !0), d.lineTo(1, 0);
768
- const M = {
766
+ const M = new H();
767
+ M.moveTo(-1, 0), M.lineTo(-1, 2), M.absarc(0, 2, 1, Math.PI, 0, !0), M.lineTo(1, 0);
768
+ const f = {
769
769
  depth: 0.5,
770
770
  bevelEnabled: !1
771
- }, f = new H(d, M), h = new y({ color: 4210752, flatShading: !0 }), I = new m(f, h);
771
+ }, p = new D(M, f), y = new d({ color: 4210752, flatShading: !0 }), I = new m(p, y);
772
772
  I.position.set(0, 0.5, 1.7), this.add(I);
773
773
  }
774
774
  }
775
- class ke extends b {
775
+ class Te extends v {
776
776
  constructor() {
777
777
  super();
778
- const e = new x(5, 0.3, 3), t = new y({ color: 9132587 }), o = new m(e, t);
778
+ const e = new x(5, 0.3, 3), t = new d({ color: 9132587 }), o = new m(e, t);
779
779
  o.position.set(0, 3.15, 0);
780
780
  const s = [];
781
781
  s.push(new g(0.2, 0)), s.push(new g(0.25, 0.5)), s.push(new g(0.15, 1.5)), s.push(new g(0.3, 3));
782
- const r = new V(s, 32), n = new y({ color: 4929057 });
782
+ const n = new V(s, 32), a = new d({ color: 4929057 });
783
783
  [
784
784
  [2.2, 0, 1.2],
785
785
  // Adjust Y to 0 so legs start at ground level
@@ -787,20 +787,20 @@ class ke extends b {
787
787
  [2.2, 0, -1.2],
788
788
  [-2.2, 0, -1.2]
789
789
  ].forEach((i) => {
790
- const c = new m(r, n);
790
+ const c = new m(n, a);
791
791
  c.position.set(...i), this.add(c);
792
792
  }), this.add(o);
793
793
  }
794
794
  }
795
- class Ie extends b {
795
+ class Fe extends v {
796
796
  constructor(e = 1, t = 0.2) {
797
797
  super(), this.height = e, this.radius = t, this.createCandle(), this.animateFlicker();
798
798
  }
799
799
  createCandle() {
800
- const e = new G(this.radius, this.radius, this.height, 32), t = new y({ color: 16777215 });
800
+ const e = new G(this.radius, this.radius, this.height, 32), t = new d({ color: 16777215 });
801
801
  this.candle = new m(e, t), this.candle.position.set(0, this.height / 2, 0), this.add(this.candle);
802
- const o = new B(0.05, 16, 16), s = new D({ color: 16753920 });
803
- this.flame = new m(o, s), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new O(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight);
802
+ const o = new B(0.05, 16, 16), s = new W({ color: 16753920 });
803
+ this.flame = new m(o, s), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new Z(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight);
804
804
  }
805
805
  animateFlicker() {
806
806
  const e = () => {
@@ -809,47 +809,47 @@ class Ie extends b {
809
809
  e();
810
810
  }
811
811
  }
812
- class Pe extends b {
812
+ class Le extends v {
813
813
  constructor(e = 1.3, t = 0.5) {
814
814
  super();
815
- const o = new G(t, t, 0.2, 16), s = new y({ color: 9127187, flatShading: !0 }), r = new m(o, s);
816
- r.position.set(0, 0, 0), this.add(r);
817
- const n = new G(t * 0.9, t * 0.9, e), a = new y({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), i = new m(n, a);
815
+ const o = new G(t, t, 0.2, 16), s = new d({ color: 9127187, flatShading: !0 }), n = new m(o, s);
816
+ n.position.set(0, 0, 0), this.add(n);
817
+ const a = new G(t * 0.9, t * 0.9, e), r = new d({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), i = new m(a, r);
818
818
  i.position.set(0, e / 2 + 0.1, 0), this.add(i);
819
- const c = new F(t * 1.1, 0.5, 8), l = new y({ color: 9127187, flatShading: !0 }), w = new m(c, l);
819
+ const c = new C(t * 1.1, 0.5, 8), l = new d({ color: 9127187, flatShading: !0 }), w = new m(c, l);
820
820
  w.position.set(0, e + 0.35, 0), this.add(w);
821
- const u = new X(t * 0.8, 0.05, 8, 16), d = new y({ color: 9127187, flatShading: !0 }), M = new m(u, d);
822
- M.position.set(0, e + 0.85, 0), this.add(M);
823
- const f = new O(16755200, 1.5, 15);
824
- f.position.set(0, e / 2 + 0.1, 0), f.castShadow = !0, this.add(f);
821
+ const u = new j(t * 0.8, 0.05, 8, 16), M = new d({ color: 9127187, flatShading: !0 }), f = new m(u, M);
822
+ f.position.set(0, e + 0.85, 0), this.add(f);
823
+ const p = new Z(16755200, 1.5, 15);
824
+ p.position.set(0, e / 2 + 0.1, 0), p.castShadow = !0, this.add(p);
825
825
  }
826
826
  }
827
- class Se extends b {
827
+ class Ce extends v {
828
828
  constructor() {
829
829
  super();
830
- const e = new _(1, 0), t = new y({ color: 8421504, flatShading: !0 }), o = new y({ color: 4950843, flatShading: !0, opacity: 0.8, transparent: !0 });
830
+ const e = new O(1, 0), t = new d({ color: 8421504, flatShading: !0 }), o = new d({ color: 4950843, flatShading: !0, opacity: 0.8, transparent: !0 });
831
831
  for (let s = 0; s < 5; s++) {
832
- const r = new m(e, t);
833
- r.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), r.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), r.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(r);
834
- const n = new m(e, o);
835
- n.scale.set(r.scale.x * 0.9, r.scale.y * 0.5, r.scale.z * 0.9), n.rotation.copy(r.rotation), n.position.copy(r.position), n.position.y += 0.3, this.add(n);
832
+ const n = new m(e, t);
833
+ 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);
834
+ const a = new m(e, o);
835
+ a.scale.set(n.scale.x * 0.9, n.scale.y * 0.5, n.scale.z * 0.9), a.rotation.copy(n.rotation), a.position.copy(n.position), a.position.y += 0.3, this.add(a);
836
836
  }
837
837
  }
838
838
  }
839
- class Be extends b {
839
+ class qe extends v {
840
840
  constructor() {
841
841
  super();
842
- const e = new _(1, 0), t = new y({ color: 8421504, flatShading: !0 });
842
+ const e = new O(1, 0), t = new d({ color: 8421504, flatShading: !0 });
843
843
  for (let o = 0; o < 5; o++) {
844
844
  const s = new m(e, t);
845
845
  s.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), s.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), s.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(s);
846
846
  }
847
847
  }
848
848
  }
849
- class Te extends b {
849
+ class Ae extends v {
850
850
  constructor() {
851
851
  super();
852
- const e = new se(), t = new Y({
852
+ const e = new ie(), t = new U({
853
853
  color: 8965375,
854
854
  transparent: !0,
855
855
  opacity: 0.4,
@@ -857,23 +857,23 @@ class Te extends b {
857
857
  metalness: 0.1,
858
858
  reflectivity: 0.8,
859
859
  transmission: 0.9,
860
- side: C
860
+ side: q
861
861
  }), o = new m(e, t);
862
862
  o.rotation.x = -Math.PI / 2, this.add(o);
863
863
  }
864
864
  }
865
- class ze extends b {
865
+ class ze extends v {
866
866
  constructor() {
867
867
  super();
868
- const e = new x(1.6, 0.05, 2.1), t = new y({ color: 9109504 }), o = new m(e, t), s = new m(e, t);
868
+ const e = new x(1.6, 0.05, 2.1), t = new d({ color: 9109504 }), o = new m(e, t), s = new m(e, t);
869
869
  o.position.set(0, 0.125, 0), s.position.set(0, -0.125, 0);
870
- const r = new x(1.55, 0.2, 2), n = new y({ color: 16777215 }), a = new m(r, n);
871
- a.position.set(-0.025, 0, 0);
872
- const i = new x(0.05, 0.25, 2.1), c = new y({ color: 4915200 }), l = new m(i, c);
873
- l.position.set(-0.8, 0, 0), this.add(o), this.add(s), this.add(a), this.add(l);
870
+ const n = new x(1.55, 0.2, 2), a = new d({ color: 16777215 }), r = new m(n, a);
871
+ r.position.set(-0.025, 0, 0);
872
+ const i = new x(0.05, 0.25, 2.1), c = new d({ color: 4915200 }), l = new m(i, c);
873
+ l.position.set(-0.8, 0, 0), this.add(o), this.add(s), this.add(r), this.add(l);
874
874
  }
875
875
  }
876
- class Le extends b {
876
+ class Ne extends v {
877
877
  constructor() {
878
878
  super();
879
879
  const e = [
@@ -887,89 +887,89 @@ class Le extends b {
887
887
  // Neck
888
888
  new g(0.6, 2.5)
889
889
  // Mouth
890
- ], t = new V(e, 10), o = new G(0.3, 0.4, 0.2, 8), s = new y({
890
+ ], t = new V(e, 10), o = new G(0.3, 0.4, 0.2, 8), s = new d({
891
891
  color: 8965375,
892
892
  transparent: !0,
893
893
  opacity: 0.5,
894
894
  roughness: 0.1,
895
895
  metalness: 0.3
896
- }), r = new y({
896
+ }), n = new d({
897
897
  color: 16724838,
898
898
  // Vibrant potion color
899
899
  transparent: !0,
900
900
  opacity: 0.6
901
- }), n = new y({
901
+ }), a = new d({
902
902
  color: 9127187,
903
903
  roughness: 1
904
- }), a = new m(t, s), i = new m(t, r), c = new m(o, n);
904
+ }), r = new m(t, s), i = new m(t, n), c = new m(o, a);
905
905
  i.scale.set(0.8, 0.8, 0.8), i.position.y = 0.1, c.position.y = 2.5;
906
- const l = new b();
907
- l.add(a, i, c), this.add(l);
906
+ const l = new v();
907
+ l.add(r, i, c), this.add(l);
908
908
  }
909
909
  }
910
- class Fe extends b {
910
+ class Ve extends v {
911
911
  constructor() {
912
912
  super();
913
- const e = new G(0.3, 0.4, 0.1, 16), t = new y({
913
+ const e = new G(0.3, 0.4, 0.1, 16), t = new d({
914
914
  color: 3355443,
915
915
  roughness: 0.6,
916
916
  metalness: 0.3
917
917
  }), o = new m(e, t);
918
918
  o.position.y = 0.05;
919
- const s = new G(0.1, 0.1, 0.7, 16), r = new y({
919
+ const s = new G(0.1, 0.1, 0.7, 16), n = new d({
920
920
  color: 5592405,
921
921
  roughness: 0.5,
922
922
  metalness: 0.4
923
- }), n = new m(s, r);
924
- n.position.y = 0.4;
925
- const a = new F(0.075, 0.2, 16), i = new y({
923
+ }), a = new m(s, n);
924
+ a.position.y = 0.4;
925
+ const r = new C(0.075, 0.2, 16), i = new d({
926
926
  color: 16733440,
927
927
  emissive: 16733440,
928
928
  emissiveIntensity: 0.6,
929
929
  transparent: !0,
930
930
  opacity: 0.8
931
- }), c = new m(a, i);
932
- c.position.y = 0.8, this.add(o, n, c);
931
+ }), c = new m(r, i);
932
+ c.position.y = 0.8, this.add(o, a, c);
933
933
  }
934
934
  }
935
- class Ce extends b {
935
+ class Ee extends v {
936
936
  constructor() {
937
937
  super();
938
- const e = new x(3, 4, 0.1), t = new y({
938
+ const e = new x(3, 4, 0.1), t = new d({
939
939
  color: 3026478,
940
940
  roughness: 0.8,
941
941
  metalness: 0.6
942
- }), o = new x(0.2, 0.5, 0.2), s = new y({
942
+ }), o = new x(0.2, 0.5, 0.2), s = new d({
943
943
  color: 11184810,
944
944
  roughness: 0.5,
945
945
  metalness: 0.7
946
- }), r = new G(0.3, 0.3, 0.1, 16), n = new y({
946
+ }), n = new G(0.3, 0.3, 0.1, 16), a = new d({
947
947
  color: 5592405,
948
948
  roughness: 0.7,
949
949
  metalness: 0.5
950
- }), a = new m(e, t);
951
- for (let h = -1; h <= 1; h++) {
950
+ }), r = new m(e, t);
951
+ for (let y = -1; y <= 1; y++) {
952
952
  const I = new m(o, s);
953
- I.position.set(h, 1.5, 0.1), a.add(I);
953
+ I.position.set(y, 1.5, 0.1), r.add(I);
954
954
  }
955
- const i = new m(r, n);
956
- i.rotation.x = Math.PI / 2, i.position.set(0, 0.5, 0.15), a.add(i);
957
- const c = new B(0.15, 8, 8), l = new y({
955
+ const i = new m(n, a);
956
+ i.rotation.x = Math.PI / 2, i.position.set(0, 0.5, 0.15), r.add(i);
957
+ const c = new B(0.15, 8, 8), l = new d({
958
958
  color: 16711680,
959
959
  emissive: 16711680,
960
960
  emissiveIntensity: 0.5
961
961
  }), w = new m(c, l);
962
- w.position.set(0, -1, 0.1), a.add(w), this.add(a);
963
- let u = 0.015, d = 0.8, M = 0.2;
964
- function f() {
965
- requestAnimationFrame(f);
966
- const h = M + Math.abs(Math.sin(Date.now() * u)) * (d - M);
967
- w.material.emissiveIntensity = h;
962
+ w.position.set(0, -1, 0.1), r.add(w), this.add(r);
963
+ let u = 0.015, M = 0.8, f = 0.2;
964
+ function p() {
965
+ requestAnimationFrame(p);
966
+ const y = f + Math.abs(Math.sin(Date.now() * u)) * (M - f);
967
+ w.material.emissiveIntensity = y;
968
968
  }
969
- f();
969
+ p();
970
970
  }
971
971
  }
972
- class qe extends b {
972
+ class Ue extends v {
973
973
  constructor() {
974
974
  super();
975
975
  const e = [
@@ -983,90 +983,90 @@ class qe extends b {
983
983
  // Narrow neck
984
984
  new g(0.6, 3.5)
985
985
  // Mouth of the flask
986
- ], t = new V(e, 12), o = new G(0.6, 0.7, 0.3, 8), s = new y({
986
+ ], t = new V(e, 12), o = new G(0.6, 0.7, 0.3, 8), s = new d({
987
987
  color: 8965290,
988
988
  transparent: !0,
989
989
  opacity: 0.4,
990
990
  roughness: 0.1,
991
991
  metalness: 0.5
992
- }), r = new y({
992
+ }), n = new d({
993
993
  color: 9127187,
994
994
  roughness: 1
995
- }), n = new m(t, s), a = new m(o, r);
996
- a.position.y = 3.5, this.add(n, a);
995
+ }), a = new m(t, s), r = new m(o, n);
996
+ r.position.y = 3.5, this.add(a, r);
997
997
  }
998
998
  }
999
- class Ae extends b {
999
+ class Re extends v {
1000
1000
  constructor() {
1001
1001
  super();
1002
- const e = new x(2, 3, 0.1), t = new y({
1002
+ const e = new x(2, 3, 0.1), t = new d({
1003
1003
  color: 3355443,
1004
1004
  roughness: 0.8,
1005
1005
  metalness: 0.5
1006
- }), o = new m(e, t), s = new G(0.1, 0.1, 0.2, 8), r = new G(0.05, 0.05, 1, 8), n = new y({
1006
+ }), o = new m(e, t), s = new G(0.1, 0.1, 0.2, 8), n = new G(0.05, 0.05, 1, 8), a = new d({
1007
1007
  color: 11184810,
1008
1008
  roughness: 0.5,
1009
1009
  metalness: 0.7
1010
1010
  });
1011
- for (let a = -0.5; a <= 0.5; a += 0.5) {
1012
- const i = new m(s, n);
1013
- i.position.set(a, 1, 0.1);
1014
- const c = new m(r, n);
1011
+ for (let r = -0.5; r <= 0.5; r += 0.5) {
1012
+ const i = new m(s, a);
1013
+ i.position.set(r, 1, 0.1);
1014
+ const c = new m(n, a);
1015
1015
  c.position.y = 0.5, i.add(c), this.add(i);
1016
1016
  }
1017
1017
  this.add(o);
1018
1018
  }
1019
1019
  }
1020
- class Ne extends b {
1020
+ class Ye extends v {
1021
1021
  constructor() {
1022
1022
  super();
1023
- const e = new x(1, 0.2, 0.5), t = new y({
1023
+ const e = new x(1, 0.2, 0.5), t = new d({
1024
1024
  color: 4473924,
1025
1025
  roughness: 0.6,
1026
1026
  metalness: 0.3
1027
1027
  }), o = new m(e, t);
1028
1028
  o.position.y = 0.1;
1029
- const s = new x(0.2, 1, 0.2), r = new m(s, t);
1030
- r.position.set(0, 0.6, -0.2);
1031
- const n = new G(0.1, 0.1, 0.4, 8), a = new y({
1029
+ const s = new x(0.2, 1, 0.2), n = new m(s, t);
1030
+ n.position.set(0, 0.6, -0.2);
1031
+ const a = new G(0.1, 0.1, 0.4, 8), r = new d({
1032
1032
  color: 3355443,
1033
1033
  roughness: 0.5,
1034
1034
  metalness: 0.6
1035
- }), i = new m(n, a);
1035
+ }), i = new m(a, r);
1036
1036
  i.position.set(0, 1.1, -0.35), i.rotation.x = -Math.PI / 4;
1037
- const c = new x(0.6, 0.1, 0.6), l = new y({
1037
+ const c = new x(0.6, 0.1, 0.6), l = new d({
1038
1038
  color: 5592405,
1039
1039
  roughness: 0.8,
1040
1040
  metalness: 0.2
1041
1041
  }), w = new m(c, l);
1042
- w.position.set(0, 0.6, 0), this.add(o, r, i, w);
1042
+ w.position.set(0, 0.6, 0), this.add(o, n, i, w);
1043
1043
  }
1044
1044
  }
1045
- class Ve extends b {
1045
+ class _e extends v {
1046
1046
  constructor() {
1047
1047
  super();
1048
- const e = new ne(), t = new G(0.2, 0.3, 1.5, 8);
1048
+ const e = new le(), t = new G(0.2, 0.3, 1.5, 8);
1049
1049
  t.translate(0, 0.75, 0);
1050
- const o = new y({
1050
+ const o = new d({
1051
1051
  color: 6045747,
1052
1052
  // Dark earthy tone
1053
1053
  roughness: 1,
1054
1054
  metalness: 0,
1055
- side: C
1055
+ side: q
1056
1056
  // Render inside and outside
1057
- }), s = new y({
1057
+ }), s = new d({
1058
1058
  color: 9132587,
1059
1059
  // Slightly lighter earthy color
1060
1060
  roughness: 0.8,
1061
1061
  metalness: 0.1
1062
- }), r = new m(e, o), n = new m(t, s);
1063
- n.position.set(0.3, 1.3, 0), n.rotation.z = Math.PI / 4, this.add(r, n);
1062
+ }), n = new m(e, o), a = new m(t, s);
1063
+ a.position.set(0.3, 1.3, 0), a.rotation.z = Math.PI / 4, this.add(n, a);
1064
1064
  }
1065
1065
  }
1066
- class Ee extends b {
1066
+ class Ze extends v {
1067
1067
  constructor() {
1068
1068
  super();
1069
- const e = 100, t = 0.05, o = new W(
1069
+ const e = 100, t = 0.05, o = new ee(
1070
1070
  Array.from({ length: e }, (c, l) => {
1071
1071
  const w = l * 0.2;
1072
1072
  return new L(
@@ -1076,78 +1076,78 @@ class Ee extends b {
1076
1076
  Math.sin(w) * 0.4
1077
1077
  );
1078
1078
  })
1079
- ), s = new ee(o, 200, 0.1, 8, !1), r = new y({
1079
+ ), s = new te(o, 200, 0.1, 8, !1), n = new d({
1080
1080
  color: 8965375,
1081
1081
  transparent: !0,
1082
1082
  opacity: 0.3,
1083
1083
  roughness: 0.1,
1084
1084
  metalness: 0.2,
1085
1085
  emissive: 8965375
1086
- }), n = new m(s, r);
1087
- this.add(n);
1088
- function a() {
1089
- r.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
1086
+ }), a = new m(s, n);
1087
+ this.add(a);
1088
+ function r() {
1089
+ n.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
1090
1090
  }
1091
1091
  function i() {
1092
- requestAnimationFrame(i), a();
1092
+ requestAnimationFrame(i), r();
1093
1093
  }
1094
1094
  i();
1095
1095
  }
1096
1096
  }
1097
- class Ye extends b {
1097
+ class je extends v {
1098
1098
  constructor() {
1099
1099
  super();
1100
- const e = new X(0.3, 0.03, 8, 16), t = new y({
1100
+ const e = new j(0.3, 0.03, 8, 16), t = new d({
1101
1101
  color: 8947848,
1102
1102
  roughness: 0.7,
1103
1103
  metalness: 0.3
1104
1104
  }), o = new m(e, t);
1105
1105
  o.rotation.x = Math.PI / 2, o.position.y = 0.4;
1106
- const s = new G(0.02, 0.02, 0.4, 8), r = new y({
1106
+ const s = new G(0.02, 0.02, 0.4, 8), n = new d({
1107
1107
  color: 6710886,
1108
1108
  roughness: 0.8,
1109
1109
  metalness: 0.3
1110
- }), n = [];
1111
- for (let a = 0; a < 3; a++) {
1112
- const i = a / 3 * Math.PI * 2, c = new m(s, r);
1113
- c.position.set(Math.cos(i) * 0.25, 0.2, Math.sin(i) * 0.25), n.push(c);
1110
+ }), a = [];
1111
+ for (let r = 0; r < 3; r++) {
1112
+ const i = r / 3 * Math.PI * 2, c = new m(s, n);
1113
+ c.position.set(Math.cos(i) * 0.25, 0.2, Math.sin(i) * 0.25), a.push(c);
1114
1114
  }
1115
- this.add(o, ...n);
1115
+ this.add(o, ...a);
1116
1116
  }
1117
1117
  }
1118
- class Re extends b {
1118
+ class Oe extends v {
1119
1119
  constructor() {
1120
1120
  super();
1121
- const e = new G(0.5, 0.6, 0.3, 16), t = new y({
1121
+ const e = new G(0.5, 0.6, 0.3, 16), t = new d({
1122
1122
  color: 3355443,
1123
1123
  roughness: 0.6,
1124
1124
  metalness: 0.5
1125
1125
  }), o = new m(e, t);
1126
1126
  o.position.y = 0.15;
1127
- const s = new G(0.15, 0.15, 2, 12, 1, !0), r = new y({
1127
+ const s = new G(0.15, 0.15, 2, 12, 1, !0), n = new d({
1128
1128
  color: 16737792,
1129
1129
  roughness: 0.5,
1130
1130
  metalness: 0.8,
1131
- side: C
1132
- }), n = new m(s, r);
1133
- n.position.y = 1.3;
1134
- const a = new B(0.3, 16, 16), i = new m(a, r);
1135
- i.position.y = 2.4, this.add(o, n, i);
1131
+ side: q
1132
+ }), a = new m(s, n);
1133
+ a.position.y = 1.3;
1134
+ const r = new B(0.3, 16, 16), i = new m(r, n);
1135
+ i.position.y = 2.4, this.add(o, a, i);
1136
1136
  const c = [];
1137
1137
  for (let u = 0; u < 5; u++) {
1138
- const d = new te({ color: 10079487 }), M = [
1138
+ const M = new oe({ color: 10079487 }), f = [
1139
1139
  new L(0, 2.4, 0),
1140
1140
  new L((Math.random() - 0.5) * 1.5, Math.random() * 2.4, (Math.random() - 0.5) * 1.5)
1141
- ], f = new v().setFromPoints(M), h = new oe(f, d);
1142
- this.add(h), c.push(h);
1141
+ ], p = new b().setFromPoints(f), y = new se(p, M);
1142
+ this.add(y), c.push(y);
1143
1143
  }
1144
1144
  function l() {
1145
1145
  c.forEach((u) => {
1146
- const d = [
1146
+ const M = [
1147
1147
  new L(0, 2.4, 0),
1148
1148
  new L((Math.random() - 0.5) * 1.5, Math.random() * 2.4, (Math.random() - 0.5) * 1.5)
1149
1149
  ];
1150
- u.geometry.setFromPoints(d);
1150
+ u.geometry.setFromPoints(M);
1151
1151
  });
1152
1152
  }
1153
1153
  function w() {
@@ -1156,10 +1156,10 @@ class Re extends b {
1156
1156
  w();
1157
1157
  }
1158
1158
  }
1159
- class Ze extends b {
1159
+ class Xe extends v {
1160
1160
  constructor(e = 0.2, t = 0.2, o = 3, s = 32) {
1161
1161
  super();
1162
- const r = new E(e, t, o, s), n = new Y({
1162
+ const n = new E(e, t, o, s), a = new U({
1163
1163
  color: 8965375,
1164
1164
  transparent: !0,
1165
1165
  opacity: 0.4,
@@ -1168,48 +1168,48 @@ class Ze extends b {
1168
1168
  reflectivity: 0.8,
1169
1169
  transmission: 0.9,
1170
1170
  // For glass effect
1171
- side: C
1172
- }), a = new m(r, n);
1173
- this.add(a);
1171
+ side: q
1172
+ }), r = new m(n, a);
1173
+ this.add(r);
1174
1174
  }
1175
1175
  }
1176
- class Oe extends b {
1176
+ class Je extends v {
1177
1177
  constructor(e = 3, t = [65450, 16711850, 11141375]) {
1178
1178
  super();
1179
- const o = new x(3, 0.2, 1), s = new y({
1179
+ const o = new x(3, 0.2, 1), s = new d({
1180
1180
  color: 9127187,
1181
1181
  // Wooden color or change to metallic tone
1182
1182
  roughness: 0.7,
1183
1183
  metalness: 0.3
1184
- }), r = new m(o, s);
1185
- r.position.y = 0.5;
1186
- const n = new E(0.1, 0.1, 1, 16), a = new y({
1184
+ }), n = new m(o, s);
1185
+ n.position.y = 0.5;
1186
+ const a = new E(0.1, 0.1, 1, 16), r = new d({
1187
1187
  color: 11184810,
1188
1188
  transparent: !0,
1189
1189
  opacity: 0.4,
1190
1190
  roughness: 0.1,
1191
1191
  metalness: 0.5,
1192
- side: C
1192
+ side: q
1193
1193
  });
1194
1194
  for (let i = 0; i < e; i++) {
1195
- const c = new m(n, a), l = (i - (e - 1) / 2) * 0.8;
1195
+ const c = new m(a, r), l = (i - (e - 1) / 2) * 0.8;
1196
1196
  c.position.set(l, 1, 0);
1197
- const w = new E(0.099, 0.099, 0.5, 16, !1), u = t[i % t.length], d = new y({
1197
+ const w = new E(0.099, 0.099, 0.5, 16, !1), u = t[i % t.length], M = new d({
1198
1198
  color: u,
1199
1199
  emissive: u,
1200
1200
  emissiveIntensity: 0.5,
1201
1201
  transparent: !0,
1202
1202
  opacity: 0.6
1203
- }), M = new m(w, d);
1204
- M.position.set(0, -0.25, 0), c.add(M), r.add(c);
1203
+ }), f = new m(w, M);
1204
+ f.position.set(0, -0.25, 0), c.add(f), n.add(c);
1205
1205
  }
1206
- this.add(r);
1206
+ this.add(n);
1207
1207
  }
1208
1208
  }
1209
- class Xe extends m {
1209
+ class Ke extends m {
1210
1210
  constructor() {
1211
1211
  super();
1212
- const e = new ae(), t = new Y({
1212
+ const e = new me(), t = new U({
1213
1213
  color: 5597999,
1214
1214
  roughness: 0.1,
1215
1215
  transmission: 0.9,
@@ -1222,46 +1222,78 @@ class Xe extends m {
1222
1222
  this.geometry = e, this.material = t;
1223
1223
  }
1224
1224
  }
1225
+ const Qe = {
1226
+ uniforms: {
1227
+ tDiffuse: { value: null },
1228
+ opacity: { value: 1 }
1229
+ },
1230
+ vertexShader: `
1231
+ varying vec2 vUv;
1232
+ void main() {
1233
+ vUv = uv;
1234
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
1235
+ }
1236
+ `,
1237
+ fragmentShader: `
1238
+ uniform float opacity;
1239
+ uniform sampler2D tDiffuse;
1240
+ varying vec2 vUv;
1241
+ void main() {
1242
+ vec4 texel = texture2D(tDiffuse, vUv);
1243
+ gl_FragColor = opacity * texel;
1244
+ }
1245
+ `
1246
+ }, $e = (h) => {
1247
+ const e = new Uint8Array(4 * h * h);
1248
+ for (let o = 0; o < h * h; o++) {
1249
+ const s = o * 4, n = (o % h ^ Math.floor(o / h)) & 1 ? 255 : 0;
1250
+ e[s] = n, e[s + 1] = n, e[s + 2] = n, e[s + 3] = 255;
1251
+ }
1252
+ const t = new ne(e, h, h, ae, re);
1253
+ return t.wrapS = _, t.wrapT = _, t.minFilter = ce, t.needsUpdate = !0, t;
1254
+ };
1225
1255
  export {
1226
- Te as Beaker,
1227
- se as BeakerGeometry,
1228
- le as BifurcatedStaircaseGeometry,
1229
- be as BoneGeometry,
1256
+ Ae as Beaker,
1257
+ ie as BeakerGeometry,
1258
+ ye as BifurcatedStaircaseGeometry,
1259
+ Pe as BoneGeometry,
1230
1260
  ze as Book,
1231
- Le as Bottle,
1232
- ie as Bubbling,
1233
- Fe as BunsenBurner,
1234
- Ie as Candle,
1235
- ye as CrossHeadstoneGeometry,
1236
- ke as Desk,
1237
- me as DioramaGeometry,
1238
- Ce as ElectricPanel,
1239
- pe as FenceColumn,
1240
- qe as Flask,
1241
- ue as LShapedStaircaseGeometry,
1242
- Pe as Lantern,
1243
- Ae as LeverPanel,
1244
- ve as Mausoleum,
1245
- Ne as Microscope,
1246
- ge as Moon,
1247
- Ve as MortarAndPestle,
1248
- ne as MortarGeometry,
1249
- Se as MossyRocks,
1250
- Me as ObeliskHeadstoneGeometry,
1251
- Be as Rocks,
1252
- de as RoundedHeadstoneGeometry,
1253
- Ge as SimpleLeafGeometry,
1254
- we as SpiralStaircaseGeometry,
1255
- Ee as SpiralTube,
1256
- fe as SquareHeadstoneGeometry,
1257
- he as StaircaseGeometry,
1258
- Ye as Stand,
1259
- Re as TeslaCoil,
1260
- Ze as TestTube,
1261
+ Ne as Bottle,
1262
+ he as Bubbling,
1263
+ Ve as BunsenBurner,
1264
+ Fe as Candle,
1265
+ xe as CrossHeadstoneGeometry,
1266
+ Te as Desk,
1267
+ de as DioramaGeometry,
1268
+ Ee as ElectricPanel,
1269
+ be as FenceColumn,
1270
+ Ue as Flask,
1271
+ fe as LShapedStaircaseGeometry,
1272
+ Le as Lantern,
1273
+ Re as LeverPanel,
1274
+ Be as Mausoleum,
1275
+ Ye as Microscope,
1276
+ Se as Moon,
1277
+ _e as MortarAndPestle,
1278
+ le as MortarGeometry,
1279
+ Ce as MossyRocks,
1280
+ Ge as ObeliskHeadstoneGeometry,
1281
+ qe as Rocks,
1282
+ ve as RoundedHeadstoneGeometry,
1283
+ Ie as SimpleLeafGeometry,
1284
+ Me as SpiralStaircaseGeometry,
1285
+ Ze as SpiralTube,
1286
+ ge as SquareHeadstoneGeometry,
1287
+ pe as StaircaseGeometry,
1288
+ je as Stand,
1289
+ Oe as TeslaCoil,
1290
+ Xe as TestTube,
1261
1291
  E as TestTubeGeometry,
1262
- Oe as TestTubeRack,
1263
- Xe as WineBottle,
1264
- ae as WineBottleGeometry,
1265
- xe as WroughtIronBarGeometry
1292
+ Je as TestTubeRack,
1293
+ Ke as WineBottle,
1294
+ me as WineBottleGeometry,
1295
+ ke as WroughtIronBarGeometry,
1296
+ $e as checkerboardTexture,
1297
+ Qe as fadeShader
1266
1298
  };
1267
1299
  //# sourceMappingURL=index.es.js.map