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