three-low-poly 0.9.5 → 0.9.6

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,18 +1,137 @@
1
- import { Group as g, SphereGeometry as T, MeshStandardMaterial as y, Mesh as m, BufferGeometry as b, Float32BufferAttribute as F, BoxGeometry as x, ConeGeometry as L, CylinderGeometry as v, Vector2 as G, LatheGeometry as z, CircleGeometry as oe, ShaderMaterial as Y, Shape as q, ExtrudeGeometry as A, MeshBasicMaterial as se, PointLight as Q, TorusGeometry as $, DodecahedronGeometry as D, MeshPhysicalMaterial as Z, DoubleSide as N, CatmullRomCurve3 as ne, Vector3 as C, TubeGeometry as ae, LineBasicMaterial as re, Line as ce, Path as ie, Color as H, BackSide as R, DataTexture as le, RGBAFormat as me, UnsignedByteType as he, RepeatWrapping as J, NearestFilter as ue } from "three";
2
- import { mergeGeometries as I } from "three/addons/utils/BufferGeometryUtils.js";
3
- import { Sky as fe } from "three/addons/objects/Sky.js";
4
- class Se extends g {
1
+ import { Vector3 as x, MathUtils as X, Quaternion as re, Group as S, SphereGeometry as A, MeshStandardMaterial as p, Mesh as h, BufferGeometry as b, Float32BufferAttribute as C, BoxGeometry as v, ConeGeometry as N, CylinderGeometry as g, Vector2 as G, LatheGeometry as V, CircleGeometry as ce, DodecahedronGeometry as Q, ShaderMaterial as R, Shape as U, ExtrudeGeometry as z, MeshBasicMaterial as ie, PointLight as ee, TorusGeometry as te, MeshPhysicalMaterial as H, DoubleSide as F, CatmullRomCurve3 as le, TubeGeometry as me, LineBasicMaterial as ue, Line as fe, Path as he, Color as K, BackSide as oe, DataTexture as de, RGBAFormat as pe, UnsignedByteType as we, RepeatWrapping as J, NearestFilter as ye } from "three";
2
+ import { mergeGeometries as T, mergeVertices as Me } from "three/addons/utils/BufferGeometryUtils.js";
3
+ import { Sky as xe } from "three/addons/objects/Sky.js";
4
+ import { EffectComposer as ve } from "three/addons/postprocessing/EffectComposer.js";
5
+ import { RenderPass as $ } from "three/addons/postprocessing/RenderPass.js";
6
+ import { ShaderPass as ge } from "three/addons/postprocessing/ShaderPass.js";
7
+ const E = {
8
+ UP: new x(0, 1, 0),
9
+ DOWN: new x(0, -1, 0),
10
+ LEFT: new x(-1, 0, 0),
11
+ RIGHT: new x(1, 0, 0),
12
+ FORWARD: new x(0, 0, 1),
13
+ BACKWARD: new x(0, 0, -1),
14
+ X: new x(1, 0, 0),
15
+ Y: new x(0, 1, 0),
16
+ Z: new x(0, 0, 1),
17
+ XY: new x(1, 1, 0).normalize(),
18
+ XZ: new x(1, 0, 1).normalize(),
19
+ YZ: new x(0, 1, 1).normalize(),
20
+ XYZ: new x(1, 1, 1).normalize()
21
+ }, L = {
22
+ LINEAR: (i, e) => 1 - i / e,
23
+ QUADRATIC: (i, e) => Math.pow(1 - i / e, 2),
24
+ SQUARE_ROOT: (i, e) => Math.pow(1 - i / e, 0.5),
25
+ LOGARITHMIC: (i, e) => Math.log(1 + (e - i)) / Math.log(1 + e),
26
+ SINE: (i, e) => Math.cos(i / e * Math.PI / 2),
27
+ EXPONENTIAL: (i, e) => Math.exp(-i / e),
28
+ CUBIC: (i, e) => Math.pow(1 - i / e, 3),
29
+ GAUSSIAN: (i, e) => Math.exp(-Math.pow(i, 2) / (2 * Math.pow(e / 3, 2))),
30
+ INVERSE: (i, e) => e / (e + i),
31
+ SMOOTHSTEP: (i, e) => {
32
+ const t = Math.max(0, Math.min(1, 1 - i / e));
33
+ return t * t * (3 - 2 * t);
34
+ }
35
+ }, qe = (i, e, t, o, n = E.UP, r = L.LINEAR) => {
36
+ const s = i.attributes.position;
37
+ for (let a = 0; a < s.count; a++) {
38
+ const c = new x();
39
+ c.fromBufferAttribute(s, a);
40
+ const l = c.distanceTo(e);
41
+ if (l < t) {
42
+ const u = r(l, t) * o;
43
+ c.add(n.clone().multiplyScalar(u)), s.setXYZ(a, c.x, c.y, c.z);
44
+ }
45
+ }
46
+ s.needsUpdate = !0;
47
+ }, Oe = (i, e, t, o, n, r = E.UP, s = L.LINEAR) => {
48
+ const a = i.attributes.position;
49
+ for (let c = 0; c < a.count; c++) {
50
+ const l = new x();
51
+ l.fromBufferAttribute(a, c);
52
+ const m = l.distanceTo(e);
53
+ if (m < t) {
54
+ const f = s(m, t) * n, w = l.dot(r.normalize()), d = o - w;
55
+ l.add(r.clone().multiplyScalar(d * f)), a.setXYZ(c, l.x, l.y, l.z);
56
+ }
57
+ }
58
+ a.needsUpdate = !0;
59
+ }, Ve = (i, e, t, o, n = E.UP, r = L.LINEAR) => {
60
+ const s = i.attributes.position;
61
+ for (let a = 0; a < s.count; a++) {
62
+ const c = new x();
63
+ c.fromBufferAttribute(s, a);
64
+ const l = c.distanceTo(e);
65
+ if (l < t) {
66
+ const m = r(l, t), u = o * m, f = n.clone().normalize();
67
+ f.x !== 0 && (c.x += X.randFloatSpread(u) * f.x), f.y !== 0 && (c.y += X.randFloatSpread(u) * f.y), f.z !== 0 && (c.z += X.randFloatSpread(u) * f.z), s.setXYZ(a, c.x, c.y, c.z);
68
+ }
69
+ }
70
+ s.needsUpdate = !0;
71
+ }, Xe = (i, e, t, o) => {
72
+ const n = i.attributes.position, r = new x();
73
+ for (let s = 0; s < n.count; s++) {
74
+ const a = new x();
75
+ if (a.fromBufferAttribute(n, s), a.distanceTo(e) < t) {
76
+ let l = new x(), m = 0;
77
+ for (let u = 0; u < n.count; u++)
78
+ r.fromBufferAttribute(n, u), r.distanceTo(a) < t && (l.add(r), m++);
79
+ m > 0 && (l.divideScalar(m), a.lerp(l, o), n.setXYZ(s, a.x, a.y, a.z));
80
+ }
81
+ }
82
+ n.needsUpdate = !0;
83
+ }, Ye = (i, e, t, o, n = !1, r = L.LINEAR) => {
84
+ const s = i.attributes.position;
85
+ for (let a = 0; a < s.count; a++) {
86
+ const c = new x();
87
+ c.fromBufferAttribute(s, a);
88
+ const l = c.distanceTo(e);
89
+ if (l < t) {
90
+ const u = r(l, t) * o * (n ? -1 : 1), f = c.clone().sub(e).normalize();
91
+ c.add(f.multiplyScalar(u)), s.setXYZ(a, c.x, c.y, c.z);
92
+ }
93
+ }
94
+ s.needsUpdate = !0;
95
+ }, Ze = (i, e, t, o, n = E.UP, r = L.LINEAR) => {
96
+ const s = i.attributes.position, a = new re();
97
+ for (let c = 0; c < s.count; c++) {
98
+ const l = new x();
99
+ l.fromBufferAttribute(s, c);
100
+ const m = l.distanceTo(e);
101
+ if (m < t) {
102
+ const f = r(m, t) * o;
103
+ a.setFromAxisAngle(n, f), l.sub(e).applyQuaternion(a).add(e), s.setXYZ(c, l.x, l.y, l.z);
104
+ }
105
+ }
106
+ s.needsUpdate = !0;
107
+ }, Qe = {
108
+ LINEAR: (i) => i,
109
+ QUADRATIC_EASE_IN: (i) => i * i,
110
+ QUADRATIC_EASE_OUT: (i) => 1 - Math.pow(1 - i, 2),
111
+ SQUARE_ROOT_EASING: (i) => Math.sqrt(i),
112
+ LOGARITHMIC_EASING: (i) => Math.log(1 + i) / Math.log(2),
113
+ SINE_EASE_IN: (i) => 1 - Math.cos(i * Math.PI / 2),
114
+ SINE_EASE_OUT: (i) => Math.sin(i * Math.PI / 2),
115
+ EXPONENTIAL_EASE_IN: (i) => Math.pow(2, 10 * (i - 1)),
116
+ EXPONENTIAL_EASE_OUT: (i) => 1 - Math.pow(2, -10 * i),
117
+ CUBIC_EASE_IN: (i) => i * i * i,
118
+ CUBIC_EASE_OUT: (i) => 1 - Math.pow(1 - i, 3),
119
+ GAUSSIAN_EASING: (i) => Math.exp(-Math.pow(i - 0.5, 2) / (2 * 0.1)),
120
+ INVERSE_EASING: (i) => 1 / (1 + i),
121
+ SMOOTHSTEP_EASING: (i) => i * i * (3 - 2 * i)
122
+ };
123
+ class Re extends S {
5
124
  constructor() {
6
125
  super();
7
- const e = [], o = 20, t = new T(0.1, 6, 6), s = new y({
126
+ const e = [], t = 20, o = new A(0.1, 6, 6), n = new p({
8
127
  color: 16777215,
9
128
  transparent: !0,
10
129
  opacity: 0.6,
11
130
  roughness: 0.3,
12
131
  metalness: 0.3
13
132
  });
14
- for (let a = 0; a < o; a++) {
15
- const c = new m(t, s);
133
+ for (let a = 0; a < t; a++) {
134
+ const c = new h(o, n);
16
135
  c.position.set(
17
136
  (Math.random() - 0.5) * 1.5,
18
137
  // Random x position within flask
@@ -27,92 +146,92 @@ class Se extends g {
27
146
  a.position.y += 0.02, a.position.y > 3 && (a.position.y = 0, a.position.x = (Math.random() - 0.5) * 1.5, a.position.z = (Math.random() - 0.5) * 1.5);
28
147
  });
29
148
  }
30
- function n() {
31
- requestAnimationFrame(n), r();
149
+ function s() {
150
+ requestAnimationFrame(s), r();
32
151
  }
33
- n();
152
+ s();
34
153
  }
35
154
  }
36
- class Pe extends b {
37
- constructor(e = 2, o = 0.3, t = 0.6, s = 5, r = 5, n = Math.PI / 4) {
155
+ class He extends b {
156
+ constructor(e = 2, t = 0.3, o = 0.6, n = 5, r = 5, s = Math.PI / 4) {
38
157
  super();
39
158
  const a = [], c = [];
40
- for (let p = 0; p < s; p++) {
41
- const M = p * o, d = M + o, w = p * t, P = w + t;
159
+ for (let w = 0; w < n; w++) {
160
+ const d = w * t, M = d + t, y = w * o, P = y + o;
42
161
  a.push(
43
162
  // Vertical riser
44
163
  -e / 2,
45
- M,
46
- w,
164
+ d,
165
+ y,
47
166
  // Bottom-left
48
167
  e / 2,
49
- M,
50
- w,
168
+ d,
169
+ y,
51
170
  // Bottom-right
52
171
  e / 2,
53
- d,
54
- w,
172
+ M,
173
+ y,
55
174
  // Top-right
56
175
  -e / 2,
57
- d,
58
- w,
176
+ M,
177
+ y,
59
178
  // Top-left
60
179
  // Horizontal tread
61
180
  -e / 2,
62
- d,
63
- w,
181
+ M,
182
+ y,
64
183
  // Top-left
65
184
  e / 2,
66
- d,
67
- w,
185
+ M,
186
+ y,
68
187
  // Top-right
69
188
  e / 2,
70
- d,
189
+ M,
71
190
  P,
72
191
  // Back-right
73
192
  -e / 2,
74
- d,
193
+ M,
75
194
  P
76
195
  // Back-left
77
196
  );
78
- const S = p * 8;
197
+ const I = w * 8;
79
198
  c.push(
80
- S,
81
- S + 1,
82
- S + 2,
83
- S,
84
- S + 2,
85
- S + 3
199
+ I,
200
+ I + 1,
201
+ I + 2,
202
+ I,
203
+ I + 2,
204
+ I + 3
86
205
  ), c.push(
87
- S + 4,
88
- S + 5,
89
- S + 6,
90
- S + 4,
91
- S + 6,
92
- S + 7
206
+ I + 4,
207
+ I + 5,
208
+ I + 6,
209
+ I + 4,
210
+ I + 6,
211
+ I + 7
93
212
  );
94
213
  }
95
- const i = s * o, l = s * t, u = e * 2;
214
+ const l = n * t, m = n * o, u = e * 2;
96
215
  a.push(
97
216
  // Landing platform (4 vertices)
98
217
  -u / 2,
99
- i,
100
218
  l,
219
+ m,
101
220
  // Bottom-left
102
221
  u / 2,
103
- i,
104
222
  l,
223
+ m,
105
224
  // Bottom-right
106
225
  u / 2,
107
- i,
108
- l + t,
226
+ l,
227
+ m + o,
109
228
  // Top-right
110
229
  -u / 2,
111
- i,
112
- l + t
230
+ l,
231
+ m + o
113
232
  // Top-left
114
233
  );
115
- const f = s * 8;
234
+ const f = n * 8;
116
235
  c.push(
117
236
  f,
118
237
  f + 1,
@@ -123,47 +242,47 @@ class Pe extends b {
123
242
  f + 3
124
243
  // Second triangle for landing
125
244
  );
126
- for (let p = 0; p < 2; p++) {
127
- const M = p === 0 ? 1 : -1;
128
- for (let d = 0; d < r; d++) {
129
- const w = i + d * o, P = w + o, S = M * (u / 4), V = l + t, O = d * t * Math.cos(n), W = d * t * Math.sin(n), E = S + M * O - e / 2 * Math.cos(n), U = S + M * O + e / 2 * Math.cos(n), B = V + W, ee = E + M * t * Math.cos(n), te = U + M * t * Math.cos(n), X = B + t * Math.sin(n);
245
+ for (let w = 0; w < 2; w++) {
246
+ const d = w === 0 ? 1 : -1;
247
+ for (let M = 0; M < r; M++) {
248
+ const y = l + M * t, P = y + t, I = d * (u / 4), _ = m + o, j = M * o * Math.cos(s), se = M * o * Math.sin(s), q = I + d * j - e / 2 * Math.cos(s), O = I + d * j + e / 2 * Math.cos(s), B = _ + se, ne = q + d * o * Math.cos(s), ae = O + d * o * Math.cos(s), D = B + o * Math.sin(s);
130
249
  a.push(
131
250
  // Vertical riser
132
- E,
133
- w,
251
+ q,
252
+ y,
134
253
  B,
135
254
  // Bottom-left
136
- U,
137
- w,
255
+ O,
256
+ y,
138
257
  B,
139
258
  // Bottom-right
140
- U,
259
+ O,
141
260
  P,
142
261
  B,
143
262
  // Top-right
144
- E,
263
+ q,
145
264
  P,
146
265
  B,
147
266
  // Top-left
148
267
  // Horizontal tread
149
- E,
268
+ q,
150
269
  P,
151
270
  B,
152
271
  // Top-left
153
- U,
272
+ O,
154
273
  P,
155
274
  B,
156
275
  // Top-right
157
- te,
276
+ ae,
158
277
  P,
159
- X,
278
+ D,
160
279
  // Back-right
161
- ee,
280
+ ne,
162
281
  P,
163
- X
282
+ D
164
283
  // Back-left
165
284
  );
166
- const k = f + 4 + p * r * 8 + d * 8;
285
+ const k = f + 4 + w * r * 8 + M * 8;
167
286
  c.push(
168
287
  k,
169
288
  k + 1,
@@ -181,65 +300,65 @@ class Pe extends b {
181
300
  );
182
301
  }
183
302
  }
184
- this.setIndex(c), this.setAttribute("position", new F(a, 3)), this.computeVertexNormals();
303
+ this.setIndex(c), this.setAttribute("position", new C(a, 3)), this.computeVertexNormals();
185
304
  }
186
305
  }
187
- class ke extends b {
188
- constructor(e = 5, o = 3, t = 5, s = 0.2) {
306
+ class je extends b {
307
+ constructor(e = 5, t = 3, o = 5, n = 0.2) {
189
308
  super();
190
309
  const r = [
191
310
  // Floor vertices
192
311
  -e / 2,
193
312
  0,
194
- -t / 2,
313
+ -o / 2,
195
314
  // 0
196
315
  e / 2,
197
316
  0,
198
- -t / 2,
317
+ -o / 2,
199
318
  // 1
200
319
  e / 2,
201
320
  0,
202
- t / 2,
321
+ o / 2,
203
322
  // 2
204
323
  -e / 2,
205
324
  0,
206
- t / 2,
325
+ o / 2,
207
326
  // 3
208
327
  // Back wall vertices
209
328
  -e / 2,
210
329
  0,
211
- -t / 2,
330
+ -o / 2,
212
331
  // 4
213
332
  e / 2,
214
333
  0,
215
- -t / 2,
334
+ -o / 2,
216
335
  // 5
217
336
  e / 2,
218
- o,
219
- -t / 2,
337
+ t,
338
+ -o / 2,
220
339
  // 6
221
340
  -e / 2,
222
- o,
223
- -t / 2,
341
+ t,
342
+ -o / 2,
224
343
  // 7
225
344
  // Left wall vertices
226
345
  -e / 2,
227
346
  0,
228
- -t / 2,
347
+ -o / 2,
229
348
  // 8
230
349
  -e / 2,
231
350
  0,
232
- t / 2,
351
+ o / 2,
233
352
  // 9
234
353
  -e / 2,
235
- o,
236
- t / 2,
354
+ t,
355
+ o / 2,
237
356
  // 10
238
357
  -e / 2,
239
- o,
240
- -t / 2
358
+ t,
359
+ -o / 2
241
360
  // 11
242
- ], n = [
361
+ ], s = [
243
362
  // Floor
244
363
  0,
245
364
  1,
@@ -262,269 +381,269 @@ class ke extends b {
262
381
  10,
263
382
  11
264
383
  ];
265
- this.setIndex(n), this.setAttribute("position", new F(r, 3)), this.computeVertexNormals();
384
+ this.setIndex(s), this.setAttribute("position", new C(r, 3)), this.computeVertexNormals();
266
385
  }
267
386
  }
268
- class Ie extends b {
269
- constructor(e = 2, o = 0.3, t = 0.5, s = 5, r = 2) {
387
+ class De extends b {
388
+ constructor(e = 2, t = 0.3, o = 0.5, n = 5, r = 2) {
270
389
  super();
271
- const n = [], a = [];
272
- for (let u = 0; u < s; u++) {
273
- const f = u * o, p = f + o, M = u * t, d = M + t;
274
- n.push(
390
+ const s = [], a = [];
391
+ for (let u = 0; u < n; u++) {
392
+ const f = u * t, w = f + t, d = u * o, M = d + o;
393
+ s.push(
275
394
  // Vertical riser
276
395
  -e / 2,
277
396
  f,
278
- M,
397
+ d,
279
398
  // Bottom-left
280
399
  e / 2,
281
400
  f,
282
- M,
401
+ d,
283
402
  // Bottom-right
284
403
  e / 2,
285
- p,
286
- M,
404
+ w,
405
+ d,
287
406
  // Top-right
288
407
  -e / 2,
289
- p,
290
- M,
408
+ w,
409
+ d,
291
410
  // Top-left
292
411
  // Horizontal tread
293
412
  -e / 2,
294
- p,
295
- M,
413
+ w,
414
+ d,
296
415
  // Top-left
297
416
  e / 2,
298
- p,
299
- M,
417
+ w,
418
+ d,
300
419
  // Top-right
301
420
  e / 2,
302
- p,
303
- d,
421
+ w,
422
+ M,
304
423
  // Back-right
305
424
  -e / 2,
306
- p,
307
- d
425
+ w,
426
+ M
308
427
  // Back-left
309
428
  );
310
- const w = u * 8;
429
+ const y = u * 8;
311
430
  a.push(
312
- w,
313
- w + 1,
314
- w + 2,
315
- w,
316
- w + 2,
317
- w + 3
431
+ y,
432
+ y + 1,
433
+ y + 2,
434
+ y,
435
+ y + 2,
436
+ y + 3
318
437
  ), a.push(
319
- w + 4,
320
- w + 5,
321
- w + 6,
322
- w + 4,
323
- w + 6,
324
- w + 7
438
+ y + 4,
439
+ y + 5,
440
+ y + 6,
441
+ y + 4,
442
+ y + 6,
443
+ y + 7
325
444
  );
326
445
  }
327
- const c = s * o, i = s * t;
328
- n.push(
446
+ const c = n * t, l = n * o;
447
+ s.push(
329
448
  // Landing platform (4 vertices)
330
449
  -e / 2,
331
450
  c,
332
- i,
451
+ l,
333
452
  // Bottom-left
334
453
  e / 2,
335
454
  c,
336
- i,
455
+ l,
337
456
  // Bottom-right
338
457
  e / 2,
339
458
  c,
340
- i + r,
459
+ l + r,
341
460
  // Top-right
342
461
  -e / 2,
343
462
  c,
344
- i + r
463
+ l + r
345
464
  // Top-left
346
465
  );
347
- const l = s * 8;
466
+ const m = n * 8;
348
467
  a.push(
349
- l,
350
- l + 1,
351
- l + 2,
468
+ m,
469
+ m + 1,
470
+ m + 2,
352
471
  // First triangle for landing
353
- l,
354
- l + 2,
355
- l + 3
472
+ m,
473
+ m + 2,
474
+ m + 3
356
475
  // Second triangle for landing
357
476
  );
358
- for (let u = 0; u < s; u++) {
359
- const f = c + u * o, p = f + o, M = -e / 2 - u * t, d = M - t;
360
- n.push(
477
+ for (let u = 0; u < n; u++) {
478
+ const f = c + u * t, w = f + t, d = -e / 2 - u * o, M = d - o;
479
+ s.push(
361
480
  // Vertical riser
362
- M,
481
+ d,
363
482
  f,
364
- i + r,
483
+ l + r,
365
484
  // Bottom-left
366
- M,
485
+ d,
367
486
  f,
368
- i + r - e,
487
+ l + r - e,
369
488
  // Bottom-right
370
- M,
371
- p,
372
- i + r - e,
489
+ d,
490
+ w,
491
+ l + r - e,
373
492
  // Top-right
374
- M,
375
- p,
376
- i + r,
493
+ d,
494
+ w,
495
+ l + r,
377
496
  // Top-left
378
497
  // Horizontal tread
379
- M,
380
- p,
381
- i + r,
498
+ d,
499
+ w,
500
+ l + r,
382
501
  // Top-left
383
- M,
384
- p,
385
- i + r - e,
386
- // Top-right
387
502
  d,
388
- p,
389
- i + r - e,
503
+ w,
504
+ l + r - e,
505
+ // Top-right
506
+ M,
507
+ w,
508
+ l + r - e,
390
509
  // Back-right
391
- d,
392
- p,
393
- i + r
510
+ M,
511
+ w,
512
+ l + r
394
513
  // Back-left
395
514
  );
396
- const w = l + 4 + u * 8;
515
+ const y = m + 4 + u * 8;
397
516
  a.push(
398
- w,
399
- w + 1,
400
- w + 2,
401
- w,
402
- w + 2,
403
- w + 3
517
+ y,
518
+ y + 1,
519
+ y + 2,
520
+ y,
521
+ y + 2,
522
+ y + 3
404
523
  ), a.push(
405
- w + 4,
406
- w + 5,
407
- w + 6,
408
- w + 4,
409
- w + 6,
410
- w + 7
524
+ y + 4,
525
+ y + 5,
526
+ y + 6,
527
+ y + 4,
528
+ y + 6,
529
+ y + 7
411
530
  );
412
531
  }
413
- this.setIndex(a), this.setAttribute("position", new F(n, 3)), this.computeVertexNormals();
532
+ this.setIndex(a), this.setAttribute("position", new C(s, 3)), this.computeVertexNormals();
414
533
  }
415
534
  }
416
- class Te extends b {
417
- constructor(e = 1, o = 0.4, t = 0.2, s = 20, r = 2, n = Math.PI / 8) {
535
+ class Ke extends b {
536
+ constructor(e = 1, t = 0.4, o = 0.2, n = 20, r = 2, s = Math.PI / 8) {
418
537
  super();
419
538
  const a = [], c = [];
420
- let i = 0;
421
- for (let l = 0; l < s; l++) {
422
- const u = r * Math.cos(i), f = r * Math.sin(i), p = l * t, M = p + t;
539
+ let l = 0;
540
+ for (let m = 0; m < n; m++) {
541
+ const u = r * Math.cos(l), f = r * Math.sin(l), w = m * o, d = w + o;
423
542
  a.push(
424
543
  // Front face (vertical riser)
425
- u - e / 2 * Math.cos(i),
426
- p,
427
- f - e / 2 * Math.sin(i),
544
+ u - e / 2 * Math.cos(l),
545
+ w,
546
+ f - e / 2 * Math.sin(l),
428
547
  // Bottom-left
429
- u + e / 2 * Math.cos(i),
430
- p,
431
- f + e / 2 * Math.sin(i),
548
+ u + e / 2 * Math.cos(l),
549
+ w,
550
+ f + e / 2 * Math.sin(l),
432
551
  // Bottom-right
433
- u + e / 2 * Math.cos(i),
434
- M,
435
- f + e / 2 * Math.sin(i),
552
+ u + e / 2 * Math.cos(l),
553
+ d,
554
+ f + e / 2 * Math.sin(l),
436
555
  // Top-right
437
- u - e / 2 * Math.cos(i),
438
- M,
439
- f - e / 2 * Math.sin(i)
556
+ u - e / 2 * Math.cos(l),
557
+ d,
558
+ f - e / 2 * Math.sin(l)
440
559
  // Top-left
441
560
  ), a.push(
442
561
  // Top face (horizontal tread)
443
- u - e / 2 * Math.cos(i),
444
- M,
445
- f - e / 2 * Math.sin(i),
562
+ u - e / 2 * Math.cos(l),
563
+ d,
564
+ f - e / 2 * Math.sin(l),
446
565
  // Top-left-front
447
- u + e / 2 * Math.cos(i),
448
- M,
449
- f + e / 2 * Math.sin(i),
566
+ u + e / 2 * Math.cos(l),
567
+ d,
568
+ f + e / 2 * Math.sin(l),
450
569
  // Top-right-front
451
- u + e / 2 * Math.cos(i) - o * Math.sin(i),
452
- M,
453
- f + e / 2 * Math.sin(i) + o * Math.cos(i),
570
+ u + e / 2 * Math.cos(l) - t * Math.sin(l),
571
+ d,
572
+ f + e / 2 * Math.sin(l) + t * Math.cos(l),
454
573
  // Back-right
455
- u - e / 2 * Math.cos(i) - o * Math.sin(i),
456
- M,
457
- f - e / 2 * Math.sin(i) + o * Math.cos(i)
574
+ u - e / 2 * Math.cos(l) - t * Math.sin(l),
575
+ d,
576
+ f - e / 2 * Math.sin(l) + t * Math.cos(l)
458
577
  // Back-left
459
578
  );
460
- const d = l * 8;
579
+ const M = m * 8;
461
580
  c.push(
462
- d,
463
- d + 1,
464
- d + 2,
581
+ M,
582
+ M + 1,
583
+ M + 2,
465
584
  // First triangle for riser
466
- d,
467
- d + 2,
468
- d + 3
585
+ M,
586
+ M + 2,
587
+ M + 3
469
588
  // Second triangle for riser
470
589
  ), c.push(
471
- d + 4,
472
- d + 5,
473
- d + 6,
590
+ M + 4,
591
+ M + 5,
592
+ M + 6,
474
593
  // First triangle for tread
475
- d + 4,
476
- d + 6,
477
- d + 7
594
+ M + 4,
595
+ M + 6,
596
+ M + 7
478
597
  // Second triangle for tread
479
- ), i += n;
598
+ ), l += s;
480
599
  }
481
- this.setIndex(c), this.setAttribute("position", new F(a, 3)), this.computeVertexNormals();
600
+ this.setIndex(c), this.setAttribute("position", new C(a, 3)), this.computeVertexNormals();
482
601
  }
483
602
  }
484
- class Be extends b {
485
- constructor(e = 2, o = 0.3, t = 0.5, s = 10) {
603
+ class Je extends b {
604
+ constructor(e = 2, t = 0.3, o = 0.5, n = 10) {
486
605
  super();
487
- const r = [], n = [];
488
- for (let a = 0; a < s; a++) {
489
- const c = a * o, i = c + o, l = a * t, u = l + t;
606
+ const r = [], s = [];
607
+ for (let a = 0; a < n; a++) {
608
+ const c = a * t, l = c + t, m = a * o, u = m + o;
490
609
  r.push(
491
610
  // Bottom face of riser (front face)
492
611
  -e / 2,
493
612
  c,
494
- l,
613
+ m,
495
614
  // 0: Bottom-left-front
496
615
  e / 2,
497
616
  c,
498
- l,
617
+ m,
499
618
  // 1: Bottom-right-front
500
619
  e / 2,
501
- i,
502
620
  l,
621
+ m,
503
622
  // 2: Top-right-front
504
623
  -e / 2,
505
- i,
506
624
  l,
625
+ m,
507
626
  // 3: Top-left-front
508
627
  // Top face of tread (horizontal step)
509
628
  -e / 2,
510
- i,
511
629
  l,
630
+ m,
512
631
  // 4: Top-left-front (repeated)
513
632
  e / 2,
514
- i,
515
633
  l,
634
+ m,
516
635
  // 5: Top-right-front (repeated)
517
636
  e / 2,
518
- i,
637
+ l,
519
638
  u,
520
639
  // 6: Top-right-back
521
640
  -e / 2,
522
- i,
641
+ l,
523
642
  u
524
643
  // 7: Top-left-back
525
644
  );
526
645
  const f = a * 8;
527
- n.push(
646
+ s.push(
528
647
  f,
529
648
  f + 1,
530
649
  f + 2,
@@ -533,7 +652,7 @@ class Be extends b {
533
652
  f + 2,
534
653
  f + 3
535
654
  // Second triangle for riser
536
- ), n.push(
655
+ ), s.push(
537
656
  f + 4,
538
657
  f + 6,
539
658
  f + 5,
@@ -544,77 +663,77 @@ class Be extends b {
544
663
  // Second triangle for tread
545
664
  );
546
665
  }
547
- this.setIndex(n), this.setAttribute("position", new F(r, 3)), this.computeVertexNormals();
666
+ this.setIndex(s), this.setAttribute("position", new C(r, 3)), this.computeVertexNormals();
548
667
  }
549
668
  }
550
- class Ce extends b {
551
- constructor(e = 0.4, o = 1.2, t = 0.2) {
669
+ class $e extends b {
670
+ constructor(e = 0.4, t = 1.2, o = 0.2) {
552
671
  super();
553
- const s = o * 0.6, r = new x(e / 2, s, t);
554
- r.translate(0, s / 2, 0);
555
- const n = e * 1.5, a = new x(n, e / 4, t);
556
- a.translate(0, s * 0.75, 0), this.copy(I([r, a], !1));
672
+ const n = t * 0.6, r = new v(e / 2, n, o);
673
+ r.translate(0, n / 2, 0);
674
+ const s = e * 1.5, a = new v(s, e / 4, o);
675
+ a.translate(0, n * 0.75, 0), this.copy(T([r, a], !1));
557
676
  }
558
677
  }
559
- class Fe extends b {
560
- constructor(e = 1.75, o = 0.75) {
678
+ class We extends b {
679
+ constructor(e = 1.75, t = 0.75) {
561
680
  super();
562
- const t = e * 0.05, s = e * 0.15, r = e * 0.15, n = e * 0.75;
681
+ const o = e * 0.05, n = e * 0.15, r = e * 0.15, s = e * 0.75;
563
682
  let a = 0;
564
- const c = new x(o, t, o);
565
- c.translate(0, a + t / 2, 0), a += t;
566
- const i = new x(o * 0.8, s, o * 0.8);
567
- i.translate(0, a + s / 2, 0), a += s;
568
- const l = new x(o * 0.6, r, o * 0.6);
569
- l.translate(0, a + r / 2, 0), a += r;
570
- const u = new x(o * 0.4, n, o * 0.4);
571
- u.translate(0, a + n / 2, 0), a += n;
572
- const f = new L(o * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
683
+ const c = new v(t, o, t);
684
+ c.translate(0, a + o / 2, 0), a += o;
685
+ const l = new v(t * 0.8, n, t * 0.8);
686
+ l.translate(0, a + n / 2, 0), a += n;
687
+ const m = new v(t * 0.6, r, t * 0.6);
688
+ m.translate(0, a + r / 2, 0), a += r;
689
+ const u = new v(t * 0.4, s, t * 0.4);
690
+ u.translate(0, a + s / 2, 0), a += s;
691
+ const f = new N(t * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
573
692
  f.translate(0, a + 0.1 / 2, 0), this.copy(
574
- I([c, i, l, u, f], !1)
693
+ T([c, l, m, u, f], !1)
575
694
  );
576
695
  }
577
696
  }
578
- class Le extends b {
579
- constructor(e = 0.6, o = 1, t = 0.2) {
697
+ class et extends b {
698
+ constructor(e = 0.6, t = 1, o = 0.2) {
580
699
  super();
581
- const s = o * 0.7, r = new x(e, s, t);
582
- r.translate(0, s / 2, 0);
583
- const n = o - s, a = new v(e / 2, e / 2, t, 16, 1, !1, 0, Math.PI);
584
- a.rotateY(Math.PI / 2), a.rotateX(Math.PI / 2), a.translate(0, s + n / 2 - t / 2 - 0.05, 0), this.copy(I([r, a], !1));
700
+ const n = t * 0.7, r = new v(e, n, o);
701
+ r.translate(0, n / 2, 0);
702
+ const s = t - n, a = new g(e / 2, e / 2, o, 16, 1, !1, 0, Math.PI);
703
+ a.rotateY(Math.PI / 2), a.rotateX(Math.PI / 2), a.translate(0, n + s / 2 - o / 2 - 0.05, 0), this.copy(T([r, a], !1));
585
704
  }
586
705
  }
587
- class qe extends b {
588
- constructor(e = 0.5, o = 0.8, t = 0.15) {
706
+ class tt extends b {
707
+ constructor(e = 0.5, t = 0.8, o = 0.15) {
589
708
  super();
590
- const s = new x(e, o, t);
591
- s.translate(0, o / 2, 0), this.copy(s);
709
+ const n = new v(e, t, o);
710
+ n.translate(0, t / 2, 0), this.copy(n);
592
711
  }
593
712
  }
594
- class Ae extends b {
713
+ class ot extends b {
595
714
  constructor(e = 2.25) {
596
715
  super();
597
- const o = new x(1.2, 0.5, 1.2);
598
- o.translate(0, 0.25, 0);
599
- const t = new x(1, e, 1);
600
- t.translate(0, 0.5 + e / 2, 0);
601
- const s = new x(1.4, 0.3, 1.4);
602
- s.translate(0, 0.5 + e + 0.15, 0), this.copy(I([o, t, s], !1));
716
+ const t = new v(1.2, 0.5, 1.2);
717
+ t.translate(0, 0.25, 0);
718
+ const o = new v(1, e, 1);
719
+ o.translate(0, 0.5 + e / 2, 0);
720
+ const n = new v(1.4, 0.3, 1.4);
721
+ n.translate(0, 0.5 + e + 0.15, 0), this.copy(T([t, o, n], !1));
603
722
  }
604
723
  }
605
- class Ne extends b {
606
- constructor(e = 2, o = 0.05, t = 0.3) {
724
+ class st extends b {
725
+ constructor(e = 2, t = 0.05, o = 0.3) {
607
726
  super();
608
- const s = new v(o, o, e, 8);
609
- s.translate(0, e / 2, 0);
610
- const r = new L(o * 1.5, t, 8);
611
- r.translate(0, e + t / 2, 0), this.copy(I([s, r], !1));
727
+ const n = new g(t, t, e, 8);
728
+ n.translate(0, e / 2, 0);
729
+ const r = new N(t * 1.5, o, 8);
730
+ r.translate(0, e + o / 2, 0), this.copy(T([n, r], !1));
612
731
  }
613
732
  }
614
- class Ve extends b {
733
+ class nt extends b {
615
734
  constructor(e = 0.1) {
616
735
  super();
617
- const o = [], t = [], s = [
736
+ const t = [], o = [], n = [
618
737
  [0, 1],
619
738
  // Top point
620
739
  [0.5, 0.75],
@@ -632,34 +751,50 @@ class Ve extends b {
632
751
  [-0.5, 0.75]
633
752
  // Left upper middle
634
753
  ];
635
- for (let n = 0; n < s.length; n++) {
636
- const [a, c] = s[n];
637
- o.push(a * e, c * e, 0);
754
+ for (let s = 0; s < n.length; s++) {
755
+ const [a, c] = n[s];
756
+ t.push(a * e, c * e, 0);
638
757
  }
639
- for (let n = 1; n < s.length - 1; n++)
640
- t.push(0, n, n + 1);
641
- t.push(0, s.length - 1, 1);
642
- const r = new F(o, 3);
643
- this.setAttribute("position", r), this.setIndex(t), this.computeVertexNormals();
758
+ for (let s = 1; s < n.length - 1; s++)
759
+ o.push(0, s, s + 1);
760
+ o.push(0, n.length - 1, 1);
761
+ const r = new C(t, 3);
762
+ this.setAttribute("position", r), this.setIndex(o), this.computeVertexNormals();
644
763
  }
645
764
  }
646
- class Ee extends b {
647
- constructor(e = 0.1, o = 0.1, t = 0.4, s = 8) {
765
+ function Se(i, e = E.XYZ, t = 0.5, o = 2) {
766
+ i.deleteAttribute("uv"), i.deleteAttribute("normal"), i = Me(i), i.computeVertexNormals();
767
+ const n = i.getAttribute("position");
768
+ for (let r = 0; r < n.count; r++) {
769
+ const s = new x().fromBufferAttribute(n, r), a = Math.random() * (o - t) + t, c = e.clone().multiplyScalar(a);
770
+ s.add(c), n.setXYZ(r, s.x, s.y, s.z);
771
+ }
772
+ return n.needsUpdate = !0, i.computeVertexNormals(), i;
773
+ }
774
+ class be extends b {
775
+ constructor(e = 1, t = 4, o = 4) {
648
776
  super();
649
- const r = new v(e * 0.6, o * 0.6, t, s);
777
+ const n = new A(e, t, o);
778
+ this.copy(Se(n, E.XYZ, 0.5, 1)), this.computeVertexNormals(), this.center();
779
+ }
780
+ }
781
+ class at extends b {
782
+ constructor(e = 0.1, t = 0.1, o = 0.4, n = 8) {
783
+ super();
784
+ const r = new g(e * 0.6, t * 0.6, o, n);
650
785
  r.translate(0, 0, 0);
651
- const n = new T(e, s, s), a = n.clone(), c = n.clone(), i = n.clone(), l = n.clone();
652
- a.translate(0, t / 2 + e * 0.6, -e * 0.6), c.translate(0, t / 2 + e * 0.6, e * 0.6), i.translate(0, -t / 2 - o * 0.6, -o * 0.6), l.translate(0, -t / 2 - o * 0.6, o * 0.6), this.copy(I([r, a, c, i, l], !1));
786
+ const s = new A(e, n, n), a = s.clone(), c = s.clone(), l = s.clone(), m = s.clone();
787
+ a.translate(0, o / 2 + e * 0.6, -e * 0.6), c.translate(0, o / 2 + e * 0.6, e * 0.6), l.translate(0, -o / 2 - t * 0.6, -t * 0.6), m.translate(0, -o / 2 - t * 0.6, t * 0.6), this.copy(T([r, a, c, l, m], !1));
653
788
  }
654
789
  }
655
- class ye extends b {
790
+ class Ge extends b {
656
791
  constructor() {
657
792
  super();
658
- const e = new T(1, 16, 16), o = new v(0.2, 0.2, 2, 16, 1, !0);
659
- o.translate(0, 1.5, 0), o.rotateX(Math.PI / 2), this.copy(I([e, o], !1));
793
+ const e = new A(1, 16, 16), t = new g(0.2, 0.2, 2, 16, 1, !0);
794
+ t.translate(0, 1.5, 0), t.rotateX(Math.PI / 2), this.copy(T([e, t], !1));
660
795
  }
661
796
  }
662
- class we extends b {
797
+ class Ie extends b {
663
798
  constructor() {
664
799
  super();
665
800
  const e = [
@@ -673,32 +808,58 @@ class we extends b {
673
808
  // Flared edge
674
809
  new G(0.8, 1.8)
675
810
  // Lip of the bowl
676
- ], o = new z(e, 12), t = new oe(1, 12);
677
- t.rotateX(-Math.PI / 2), t.translate(0, 0, 0), this.copy(I([o, t], !1));
811
+ ], t = new V(e, 12), o = new ce(1, 12);
812
+ o.rotateX(-Math.PI / 2), o.translate(0, 0, 0), this.copy(T([t, o], !1));
678
813
  }
679
814
  }
680
- class j extends b {
681
- constructor(e = 0.2, o = 0.2, t = 3, s = 32, r = !0) {
815
+ class Z extends b {
816
+ constructor(e = 0.2, t = 0.2, o = 3, n = 32, r = !0) {
682
817
  super();
683
- const n = new v(e, o, t, s, 1, r), a = new T(o, s, s / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
684
- a.translate(0, -(t / 2), 0), this.copy(I([n, a], !1));
818
+ const s = new g(e, t, o, n, 1, r), a = new A(t, n, n / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
819
+ a.translate(0, -(o / 2), 0), this.copy(T([s, a], !1));
685
820
  }
686
821
  }
687
- class Me extends b {
688
- constructor({ radius: e = 0.5, neckRadius: o = 0.2, height: t = 3, neckHeight: s = 1, segments: r = 16 } = {}) {
822
+ class Pe extends b {
823
+ constructor({ radius: e = 0.5, neckRadius: t = 0.2, height: o = 3, neckHeight: n = 1, segments: r = 16 } = {}) {
689
824
  super();
690
- const n = t - s, a = new v(e, e, n, r);
691
- a.translate(0, n / 2, 0);
692
- const c = 0.3, i = new v(o, e, c, r);
693
- i.translate(0, n + c / 2, 0);
694
- const l = new v(o, o, s, r);
695
- l.translate(0, n + c + s / 2, 0), this.copy(I([a, i, l], !1));
825
+ const s = o - n, a = new g(e, e, s, r);
826
+ a.translate(0, s / 2, 0);
827
+ const c = 0.3, l = new g(t, e, c, r);
828
+ l.translate(0, s + c / 2, 0);
829
+ const m = new g(t, t, n, r);
830
+ m.translate(0, s + c + n / 2, 0), this.copy(T([a, l, m], !1));
696
831
  }
697
832
  }
698
- class Ue extends g {
833
+ class ke extends b {
834
+ constructor({
835
+ trunkRadiusTop: e = 0.25,
836
+ trunkRadiusBottom: t = 0.4,
837
+ trunkHeight: o = 2.5,
838
+ trunkSegments: n = 14,
839
+ leafSize: r = 0.8,
840
+ leafCount: s = 6,
841
+ leafDetail: a = 0,
842
+ leafSpreadRadius: c = 1.5
843
+ } = {}) {
844
+ super();
845
+ const l = new g(e, t, o, n);
846
+ l.translate(0, o / 2, 0);
847
+ const m = [];
848
+ for (let u = 0; u < s; u++) {
849
+ const f = new Q(r, a);
850
+ f.translate(
851
+ (Math.random() - 0.5) * c,
852
+ (Math.random() - 0.5) * r + o,
853
+ (Math.random() - 0.5) * c
854
+ ), m.push(f);
855
+ }
856
+ this.copy(T([l.toNonIndexed(), T(m, !1)], !0)), this.computeVertexNormals();
857
+ }
858
+ }
859
+ class rt extends S {
699
860
  constructor() {
700
861
  super();
701
- const e = new T(5, 32, 32), o = new Y({
862
+ const e = new A(5, 32, 32), t = new R({
702
863
  uniforms: {
703
864
  time: { value: 0 }
704
865
  },
@@ -741,46 +902,46 @@ class Ue extends g {
741
902
  gl_FragColor = vec4(color, 1.0);
742
903
  }
743
904
  `
744
- }), t = new m(e, o);
745
- this.add(t);
905
+ }), o = new h(e, t);
906
+ this.add(o);
746
907
  }
747
908
  }
748
- class ze extends g {
909
+ class ct extends S {
749
910
  constructor() {
750
911
  super();
751
- const e = new x(5, 1, 5), o = new y({ color: 8421504, flatShading: !0 }), t = new m(e, o);
752
- t.position.set(0, 0.5, 0), this.add(t);
753
- const s = new x(4, 3, 4), r = new y({ color: 6908265, flatShading: !0 }), n = new m(s, r);
754
- n.position.set(0, 2.5, 0), this.add(n);
755
- const a = new L(3.5, 2, 4), c = new y({ color: 5263440, flatShading: !0 }), i = new m(a, c);
756
- i.rotation.y = Math.PI / 4, i.position.set(0, 5, 0), this.add(i);
757
- const l = new v(0.2, 0.2, 3.5, 16), u = new y({ color: 6908265, flatShading: !0 });
912
+ const e = new v(5, 1, 5), t = new p({ color: 8421504, flatShading: !0 }), o = new h(e, t);
913
+ o.position.set(0, 0.5, 0), this.add(o);
914
+ const n = new v(4, 3, 4), r = new p({ color: 6908265, flatShading: !0 }), s = new h(n, r);
915
+ s.position.set(0, 2.5, 0), this.add(s);
916
+ const a = new N(3.5, 2, 4), c = new p({ color: 5263440, flatShading: !0 }), l = new h(a, c);
917
+ l.rotation.y = Math.PI / 4, l.position.set(0, 5, 0), this.add(l);
918
+ const m = new g(0.2, 0.2, 3.5, 16), u = new p({ color: 6908265, flatShading: !0 });
758
919
  [
759
920
  [-1.8, 2.3, -2.2],
760
921
  [1.8, 2.3, -2.2],
761
922
  [-1.8, 2.3, 2.2],
762
923
  [1.8, 2.3, 2.2]
763
- ].forEach((S) => {
764
- const V = new m(l, u);
765
- V.position.set(...S), this.add(V);
924
+ ].forEach((I) => {
925
+ const _ = new h(m, u);
926
+ _.position.set(...I), this.add(_);
766
927
  });
767
- const p = new q();
768
- p.moveTo(-1, 0), p.lineTo(-1, 2), p.absarc(0, 2, 1, Math.PI, 0, !0), p.lineTo(1, 0);
769
- const M = {
928
+ const w = new U();
929
+ w.moveTo(-1, 0), w.lineTo(-1, 2), w.absarc(0, 2, 1, Math.PI, 0, !0), w.lineTo(1, 0);
930
+ const d = {
770
931
  depth: 0.5,
771
932
  bevelEnabled: !1
772
- }, d = new A(p, M), w = new y({ color: 4210752, flatShading: !0 }), P = new m(d, w);
933
+ }, M = new z(w, d), y = new p({ color: 4210752, flatShading: !0 }), P = new h(M, y);
773
934
  P.position.set(0, 0.5, 1.7), this.add(P);
774
935
  }
775
936
  }
776
- class _e extends g {
937
+ class it extends S {
777
938
  constructor() {
778
939
  super();
779
- const e = new x(5, 0.3, 3), o = new y({ color: 9132587 }), t = new m(e, o);
780
- t.position.set(0, 3.15, 0);
781
- const s = [];
782
- 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));
783
- const r = new z(s, 32), n = new y({ color: 4929057 });
940
+ const e = new v(5, 0.3, 3), t = new p({ color: 9132587 }), o = new h(e, t);
941
+ o.position.set(0, 3.15, 0);
942
+ const n = [];
943
+ n.push(new G(0.2, 0)), n.push(new G(0.25, 0.5)), n.push(new G(0.15, 1.5)), n.push(new G(0.3, 3));
944
+ const r = new V(n, 32), s = new p({ color: 4929057 });
784
945
  [
785
946
  [2.2, 0, 1.2],
786
947
  // Adjust Y to 0 so legs start at ground level
@@ -788,20 +949,20 @@ class _e extends g {
788
949
  [2.2, 0, -1.2],
789
950
  [-2.2, 0, -1.2]
790
951
  ].forEach((c) => {
791
- const i = new m(r, n);
792
- i.position.set(...c), this.add(i);
793
- }), this.add(t);
952
+ const l = new h(r, s);
953
+ l.position.set(...c), this.add(l);
954
+ }), this.add(o);
794
955
  }
795
956
  }
796
- class je extends g {
797
- constructor(e = 1, o = 0.2) {
798
- super(), this.height = e, this.radius = o, this.createCandle(), this.animateFlicker();
957
+ class lt extends S {
958
+ constructor(e = 1, t = 0.2) {
959
+ super(), this.height = e, this.radius = t, this.createCandle(), this.animateFlicker();
799
960
  }
800
961
  createCandle() {
801
- const e = new v(this.radius, this.radius, this.height, 32), o = new y({ color: 16777215 });
802
- this.candle = new m(e, o), this.candle.position.set(0, this.height / 2, 0), this.add(this.candle);
803
- const t = new T(0.05, 16, 16), s = new se({ color: 16753920 });
804
- this.flame = new m(t, s), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new Q(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight);
962
+ const e = new g(this.radius, this.radius, this.height, 32), t = new p({ color: 16777215 });
963
+ this.candle = new h(e, t), this.candle.position.set(0, this.height / 2, 0), this.add(this.candle);
964
+ const o = new A(0.05, 16, 16), n = new ie({ color: 16753920 });
965
+ this.flame = new h(o, n), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new ee(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight);
805
966
  }
806
967
  animateFlicker() {
807
968
  const e = () => {
@@ -810,47 +971,52 @@ class je extends g {
810
971
  e();
811
972
  }
812
973
  }
813
- class Ye extends g {
814
- constructor(e = 1.3, o = 0.5) {
974
+ class mt extends S {
975
+ constructor(e = 1.3, t = 0.5) {
815
976
  super();
816
- const t = new v(o, o, 0.2, 16), s = new y({ color: 9127187, flatShading: !0 }), r = new m(t, s);
977
+ const o = new g(t, t, 0.2, 16), n = new p({ color: 9127187, flatShading: !0 }), r = new h(o, n);
817
978
  r.position.set(0, 0, 0), this.add(r);
818
- const n = new v(o * 0.9, o * 0.9, e), a = new y({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), c = new m(n, a);
979
+ const s = new g(t * 0.9, t * 0.9, e), a = new p({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), c = new h(s, a);
819
980
  c.position.set(0, e / 2 + 0.1, 0), this.add(c);
820
- const i = new L(o * 1.1, 0.5, 8), l = new y({ color: 9127187, flatShading: !0 }), u = new m(i, l);
981
+ const l = new N(t * 1.1, 0.5, 8), m = new p({ color: 9127187, flatShading: !0 }), u = new h(l, m);
821
982
  u.position.set(0, e + 0.35, 0), this.add(u);
822
- const f = new $(o * 0.8, 0.05, 8, 16), p = new y({ color: 9127187, flatShading: !0 }), M = new m(f, p);
823
- M.position.set(0, e + 0.85, 0), this.add(M);
824
- const d = new Q(16755200, 1.5, 15);
825
- d.position.set(0, e / 2 + 0.1, 0), d.castShadow = !0, this.add(d);
983
+ const f = new te(t * 0.8, 0.05, 8, 16), w = new p({ color: 9127187, flatShading: !0 }), d = new h(f, w);
984
+ d.position.set(0, e + 0.85, 0), this.add(d);
985
+ const M = new ee(16755200, 1.5, 15);
986
+ M.position.set(0, e / 2 + 0.1, 0), M.castShadow = !0, this.add(M);
826
987
  }
827
988
  }
828
- class Ze extends g {
989
+ class ut extends S {
829
990
  constructor() {
830
991
  super();
831
- const e = new D(1, 0), o = new y({ color: 8421504, flatShading: !0 }), t = new y({ color: 4950843, flatShading: !0, opacity: 0.8, transparent: !0 });
832
- for (let s = 0; s < 5; s++) {
833
- const r = new m(e, o);
992
+ const e = new Q(1, 0), t = new p({ color: 8421504, flatShading: !0 }), o = new p({ color: 4950843, flatShading: !0, opacity: 0.8, transparent: !0 });
993
+ for (let n = 0; n < 5; n++) {
994
+ const r = new h(e, t);
834
995
  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);
835
- const n = new m(e, t);
836
- 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);
996
+ const s = new h(e, o);
997
+ s.scale.set(r.scale.x * 0.9, r.scale.y * 0.5, r.scale.z * 0.9), s.rotation.copy(r.rotation), s.position.copy(r.position), s.position.y += 0.3, this.add(s);
837
998
  }
838
999
  }
839
1000
  }
840
- class Oe extends g {
1001
+ class ft extends h {
1002
+ constructor(e = 1, t = 4, o = 4) {
1003
+ super(), this.geometry = new be(e, t, o), this.material = new p({ color: 8421504, flatShading: !0 });
1004
+ }
1005
+ }
1006
+ class ht extends S {
841
1007
  constructor() {
842
1008
  super();
843
- const e = new D(1, 0), o = new y({ color: 8421504, flatShading: !0 });
844
- for (let t = 0; t < 5; t++) {
845
- const s = new m(e, o);
846
- 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);
1009
+ const e = new Q(1, 0), t = new p({ color: 8421504, flatShading: !0 });
1010
+ for (let o = 0; o < 5; o++) {
1011
+ const n = new h(e, t);
1012
+ 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);
847
1013
  }
848
1014
  }
849
1015
  }
850
- class Xe extends g {
1016
+ class dt extends S {
851
1017
  constructor() {
852
1018
  super();
853
- const e = new ye(), o = new Z({
1019
+ const e = new Ge(), t = new H({
854
1020
  color: 8965375,
855
1021
  transparent: !0,
856
1022
  opacity: 0.4,
@@ -858,23 +1024,23 @@ class Xe extends g {
858
1024
  metalness: 0.1,
859
1025
  reflectivity: 0.8,
860
1026
  transmission: 0.9,
861
- side: N
862
- }), t = new m(e, o);
863
- t.rotation.x = -Math.PI / 2, this.add(t);
1027
+ side: F
1028
+ }), o = new h(e, t);
1029
+ o.rotation.x = -Math.PI / 2, this.add(o);
864
1030
  }
865
1031
  }
866
- class He extends g {
1032
+ class pt extends S {
867
1033
  constructor() {
868
1034
  super();
869
- const e = new x(1.6, 0.05, 2.1), o = new y({ color: 9109504 }), t = new m(e, o), s = new m(e, o);
870
- t.position.set(0, 0.125, 0), s.position.set(0, -0.125, 0);
871
- const r = new x(1.55, 0.2, 2), n = new y({ color: 16777215 }), a = new m(r, n);
1035
+ const e = new v(1.6, 0.05, 2.1), t = new p({ color: 9109504 }), o = new h(e, t), n = new h(e, t);
1036
+ o.position.set(0, 0.125, 0), n.position.set(0, -0.125, 0);
1037
+ const r = new v(1.55, 0.2, 2), s = new p({ color: 16777215 }), a = new h(r, s);
872
1038
  a.position.set(-0.025, 0, 0);
873
- const c = new x(0.05, 0.25, 2.1), i = new y({ color: 4915200 }), l = new m(c, i);
874
- l.position.set(-0.8, 0, 0), this.add(t), this.add(s), this.add(a), this.add(l);
1039
+ const c = new v(0.05, 0.25, 2.1), l = new p({ color: 4915200 }), m = new h(c, l);
1040
+ m.position.set(-0.8, 0, 0), this.add(o), this.add(n), this.add(a), this.add(m);
875
1041
  }
876
1042
  }
877
- class Je extends g {
1043
+ class wt extends S {
878
1044
  constructor() {
879
1045
  super();
880
1046
  const e = [
@@ -888,89 +1054,89 @@ class Je extends g {
888
1054
  // Neck
889
1055
  new G(0.6, 2.5)
890
1056
  // Mouth
891
- ], o = new z(e, 10), t = new v(0.3, 0.4, 0.2, 8), s = new y({
1057
+ ], t = new V(e, 10), o = new g(0.3, 0.4, 0.2, 8), n = new p({
892
1058
  color: 8965375,
893
1059
  transparent: !0,
894
1060
  opacity: 0.5,
895
1061
  roughness: 0.1,
896
1062
  metalness: 0.3
897
- }), r = new y({
1063
+ }), r = new p({
898
1064
  color: 16724838,
899
1065
  // Vibrant potion color
900
1066
  transparent: !0,
901
1067
  opacity: 0.6
902
- }), n = new y({
1068
+ }), s = new p({
903
1069
  color: 9127187,
904
1070
  roughness: 1
905
- }), a = new m(o, s), c = new m(o, r), i = new m(t, n);
906
- c.scale.set(0.8, 0.8, 0.8), c.position.y = 0.1, i.position.y = 2.5;
907
- const l = new g();
908
- l.add(a, c, i), this.add(l);
1071
+ }), a = new h(t, n), c = new h(t, r), l = new h(o, s);
1072
+ c.scale.set(0.8, 0.8, 0.8), c.position.y = 0.1, l.position.y = 2.5;
1073
+ const m = new S();
1074
+ m.add(a, c, l), this.add(m);
909
1075
  }
910
1076
  }
911
- class Ke extends g {
1077
+ class yt extends S {
912
1078
  constructor() {
913
1079
  super();
914
- const e = new v(0.3, 0.4, 0.1, 16), o = new y({
1080
+ const e = new g(0.3, 0.4, 0.1, 16), t = new p({
915
1081
  color: 3355443,
916
1082
  roughness: 0.6,
917
1083
  metalness: 0.3
918
- }), t = new m(e, o);
919
- t.position.y = 0.05;
920
- const s = new v(0.1, 0.1, 0.7, 16), r = new y({
1084
+ }), o = new h(e, t);
1085
+ o.position.y = 0.05;
1086
+ const n = new g(0.1, 0.1, 0.7, 16), r = new p({
921
1087
  color: 5592405,
922
1088
  roughness: 0.5,
923
1089
  metalness: 0.4
924
- }), n = new m(s, r);
925
- n.position.y = 0.4;
926
- const a = new L(0.075, 0.2, 16), c = new y({
1090
+ }), s = new h(n, r);
1091
+ s.position.y = 0.4;
1092
+ const a = new N(0.075, 0.2, 16), c = new p({
927
1093
  color: 16733440,
928
1094
  emissive: 16733440,
929
1095
  emissiveIntensity: 0.6,
930
1096
  transparent: !0,
931
1097
  opacity: 0.8
932
- }), i = new m(a, c);
933
- i.position.y = 0.8, this.add(t, n, i);
1098
+ }), l = new h(a, c);
1099
+ l.position.y = 0.8, this.add(o, s, l);
934
1100
  }
935
1101
  }
936
- class Qe extends g {
1102
+ class Mt extends S {
937
1103
  constructor() {
938
1104
  super();
939
- const e = new x(3, 4, 0.1), o = new y({
1105
+ const e = new v(3, 4, 0.1), t = new p({
940
1106
  color: 3026478,
941
1107
  roughness: 0.8,
942
1108
  metalness: 0.6
943
- }), t = new x(0.2, 0.5, 0.2), s = new y({
1109
+ }), o = new v(0.2, 0.5, 0.2), n = new p({
944
1110
  color: 11184810,
945
1111
  roughness: 0.5,
946
1112
  metalness: 0.7
947
- }), r = new v(0.3, 0.3, 0.1, 16), n = new y({
1113
+ }), r = new g(0.3, 0.3, 0.1, 16), s = new p({
948
1114
  color: 5592405,
949
1115
  roughness: 0.7,
950
1116
  metalness: 0.5
951
- }), a = new m(e, o);
952
- for (let w = -1; w <= 1; w++) {
953
- const P = new m(t, s);
954
- P.position.set(w, 1.5, 0.1), a.add(P);
1117
+ }), a = new h(e, t);
1118
+ for (let y = -1; y <= 1; y++) {
1119
+ const P = new h(o, n);
1120
+ P.position.set(y, 1.5, 0.1), a.add(P);
955
1121
  }
956
- const c = new m(r, n);
1122
+ const c = new h(r, s);
957
1123
  c.rotation.x = Math.PI / 2, c.position.set(0, 0.5, 0.15), a.add(c);
958
- const i = new T(0.15, 8, 8), l = new y({
1124
+ const l = new A(0.15, 8, 8), m = new p({
959
1125
  color: 16711680,
960
1126
  emissive: 16711680,
961
1127
  emissiveIntensity: 0.5
962
- }), u = new m(i, l);
1128
+ }), u = new h(l, m);
963
1129
  u.position.set(0, -1, 0.1), a.add(u), this.add(a);
964
- let f = 0.015, p = 0.8, M = 0.2;
965
- function d() {
966
- requestAnimationFrame(d);
967
- const w = M + Math.abs(Math.sin(Date.now() * f)) * (p - M);
968
- u.material.emissiveIntensity = w;
1130
+ let f = 0.015, w = 0.8, d = 0.2;
1131
+ function M() {
1132
+ requestAnimationFrame(M);
1133
+ const y = d + Math.abs(Math.sin(Date.now() * f)) * (w - d);
1134
+ u.material.emissiveIntensity = y;
969
1135
  }
970
- d();
1136
+ M();
971
1137
  }
972
1138
  }
973
- class $e extends g {
1139
+ class xt extends S {
974
1140
  constructor() {
975
1141
  super();
976
1142
  const e = [
@@ -984,108 +1150,108 @@ class $e extends g {
984
1150
  // Narrow neck
985
1151
  new G(0.6, 3.5)
986
1152
  // Mouth of the flask
987
- ], o = new z(e, 12), t = new v(0.6, 0.7, 0.3, 8), s = new y({
1153
+ ], t = new V(e, 12), o = new g(0.6, 0.7, 0.3, 8), n = new p({
988
1154
  color: 8965290,
989
1155
  transparent: !0,
990
1156
  opacity: 0.4,
991
1157
  roughness: 0.1,
992
1158
  metalness: 0.5
993
- }), r = new y({
1159
+ }), r = new p({
994
1160
  color: 9127187,
995
1161
  roughness: 1
996
- }), n = new m(o, s), a = new m(t, r);
997
- a.position.y = 3.5, this.add(n, a);
1162
+ }), s = new h(t, n), a = new h(o, r);
1163
+ a.position.y = 3.5, this.add(s, a);
998
1164
  }
999
1165
  }
1000
- class De extends g {
1166
+ class vt extends S {
1001
1167
  constructor() {
1002
1168
  super();
1003
- const e = new x(2, 3, 0.1), o = new y({
1169
+ const e = new v(2, 3, 0.1), t = new p({
1004
1170
  color: 3355443,
1005
1171
  roughness: 0.8,
1006
1172
  metalness: 0.5
1007
- }), t = new m(e, o), s = new v(0.1, 0.1, 0.2, 8), r = new v(0.05, 0.05, 1, 8), n = new y({
1173
+ }), o = new h(e, t), n = new g(0.1, 0.1, 0.2, 8), r = new g(0.05, 0.05, 1, 8), s = new p({
1008
1174
  color: 11184810,
1009
1175
  roughness: 0.5,
1010
1176
  metalness: 0.7
1011
1177
  });
1012
1178
  for (let a = -0.5; a <= 0.5; a += 0.5) {
1013
- const c = new m(s, n);
1179
+ const c = new h(n, s);
1014
1180
  c.position.set(a, 1, 0.1);
1015
- const i = new m(r, n);
1016
- i.position.y = 0.5, c.add(i), this.add(c);
1181
+ const l = new h(r, s);
1182
+ l.position.y = 0.5, c.add(l), this.add(c);
1017
1183
  }
1018
- this.add(t);
1184
+ this.add(o);
1019
1185
  }
1020
1186
  }
1021
- class Re extends g {
1187
+ class gt extends S {
1022
1188
  constructor() {
1023
1189
  super();
1024
- const e = new x(1, 0.2, 0.5), o = new y({
1190
+ const e = new v(1, 0.2, 0.5), t = new p({
1025
1191
  color: 4473924,
1026
1192
  roughness: 0.6,
1027
1193
  metalness: 0.3
1028
- }), t = new m(e, o);
1029
- t.position.y = 0.1;
1030
- const s = new x(0.2, 1, 0.2), r = new m(s, o);
1194
+ }), o = new h(e, t);
1195
+ o.position.y = 0.1;
1196
+ const n = new v(0.2, 1, 0.2), r = new h(n, t);
1031
1197
  r.position.set(0, 0.6, -0.2);
1032
- const n = new v(0.1, 0.1, 0.4, 8), a = new y({
1198
+ const s = new g(0.1, 0.1, 0.4, 8), a = new p({
1033
1199
  color: 3355443,
1034
1200
  roughness: 0.5,
1035
1201
  metalness: 0.6
1036
- }), c = new m(n, a);
1202
+ }), c = new h(s, a);
1037
1203
  c.position.set(0, 1.1, -0.35), c.rotation.x = -Math.PI / 4;
1038
- const i = new x(0.6, 0.1, 0.6), l = new y({
1204
+ const l = new v(0.6, 0.1, 0.6), m = new p({
1039
1205
  color: 5592405,
1040
1206
  roughness: 0.8,
1041
1207
  metalness: 0.2
1042
- }), u = new m(i, l);
1043
- u.position.set(0, 0.6, 0), this.add(t, r, c, u);
1208
+ }), u = new h(l, m);
1209
+ u.position.set(0, 0.6, 0), this.add(o, r, c, u);
1044
1210
  }
1045
1211
  }
1046
- class We extends g {
1212
+ class St extends S {
1047
1213
  constructor() {
1048
1214
  super();
1049
- const e = new we(), o = new v(0.2, 0.3, 1.5, 8);
1050
- o.translate(0, 0.75, 0);
1051
- const t = new y({
1215
+ const e = new Ie(), t = new g(0.2, 0.3, 1.5, 8);
1216
+ t.translate(0, 0.75, 0);
1217
+ const o = new p({
1052
1218
  color: 6045747,
1053
1219
  // Dark earthy tone
1054
1220
  roughness: 1,
1055
1221
  metalness: 0,
1056
- side: N
1222
+ side: F
1057
1223
  // Render inside and outside
1058
- }), s = new y({
1224
+ }), n = new p({
1059
1225
  color: 9132587,
1060
1226
  // Slightly lighter earthy color
1061
1227
  roughness: 0.8,
1062
1228
  metalness: 0.1
1063
- }), r = new m(e, t), n = new m(o, s);
1064
- n.position.set(0.3, 1.3, 0), n.rotation.z = Math.PI / 4, this.add(r, n);
1229
+ }), r = new h(e, o), s = new h(t, n);
1230
+ s.position.set(0.3, 1.3, 0), s.rotation.z = Math.PI / 4, this.add(r, s);
1065
1231
  }
1066
1232
  }
1067
- class et extends g {
1233
+ class bt extends S {
1068
1234
  constructor() {
1069
1235
  super();
1070
- const e = 100, o = 0.05, t = new ne(
1071
- Array.from({ length: e }, (i, l) => {
1072
- const u = l * 0.2;
1073
- return new C(
1236
+ const e = 100, t = 0.05, o = new le(
1237
+ Array.from({ length: e }, (l, m) => {
1238
+ const u = m * 0.2;
1239
+ return new x(
1074
1240
  Math.cos(u) * 0.4,
1075
- l * o,
1241
+ m * t,
1076
1242
  // Gradual height increase
1077
1243
  Math.sin(u) * 0.4
1078
1244
  );
1079
1245
  })
1080
- ), s = new ae(t, 200, 0.1, 8, !1), r = new y({
1246
+ ), n = new me(o, 200, 0.1, 8, !1), r = new p({
1081
1247
  color: 8965375,
1082
1248
  transparent: !0,
1083
1249
  opacity: 0.3,
1084
1250
  roughness: 0.1,
1085
1251
  metalness: 0.2,
1086
1252
  emissive: 8965375
1087
- }), n = new m(s, r);
1088
- this.add(n);
1253
+ }), s = new h(n, r);
1254
+ this.add(s);
1089
1255
  function a() {
1090
1256
  r.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
1091
1257
  }
@@ -1095,72 +1261,72 @@ class et extends g {
1095
1261
  c();
1096
1262
  }
1097
1263
  }
1098
- class tt extends g {
1264
+ class Gt extends S {
1099
1265
  constructor() {
1100
1266
  super();
1101
- const e = new $(0.3, 0.03, 8, 16), o = new y({
1267
+ const e = new te(0.3, 0.03, 8, 16), t = new p({
1102
1268
  color: 8947848,
1103
1269
  roughness: 0.7,
1104
1270
  metalness: 0.3
1105
- }), t = new m(e, o);
1106
- t.rotation.x = Math.PI / 2, t.position.y = 0.4;
1107
- const s = new v(0.02, 0.02, 0.4, 8), r = new y({
1271
+ }), o = new h(e, t);
1272
+ o.rotation.x = Math.PI / 2, o.position.y = 0.4;
1273
+ const n = new g(0.02, 0.02, 0.4, 8), r = new p({
1108
1274
  color: 6710886,
1109
1275
  roughness: 0.8,
1110
1276
  metalness: 0.3
1111
- }), n = [];
1277
+ }), s = [];
1112
1278
  for (let a = 0; a < 3; a++) {
1113
- const c = a / 3 * Math.PI * 2, i = new m(s, r);
1114
- i.position.set(Math.cos(c) * 0.25, 0.2, Math.sin(c) * 0.25), n.push(i);
1279
+ const c = a / 3 * Math.PI * 2, l = new h(n, r);
1280
+ l.position.set(Math.cos(c) * 0.25, 0.2, Math.sin(c) * 0.25), s.push(l);
1115
1281
  }
1116
- this.add(t, ...n);
1282
+ this.add(o, ...s);
1117
1283
  }
1118
1284
  }
1119
- class ot extends g {
1285
+ class It extends S {
1120
1286
  constructor() {
1121
1287
  super();
1122
- const e = new v(0.5, 0.6, 0.3, 16), o = new y({
1288
+ const e = new g(0.5, 0.6, 0.3, 16), t = new p({
1123
1289
  color: 3355443,
1124
1290
  roughness: 0.6,
1125
1291
  metalness: 0.5
1126
- }), t = new m(e, o);
1127
- t.position.y = 0.15;
1128
- const s = new v(0.15, 0.15, 2, 12, 1, !0), r = new y({
1292
+ }), o = new h(e, t);
1293
+ o.position.y = 0.15;
1294
+ const n = new g(0.15, 0.15, 2, 12, 1, !0), r = new p({
1129
1295
  color: 16737792,
1130
1296
  roughness: 0.5,
1131
1297
  metalness: 0.8,
1132
- side: N
1133
- }), n = new m(s, r);
1134
- n.position.y = 1.3;
1135
- const a = new T(0.3, 16, 16), c = new m(a, r);
1136
- c.position.y = 2.4, this.add(t, n, c);
1137
- const i = [];
1298
+ side: F
1299
+ }), s = new h(n, r);
1300
+ s.position.y = 1.3;
1301
+ const a = new A(0.3, 16, 16), c = new h(a, r);
1302
+ c.position.y = 2.4, this.add(o, s, c);
1303
+ const l = [];
1138
1304
  for (let f = 0; f < 5; f++) {
1139
- const p = new re({ color: 10079487 }), M = [
1140
- new C(0, 2.4, 0),
1141
- new C((Math.random() - 0.5) * 1.5, Math.random() * 2.4, (Math.random() - 0.5) * 1.5)
1142
- ], d = new b().setFromPoints(M), w = new ce(d, p);
1143
- this.add(w), i.push(w);
1305
+ const w = new ue({ color: 10079487 }), d = [
1306
+ new x(0, 2.4, 0),
1307
+ new x((Math.random() - 0.5) * 1.5, Math.random() * 2.4, (Math.random() - 0.5) * 1.5)
1308
+ ], M = new b().setFromPoints(d), y = new fe(M, w);
1309
+ this.add(y), l.push(y);
1144
1310
  }
1145
- function l() {
1146
- i.forEach((f) => {
1147
- const p = [
1148
- new C(0, 2.4, 0),
1149
- new C((Math.random() - 0.5) * 1.5, Math.random() * 2.4, (Math.random() - 0.5) * 1.5)
1311
+ function m() {
1312
+ l.forEach((f) => {
1313
+ const w = [
1314
+ new x(0, 2.4, 0),
1315
+ new x((Math.random() - 0.5) * 1.5, Math.random() * 2.4, (Math.random() - 0.5) * 1.5)
1150
1316
  ];
1151
- f.geometry.setFromPoints(p);
1317
+ f.geometry.setFromPoints(w);
1152
1318
  });
1153
1319
  }
1154
1320
  function u() {
1155
- requestAnimationFrame(u), l();
1321
+ requestAnimationFrame(u), m();
1156
1322
  }
1157
1323
  u();
1158
1324
  }
1159
1325
  }
1160
- class st extends g {
1161
- constructor(e = 0.2, o = 0.2, t = 3, s = 32) {
1326
+ class Pt extends S {
1327
+ constructor(e = 0.2, t = 0.2, o = 3, n = 32) {
1162
1328
  super();
1163
- const r = new j(e, o, t, s), n = new Z({
1329
+ const r = new Z(e, t, o, n), s = new H({
1164
1330
  color: 8965375,
1165
1331
  transparent: !0,
1166
1332
  opacity: 0.4,
@@ -1169,48 +1335,48 @@ class st extends g {
1169
1335
  reflectivity: 0.8,
1170
1336
  transmission: 0.9,
1171
1337
  // For glass effect
1172
- side: N
1173
- }), a = new m(r, n);
1338
+ side: F
1339
+ }), a = new h(r, s);
1174
1340
  this.add(a);
1175
1341
  }
1176
1342
  }
1177
- class nt extends g {
1178
- constructor(e = 3, o = [65450, 16711850, 11141375]) {
1343
+ class kt extends S {
1344
+ constructor(e = 3, t = [65450, 16711850, 11141375]) {
1179
1345
  super();
1180
- const t = new x(3, 0.2, 1), s = new y({
1346
+ const o = new v(3, 0.2, 1), n = new p({
1181
1347
  color: 9127187,
1182
1348
  // Wooden color or change to metallic tone
1183
1349
  roughness: 0.7,
1184
1350
  metalness: 0.3
1185
- }), r = new m(t, s);
1351
+ }), r = new h(o, n);
1186
1352
  r.position.y = 0.5;
1187
- const n = new j(0.1, 0.1, 1, 16), a = new y({
1353
+ const s = new Z(0.1, 0.1, 1, 16), a = new p({
1188
1354
  color: 11184810,
1189
1355
  transparent: !0,
1190
1356
  opacity: 0.4,
1191
1357
  roughness: 0.1,
1192
1358
  metalness: 0.5,
1193
- side: N
1359
+ side: F
1194
1360
  });
1195
1361
  for (let c = 0; c < e; c++) {
1196
- const i = new m(n, a), l = (c - (e - 1) / 2) * 0.8;
1197
- i.position.set(l, 1, 0);
1198
- const u = new j(0.099, 0.099, 0.5, 16, !1), f = o[c % o.length], p = new y({
1362
+ const l = new h(s, a), m = (c - (e - 1) / 2) * 0.8;
1363
+ l.position.set(m, 1, 0);
1364
+ const u = new Z(0.099, 0.099, 0.5, 16, !1), f = t[c % t.length], w = new p({
1199
1365
  color: f,
1200
1366
  emissive: f,
1201
1367
  emissiveIntensity: 0.5,
1202
1368
  transparent: !0,
1203
1369
  opacity: 0.6
1204
- }), M = new m(u, p);
1205
- M.position.set(0, -0.25, 0), i.add(M), r.add(i);
1370
+ }), d = new h(u, w);
1371
+ d.position.set(0, -0.25, 0), l.add(d), r.add(l);
1206
1372
  }
1207
1373
  this.add(r);
1208
1374
  }
1209
1375
  }
1210
- class at extends m {
1376
+ class Tt extends h {
1211
1377
  constructor() {
1212
1378
  super();
1213
- const e = new Me(), o = new Z({
1379
+ const e = new Pe(), t = new H({
1214
1380
  color: 5597999,
1215
1381
  roughness: 0.1,
1216
1382
  transmission: 0.9,
@@ -1220,30 +1386,30 @@ class at extends m {
1220
1386
  clearcoat: 1,
1221
1387
  clearcoatRoughness: 0.1
1222
1388
  });
1223
- this.geometry = e, this.material = o;
1389
+ this.geometry = e, this.material = t;
1224
1390
  }
1225
1391
  }
1226
- class pe extends q {
1227
- constructor(e = 5, o = 0.5, t = 1) {
1392
+ class Te extends U {
1393
+ constructor(e = 5, t = 0.5, o = 1) {
1228
1394
  super();
1229
- const s = Math.PI * 2 / e, r = s / 2, n = s / 4;
1230
- this.moveTo(Math.cos(0) * t, -Math.sin(0) * t);
1395
+ const n = Math.PI * 2 / e, r = n / 2, s = n / 4;
1396
+ this.moveTo(Math.cos(0) * o, -Math.sin(0) * o);
1231
1397
  for (let a = 1; a <= e; ++a) {
1232
- let c = Math.cos(s * a - n * 3) * (o / Math.cos(n)), i = -Math.sin(s * a - n * 3) * (o / Math.cos(n)), l = Math.cos(s * a - r) * o, u = -Math.sin(s * a - r) * o;
1233
- this.quadraticCurveTo(c, i, l, u), c = Math.cos(s * a - n) * (o / Math.cos(n)), i = -Math.sin(s * a - n) * (o / Math.cos(n)), l = Math.cos(s * a) * t, u = -Math.sin(s * a) * t, this.quadraticCurveTo(c, i, l, u);
1398
+ let c = Math.cos(n * a - s * 3) * (t / Math.cos(s)), l = -Math.sin(n * a - s * 3) * (t / Math.cos(s)), m = Math.cos(n * a - r) * t, u = -Math.sin(n * a - r) * t;
1399
+ this.quadraticCurveTo(c, l, m, u), c = Math.cos(n * a - s) * (t / Math.cos(s)), l = -Math.sin(n * a - s) * (t / Math.cos(s)), m = Math.cos(n * a) * o, u = -Math.sin(n * a) * o, this.quadraticCurveTo(c, l, m, u);
1234
1400
  }
1235
1401
  this.closePath();
1236
1402
  }
1237
1403
  }
1238
- class rt extends m {
1239
- constructor(e = 5, o = 0.5, t = 1, s = 0.25) {
1404
+ class At extends h {
1405
+ constructor(e = 5, t = 0.5, o = 1, n = 0.25) {
1240
1406
  super();
1241
- const r = new pe(e, o, t), n = new A(r, {
1242
- depth: s,
1243
- bevelEnabled: s > 0,
1407
+ const r = new Te(e, t, o), s = new z(r, {
1408
+ depth: n,
1409
+ bevelEnabled: n > 0,
1244
1410
  bevelThickness: 0,
1245
1411
  bevelSize: 0
1246
- }), a = new y({
1412
+ }), a = new p({
1247
1413
  color: 16776960,
1248
1414
  emissive: 16766720,
1249
1415
  emissiveIntensity: 0.25,
@@ -1251,76 +1417,76 @@ class rt extends m {
1251
1417
  roughness: 0.3,
1252
1418
  flatShading: !0
1253
1419
  });
1254
- n.center(), this.geometry = n, this.material = a;
1420
+ s.center(), this.geometry = s, this.material = a;
1255
1421
  }
1256
1422
  }
1257
- class de extends q {
1258
- constructor(e = 5, o = 0.5, t = 1, s = 5, r = 0.25) {
1423
+ class Ae extends U {
1424
+ constructor(e = 5, t = 0.5, o = 1, n = 5, r = 0.25) {
1259
1425
  super();
1260
- const n = Math.PI * 2 / e, a = n / 4;
1261
- this.moveTo(Math.cos(0) * t, -Math.sin(0) * t);
1426
+ const s = Math.PI * 2 / e, a = s / 4;
1427
+ this.moveTo(Math.cos(0) * o, -Math.sin(0) * o);
1262
1428
  for (let c = 1; c <= e; ++c)
1263
- this.lineTo(Math.cos(n * c - a * 3) * o, -Math.sin(n * c - a * 3) * o), this.lineTo(Math.cos(n * c - a * 2) * o, -Math.sin(n * c - a * 2) * o), this.lineTo(Math.cos(n * c - a) * t, -Math.sin(n * c - a) * t), this.lineTo(Math.cos(n * c) * t, -Math.sin(n * c) * t);
1264
- if (this.closePath(), r > 0 && s > 2) {
1265
- const c = new ie(), i = Math.PI * 2 / s;
1429
+ this.lineTo(Math.cos(s * c - a * 3) * t, -Math.sin(s * c - a * 3) * t), this.lineTo(Math.cos(s * c - a * 2) * t, -Math.sin(s * c - a * 2) * t), this.lineTo(Math.cos(s * c - a) * o, -Math.sin(s * c - a) * o), this.lineTo(Math.cos(s * c) * o, -Math.sin(s * c) * o);
1430
+ if (this.closePath(), r > 0 && n > 2) {
1431
+ const c = new he(), l = Math.PI * 2 / n;
1266
1432
  c.moveTo(Math.cos(0) * r, -Math.sin(0) * r);
1267
- for (let l = 1; l < s; ++l)
1268
- c.lineTo(Math.cos(i * l) * r, -Math.sin(i * l) * r);
1433
+ for (let m = 1; m < n; ++m)
1434
+ c.lineTo(Math.cos(l * m) * r, -Math.sin(l * m) * r);
1269
1435
  c.lineTo(Math.cos(0) * r, -Math.sin(0) * r), this.holes.push(c);
1270
1436
  }
1271
1437
  }
1272
1438
  }
1273
- class ct extends m {
1274
- constructor(e = 5, o = 0.5, t = 1, s = 5, r = 0.25, n = 0.25) {
1439
+ class Bt extends h {
1440
+ constructor(e = 5, t = 0.5, o = 1, n = 5, r = 0.25, s = 0.25) {
1275
1441
  super();
1276
- const a = new de(e, o, t, s, r), c = new A(a, {
1277
- depth: n,
1278
- bevelEnabled: n > 0,
1442
+ const a = new Ae(e, t, o, n, r), c = new z(a, {
1443
+ depth: s,
1444
+ bevelEnabled: s > 0,
1279
1445
  bevelThickness: 0,
1280
1446
  bevelSize: 0
1281
- }), i = new y({
1447
+ }), l = new p({
1282
1448
  color: 11184810,
1283
1449
  metalness: 0.8,
1284
1450
  roughness: 0.2,
1285
1451
  reflectivity: 0.5
1286
1452
  });
1287
- c.center(), this.geometry = c, this.material = i;
1453
+ c.center(), this.geometry = c, this.material = l;
1288
1454
  }
1289
1455
  }
1290
- class xe extends q {
1291
- constructor(e = 1, o = 2.1, t = 1.4, s = 1.6) {
1292
- super(), this.moveTo(0, t * e / 3), this.bezierCurveTo(
1293
- -o * 0.375 * e,
1294
- t * e,
1456
+ class Be extends U {
1457
+ constructor(e = 1, t = 2.1, o = 1.4, n = 1.6) {
1458
+ super(), this.moveTo(0, o * e / 3), this.bezierCurveTo(
1459
+ -t * 0.375 * e,
1460
+ o * e,
1295
1461
  // Control point 1 for the left lobe
1296
- -o * e,
1297
- t * e / 3,
1462
+ -t * e,
1463
+ o * e / 3,
1298
1464
  // Control point 2 for the left side of the heart
1299
1465
  0,
1300
- -s * e
1466
+ -n * e
1301
1467
  // Bottom tip of the heart, controlled by `tipDepth`
1302
1468
  ), this.bezierCurveTo(
1303
- o * e,
1304
- t * e / 3,
1305
- // Control point 3 for the right side of the heart
1306
- o * 0.375 * e,
1307
1469
  t * e,
1470
+ o * e / 3,
1471
+ // Control point 3 for the right side of the heart
1472
+ t * 0.375 * e,
1473
+ o * e,
1308
1474
  // Control point 4 for the right lobe
1309
1475
  0,
1310
- t * e / 3
1476
+ o * e / 3
1311
1477
  // Close shape at the top middle
1312
1478
  );
1313
1479
  }
1314
1480
  }
1315
- class it extends m {
1316
- constructor(e = 1, o = 1, t = 1, s = 10, r = 0.25) {
1481
+ class Et extends h {
1482
+ constructor(e = 1, t = 1, o = 1, n = 10, r = 0.25) {
1317
1483
  super();
1318
- const n = new xe(e, o, t, s), a = new A(n, {
1484
+ const s = new Be(e, t, o, n), a = new z(s, {
1319
1485
  depth: r,
1320
1486
  bevelEnabled: r > 0,
1321
1487
  bevelThickness: 0,
1322
1488
  bevelSize: 0
1323
- }), c = new y({
1489
+ }), c = new p({
1324
1490
  color: 12986408,
1325
1491
  emissive: 12981270,
1326
1492
  emissiveIntensity: 0.25,
@@ -1331,25 +1497,25 @@ class it extends m {
1331
1497
  a.center(), this.geometry = a, this.material = c;
1332
1498
  }
1333
1499
  }
1334
- class ve extends q {
1335
- constructor(e = 5, o = 0.5, t = 1) {
1500
+ class Ee extends U {
1501
+ constructor(e = 5, t = 0.5, o = 1) {
1336
1502
  super();
1337
- const s = Math.PI * 2 / e, r = s / 2;
1338
- this.moveTo(Math.cos(0) * t, Math.sin(0) * t);
1339
- for (let n = 1; n <= e; ++n)
1340
- this.lineTo(Math.cos(s * n - r) * o, Math.sin(s * n - r) * o), this.lineTo(Math.cos(s * n) * t, Math.sin(s * n) * t);
1503
+ const n = Math.PI * 2 / e, r = n / 2;
1504
+ this.moveTo(Math.cos(0) * o, Math.sin(0) * o);
1505
+ for (let s = 1; s <= e; ++s)
1506
+ this.lineTo(Math.cos(n * s - r) * t, Math.sin(n * s - r) * t), this.lineTo(Math.cos(n * s) * o, Math.sin(n * s) * o);
1341
1507
  this.closePath();
1342
1508
  }
1343
1509
  }
1344
- class lt extends m {
1345
- constructor(e = 5, o = 0.5, t = 1, s = 0.25) {
1510
+ class Ct extends h {
1511
+ constructor(e = 5, t = 0.5, o = 1, n = 0.25) {
1346
1512
  super();
1347
- const r = new ve(e, o, t), n = new A(r, {
1348
- depth: s,
1349
- bevelEnabled: s > 0,
1513
+ const r = new Ee(e, t, o), s = new z(r, {
1514
+ depth: n,
1515
+ bevelEnabled: n > 0,
1350
1516
  bevelThickness: 0,
1351
1517
  bevelSize: 0
1352
- }), a = new y({
1518
+ }), a = new p({
1353
1519
  color: 16776960,
1354
1520
  emissive: 16766720,
1355
1521
  emissiveIntensity: 0.25,
@@ -1357,10 +1523,49 @@ class lt extends m {
1357
1523
  roughness: 0.3,
1358
1524
  flatShading: !0
1359
1525
  });
1360
- n.center(), this.geometry = n, this.material = a;
1526
+ s.center(), this.geometry = s, this.material = a;
1527
+ }
1528
+ }
1529
+ class Nt extends h {
1530
+ constructor({
1531
+ trunkRadiusTop: e = 0.25,
1532
+ trunkRadiusBottom: t = 0.4,
1533
+ trunkHeight: o = 2.5,
1534
+ trunkSegments: n = 14,
1535
+ trunkColor: r = 9127187,
1536
+ leafSize: s = 0.8,
1537
+ leafCount: a = 6,
1538
+ leafDetail: c = 0,
1539
+ leafSpreadRadius: l = 1.5,
1540
+ leafColor: m = 2263842
1541
+ } = {}) {
1542
+ super();
1543
+ const u = new ke({
1544
+ trunkRadiusTop: e,
1545
+ trunkRadiusBottom: t,
1546
+ trunkHeight: o,
1547
+ trunkSegments: n,
1548
+ trunkColor: r,
1549
+ leafSize: s,
1550
+ leafCount: a,
1551
+ leafDetail: c,
1552
+ leafSpreadRadius: l,
1553
+ leafColor: m
1554
+ }), f = new p({
1555
+ color: r,
1556
+ roughness: 0.9,
1557
+ metalness: 0,
1558
+ flatShading: !0
1559
+ }), w = new p({
1560
+ color: m,
1561
+ roughness: 0.8,
1562
+ metalness: 0,
1563
+ flatShading: !0
1564
+ });
1565
+ this.geometry = u, this.material = [f, w];
1361
1566
  }
1362
1567
  }
1363
- const K = {
1568
+ const W = {
1364
1569
  uniforms: {},
1365
1570
  vertexShader: `
1366
1571
  varying vec3 vPosition;
@@ -1378,7 +1583,7 @@ const K = {
1378
1583
  gl_FragColor = vec4(mix(bottomColor, topColor, y), 1.0);
1379
1584
  }
1380
1585
  `
1381
- }, mt = {
1586
+ }, Ce = {
1382
1587
  uniforms: {
1383
1588
  tDiffuse: { value: null },
1384
1589
  opacity: { value: 1 }
@@ -1399,10 +1604,10 @@ const K = {
1399
1604
  gl_FragColor = opacity * texel;
1400
1605
  }
1401
1606
  `
1402
- }, _ = {
1607
+ }, Y = {
1403
1608
  uniforms: {
1404
- topColor: { value: new H(51) },
1405
- bottomColor: { value: new H(17) },
1609
+ topColor: { value: new K(51) },
1610
+ bottomColor: { value: new K(17) },
1406
1611
  offset: { value: 33 },
1407
1612
  exponent: { value: 0.6 }
1408
1613
  },
@@ -1426,102 +1631,191 @@ const K = {
1426
1631
  }
1427
1632
  `
1428
1633
  };
1429
- class ht extends m {
1634
+ function Ut(i, { time: e = 0, intensity: t = 1, direction: o = E.XYZ, scale: n = 10 } = {}) {
1635
+ i.onBeforeCompile = (r) => {
1636
+ r.uniforms.time = { value: e }, r.uniforms.direction = { value: o }, r.uniforms.intensity = { value: t }, r.uniforms.scale = { value: n }, r.vertexShader = `
1637
+ uniform float time;
1638
+ uniform vec3 direction;
1639
+ uniform float intensity;
1640
+ uniform float scale;
1641
+
1642
+ float mod289(float x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
1643
+ vec4 mod289(vec4 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
1644
+ vec4 perm(vec4 x) { return mod289(((x * 34.0) + 1.0) * x); }
1645
+
1646
+ float noise(vec3 p) {
1647
+ vec3 a = floor(p);
1648
+ vec3 d = p - a;
1649
+ d = d * d * (3.0 - 2.0 * d);
1650
+
1651
+ vec4 b = a.xxyy + vec4(0.0, 1.0, 0.0, 1.0);
1652
+ vec4 k1 = perm(b.xyxy);
1653
+ vec4 k2 = perm(k1.xyxy + b.zzww);
1654
+
1655
+ vec4 c = k2 + a.zzzz;
1656
+ vec4 k3 = perm(c);
1657
+ vec4 k4 = perm(c + 1.0);
1658
+
1659
+ vec4 o1 = fract(k3 * (1.0 / 41.0));
1660
+ vec4 o2 = fract(k4 * (1.0 / 41.0));
1661
+
1662
+ vec4 o3 = o2 * d.z + o1 * (1.0 - d.z);
1663
+ vec2 o4 = o3.yw * d.x + o3.xz * (1.0 - d.x);
1664
+
1665
+ return o4.y * d.y + o4.x * (1.0 - d.y);
1666
+ }
1667
+ ` + r.vertexShader, r.vertexShader = r.vertexShader.replace(
1668
+ "#include <begin_vertex>",
1669
+ `
1670
+ vec3 transformed = vec3(position);
1671
+ float n = noise(transformed * scale + time);
1672
+ transformed += normalize(direction) * n * intensity;
1673
+ vec3 transformedNormal = normal;
1674
+ `
1675
+ ), i.userData.shader = r;
1676
+ };
1677
+ }
1678
+ function zt(i, e) {
1679
+ i.userData.shader && (i.userData.shader.uniforms.time.value += e);
1680
+ }
1681
+ class Ft extends h {
1430
1682
  constructor(e = 1e3) {
1431
- super(), this.geometry = new x(e, e, e), this.material = new Y({
1432
- vertexShader: K.vertexShader,
1433
- fragmentShader: K.fragmentShader,
1434
- side: R
1683
+ super(), this.geometry = new v(e, e, e), this.material = new R({
1684
+ vertexShader: W.vertexShader,
1685
+ fragmentShader: W.fragmentShader,
1686
+ side: oe
1435
1687
  });
1436
1688
  }
1437
1689
  }
1438
- class ut extends m {
1690
+ class Lt extends h {
1439
1691
  constructor(e = 1e3) {
1440
- super(), this.geometry = new T(e, 32, 15), this.material = new Y({
1441
- vertexShader: _.vertexShader,
1442
- fragmentShader: _.fragmentShader,
1443
- uniforms: _.uniforms,
1444
- side: R
1692
+ super(), this.geometry = new A(e, 32, 15), this.material = new R({
1693
+ vertexShader: Y.vertexShader,
1694
+ fragmentShader: Y.fragmentShader,
1695
+ uniforms: Y.uniforms,
1696
+ side: oe
1445
1697
  });
1446
1698
  }
1447
1699
  }
1448
- class ft extends m {
1449
- constructor(e = Math.PI * 0.49, o = 2 * Math.PI * 0.25, t = 10, s = 2, r = 5e-3, n = 0.8) {
1700
+ class _t extends h {
1701
+ constructor(e = Math.PI * 0.49, t = 2 * Math.PI * 0.25, o = 10, n = 2, r = 5e-3, s = 0.8) {
1450
1702
  super();
1451
- const a = new fe();
1703
+ const a = new xe();
1452
1704
  a.scale.setScalar(45e4), this.add(a);
1453
1705
  const c = a.material.uniforms;
1454
- c.turbidity.value = t, c.rayleigh.value = s, c.mieCoefficient.value = r, c.mieDirectionalG.value = n, this.skyUniforms = c, this.sunPosition(e, o);
1706
+ c.turbidity.value = o, c.rayleigh.value = n, c.mieCoefficient.value = r, c.mieDirectionalG.value = s, this.skyUniforms = c, this.sunPosition(e, t);
1455
1707
  }
1456
- sunPosition(e, o) {
1457
- const t = new C(), s = this.skyUniforms;
1458
- t.setFromSphericalCoords(1, e, o), s.sunPosition.value.copy(t);
1708
+ sunPosition(e, t) {
1709
+ const o = new x(), n = this.skyUniforms;
1710
+ o.setFromSphericalCoords(1, e, t), n.sunPosition.value.copy(o);
1459
1711
  }
1460
1712
  }
1461
- const yt = (h) => {
1462
- const e = new Uint8Array(4 * h * h);
1463
- for (let t = 0; t < h * h; t++) {
1464
- const s = t * 4, r = (t % h ^ Math.floor(t / h)) & 1 ? 255 : 0;
1465
- e[s] = r, e[s + 1] = r, e[s + 2] = r, e[s + 3] = 255;
1466
- }
1467
- const o = new le(e, h, h, me, he);
1468
- return o.wrapS = J, o.wrapT = J, o.minFilter = ue, o.needsUpdate = !0, o;
1713
+ const qt = (i) => {
1714
+ const e = new Uint8Array(4 * i * i);
1715
+ for (let o = 0; o < i * i; o++) {
1716
+ const n = o * 4, r = (o % i ^ Math.floor(o / i)) & 1 ? 255 : 0;
1717
+ e[n] = r, e[n + 1] = r, e[n + 2] = r, e[n + 3] = 255;
1718
+ }
1719
+ const t = new de(e, i, i, pe, we);
1720
+ return t.wrapS = J, t.wrapT = J, t.minFilter = ye, t.needsUpdate = !0, t;
1469
1721
  };
1722
+ class Ot {
1723
+ static dispose(e) {
1724
+ e == null || e.traverse((t) => {
1725
+ t.geometry && t.geometry.dispose(), t.material && (Array.isArray(t.material) ? t.material.forEach((o) => o.dispose()) : t.material.dispose());
1726
+ });
1727
+ }
1728
+ static fadeBetween(e, t, o, n, r = 1) {
1729
+ const s = new ve(e), a = new $(o, t);
1730
+ s.addPass(a);
1731
+ const c = new ge(Ce);
1732
+ c.uniforms.opacity.value = 1, s.addPass(c);
1733
+ let l = null;
1734
+ function m(f) {
1735
+ l || (l = f);
1736
+ const d = (f - l) / 1e3 / r;
1737
+ c.uniforms.opacity.value = Math.max(1 - d, 0), d < 1 ? (s.render(), requestAnimationFrame(m)) : (s.passes[0] = new $(n, t), l = null, requestAnimationFrame(u));
1738
+ }
1739
+ function u(f) {
1740
+ l || (l = f);
1741
+ const d = (f - l) / 1e3 / r;
1742
+ c.uniforms.opacity.value = Math.min(d, 1), d < 1 && (s.render(), requestAnimationFrame(u));
1743
+ }
1744
+ requestAnimationFrame(m);
1745
+ }
1746
+ }
1470
1747
  export {
1471
- Xe as Beaker,
1472
- ye as BeakerGeometry,
1473
- Pe as BifurcatedStaircaseGeometry,
1474
- Ee as BoneGeometry,
1475
- He as Book,
1476
- Je as Bottle,
1477
- Se as Bubbling,
1478
- Ke as BunsenBurner,
1479
- rt as Burst,
1480
- pe as BurstShape,
1481
- je as Candle,
1482
- Ce as CrossHeadstoneGeometry,
1483
- ht as DaySkybox,
1484
- _e as Desk,
1485
- ke as DioramaGeometry,
1486
- Qe as ElectricPanel,
1487
- Ae as FenceColumn,
1488
- $e as Flask,
1489
- ct as Gear,
1490
- de as GearShape,
1491
- it as Heart,
1492
- xe as HeartShape,
1493
- Ie as LShapedStaircaseGeometry,
1494
- Ye as Lantern,
1495
- De as LeverPanel,
1496
- ze as Mausoleum,
1497
- Re as Microscope,
1498
- Ue as Moon,
1499
- We as MortarAndPestle,
1500
- we as MortarGeometry,
1501
- Ze as MossyRocks,
1502
- ut as NightSkybox,
1503
- Fe as ObeliskHeadstoneGeometry,
1504
- Oe as Rocks,
1505
- Le as RoundedHeadstoneGeometry,
1506
- Ve as SimpleLeafGeometry,
1507
- Te as SpiralStaircaseGeometry,
1508
- et as SpiralTube,
1509
- qe as SquareHeadstoneGeometry,
1510
- Be as StaircaseGeometry,
1511
- tt as Stand,
1512
- lt as Star,
1513
- ve as StarShape,
1514
- ot as TeslaCoil,
1515
- st as TestTube,
1516
- j as TestTubeGeometry,
1517
- nt as TestTubeRack,
1518
- ft as TwilightSkybox,
1519
- at as WineBottle,
1520
- Me as WineBottleGeometry,
1521
- Ne as WroughtIronBarGeometry,
1522
- yt as checkerboardTexture,
1523
- K as daySkyShader,
1524
- mt as fadeShader,
1525
- _ as nightSkyShader
1748
+ dt as Beaker,
1749
+ Ge as BeakerGeometry,
1750
+ He as BifurcatedStaircaseGeometry,
1751
+ at as BoneGeometry,
1752
+ pt as Book,
1753
+ wt as Bottle,
1754
+ Re as Bubbling,
1755
+ yt as BunsenBurner,
1756
+ At as Burst,
1757
+ Te as BurstShape,
1758
+ lt as Candle,
1759
+ $e as CrossHeadstoneGeometry,
1760
+ Ft as DaySkybox,
1761
+ it as Desk,
1762
+ je as DioramaGeometry,
1763
+ E as Direction,
1764
+ Qe as Easing,
1765
+ Mt as ElectricPanel,
1766
+ L as Falloff,
1767
+ ot as FenceColumn,
1768
+ xt as Flask,
1769
+ Bt as Gear,
1770
+ Ae as GearShape,
1771
+ Et as Heart,
1772
+ Be as HeartShape,
1773
+ De as LShapedStaircaseGeometry,
1774
+ mt as Lantern,
1775
+ vt as LeverPanel,
1776
+ ct as Mausoleum,
1777
+ gt as Microscope,
1778
+ rt as Moon,
1779
+ St as MortarAndPestle,
1780
+ Ie as MortarGeometry,
1781
+ ut as MossyRocks,
1782
+ Lt as NightSkybox,
1783
+ We as ObeliskHeadstoneGeometry,
1784
+ ft as Rock,
1785
+ be as RockGeometry,
1786
+ ht as Rocks,
1787
+ et as RoundedHeadstoneGeometry,
1788
+ Ot as SceneUtils,
1789
+ nt as SimpleLeafGeometry,
1790
+ Ke as SpiralStaircaseGeometry,
1791
+ bt as SpiralTube,
1792
+ tt as SquareHeadstoneGeometry,
1793
+ Je as StaircaseGeometry,
1794
+ Gt as Stand,
1795
+ Ct as Star,
1796
+ Ee as StarShape,
1797
+ It as TeslaCoil,
1798
+ Pt as TestTube,
1799
+ Z as TestTubeGeometry,
1800
+ kt as TestTubeRack,
1801
+ Nt as Tree,
1802
+ ke as TreeGeometry,
1803
+ _t as TwilightSkybox,
1804
+ Tt as WineBottle,
1805
+ Pe as WineBottleGeometry,
1806
+ st as WroughtIronBarGeometry,
1807
+ Ut as addNoiseDisplacement,
1808
+ qt as checkerboardTexture,
1809
+ W as daySkyShader,
1810
+ qe as displacementBrush,
1811
+ Ce as fadeShader,
1812
+ Oe as flattenBrush,
1813
+ Y as nightSkyShader,
1814
+ Ve as noiseBrush,
1815
+ Se as randomTransformVertices,
1816
+ Xe as smoothBrush,
1817
+ Ye as spikeBrush,
1818
+ Ze as twistBrush,
1819
+ zt as updateMaterialTime
1526
1820
  };
1527
1821
  //# sourceMappingURL=index.es.js.map