three-low-poly 0.9.4 → 0.9.5
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/README.md +4 -4
- package/dist/index.cjs.js +34 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +651 -503
- package/dist/index.es.js.map +1 -1
- package/dist/index.iife.js +34 -3
- package/dist/index.iife.js.map +1 -1
- package/dist/index.umd.js +34 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Group as
|
|
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
2
|
import { mergeGeometries as I } from "three/addons/utils/BufferGeometryUtils.js";
|
|
3
|
-
|
|
3
|
+
import { Sky as fe } from "three/addons/objects/Sky.js";
|
|
4
|
+
class Se extends g {
|
|
4
5
|
constructor() {
|
|
5
6
|
super();
|
|
6
|
-
const e = [], o = 20, t = new T(0.1, 6, 6), s = new
|
|
7
|
+
const e = [], o = 20, t = new T(0.1, 6, 6), s = new y({
|
|
7
8
|
color: 16777215,
|
|
8
9
|
transparent: !0,
|
|
9
10
|
opacity: 0.6,
|
|
@@ -11,15 +12,15 @@ class pe extends v {
|
|
|
11
12
|
metalness: 0.3
|
|
12
13
|
});
|
|
13
14
|
for (let a = 0; a < o; a++) {
|
|
14
|
-
const
|
|
15
|
-
|
|
15
|
+
const c = new m(t, s);
|
|
16
|
+
c.position.set(
|
|
16
17
|
(Math.random() - 0.5) * 1.5,
|
|
17
18
|
// Random x position within flask
|
|
18
19
|
Math.random() * 3,
|
|
19
20
|
// Random y position within flask height
|
|
20
21
|
(Math.random() - 0.5) * 1.5
|
|
21
22
|
// Random z position within flask
|
|
22
|
-
), e.push(
|
|
23
|
+
), e.push(c), this.add(c);
|
|
23
24
|
}
|
|
24
25
|
function r() {
|
|
25
26
|
e.forEach((a) => {
|
|
@@ -32,57 +33,57 @@ class pe extends v {
|
|
|
32
33
|
n();
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
|
-
class
|
|
36
|
+
class Pe extends b {
|
|
36
37
|
constructor(e = 2, o = 0.3, t = 0.6, s = 5, r = 5, n = Math.PI / 4) {
|
|
37
38
|
super();
|
|
38
|
-
const a = [],
|
|
39
|
+
const a = [], c = [];
|
|
39
40
|
for (let p = 0; p < s; p++) {
|
|
40
|
-
const
|
|
41
|
+
const M = p * o, d = M + o, w = p * t, P = w + t;
|
|
41
42
|
a.push(
|
|
42
43
|
// Vertical riser
|
|
43
44
|
-e / 2,
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
M,
|
|
46
|
+
w,
|
|
46
47
|
// Bottom-left
|
|
47
48
|
e / 2,
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
M,
|
|
50
|
+
w,
|
|
50
51
|
// Bottom-right
|
|
51
52
|
e / 2,
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
d,
|
|
54
|
+
w,
|
|
54
55
|
// Top-right
|
|
55
56
|
-e / 2,
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
d,
|
|
58
|
+
w,
|
|
58
59
|
// Top-left
|
|
59
60
|
// Horizontal tread
|
|
60
61
|
-e / 2,
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
d,
|
|
63
|
+
w,
|
|
63
64
|
// Top-left
|
|
64
65
|
e / 2,
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
d,
|
|
67
|
+
w,
|
|
67
68
|
// Top-right
|
|
68
69
|
e / 2,
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
d,
|
|
71
|
+
P,
|
|
71
72
|
// Back-right
|
|
72
73
|
-e / 2,
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
d,
|
|
75
|
+
P
|
|
75
76
|
// Back-left
|
|
76
77
|
);
|
|
77
78
|
const S = p * 8;
|
|
78
|
-
|
|
79
|
+
c.push(
|
|
79
80
|
S,
|
|
80
81
|
S + 1,
|
|
81
82
|
S + 2,
|
|
82
83
|
S,
|
|
83
84
|
S + 2,
|
|
84
85
|
S + 3
|
|
85
|
-
),
|
|
86
|
+
), c.push(
|
|
86
87
|
S + 4,
|
|
87
88
|
S + 5,
|
|
88
89
|
S + 6,
|
|
@@ -91,99 +92,99 @@ class xe extends g {
|
|
|
91
92
|
S + 7
|
|
92
93
|
);
|
|
93
94
|
}
|
|
94
|
-
const
|
|
95
|
+
const i = s * o, l = s * t, u = e * 2;
|
|
95
96
|
a.push(
|
|
96
97
|
// Landing platform (4 vertices)
|
|
97
|
-
-
|
|
98
|
-
|
|
98
|
+
-u / 2,
|
|
99
|
+
i,
|
|
99
100
|
l,
|
|
100
101
|
// Bottom-left
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
u / 2,
|
|
103
|
+
i,
|
|
103
104
|
l,
|
|
104
105
|
// Bottom-right
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
u / 2,
|
|
107
|
+
i,
|
|
107
108
|
l + t,
|
|
108
109
|
// Top-right
|
|
109
|
-
-
|
|
110
|
-
|
|
110
|
+
-u / 2,
|
|
111
|
+
i,
|
|
111
112
|
l + t
|
|
112
113
|
// Top-left
|
|
113
114
|
);
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
const f = s * 8;
|
|
116
|
+
c.push(
|
|
117
|
+
f,
|
|
118
|
+
f + 1,
|
|
119
|
+
f + 2,
|
|
119
120
|
// First triangle for landing
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
f,
|
|
122
|
+
f + 2,
|
|
123
|
+
f + 3
|
|
123
124
|
// Second triangle for landing
|
|
124
125
|
);
|
|
125
126
|
for (let p = 0; p < 2; p++) {
|
|
126
|
-
const
|
|
127
|
-
for (let
|
|
128
|
-
const
|
|
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);
|
|
129
130
|
a.push(
|
|
130
131
|
// Vertical riser
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
E,
|
|
133
|
+
w,
|
|
133
134
|
B,
|
|
134
135
|
// Bottom-left
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
U,
|
|
137
|
+
w,
|
|
137
138
|
B,
|
|
138
139
|
// Bottom-right
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
U,
|
|
141
|
+
P,
|
|
141
142
|
B,
|
|
142
143
|
// Top-right
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
E,
|
|
145
|
+
P,
|
|
145
146
|
B,
|
|
146
147
|
// Top-left
|
|
147
148
|
// Horizontal tread
|
|
148
|
-
|
|
149
|
-
|
|
149
|
+
E,
|
|
150
|
+
P,
|
|
150
151
|
B,
|
|
151
152
|
// Top-left
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
U,
|
|
154
|
+
P,
|
|
154
155
|
B,
|
|
155
156
|
// Top-right
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
te,
|
|
158
|
+
P,
|
|
159
|
+
X,
|
|
159
160
|
// Back-right
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
ee,
|
|
162
|
+
P,
|
|
163
|
+
X
|
|
163
164
|
// Back-left
|
|
164
165
|
);
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
),
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
166
|
+
const k = f + 4 + p * r * 8 + d * 8;
|
|
167
|
+
c.push(
|
|
168
|
+
k,
|
|
169
|
+
k + 1,
|
|
170
|
+
k + 2,
|
|
171
|
+
k,
|
|
172
|
+
k + 2,
|
|
173
|
+
k + 3
|
|
174
|
+
), c.push(
|
|
175
|
+
k + 4,
|
|
176
|
+
k + 5,
|
|
177
|
+
k + 6,
|
|
178
|
+
k + 4,
|
|
179
|
+
k + 6,
|
|
180
|
+
k + 7
|
|
180
181
|
);
|
|
181
182
|
}
|
|
182
183
|
}
|
|
183
|
-
this.setIndex(
|
|
184
|
+
this.setIndex(c), this.setAttribute("position", new F(a, 3)), this.computeVertexNormals();
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
|
-
class
|
|
187
|
+
class ke extends b {
|
|
187
188
|
constructor(e = 5, o = 3, t = 5, s = 0.2) {
|
|
188
189
|
super();
|
|
189
190
|
const r = [
|
|
@@ -264,83 +265,83 @@ class de extends g {
|
|
|
264
265
|
this.setIndex(n), this.setAttribute("position", new F(r, 3)), this.computeVertexNormals();
|
|
265
266
|
}
|
|
266
267
|
}
|
|
267
|
-
class
|
|
268
|
+
class Ie extends b {
|
|
268
269
|
constructor(e = 2, o = 0.3, t = 0.5, s = 5, r = 2) {
|
|
269
270
|
super();
|
|
270
271
|
const n = [], a = [];
|
|
271
|
-
for (let
|
|
272
|
-
const
|
|
272
|
+
for (let u = 0; u < s; u++) {
|
|
273
|
+
const f = u * o, p = f + o, M = u * t, d = M + t;
|
|
273
274
|
n.push(
|
|
274
275
|
// Vertical riser
|
|
275
276
|
-e / 2,
|
|
276
|
-
w,
|
|
277
277
|
f,
|
|
278
|
+
M,
|
|
278
279
|
// Bottom-left
|
|
279
280
|
e / 2,
|
|
280
|
-
w,
|
|
281
281
|
f,
|
|
282
|
+
M,
|
|
282
283
|
// Bottom-right
|
|
283
284
|
e / 2,
|
|
284
285
|
p,
|
|
285
|
-
|
|
286
|
+
M,
|
|
286
287
|
// Top-right
|
|
287
288
|
-e / 2,
|
|
288
289
|
p,
|
|
289
|
-
|
|
290
|
+
M,
|
|
290
291
|
// Top-left
|
|
291
292
|
// Horizontal tread
|
|
292
293
|
-e / 2,
|
|
293
294
|
p,
|
|
294
|
-
|
|
295
|
+
M,
|
|
295
296
|
// Top-left
|
|
296
297
|
e / 2,
|
|
297
298
|
p,
|
|
298
|
-
|
|
299
|
+
M,
|
|
299
300
|
// Top-right
|
|
300
301
|
e / 2,
|
|
301
302
|
p,
|
|
302
|
-
|
|
303
|
+
d,
|
|
303
304
|
// Back-right
|
|
304
305
|
-e / 2,
|
|
305
306
|
p,
|
|
306
|
-
|
|
307
|
+
d
|
|
307
308
|
// Back-left
|
|
308
309
|
);
|
|
309
|
-
const
|
|
310
|
+
const w = u * 8;
|
|
310
311
|
a.push(
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
312
|
+
w,
|
|
313
|
+
w + 1,
|
|
314
|
+
w + 2,
|
|
315
|
+
w,
|
|
316
|
+
w + 2,
|
|
317
|
+
w + 3
|
|
317
318
|
), a.push(
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
319
|
+
w + 4,
|
|
320
|
+
w + 5,
|
|
321
|
+
w + 6,
|
|
322
|
+
w + 4,
|
|
323
|
+
w + 6,
|
|
324
|
+
w + 7
|
|
324
325
|
);
|
|
325
326
|
}
|
|
326
|
-
const
|
|
327
|
+
const c = s * o, i = s * t;
|
|
327
328
|
n.push(
|
|
328
329
|
// Landing platform (4 vertices)
|
|
329
330
|
-e / 2,
|
|
330
|
-
i,
|
|
331
331
|
c,
|
|
332
|
+
i,
|
|
332
333
|
// Bottom-left
|
|
333
334
|
e / 2,
|
|
334
|
-
i,
|
|
335
335
|
c,
|
|
336
|
+
i,
|
|
336
337
|
// Bottom-right
|
|
337
338
|
e / 2,
|
|
338
|
-
|
|
339
|
-
|
|
339
|
+
c,
|
|
340
|
+
i + r,
|
|
340
341
|
// Top-right
|
|
341
342
|
-e / 2,
|
|
342
|
-
|
|
343
|
-
|
|
343
|
+
c,
|
|
344
|
+
i + r
|
|
344
345
|
// Top-left
|
|
345
346
|
);
|
|
346
347
|
const l = s * 8;
|
|
@@ -354,263 +355,263 @@ class Ge extends g {
|
|
|
354
355
|
l + 3
|
|
355
356
|
// Second triangle for landing
|
|
356
357
|
);
|
|
357
|
-
for (let
|
|
358
|
-
const
|
|
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;
|
|
359
360
|
n.push(
|
|
360
361
|
// Vertical riser
|
|
362
|
+
M,
|
|
361
363
|
f,
|
|
362
|
-
|
|
363
|
-
c + r,
|
|
364
|
+
i + r,
|
|
364
365
|
// Bottom-left
|
|
366
|
+
M,
|
|
365
367
|
f,
|
|
366
|
-
|
|
367
|
-
c + r - e,
|
|
368
|
+
i + r - e,
|
|
368
369
|
// Bottom-right
|
|
369
|
-
|
|
370
|
+
M,
|
|
370
371
|
p,
|
|
371
|
-
|
|
372
|
+
i + r - e,
|
|
372
373
|
// Top-right
|
|
373
|
-
|
|
374
|
+
M,
|
|
374
375
|
p,
|
|
375
|
-
|
|
376
|
+
i + r,
|
|
376
377
|
// Top-left
|
|
377
378
|
// Horizontal tread
|
|
378
|
-
|
|
379
|
+
M,
|
|
379
380
|
p,
|
|
380
|
-
|
|
381
|
+
i + r,
|
|
381
382
|
// Top-left
|
|
382
|
-
|
|
383
|
+
M,
|
|
383
384
|
p,
|
|
384
|
-
|
|
385
|
+
i + r - e,
|
|
385
386
|
// Top-right
|
|
386
|
-
|
|
387
|
+
d,
|
|
387
388
|
p,
|
|
388
|
-
|
|
389
|
+
i + r - e,
|
|
389
390
|
// Back-right
|
|
390
|
-
|
|
391
|
+
d,
|
|
391
392
|
p,
|
|
392
|
-
|
|
393
|
+
i + r
|
|
393
394
|
// Back-left
|
|
394
395
|
);
|
|
395
|
-
const
|
|
396
|
+
const w = l + 4 + u * 8;
|
|
396
397
|
a.push(
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
398
|
+
w,
|
|
399
|
+
w + 1,
|
|
400
|
+
w + 2,
|
|
401
|
+
w,
|
|
402
|
+
w + 2,
|
|
403
|
+
w + 3
|
|
403
404
|
), a.push(
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
405
|
+
w + 4,
|
|
406
|
+
w + 5,
|
|
407
|
+
w + 6,
|
|
408
|
+
w + 4,
|
|
409
|
+
w + 6,
|
|
410
|
+
w + 7
|
|
410
411
|
);
|
|
411
412
|
}
|
|
412
413
|
this.setIndex(a), this.setAttribute("position", new F(n, 3)), this.computeVertexNormals();
|
|
413
414
|
}
|
|
414
415
|
}
|
|
415
|
-
class
|
|
416
|
+
class Te extends b {
|
|
416
417
|
constructor(e = 1, o = 0.4, t = 0.2, s = 20, r = 2, n = Math.PI / 8) {
|
|
417
418
|
super();
|
|
418
|
-
const a = [],
|
|
419
|
-
let
|
|
419
|
+
const a = [], c = [];
|
|
420
|
+
let i = 0;
|
|
420
421
|
for (let l = 0; l < s; l++) {
|
|
421
|
-
const
|
|
422
|
+
const u = r * Math.cos(i), f = r * Math.sin(i), p = l * t, M = p + t;
|
|
422
423
|
a.push(
|
|
423
424
|
// Front face (vertical riser)
|
|
424
|
-
|
|
425
|
+
u - e / 2 * Math.cos(i),
|
|
425
426
|
p,
|
|
426
|
-
|
|
427
|
+
f - e / 2 * Math.sin(i),
|
|
427
428
|
// Bottom-left
|
|
428
|
-
|
|
429
|
+
u + e / 2 * Math.cos(i),
|
|
429
430
|
p,
|
|
430
|
-
|
|
431
|
+
f + e / 2 * Math.sin(i),
|
|
431
432
|
// Bottom-right
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
433
|
+
u + e / 2 * Math.cos(i),
|
|
434
|
+
M,
|
|
435
|
+
f + e / 2 * Math.sin(i),
|
|
435
436
|
// Top-right
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
437
|
+
u - e / 2 * Math.cos(i),
|
|
438
|
+
M,
|
|
439
|
+
f - e / 2 * Math.sin(i)
|
|
439
440
|
// Top-left
|
|
440
441
|
), a.push(
|
|
441
442
|
// Top face (horizontal tread)
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
443
|
+
u - e / 2 * Math.cos(i),
|
|
444
|
+
M,
|
|
445
|
+
f - e / 2 * Math.sin(i),
|
|
445
446
|
// Top-left-front
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
447
|
+
u + e / 2 * Math.cos(i),
|
|
448
|
+
M,
|
|
449
|
+
f + e / 2 * Math.sin(i),
|
|
449
450
|
// Top-right-front
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
451
|
+
u + e / 2 * Math.cos(i) - o * Math.sin(i),
|
|
452
|
+
M,
|
|
453
|
+
f + e / 2 * Math.sin(i) + o * Math.cos(i),
|
|
453
454
|
// Back-right
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
455
|
+
u - e / 2 * Math.cos(i) - o * Math.sin(i),
|
|
456
|
+
M,
|
|
457
|
+
f - e / 2 * Math.sin(i) + o * Math.cos(i)
|
|
457
458
|
// Back-left
|
|
458
459
|
);
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
460
|
+
const d = l * 8;
|
|
461
|
+
c.push(
|
|
462
|
+
d,
|
|
463
|
+
d + 1,
|
|
464
|
+
d + 2,
|
|
464
465
|
// First triangle for riser
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
466
|
+
d,
|
|
467
|
+
d + 2,
|
|
468
|
+
d + 3
|
|
468
469
|
// Second triangle for riser
|
|
469
|
-
),
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
470
|
+
), c.push(
|
|
471
|
+
d + 4,
|
|
472
|
+
d + 5,
|
|
473
|
+
d + 6,
|
|
473
474
|
// First triangle for tread
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
475
|
+
d + 4,
|
|
476
|
+
d + 6,
|
|
477
|
+
d + 7
|
|
477
478
|
// Second triangle for tread
|
|
478
|
-
),
|
|
479
|
+
), i += n;
|
|
479
480
|
}
|
|
480
|
-
this.setIndex(
|
|
481
|
+
this.setIndex(c), this.setAttribute("position", new F(a, 3)), this.computeVertexNormals();
|
|
481
482
|
}
|
|
482
483
|
}
|
|
483
|
-
class
|
|
484
|
+
class Be extends b {
|
|
484
485
|
constructor(e = 2, o = 0.3, t = 0.5, s = 10) {
|
|
485
486
|
super();
|
|
486
487
|
const r = [], n = [];
|
|
487
488
|
for (let a = 0; a < s; a++) {
|
|
488
|
-
const
|
|
489
|
+
const c = a * o, i = c + o, l = a * t, u = l + t;
|
|
489
490
|
r.push(
|
|
490
491
|
// Bottom face of riser (front face)
|
|
491
492
|
-e / 2,
|
|
492
|
-
|
|
493
|
+
c,
|
|
493
494
|
l,
|
|
494
495
|
// 0: Bottom-left-front
|
|
495
496
|
e / 2,
|
|
496
|
-
|
|
497
|
+
c,
|
|
497
498
|
l,
|
|
498
499
|
// 1: Bottom-right-front
|
|
499
500
|
e / 2,
|
|
500
|
-
|
|
501
|
+
i,
|
|
501
502
|
l,
|
|
502
503
|
// 2: Top-right-front
|
|
503
504
|
-e / 2,
|
|
504
|
-
|
|
505
|
+
i,
|
|
505
506
|
l,
|
|
506
507
|
// 3: Top-left-front
|
|
507
508
|
// Top face of tread (horizontal step)
|
|
508
509
|
-e / 2,
|
|
509
|
-
|
|
510
|
+
i,
|
|
510
511
|
l,
|
|
511
512
|
// 4: Top-left-front (repeated)
|
|
512
513
|
e / 2,
|
|
513
|
-
|
|
514
|
+
i,
|
|
514
515
|
l,
|
|
515
516
|
// 5: Top-right-front (repeated)
|
|
516
517
|
e / 2,
|
|
517
|
-
|
|
518
|
-
|
|
518
|
+
i,
|
|
519
|
+
u,
|
|
519
520
|
// 6: Top-right-back
|
|
520
521
|
-e / 2,
|
|
521
|
-
|
|
522
|
-
|
|
522
|
+
i,
|
|
523
|
+
u
|
|
523
524
|
// 7: Top-left-back
|
|
524
525
|
);
|
|
525
|
-
const
|
|
526
|
+
const f = a * 8;
|
|
526
527
|
n.push(
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
528
|
+
f,
|
|
529
|
+
f + 1,
|
|
530
|
+
f + 2,
|
|
530
531
|
// First triangle for riser
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
532
|
+
f,
|
|
533
|
+
f + 2,
|
|
534
|
+
f + 3
|
|
534
535
|
// Second triangle for riser
|
|
535
536
|
), n.push(
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
537
|
+
f + 4,
|
|
538
|
+
f + 6,
|
|
539
|
+
f + 5,
|
|
539
540
|
// First triangle for tread
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
541
|
+
f + 4,
|
|
542
|
+
f + 7,
|
|
543
|
+
f + 6
|
|
543
544
|
// Second triangle for tread
|
|
544
545
|
);
|
|
545
546
|
}
|
|
546
547
|
this.setIndex(n), this.setAttribute("position", new F(r, 3)), this.computeVertexNormals();
|
|
547
548
|
}
|
|
548
549
|
}
|
|
549
|
-
class
|
|
550
|
+
class Ce extends b {
|
|
550
551
|
constructor(e = 0.4, o = 1.2, t = 0.2) {
|
|
551
552
|
super();
|
|
552
|
-
const s = o * 0.6, r = new
|
|
553
|
+
const s = o * 0.6, r = new x(e / 2, s, t);
|
|
553
554
|
r.translate(0, s / 2, 0);
|
|
554
|
-
const n = e * 1.5, a = new
|
|
555
|
+
const n = e * 1.5, a = new x(n, e / 4, t);
|
|
555
556
|
a.translate(0, s * 0.75, 0), this.copy(I([r, a], !1));
|
|
556
557
|
}
|
|
557
558
|
}
|
|
558
|
-
class
|
|
559
|
+
class Fe extends b {
|
|
559
560
|
constructor(e = 1.75, o = 0.75) {
|
|
560
561
|
super();
|
|
561
562
|
const t = e * 0.05, s = e * 0.15, r = e * 0.15, n = e * 0.75;
|
|
562
563
|
let a = 0;
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
const l = new
|
|
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);
|
|
568
569
|
l.translate(0, a + r / 2, 0), a += r;
|
|
569
|
-
const
|
|
570
|
-
|
|
571
|
-
const
|
|
572
|
-
|
|
573
|
-
I([
|
|
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);
|
|
573
|
+
f.translate(0, a + 0.1 / 2, 0), this.copy(
|
|
574
|
+
I([c, i, l, u, f], !1)
|
|
574
575
|
);
|
|
575
576
|
}
|
|
576
577
|
}
|
|
577
|
-
class
|
|
578
|
+
class Le extends b {
|
|
578
579
|
constructor(e = 0.6, o = 1, t = 0.2) {
|
|
579
580
|
super();
|
|
580
|
-
const s = o * 0.7, r = new
|
|
581
|
+
const s = o * 0.7, r = new x(e, s, t);
|
|
581
582
|
r.translate(0, s / 2, 0);
|
|
582
|
-
const n = o - s, a = new
|
|
583
|
+
const n = o - s, a = new v(e / 2, e / 2, t, 16, 1, !1, 0, Math.PI);
|
|
583
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));
|
|
584
585
|
}
|
|
585
586
|
}
|
|
586
|
-
class
|
|
587
|
+
class qe extends b {
|
|
587
588
|
constructor(e = 0.5, o = 0.8, t = 0.15) {
|
|
588
589
|
super();
|
|
589
|
-
const s = new
|
|
590
|
+
const s = new x(e, o, t);
|
|
590
591
|
s.translate(0, o / 2, 0), this.copy(s);
|
|
591
592
|
}
|
|
592
593
|
}
|
|
593
|
-
class
|
|
594
|
+
class Ae extends b {
|
|
594
595
|
constructor(e = 2.25) {
|
|
595
596
|
super();
|
|
596
|
-
const o = new
|
|
597
|
+
const o = new x(1.2, 0.5, 1.2);
|
|
597
598
|
o.translate(0, 0.25, 0);
|
|
598
|
-
const t = new
|
|
599
|
+
const t = new x(1, e, 1);
|
|
599
600
|
t.translate(0, 0.5 + e / 2, 0);
|
|
600
|
-
const s = new
|
|
601
|
+
const s = new x(1.4, 0.3, 1.4);
|
|
601
602
|
s.translate(0, 0.5 + e + 0.15, 0), this.copy(I([o, t, s], !1));
|
|
602
603
|
}
|
|
603
604
|
}
|
|
604
|
-
class
|
|
605
|
+
class Ne extends b {
|
|
605
606
|
constructor(e = 2, o = 0.05, t = 0.3) {
|
|
606
607
|
super();
|
|
607
|
-
const s = new
|
|
608
|
+
const s = new v(o, o, e, 8);
|
|
608
609
|
s.translate(0, e / 2, 0);
|
|
609
|
-
const r = new
|
|
610
|
+
const r = new L(o * 1.5, t, 8);
|
|
610
611
|
r.translate(0, e + t / 2, 0), this.copy(I([s, r], !1));
|
|
611
612
|
}
|
|
612
613
|
}
|
|
613
|
-
class
|
|
614
|
+
class Ve extends b {
|
|
614
615
|
constructor(e = 0.1) {
|
|
615
616
|
super();
|
|
616
617
|
const o = [], t = [], s = [
|
|
@@ -632,8 +633,8 @@ class Be extends g {
|
|
|
632
633
|
// Left upper middle
|
|
633
634
|
];
|
|
634
635
|
for (let n = 0; n < s.length; n++) {
|
|
635
|
-
const [a,
|
|
636
|
-
o.push(a * e,
|
|
636
|
+
const [a, c] = s[n];
|
|
637
|
+
o.push(a * e, c * e, 0);
|
|
637
638
|
}
|
|
638
639
|
for (let n = 1; n < s.length - 1; n++)
|
|
639
640
|
t.push(0, n, n + 1);
|
|
@@ -642,62 +643,62 @@ class Be extends g {
|
|
|
642
643
|
this.setAttribute("position", r), this.setIndex(t), this.computeVertexNormals();
|
|
643
644
|
}
|
|
644
645
|
}
|
|
645
|
-
class
|
|
646
|
+
class Ee extends b {
|
|
646
647
|
constructor(e = 0.1, o = 0.1, t = 0.4, s = 8) {
|
|
647
648
|
super();
|
|
648
|
-
const r = new
|
|
649
|
+
const r = new v(e * 0.6, o * 0.6, t, s);
|
|
649
650
|
r.translate(0, 0, 0);
|
|
650
|
-
const n = new T(e, s, s), a = n.clone(),
|
|
651
|
-
a.translate(0, t / 2 + e * 0.6, -e * 0.6),
|
|
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));
|
|
652
653
|
}
|
|
653
654
|
}
|
|
654
|
-
class
|
|
655
|
+
class ye extends b {
|
|
655
656
|
constructor() {
|
|
656
657
|
super();
|
|
657
|
-
const e = new T(1, 16, 16), o = new
|
|
658
|
+
const e = new T(1, 16, 16), o = new v(0.2, 0.2, 2, 16, 1, !0);
|
|
658
659
|
o.translate(0, 1.5, 0), o.rotateX(Math.PI / 2), this.copy(I([e, o], !1));
|
|
659
660
|
}
|
|
660
661
|
}
|
|
661
|
-
class
|
|
662
|
+
class we extends b {
|
|
662
663
|
constructor() {
|
|
663
664
|
super();
|
|
664
665
|
const e = [
|
|
665
|
-
new
|
|
666
|
+
new G(1, 0),
|
|
666
667
|
// Bottom of the bowl
|
|
667
|
-
new
|
|
668
|
+
new G(1.2, 0.5),
|
|
668
669
|
// Slight flare at the base
|
|
669
|
-
new
|
|
670
|
+
new G(1.4, 1.5),
|
|
670
671
|
// Outer wall
|
|
671
|
-
new
|
|
672
|
+
new G(1.3, 1.8),
|
|
672
673
|
// Flared edge
|
|
673
|
-
new
|
|
674
|
+
new G(0.8, 1.8)
|
|
674
675
|
// Lip of the bowl
|
|
675
|
-
], o = new
|
|
676
|
+
], o = new z(e, 12), t = new oe(1, 12);
|
|
676
677
|
t.rotateX(-Math.PI / 2), t.translate(0, 0, 0), this.copy(I([o, t], !1));
|
|
677
678
|
}
|
|
678
679
|
}
|
|
679
|
-
class
|
|
680
|
+
class j extends b {
|
|
680
681
|
constructor(e = 0.2, o = 0.2, t = 3, s = 32, r = !0) {
|
|
681
682
|
super();
|
|
682
|
-
const n = new
|
|
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);
|
|
683
684
|
a.translate(0, -(t / 2), 0), this.copy(I([n, a], !1));
|
|
684
685
|
}
|
|
685
686
|
}
|
|
686
|
-
class
|
|
687
|
+
class Me extends b {
|
|
687
688
|
constructor({ radius: e = 0.5, neckRadius: o = 0.2, height: t = 3, neckHeight: s = 1, segments: r = 16 } = {}) {
|
|
688
689
|
super();
|
|
689
|
-
const n = t - s, a = new
|
|
690
|
+
const n = t - s, a = new v(e, e, n, r);
|
|
690
691
|
a.translate(0, n / 2, 0);
|
|
691
|
-
const
|
|
692
|
-
|
|
693
|
-
const l = new
|
|
694
|
-
l.translate(0, n +
|
|
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));
|
|
695
696
|
}
|
|
696
697
|
}
|
|
697
|
-
class
|
|
698
|
+
class Ue extends g {
|
|
698
699
|
constructor() {
|
|
699
700
|
super();
|
|
700
|
-
const e = new T(5, 32, 32), o = new
|
|
701
|
+
const e = new T(5, 32, 32), o = new Y({
|
|
701
702
|
uniforms: {
|
|
702
703
|
time: { value: 0 }
|
|
703
704
|
},
|
|
@@ -744,63 +745,63 @@ class qe extends v {
|
|
|
744
745
|
this.add(t);
|
|
745
746
|
}
|
|
746
747
|
}
|
|
747
|
-
class
|
|
748
|
+
class ze extends g {
|
|
748
749
|
constructor() {
|
|
749
750
|
super();
|
|
750
|
-
const e = new
|
|
751
|
+
const e = new x(5, 1, 5), o = new y({ color: 8421504, flatShading: !0 }), t = new m(e, o);
|
|
751
752
|
t.position.set(0, 0.5, 0), this.add(t);
|
|
752
|
-
const s = new
|
|
753
|
+
const s = new x(4, 3, 4), r = new y({ color: 6908265, flatShading: !0 }), n = new m(s, r);
|
|
753
754
|
n.position.set(0, 2.5, 0), this.add(n);
|
|
754
|
-
const a = new
|
|
755
|
-
|
|
756
|
-
const l = new
|
|
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 });
|
|
757
758
|
[
|
|
758
759
|
[-1.8, 2.3, -2.2],
|
|
759
760
|
[1.8, 2.3, -2.2],
|
|
760
761
|
[-1.8, 2.3, 2.2],
|
|
761
762
|
[1.8, 2.3, 2.2]
|
|
762
763
|
].forEach((S) => {
|
|
763
|
-
const
|
|
764
|
-
|
|
764
|
+
const V = new m(l, u);
|
|
765
|
+
V.position.set(...S), this.add(V);
|
|
765
766
|
});
|
|
766
|
-
const p = new
|
|
767
|
+
const p = new q();
|
|
767
768
|
p.moveTo(-1, 0), p.lineTo(-1, 2), p.absarc(0, 2, 1, Math.PI, 0, !0), p.lineTo(1, 0);
|
|
768
|
-
const
|
|
769
|
+
const M = {
|
|
769
770
|
depth: 0.5,
|
|
770
771
|
bevelEnabled: !1
|
|
771
|
-
},
|
|
772
|
-
|
|
772
|
+
}, d = new A(p, M), w = new y({ color: 4210752, flatShading: !0 }), P = new m(d, w);
|
|
773
|
+
P.position.set(0, 0.5, 1.7), this.add(P);
|
|
773
774
|
}
|
|
774
775
|
}
|
|
775
|
-
class
|
|
776
|
+
class _e extends g {
|
|
776
777
|
constructor() {
|
|
777
778
|
super();
|
|
778
|
-
const e = new
|
|
779
|
+
const e = new x(5, 0.3, 3), o = new y({ color: 9132587 }), t = new m(e, o);
|
|
779
780
|
t.position.set(0, 3.15, 0);
|
|
780
781
|
const s = [];
|
|
781
|
-
s.push(new
|
|
782
|
-
const r = new
|
|
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 });
|
|
783
784
|
[
|
|
784
785
|
[2.2, 0, 1.2],
|
|
785
786
|
// Adjust Y to 0 so legs start at ground level
|
|
786
787
|
[-2.2, 0, 1.2],
|
|
787
788
|
[2.2, 0, -1.2],
|
|
788
789
|
[-2.2, 0, -1.2]
|
|
789
|
-
].forEach((
|
|
790
|
-
const
|
|
791
|
-
|
|
790
|
+
].forEach((c) => {
|
|
791
|
+
const i = new m(r, n);
|
|
792
|
+
i.position.set(...c), this.add(i);
|
|
792
793
|
}), this.add(t);
|
|
793
794
|
}
|
|
794
795
|
}
|
|
795
|
-
class
|
|
796
|
+
class je extends g {
|
|
796
797
|
constructor(e = 1, o = 0.2) {
|
|
797
798
|
super(), this.height = e, this.radius = o, this.createCandle(), this.animateFlicker();
|
|
798
799
|
}
|
|
799
800
|
createCandle() {
|
|
800
|
-
const e = new
|
|
801
|
+
const e = new v(this.radius, this.radius, this.height, 32), o = new y({ color: 16777215 });
|
|
801
802
|
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
|
|
803
|
-
this.flame = new m(t, s), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new
|
|
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);
|
|
804
805
|
}
|
|
805
806
|
animateFlicker() {
|
|
806
807
|
const e = () => {
|
|
@@ -809,25 +810,25 @@ class ze extends v {
|
|
|
809
810
|
e();
|
|
810
811
|
}
|
|
811
812
|
}
|
|
812
|
-
class
|
|
813
|
+
class Ye extends g {
|
|
813
814
|
constructor(e = 1.3, o = 0.5) {
|
|
814
815
|
super();
|
|
815
|
-
const t = new
|
|
816
|
+
const t = new v(o, o, 0.2, 16), s = new y({ color: 9127187, flatShading: !0 }), r = new m(t, s);
|
|
816
817
|
r.position.set(0, 0, 0), this.add(r);
|
|
817
|
-
const n = new
|
|
818
|
-
|
|
819
|
-
const
|
|
820
|
-
|
|
821
|
-
const
|
|
822
|
-
|
|
823
|
-
const
|
|
824
|
-
|
|
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);
|
|
819
|
+
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);
|
|
821
|
+
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);
|
|
825
826
|
}
|
|
826
827
|
}
|
|
827
|
-
class
|
|
828
|
+
class Ze extends g {
|
|
828
829
|
constructor() {
|
|
829
830
|
super();
|
|
830
|
-
const e = new
|
|
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 });
|
|
831
832
|
for (let s = 0; s < 5; s++) {
|
|
832
833
|
const r = new m(e, o);
|
|
833
834
|
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);
|
|
@@ -836,20 +837,20 @@ class Ee extends v {
|
|
|
836
837
|
}
|
|
837
838
|
}
|
|
838
839
|
}
|
|
839
|
-
class
|
|
840
|
+
class Oe extends g {
|
|
840
841
|
constructor() {
|
|
841
842
|
super();
|
|
842
|
-
const e = new
|
|
843
|
+
const e = new D(1, 0), o = new y({ color: 8421504, flatShading: !0 });
|
|
843
844
|
for (let t = 0; t < 5; t++) {
|
|
844
845
|
const s = new m(e, o);
|
|
845
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);
|
|
846
847
|
}
|
|
847
848
|
}
|
|
848
849
|
}
|
|
849
|
-
class
|
|
850
|
+
class Xe extends g {
|
|
850
851
|
constructor() {
|
|
851
852
|
super();
|
|
852
|
-
const e = new
|
|
853
|
+
const e = new ye(), o = new Z({
|
|
853
854
|
color: 8965375,
|
|
854
855
|
transparent: !0,
|
|
855
856
|
opacity: 0.4,
|
|
@@ -857,204 +858,204 @@ class Ve extends v {
|
|
|
857
858
|
metalness: 0.1,
|
|
858
859
|
reflectivity: 0.8,
|
|
859
860
|
transmission: 0.9,
|
|
860
|
-
side:
|
|
861
|
+
side: N
|
|
861
862
|
}), t = new m(e, o);
|
|
862
863
|
t.rotation.x = -Math.PI / 2, this.add(t);
|
|
863
864
|
}
|
|
864
865
|
}
|
|
865
|
-
class
|
|
866
|
+
class He extends g {
|
|
866
867
|
constructor() {
|
|
867
868
|
super();
|
|
868
|
-
const e = new
|
|
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);
|
|
869
870
|
t.position.set(0, 0.125, 0), s.position.set(0, -0.125, 0);
|
|
870
|
-
const r = new
|
|
871
|
+
const r = new x(1.55, 0.2, 2), n = new y({ color: 16777215 }), a = new m(r, n);
|
|
871
872
|
a.position.set(-0.025, 0, 0);
|
|
872
|
-
const
|
|
873
|
+
const c = new x(0.05, 0.25, 2.1), i = new y({ color: 4915200 }), l = new m(c, i);
|
|
873
874
|
l.position.set(-0.8, 0, 0), this.add(t), this.add(s), this.add(a), this.add(l);
|
|
874
875
|
}
|
|
875
876
|
}
|
|
876
|
-
class
|
|
877
|
+
class Je extends g {
|
|
877
878
|
constructor() {
|
|
878
879
|
super();
|
|
879
880
|
const e = [
|
|
880
|
-
new
|
|
881
|
+
new G(0, 0),
|
|
881
882
|
// Bottom
|
|
882
|
-
new
|
|
883
|
+
new G(0.8, 0),
|
|
883
884
|
// Base
|
|
884
|
-
new
|
|
885
|
+
new G(1, 1.5),
|
|
885
886
|
// Rounded body
|
|
886
|
-
new
|
|
887
|
+
new G(0.5, 2.2),
|
|
887
888
|
// Neck
|
|
888
|
-
new
|
|
889
|
+
new G(0.6, 2.5)
|
|
889
890
|
// Mouth
|
|
890
|
-
], o = new
|
|
891
|
+
], o = new z(e, 10), t = new v(0.3, 0.4, 0.2, 8), s = new y({
|
|
891
892
|
color: 8965375,
|
|
892
893
|
transparent: !0,
|
|
893
894
|
opacity: 0.5,
|
|
894
895
|
roughness: 0.1,
|
|
895
896
|
metalness: 0.3
|
|
896
|
-
}), r = new
|
|
897
|
+
}), r = new y({
|
|
897
898
|
color: 16724838,
|
|
898
899
|
// Vibrant potion color
|
|
899
900
|
transparent: !0,
|
|
900
901
|
opacity: 0.6
|
|
901
|
-
}), n = new
|
|
902
|
+
}), n = new y({
|
|
902
903
|
color: 9127187,
|
|
903
904
|
roughness: 1
|
|
904
|
-
}), a = new m(o, s),
|
|
905
|
-
|
|
906
|
-
const l = new
|
|
907
|
-
l.add(a,
|
|
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);
|
|
908
909
|
}
|
|
909
910
|
}
|
|
910
|
-
class
|
|
911
|
+
class Ke extends g {
|
|
911
912
|
constructor() {
|
|
912
913
|
super();
|
|
913
|
-
const e = new
|
|
914
|
+
const e = new v(0.3, 0.4, 0.1, 16), o = new y({
|
|
914
915
|
color: 3355443,
|
|
915
916
|
roughness: 0.6,
|
|
916
917
|
metalness: 0.3
|
|
917
918
|
}), t = new m(e, o);
|
|
918
919
|
t.position.y = 0.05;
|
|
919
|
-
const s = new
|
|
920
|
+
const s = new v(0.1, 0.1, 0.7, 16), r = new y({
|
|
920
921
|
color: 5592405,
|
|
921
922
|
roughness: 0.5,
|
|
922
923
|
metalness: 0.4
|
|
923
924
|
}), n = new m(s, r);
|
|
924
925
|
n.position.y = 0.4;
|
|
925
|
-
const a = new
|
|
926
|
+
const a = new L(0.075, 0.2, 16), c = new y({
|
|
926
927
|
color: 16733440,
|
|
927
928
|
emissive: 16733440,
|
|
928
929
|
emissiveIntensity: 0.6,
|
|
929
930
|
transparent: !0,
|
|
930
931
|
opacity: 0.8
|
|
931
|
-
}),
|
|
932
|
-
|
|
932
|
+
}), i = new m(a, c);
|
|
933
|
+
i.position.y = 0.8, this.add(t, n, i);
|
|
933
934
|
}
|
|
934
935
|
}
|
|
935
|
-
class
|
|
936
|
+
class Qe extends g {
|
|
936
937
|
constructor() {
|
|
937
938
|
super();
|
|
938
|
-
const e = new
|
|
939
|
+
const e = new x(3, 4, 0.1), o = new y({
|
|
939
940
|
color: 3026478,
|
|
940
941
|
roughness: 0.8,
|
|
941
942
|
metalness: 0.6
|
|
942
|
-
}), t = new
|
|
943
|
+
}), t = new x(0.2, 0.5, 0.2), s = new y({
|
|
943
944
|
color: 11184810,
|
|
944
945
|
roughness: 0.5,
|
|
945
946
|
metalness: 0.7
|
|
946
|
-
}), r = new
|
|
947
|
+
}), r = new v(0.3, 0.3, 0.1, 16), n = new y({
|
|
947
948
|
color: 5592405,
|
|
948
949
|
roughness: 0.7,
|
|
949
950
|
metalness: 0.5
|
|
950
951
|
}), a = new m(e, o);
|
|
951
|
-
for (let
|
|
952
|
-
const
|
|
953
|
-
|
|
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);
|
|
954
955
|
}
|
|
955
|
-
const
|
|
956
|
-
|
|
957
|
-
const
|
|
956
|
+
const c = new m(r, n);
|
|
957
|
+
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({
|
|
958
959
|
color: 16711680,
|
|
959
960
|
emissive: 16711680,
|
|
960
961
|
emissiveIntensity: 0.5
|
|
961
|
-
}),
|
|
962
|
-
|
|
963
|
-
let
|
|
964
|
-
function
|
|
965
|
-
requestAnimationFrame(
|
|
966
|
-
const
|
|
967
|
-
|
|
962
|
+
}), u = new m(i, l);
|
|
963
|
+
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;
|
|
968
969
|
}
|
|
969
|
-
|
|
970
|
+
d();
|
|
970
971
|
}
|
|
971
972
|
}
|
|
972
|
-
class
|
|
973
|
+
class $e extends g {
|
|
973
974
|
constructor() {
|
|
974
975
|
super();
|
|
975
976
|
const e = [
|
|
976
|
-
new
|
|
977
|
+
new G(0, 0),
|
|
977
978
|
// Bottom of the flask
|
|
978
|
-
new
|
|
979
|
+
new G(1.2, 0),
|
|
979
980
|
// Base
|
|
980
|
-
new
|
|
981
|
+
new G(1.5, 1.5),
|
|
981
982
|
// Mid-body
|
|
982
|
-
new
|
|
983
|
+
new G(1, 3),
|
|
983
984
|
// Narrow neck
|
|
984
|
-
new
|
|
985
|
+
new G(0.6, 3.5)
|
|
985
986
|
// Mouth of the flask
|
|
986
|
-
], o = new
|
|
987
|
+
], o = new z(e, 12), t = new v(0.6, 0.7, 0.3, 8), s = new y({
|
|
987
988
|
color: 8965290,
|
|
988
989
|
transparent: !0,
|
|
989
990
|
opacity: 0.4,
|
|
990
991
|
roughness: 0.1,
|
|
991
992
|
metalness: 0.5
|
|
992
|
-
}), r = new
|
|
993
|
+
}), r = new y({
|
|
993
994
|
color: 9127187,
|
|
994
995
|
roughness: 1
|
|
995
996
|
}), n = new m(o, s), a = new m(t, r);
|
|
996
997
|
a.position.y = 3.5, this.add(n, a);
|
|
997
998
|
}
|
|
998
999
|
}
|
|
999
|
-
class
|
|
1000
|
+
class De extends g {
|
|
1000
1001
|
constructor() {
|
|
1001
1002
|
super();
|
|
1002
|
-
const e = new
|
|
1003
|
+
const e = new x(2, 3, 0.1), o = new y({
|
|
1003
1004
|
color: 3355443,
|
|
1004
1005
|
roughness: 0.8,
|
|
1005
1006
|
metalness: 0.5
|
|
1006
|
-
}), t = new m(e, o), s = new
|
|
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({
|
|
1007
1008
|
color: 11184810,
|
|
1008
1009
|
roughness: 0.5,
|
|
1009
1010
|
metalness: 0.7
|
|
1010
1011
|
});
|
|
1011
1012
|
for (let a = -0.5; a <= 0.5; a += 0.5) {
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1014
|
-
const
|
|
1015
|
-
|
|
1013
|
+
const c = new m(s, n);
|
|
1014
|
+
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);
|
|
1016
1017
|
}
|
|
1017
1018
|
this.add(t);
|
|
1018
1019
|
}
|
|
1019
1020
|
}
|
|
1020
|
-
class
|
|
1021
|
+
class Re extends g {
|
|
1021
1022
|
constructor() {
|
|
1022
1023
|
super();
|
|
1023
|
-
const e = new
|
|
1024
|
+
const e = new x(1, 0.2, 0.5), o = new y({
|
|
1024
1025
|
color: 4473924,
|
|
1025
1026
|
roughness: 0.6,
|
|
1026
1027
|
metalness: 0.3
|
|
1027
1028
|
}), t = new m(e, o);
|
|
1028
1029
|
t.position.y = 0.1;
|
|
1029
|
-
const s = new
|
|
1030
|
+
const s = new x(0.2, 1, 0.2), r = new m(s, o);
|
|
1030
1031
|
r.position.set(0, 0.6, -0.2);
|
|
1031
|
-
const n = new
|
|
1032
|
+
const n = new v(0.1, 0.1, 0.4, 8), a = new y({
|
|
1032
1033
|
color: 3355443,
|
|
1033
1034
|
roughness: 0.5,
|
|
1034
1035
|
metalness: 0.6
|
|
1035
|
-
}),
|
|
1036
|
-
|
|
1037
|
-
const
|
|
1036
|
+
}), c = new m(n, a);
|
|
1037
|
+
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({
|
|
1038
1039
|
color: 5592405,
|
|
1039
1040
|
roughness: 0.8,
|
|
1040
1041
|
metalness: 0.2
|
|
1041
|
-
}),
|
|
1042
|
-
|
|
1042
|
+
}), u = new m(i, l);
|
|
1043
|
+
u.position.set(0, 0.6, 0), this.add(t, r, c, u);
|
|
1043
1044
|
}
|
|
1044
1045
|
}
|
|
1045
|
-
class
|
|
1046
|
+
class We extends g {
|
|
1046
1047
|
constructor() {
|
|
1047
1048
|
super();
|
|
1048
|
-
const e = new
|
|
1049
|
+
const e = new we(), o = new v(0.2, 0.3, 1.5, 8);
|
|
1049
1050
|
o.translate(0, 0.75, 0);
|
|
1050
|
-
const t = new
|
|
1051
|
+
const t = new y({
|
|
1051
1052
|
color: 6045747,
|
|
1052
1053
|
// Dark earthy tone
|
|
1053
1054
|
roughness: 1,
|
|
1054
1055
|
metalness: 0,
|
|
1055
|
-
side:
|
|
1056
|
+
side: N
|
|
1056
1057
|
// Render inside and outside
|
|
1057
|
-
}), s = new
|
|
1058
|
+
}), s = new y({
|
|
1058
1059
|
color: 9132587,
|
|
1059
1060
|
// Slightly lighter earthy color
|
|
1060
1061
|
roughness: 0.8,
|
|
@@ -1063,20 +1064,20 @@ class Je extends v {
|
|
|
1063
1064
|
n.position.set(0.3, 1.3, 0), n.rotation.z = Math.PI / 4, this.add(r, n);
|
|
1064
1065
|
}
|
|
1065
1066
|
}
|
|
1066
|
-
class
|
|
1067
|
+
class et extends g {
|
|
1067
1068
|
constructor() {
|
|
1068
1069
|
super();
|
|
1069
|
-
const e = 100, o = 0.05, t = new
|
|
1070
|
-
Array.from({ length: e }, (
|
|
1071
|
-
const
|
|
1072
|
-
return new
|
|
1073
|
-
Math.cos(
|
|
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(
|
|
1074
|
+
Math.cos(u) * 0.4,
|
|
1074
1075
|
l * o,
|
|
1075
1076
|
// Gradual height increase
|
|
1076
|
-
Math.sin(
|
|
1077
|
+
Math.sin(u) * 0.4
|
|
1077
1078
|
);
|
|
1078
1079
|
})
|
|
1079
|
-
), s = new
|
|
1080
|
+
), s = new ae(t, 200, 0.1, 8, !1), r = new y({
|
|
1080
1081
|
color: 8965375,
|
|
1081
1082
|
transparent: !0,
|
|
1082
1083
|
opacity: 0.3,
|
|
@@ -1088,78 +1089,78 @@ class Ke extends v {
|
|
|
1088
1089
|
function a() {
|
|
1089
1090
|
r.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
|
|
1090
1091
|
}
|
|
1091
|
-
function
|
|
1092
|
-
requestAnimationFrame(
|
|
1092
|
+
function c() {
|
|
1093
|
+
requestAnimationFrame(c), a();
|
|
1093
1094
|
}
|
|
1094
|
-
|
|
1095
|
+
c();
|
|
1095
1096
|
}
|
|
1096
1097
|
}
|
|
1097
|
-
class
|
|
1098
|
+
class tt extends g {
|
|
1098
1099
|
constructor() {
|
|
1099
1100
|
super();
|
|
1100
|
-
const e = new
|
|
1101
|
+
const e = new $(0.3, 0.03, 8, 16), o = new y({
|
|
1101
1102
|
color: 8947848,
|
|
1102
1103
|
roughness: 0.7,
|
|
1103
1104
|
metalness: 0.3
|
|
1104
1105
|
}), t = new m(e, o);
|
|
1105
1106
|
t.rotation.x = Math.PI / 2, t.position.y = 0.4;
|
|
1106
|
-
const s = new
|
|
1107
|
+
const s = new v(0.02, 0.02, 0.4, 8), r = new y({
|
|
1107
1108
|
color: 6710886,
|
|
1108
1109
|
roughness: 0.8,
|
|
1109
1110
|
metalness: 0.3
|
|
1110
1111
|
}), n = [];
|
|
1111
1112
|
for (let a = 0; a < 3; a++) {
|
|
1112
|
-
const
|
|
1113
|
-
|
|
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);
|
|
1114
1115
|
}
|
|
1115
1116
|
this.add(t, ...n);
|
|
1116
1117
|
}
|
|
1117
1118
|
}
|
|
1118
|
-
class
|
|
1119
|
+
class ot extends g {
|
|
1119
1120
|
constructor() {
|
|
1120
1121
|
super();
|
|
1121
|
-
const e = new
|
|
1122
|
+
const e = new v(0.5, 0.6, 0.3, 16), o = new y({
|
|
1122
1123
|
color: 3355443,
|
|
1123
1124
|
roughness: 0.6,
|
|
1124
1125
|
metalness: 0.5
|
|
1125
1126
|
}), t = new m(e, o);
|
|
1126
1127
|
t.position.y = 0.15;
|
|
1127
|
-
const s = new
|
|
1128
|
+
const s = new v(0.15, 0.15, 2, 12, 1, !0), r = new y({
|
|
1128
1129
|
color: 16737792,
|
|
1129
1130
|
roughness: 0.5,
|
|
1130
1131
|
metalness: 0.8,
|
|
1131
|
-
side:
|
|
1132
|
+
side: N
|
|
1132
1133
|
}), n = new m(s, r);
|
|
1133
1134
|
n.position.y = 1.3;
|
|
1134
|
-
const a = new T(0.3, 16, 16),
|
|
1135
|
-
|
|
1136
|
-
const
|
|
1137
|
-
for (let
|
|
1138
|
-
const p = new
|
|
1139
|
-
new
|
|
1140
|
-
new
|
|
1141
|
-
],
|
|
1142
|
-
this.add(
|
|
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 = [];
|
|
1138
|
+
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);
|
|
1143
1144
|
}
|
|
1144
1145
|
function l() {
|
|
1145
|
-
|
|
1146
|
+
i.forEach((f) => {
|
|
1146
1147
|
const p = [
|
|
1147
|
-
new
|
|
1148
|
-
new
|
|
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)
|
|
1149
1150
|
];
|
|
1150
|
-
|
|
1151
|
+
f.geometry.setFromPoints(p);
|
|
1151
1152
|
});
|
|
1152
1153
|
}
|
|
1153
|
-
function
|
|
1154
|
-
requestAnimationFrame(
|
|
1154
|
+
function u() {
|
|
1155
|
+
requestAnimationFrame(u), l();
|
|
1155
1156
|
}
|
|
1156
|
-
|
|
1157
|
+
u();
|
|
1157
1158
|
}
|
|
1158
1159
|
}
|
|
1159
|
-
class
|
|
1160
|
+
class st extends g {
|
|
1160
1161
|
constructor(e = 0.2, o = 0.2, t = 3, s = 32) {
|
|
1161
1162
|
super();
|
|
1162
|
-
const r = new
|
|
1163
|
+
const r = new j(e, o, t, s), n = new Z({
|
|
1163
1164
|
color: 8965375,
|
|
1164
1165
|
transparent: !0,
|
|
1165
1166
|
opacity: 0.4,
|
|
@@ -1168,48 +1169,48 @@ class He extends v {
|
|
|
1168
1169
|
reflectivity: 0.8,
|
|
1169
1170
|
transmission: 0.9,
|
|
1170
1171
|
// For glass effect
|
|
1171
|
-
side:
|
|
1172
|
+
side: N
|
|
1172
1173
|
}), a = new m(r, n);
|
|
1173
1174
|
this.add(a);
|
|
1174
1175
|
}
|
|
1175
1176
|
}
|
|
1176
|
-
class
|
|
1177
|
+
class nt extends g {
|
|
1177
1178
|
constructor(e = 3, o = [65450, 16711850, 11141375]) {
|
|
1178
1179
|
super();
|
|
1179
|
-
const t = new
|
|
1180
|
+
const t = new x(3, 0.2, 1), s = new y({
|
|
1180
1181
|
color: 9127187,
|
|
1181
1182
|
// Wooden color or change to metallic tone
|
|
1182
1183
|
roughness: 0.7,
|
|
1183
1184
|
metalness: 0.3
|
|
1184
1185
|
}), r = new m(t, s);
|
|
1185
1186
|
r.position.y = 0.5;
|
|
1186
|
-
const n = new
|
|
1187
|
+
const n = new j(0.1, 0.1, 1, 16), a = new y({
|
|
1187
1188
|
color: 11184810,
|
|
1188
1189
|
transparent: !0,
|
|
1189
1190
|
opacity: 0.4,
|
|
1190
1191
|
roughness: 0.1,
|
|
1191
1192
|
metalness: 0.5,
|
|
1192
|
-
side:
|
|
1193
|
+
side: N
|
|
1193
1194
|
});
|
|
1194
|
-
for (let
|
|
1195
|
-
const
|
|
1196
|
-
|
|
1197
|
-
const
|
|
1198
|
-
color:
|
|
1199
|
-
emissive:
|
|
1195
|
+
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({
|
|
1199
|
+
color: f,
|
|
1200
|
+
emissive: f,
|
|
1200
1201
|
emissiveIntensity: 0.5,
|
|
1201
1202
|
transparent: !0,
|
|
1202
1203
|
opacity: 0.6
|
|
1203
|
-
}),
|
|
1204
|
-
|
|
1204
|
+
}), M = new m(u, p);
|
|
1205
|
+
M.position.set(0, -0.25, 0), i.add(M), r.add(i);
|
|
1205
1206
|
}
|
|
1206
1207
|
this.add(r);
|
|
1207
1208
|
}
|
|
1208
1209
|
}
|
|
1209
|
-
class
|
|
1210
|
+
class at extends m {
|
|
1210
1211
|
constructor() {
|
|
1211
1212
|
super();
|
|
1212
|
-
const e = new
|
|
1213
|
+
const e = new Me(), o = new Z({
|
|
1213
1214
|
color: 5597999,
|
|
1214
1215
|
roughness: 0.1,
|
|
1215
1216
|
transmission: 0.9,
|
|
@@ -1222,59 +1223,115 @@ class Re extends m {
|
|
|
1222
1223
|
this.geometry = e, this.material = o;
|
|
1223
1224
|
}
|
|
1224
1225
|
}
|
|
1225
|
-
class
|
|
1226
|
+
class pe extends q {
|
|
1226
1227
|
constructor(e = 5, o = 0.5, t = 1) {
|
|
1227
1228
|
super();
|
|
1228
1229
|
const s = Math.PI * 2 / e, r = s / 2, n = s / 4;
|
|
1229
1230
|
this.moveTo(Math.cos(0) * t, -Math.sin(0) * t);
|
|
1230
1231
|
for (let a = 1; a <= e; ++a) {
|
|
1231
|
-
let
|
|
1232
|
-
this.quadraticCurveTo(
|
|
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);
|
|
1233
1234
|
}
|
|
1234
1235
|
this.closePath();
|
|
1235
1236
|
}
|
|
1236
1237
|
}
|
|
1237
|
-
class
|
|
1238
|
+
class rt extends m {
|
|
1238
1239
|
constructor(e = 5, o = 0.5, t = 1, s = 0.25) {
|
|
1239
1240
|
super();
|
|
1240
|
-
const r = new
|
|
1241
|
+
const r = new pe(e, o, t), n = new A(r, {
|
|
1241
1242
|
depth: s,
|
|
1242
1243
|
bevelEnabled: s > 0,
|
|
1243
1244
|
bevelThickness: 0,
|
|
1244
1245
|
bevelSize: 0
|
|
1245
|
-
}), a = new
|
|
1246
|
+
}), a = new y({
|
|
1247
|
+
color: 16776960,
|
|
1248
|
+
emissive: 16766720,
|
|
1249
|
+
emissiveIntensity: 0.25,
|
|
1250
|
+
metalness: 0.1,
|
|
1251
|
+
roughness: 0.3,
|
|
1252
|
+
flatShading: !0
|
|
1253
|
+
});
|
|
1246
1254
|
n.center(), this.geometry = n, this.material = a;
|
|
1247
1255
|
}
|
|
1248
1256
|
}
|
|
1249
|
-
class
|
|
1257
|
+
class de extends q {
|
|
1250
1258
|
constructor(e = 5, o = 0.5, t = 1, s = 5, r = 0.25) {
|
|
1251
1259
|
super();
|
|
1252
1260
|
const n = Math.PI * 2 / e, a = n / 4;
|
|
1253
1261
|
this.moveTo(Math.cos(0) * t, -Math.sin(0) * t);
|
|
1254
|
-
for (let
|
|
1255
|
-
this.lineTo(Math.cos(n *
|
|
1262
|
+
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);
|
|
1256
1264
|
if (this.closePath(), r > 0 && s > 2) {
|
|
1257
|
-
const
|
|
1258
|
-
|
|
1265
|
+
const c = new ie(), i = Math.PI * 2 / s;
|
|
1266
|
+
c.moveTo(Math.cos(0) * r, -Math.sin(0) * r);
|
|
1259
1267
|
for (let l = 1; l < s; ++l)
|
|
1260
|
-
|
|
1261
|
-
|
|
1268
|
+
c.lineTo(Math.cos(i * l) * r, -Math.sin(i * l) * r);
|
|
1269
|
+
c.lineTo(Math.cos(0) * r, -Math.sin(0) * r), this.holes.push(c);
|
|
1262
1270
|
}
|
|
1263
1271
|
}
|
|
1264
1272
|
}
|
|
1265
|
-
class
|
|
1273
|
+
class ct extends m {
|
|
1266
1274
|
constructor(e = 5, o = 0.5, t = 1, s = 5, r = 0.25, n = 0.25) {
|
|
1267
1275
|
super();
|
|
1268
|
-
const a = new
|
|
1276
|
+
const a = new de(e, o, t, s, r), c = new A(a, {
|
|
1269
1277
|
depth: n,
|
|
1270
1278
|
bevelEnabled: n > 0,
|
|
1271
1279
|
bevelThickness: 0,
|
|
1272
1280
|
bevelSize: 0
|
|
1273
|
-
}),
|
|
1274
|
-
|
|
1281
|
+
}), i = new y({
|
|
1282
|
+
color: 11184810,
|
|
1283
|
+
metalness: 0.8,
|
|
1284
|
+
roughness: 0.2,
|
|
1285
|
+
reflectivity: 0.5
|
|
1286
|
+
});
|
|
1287
|
+
c.center(), this.geometry = c, this.material = i;
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
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,
|
|
1295
|
+
// Control point 1 for the left lobe
|
|
1296
|
+
-o * e,
|
|
1297
|
+
t * e / 3,
|
|
1298
|
+
// Control point 2 for the left side of the heart
|
|
1299
|
+
0,
|
|
1300
|
+
-s * e
|
|
1301
|
+
// Bottom tip of the heart, controlled by `tipDepth`
|
|
1302
|
+
), 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
|
+
t * e,
|
|
1308
|
+
// Control point 4 for the right lobe
|
|
1309
|
+
0,
|
|
1310
|
+
t * e / 3
|
|
1311
|
+
// Close shape at the top middle
|
|
1312
|
+
);
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
class it extends m {
|
|
1316
|
+
constructor(e = 1, o = 1, t = 1, s = 10, r = 0.25) {
|
|
1317
|
+
super();
|
|
1318
|
+
const n = new xe(e, o, t, s), a = new A(n, {
|
|
1319
|
+
depth: r,
|
|
1320
|
+
bevelEnabled: r > 0,
|
|
1321
|
+
bevelThickness: 0,
|
|
1322
|
+
bevelSize: 0
|
|
1323
|
+
}), c = new y({
|
|
1324
|
+
color: 12986408,
|
|
1325
|
+
emissive: 12981270,
|
|
1326
|
+
emissiveIntensity: 0.25,
|
|
1327
|
+
metalness: 0.1,
|
|
1328
|
+
roughness: 0.3,
|
|
1329
|
+
flatShading: !0
|
|
1330
|
+
});
|
|
1331
|
+
a.center(), this.geometry = a, this.material = c;
|
|
1275
1332
|
}
|
|
1276
1333
|
}
|
|
1277
|
-
class
|
|
1334
|
+
class ve extends q {
|
|
1278
1335
|
constructor(e = 5, o = 0.5, t = 1) {
|
|
1279
1336
|
super();
|
|
1280
1337
|
const s = Math.PI * 2 / e, r = s / 2;
|
|
@@ -1284,19 +1341,44 @@ class Me extends V {
|
|
|
1284
1341
|
this.closePath();
|
|
1285
1342
|
}
|
|
1286
1343
|
}
|
|
1287
|
-
class
|
|
1344
|
+
class lt extends m {
|
|
1288
1345
|
constructor(e = 5, o = 0.5, t = 1, s = 0.25) {
|
|
1289
1346
|
super();
|
|
1290
|
-
const r = new
|
|
1347
|
+
const r = new ve(e, o, t), n = new A(r, {
|
|
1291
1348
|
depth: s,
|
|
1292
1349
|
bevelEnabled: s > 0,
|
|
1293
1350
|
bevelThickness: 0,
|
|
1294
1351
|
bevelSize: 0
|
|
1295
|
-
}), a = new
|
|
1352
|
+
}), a = new y({
|
|
1353
|
+
color: 16776960,
|
|
1354
|
+
emissive: 16766720,
|
|
1355
|
+
emissiveIntensity: 0.25,
|
|
1356
|
+
metalness: 0.1,
|
|
1357
|
+
roughness: 0.3,
|
|
1358
|
+
flatShading: !0
|
|
1359
|
+
});
|
|
1296
1360
|
n.center(), this.geometry = n, this.material = a;
|
|
1297
1361
|
}
|
|
1298
1362
|
}
|
|
1299
|
-
const
|
|
1363
|
+
const K = {
|
|
1364
|
+
uniforms: {},
|
|
1365
|
+
vertexShader: `
|
|
1366
|
+
varying vec3 vPosition;
|
|
1367
|
+
void main() {
|
|
1368
|
+
vPosition = position;
|
|
1369
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
1370
|
+
}
|
|
1371
|
+
`,
|
|
1372
|
+
fragmentShader: `
|
|
1373
|
+
varying vec3 vPosition;
|
|
1374
|
+
void main() {
|
|
1375
|
+
float y = normalize(vPosition).y * 0.5 + 0.5; // Normalizing y to range 0 to 1
|
|
1376
|
+
vec3 topColor = vec3(0.5, 0.8, 1.0); // Light blue
|
|
1377
|
+
vec3 bottomColor = vec3(1.0, 1.0, 1.0); // Light white/gray for the horizon
|
|
1378
|
+
gl_FragColor = vec4(mix(bottomColor, topColor, y), 1.0);
|
|
1379
|
+
}
|
|
1380
|
+
`
|
|
1381
|
+
}, mt = {
|
|
1300
1382
|
uniforms: {
|
|
1301
1383
|
tDiffuse: { value: null },
|
|
1302
1384
|
opacity: { value: 1 }
|
|
@@ -1317,63 +1399,129 @@ const ot = {
|
|
|
1317
1399
|
gl_FragColor = opacity * texel;
|
|
1318
1400
|
}
|
|
1319
1401
|
`
|
|
1320
|
-
},
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1402
|
+
}, _ = {
|
|
1403
|
+
uniforms: {
|
|
1404
|
+
topColor: { value: new H(51) },
|
|
1405
|
+
bottomColor: { value: new H(17) },
|
|
1406
|
+
offset: { value: 33 },
|
|
1407
|
+
exponent: { value: 0.6 }
|
|
1408
|
+
},
|
|
1409
|
+
vertexShader: `
|
|
1410
|
+
varying vec3 vWorldPosition;
|
|
1411
|
+
void main() {
|
|
1412
|
+
vec4 worldPosition = modelMatrix * vec4(position, 1.0);
|
|
1413
|
+
vWorldPosition = worldPosition.xyz;
|
|
1414
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
1415
|
+
}
|
|
1416
|
+
`,
|
|
1417
|
+
fragmentShader: `
|
|
1418
|
+
uniform vec3 topColor;
|
|
1419
|
+
uniform vec3 bottomColor;
|
|
1420
|
+
uniform float offset;
|
|
1421
|
+
uniform float exponent;
|
|
1422
|
+
varying vec3 vWorldPosition;
|
|
1423
|
+
void main() {
|
|
1424
|
+
float h = normalize(vWorldPosition + offset).y;
|
|
1425
|
+
gl_FragColor = vec4(mix(bottomColor, topColor, max(pow(max(h, 0.0), exponent), 0.0)), 1.0);
|
|
1426
|
+
}
|
|
1427
|
+
`
|
|
1428
|
+
};
|
|
1429
|
+
class ht extends m {
|
|
1430
|
+
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
|
|
1435
|
+
});
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
class ut extends m {
|
|
1439
|
+
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
|
|
1445
|
+
});
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
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) {
|
|
1450
|
+
super();
|
|
1451
|
+
const a = new fe();
|
|
1452
|
+
a.scale.setScalar(45e4), this.add(a);
|
|
1453
|
+
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);
|
|
1455
|
+
}
|
|
1456
|
+
sunPosition(e, o) {
|
|
1457
|
+
const t = new C(), s = this.skyUniforms;
|
|
1458
|
+
t.setFromSphericalCoords(1, e, o), s.sunPosition.value.copy(t);
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
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;
|
|
1324
1465
|
e[s] = r, e[s + 1] = r, e[s + 2] = r, e[s + 3] = 255;
|
|
1325
1466
|
}
|
|
1326
|
-
const o = new
|
|
1327
|
-
return o.wrapS =
|
|
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;
|
|
1328
1469
|
};
|
|
1329
1470
|
export {
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
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
|
|
1378
1526
|
};
|
|
1379
1527
|
//# sourceMappingURL=index.es.js.map
|