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