three-low-poly 0.9.9 → 0.9.11
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 +7 -5
- package/dist/index.cjs.js +9 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1531 -1360
- package/dist/index.es.js.map +1 -1
- package/dist/index.iife.js +9 -9
- package/dist/index.iife.js.map +1 -1
- package/dist/index.umd.js +9 -9
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Vector3 as M, MathUtils as
|
|
2
|
-
import { mergeGeometries as A, mergeVertices as
|
|
3
|
-
import { Sky as
|
|
4
|
-
import { EffectComposer as
|
|
5
|
-
import { RenderPass as
|
|
6
|
-
import { ShaderPass as
|
|
7
|
-
const
|
|
1
|
+
import { Vector3 as M, MathUtils as Q, Quaternion as pe, Group as P, SphereGeometry as T, MeshStandardMaterial as w, Mesh as f, BufferGeometry as v, BufferAttribute as Z, BoxGeometry as g, InstancedMesh as de, Matrix4 as W, Float32BufferAttribute as F, ConeGeometry as z, CylinderGeometry as S, Vector2 as b, LatheGeometry as q, CircleGeometry as we, TorusGeometry as se, DodecahedronGeometry as j, ShaderMaterial as K, Shape as L, ExtrudeGeometry as V, MeshBasicMaterial as ye, PointLight as ae, MeshPhysicalMaterial as Y, DoubleSide as O, CatmullRomCurve3 as xe, TubeGeometry as Me, LineBasicMaterial as ve, Line as ge, Path as be, Color as ee, BackSide as re, DataTexture as Se, RGBAFormat as Ie, UnsignedByteType as Ge, RepeatWrapping as te, NearestFilter as Pe, Box3 as J } from "three";
|
|
2
|
+
import { mergeGeometries as A, mergeVertices as Ae } from "three/addons/utils/BufferGeometryUtils.js";
|
|
3
|
+
import { Sky as Ee } from "three/addons/objects/Sky.js";
|
|
4
|
+
import { EffectComposer as Te } from "three/addons/postprocessing/EffectComposer.js";
|
|
5
|
+
import { RenderPass as oe } from "three/addons/postprocessing/RenderPass.js";
|
|
6
|
+
import { ShaderPass as Be } from "three/addons/postprocessing/ShaderPass.js";
|
|
7
|
+
const U = {
|
|
8
8
|
UP: new M(0, 1, 0),
|
|
9
9
|
DOWN: new M(0, -1, 0),
|
|
10
10
|
LEFT: new M(-1, 0, 0),
|
|
@@ -18,658 +18,159 @@ const F = {
|
|
|
18
18
|
XZ: new M(1, 0, 1).normalize(),
|
|
19
19
|
YZ: new M(0, 1, 1).normalize(),
|
|
20
20
|
XYZ: new M(1, 1, 1).normalize()
|
|
21
|
-
},
|
|
22
|
-
LINEAR: (
|
|
23
|
-
QUADRATIC: (
|
|
24
|
-
SQUARE_ROOT: (
|
|
25
|
-
LOGARITHMIC: (
|
|
26
|
-
SINE: (
|
|
27
|
-
EXPONENTIAL: (
|
|
28
|
-
CUBIC: (
|
|
29
|
-
GAUSSIAN: (
|
|
30
|
-
INVERSE: (
|
|
31
|
-
SMOOTHSTEP: (
|
|
32
|
-
const t = Math.max(0, Math.min(1, 1 -
|
|
21
|
+
}, X = {
|
|
22
|
+
LINEAR: (o, e) => 1 - o / e,
|
|
23
|
+
QUADRATIC: (o, e) => Math.pow(1 - o / e, 2),
|
|
24
|
+
SQUARE_ROOT: (o, e) => Math.pow(1 - o / e, 0.5),
|
|
25
|
+
LOGARITHMIC: (o, e) => Math.log(1 + (e - o)) / Math.log(1 + e),
|
|
26
|
+
SINE: (o, e) => Math.cos(o / e * Math.PI / 2),
|
|
27
|
+
EXPONENTIAL: (o, e) => Math.exp(-o / e),
|
|
28
|
+
CUBIC: (o, e) => Math.pow(1 - o / e, 3),
|
|
29
|
+
GAUSSIAN: (o, e) => Math.exp(-Math.pow(o, 2) / (2 * Math.pow(e / 3, 2))),
|
|
30
|
+
INVERSE: (o, e) => e / (e + o),
|
|
31
|
+
SMOOTHSTEP: (o, e) => {
|
|
32
|
+
const t = Math.max(0, Math.min(1, 1 - o / e));
|
|
33
33
|
return t * t * (3 - 2 * t);
|
|
34
34
|
}
|
|
35
|
-
},
|
|
36
|
-
const s =
|
|
35
|
+
}, Lt = (o, e, t, n, a = U.UP, c = X.LINEAR) => {
|
|
36
|
+
const s = o.attributes.position;
|
|
37
37
|
for (let r = 0; r < s.count; r++) {
|
|
38
|
-
const c = new M();
|
|
39
|
-
c.fromBufferAttribute(s, r);
|
|
40
|
-
const i = c.distanceTo(e);
|
|
41
|
-
if (i < t) {
|
|
42
|
-
const u = a(i, t) * o;
|
|
43
|
-
c.add(n.clone().multiplyScalar(u)), s.setXYZ(r, c.x, c.y, c.z);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
s.needsUpdate = !0;
|
|
47
|
-
}, nt = (l, e, t, o, n, a = F.UP, s = V.LINEAR) => {
|
|
48
|
-
const r = l.attributes.position;
|
|
49
|
-
for (let c = 0; c < r.count; c++) {
|
|
50
38
|
const i = new M();
|
|
51
|
-
i.fromBufferAttribute(
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
const
|
|
55
|
-
i.add(a.clone().multiplyScalar(
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
r.needsUpdate = !0;
|
|
59
|
-
}, rt = (l, e, t, o, n = F.UP, a = V.LINEAR) => {
|
|
60
|
-
const s = l.attributes.position;
|
|
61
|
-
for (let r = 0; r < s.count; r++) {
|
|
62
|
-
const c = new M();
|
|
63
|
-
c.fromBufferAttribute(s, r);
|
|
64
|
-
const i = c.distanceTo(e);
|
|
65
|
-
if (i < t) {
|
|
66
|
-
const m = a(i, t), u = o * m, f = n.clone().normalize();
|
|
67
|
-
c.x += H.randFloatSpread(u) * f.x, c.y += H.randFloatSpread(u) * f.y, c.z += H.randFloatSpread(u) * f.z, s.setXYZ(r, c.x, c.y, c.z);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
s.needsUpdate = !0;
|
|
71
|
-
}, at = (l, e, t, o) => {
|
|
72
|
-
const n = l.attributes.position, a = new M();
|
|
73
|
-
for (let s = 0; s < n.count; s++) {
|
|
74
|
-
const r = new M();
|
|
75
|
-
if (r.fromBufferAttribute(n, s), r.distanceTo(e) < t) {
|
|
76
|
-
let i = new M(), m = 0;
|
|
77
|
-
for (let u = 0; u < n.count; u++)
|
|
78
|
-
a.fromBufferAttribute(n, u), a.distanceTo(r) < t && (i.add(a), m++);
|
|
79
|
-
m > 0 && (i.divideScalar(m), r.lerp(i, o), n.setXYZ(s, r.x, r.y, r.z));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
n.needsUpdate = !0;
|
|
83
|
-
}, ct = (l, e, t, o, n = !1, a = V.LINEAR) => {
|
|
84
|
-
const s = l.attributes.position;
|
|
85
|
-
for (let r = 0; r < s.count; r++) {
|
|
86
|
-
const c = new M();
|
|
87
|
-
c.fromBufferAttribute(s, r);
|
|
88
|
-
const i = c.distanceTo(e);
|
|
89
|
-
if (i < t) {
|
|
90
|
-
const u = a(i, t) * o * (n ? -1 : 1), f = c.clone().sub(e).normalize();
|
|
91
|
-
c.add(f.multiplyScalar(u)), s.setXYZ(r, c.x, c.y, c.z);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
s.needsUpdate = !0;
|
|
95
|
-
}, it = (l, e, t, o, n = F.UP, a = V.LINEAR) => {
|
|
96
|
-
const s = l.attributes.position, r = new le();
|
|
97
|
-
for (let c = 0; c < s.count; c++) {
|
|
98
|
-
const i = new M();
|
|
99
|
-
i.fromBufferAttribute(s, c);
|
|
100
|
-
const m = i.distanceTo(e);
|
|
101
|
-
if (m < t) {
|
|
102
|
-
const f = a(m, t) * o;
|
|
103
|
-
r.setFromAxisAngle(n, f), i.sub(e).applyQuaternion(r).add(e), s.setXYZ(c, i.x, i.y, i.z);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
s.needsUpdate = !0;
|
|
107
|
-
}, lt = {
|
|
108
|
-
LINEAR: (l) => l,
|
|
109
|
-
QUADRATIC_EASE_IN: (l) => l * l,
|
|
110
|
-
QUADRATIC_EASE_OUT: (l) => 1 - Math.pow(1 - l, 2),
|
|
111
|
-
SQUARE_ROOT_EASING: (l) => Math.sqrt(l),
|
|
112
|
-
LOGARITHMIC_EASING: (l) => Math.log(1 + l) / Math.log(2),
|
|
113
|
-
SINE_EASE_IN: (l) => 1 - Math.cos(l * Math.PI / 2),
|
|
114
|
-
SINE_EASE_OUT: (l) => Math.sin(l * Math.PI / 2),
|
|
115
|
-
EXPONENTIAL_EASE_IN: (l) => Math.pow(2, 10 * (l - 1)),
|
|
116
|
-
EXPONENTIAL_EASE_OUT: (l) => 1 - Math.pow(2, -10 * l),
|
|
117
|
-
CUBIC_EASE_IN: (l) => l * l * l,
|
|
118
|
-
CUBIC_EASE_OUT: (l) => 1 - Math.pow(1 - l, 3),
|
|
119
|
-
GAUSSIAN_EASING: (l) => Math.exp(-Math.pow(l - 0.5, 2) / (2 * 0.1)),
|
|
120
|
-
INVERSE_EASING: (l) => 1 / (1 + l),
|
|
121
|
-
SMOOTHSTEP_EASING: (l) => l * l * (3 - 2 * l)
|
|
122
|
-
};
|
|
123
|
-
class mt extends P {
|
|
124
|
-
constructor() {
|
|
125
|
-
super();
|
|
126
|
-
const e = [], t = 20, o = new B(0.1, 6, 6), n = new w({
|
|
127
|
-
color: 16777215,
|
|
128
|
-
transparent: !0,
|
|
129
|
-
opacity: 0.6,
|
|
130
|
-
roughness: 0.3,
|
|
131
|
-
metalness: 0.3
|
|
132
|
-
});
|
|
133
|
-
for (let r = 0; r < t; r++) {
|
|
134
|
-
const c = new h(o, n);
|
|
135
|
-
c.position.set(
|
|
136
|
-
(Math.random() - 0.5) * 1.5,
|
|
137
|
-
// Random x position within flask
|
|
138
|
-
Math.random() * 3,
|
|
139
|
-
// Random y position within flask height
|
|
140
|
-
(Math.random() - 0.5) * 1.5
|
|
141
|
-
// Random z position within flask
|
|
142
|
-
), e.push(c), this.add(c);
|
|
143
|
-
}
|
|
144
|
-
function a() {
|
|
145
|
-
e.forEach((r) => {
|
|
146
|
-
r.position.y += 0.02, r.position.y > 3 && (r.position.y = 0, r.position.x = (Math.random() - 0.5) * 1.5, r.position.z = (Math.random() - 0.5) * 1.5);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
function s() {
|
|
150
|
-
requestAnimationFrame(s), a();
|
|
151
|
-
}
|
|
152
|
-
s();
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
class ut extends v {
|
|
156
|
-
constructor(e = 2, t = 0.3, o = 0.6, n = 5, a = 5, s = Math.PI / 4) {
|
|
157
|
-
super();
|
|
158
|
-
const r = [], c = [];
|
|
159
|
-
for (let d = 0; d < n; d++) {
|
|
160
|
-
const p = d * t, x = p + t, y = d * o, I = y + o;
|
|
161
|
-
r.push(
|
|
162
|
-
// Vertical riser
|
|
163
|
-
-e / 2,
|
|
164
|
-
p,
|
|
165
|
-
y,
|
|
166
|
-
// Bottom-left
|
|
167
|
-
e / 2,
|
|
168
|
-
p,
|
|
169
|
-
y,
|
|
170
|
-
// Bottom-right
|
|
171
|
-
e / 2,
|
|
172
|
-
x,
|
|
173
|
-
y,
|
|
174
|
-
// Top-right
|
|
175
|
-
-e / 2,
|
|
176
|
-
x,
|
|
177
|
-
y,
|
|
178
|
-
// Top-left
|
|
179
|
-
// Horizontal tread
|
|
180
|
-
-e / 2,
|
|
181
|
-
x,
|
|
182
|
-
y,
|
|
183
|
-
// Top-left
|
|
184
|
-
e / 2,
|
|
185
|
-
x,
|
|
186
|
-
y,
|
|
187
|
-
// Top-right
|
|
188
|
-
e / 2,
|
|
189
|
-
x,
|
|
190
|
-
I,
|
|
191
|
-
// Back-right
|
|
192
|
-
-e / 2,
|
|
193
|
-
x,
|
|
194
|
-
I
|
|
195
|
-
// Back-left
|
|
196
|
-
);
|
|
197
|
-
const S = d * 8;
|
|
198
|
-
c.push(
|
|
199
|
-
S,
|
|
200
|
-
S + 1,
|
|
201
|
-
S + 2,
|
|
202
|
-
S,
|
|
203
|
-
S + 2,
|
|
204
|
-
S + 3
|
|
205
|
-
), c.push(
|
|
206
|
-
S + 4,
|
|
207
|
-
S + 5,
|
|
208
|
-
S + 6,
|
|
209
|
-
S + 4,
|
|
210
|
-
S + 6,
|
|
211
|
-
S + 7
|
|
212
|
-
);
|
|
213
|
-
}
|
|
214
|
-
const i = n * t, m = n * o, u = e * 2;
|
|
215
|
-
r.push(
|
|
216
|
-
// Landing platform (4 vertices)
|
|
217
|
-
-u / 2,
|
|
218
|
-
i,
|
|
219
|
-
m,
|
|
220
|
-
// Bottom-left
|
|
221
|
-
u / 2,
|
|
222
|
-
i,
|
|
223
|
-
m,
|
|
224
|
-
// Bottom-right
|
|
225
|
-
u / 2,
|
|
226
|
-
i,
|
|
227
|
-
m + o,
|
|
228
|
-
// Top-right
|
|
229
|
-
-u / 2,
|
|
230
|
-
i,
|
|
231
|
-
m + o
|
|
232
|
-
// Top-left
|
|
233
|
-
);
|
|
234
|
-
const f = n * 8;
|
|
235
|
-
c.push(
|
|
236
|
-
f,
|
|
237
|
-
f + 1,
|
|
238
|
-
f + 2,
|
|
239
|
-
// First triangle for landing
|
|
240
|
-
f,
|
|
241
|
-
f + 2,
|
|
242
|
-
f + 3
|
|
243
|
-
// Second triangle for landing
|
|
244
|
-
);
|
|
245
|
-
for (let d = 0; d < 2; d++) {
|
|
246
|
-
const p = d === 0 ? 1 : -1;
|
|
247
|
-
for (let x = 0; x < a; x++) {
|
|
248
|
-
const y = i + x * t, I = y + t, S = p * (u / 4), T = m + o, X = x * o * Math.cos(s), E = x * o * Math.sin(s), C = S + p * X - e / 2 * Math.cos(s), Y = S + p * X + e / 2 * Math.cos(s), N = T + E, ce = C + p * o * Math.cos(s), ie = Y + p * o * Math.cos(s), J = N + o * Math.sin(s);
|
|
249
|
-
r.push(
|
|
250
|
-
// Vertical riser
|
|
251
|
-
C,
|
|
252
|
-
y,
|
|
253
|
-
N,
|
|
254
|
-
// Bottom-left
|
|
255
|
-
Y,
|
|
256
|
-
y,
|
|
257
|
-
N,
|
|
258
|
-
// Bottom-right
|
|
259
|
-
Y,
|
|
260
|
-
I,
|
|
261
|
-
N,
|
|
262
|
-
// Top-right
|
|
263
|
-
C,
|
|
264
|
-
I,
|
|
265
|
-
N,
|
|
266
|
-
// Top-left
|
|
267
|
-
// Horizontal tread
|
|
268
|
-
C,
|
|
269
|
-
I,
|
|
270
|
-
N,
|
|
271
|
-
// Top-left
|
|
272
|
-
Y,
|
|
273
|
-
I,
|
|
274
|
-
N,
|
|
275
|
-
// Top-right
|
|
276
|
-
ie,
|
|
277
|
-
I,
|
|
278
|
-
J,
|
|
279
|
-
// Back-right
|
|
280
|
-
ce,
|
|
281
|
-
I,
|
|
282
|
-
J
|
|
283
|
-
// Back-left
|
|
284
|
-
);
|
|
285
|
-
const k = f + 4 + d * a * 8 + x * 8;
|
|
286
|
-
c.push(
|
|
287
|
-
k,
|
|
288
|
-
k + 1,
|
|
289
|
-
k + 2,
|
|
290
|
-
k,
|
|
291
|
-
k + 2,
|
|
292
|
-
k + 3
|
|
293
|
-
), c.push(
|
|
294
|
-
k + 4,
|
|
295
|
-
k + 5,
|
|
296
|
-
k + 6,
|
|
297
|
-
k + 4,
|
|
298
|
-
k + 6,
|
|
299
|
-
k + 7
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
this.setIndex(c), this.setAttribute("position", new U(r, 3)), this.computeVertexNormals();
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
class ft extends v {
|
|
307
|
-
constructor(e = 5, t = 3, o = 5, n = 0.2) {
|
|
308
|
-
super();
|
|
309
|
-
const a = [
|
|
310
|
-
// Floor vertices
|
|
311
|
-
-e / 2,
|
|
312
|
-
0,
|
|
313
|
-
-o / 2,
|
|
314
|
-
// 0
|
|
315
|
-
e / 2,
|
|
316
|
-
0,
|
|
317
|
-
-o / 2,
|
|
318
|
-
// 1
|
|
319
|
-
e / 2,
|
|
320
|
-
0,
|
|
321
|
-
o / 2,
|
|
322
|
-
// 2
|
|
323
|
-
-e / 2,
|
|
324
|
-
0,
|
|
325
|
-
o / 2,
|
|
326
|
-
// 3
|
|
327
|
-
// Back wall vertices
|
|
328
|
-
-e / 2,
|
|
329
|
-
0,
|
|
330
|
-
-o / 2,
|
|
331
|
-
// 4
|
|
332
|
-
e / 2,
|
|
333
|
-
0,
|
|
334
|
-
-o / 2,
|
|
335
|
-
// 5
|
|
336
|
-
e / 2,
|
|
337
|
-
t,
|
|
338
|
-
-o / 2,
|
|
339
|
-
// 6
|
|
340
|
-
-e / 2,
|
|
341
|
-
t,
|
|
342
|
-
-o / 2,
|
|
343
|
-
// 7
|
|
344
|
-
// Left wall vertices
|
|
345
|
-
-e / 2,
|
|
346
|
-
0,
|
|
347
|
-
-o / 2,
|
|
348
|
-
// 8
|
|
349
|
-
-e / 2,
|
|
350
|
-
0,
|
|
351
|
-
o / 2,
|
|
352
|
-
// 9
|
|
353
|
-
-e / 2,
|
|
354
|
-
t,
|
|
355
|
-
o / 2,
|
|
356
|
-
// 10
|
|
357
|
-
-e / 2,
|
|
358
|
-
t,
|
|
359
|
-
-o / 2
|
|
360
|
-
// 11
|
|
361
|
-
], s = [
|
|
362
|
-
// Floor
|
|
363
|
-
0,
|
|
364
|
-
1,
|
|
365
|
-
2,
|
|
366
|
-
0,
|
|
367
|
-
2,
|
|
368
|
-
3,
|
|
369
|
-
// Back wall
|
|
370
|
-
4,
|
|
371
|
-
5,
|
|
372
|
-
6,
|
|
373
|
-
4,
|
|
374
|
-
6,
|
|
375
|
-
7,
|
|
376
|
-
// Left wall
|
|
377
|
-
8,
|
|
378
|
-
9,
|
|
379
|
-
10,
|
|
380
|
-
8,
|
|
381
|
-
10,
|
|
382
|
-
11
|
|
383
|
-
];
|
|
384
|
-
this.setIndex(s), this.setAttribute("position", new U(a, 3)), this.computeVertexNormals();
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
class ht extends v {
|
|
388
|
-
constructor(e = 2, t = 0.3, o = 0.5, n = 5, a = 2) {
|
|
389
|
-
super();
|
|
390
|
-
const s = [], r = [];
|
|
391
|
-
for (let u = 0; u < n; u++) {
|
|
392
|
-
const f = u * t, d = f + t, p = u * o, x = p + o;
|
|
393
|
-
s.push(
|
|
394
|
-
// Vertical riser
|
|
395
|
-
-e / 2,
|
|
396
|
-
f,
|
|
397
|
-
p,
|
|
398
|
-
// Bottom-left
|
|
399
|
-
e / 2,
|
|
400
|
-
f,
|
|
401
|
-
p,
|
|
402
|
-
// Bottom-right
|
|
403
|
-
e / 2,
|
|
404
|
-
d,
|
|
405
|
-
p,
|
|
406
|
-
// Top-right
|
|
407
|
-
-e / 2,
|
|
408
|
-
d,
|
|
409
|
-
p,
|
|
410
|
-
// Top-left
|
|
411
|
-
// Horizontal tread
|
|
412
|
-
-e / 2,
|
|
413
|
-
d,
|
|
414
|
-
p,
|
|
415
|
-
// Top-left
|
|
416
|
-
e / 2,
|
|
417
|
-
d,
|
|
418
|
-
p,
|
|
419
|
-
// Top-right
|
|
420
|
-
e / 2,
|
|
421
|
-
d,
|
|
422
|
-
x,
|
|
423
|
-
// Back-right
|
|
424
|
-
-e / 2,
|
|
425
|
-
d,
|
|
426
|
-
x
|
|
427
|
-
// Back-left
|
|
428
|
-
);
|
|
429
|
-
const y = u * 8;
|
|
430
|
-
r.push(
|
|
431
|
-
y,
|
|
432
|
-
y + 1,
|
|
433
|
-
y + 2,
|
|
434
|
-
y,
|
|
435
|
-
y + 2,
|
|
436
|
-
y + 3
|
|
437
|
-
), r.push(
|
|
438
|
-
y + 4,
|
|
439
|
-
y + 5,
|
|
440
|
-
y + 6,
|
|
441
|
-
y + 4,
|
|
442
|
-
y + 6,
|
|
443
|
-
y + 7
|
|
444
|
-
);
|
|
39
|
+
i.fromBufferAttribute(s, r);
|
|
40
|
+
const l = i.distanceTo(e);
|
|
41
|
+
if (l < t) {
|
|
42
|
+
const m = c(l, t) * n;
|
|
43
|
+
i.add(a.clone().multiplyScalar(m)), s.setXYZ(r, i.x, i.y, i.z);
|
|
445
44
|
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
e / 2,
|
|
458
|
-
c,
|
|
459
|
-
i + a,
|
|
460
|
-
// Top-right
|
|
461
|
-
-e / 2,
|
|
462
|
-
c,
|
|
463
|
-
i + a
|
|
464
|
-
// Top-left
|
|
465
|
-
);
|
|
466
|
-
const m = n * 8;
|
|
467
|
-
r.push(
|
|
468
|
-
m,
|
|
469
|
-
m + 1,
|
|
470
|
-
m + 2,
|
|
471
|
-
// First triangle for landing
|
|
472
|
-
m,
|
|
473
|
-
m + 2,
|
|
474
|
-
m + 3
|
|
475
|
-
// Second triangle for landing
|
|
476
|
-
);
|
|
477
|
-
for (let u = 0; u < n; u++) {
|
|
478
|
-
const f = c + u * t, d = f + t, p = -e / 2 - u * o, x = p - o;
|
|
479
|
-
s.push(
|
|
480
|
-
// Vertical riser
|
|
481
|
-
p,
|
|
482
|
-
f,
|
|
483
|
-
i + a,
|
|
484
|
-
// Bottom-left
|
|
485
|
-
p,
|
|
486
|
-
f,
|
|
487
|
-
i + a - e,
|
|
488
|
-
// Bottom-right
|
|
489
|
-
p,
|
|
490
|
-
d,
|
|
491
|
-
i + a - e,
|
|
492
|
-
// Top-right
|
|
493
|
-
p,
|
|
494
|
-
d,
|
|
495
|
-
i + a,
|
|
496
|
-
// Top-left
|
|
497
|
-
// Horizontal tread
|
|
498
|
-
p,
|
|
499
|
-
d,
|
|
500
|
-
i + a,
|
|
501
|
-
// Top-left
|
|
502
|
-
p,
|
|
503
|
-
d,
|
|
504
|
-
i + a - e,
|
|
505
|
-
// Top-right
|
|
506
|
-
x,
|
|
507
|
-
d,
|
|
508
|
-
i + a - e,
|
|
509
|
-
// Back-right
|
|
510
|
-
x,
|
|
511
|
-
d,
|
|
512
|
-
i + a
|
|
513
|
-
// Back-left
|
|
514
|
-
);
|
|
515
|
-
const y = m + 4 + u * 8;
|
|
516
|
-
r.push(
|
|
517
|
-
y,
|
|
518
|
-
y + 1,
|
|
519
|
-
y + 2,
|
|
520
|
-
y,
|
|
521
|
-
y + 2,
|
|
522
|
-
y + 3
|
|
523
|
-
), r.push(
|
|
524
|
-
y + 4,
|
|
525
|
-
y + 5,
|
|
526
|
-
y + 6,
|
|
527
|
-
y + 4,
|
|
528
|
-
y + 6,
|
|
529
|
-
y + 7
|
|
530
|
-
);
|
|
531
|
-
}
|
|
532
|
-
this.setIndex(r), this.setAttribute("position", new U(s, 3)), this.computeVertexNormals();
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
class pt extends v {
|
|
536
|
-
constructor(e = 1, t = 0.4, o = 0.2, n = 20, a = 2, s = Math.PI / 8) {
|
|
537
|
-
super();
|
|
538
|
-
const r = [], c = [];
|
|
539
|
-
let i = 0;
|
|
540
|
-
for (let m = 0; m < n; m++) {
|
|
541
|
-
const u = a * Math.cos(i), f = a * Math.sin(i), d = m * o, p = d + o;
|
|
542
|
-
r.push(
|
|
543
|
-
// Front face (vertical riser)
|
|
544
|
-
u - e / 2 * Math.cos(i),
|
|
545
|
-
d,
|
|
546
|
-
f - e / 2 * Math.sin(i),
|
|
547
|
-
// Bottom-left
|
|
548
|
-
u + e / 2 * Math.cos(i),
|
|
549
|
-
d,
|
|
550
|
-
f + e / 2 * Math.sin(i),
|
|
551
|
-
// Bottom-right
|
|
552
|
-
u + e / 2 * Math.cos(i),
|
|
553
|
-
p,
|
|
554
|
-
f + e / 2 * Math.sin(i),
|
|
555
|
-
// Top-right
|
|
556
|
-
u - e / 2 * Math.cos(i),
|
|
557
|
-
p,
|
|
558
|
-
f - e / 2 * Math.sin(i)
|
|
559
|
-
// Top-left
|
|
560
|
-
), r.push(
|
|
561
|
-
// Top face (horizontal tread)
|
|
562
|
-
u - e / 2 * Math.cos(i),
|
|
563
|
-
p,
|
|
564
|
-
f - e / 2 * Math.sin(i),
|
|
565
|
-
// Top-left-front
|
|
566
|
-
u + e / 2 * Math.cos(i),
|
|
567
|
-
p,
|
|
568
|
-
f + e / 2 * Math.sin(i),
|
|
569
|
-
// Top-right-front
|
|
570
|
-
u + e / 2 * Math.cos(i) - t * Math.sin(i),
|
|
571
|
-
p,
|
|
572
|
-
f + e / 2 * Math.sin(i) + t * Math.cos(i),
|
|
573
|
-
// Back-right
|
|
574
|
-
u - e / 2 * Math.cos(i) - t * Math.sin(i),
|
|
575
|
-
p,
|
|
576
|
-
f - e / 2 * Math.sin(i) + t * Math.cos(i)
|
|
577
|
-
// Back-left
|
|
578
|
-
);
|
|
579
|
-
const x = m * 8;
|
|
580
|
-
c.push(
|
|
581
|
-
x,
|
|
582
|
-
x + 1,
|
|
583
|
-
x + 2,
|
|
584
|
-
// First triangle for riser
|
|
585
|
-
x,
|
|
586
|
-
x + 2,
|
|
587
|
-
x + 3
|
|
588
|
-
// Second triangle for riser
|
|
589
|
-
), c.push(
|
|
590
|
-
x + 4,
|
|
591
|
-
x + 5,
|
|
592
|
-
x + 6,
|
|
593
|
-
// First triangle for tread
|
|
594
|
-
x + 4,
|
|
595
|
-
x + 6,
|
|
596
|
-
x + 7
|
|
597
|
-
// Second triangle for tread
|
|
598
|
-
), i += s;
|
|
45
|
+
}
|
|
46
|
+
s.needsUpdate = !0;
|
|
47
|
+
}, Vt = (o, e, t, n, a, c = U.UP, s = X.LINEAR) => {
|
|
48
|
+
const r = o.attributes.position;
|
|
49
|
+
for (let i = 0; i < r.count; i++) {
|
|
50
|
+
const l = new M();
|
|
51
|
+
l.fromBufferAttribute(r, i);
|
|
52
|
+
const u = l.distanceTo(e);
|
|
53
|
+
if (u < t) {
|
|
54
|
+
const h = s(u, t) * a, d = l.dot(c.normalize()), p = n - d;
|
|
55
|
+
l.add(c.clone().multiplyScalar(p * h)), r.setXYZ(i, l.x, l.y, l.z);
|
|
599
56
|
}
|
|
600
|
-
this.setIndex(c), this.setAttribute("position", new U(r, 3)), this.computeVertexNormals();
|
|
601
57
|
}
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
58
|
+
r.needsUpdate = !0;
|
|
59
|
+
}, Xt = (o, e, t, n, a = U.UP, c = X.LINEAR) => {
|
|
60
|
+
const s = o.attributes.position;
|
|
61
|
+
for (let r = 0; r < s.count; r++) {
|
|
62
|
+
const i = new M();
|
|
63
|
+
i.fromBufferAttribute(s, r);
|
|
64
|
+
const l = i.distanceTo(e);
|
|
65
|
+
if (l < t) {
|
|
66
|
+
const u = c(l, t), m = n * u, h = a.clone().normalize();
|
|
67
|
+
i.x += Q.randFloatSpread(m) * h.x, i.y += Q.randFloatSpread(m) * h.y, i.z += Q.randFloatSpread(m) * h.z, s.setXYZ(r, i.x, i.y, i.z);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
s.needsUpdate = !0;
|
|
71
|
+
}, Rt = (o, e, t, n) => {
|
|
72
|
+
const a = o.attributes.position, c = new M();
|
|
73
|
+
for (let s = 0; s < a.count; s++) {
|
|
74
|
+
const r = new M();
|
|
75
|
+
if (r.fromBufferAttribute(a, s), r.distanceTo(e) < t) {
|
|
76
|
+
let l = new M(), u = 0;
|
|
77
|
+
for (let m = 0; m < a.count; m++)
|
|
78
|
+
c.fromBufferAttribute(a, m), c.distanceTo(r) < t && (l.add(c), u++);
|
|
79
|
+
u > 0 && (l.divideScalar(u), r.lerp(l, n), a.setXYZ(s, r.x, r.y, r.z));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
a.needsUpdate = !0;
|
|
83
|
+
}, Zt = (o, e, t, n, a = !1, c = X.LINEAR) => {
|
|
84
|
+
const s = o.attributes.position;
|
|
85
|
+
for (let r = 0; r < s.count; r++) {
|
|
86
|
+
const i = new M();
|
|
87
|
+
i.fromBufferAttribute(s, r);
|
|
88
|
+
const l = i.distanceTo(e);
|
|
89
|
+
if (l < t) {
|
|
90
|
+
const m = c(l, t) * n * (a ? -1 : 1), h = i.clone().sub(e).normalize();
|
|
91
|
+
i.add(h.multiplyScalar(m)), s.setXYZ(r, i.x, i.y, i.z);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
s.needsUpdate = !0;
|
|
95
|
+
}, Yt = (o, e, t, n, a = U.UP, c = X.LINEAR) => {
|
|
96
|
+
const s = o.attributes.position, r = new pe();
|
|
97
|
+
for (let i = 0; i < s.count; i++) {
|
|
98
|
+
const l = new M();
|
|
99
|
+
l.fromBufferAttribute(s, i);
|
|
100
|
+
const u = l.distanceTo(e);
|
|
101
|
+
if (u < t) {
|
|
102
|
+
const h = c(u, t) * n;
|
|
103
|
+
r.setFromAxisAngle(a, h), l.sub(e).applyQuaternion(r).add(e), s.setXYZ(i, l.x, l.y, l.z);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
s.needsUpdate = !0;
|
|
107
|
+
}, Ce = (o) => 1 - Math.cos(o * Math.PI / 2), ke = (o) => Math.sin(o * Math.PI / 2), Ne = (o) => -0.5 * (Math.cos(Math.PI * o) - 1), _e = (o) => o * o, Ue = (o) => 1 - Math.pow(1 - o, 2), Fe = (o) => o < 0.5 ? 2 * o * o : 1 - Math.pow(-2 * o + 2, 2) / 2, Oe = (o) => o * o * o, ze = (o) => 1 - Math.pow(1 - o, 3), qe = (o) => o < 0.5 ? 4 * o * o * o : 1 - Math.pow(-2 * o + 2, 3) / 2, Le = (o) => o * o * o * o, Ve = (o) => 1 - Math.pow(1 - o, 4), Xe = (o) => o < 0.5 ? 8 * o * o * o * o : 1 - Math.pow(-2 * o + 2, 4) / 2, Re = (o) => o * o * o * o * o, Ze = (o) => 1 - Math.pow(1 - o, 5), Ye = (o) => o < 0.5 ? 16 * o * o * o * o * o : 1 - Math.pow(-2 * o + 2, 5) / 2, Qe = (o) => o === 0 ? 0 : Math.pow(2, 10 * o - 10), De = (o) => o === 1 ? 1 : 1 - Math.pow(2, -10 * o), He = (o) => o === 0 ? 0 : o === 1 ? 1 : o < 0.5 ? Math.pow(2, 20 * o - 10) / 2 : (2 - Math.pow(2, -20 * o + 10)) / 2, je = (o) => 1 - Math.sqrt(1 - Math.pow(o, 2)), Ke = (o) => Math.sqrt(1 - Math.pow(o - 1, 2)), Je = (o) => o < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * o, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * o + 2, 2)) + 1) / 2, $e = (o) => o, We = (o) => o * o * (3 - 2 * o), et = (o) => 1 - Math.pow(1 - o, 0.3), tt = (o) => Math.pow(o, 0.3), ot = (o) => Math.log(Math.max(0.01, o)) / Math.log(2), nt = (o) => Math.sqrt(o), st = (o) => 1 - o, at = (o) => Math.exp(-Math.pow(o - 0.5, 2) / (2 * 0.5)), Qt = {
|
|
108
|
+
SINE_EASE_IN: Ce,
|
|
109
|
+
SINE_EASE_OUT: ke,
|
|
110
|
+
SINE_EASE_IN_OUT: Ne,
|
|
111
|
+
QUADRATIC_EASE_IN: _e,
|
|
112
|
+
QUADRATIC_EASE_OUT: Ue,
|
|
113
|
+
QUADRATIC_EASE_IN_OUT: Fe,
|
|
114
|
+
CUBIC_EASE_IN: Oe,
|
|
115
|
+
CUBIC_EASE_OUT: ze,
|
|
116
|
+
CUBIC_EASE_IN_OUT: qe,
|
|
117
|
+
QUARTIC_EASE_IN: Le,
|
|
118
|
+
QUARTIC_EASE_OUT: Ve,
|
|
119
|
+
QUARTIC_EASE_IN_OUT: Xe,
|
|
120
|
+
QUINTIC_EASE_IN: Re,
|
|
121
|
+
QUINTIC_EASE_OUT: Ze,
|
|
122
|
+
QUINTIC_EASE_IN_OUT: Ye,
|
|
123
|
+
EXPONENTIAL_EASE_IN: Qe,
|
|
124
|
+
EXPONENTIAL_EASE_OUT: De,
|
|
125
|
+
EXPONENTIAL_EASE_IN_OUT: He,
|
|
126
|
+
CIRCULAR_EASE_IN: je,
|
|
127
|
+
CIRCULAR_EASE_OUT: Ke,
|
|
128
|
+
CIRCULAR_EASE_IN_OUT: Je,
|
|
129
|
+
LINEAR: $e,
|
|
130
|
+
SMOOTHSTEP: We,
|
|
131
|
+
CONCAVE: et,
|
|
132
|
+
CONVEX: tt,
|
|
133
|
+
LOGARITHMIC: ot,
|
|
134
|
+
SQUARE_ROOT: nt,
|
|
135
|
+
INVERSE: st,
|
|
136
|
+
GAUSSIAN: at
|
|
137
|
+
};
|
|
138
|
+
class Dt extends P {
|
|
139
|
+
constructor() {
|
|
605
140
|
super();
|
|
606
|
-
const
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
// 4: Top-left-front (repeated)
|
|
632
|
-
e / 2,
|
|
633
|
-
i,
|
|
634
|
-
m,
|
|
635
|
-
// 5: Top-right-front (repeated)
|
|
636
|
-
e / 2,
|
|
637
|
-
i,
|
|
638
|
-
u,
|
|
639
|
-
// 6: Top-right-back
|
|
640
|
-
-e / 2,
|
|
641
|
-
i,
|
|
642
|
-
u
|
|
643
|
-
// 7: Top-left-back
|
|
644
|
-
);
|
|
645
|
-
const f = r * 8;
|
|
646
|
-
s.push(
|
|
647
|
-
f,
|
|
648
|
-
f + 1,
|
|
649
|
-
f + 2,
|
|
650
|
-
// First triangle for riser
|
|
651
|
-
f,
|
|
652
|
-
f + 2,
|
|
653
|
-
f + 3
|
|
654
|
-
// Second triangle for riser
|
|
655
|
-
), s.push(
|
|
656
|
-
f + 4,
|
|
657
|
-
f + 6,
|
|
658
|
-
f + 5,
|
|
659
|
-
// First triangle for tread
|
|
660
|
-
f + 4,
|
|
661
|
-
f + 7,
|
|
662
|
-
f + 6
|
|
663
|
-
// Second triangle for tread
|
|
664
|
-
);
|
|
141
|
+
const e = [], t = 20, n = new T(0.1, 6, 6), a = new w({
|
|
142
|
+
color: 16777215,
|
|
143
|
+
transparent: !0,
|
|
144
|
+
opacity: 0.6,
|
|
145
|
+
roughness: 0.3,
|
|
146
|
+
metalness: 0.3
|
|
147
|
+
});
|
|
148
|
+
for (let r = 0; r < t; r++) {
|
|
149
|
+
const i = new f(n, a);
|
|
150
|
+
i.position.set(
|
|
151
|
+
(Math.random() - 0.5) * 1.5,
|
|
152
|
+
// Random x position within flask
|
|
153
|
+
Math.random() * 3,
|
|
154
|
+
// Random y position within flask height
|
|
155
|
+
(Math.random() - 0.5) * 1.5
|
|
156
|
+
// Random z position within flask
|
|
157
|
+
), e.push(i), this.add(i);
|
|
158
|
+
}
|
|
159
|
+
function c() {
|
|
160
|
+
e.forEach((r) => {
|
|
161
|
+
r.position.y += 0.02, r.position.y > 3 && (r.position.y = 0, r.position.x = (Math.random() - 0.5) * 1.5, r.position.z = (Math.random() - 0.5) * 1.5);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function s() {
|
|
165
|
+
requestAnimationFrame(s), c();
|
|
665
166
|
}
|
|
666
|
-
|
|
167
|
+
s();
|
|
667
168
|
}
|
|
668
169
|
}
|
|
669
|
-
class
|
|
670
|
-
constructor(e = 1, t = 1.5,
|
|
170
|
+
class ce extends v {
|
|
171
|
+
constructor(e = 1, t = 1.5, n = 0.5, a = 0.05, c = 0.05) {
|
|
671
172
|
super();
|
|
672
|
-
const s = e, r = t,
|
|
173
|
+
const s = e, r = t, i = n, l = a, u = c, m = [
|
|
673
174
|
// Front cover
|
|
674
175
|
0,
|
|
675
176
|
0,
|
|
@@ -686,20 +187,20 @@ class Pe extends v {
|
|
|
686
187
|
// Back cover
|
|
687
188
|
s,
|
|
688
189
|
0,
|
|
689
|
-
-
|
|
190
|
+
-i,
|
|
690
191
|
0,
|
|
691
192
|
0,
|
|
692
|
-
-
|
|
193
|
+
-i,
|
|
693
194
|
0,
|
|
694
195
|
r,
|
|
695
|
-
-
|
|
196
|
+
-i,
|
|
696
197
|
s,
|
|
697
198
|
r,
|
|
698
|
-
-
|
|
199
|
+
-i,
|
|
699
200
|
// Spine
|
|
700
201
|
0,
|
|
701
202
|
0,
|
|
702
|
-
-
|
|
203
|
+
-i,
|
|
703
204
|
0,
|
|
704
205
|
0,
|
|
705
206
|
0,
|
|
@@ -708,46 +209,46 @@ class Pe extends v {
|
|
|
708
209
|
0,
|
|
709
210
|
0,
|
|
710
211
|
r,
|
|
711
|
-
-
|
|
212
|
+
-i,
|
|
712
213
|
// Inside front cover
|
|
713
214
|
s,
|
|
714
215
|
0,
|
|
715
|
-
-
|
|
716
|
-
|
|
216
|
+
-l,
|
|
217
|
+
l,
|
|
717
218
|
0,
|
|
718
|
-
-
|
|
719
|
-
|
|
219
|
+
-l,
|
|
220
|
+
l,
|
|
720
221
|
r,
|
|
721
|
-
-
|
|
222
|
+
-l,
|
|
722
223
|
s,
|
|
723
224
|
r,
|
|
724
|
-
-
|
|
225
|
+
-l,
|
|
725
226
|
// Inside back cover
|
|
726
|
-
|
|
227
|
+
l,
|
|
727
228
|
0,
|
|
728
|
-
-
|
|
229
|
+
-i + l,
|
|
729
230
|
s,
|
|
730
231
|
0,
|
|
731
|
-
-
|
|
232
|
+
-i + l,
|
|
732
233
|
s,
|
|
733
234
|
r,
|
|
734
|
-
-
|
|
735
|
-
|
|
235
|
+
-i + l,
|
|
236
|
+
l,
|
|
736
237
|
r,
|
|
737
|
-
-
|
|
238
|
+
-i + l,
|
|
738
239
|
// Inside spine
|
|
739
|
-
|
|
240
|
+
l,
|
|
740
241
|
0,
|
|
741
|
-
-
|
|
742
|
-
|
|
242
|
+
-l,
|
|
243
|
+
l,
|
|
743
244
|
0,
|
|
744
|
-
-
|
|
745
|
-
|
|
245
|
+
-i + l,
|
|
246
|
+
l,
|
|
746
247
|
r,
|
|
747
|
-
-
|
|
748
|
-
|
|
248
|
+
-i + l,
|
|
249
|
+
l,
|
|
749
250
|
r,
|
|
750
|
-
-
|
|
251
|
+
-l,
|
|
751
252
|
// Front cover top
|
|
752
253
|
0,
|
|
753
254
|
r,
|
|
@@ -757,102 +258,102 @@ class Pe extends v {
|
|
|
757
258
|
0,
|
|
758
259
|
s,
|
|
759
260
|
r,
|
|
760
|
-
-
|
|
761
|
-
|
|
261
|
+
-l,
|
|
262
|
+
l,
|
|
762
263
|
r,
|
|
763
|
-
-
|
|
264
|
+
-l,
|
|
764
265
|
// Back cover top
|
|
765
266
|
0,
|
|
766
267
|
r,
|
|
767
|
-
-
|
|
768
|
-
|
|
268
|
+
-i,
|
|
269
|
+
l,
|
|
769
270
|
r,
|
|
770
|
-
-
|
|
271
|
+
-i + l,
|
|
771
272
|
s,
|
|
772
273
|
r,
|
|
773
|
-
-
|
|
274
|
+
-i + l,
|
|
774
275
|
s,
|
|
775
276
|
r,
|
|
776
|
-
-
|
|
277
|
+
-i,
|
|
777
278
|
// Spine cover top
|
|
778
279
|
0,
|
|
779
280
|
r,
|
|
780
281
|
0,
|
|
781
|
-
|
|
282
|
+
l,
|
|
782
283
|
r,
|
|
783
|
-
-
|
|
784
|
-
|
|
284
|
+
-l,
|
|
285
|
+
l,
|
|
785
286
|
r,
|
|
786
|
-
-
|
|
287
|
+
-i + l,
|
|
787
288
|
0,
|
|
788
289
|
r,
|
|
789
|
-
-
|
|
290
|
+
-i,
|
|
790
291
|
// Front cover bottom
|
|
791
292
|
0,
|
|
792
293
|
0,
|
|
793
294
|
0,
|
|
794
|
-
|
|
295
|
+
l,
|
|
795
296
|
0,
|
|
796
|
-
-
|
|
297
|
+
-l,
|
|
797
298
|
s,
|
|
798
299
|
0,
|
|
799
|
-
-
|
|
300
|
+
-l,
|
|
800
301
|
s,
|
|
801
302
|
0,
|
|
802
303
|
0,
|
|
803
304
|
// Back cover bottom
|
|
804
305
|
0,
|
|
805
306
|
0,
|
|
806
|
-
-
|
|
307
|
+
-i,
|
|
807
308
|
s,
|
|
808
309
|
0,
|
|
809
|
-
-
|
|
310
|
+
-i,
|
|
810
311
|
s,
|
|
811
312
|
0,
|
|
812
|
-
-
|
|
813
|
-
|
|
313
|
+
-i + l,
|
|
314
|
+
l,
|
|
814
315
|
0,
|
|
815
|
-
-
|
|
316
|
+
-i + l,
|
|
816
317
|
// Spine cover bottom
|
|
817
318
|
0,
|
|
818
319
|
0,
|
|
819
320
|
0,
|
|
820
321
|
0,
|
|
821
322
|
0,
|
|
822
|
-
-
|
|
823
|
-
|
|
323
|
+
-i,
|
|
324
|
+
l,
|
|
824
325
|
0,
|
|
825
|
-
-
|
|
826
|
-
|
|
326
|
+
-i + l,
|
|
327
|
+
l,
|
|
827
328
|
0,
|
|
828
|
-
-
|
|
329
|
+
-l,
|
|
829
330
|
// Front cover edge
|
|
830
331
|
s,
|
|
831
332
|
0,
|
|
832
333
|
0,
|
|
833
334
|
s,
|
|
834
335
|
0,
|
|
835
|
-
-
|
|
336
|
+
-l,
|
|
836
337
|
s,
|
|
837
338
|
r,
|
|
838
|
-
-
|
|
339
|
+
-l,
|
|
839
340
|
s,
|
|
840
341
|
r,
|
|
841
342
|
0,
|
|
842
343
|
// Back cover edge
|
|
843
344
|
s,
|
|
844
345
|
0,
|
|
845
|
-
-
|
|
346
|
+
-i,
|
|
846
347
|
s,
|
|
847
348
|
r,
|
|
848
|
-
-
|
|
349
|
+
-i,
|
|
849
350
|
s,
|
|
850
351
|
r,
|
|
851
|
-
-
|
|
352
|
+
-i + l,
|
|
852
353
|
s,
|
|
853
354
|
0,
|
|
854
|
-
-
|
|
855
|
-
],
|
|
355
|
+
-i + l
|
|
356
|
+
], h = [
|
|
856
357
|
0,
|
|
857
358
|
0,
|
|
858
359
|
1,
|
|
@@ -1035,7 +536,7 @@ class Pe extends v {
|
|
|
1035
536
|
0,
|
|
1036
537
|
0
|
|
1037
538
|
// Back cover edge
|
|
1038
|
-
], d = e / (e * 2 +
|
|
539
|
+
], d = e / (e * 2 + n), p = (e + n) / (e * 2 + n), x = [
|
|
1039
540
|
p,
|
|
1040
541
|
0,
|
|
1041
542
|
1,
|
|
@@ -1261,141 +762,735 @@ class Pe extends v {
|
|
|
1261
762
|
54,
|
|
1262
763
|
55
|
|
1263
764
|
// Back cover edge
|
|
1264
|
-
], I = new Float32Array(
|
|
1265
|
-
|
|
1266
|
-
const
|
|
1267
|
-
|
|
765
|
+
], I = new Float32Array(m), G = new Float32Array(h), B = new Float32Array(x), C = new Uint16Array(y), k = new v();
|
|
766
|
+
k.setAttribute("position", new Z(I, 3)), k.setAttribute("normal", new Z(G, 3)), k.setAttribute("uv", new Z(B, 2)), k.setIndex(new Z(C, 1));
|
|
767
|
+
const N = new g(e - l - u, r - u * 2, i - l * 2);
|
|
768
|
+
N.translate((e - l - u) / 2 + l, r / 2, -i / 2), this.copy(A([k, N], !0));
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
function rt(o = 0, e = 1) {
|
|
772
|
+
return Math.random() * (e - o) + o;
|
|
773
|
+
}
|
|
774
|
+
function Ht(o = 0, e = 1) {
|
|
775
|
+
return Math.floor(Math.random() * (e - o + 1)) + o;
|
|
776
|
+
}
|
|
777
|
+
function ct(o = 0.5, e = 0, t = 1) {
|
|
778
|
+
return e + (t - e) * Math.pow(Math.random(), o);
|
|
779
|
+
}
|
|
780
|
+
function it(o = 0.5, e = 0, t = 1) {
|
|
781
|
+
return e + (t - e) * Math.pow(1 - Math.random(), o);
|
|
782
|
+
}
|
|
783
|
+
function ie({
|
|
784
|
+
scaleXMin: o = 0.4,
|
|
785
|
+
scaleXMax: e = 0.7,
|
|
786
|
+
scaleYMin: t = 0.3,
|
|
787
|
+
scaleYMax: n = 0.95,
|
|
788
|
+
scaleZMin: a = 0.1,
|
|
789
|
+
scaleZMax: c = 0.5
|
|
790
|
+
} = {}) {
|
|
791
|
+
return new M(
|
|
792
|
+
rt(o, e),
|
|
793
|
+
ct(0.25, t, n),
|
|
794
|
+
it(0.8, a, c)
|
|
795
|
+
);
|
|
796
|
+
}
|
|
797
|
+
function le({ coverMaterial: o, pagesMaterial: e, scales: t = [] } = {}) {
|
|
798
|
+
const n = new ce(), a = new de(n, [o, e], t.length), c = new W();
|
|
799
|
+
let s = 0;
|
|
800
|
+
for (let r = 0; r < t.length; r++) {
|
|
801
|
+
const i = t[r], l = new W();
|
|
802
|
+
l.makeScale(i.x, i.y, i.z), c.identity(), c.multiply(l), c.setPosition(0.01 + Math.random() * 0.1, 0, s + i.z * 0.5), a.setMatrixAt(r, c), s += i.z * 0.5;
|
|
803
|
+
}
|
|
804
|
+
return a;
|
|
805
|
+
}
|
|
806
|
+
function jt({
|
|
807
|
+
coverMaterial: o,
|
|
808
|
+
pagesMaterial: e,
|
|
809
|
+
count: t = 10,
|
|
810
|
+
scaleXMin: n = 0.4,
|
|
811
|
+
scaleXMax: a = 0.7,
|
|
812
|
+
scaleYMin: c = 0.3,
|
|
813
|
+
scaleYMax: s = 0.95,
|
|
814
|
+
scaleZMin: r = 0.1,
|
|
815
|
+
scaleZMax: i = 0.5
|
|
816
|
+
} = {}) {
|
|
817
|
+
const l = Array.from(
|
|
818
|
+
{ length: t },
|
|
819
|
+
() => ie({ scaleXMin: n, scaleXMax: a, scaleYMin: c, scaleYMax: s, scaleZMin: r, scaleZMax: i })
|
|
820
|
+
);
|
|
821
|
+
return le({ coverMaterial: o, pagesMaterial: e, scales: l });
|
|
822
|
+
}
|
|
823
|
+
function Kt({
|
|
824
|
+
coverMaterial: o,
|
|
825
|
+
pagesMaterial: e,
|
|
826
|
+
length: t = 10,
|
|
827
|
+
scaleXMin: n = 0.4,
|
|
828
|
+
scaleXMax: a = 0.7,
|
|
829
|
+
scaleYMin: c = 0.3,
|
|
830
|
+
scaleYMax: s = 0.95,
|
|
831
|
+
scaleZMin: r = 0.1,
|
|
832
|
+
scaleZMax: i = 0.5
|
|
833
|
+
} = {}) {
|
|
834
|
+
const l = [];
|
|
835
|
+
let u = t;
|
|
836
|
+
for (; u > 0; ) {
|
|
837
|
+
const m = ie({ scaleXMin: n, scaleXMax: a, scaleYMin: c, scaleYMax: s, scaleZMin: r, scaleZMax: i });
|
|
838
|
+
m.z = Math.min(m.z, u), l.push(m), u -= m.z;
|
|
839
|
+
}
|
|
840
|
+
return le({ coverMaterial: o, pagesMaterial: e, scales: l });
|
|
841
|
+
}
|
|
842
|
+
class Jt extends v {
|
|
843
|
+
constructor(e = 2, t = 0.3, n = 0.6, a = 5, c = 5, s = Math.PI / 4) {
|
|
844
|
+
super();
|
|
845
|
+
const r = [], i = [];
|
|
846
|
+
for (let d = 0; d < a; d++) {
|
|
847
|
+
const p = d * t, x = p + t, y = d * n, I = y + n;
|
|
848
|
+
r.push(
|
|
849
|
+
// Vertical riser
|
|
850
|
+
-e / 2,
|
|
851
|
+
p,
|
|
852
|
+
y,
|
|
853
|
+
// Bottom-left
|
|
854
|
+
e / 2,
|
|
855
|
+
p,
|
|
856
|
+
y,
|
|
857
|
+
// Bottom-right
|
|
858
|
+
e / 2,
|
|
859
|
+
x,
|
|
860
|
+
y,
|
|
861
|
+
// Top-right
|
|
862
|
+
-e / 2,
|
|
863
|
+
x,
|
|
864
|
+
y,
|
|
865
|
+
// Top-left
|
|
866
|
+
// Horizontal tread
|
|
867
|
+
-e / 2,
|
|
868
|
+
x,
|
|
869
|
+
y,
|
|
870
|
+
// Top-left
|
|
871
|
+
e / 2,
|
|
872
|
+
x,
|
|
873
|
+
y,
|
|
874
|
+
// Top-right
|
|
875
|
+
e / 2,
|
|
876
|
+
x,
|
|
877
|
+
I,
|
|
878
|
+
// Back-right
|
|
879
|
+
-e / 2,
|
|
880
|
+
x,
|
|
881
|
+
I
|
|
882
|
+
// Back-left
|
|
883
|
+
);
|
|
884
|
+
const G = d * 8;
|
|
885
|
+
i.push(
|
|
886
|
+
G,
|
|
887
|
+
G + 1,
|
|
888
|
+
G + 2,
|
|
889
|
+
G,
|
|
890
|
+
G + 2,
|
|
891
|
+
G + 3
|
|
892
|
+
), i.push(
|
|
893
|
+
G + 4,
|
|
894
|
+
G + 5,
|
|
895
|
+
G + 6,
|
|
896
|
+
G + 4,
|
|
897
|
+
G + 6,
|
|
898
|
+
G + 7
|
|
899
|
+
);
|
|
900
|
+
}
|
|
901
|
+
const l = a * t, u = a * n, m = e * 2;
|
|
902
|
+
r.push(
|
|
903
|
+
// Landing platform (4 vertices)
|
|
904
|
+
-m / 2,
|
|
905
|
+
l,
|
|
906
|
+
u,
|
|
907
|
+
// Bottom-left
|
|
908
|
+
m / 2,
|
|
909
|
+
l,
|
|
910
|
+
u,
|
|
911
|
+
// Bottom-right
|
|
912
|
+
m / 2,
|
|
913
|
+
l,
|
|
914
|
+
u + n,
|
|
915
|
+
// Top-right
|
|
916
|
+
-m / 2,
|
|
917
|
+
l,
|
|
918
|
+
u + n
|
|
919
|
+
// Top-left
|
|
920
|
+
);
|
|
921
|
+
const h = a * 8;
|
|
922
|
+
i.push(
|
|
923
|
+
h,
|
|
924
|
+
h + 1,
|
|
925
|
+
h + 2,
|
|
926
|
+
// First triangle for landing
|
|
927
|
+
h,
|
|
928
|
+
h + 2,
|
|
929
|
+
h + 3
|
|
930
|
+
// Second triangle for landing
|
|
931
|
+
);
|
|
932
|
+
for (let d = 0; d < 2; d++) {
|
|
933
|
+
const p = d === 0 ? 1 : -1;
|
|
934
|
+
for (let x = 0; x < c; x++) {
|
|
935
|
+
const y = l + x * t, I = y + t, G = p * (m / 4), B = u + n, C = x * n * Math.cos(s), k = x * n * Math.sin(s), N = G + p * C - e / 2 * Math.cos(s), R = G + p * C + e / 2 * Math.cos(s), _ = B + k, he = N + p * n * Math.cos(s), fe = R + p * n * Math.cos(s), $ = _ + n * Math.sin(s);
|
|
936
|
+
r.push(
|
|
937
|
+
// Vertical riser
|
|
938
|
+
N,
|
|
939
|
+
y,
|
|
940
|
+
_,
|
|
941
|
+
// Bottom-left
|
|
942
|
+
R,
|
|
943
|
+
y,
|
|
944
|
+
_,
|
|
945
|
+
// Bottom-right
|
|
946
|
+
R,
|
|
947
|
+
I,
|
|
948
|
+
_,
|
|
949
|
+
// Top-right
|
|
950
|
+
N,
|
|
951
|
+
I,
|
|
952
|
+
_,
|
|
953
|
+
// Top-left
|
|
954
|
+
// Horizontal tread
|
|
955
|
+
N,
|
|
956
|
+
I,
|
|
957
|
+
_,
|
|
958
|
+
// Top-left
|
|
959
|
+
R,
|
|
960
|
+
I,
|
|
961
|
+
_,
|
|
962
|
+
// Top-right
|
|
963
|
+
fe,
|
|
964
|
+
I,
|
|
965
|
+
$,
|
|
966
|
+
// Back-right
|
|
967
|
+
he,
|
|
968
|
+
I,
|
|
969
|
+
$
|
|
970
|
+
// Back-left
|
|
971
|
+
);
|
|
972
|
+
const E = h + 4 + d * c * 8 + x * 8;
|
|
973
|
+
i.push(
|
|
974
|
+
E,
|
|
975
|
+
E + 1,
|
|
976
|
+
E + 2,
|
|
977
|
+
E,
|
|
978
|
+
E + 2,
|
|
979
|
+
E + 3
|
|
980
|
+
), i.push(
|
|
981
|
+
E + 4,
|
|
982
|
+
E + 5,
|
|
983
|
+
E + 6,
|
|
984
|
+
E + 4,
|
|
985
|
+
E + 6,
|
|
986
|
+
E + 7
|
|
987
|
+
);
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
this.setIndex(i), this.setAttribute("position", new F(r, 3)), this.computeVertexNormals();
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
class $t extends v {
|
|
994
|
+
constructor(e = 5, t = 3, n = 5, a = 0.2) {
|
|
995
|
+
super();
|
|
996
|
+
const c = [
|
|
997
|
+
// Floor vertices
|
|
998
|
+
-e / 2,
|
|
999
|
+
0,
|
|
1000
|
+
-n / 2,
|
|
1001
|
+
// 0
|
|
1002
|
+
e / 2,
|
|
1003
|
+
0,
|
|
1004
|
+
-n / 2,
|
|
1005
|
+
// 1
|
|
1006
|
+
e / 2,
|
|
1007
|
+
0,
|
|
1008
|
+
n / 2,
|
|
1009
|
+
// 2
|
|
1010
|
+
-e / 2,
|
|
1011
|
+
0,
|
|
1012
|
+
n / 2,
|
|
1013
|
+
// 3
|
|
1014
|
+
// Back wall vertices
|
|
1015
|
+
-e / 2,
|
|
1016
|
+
0,
|
|
1017
|
+
-n / 2,
|
|
1018
|
+
// 4
|
|
1019
|
+
e / 2,
|
|
1020
|
+
0,
|
|
1021
|
+
-n / 2,
|
|
1022
|
+
// 5
|
|
1023
|
+
e / 2,
|
|
1024
|
+
t,
|
|
1025
|
+
-n / 2,
|
|
1026
|
+
// 6
|
|
1027
|
+
-e / 2,
|
|
1028
|
+
t,
|
|
1029
|
+
-n / 2,
|
|
1030
|
+
// 7
|
|
1031
|
+
// Left wall vertices
|
|
1032
|
+
-e / 2,
|
|
1033
|
+
0,
|
|
1034
|
+
-n / 2,
|
|
1035
|
+
// 8
|
|
1036
|
+
-e / 2,
|
|
1037
|
+
0,
|
|
1038
|
+
n / 2,
|
|
1039
|
+
// 9
|
|
1040
|
+
-e / 2,
|
|
1041
|
+
t,
|
|
1042
|
+
n / 2,
|
|
1043
|
+
// 10
|
|
1044
|
+
-e / 2,
|
|
1045
|
+
t,
|
|
1046
|
+
-n / 2
|
|
1047
|
+
// 11
|
|
1048
|
+
], s = [
|
|
1049
|
+
// Floor
|
|
1050
|
+
0,
|
|
1051
|
+
1,
|
|
1052
|
+
2,
|
|
1053
|
+
0,
|
|
1054
|
+
2,
|
|
1055
|
+
3,
|
|
1056
|
+
// Back wall
|
|
1057
|
+
4,
|
|
1058
|
+
5,
|
|
1059
|
+
6,
|
|
1060
|
+
4,
|
|
1061
|
+
6,
|
|
1062
|
+
7,
|
|
1063
|
+
// Left wall
|
|
1064
|
+
8,
|
|
1065
|
+
9,
|
|
1066
|
+
10,
|
|
1067
|
+
8,
|
|
1068
|
+
10,
|
|
1069
|
+
11
|
|
1070
|
+
];
|
|
1071
|
+
this.setIndex(s), this.setAttribute("position", new F(c, 3)), this.computeVertexNormals();
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
class Wt extends v {
|
|
1075
|
+
constructor(e = 2, t = 0.3, n = 0.5, a = 5, c = 2) {
|
|
1076
|
+
super();
|
|
1077
|
+
const s = [], r = [];
|
|
1078
|
+
for (let m = 0; m < a; m++) {
|
|
1079
|
+
const h = m * t, d = h + t, p = m * n, x = p + n;
|
|
1080
|
+
s.push(
|
|
1081
|
+
// Vertical riser
|
|
1082
|
+
-e / 2,
|
|
1083
|
+
h,
|
|
1084
|
+
p,
|
|
1085
|
+
// Bottom-left
|
|
1086
|
+
e / 2,
|
|
1087
|
+
h,
|
|
1088
|
+
p,
|
|
1089
|
+
// Bottom-right
|
|
1090
|
+
e / 2,
|
|
1091
|
+
d,
|
|
1092
|
+
p,
|
|
1093
|
+
// Top-right
|
|
1094
|
+
-e / 2,
|
|
1095
|
+
d,
|
|
1096
|
+
p,
|
|
1097
|
+
// Top-left
|
|
1098
|
+
// Horizontal tread
|
|
1099
|
+
-e / 2,
|
|
1100
|
+
d,
|
|
1101
|
+
p,
|
|
1102
|
+
// Top-left
|
|
1103
|
+
e / 2,
|
|
1104
|
+
d,
|
|
1105
|
+
p,
|
|
1106
|
+
// Top-right
|
|
1107
|
+
e / 2,
|
|
1108
|
+
d,
|
|
1109
|
+
x,
|
|
1110
|
+
// Back-right
|
|
1111
|
+
-e / 2,
|
|
1112
|
+
d,
|
|
1113
|
+
x
|
|
1114
|
+
// Back-left
|
|
1115
|
+
);
|
|
1116
|
+
const y = m * 8;
|
|
1117
|
+
r.push(
|
|
1118
|
+
y,
|
|
1119
|
+
y + 1,
|
|
1120
|
+
y + 2,
|
|
1121
|
+
y,
|
|
1122
|
+
y + 2,
|
|
1123
|
+
y + 3
|
|
1124
|
+
), r.push(
|
|
1125
|
+
y + 4,
|
|
1126
|
+
y + 5,
|
|
1127
|
+
y + 6,
|
|
1128
|
+
y + 4,
|
|
1129
|
+
y + 6,
|
|
1130
|
+
y + 7
|
|
1131
|
+
);
|
|
1132
|
+
}
|
|
1133
|
+
const i = a * t, l = a * n;
|
|
1134
|
+
s.push(
|
|
1135
|
+
// Landing platform (4 vertices)
|
|
1136
|
+
-e / 2,
|
|
1137
|
+
i,
|
|
1138
|
+
l,
|
|
1139
|
+
// Bottom-left
|
|
1140
|
+
e / 2,
|
|
1141
|
+
i,
|
|
1142
|
+
l,
|
|
1143
|
+
// Bottom-right
|
|
1144
|
+
e / 2,
|
|
1145
|
+
i,
|
|
1146
|
+
l + c,
|
|
1147
|
+
// Top-right
|
|
1148
|
+
-e / 2,
|
|
1149
|
+
i,
|
|
1150
|
+
l + c
|
|
1151
|
+
// Top-left
|
|
1152
|
+
);
|
|
1153
|
+
const u = a * 8;
|
|
1154
|
+
r.push(
|
|
1155
|
+
u,
|
|
1156
|
+
u + 1,
|
|
1157
|
+
u + 2,
|
|
1158
|
+
// First triangle for landing
|
|
1159
|
+
u,
|
|
1160
|
+
u + 2,
|
|
1161
|
+
u + 3
|
|
1162
|
+
// Second triangle for landing
|
|
1163
|
+
);
|
|
1164
|
+
for (let m = 0; m < a; m++) {
|
|
1165
|
+
const h = i + m * t, d = h + t, p = -e / 2 - m * n, x = p - n;
|
|
1166
|
+
s.push(
|
|
1167
|
+
// Vertical riser
|
|
1168
|
+
p,
|
|
1169
|
+
h,
|
|
1170
|
+
l + c,
|
|
1171
|
+
// Bottom-left
|
|
1172
|
+
p,
|
|
1173
|
+
h,
|
|
1174
|
+
l + c - e,
|
|
1175
|
+
// Bottom-right
|
|
1176
|
+
p,
|
|
1177
|
+
d,
|
|
1178
|
+
l + c - e,
|
|
1179
|
+
// Top-right
|
|
1180
|
+
p,
|
|
1181
|
+
d,
|
|
1182
|
+
l + c,
|
|
1183
|
+
// Top-left
|
|
1184
|
+
// Horizontal tread
|
|
1185
|
+
p,
|
|
1186
|
+
d,
|
|
1187
|
+
l + c,
|
|
1188
|
+
// Top-left
|
|
1189
|
+
p,
|
|
1190
|
+
d,
|
|
1191
|
+
l + c - e,
|
|
1192
|
+
// Top-right
|
|
1193
|
+
x,
|
|
1194
|
+
d,
|
|
1195
|
+
l + c - e,
|
|
1196
|
+
// Back-right
|
|
1197
|
+
x,
|
|
1198
|
+
d,
|
|
1199
|
+
l + c
|
|
1200
|
+
// Back-left
|
|
1201
|
+
);
|
|
1202
|
+
const y = u + 4 + m * 8;
|
|
1203
|
+
r.push(
|
|
1204
|
+
y,
|
|
1205
|
+
y + 1,
|
|
1206
|
+
y + 2,
|
|
1207
|
+
y,
|
|
1208
|
+
y + 2,
|
|
1209
|
+
y + 3
|
|
1210
|
+
), r.push(
|
|
1211
|
+
y + 4,
|
|
1212
|
+
y + 5,
|
|
1213
|
+
y + 6,
|
|
1214
|
+
y + 4,
|
|
1215
|
+
y + 6,
|
|
1216
|
+
y + 7
|
|
1217
|
+
);
|
|
1218
|
+
}
|
|
1219
|
+
this.setIndex(r), this.setAttribute("position", new F(s, 3)), this.computeVertexNormals();
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
class eo extends v {
|
|
1223
|
+
constructor(e = 1, t = 0.4, n = 0.2, a = 20, c = 2, s = Math.PI / 8) {
|
|
1224
|
+
super();
|
|
1225
|
+
const r = [], i = [];
|
|
1226
|
+
let l = 0;
|
|
1227
|
+
for (let u = 0; u < a; u++) {
|
|
1228
|
+
const m = c * Math.cos(l), h = c * Math.sin(l), d = u * n, p = d + n;
|
|
1229
|
+
r.push(
|
|
1230
|
+
// Front face (vertical riser)
|
|
1231
|
+
m - e / 2 * Math.cos(l),
|
|
1232
|
+
d,
|
|
1233
|
+
h - e / 2 * Math.sin(l),
|
|
1234
|
+
// Bottom-left
|
|
1235
|
+
m + e / 2 * Math.cos(l),
|
|
1236
|
+
d,
|
|
1237
|
+
h + e / 2 * Math.sin(l),
|
|
1238
|
+
// Bottom-right
|
|
1239
|
+
m + e / 2 * Math.cos(l),
|
|
1240
|
+
p,
|
|
1241
|
+
h + e / 2 * Math.sin(l),
|
|
1242
|
+
// Top-right
|
|
1243
|
+
m - e / 2 * Math.cos(l),
|
|
1244
|
+
p,
|
|
1245
|
+
h - e / 2 * Math.sin(l)
|
|
1246
|
+
// Top-left
|
|
1247
|
+
), r.push(
|
|
1248
|
+
// Top face (horizontal tread)
|
|
1249
|
+
m - e / 2 * Math.cos(l),
|
|
1250
|
+
p,
|
|
1251
|
+
h - e / 2 * Math.sin(l),
|
|
1252
|
+
// Top-left-front
|
|
1253
|
+
m + e / 2 * Math.cos(l),
|
|
1254
|
+
p,
|
|
1255
|
+
h + e / 2 * Math.sin(l),
|
|
1256
|
+
// Top-right-front
|
|
1257
|
+
m + e / 2 * Math.cos(l) - t * Math.sin(l),
|
|
1258
|
+
p,
|
|
1259
|
+
h + e / 2 * Math.sin(l) + t * Math.cos(l),
|
|
1260
|
+
// Back-right
|
|
1261
|
+
m - e / 2 * Math.cos(l) - t * Math.sin(l),
|
|
1262
|
+
p,
|
|
1263
|
+
h - e / 2 * Math.sin(l) + t * Math.cos(l)
|
|
1264
|
+
// Back-left
|
|
1265
|
+
);
|
|
1266
|
+
const x = u * 8;
|
|
1267
|
+
i.push(
|
|
1268
|
+
x,
|
|
1269
|
+
x + 1,
|
|
1270
|
+
x + 2,
|
|
1271
|
+
// First triangle for riser
|
|
1272
|
+
x,
|
|
1273
|
+
x + 2,
|
|
1274
|
+
x + 3
|
|
1275
|
+
// Second triangle for riser
|
|
1276
|
+
), i.push(
|
|
1277
|
+
x + 4,
|
|
1278
|
+
x + 5,
|
|
1279
|
+
x + 6,
|
|
1280
|
+
// First triangle for tread
|
|
1281
|
+
x + 4,
|
|
1282
|
+
x + 6,
|
|
1283
|
+
x + 7
|
|
1284
|
+
// Second triangle for tread
|
|
1285
|
+
), l += s;
|
|
1286
|
+
}
|
|
1287
|
+
this.setIndex(i), this.setAttribute("position", new F(r, 3)), this.computeVertexNormals();
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
class to extends v {
|
|
1291
|
+
constructor(e = 2, t = 0.3, n = 0.5, a = 10) {
|
|
1292
|
+
super();
|
|
1293
|
+
const c = [], s = [];
|
|
1294
|
+
for (let r = 0; r < a; r++) {
|
|
1295
|
+
const i = r * t, l = i + t, u = r * n, m = u + n;
|
|
1296
|
+
c.push(
|
|
1297
|
+
// Bottom face of riser (front face)
|
|
1298
|
+
-e / 2,
|
|
1299
|
+
i,
|
|
1300
|
+
u,
|
|
1301
|
+
// 0: Bottom-left-front
|
|
1302
|
+
e / 2,
|
|
1303
|
+
i,
|
|
1304
|
+
u,
|
|
1305
|
+
// 1: Bottom-right-front
|
|
1306
|
+
e / 2,
|
|
1307
|
+
l,
|
|
1308
|
+
u,
|
|
1309
|
+
// 2: Top-right-front
|
|
1310
|
+
-e / 2,
|
|
1311
|
+
l,
|
|
1312
|
+
u,
|
|
1313
|
+
// 3: Top-left-front
|
|
1314
|
+
// Top face of tread (horizontal step)
|
|
1315
|
+
-e / 2,
|
|
1316
|
+
l,
|
|
1317
|
+
u,
|
|
1318
|
+
// 4: Top-left-front (repeated)
|
|
1319
|
+
e / 2,
|
|
1320
|
+
l,
|
|
1321
|
+
u,
|
|
1322
|
+
// 5: Top-right-front (repeated)
|
|
1323
|
+
e / 2,
|
|
1324
|
+
l,
|
|
1325
|
+
m,
|
|
1326
|
+
// 6: Top-right-back
|
|
1327
|
+
-e / 2,
|
|
1328
|
+
l,
|
|
1329
|
+
m
|
|
1330
|
+
// 7: Top-left-back
|
|
1331
|
+
);
|
|
1332
|
+
const h = r * 8;
|
|
1333
|
+
s.push(
|
|
1334
|
+
h,
|
|
1335
|
+
h + 1,
|
|
1336
|
+
h + 2,
|
|
1337
|
+
// First triangle for riser
|
|
1338
|
+
h,
|
|
1339
|
+
h + 2,
|
|
1340
|
+
h + 3
|
|
1341
|
+
// Second triangle for riser
|
|
1342
|
+
), s.push(
|
|
1343
|
+
h + 4,
|
|
1344
|
+
h + 6,
|
|
1345
|
+
h + 5,
|
|
1346
|
+
// First triangle for tread
|
|
1347
|
+
h + 4,
|
|
1348
|
+
h + 7,
|
|
1349
|
+
h + 6
|
|
1350
|
+
// Second triangle for tread
|
|
1351
|
+
);
|
|
1352
|
+
}
|
|
1353
|
+
this.setIndex(s), this.setAttribute("position", new F(c, 3)), this.computeVertexNormals();
|
|
1268
1354
|
}
|
|
1269
1355
|
}
|
|
1270
|
-
class
|
|
1271
|
-
constructor(e = 0.4, t = 1.2,
|
|
1356
|
+
class lt extends v {
|
|
1357
|
+
constructor(e = 0.4, t = 1.2, n = 0.2) {
|
|
1272
1358
|
super();
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1275
|
-
const s = e * 1.5, r = new g(s, e / 4,
|
|
1276
|
-
r.translate(0,
|
|
1359
|
+
const a = t * 0.6, c = new g(e / 2, a, n);
|
|
1360
|
+
c.translate(0, a / 2, 0);
|
|
1361
|
+
const s = e * 1.5, r = new g(s, e / 4, n);
|
|
1362
|
+
r.translate(0, a * 0.75, 0), this.copy(A([c, r], !1)), this.computeVertexNormals();
|
|
1277
1363
|
}
|
|
1278
1364
|
}
|
|
1279
|
-
class
|
|
1365
|
+
class ut extends v {
|
|
1280
1366
|
constructor(e = 1.75, t = 0.75) {
|
|
1281
1367
|
super();
|
|
1282
|
-
const
|
|
1368
|
+
const n = e * 0.05, a = e * 0.15, c = e * 0.15, s = e * 0.75;
|
|
1283
1369
|
let r = 0;
|
|
1284
|
-
const
|
|
1285
|
-
c.translate(0, r + o / 2, 0), r += o;
|
|
1286
|
-
const i = new g(t * 0.8, n, t * 0.8);
|
|
1370
|
+
const i = new g(t, n, t);
|
|
1287
1371
|
i.translate(0, r + n / 2, 0), r += n;
|
|
1288
|
-
const
|
|
1289
|
-
|
|
1290
|
-
const u = new g(t * 0.
|
|
1291
|
-
u.translate(0, r +
|
|
1292
|
-
const
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1372
|
+
const l = new g(t * 0.8, a, t * 0.8);
|
|
1373
|
+
l.translate(0, r + a / 2, 0), r += a;
|
|
1374
|
+
const u = new g(t * 0.6, c, t * 0.6);
|
|
1375
|
+
u.translate(0, r + c / 2, 0), r += c;
|
|
1376
|
+
const m = new g(t * 0.4, s, t * 0.4);
|
|
1377
|
+
m.translate(0, r + s / 2, 0), r += s;
|
|
1378
|
+
const h = new z(t * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
|
|
1379
|
+
h.translate(0, r + 0.1 / 2, 0), this.copy(A([i, l, u, m, h], !1)), this.computeVertexNormals();
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
class mt extends v {
|
|
1383
|
+
constructor(e = 0.6, t = 1, n = 0.2, a = 0.6) {
|
|
1298
1384
|
super();
|
|
1299
|
-
const
|
|
1300
|
-
s.translate(0,
|
|
1301
|
-
const r = new
|
|
1302
|
-
r.rotateY(Math.PI / 2), r.rotateX(Math.PI / 2), r.translate(0,
|
|
1385
|
+
const c = t - a / 2, s = new g(e, c, n);
|
|
1386
|
+
s.translate(0, c / 2, 0);
|
|
1387
|
+
const r = new S(a / 2, a / 2, n, 16, 1, !1, 0, Math.PI);
|
|
1388
|
+
r.rotateY(Math.PI / 2), r.rotateX(Math.PI / 2), r.translate(0, c, 0), this.copy(A([s, r], !1)), this.computeVertexNormals();
|
|
1303
1389
|
}
|
|
1304
1390
|
}
|
|
1305
|
-
class
|
|
1306
|
-
constructor(e = 0.5, t = 0.8,
|
|
1391
|
+
class ht extends v {
|
|
1392
|
+
constructor(e = 0.5, t = 0.8, n = 0.15) {
|
|
1307
1393
|
super();
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1394
|
+
const a = new g(e, t, n);
|
|
1395
|
+
a.translate(0, t / 2, 0), this.copy(a);
|
|
1310
1396
|
}
|
|
1311
1397
|
}
|
|
1312
|
-
class
|
|
1398
|
+
class ft extends v {
|
|
1313
1399
|
constructor({ height: e = 2.25 } = {}) {
|
|
1314
1400
|
super();
|
|
1315
1401
|
const t = new g(1.2, 0.5, 1.2);
|
|
1316
1402
|
t.translate(0, 0.25, 0);
|
|
1317
|
-
const
|
|
1318
|
-
|
|
1319
|
-
const
|
|
1320
|
-
|
|
1403
|
+
const n = new g(1, e, 1);
|
|
1404
|
+
n.translate(0, 0.5 + e / 2, 0);
|
|
1405
|
+
const a = new g(1.4, 0.3, 1.4);
|
|
1406
|
+
a.translate(0, 0.5 + e + 0.15, 0), this.copy(A([t, n, a], !1));
|
|
1321
1407
|
}
|
|
1322
1408
|
}
|
|
1323
|
-
class
|
|
1409
|
+
class ue extends v {
|
|
1324
1410
|
constructor({
|
|
1325
1411
|
barHeight: e = 2,
|
|
1326
1412
|
//
|
|
1327
1413
|
barRadius: t = 0.05,
|
|
1328
|
-
spikeHeight:
|
|
1329
|
-
spikeRadius:
|
|
1330
|
-
spikeScaleZ:
|
|
1414
|
+
spikeHeight: n = 0.3,
|
|
1415
|
+
spikeRadius: a = 0.075,
|
|
1416
|
+
spikeScaleZ: c = 1,
|
|
1331
1417
|
radialSegments: s = 8
|
|
1332
1418
|
} = {}) {
|
|
1333
1419
|
super();
|
|
1334
|
-
const r = new
|
|
1420
|
+
const r = new S(t, t, e, s);
|
|
1335
1421
|
r.translate(0, e / 2, 0);
|
|
1336
|
-
const
|
|
1337
|
-
|
|
1422
|
+
const i = new z(a, n, s);
|
|
1423
|
+
i.translate(0, e + n / 2, 0), i.scale(1, 1, c), this.copy(A([r, i], !1));
|
|
1338
1424
|
}
|
|
1339
1425
|
}
|
|
1340
|
-
class
|
|
1426
|
+
class pt extends v {
|
|
1341
1427
|
constructor({
|
|
1342
1428
|
count: e = 20,
|
|
1343
1429
|
//
|
|
1344
1430
|
spacing: t = 0.4,
|
|
1345
|
-
barHeight:
|
|
1346
|
-
barRadius:
|
|
1347
|
-
spikeHeight:
|
|
1431
|
+
barHeight: n = 2,
|
|
1432
|
+
barRadius: a = 0.05,
|
|
1433
|
+
spikeHeight: c = 0.3,
|
|
1348
1434
|
spikeRadius: s = 0.075,
|
|
1349
1435
|
spikeScaleZ: r = 1,
|
|
1350
|
-
railHeight:
|
|
1351
|
-
railDepth:
|
|
1352
|
-
railOffset:
|
|
1353
|
-
radialSegments:
|
|
1436
|
+
railHeight: i = 0.1,
|
|
1437
|
+
railDepth: l = 0.05,
|
|
1438
|
+
railOffset: u = 0,
|
|
1439
|
+
radialSegments: m = 8
|
|
1354
1440
|
} = {}) {
|
|
1355
1441
|
super();
|
|
1356
|
-
const
|
|
1442
|
+
const h = [], d = new ue({ barHeight: n, barRadius: a, spikeHeight: c, spikeRadius: s, spikeScaleZ: r, radialSegments: m }), p = new g(e * t, i, l);
|
|
1357
1443
|
for (let I = 0; I < e; I++) {
|
|
1358
|
-
const
|
|
1359
|
-
|
|
1444
|
+
const G = d.clone();
|
|
1445
|
+
G.translate(I * t, 0, 0), h.push(G);
|
|
1360
1446
|
}
|
|
1361
1447
|
const x = p.clone();
|
|
1362
|
-
x.translate(t * (e - 1) / 2,
|
|
1448
|
+
x.translate(t * (e - 1) / 2, n - u - i / 2, 0), h.push(x);
|
|
1363
1449
|
const y = p.clone();
|
|
1364
|
-
y.translate(t * (e - 1) / 2,
|
|
1450
|
+
y.translate(t * (e - 1) / 2, i / 2, 0), h.push(y), this.copy(A(h));
|
|
1365
1451
|
}
|
|
1366
1452
|
}
|
|
1367
|
-
class
|
|
1453
|
+
class dt extends v {
|
|
1368
1454
|
constructor({
|
|
1369
1455
|
width: e = 5,
|
|
1370
1456
|
//
|
|
1371
1457
|
height: t = 8,
|
|
1372
|
-
depth:
|
|
1373
|
-
shelves:
|
|
1374
|
-
frameThickness:
|
|
1458
|
+
depth: n = 1,
|
|
1459
|
+
shelves: a = 4,
|
|
1460
|
+
frameThickness: c = 0.1,
|
|
1461
|
+
open: s = !1
|
|
1375
1462
|
} = {}) {
|
|
1376
1463
|
super();
|
|
1377
|
-
const
|
|
1378
|
-
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1381
|
-
const d = m.clone();
|
|
1382
|
-
d.translate(0, s - a / 2, 0);
|
|
1464
|
+
const r = t, i = e, l = n, u = new g(c, r, l), m = new g(i - 2 * c, c, l), h = u.clone();
|
|
1465
|
+
h.translate(-i / 2 + c / 2, r / 2, 0);
|
|
1466
|
+
const d = u.clone();
|
|
1467
|
+
d.translate(i / 2 - c / 2, r / 2, 0);
|
|
1383
1468
|
const p = m.clone();
|
|
1384
|
-
p.translate(0,
|
|
1385
|
-
const x =
|
|
1386
|
-
x.translate(0,
|
|
1387
|
-
const y =
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1469
|
+
p.translate(0, r - c / 2, 0);
|
|
1470
|
+
const x = m.clone();
|
|
1471
|
+
x.translate(0, c / 2, 0);
|
|
1472
|
+
const y = new g(i, r, c);
|
|
1473
|
+
y.translate(0, r / 2, -l / 2 + c / 2);
|
|
1474
|
+
const I = [], G = (r - c) / (a + 1);
|
|
1475
|
+
for (let B = 1; B <= a; B++) {
|
|
1476
|
+
const C = m.clone();
|
|
1477
|
+
C.translate(0, c / 2 + B * G, 0), I.push(C);
|
|
1391
1478
|
}
|
|
1392
|
-
this.copy(A([
|
|
1479
|
+
this.copy(A([
|
|
1480
|
+
h,
|
|
1481
|
+
//
|
|
1482
|
+
d,
|
|
1483
|
+
p,
|
|
1484
|
+
x,
|
|
1485
|
+
...s ? [] : [y],
|
|
1486
|
+
...I
|
|
1487
|
+
], !1));
|
|
1393
1488
|
}
|
|
1394
1489
|
}
|
|
1395
|
-
class
|
|
1490
|
+
class oo extends v {
|
|
1396
1491
|
constructor(e = 0.1) {
|
|
1397
1492
|
super();
|
|
1398
|
-
const t = [],
|
|
1493
|
+
const t = [], n = [], a = [
|
|
1399
1494
|
[0, 1],
|
|
1400
1495
|
// Top point
|
|
1401
1496
|
[0.5, 0.75],
|
|
@@ -1413,57 +1508,57 @@ class wt extends v {
|
|
|
1413
1508
|
[-0.5, 0.75]
|
|
1414
1509
|
// Left upper middle
|
|
1415
1510
|
];
|
|
1416
|
-
for (let s = 0; s <
|
|
1417
|
-
const [r,
|
|
1418
|
-
t.push(r * e,
|
|
1511
|
+
for (let s = 0; s < a.length; s++) {
|
|
1512
|
+
const [r, i] = a[s];
|
|
1513
|
+
t.push(r * e, i * e, 0);
|
|
1419
1514
|
}
|
|
1420
|
-
for (let s = 1; s <
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
const
|
|
1424
|
-
this.setAttribute("position",
|
|
1515
|
+
for (let s = 1; s < a.length - 1; s++)
|
|
1516
|
+
n.push(0, s, s + 1);
|
|
1517
|
+
n.push(0, a.length - 1, 1);
|
|
1518
|
+
const c = new F(t, 3);
|
|
1519
|
+
this.setAttribute("position", c), this.setIndex(n), this.computeVertexNormals();
|
|
1425
1520
|
}
|
|
1426
1521
|
}
|
|
1427
|
-
function
|
|
1428
|
-
|
|
1429
|
-
const
|
|
1430
|
-
for (let
|
|
1431
|
-
const s = new M().fromBufferAttribute(
|
|
1432
|
-
s.add(
|
|
1522
|
+
function wt(o, e = U.XYZ, t = 0.5, n = 2) {
|
|
1523
|
+
o.deleteAttribute("uv"), o.deleteAttribute("normal"), o = Ae(o), o.computeVertexNormals();
|
|
1524
|
+
const a = o.getAttribute("position");
|
|
1525
|
+
for (let c = 0; c < a.count; c++) {
|
|
1526
|
+
const s = new M().fromBufferAttribute(a, c), r = Math.random() * (n - t) + t, i = e.clone().multiplyScalar(r);
|
|
1527
|
+
s.add(i), a.setXYZ(c, s.x, s.y, s.z);
|
|
1433
1528
|
}
|
|
1434
|
-
return
|
|
1529
|
+
return a.needsUpdate = !0, o.computeVertexNormals(), o;
|
|
1435
1530
|
}
|
|
1436
|
-
class
|
|
1437
|
-
constructor(e = 1, t = 4,
|
|
1531
|
+
class yt extends v {
|
|
1532
|
+
constructor(e = 1, t = 4, n = 4) {
|
|
1438
1533
|
super();
|
|
1439
|
-
const
|
|
1440
|
-
this.copy(
|
|
1534
|
+
const a = new T(e, t, n);
|
|
1535
|
+
this.copy(wt(a, U.XYZ, 0.5, 1)), this.computeVertexNormals(), this.center();
|
|
1441
1536
|
}
|
|
1442
1537
|
}
|
|
1443
|
-
class
|
|
1444
|
-
constructor(e = 0.1, t = 0.1,
|
|
1538
|
+
class xt extends v {
|
|
1539
|
+
constructor(e = 0.1, t = 0.1, n = 0.4, a = 8) {
|
|
1445
1540
|
super();
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1448
|
-
const s = new
|
|
1449
|
-
r.translate(0,
|
|
1541
|
+
const c = new S(e * 0.6, t * 0.6, n, a);
|
|
1542
|
+
c.translate(0, 0, 0);
|
|
1543
|
+
const s = new T(e, a, a), r = s.clone(), i = s.clone(), l = s.clone(), u = s.clone();
|
|
1544
|
+
r.translate(0, n / 2 + e * 0.6, -e * 0.6), i.translate(0, n / 2 + e * 0.6, e * 0.6), l.translate(0, -n / 2 - t * 0.6, -t * 0.6), u.translate(0, -n / 2 - t * 0.6, t * 0.6), this.copy(A([c, r, i, l, u], !1));
|
|
1450
1545
|
}
|
|
1451
1546
|
}
|
|
1452
|
-
class
|
|
1547
|
+
class Mt extends v {
|
|
1453
1548
|
constructor() {
|
|
1454
1549
|
super();
|
|
1455
|
-
const e = new
|
|
1550
|
+
const e = new T(1, 16, 16), t = new S(0.2, 0.2, 2, 16, 1, !0);
|
|
1456
1551
|
t.translate(0, 1.5, 0), t.rotateX(Math.PI / 2), this.copy(A([e, t], !1));
|
|
1457
1552
|
}
|
|
1458
1553
|
}
|
|
1459
|
-
class
|
|
1554
|
+
class vt extends v {
|
|
1460
1555
|
constructor({
|
|
1461
1556
|
flaskRadius: e = 1,
|
|
1462
1557
|
//
|
|
1463
1558
|
neckRadius: t = 0.3,
|
|
1464
|
-
height:
|
|
1465
|
-
neckHeight:
|
|
1466
|
-
radialSegments:
|
|
1559
|
+
height: n = 2.5,
|
|
1560
|
+
neckHeight: a = 1,
|
|
1561
|
+
radialSegments: c = 16
|
|
1467
1562
|
} = {}) {
|
|
1468
1563
|
super();
|
|
1469
1564
|
const s = [
|
|
@@ -1473,17 +1568,17 @@ class Le extends v {
|
|
|
1473
1568
|
// Flat base with minimum width
|
|
1474
1569
|
new b(e, 0.1),
|
|
1475
1570
|
// End of the rounded base
|
|
1476
|
-
new b(t,
|
|
1571
|
+
new b(t, n),
|
|
1477
1572
|
// Start of the straight neck
|
|
1478
|
-
new b(t,
|
|
1573
|
+
new b(t, n + a),
|
|
1479
1574
|
// End of the straight neck
|
|
1480
|
-
new b(t * 1.1,
|
|
1575
|
+
new b(t * 1.1, n + a + 0.3)
|
|
1481
1576
|
// Slight outward lip at the top
|
|
1482
|
-
], r = new
|
|
1577
|
+
], r = new q(s, c);
|
|
1483
1578
|
this.copy(A([r], !1));
|
|
1484
1579
|
}
|
|
1485
1580
|
}
|
|
1486
|
-
class
|
|
1581
|
+
class gt extends v {
|
|
1487
1582
|
constructor() {
|
|
1488
1583
|
super();
|
|
1489
1584
|
const e = [
|
|
@@ -1497,107 +1592,114 @@ class qe extends v {
|
|
|
1497
1592
|
// Flared edge
|
|
1498
1593
|
new b(0.8, 1.8)
|
|
1499
1594
|
// Lip of the bowl
|
|
1500
|
-
], t = new
|
|
1501
|
-
|
|
1595
|
+
], t = new q(e, 12), n = new we(1, 12);
|
|
1596
|
+
n.rotateX(-Math.PI / 2), n.translate(0, 0, 0), this.copy(A([t, n], !1));
|
|
1502
1597
|
}
|
|
1503
1598
|
}
|
|
1504
|
-
class
|
|
1599
|
+
class bt extends v {
|
|
1505
1600
|
constructor({
|
|
1506
1601
|
radius: e = 0.3,
|
|
1507
1602
|
//
|
|
1508
1603
|
height: t = 0.4,
|
|
1509
|
-
count:
|
|
1510
|
-
thickness:
|
|
1511
|
-
radialSegments:
|
|
1604
|
+
count: n = 3,
|
|
1605
|
+
thickness: a = 0.03,
|
|
1606
|
+
radialSegments: c = 16
|
|
1512
1607
|
} = {}) {
|
|
1513
1608
|
super();
|
|
1514
|
-
const s = new
|
|
1609
|
+
const s = new se(e, a, 8, c);
|
|
1515
1610
|
s.rotateX(Math.PI / 2), s.translate(0, t, 0);
|
|
1516
|
-
const r = new
|
|
1517
|
-
for (let
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1611
|
+
const r = new S(a * 0.6, a * 0.6, t, c), i = [];
|
|
1612
|
+
for (let l = 0; l < n; l++) {
|
|
1613
|
+
const u = l / n * Math.PI * 2, m = r.clone();
|
|
1614
|
+
m.translate(Math.cos(u) * e, t / 2, Math.sin(u) * e), i.push(m);
|
|
1520
1615
|
}
|
|
1521
|
-
this.copy(A([s, ...
|
|
1616
|
+
this.copy(A([s, ...i], !1));
|
|
1522
1617
|
}
|
|
1523
1618
|
}
|
|
1524
|
-
class
|
|
1525
|
-
constructor(e = 0.2, t = 0.2,
|
|
1619
|
+
class H extends v {
|
|
1620
|
+
constructor(e = 0.2, t = 0.2, n = 3, a = 32, c = !0) {
|
|
1526
1621
|
super();
|
|
1527
|
-
const s = new
|
|
1528
|
-
r.translate(0, -(
|
|
1622
|
+
const s = new S(e, t, n, a, 1, c), r = new T(t, a, a / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
|
|
1623
|
+
r.translate(0, -(n / 2), 0), this.copy(A([s, r], !1));
|
|
1529
1624
|
}
|
|
1530
1625
|
}
|
|
1531
|
-
class
|
|
1532
|
-
constructor({ radius: e = 0.5, neckRadius: t = 0.2, height:
|
|
1626
|
+
class St extends v {
|
|
1627
|
+
constructor({ radius: e = 0.5, neckRadius: t = 0.2, height: n = 3, neckHeight: a = 1, segments: c = 16 } = {}) {
|
|
1533
1628
|
super();
|
|
1534
|
-
const s =
|
|
1629
|
+
const s = n - a, r = new S(e, e, s, c);
|
|
1535
1630
|
r.translate(0, s / 2, 0);
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1631
|
+
const i = 0.3, l = new S(t, e, i, c);
|
|
1632
|
+
l.translate(0, s + i / 2, 0);
|
|
1633
|
+
const u = new S(t, t, a, c);
|
|
1634
|
+
u.translate(0, s + i + a / 2, 0), this.copy(A([r, l, u], !1));
|
|
1540
1635
|
}
|
|
1541
1636
|
}
|
|
1542
|
-
class
|
|
1637
|
+
class It extends v {
|
|
1543
1638
|
constructor({
|
|
1544
1639
|
radius: e = 3,
|
|
1545
1640
|
//
|
|
1546
1641
|
height: t = 0.6,
|
|
1547
|
-
widthSegments:
|
|
1548
|
-
heightSegments:
|
|
1549
|
-
phiStart:
|
|
1642
|
+
widthSegments: n = 64,
|
|
1643
|
+
heightSegments: a = 16,
|
|
1644
|
+
phiStart: c = 0,
|
|
1550
1645
|
phiLength: s = Math.PI * 2
|
|
1551
1646
|
} = {}) {
|
|
1552
|
-
super(), this.copy(new
|
|
1647
|
+
super(), this.copy(new T(e, n, a, c, s, 0, Math.PI / 2)), this.scale(1, t / e, 1);
|
|
1553
1648
|
}
|
|
1554
1649
|
}
|
|
1555
|
-
const
|
|
1556
|
-
|
|
1650
|
+
const no = (o, e) => o / (1 - Math.cos(e)), me = (o, e) => o / (2 * Math.sin(e)), Gt = (o, e) => o * (1 - Math.cos(e)), so = (o, e) => 2 * o * Math.sin(e), ao = (o, e, t) => ({
|
|
1651
|
+
x: o * Math.sin(t) * Math.cos(e),
|
|
1652
|
+
y: o * Math.sin(t) * Math.sin(e),
|
|
1653
|
+
z: o * Math.cos(t)
|
|
1654
|
+
}), ro = (o, e, t) => {
|
|
1655
|
+
const n = Math.sqrt(o * o + e * e + t * t), a = Math.atan2(e, o), c = Math.acos(t / n);
|
|
1656
|
+
return { radius: n, theta: a, phi: c };
|
|
1657
|
+
};
|
|
1658
|
+
class Pt extends v {
|
|
1557
1659
|
constructor({
|
|
1558
|
-
radius: e =
|
|
1660
|
+
radius: e = me(5, Math.PI / 10),
|
|
1559
1661
|
//
|
|
1560
1662
|
widthSegments: t = 64,
|
|
1561
|
-
heightSegments:
|
|
1562
|
-
phiStart:
|
|
1563
|
-
phiLength:
|
|
1663
|
+
heightSegments: n = 32,
|
|
1664
|
+
phiStart: a = 0,
|
|
1665
|
+
phiLength: c = Math.PI * 2,
|
|
1564
1666
|
thetaLength: s = Math.PI / 10
|
|
1565
1667
|
} = {}) {
|
|
1566
|
-
super(), this.copy(new
|
|
1567
|
-
const r =
|
|
1668
|
+
super(), this.copy(new T(e, t, n, a, c, 0, s));
|
|
1669
|
+
const r = Gt(e, s);
|
|
1568
1670
|
this.translate(0, -e + r, 0);
|
|
1569
1671
|
}
|
|
1570
1672
|
}
|
|
1571
|
-
class
|
|
1673
|
+
class At extends v {
|
|
1572
1674
|
constructor({
|
|
1573
1675
|
trunkRadiusTop: e = 0.25,
|
|
1574
1676
|
trunkRadiusBottom: t = 0.4,
|
|
1575
|
-
trunkHeight:
|
|
1576
|
-
trunkSegments:
|
|
1577
|
-
leafSize:
|
|
1677
|
+
trunkHeight: n = 2.5,
|
|
1678
|
+
trunkSegments: a = 14,
|
|
1679
|
+
leafSize: c = 0.8,
|
|
1578
1680
|
leafCount: s = 6,
|
|
1579
1681
|
leafDetail: r = 0,
|
|
1580
|
-
leafSpreadRadius:
|
|
1682
|
+
leafSpreadRadius: i = 1.5
|
|
1581
1683
|
} = {}) {
|
|
1582
1684
|
super();
|
|
1583
|
-
const
|
|
1584
|
-
|
|
1585
|
-
const
|
|
1586
|
-
for (let
|
|
1587
|
-
const
|
|
1588
|
-
|
|
1589
|
-
(Math.random() - 0.5) *
|
|
1590
|
-
(Math.random() - 0.5) *
|
|
1591
|
-
(Math.random() - 0.5) *
|
|
1592
|
-
),
|
|
1685
|
+
const l = new S(e, t, n, a);
|
|
1686
|
+
l.translate(0, n / 2, 0);
|
|
1687
|
+
const u = [];
|
|
1688
|
+
for (let m = 0; m < s; m++) {
|
|
1689
|
+
const h = new j(c, r);
|
|
1690
|
+
h.translate(
|
|
1691
|
+
(Math.random() - 0.5) * i,
|
|
1692
|
+
(Math.random() - 0.5) * c + n,
|
|
1693
|
+
(Math.random() - 0.5) * i
|
|
1694
|
+
), u.push(h);
|
|
1593
1695
|
}
|
|
1594
|
-
this.copy(A([
|
|
1696
|
+
this.copy(A([l.toNonIndexed(), A(u, !1)], !0)), this.computeVertexNormals();
|
|
1595
1697
|
}
|
|
1596
1698
|
}
|
|
1597
|
-
class
|
|
1699
|
+
class co extends P {
|
|
1598
1700
|
constructor() {
|
|
1599
1701
|
super();
|
|
1600
|
-
const e = new
|
|
1702
|
+
const e = new T(5, 32, 32), t = new K({
|
|
1601
1703
|
uniforms: {
|
|
1602
1704
|
time: { value: 0 }
|
|
1603
1705
|
},
|
|
@@ -1640,170 +1742,171 @@ class Mt extends P {
|
|
|
1640
1742
|
gl_FragColor = vec4(color, 1.0);
|
|
1641
1743
|
}
|
|
1642
1744
|
`
|
|
1643
|
-
}),
|
|
1644
|
-
this.add(
|
|
1745
|
+
}), n = new f(e, t);
|
|
1746
|
+
this.add(n);
|
|
1645
1747
|
}
|
|
1646
1748
|
}
|
|
1647
|
-
class
|
|
1749
|
+
class io extends f {
|
|
1648
1750
|
constructor({
|
|
1649
1751
|
width: e = 1,
|
|
1650
1752
|
height: t = 1.5,
|
|
1651
|
-
depth:
|
|
1652
|
-
coverThickness:
|
|
1653
|
-
pageIndent:
|
|
1753
|
+
depth: n = 0.5,
|
|
1754
|
+
coverThickness: a = 0.05,
|
|
1755
|
+
pageIndent: c = 0.05,
|
|
1654
1756
|
coverColor: s = 9109504,
|
|
1655
1757
|
pageColor: r = 16777215
|
|
1656
1758
|
} = {}) {
|
|
1657
|
-
super(), this.geometry = new
|
|
1759
|
+
super(), this.geometry = new ce(e, t, n, a, c), this.material = [
|
|
1658
1760
|
new w({ color: s, metalness: 0.1, roughness: 0.7, flatShading: !0 }),
|
|
1659
1761
|
new w({ color: r, flatShading: !0 })
|
|
1660
1762
|
];
|
|
1661
1763
|
}
|
|
1662
1764
|
}
|
|
1663
|
-
class
|
|
1664
|
-
constructor(e = 0.4, t = 1.2,
|
|
1665
|
-
super(), this.geometry = new
|
|
1765
|
+
class lo extends f {
|
|
1766
|
+
constructor(e = 0.4, t = 1.2, n = 0.2) {
|
|
1767
|
+
super(), this.geometry = new lt(e, t, n), this.material = new w({ color: 7829367, roughness: 0.8 });
|
|
1666
1768
|
}
|
|
1667
1769
|
}
|
|
1668
|
-
class
|
|
1770
|
+
class uo extends P {
|
|
1669
1771
|
constructor() {
|
|
1670
1772
|
super();
|
|
1671
|
-
const e = new g(5, 1, 5), t = new w({ color: 8421504, flatShading: !0 }),
|
|
1672
|
-
|
|
1673
|
-
const
|
|
1773
|
+
const e = new g(5, 1, 5), t = new w({ color: 8421504, flatShading: !0 }), n = new f(e, t);
|
|
1774
|
+
n.position.set(0, 0.5, 0), this.add(n);
|
|
1775
|
+
const a = new g(4, 3, 4), c = new w({ color: 6908265, flatShading: !0 }), s = new f(a, c);
|
|
1674
1776
|
s.position.set(0, 2.5, 0), this.add(s);
|
|
1675
|
-
const r = new
|
|
1676
|
-
|
|
1677
|
-
const
|
|
1777
|
+
const r = new z(3.5, 2, 4), i = new w({ color: 5263440, flatShading: !0 }), l = new f(r, i);
|
|
1778
|
+
l.rotation.y = Math.PI / 4, l.position.set(0, 5, 0), this.add(l);
|
|
1779
|
+
const u = new S(0.2, 0.2, 3.5, 16), m = new w({ color: 6908265, flatShading: !0 });
|
|
1678
1780
|
[
|
|
1679
1781
|
[-1.8, 2.3, -2.2],
|
|
1680
1782
|
[1.8, 2.3, -2.2],
|
|
1681
1783
|
[-1.8, 2.3, 2.2],
|
|
1682
1784
|
[1.8, 2.3, 2.2]
|
|
1683
|
-
].forEach((
|
|
1684
|
-
const
|
|
1685
|
-
|
|
1785
|
+
].forEach((G) => {
|
|
1786
|
+
const B = new f(u, m);
|
|
1787
|
+
B.position.set(...G), this.add(B);
|
|
1686
1788
|
});
|
|
1687
|
-
const d = new
|
|
1789
|
+
const d = new L();
|
|
1688
1790
|
d.moveTo(-1, 0), d.lineTo(-1, 2), d.absarc(0, 2, 1, Math.PI, 0, !0), d.lineTo(1, 0);
|
|
1689
1791
|
const p = {
|
|
1690
1792
|
depth: 0.5,
|
|
1691
1793
|
bevelEnabled: !1
|
|
1692
|
-
}, x = new
|
|
1794
|
+
}, x = new V(d, p), y = new w({ color: 4210752, flatShading: !0 }), I = new f(x, y);
|
|
1693
1795
|
I.position.set(0, 0.5, 1.7), this.add(I);
|
|
1694
1796
|
}
|
|
1695
1797
|
}
|
|
1696
|
-
class
|
|
1798
|
+
class mo extends f {
|
|
1697
1799
|
constructor(e = 1.75, t = 0.75) {
|
|
1698
|
-
super(), this.geometry = new
|
|
1800
|
+
super(), this.geometry = new ut(e, t), this.material = new w({ color: 7829367, roughness: 0.8 });
|
|
1699
1801
|
}
|
|
1700
1802
|
}
|
|
1701
|
-
class
|
|
1702
|
-
constructor(e = 0.6, t = 1,
|
|
1703
|
-
super(), this.geometry = new
|
|
1803
|
+
class ho extends f {
|
|
1804
|
+
constructor(e = 0.6, t = 1, n = 0.2, a = 0.6) {
|
|
1805
|
+
super(), this.geometry = new mt(e, t, n, a), this.material = new w({ color: 7829367, roughness: 0.8 });
|
|
1704
1806
|
}
|
|
1705
1807
|
}
|
|
1706
|
-
class
|
|
1707
|
-
constructor(e = 0.5, t = 0.8,
|
|
1708
|
-
super(), this.geometry = new
|
|
1808
|
+
class fo extends f {
|
|
1809
|
+
constructor(e = 0.5, t = 0.8, n = 0.15) {
|
|
1810
|
+
super(), this.geometry = new ht(e, t, n), this.material = new w({ color: 7829367, roughness: 0.8 });
|
|
1709
1811
|
}
|
|
1710
1812
|
}
|
|
1711
|
-
class
|
|
1813
|
+
class po extends f {
|
|
1712
1814
|
constructor({ height: e = 2.25 } = {}) {
|
|
1713
|
-
super(), this.geometry = new
|
|
1815
|
+
super(), this.geometry = new ft({ height: e }), this.material = new w({ color: 9141627, flatShading: !0 });
|
|
1714
1816
|
}
|
|
1715
1817
|
}
|
|
1716
|
-
class
|
|
1818
|
+
class wo extends f {
|
|
1717
1819
|
constructor({
|
|
1718
1820
|
barHeight: e = 2,
|
|
1719
1821
|
//
|
|
1720
1822
|
barRadius: t = 0.05,
|
|
1721
|
-
spikeHeight:
|
|
1722
|
-
spikeRadius:
|
|
1723
|
-
spikeScaleZ:
|
|
1823
|
+
spikeHeight: n = 0.3,
|
|
1824
|
+
spikeRadius: a = 0.075,
|
|
1825
|
+
spikeScaleZ: c = 1,
|
|
1724
1826
|
radialSegments: s = 8
|
|
1725
1827
|
} = {}) {
|
|
1726
|
-
super(), this.geometry = new
|
|
1828
|
+
super(), this.geometry = new ue({
|
|
1727
1829
|
barHeight: e,
|
|
1728
1830
|
barRadius: t,
|
|
1729
|
-
spikeHeight:
|
|
1730
|
-
spikeRadius:
|
|
1731
|
-
spikeScaleZ:
|
|
1831
|
+
spikeHeight: n,
|
|
1832
|
+
spikeRadius: a,
|
|
1833
|
+
spikeScaleZ: c,
|
|
1732
1834
|
radialSegments: s
|
|
1733
1835
|
}), this.material = new w({ color: 3355443, metalness: 0.8, roughness: 0.4 });
|
|
1734
1836
|
}
|
|
1735
1837
|
}
|
|
1736
|
-
class
|
|
1838
|
+
class yo extends f {
|
|
1737
1839
|
constructor({
|
|
1738
1840
|
count: e = 20,
|
|
1739
1841
|
//
|
|
1740
1842
|
spacing: t = 0.4,
|
|
1741
|
-
barHeight:
|
|
1742
|
-
barRadius:
|
|
1743
|
-
spikeHeight:
|
|
1843
|
+
barHeight: n = 2,
|
|
1844
|
+
barRadius: a = 0.05,
|
|
1845
|
+
spikeHeight: c = 0.3,
|
|
1744
1846
|
spikeRadius: s = 0.075,
|
|
1745
1847
|
spikeScaleZ: r = 1,
|
|
1746
|
-
railHeight:
|
|
1747
|
-
railDepth:
|
|
1748
|
-
railOffset:
|
|
1749
|
-
radialSegments:
|
|
1848
|
+
railHeight: i = 0.1,
|
|
1849
|
+
railDepth: l = 0.05,
|
|
1850
|
+
railOffset: u = 0,
|
|
1851
|
+
radialSegments: m = 8
|
|
1750
1852
|
} = {}) {
|
|
1751
|
-
super(), this.geometry = new
|
|
1853
|
+
super(), this.geometry = new pt({
|
|
1752
1854
|
count: e,
|
|
1753
1855
|
spacing: t,
|
|
1754
|
-
barHeight:
|
|
1755
|
-
barRadius:
|
|
1756
|
-
spikeHeight:
|
|
1856
|
+
barHeight: n,
|
|
1857
|
+
barRadius: a,
|
|
1858
|
+
spikeHeight: c,
|
|
1757
1859
|
spikeRadius: s,
|
|
1758
1860
|
spikeScaleZ: r,
|
|
1759
|
-
railHeight:
|
|
1760
|
-
railDepth:
|
|
1761
|
-
railOffset:
|
|
1762
|
-
radialSegments:
|
|
1861
|
+
railHeight: i,
|
|
1862
|
+
railDepth: l,
|
|
1863
|
+
railOffset: u,
|
|
1864
|
+
radialSegments: m
|
|
1763
1865
|
}), this.material = new w({ color: 3355443, metalness: 0.8, roughness: 0.4 });
|
|
1764
1866
|
}
|
|
1765
1867
|
}
|
|
1766
|
-
class
|
|
1868
|
+
class xo extends f {
|
|
1767
1869
|
constructor({
|
|
1768
1870
|
width: e = 5,
|
|
1769
1871
|
//
|
|
1770
1872
|
height: t = 8,
|
|
1771
|
-
depth:
|
|
1772
|
-
shelves:
|
|
1773
|
-
frameThickness:
|
|
1873
|
+
depth: n = 1,
|
|
1874
|
+
shelves: a = 4,
|
|
1875
|
+
frameThickness: c = 0.1,
|
|
1876
|
+
open: s = !1
|
|
1774
1877
|
} = {}) {
|
|
1775
|
-
super(), this.geometry = new
|
|
1878
|
+
super(), this.geometry = new dt({ width: e, height: t, depth: n, shelves: a, frameThickness: c, open: s }), this.material = new w({ color: 9127187 });
|
|
1776
1879
|
}
|
|
1777
1880
|
}
|
|
1778
|
-
class
|
|
1881
|
+
class Mo extends P {
|
|
1779
1882
|
constructor() {
|
|
1780
1883
|
super();
|
|
1781
|
-
const e = new g(5, 0.3, 3), t = new w({ color: 9132587 }),
|
|
1782
|
-
|
|
1783
|
-
const
|
|
1784
|
-
|
|
1785
|
-
const
|
|
1884
|
+
const e = new g(5, 0.3, 3), t = new w({ color: 9132587 }), n = new f(e, t);
|
|
1885
|
+
n.position.set(0, 3.15, 0);
|
|
1886
|
+
const a = [];
|
|
1887
|
+
a.push(new b(0.2, 0)), a.push(new b(0.25, 0.5)), a.push(new b(0.15, 1.5)), a.push(new b(0.3, 3));
|
|
1888
|
+
const c = new q(a, 32), s = new w({ color: 4929057 });
|
|
1786
1889
|
[
|
|
1787
1890
|
[2.2, 0, 1.2],
|
|
1788
1891
|
// Adjust Y to 0 so legs start at ground level
|
|
1789
1892
|
[-2.2, 0, 1.2],
|
|
1790
1893
|
[2.2, 0, -1.2],
|
|
1791
1894
|
[-2.2, 0, -1.2]
|
|
1792
|
-
].forEach((
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1795
|
-
}), this.add(
|
|
1895
|
+
].forEach((i) => {
|
|
1896
|
+
const l = new f(c, s);
|
|
1897
|
+
l.position.set(...i), this.add(l);
|
|
1898
|
+
}), this.add(n);
|
|
1796
1899
|
}
|
|
1797
1900
|
}
|
|
1798
|
-
class
|
|
1901
|
+
class vo extends P {
|
|
1799
1902
|
constructor(e = 1, t = 0.2) {
|
|
1800
1903
|
super(), this.height = e, this.radius = t, this.createCandle(), this.animateFlicker();
|
|
1801
1904
|
}
|
|
1802
1905
|
createCandle() {
|
|
1803
|
-
const e = new
|
|
1804
|
-
this.candle = new
|
|
1805
|
-
const
|
|
1806
|
-
this.flame = new
|
|
1906
|
+
const e = new S(this.radius, this.radius, this.height, 32), t = new w({ color: 16777215 });
|
|
1907
|
+
this.candle = new f(e, t), this.candle.position.set(0, this.height / 2, 0), this.add(this.candle);
|
|
1908
|
+
const n = new T(0.05, 16, 16), a = new ye({ color: 16753920 });
|
|
1909
|
+
this.flame = new f(n, a), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new ae(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight);
|
|
1807
1910
|
}
|
|
1808
1911
|
animateFlicker() {
|
|
1809
1912
|
const e = () => {
|
|
@@ -1812,52 +1915,52 @@ class Et extends P {
|
|
|
1812
1915
|
e();
|
|
1813
1916
|
}
|
|
1814
1917
|
}
|
|
1815
|
-
class
|
|
1918
|
+
class go extends P {
|
|
1816
1919
|
constructor(e = 1.3, t = 0.5) {
|
|
1817
1920
|
super();
|
|
1818
|
-
const
|
|
1819
|
-
|
|
1820
|
-
const s = new
|
|
1821
|
-
|
|
1822
|
-
const
|
|
1823
|
-
|
|
1824
|
-
const
|
|
1921
|
+
const n = new S(t, t, 0.2, 16), a = new w({ color: 9127187, flatShading: !0 }), c = new f(n, a);
|
|
1922
|
+
c.position.set(0, 0, 0), this.add(c);
|
|
1923
|
+
const s = new S(t * 0.9, t * 0.9, e), r = new w({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), i = new f(s, r);
|
|
1924
|
+
i.position.set(0, e / 2 + 0.1, 0), this.add(i);
|
|
1925
|
+
const l = new z(t * 1.1, 0.5, 8), u = new w({ color: 9127187, flatShading: !0 }), m = new f(l, u);
|
|
1926
|
+
m.position.set(0, e + 0.35, 0), this.add(m);
|
|
1927
|
+
const h = new se(t * 0.8, 0.05, 8, 16), d = new w({ color: 9127187, flatShading: !0 }), p = new f(h, d);
|
|
1825
1928
|
p.position.set(0, e + 0.85, 0), this.add(p);
|
|
1826
|
-
const x = new
|
|
1929
|
+
const x = new ae(16755200, 1.5, 15);
|
|
1827
1930
|
x.position.set(0, e / 2 + 0.1, 0), x.castShadow = !0, this.add(x);
|
|
1828
1931
|
}
|
|
1829
1932
|
}
|
|
1830
|
-
class
|
|
1933
|
+
class bo extends P {
|
|
1831
1934
|
constructor() {
|
|
1832
1935
|
super();
|
|
1833
|
-
const e = new j(1, 0), t = new w({ color: 8421504, flatShading: !0 }),
|
|
1834
|
-
for (let
|
|
1835
|
-
const
|
|
1836
|
-
|
|
1837
|
-
const s = new
|
|
1838
|
-
s.scale.set(
|
|
1936
|
+
const e = new j(1, 0), t = new w({ color: 8421504, flatShading: !0 }), n = new w({ color: 4950843, flatShading: !0, opacity: 0.8, transparent: !0 });
|
|
1937
|
+
for (let a = 0; a < 5; a++) {
|
|
1938
|
+
const c = new f(e, t);
|
|
1939
|
+
c.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), c.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), c.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(c);
|
|
1940
|
+
const s = new f(e, n);
|
|
1941
|
+
s.scale.set(c.scale.x * 0.9, c.scale.y * 0.5, c.scale.z * 0.9), s.rotation.copy(c.rotation), s.position.copy(c.position), s.position.y += 0.3, this.add(s);
|
|
1839
1942
|
}
|
|
1840
1943
|
}
|
|
1841
1944
|
}
|
|
1842
|
-
class
|
|
1843
|
-
constructor(e = 1, t = 4,
|
|
1844
|
-
super(), this.geometry = new
|
|
1945
|
+
class So extends f {
|
|
1946
|
+
constructor(e = 1, t = 4, n = 4) {
|
|
1947
|
+
super(), this.geometry = new yt(e, t, n), this.material = new w({ color: 8421504, flatShading: !0 });
|
|
1845
1948
|
}
|
|
1846
1949
|
}
|
|
1847
|
-
class
|
|
1950
|
+
class Io extends P {
|
|
1848
1951
|
constructor() {
|
|
1849
1952
|
super();
|
|
1850
1953
|
const e = new j(1, 0), t = new w({ color: 8421504, flatShading: !0 });
|
|
1851
|
-
for (let
|
|
1852
|
-
const
|
|
1853
|
-
|
|
1954
|
+
for (let n = 0; n < 5; n++) {
|
|
1955
|
+
const a = new f(e, t);
|
|
1956
|
+
a.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), a.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), a.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(a);
|
|
1854
1957
|
}
|
|
1855
1958
|
}
|
|
1856
1959
|
}
|
|
1857
|
-
class
|
|
1960
|
+
class Go extends P {
|
|
1858
1961
|
constructor() {
|
|
1859
1962
|
super();
|
|
1860
|
-
const e = new
|
|
1963
|
+
const e = new Mt(), t = new Y({
|
|
1861
1964
|
color: 8965375,
|
|
1862
1965
|
transparent: !0,
|
|
1863
1966
|
opacity: 0.4,
|
|
@@ -1865,12 +1968,12 @@ class zt extends P {
|
|
|
1865
1968
|
metalness: 0.1,
|
|
1866
1969
|
reflectivity: 0.8,
|
|
1867
1970
|
transmission: 0.9,
|
|
1868
|
-
side:
|
|
1869
|
-
}),
|
|
1870
|
-
|
|
1971
|
+
side: O
|
|
1972
|
+
}), n = new f(e, t);
|
|
1973
|
+
n.rotation.x = -Math.PI / 2, this.add(n);
|
|
1871
1974
|
}
|
|
1872
1975
|
}
|
|
1873
|
-
class
|
|
1976
|
+
class Po extends P {
|
|
1874
1977
|
constructor() {
|
|
1875
1978
|
super();
|
|
1876
1979
|
const e = [
|
|
@@ -1884,13 +1987,13 @@ class _t extends P {
|
|
|
1884
1987
|
// Neck
|
|
1885
1988
|
new b(0.6, 2.5)
|
|
1886
1989
|
// Mouth
|
|
1887
|
-
], t = new
|
|
1990
|
+
], t = new q(e, 10), n = new S(0.3, 0.4, 0.2, 8), a = new w({
|
|
1888
1991
|
color: 8965375,
|
|
1889
1992
|
transparent: !0,
|
|
1890
1993
|
opacity: 0.5,
|
|
1891
1994
|
roughness: 0.1,
|
|
1892
1995
|
metalness: 0.3
|
|
1893
|
-
}),
|
|
1996
|
+
}), c = new w({
|
|
1894
1997
|
color: 16724838,
|
|
1895
1998
|
// Vibrant potion color
|
|
1896
1999
|
transparent: !0,
|
|
@@ -1898,84 +2001,84 @@ class _t extends P {
|
|
|
1898
2001
|
}), s = new w({
|
|
1899
2002
|
color: 9127187,
|
|
1900
2003
|
roughness: 1
|
|
1901
|
-
}), r = new
|
|
1902
|
-
|
|
1903
|
-
const
|
|
1904
|
-
|
|
2004
|
+
}), r = new f(t, a), i = new f(t, c), l = new f(n, s);
|
|
2005
|
+
i.scale.set(0.8, 0.8, 0.8), i.position.y = 0.1, l.position.y = 2.5;
|
|
2006
|
+
const u = new P();
|
|
2007
|
+
u.add(r, i, l), this.add(u);
|
|
1905
2008
|
}
|
|
1906
2009
|
}
|
|
1907
|
-
class
|
|
2010
|
+
class Ao extends P {
|
|
1908
2011
|
constructor() {
|
|
1909
2012
|
super();
|
|
1910
|
-
const e = new
|
|
2013
|
+
const e = new S(0.3, 0.4, 0.1, 16), t = new w({
|
|
1911
2014
|
color: 3355443,
|
|
1912
2015
|
roughness: 0.6,
|
|
1913
2016
|
metalness: 0.3
|
|
1914
|
-
}),
|
|
1915
|
-
|
|
1916
|
-
const
|
|
2017
|
+
}), n = new f(e, t);
|
|
2018
|
+
n.position.y = 0.05;
|
|
2019
|
+
const a = new S(0.1, 0.1, 0.7, 16), c = new w({
|
|
1917
2020
|
color: 5592405,
|
|
1918
2021
|
roughness: 0.5,
|
|
1919
2022
|
metalness: 0.4
|
|
1920
|
-
}), s = new
|
|
2023
|
+
}), s = new f(a, c);
|
|
1921
2024
|
s.position.y = 0.4;
|
|
1922
|
-
const r = new
|
|
2025
|
+
const r = new z(0.075, 0.2, 16), i = new w({
|
|
1923
2026
|
color: 16733440,
|
|
1924
2027
|
emissive: 16733440,
|
|
1925
2028
|
emissiveIntensity: 0.6,
|
|
1926
2029
|
transparent: !0,
|
|
1927
2030
|
opacity: 0.8
|
|
1928
|
-
}),
|
|
1929
|
-
|
|
2031
|
+
}), l = new f(r, i);
|
|
2032
|
+
l.position.y = 0.8, this.add(n, s, l);
|
|
1930
2033
|
}
|
|
1931
2034
|
}
|
|
1932
|
-
class
|
|
2035
|
+
class Eo extends P {
|
|
1933
2036
|
constructor() {
|
|
1934
2037
|
super();
|
|
1935
2038
|
const e = new g(3, 4, 0.1), t = new w({
|
|
1936
2039
|
color: 3026478,
|
|
1937
2040
|
roughness: 0.8,
|
|
1938
2041
|
metalness: 0.6
|
|
1939
|
-
}),
|
|
2042
|
+
}), n = new g(0.2, 0.5, 0.2), a = new w({
|
|
1940
2043
|
color: 11184810,
|
|
1941
2044
|
roughness: 0.5,
|
|
1942
2045
|
metalness: 0.7
|
|
1943
|
-
}),
|
|
2046
|
+
}), c = new S(0.3, 0.3, 0.1, 16), s = new w({
|
|
1944
2047
|
color: 5592405,
|
|
1945
2048
|
roughness: 0.7,
|
|
1946
2049
|
metalness: 0.5
|
|
1947
|
-
}), r = new
|
|
2050
|
+
}), r = new f(e, t);
|
|
1948
2051
|
for (let y = -1; y <= 1; y++) {
|
|
1949
|
-
const I = new
|
|
2052
|
+
const I = new f(n, a);
|
|
1950
2053
|
I.position.set(y, 1.5, 0.1), r.add(I);
|
|
1951
2054
|
}
|
|
1952
|
-
const
|
|
1953
|
-
|
|
1954
|
-
const
|
|
2055
|
+
const i = new f(c, s);
|
|
2056
|
+
i.rotation.x = Math.PI / 2, i.position.set(0, 0.5, 0.15), r.add(i);
|
|
2057
|
+
const l = new T(0.15, 8, 8), u = new w({
|
|
1955
2058
|
color: 16711680,
|
|
1956
2059
|
emissive: 16711680,
|
|
1957
2060
|
emissiveIntensity: 0.5
|
|
1958
|
-
}),
|
|
1959
|
-
|
|
1960
|
-
let
|
|
2061
|
+
}), m = new f(l, u);
|
|
2062
|
+
m.position.set(0, -1, 0.1), r.add(m), this.add(r);
|
|
2063
|
+
let h = 0.015, d = 0.8, p = 0.2;
|
|
1961
2064
|
function x() {
|
|
1962
2065
|
requestAnimationFrame(x);
|
|
1963
|
-
const y = p + Math.abs(Math.sin(Date.now() *
|
|
1964
|
-
|
|
2066
|
+
const y = p + Math.abs(Math.sin(Date.now() * h)) * (d - p);
|
|
2067
|
+
m.material.emissiveIntensity = y;
|
|
1965
2068
|
}
|
|
1966
2069
|
x();
|
|
1967
2070
|
}
|
|
1968
2071
|
}
|
|
1969
|
-
class
|
|
2072
|
+
class To extends f {
|
|
1970
2073
|
constructor({
|
|
1971
2074
|
flaskRadius: e = 1,
|
|
1972
2075
|
//
|
|
1973
2076
|
neckRadius: t = 0.3,
|
|
1974
|
-
height:
|
|
1975
|
-
neckHeight:
|
|
1976
|
-
radialSegments:
|
|
2077
|
+
height: n = 2.5,
|
|
2078
|
+
neckHeight: a = 1,
|
|
2079
|
+
radialSegments: c = 16
|
|
1977
2080
|
} = {}) {
|
|
1978
|
-
super(), this.geometry = new
|
|
2081
|
+
super(), this.geometry = new vt({ flaskRadius: e, neckRadius: t, height: n, neckHeight: a, radialSegments: c }), this.material = new Y({
|
|
1979
2082
|
color: 8965375,
|
|
1980
2083
|
transparent: !0,
|
|
1981
2084
|
opacity: 0.4,
|
|
@@ -1983,12 +2086,12 @@ class Ot extends h {
|
|
|
1983
2086
|
metalness: 0.1,
|
|
1984
2087
|
reflectivity: 0.8,
|
|
1985
2088
|
transmission: 0.9,
|
|
1986
|
-
side:
|
|
2089
|
+
side: O,
|
|
1987
2090
|
wireframe: !1
|
|
1988
2091
|
});
|
|
1989
2092
|
}
|
|
1990
2093
|
}
|
|
1991
|
-
class
|
|
2094
|
+
class Bo extends P {
|
|
1992
2095
|
constructor() {
|
|
1993
2096
|
super();
|
|
1994
2097
|
const e = [
|
|
@@ -2002,178 +2105,178 @@ class Vt extends P {
|
|
|
2002
2105
|
// Narrow neck
|
|
2003
2106
|
new b(0.6, 3.5)
|
|
2004
2107
|
// Mouth of the flask
|
|
2005
|
-
], t = new
|
|
2108
|
+
], t = new q(e, 12), n = new S(0.6, 0.7, 0.3, 8), a = new w({
|
|
2006
2109
|
color: 8965290,
|
|
2007
2110
|
transparent: !0,
|
|
2008
2111
|
opacity: 0.4,
|
|
2009
2112
|
roughness: 0.1,
|
|
2010
2113
|
metalness: 0.5
|
|
2011
|
-
}),
|
|
2114
|
+
}), c = new w({
|
|
2012
2115
|
color: 9127187,
|
|
2013
2116
|
roughness: 1
|
|
2014
|
-
}), s = new
|
|
2117
|
+
}), s = new f(t, a), r = new f(n, c);
|
|
2015
2118
|
r.position.y = 3.5, this.add(s, r);
|
|
2016
2119
|
}
|
|
2017
2120
|
}
|
|
2018
|
-
class
|
|
2121
|
+
class Co extends P {
|
|
2019
2122
|
constructor() {
|
|
2020
2123
|
super();
|
|
2021
2124
|
const e = new g(2, 3, 0.1), t = new w({
|
|
2022
2125
|
color: 3355443,
|
|
2023
2126
|
roughness: 0.8,
|
|
2024
2127
|
metalness: 0.5
|
|
2025
|
-
}),
|
|
2128
|
+
}), n = new f(e, t), a = new S(0.1, 0.1, 0.2, 8), c = new S(0.05, 0.05, 1, 8), s = new w({
|
|
2026
2129
|
color: 11184810,
|
|
2027
2130
|
roughness: 0.5,
|
|
2028
2131
|
metalness: 0.7
|
|
2029
2132
|
});
|
|
2030
2133
|
for (let r = -0.5; r <= 0.5; r += 0.5) {
|
|
2031
|
-
const
|
|
2032
|
-
|
|
2033
|
-
const
|
|
2034
|
-
|
|
2134
|
+
const i = new f(a, s);
|
|
2135
|
+
i.position.set(r, 1, 0.1);
|
|
2136
|
+
const l = new f(c, s);
|
|
2137
|
+
l.position.y = 0.5, i.add(l), this.add(i);
|
|
2035
2138
|
}
|
|
2036
|
-
this.add(
|
|
2139
|
+
this.add(n);
|
|
2037
2140
|
}
|
|
2038
2141
|
}
|
|
2039
|
-
class
|
|
2142
|
+
class ko extends P {
|
|
2040
2143
|
constructor() {
|
|
2041
2144
|
super();
|
|
2042
2145
|
const e = new g(1, 0.2, 0.5), t = new w({
|
|
2043
2146
|
color: 4473924,
|
|
2044
2147
|
roughness: 0.6,
|
|
2045
2148
|
metalness: 0.3
|
|
2046
|
-
}),
|
|
2047
|
-
|
|
2048
|
-
const
|
|
2049
|
-
|
|
2050
|
-
const s = new
|
|
2149
|
+
}), n = new f(e, t);
|
|
2150
|
+
n.position.y = 0.1;
|
|
2151
|
+
const a = new g(0.2, 1, 0.2), c = new f(a, t);
|
|
2152
|
+
c.position.set(0, 0.6, -0.2);
|
|
2153
|
+
const s = new S(0.1, 0.1, 0.4, 8), r = new w({
|
|
2051
2154
|
color: 3355443,
|
|
2052
2155
|
roughness: 0.5,
|
|
2053
2156
|
metalness: 0.6
|
|
2054
|
-
}),
|
|
2055
|
-
|
|
2056
|
-
const
|
|
2157
|
+
}), i = new f(s, r);
|
|
2158
|
+
i.position.set(0, 1.1, -0.35), i.rotation.x = -Math.PI / 4;
|
|
2159
|
+
const l = new g(0.6, 0.1, 0.6), u = new w({
|
|
2057
2160
|
color: 5592405,
|
|
2058
2161
|
roughness: 0.8,
|
|
2059
2162
|
metalness: 0.2
|
|
2060
|
-
}),
|
|
2061
|
-
|
|
2163
|
+
}), m = new f(l, u);
|
|
2164
|
+
m.position.set(0, 0.6, 0), this.add(n, c, i, m);
|
|
2062
2165
|
}
|
|
2063
2166
|
}
|
|
2064
|
-
class
|
|
2167
|
+
class No extends P {
|
|
2065
2168
|
constructor() {
|
|
2066
2169
|
super();
|
|
2067
|
-
const e = new
|
|
2170
|
+
const e = new gt(), t = new S(0.2, 0.3, 1.5, 8);
|
|
2068
2171
|
t.translate(0, 0.75, 0);
|
|
2069
|
-
const
|
|
2172
|
+
const n = new w({
|
|
2070
2173
|
color: 6045747,
|
|
2071
2174
|
// Dark earthy tone
|
|
2072
2175
|
roughness: 1,
|
|
2073
2176
|
metalness: 0,
|
|
2074
|
-
side:
|
|
2177
|
+
side: O
|
|
2075
2178
|
// Render inside and outside
|
|
2076
|
-
}),
|
|
2179
|
+
}), a = new w({
|
|
2077
2180
|
color: 9132587,
|
|
2078
2181
|
// Slightly lighter earthy color
|
|
2079
2182
|
roughness: 0.8,
|
|
2080
2183
|
metalness: 0.1
|
|
2081
|
-
}),
|
|
2082
|
-
s.position.set(0.3, 1.3, 0), s.rotation.z = Math.PI / 4, this.add(
|
|
2184
|
+
}), c = new f(e, n), s = new f(t, a);
|
|
2185
|
+
s.position.set(0.3, 1.3, 0), s.rotation.z = Math.PI / 4, this.add(c, s);
|
|
2083
2186
|
}
|
|
2084
2187
|
}
|
|
2085
|
-
class
|
|
2188
|
+
class _o extends P {
|
|
2086
2189
|
constructor() {
|
|
2087
2190
|
super();
|
|
2088
|
-
const e = 100, t = 0.05,
|
|
2089
|
-
Array.from({ length: e }, (
|
|
2090
|
-
const
|
|
2191
|
+
const e = 100, t = 0.05, n = new xe(
|
|
2192
|
+
Array.from({ length: e }, (l, u) => {
|
|
2193
|
+
const m = u * 0.2;
|
|
2091
2194
|
return new M(
|
|
2092
|
-
Math.cos(
|
|
2093
|
-
|
|
2195
|
+
Math.cos(m) * 0.4,
|
|
2196
|
+
u * t,
|
|
2094
2197
|
// Gradual height increase
|
|
2095
|
-
Math.sin(
|
|
2198
|
+
Math.sin(m) * 0.4
|
|
2096
2199
|
);
|
|
2097
2200
|
})
|
|
2098
|
-
),
|
|
2201
|
+
), a = new Me(n, 200, 0.1, 8, !1), c = new w({
|
|
2099
2202
|
color: 8965375,
|
|
2100
2203
|
transparent: !0,
|
|
2101
2204
|
opacity: 0.3,
|
|
2102
2205
|
roughness: 0.1,
|
|
2103
2206
|
metalness: 0.2,
|
|
2104
2207
|
emissive: 8965375
|
|
2105
|
-
}), s = new
|
|
2208
|
+
}), s = new f(a, c);
|
|
2106
2209
|
this.add(s);
|
|
2107
2210
|
function r() {
|
|
2108
|
-
|
|
2211
|
+
c.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
|
|
2109
2212
|
}
|
|
2110
|
-
function
|
|
2111
|
-
requestAnimationFrame(
|
|
2213
|
+
function i() {
|
|
2214
|
+
requestAnimationFrame(i), r();
|
|
2112
2215
|
}
|
|
2113
|
-
|
|
2216
|
+
i();
|
|
2114
2217
|
}
|
|
2115
2218
|
}
|
|
2116
|
-
class
|
|
2219
|
+
class Uo extends f {
|
|
2117
2220
|
constructor({
|
|
2118
2221
|
radius: e = 0.3,
|
|
2119
2222
|
//
|
|
2120
2223
|
height: t = 0.4,
|
|
2121
|
-
count:
|
|
2122
|
-
thickness:
|
|
2123
|
-
radialSegments:
|
|
2224
|
+
count: n = 3,
|
|
2225
|
+
thickness: a = 0.03,
|
|
2226
|
+
radialSegments: c = 16
|
|
2124
2227
|
} = {}) {
|
|
2125
|
-
super(), this.geometry = new
|
|
2228
|
+
super(), this.geometry = new bt({ radius: e, height: t, count: n, thickness: a, radialSegments: c }), this.material = new w({
|
|
2126
2229
|
color: 8947848,
|
|
2127
2230
|
roughness: 0.7,
|
|
2128
2231
|
metalness: 0.3
|
|
2129
2232
|
});
|
|
2130
2233
|
}
|
|
2131
2234
|
}
|
|
2132
|
-
class
|
|
2235
|
+
class Fo extends P {
|
|
2133
2236
|
constructor() {
|
|
2134
2237
|
super();
|
|
2135
|
-
const e = new
|
|
2238
|
+
const e = new S(0.5, 0.6, 0.3, 16), t = new w({
|
|
2136
2239
|
color: 3355443,
|
|
2137
2240
|
roughness: 0.6,
|
|
2138
2241
|
metalness: 0.5
|
|
2139
|
-
}),
|
|
2140
|
-
|
|
2141
|
-
const
|
|
2242
|
+
}), n = new f(e, t);
|
|
2243
|
+
n.position.y = 0.15;
|
|
2244
|
+
const a = new S(0.15, 0.15, 2, 12, 1, !0), c = new w({
|
|
2142
2245
|
color: 16737792,
|
|
2143
2246
|
roughness: 0.5,
|
|
2144
2247
|
metalness: 0.8,
|
|
2145
|
-
side:
|
|
2146
|
-
}), s = new
|
|
2248
|
+
side: O
|
|
2249
|
+
}), s = new f(a, c);
|
|
2147
2250
|
s.position.y = 1.3;
|
|
2148
|
-
const r = new
|
|
2149
|
-
|
|
2150
|
-
const
|
|
2151
|
-
for (let
|
|
2152
|
-
const d = new
|
|
2251
|
+
const r = new T(0.3, 16, 16), i = new f(r, c);
|
|
2252
|
+
i.position.y = 2.4, this.add(n, s, i);
|
|
2253
|
+
const l = [];
|
|
2254
|
+
for (let h = 0; h < 5; h++) {
|
|
2255
|
+
const d = new ve({ color: 10079487 }), p = [
|
|
2153
2256
|
new M(0, 2.4, 0),
|
|
2154
2257
|
new M((Math.random() - 0.5) * 1.5, Math.random() * 2.4, (Math.random() - 0.5) * 1.5)
|
|
2155
|
-
], x = new v().setFromPoints(p), y = new
|
|
2156
|
-
this.add(y),
|
|
2258
|
+
], x = new v().setFromPoints(p), y = new ge(x, d);
|
|
2259
|
+
this.add(y), l.push(y);
|
|
2157
2260
|
}
|
|
2158
|
-
function
|
|
2159
|
-
|
|
2261
|
+
function u() {
|
|
2262
|
+
l.forEach((h) => {
|
|
2160
2263
|
const d = [
|
|
2161
2264
|
new M(0, 2.4, 0),
|
|
2162
2265
|
new M((Math.random() - 0.5) * 1.5, Math.random() * 2.4, (Math.random() - 0.5) * 1.5)
|
|
2163
2266
|
];
|
|
2164
|
-
|
|
2267
|
+
h.geometry.setFromPoints(d);
|
|
2165
2268
|
});
|
|
2166
2269
|
}
|
|
2167
|
-
function
|
|
2168
|
-
requestAnimationFrame(
|
|
2270
|
+
function m() {
|
|
2271
|
+
requestAnimationFrame(m), u();
|
|
2169
2272
|
}
|
|
2170
|
-
|
|
2273
|
+
m();
|
|
2171
2274
|
}
|
|
2172
2275
|
}
|
|
2173
|
-
class
|
|
2174
|
-
constructor(e = 0.2, t = 0.2,
|
|
2276
|
+
class Oo extends P {
|
|
2277
|
+
constructor(e = 0.2, t = 0.2, n = 3, a = 32) {
|
|
2175
2278
|
super();
|
|
2176
|
-
const
|
|
2279
|
+
const c = new H(e, t, n, a), s = new Y({
|
|
2177
2280
|
color: 8965375,
|
|
2178
2281
|
transparent: !0,
|
|
2179
2282
|
opacity: 0.4,
|
|
@@ -2182,48 +2285,48 @@ class Qt extends P {
|
|
|
2182
2285
|
reflectivity: 0.8,
|
|
2183
2286
|
transmission: 0.9,
|
|
2184
2287
|
// For glass effect
|
|
2185
|
-
side:
|
|
2186
|
-
}), r = new
|
|
2288
|
+
side: O
|
|
2289
|
+
}), r = new f(c, s);
|
|
2187
2290
|
this.add(r);
|
|
2188
2291
|
}
|
|
2189
2292
|
}
|
|
2190
|
-
class
|
|
2293
|
+
class zo extends P {
|
|
2191
2294
|
constructor(e = 3, t = [65450, 16711850, 11141375]) {
|
|
2192
2295
|
super();
|
|
2193
|
-
const
|
|
2296
|
+
const n = new g(3, 0.2, 1), a = new w({
|
|
2194
2297
|
color: 9127187,
|
|
2195
2298
|
// Wooden color or change to metallic tone
|
|
2196
2299
|
roughness: 0.7,
|
|
2197
2300
|
metalness: 0.3
|
|
2198
|
-
}),
|
|
2199
|
-
|
|
2200
|
-
const s = new
|
|
2301
|
+
}), c = new f(n, a);
|
|
2302
|
+
c.position.y = 0.5;
|
|
2303
|
+
const s = new H(0.1, 0.1, 1, 16), r = new w({
|
|
2201
2304
|
color: 11184810,
|
|
2202
2305
|
transparent: !0,
|
|
2203
2306
|
opacity: 0.4,
|
|
2204
2307
|
roughness: 0.1,
|
|
2205
2308
|
metalness: 0.5,
|
|
2206
|
-
side:
|
|
2309
|
+
side: O
|
|
2207
2310
|
});
|
|
2208
|
-
for (let
|
|
2209
|
-
const
|
|
2210
|
-
|
|
2211
|
-
const
|
|
2212
|
-
color:
|
|
2213
|
-
emissive:
|
|
2311
|
+
for (let i = 0; i < e; i++) {
|
|
2312
|
+
const l = new f(s, r), u = (i - (e - 1) / 2) * 0.8;
|
|
2313
|
+
l.position.set(u, 1, 0);
|
|
2314
|
+
const m = new H(0.099, 0.099, 0.5, 16, !1), h = t[i % t.length], d = new w({
|
|
2315
|
+
color: h,
|
|
2316
|
+
emissive: h,
|
|
2214
2317
|
emissiveIntensity: 0.5,
|
|
2215
2318
|
transparent: !0,
|
|
2216
2319
|
opacity: 0.6
|
|
2217
|
-
}), p = new
|
|
2218
|
-
p.position.set(0, -0.25, 0),
|
|
2320
|
+
}), p = new f(m, d);
|
|
2321
|
+
p.position.set(0, -0.25, 0), l.add(p), c.add(l);
|
|
2219
2322
|
}
|
|
2220
|
-
this.add(
|
|
2323
|
+
this.add(c);
|
|
2221
2324
|
}
|
|
2222
2325
|
}
|
|
2223
|
-
class
|
|
2326
|
+
class qo extends f {
|
|
2224
2327
|
constructor() {
|
|
2225
2328
|
super();
|
|
2226
|
-
const e = new
|
|
2329
|
+
const e = new St(), t = new Y({
|
|
2227
2330
|
color: 5597999,
|
|
2228
2331
|
roughness: 0.1,
|
|
2229
2332
|
transmission: 0.9,
|
|
@@ -2236,24 +2339,24 @@ class Kt extends h {
|
|
|
2236
2339
|
this.geometry = e, this.material = t;
|
|
2237
2340
|
}
|
|
2238
2341
|
}
|
|
2239
|
-
class
|
|
2240
|
-
constructor(e = 5, t = 0.5,
|
|
2342
|
+
class Et extends L {
|
|
2343
|
+
constructor(e = 5, t = 0.5, n = 1) {
|
|
2241
2344
|
super();
|
|
2242
|
-
const
|
|
2243
|
-
this.moveTo(Math.cos(0) *
|
|
2345
|
+
const a = Math.PI * 2 / e, c = a / 2, s = a / 4;
|
|
2346
|
+
this.moveTo(Math.cos(0) * n, -Math.sin(0) * n);
|
|
2244
2347
|
for (let r = 1; r <= e; ++r) {
|
|
2245
|
-
let
|
|
2246
|
-
this.quadraticCurveTo(
|
|
2348
|
+
let i = Math.cos(a * r - s * 3) * (t / Math.cos(s)), l = -Math.sin(a * r - s * 3) * (t / Math.cos(s)), u = Math.cos(a * r - c) * t, m = -Math.sin(a * r - c) * t;
|
|
2349
|
+
this.quadraticCurveTo(i, l, u, m), i = Math.cos(a * r - s) * (t / Math.cos(s)), l = -Math.sin(a * r - s) * (t / Math.cos(s)), u = Math.cos(a * r) * n, m = -Math.sin(a * r) * n, this.quadraticCurveTo(i, l, u, m);
|
|
2247
2350
|
}
|
|
2248
2351
|
this.closePath();
|
|
2249
2352
|
}
|
|
2250
2353
|
}
|
|
2251
|
-
class
|
|
2252
|
-
constructor(e = 5, t = 0.5,
|
|
2354
|
+
class Lo extends f {
|
|
2355
|
+
constructor(e = 5, t = 0.5, n = 1, a = 0.25) {
|
|
2253
2356
|
super();
|
|
2254
|
-
const
|
|
2255
|
-
depth:
|
|
2256
|
-
bevelEnabled:
|
|
2357
|
+
const c = new Et(e, t, n), s = new V(c, {
|
|
2358
|
+
depth: a,
|
|
2359
|
+
bevelEnabled: a > 0,
|
|
2257
2360
|
bevelThickness: 0,
|
|
2258
2361
|
bevelSize: 0
|
|
2259
2362
|
}), r = new w({
|
|
@@ -2267,73 +2370,73 @@ class Jt extends h {
|
|
|
2267
2370
|
s.center(), this.geometry = s, this.material = r;
|
|
2268
2371
|
}
|
|
2269
2372
|
}
|
|
2270
|
-
class
|
|
2271
|
-
constructor(e = 5, t = 0.5,
|
|
2373
|
+
class Tt extends L {
|
|
2374
|
+
constructor(e = 5, t = 0.5, n = 1, a = 5, c = 0.25) {
|
|
2272
2375
|
super();
|
|
2273
2376
|
const s = Math.PI * 2 / e, r = s / 4;
|
|
2274
|
-
this.moveTo(Math.cos(0) *
|
|
2275
|
-
for (let
|
|
2276
|
-
this.lineTo(Math.cos(s *
|
|
2277
|
-
if (this.closePath(),
|
|
2278
|
-
const
|
|
2279
|
-
|
|
2280
|
-
for (let
|
|
2281
|
-
|
|
2282
|
-
|
|
2377
|
+
this.moveTo(Math.cos(0) * n, -Math.sin(0) * n);
|
|
2378
|
+
for (let i = 1; i <= e; ++i)
|
|
2379
|
+
this.lineTo(Math.cos(s * i - r * 3) * t, -Math.sin(s * i - r * 3) * t), this.lineTo(Math.cos(s * i - r * 2) * t, -Math.sin(s * i - r * 2) * t), this.lineTo(Math.cos(s * i - r) * n, -Math.sin(s * i - r) * n), this.lineTo(Math.cos(s * i) * n, -Math.sin(s * i) * n);
|
|
2380
|
+
if (this.closePath(), c > 0 && a > 2) {
|
|
2381
|
+
const i = new be(), l = Math.PI * 2 / a;
|
|
2382
|
+
i.moveTo(Math.cos(0) * c, -Math.sin(0) * c);
|
|
2383
|
+
for (let u = 1; u < a; ++u)
|
|
2384
|
+
i.lineTo(Math.cos(l * u) * c, -Math.sin(l * u) * c);
|
|
2385
|
+
i.lineTo(Math.cos(0) * c, -Math.sin(0) * c), this.holes.push(i);
|
|
2283
2386
|
}
|
|
2284
2387
|
}
|
|
2285
2388
|
}
|
|
2286
|
-
class
|
|
2287
|
-
constructor(e = 5, t = 0.5,
|
|
2389
|
+
class Vo extends f {
|
|
2390
|
+
constructor(e = 5, t = 0.5, n = 1, a = 5, c = 0.25, s = 0.25) {
|
|
2288
2391
|
super();
|
|
2289
|
-
const r = new
|
|
2392
|
+
const r = new Tt(e, t, n, a, c), i = new V(r, {
|
|
2290
2393
|
depth: s,
|
|
2291
2394
|
bevelEnabled: s > 0,
|
|
2292
2395
|
bevelThickness: 0,
|
|
2293
2396
|
bevelSize: 0
|
|
2294
|
-
}),
|
|
2397
|
+
}), l = new w({
|
|
2295
2398
|
color: 11184810,
|
|
2296
2399
|
metalness: 0.8,
|
|
2297
2400
|
roughness: 0.2,
|
|
2298
2401
|
reflectivity: 0.5
|
|
2299
2402
|
});
|
|
2300
|
-
|
|
2403
|
+
i.center(), this.geometry = i, this.material = l;
|
|
2301
2404
|
}
|
|
2302
2405
|
}
|
|
2303
|
-
class
|
|
2304
|
-
constructor(e = 1, t = 2.1,
|
|
2305
|
-
super(), this.moveTo(0,
|
|
2406
|
+
class Bt extends L {
|
|
2407
|
+
constructor(e = 1, t = 2.1, n = 1.4, a = 1.6) {
|
|
2408
|
+
super(), this.moveTo(0, n * e / 3), this.bezierCurveTo(
|
|
2306
2409
|
-t * 0.375 * e,
|
|
2307
|
-
|
|
2410
|
+
n * e,
|
|
2308
2411
|
// Control point 1 for the left lobe
|
|
2309
2412
|
-t * e,
|
|
2310
|
-
|
|
2413
|
+
n * e / 3,
|
|
2311
2414
|
// Control point 2 for the left side of the heart
|
|
2312
2415
|
0,
|
|
2313
|
-
-
|
|
2416
|
+
-a * e
|
|
2314
2417
|
// Bottom tip of the heart, controlled by `tipDepth`
|
|
2315
2418
|
), this.bezierCurveTo(
|
|
2316
2419
|
t * e,
|
|
2317
|
-
|
|
2420
|
+
n * e / 3,
|
|
2318
2421
|
// Control point 3 for the right side of the heart
|
|
2319
2422
|
t * 0.375 * e,
|
|
2320
|
-
|
|
2423
|
+
n * e,
|
|
2321
2424
|
// Control point 4 for the right lobe
|
|
2322
2425
|
0,
|
|
2323
|
-
|
|
2426
|
+
n * e / 3
|
|
2324
2427
|
// Close shape at the top middle
|
|
2325
2428
|
);
|
|
2326
2429
|
}
|
|
2327
2430
|
}
|
|
2328
|
-
class
|
|
2329
|
-
constructor(e = 1, t = 1,
|
|
2431
|
+
class Xo extends f {
|
|
2432
|
+
constructor(e = 1, t = 1, n = 1, a = 10, c = 0.25) {
|
|
2330
2433
|
super();
|
|
2331
|
-
const s = new
|
|
2332
|
-
depth:
|
|
2333
|
-
bevelEnabled:
|
|
2434
|
+
const s = new Bt(e, t, n, a), r = new V(s, {
|
|
2435
|
+
depth: c,
|
|
2436
|
+
bevelEnabled: c > 0,
|
|
2334
2437
|
bevelThickness: 0,
|
|
2335
2438
|
bevelSize: 0
|
|
2336
|
-
}),
|
|
2439
|
+
}), i = new w({
|
|
2337
2440
|
color: 12986408,
|
|
2338
2441
|
emissive: 12981270,
|
|
2339
2442
|
emissiveIntensity: 0.25,
|
|
@@ -2341,25 +2444,25 @@ class Wt extends h {
|
|
|
2341
2444
|
roughness: 0.3,
|
|
2342
2445
|
flatShading: !0
|
|
2343
2446
|
});
|
|
2344
|
-
r.center(), this.geometry = r, this.material =
|
|
2447
|
+
r.center(), this.geometry = r, this.material = i;
|
|
2345
2448
|
}
|
|
2346
2449
|
}
|
|
2347
|
-
class
|
|
2348
|
-
constructor(e = 5, t = 0.5,
|
|
2450
|
+
class Ct extends L {
|
|
2451
|
+
constructor(e = 5, t = 0.5, n = 1) {
|
|
2349
2452
|
super();
|
|
2350
|
-
const
|
|
2351
|
-
this.moveTo(Math.cos(0) *
|
|
2453
|
+
const a = Math.PI * 2 / e, c = a / 2;
|
|
2454
|
+
this.moveTo(Math.cos(0) * n, Math.sin(0) * n);
|
|
2352
2455
|
for (let s = 1; s <= e; ++s)
|
|
2353
|
-
this.lineTo(Math.cos(
|
|
2456
|
+
this.lineTo(Math.cos(a * s - c) * t, Math.sin(a * s - c) * t), this.lineTo(Math.cos(a * s) * n, Math.sin(a * s) * n);
|
|
2354
2457
|
this.closePath();
|
|
2355
2458
|
}
|
|
2356
2459
|
}
|
|
2357
|
-
class
|
|
2358
|
-
constructor(e = 5, t = 0.5,
|
|
2460
|
+
class Ro extends f {
|
|
2461
|
+
constructor(e = 5, t = 0.5, n = 1, a = 0.25) {
|
|
2359
2462
|
super();
|
|
2360
|
-
const
|
|
2361
|
-
depth:
|
|
2362
|
-
bevelEnabled:
|
|
2463
|
+
const c = new Ct(e, t, n), s = new V(c, {
|
|
2464
|
+
depth: a,
|
|
2465
|
+
bevelEnabled: a > 0,
|
|
2363
2466
|
bevelThickness: 0,
|
|
2364
2467
|
bevelSize: 0
|
|
2365
2468
|
}), r = new w({
|
|
@@ -2373,93 +2476,93 @@ class eo extends h {
|
|
|
2373
2476
|
s.center(), this.geometry = s, this.material = r;
|
|
2374
2477
|
}
|
|
2375
2478
|
}
|
|
2376
|
-
class
|
|
2479
|
+
class Zo extends f {
|
|
2377
2480
|
constructor() {
|
|
2378
|
-
super(), this.geometry = new
|
|
2481
|
+
super(), this.geometry = new xt(), this.material = new w({ color: 16777215 });
|
|
2379
2482
|
}
|
|
2380
2483
|
}
|
|
2381
|
-
class
|
|
2484
|
+
class Yo extends f {
|
|
2382
2485
|
constructor({
|
|
2383
2486
|
trunkRadiusTop: e = 0.25,
|
|
2384
2487
|
trunkRadiusBottom: t = 0.4,
|
|
2385
|
-
trunkHeight:
|
|
2386
|
-
trunkSegments:
|
|
2387
|
-
trunkColor:
|
|
2488
|
+
trunkHeight: n = 2.5,
|
|
2489
|
+
trunkSegments: a = 14,
|
|
2490
|
+
trunkColor: c = 9127187,
|
|
2388
2491
|
leafSize: s = 0.8,
|
|
2389
2492
|
leafCount: r = 6,
|
|
2390
|
-
leafDetail:
|
|
2391
|
-
leafSpreadRadius:
|
|
2392
|
-
leafColor:
|
|
2493
|
+
leafDetail: i = 0,
|
|
2494
|
+
leafSpreadRadius: l = 1.5,
|
|
2495
|
+
leafColor: u = 2263842
|
|
2393
2496
|
} = {}) {
|
|
2394
2497
|
super();
|
|
2395
|
-
const
|
|
2498
|
+
const m = new At({
|
|
2396
2499
|
trunkRadiusTop: e,
|
|
2397
2500
|
trunkRadiusBottom: t,
|
|
2398
|
-
trunkHeight:
|
|
2399
|
-
trunkSegments:
|
|
2400
|
-
trunkColor:
|
|
2501
|
+
trunkHeight: n,
|
|
2502
|
+
trunkSegments: a,
|
|
2503
|
+
trunkColor: c,
|
|
2401
2504
|
leafSize: s,
|
|
2402
2505
|
leafCount: r,
|
|
2403
|
-
leafDetail:
|
|
2404
|
-
leafSpreadRadius:
|
|
2405
|
-
leafColor:
|
|
2406
|
-
}),
|
|
2407
|
-
color:
|
|
2506
|
+
leafDetail: i,
|
|
2507
|
+
leafSpreadRadius: l,
|
|
2508
|
+
leafColor: u
|
|
2509
|
+
}), h = new w({
|
|
2510
|
+
color: c,
|
|
2408
2511
|
roughness: 0.9,
|
|
2409
2512
|
metalness: 0,
|
|
2410
2513
|
flatShading: !0
|
|
2411
2514
|
}), d = new w({
|
|
2412
|
-
color:
|
|
2515
|
+
color: u,
|
|
2413
2516
|
roughness: 0.8,
|
|
2414
2517
|
metalness: 0,
|
|
2415
2518
|
flatShading: !0
|
|
2416
2519
|
});
|
|
2417
|
-
this.geometry =
|
|
2520
|
+
this.geometry = m, this.material = [h, d];
|
|
2418
2521
|
}
|
|
2419
2522
|
}
|
|
2420
|
-
class
|
|
2523
|
+
class Qo extends f {
|
|
2421
2524
|
constructor({
|
|
2422
2525
|
radius: e = 3,
|
|
2423
2526
|
//
|
|
2424
2527
|
height: t = 0.6,
|
|
2425
|
-
widthSegments:
|
|
2426
|
-
heightSegments:
|
|
2427
|
-
phiStart:
|
|
2528
|
+
widthSegments: n = 64,
|
|
2529
|
+
heightSegments: a = 16,
|
|
2530
|
+
phiStart: c = 0,
|
|
2428
2531
|
phiLength: s = Math.PI * 2
|
|
2429
2532
|
} = {}) {
|
|
2430
|
-
super(), this.geometry = new
|
|
2533
|
+
super(), this.geometry = new It({
|
|
2431
2534
|
radius: e,
|
|
2432
2535
|
height: t,
|
|
2433
|
-
widthSegments:
|
|
2434
|
-
heightSegments:
|
|
2435
|
-
phiStart:
|
|
2536
|
+
widthSegments: n,
|
|
2537
|
+
heightSegments: a,
|
|
2538
|
+
phiStart: c,
|
|
2436
2539
|
phiLength: s
|
|
2437
2540
|
}), this.material = new w({ color: 65280, flatShading: !0 });
|
|
2438
2541
|
}
|
|
2439
2542
|
}
|
|
2440
|
-
class
|
|
2543
|
+
class Do extends f {
|
|
2441
2544
|
constructor({
|
|
2442
|
-
radius: e =
|
|
2545
|
+
radius: e = me(5, Math.PI / 10),
|
|
2443
2546
|
//
|
|
2444
2547
|
widthSegments: t = 64,
|
|
2445
|
-
heightSegments:
|
|
2446
|
-
phiStart:
|
|
2447
|
-
phiLength:
|
|
2548
|
+
heightSegments: n = 32,
|
|
2549
|
+
phiStart: a = 0,
|
|
2550
|
+
phiLength: c = Math.PI * 2,
|
|
2448
2551
|
thetaLength: s = Math.PI / 10
|
|
2449
2552
|
} = {}) {
|
|
2450
|
-
super(), this.geometry = new
|
|
2553
|
+
super(), this.geometry = new Pt({
|
|
2451
2554
|
radius: e,
|
|
2452
2555
|
widthSegments: t,
|
|
2453
|
-
heightSegments:
|
|
2454
|
-
phiStart:
|
|
2455
|
-
phiLength:
|
|
2556
|
+
heightSegments: n,
|
|
2557
|
+
phiStart: a,
|
|
2558
|
+
phiLength: c,
|
|
2456
2559
|
thetaLength: s
|
|
2457
2560
|
}), this.material = new w({ color: 65280, flatShading: !0 });
|
|
2458
2561
|
}
|
|
2459
2562
|
}
|
|
2460
|
-
function
|
|
2461
|
-
|
|
2462
|
-
|
|
2563
|
+
function Ho(o, { time: e = 0, waveFrequency: t = 0.2, waveAmplitude: n = 0.5 } = {}) {
|
|
2564
|
+
o.onBeforeCompile = (a) => {
|
|
2565
|
+
a.uniforms.time = { value: e }, a.uniforms.waveFrequency = { value: t }, a.uniforms.waveAmplitude = { value: n }, a.vertexShader = `
|
|
2463
2566
|
uniform float time;
|
|
2464
2567
|
uniform float waveFrequency;
|
|
2465
2568
|
uniform float waveAmplitude;
|
|
@@ -2473,20 +2576,20 @@ function ro(l, { time: e = 0, waveFrequency: t = 0.2, waveAmplitude: o = 0.5 } =
|
|
|
2473
2576
|
|
|
2474
2577
|
return displaced;
|
|
2475
2578
|
}
|
|
2476
|
-
` +
|
|
2579
|
+
` + a.vertexShader, a.vertexShader = a.vertexShader.replace(
|
|
2477
2580
|
"#include <begin_vertex>",
|
|
2478
2581
|
`
|
|
2479
2582
|
vec3 transformed = waterDisplacement(position, normal);
|
|
2480
2583
|
`
|
|
2481
|
-
),
|
|
2584
|
+
), o.userData.shader = a;
|
|
2482
2585
|
};
|
|
2483
2586
|
}
|
|
2484
|
-
function
|
|
2485
|
-
|
|
2587
|
+
function jo(o, e) {
|
|
2588
|
+
o.userData.shader && (o.userData.shader.uniforms.time.value += e);
|
|
2486
2589
|
}
|
|
2487
|
-
function
|
|
2488
|
-
|
|
2489
|
-
|
|
2590
|
+
function Ko(o, { time: e = 0, intensity: t = 1, direction: n = U.XYZ, scale: a = 10 } = {}) {
|
|
2591
|
+
o.onBeforeCompile = (c) => {
|
|
2592
|
+
c.uniforms.time = { value: e }, c.uniforms.direction = { value: n }, c.uniforms.intensity = { value: t }, c.uniforms.scale = { value: a }, c.vertexShader = `
|
|
2490
2593
|
uniform float time;
|
|
2491
2594
|
uniform vec3 direction;
|
|
2492
2595
|
uniform float intensity;
|
|
@@ -2517,7 +2620,7 @@ function co(l, { time: e = 0, intensity: t = 1, direction: o = F.XYZ, scale: n =
|
|
|
2517
2620
|
|
|
2518
2621
|
return o4.y * d.y + o4.x * (1.0 - d.y);
|
|
2519
2622
|
}
|
|
2520
|
-
` +
|
|
2623
|
+
` + c.vertexShader, c.vertexShader = c.vertexShader.replace(
|
|
2521
2624
|
"#include <begin_vertex>",
|
|
2522
2625
|
`
|
|
2523
2626
|
vec3 transformed = vec3(position);
|
|
@@ -2525,13 +2628,13 @@ function co(l, { time: e = 0, intensity: t = 1, direction: o = F.XYZ, scale: n =
|
|
|
2525
2628
|
transformed += normalize(direction) * n * intensity;
|
|
2526
2629
|
vec3 transformedNormal = normal;
|
|
2527
2630
|
`
|
|
2528
|
-
),
|
|
2631
|
+
), o.userData.shader = c;
|
|
2529
2632
|
};
|
|
2530
2633
|
}
|
|
2531
|
-
function
|
|
2532
|
-
|
|
2634
|
+
function Jo(o, e) {
|
|
2635
|
+
o.userData.shader && (o.userData.shader.uniforms.time.value += e);
|
|
2533
2636
|
}
|
|
2534
|
-
const
|
|
2637
|
+
const ne = {
|
|
2535
2638
|
uniforms: {},
|
|
2536
2639
|
vertexShader: `
|
|
2537
2640
|
varying vec3 vPosition;
|
|
@@ -2549,7 +2652,7 @@ const te = {
|
|
|
2549
2652
|
gl_FragColor = vec4(mix(bottomColor, topColor, y), 1.0);
|
|
2550
2653
|
}
|
|
2551
2654
|
`
|
|
2552
|
-
},
|
|
2655
|
+
}, kt = {
|
|
2553
2656
|
uniforms: {
|
|
2554
2657
|
tDiffuse: { value: null },
|
|
2555
2658
|
opacity: { value: 1 }
|
|
@@ -2570,10 +2673,10 @@ const te = {
|
|
|
2570
2673
|
gl_FragColor = opacity * texel;
|
|
2571
2674
|
}
|
|
2572
2675
|
`
|
|
2573
|
-
},
|
|
2676
|
+
}, D = {
|
|
2574
2677
|
uniforms: {
|
|
2575
|
-
topColor: { value: new
|
|
2576
|
-
bottomColor: { value: new
|
|
2678
|
+
topColor: { value: new ee(51) },
|
|
2679
|
+
bottomColor: { value: new ee(17) },
|
|
2577
2680
|
offset: { value: 33 },
|
|
2578
2681
|
exponent: { value: 0.6 }
|
|
2579
2682
|
},
|
|
@@ -2597,180 +2700,248 @@ const te = {
|
|
|
2597
2700
|
}
|
|
2598
2701
|
`
|
|
2599
2702
|
};
|
|
2600
|
-
class
|
|
2703
|
+
class $o extends f {
|
|
2601
2704
|
constructor(e = 1e3) {
|
|
2602
2705
|
super(), this.geometry = new g(e, e, e), this.material = new K({
|
|
2603
|
-
vertexShader:
|
|
2604
|
-
fragmentShader:
|
|
2605
|
-
side:
|
|
2706
|
+
vertexShader: ne.vertexShader,
|
|
2707
|
+
fragmentShader: ne.fragmentShader,
|
|
2708
|
+
side: re
|
|
2606
2709
|
});
|
|
2607
2710
|
}
|
|
2608
2711
|
}
|
|
2609
|
-
class
|
|
2712
|
+
class Wo extends f {
|
|
2610
2713
|
constructor(e = 1e3) {
|
|
2611
|
-
super(), this.geometry = new
|
|
2612
|
-
vertexShader:
|
|
2613
|
-
fragmentShader:
|
|
2614
|
-
uniforms:
|
|
2615
|
-
side:
|
|
2714
|
+
super(), this.geometry = new T(e, 32, 15), this.material = new K({
|
|
2715
|
+
vertexShader: D.vertexShader,
|
|
2716
|
+
fragmentShader: D.fragmentShader,
|
|
2717
|
+
uniforms: D.uniforms,
|
|
2718
|
+
side: re
|
|
2616
2719
|
});
|
|
2617
2720
|
}
|
|
2618
2721
|
}
|
|
2619
|
-
class
|
|
2620
|
-
constructor(e = Math.PI * 0.49, t = 2 * Math.PI * 0.25,
|
|
2722
|
+
class en extends f {
|
|
2723
|
+
constructor(e = Math.PI * 0.49, t = 2 * Math.PI * 0.25, n = 10, a = 2, c = 5e-3, s = 0.8) {
|
|
2621
2724
|
super();
|
|
2622
|
-
const r = new
|
|
2725
|
+
const r = new Ee();
|
|
2623
2726
|
r.scale.setScalar(45e4), this.add(r);
|
|
2624
|
-
const
|
|
2625
|
-
|
|
2727
|
+
const i = r.material.uniforms;
|
|
2728
|
+
i.turbidity.value = n, i.rayleigh.value = a, i.mieCoefficient.value = c, i.mieDirectionalG.value = s, this.skyUniforms = i, this.sunPosition(e, t);
|
|
2626
2729
|
}
|
|
2627
2730
|
sunPosition(e, t) {
|
|
2628
|
-
const
|
|
2629
|
-
|
|
2731
|
+
const n = new M(), a = this.skyUniforms;
|
|
2732
|
+
n.setFromSphericalCoords(1, e, t), a.sunPosition.value.copy(n);
|
|
2630
2733
|
}
|
|
2631
2734
|
}
|
|
2632
|
-
const
|
|
2633
|
-
const e = new Uint8Array(4 *
|
|
2634
|
-
for (let
|
|
2635
|
-
const
|
|
2636
|
-
e[
|
|
2735
|
+
const tn = (o) => {
|
|
2736
|
+
const e = new Uint8Array(4 * o * o);
|
|
2737
|
+
for (let n = 0; n < o * o; n++) {
|
|
2738
|
+
const a = n * 4, c = (n % o ^ Math.floor(n / o)) & 1 ? 255 : 0;
|
|
2739
|
+
e[a] = c, e[a + 1] = c, e[a + 2] = c, e[a + 3] = 255;
|
|
2637
2740
|
}
|
|
2638
|
-
const t = new
|
|
2639
|
-
return t.wrapS =
|
|
2741
|
+
const t = new Se(e, o, o, Ie, Ge);
|
|
2742
|
+
return t.wrapS = te, t.wrapT = te, t.minFilter = Pe, t.needsUpdate = !0, t;
|
|
2640
2743
|
};
|
|
2641
|
-
function
|
|
2642
|
-
const
|
|
2643
|
-
|
|
2644
|
-
}
|
|
2645
|
-
function
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2744
|
+
function on(o) {
|
|
2745
|
+
const e = new J().setFromObject(o), t = new M();
|
|
2746
|
+
e.getCenter(t), o.position.sub(t);
|
|
2747
|
+
}
|
|
2748
|
+
function nn(o, e = new M(0, 0, 0)) {
|
|
2749
|
+
const t = new J().setFromObject(o), n = new M();
|
|
2750
|
+
t.getCenter(n);
|
|
2751
|
+
const a = new M().subVectors(e, n);
|
|
2752
|
+
o.position.add(a);
|
|
2753
|
+
}
|
|
2754
|
+
function sn(o) {
|
|
2755
|
+
o.computeBoundingBox();
|
|
2756
|
+
const t = o.boundingBox.getCenter(new M());
|
|
2757
|
+
o.translateX(-t.x), o.translateY(-t.y), o.translateZ(-t.z);
|
|
2758
|
+
}
|
|
2759
|
+
function Nt(o, e, t) {
|
|
2760
|
+
return Math.max(0, Math.min(1, (o - e) / (t - e)));
|
|
2761
|
+
}
|
|
2762
|
+
function an(o, e, t, n, a, c = 20, s = 0, r = 1) {
|
|
2763
|
+
const i = [];
|
|
2764
|
+
for (let l = 0; l <= c; l++) {
|
|
2765
|
+
const u = l / c, m = o(Nt(u, s, r)), h = e + m * (t - e), d = n + u * (a - n);
|
|
2766
|
+
i.push(new b(h, d));
|
|
2767
|
+
}
|
|
2768
|
+
return i;
|
|
2769
|
+
}
|
|
2770
|
+
function rn(o) {
|
|
2771
|
+
const t = new J().setFromObject(o).getCenter(new M());
|
|
2772
|
+
o.translateX(-t.x), o.translateY(-t.y), o.translateZ(-t.z), o.updateMatrixWorld(!0);
|
|
2773
|
+
}
|
|
2774
|
+
function cn(o) {
|
|
2775
|
+
o.geometry.computeBoundingBox();
|
|
2776
|
+
const t = o.geometry.boundingBox.getCenter(new M());
|
|
2777
|
+
o.geometry.translate(-t.x, -t.y, -t.z);
|
|
2778
|
+
}
|
|
2779
|
+
class ln {
|
|
2651
2780
|
static dispose(e) {
|
|
2652
2781
|
e == null || e.traverse((t) => {
|
|
2653
|
-
t.geometry && t.geometry.dispose(), t.material && (Array.isArray(t.material) ? t.material.forEach((
|
|
2782
|
+
t.geometry && t.geometry.dispose(), t.material && (Array.isArray(t.material) ? t.material.forEach((n) => n.dispose()) : t.material.dispose());
|
|
2654
2783
|
});
|
|
2655
2784
|
}
|
|
2656
|
-
static fadeBetween(e, t,
|
|
2657
|
-
const s = new
|
|
2785
|
+
static fadeBetween(e, t, n, a, c = 1) {
|
|
2786
|
+
const s = new Te(e), r = new oe(n, t);
|
|
2658
2787
|
s.addPass(r);
|
|
2659
|
-
const
|
|
2660
|
-
|
|
2661
|
-
let
|
|
2662
|
-
function
|
|
2663
|
-
|
|
2664
|
-
const p = (
|
|
2665
|
-
|
|
2788
|
+
const i = new Be(kt);
|
|
2789
|
+
i.uniforms.opacity.value = 1, s.addPass(i);
|
|
2790
|
+
let l = null;
|
|
2791
|
+
function u(h) {
|
|
2792
|
+
l || (l = h);
|
|
2793
|
+
const p = (h - l) / 1e3 / c;
|
|
2794
|
+
i.uniforms.opacity.value = Math.max(1 - p, 0), p < 1 ? (s.render(), requestAnimationFrame(u)) : (s.passes[0] = new oe(a, t), l = null, requestAnimationFrame(m));
|
|
2666
2795
|
}
|
|
2667
|
-
function
|
|
2668
|
-
|
|
2669
|
-
const p = (
|
|
2670
|
-
|
|
2796
|
+
function m(h) {
|
|
2797
|
+
l || (l = h);
|
|
2798
|
+
const p = (h - l) / 1e3 / c;
|
|
2799
|
+
i.uniforms.opacity.value = Math.min(p, 1), p < 1 && (s.render(), requestAnimationFrame(m));
|
|
2671
2800
|
}
|
|
2672
|
-
requestAnimationFrame(
|
|
2801
|
+
requestAnimationFrame(u);
|
|
2673
2802
|
}
|
|
2674
2803
|
}
|
|
2675
2804
|
export {
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2805
|
+
Go as Beaker,
|
|
2806
|
+
Mt as BeakerGeometry,
|
|
2807
|
+
Jt as BifurcatedStaircaseGeometry,
|
|
2808
|
+
Zo as Bone,
|
|
2809
|
+
xt as BoneGeometry,
|
|
2810
|
+
io as Book,
|
|
2811
|
+
ce as BookGeometry,
|
|
2812
|
+
xo as Bookshelf,
|
|
2813
|
+
dt as BookshelfGeometry,
|
|
2814
|
+
Po as Bottle,
|
|
2815
|
+
Dt as Bubbling,
|
|
2816
|
+
Ao as BunsenBurner,
|
|
2817
|
+
Lo as Burst,
|
|
2818
|
+
Et as BurstShape,
|
|
2819
|
+
vo as Candle,
|
|
2820
|
+
lo as CrossHeadstone,
|
|
2821
|
+
lt as CrossHeadstoneGeometry,
|
|
2822
|
+
$o as DaySkybox,
|
|
2823
|
+
Mo as Desk,
|
|
2824
|
+
$t as DioramaGeometry,
|
|
2825
|
+
U as Direction,
|
|
2826
|
+
Qt as Easing,
|
|
2827
|
+
Eo as ElectricPanel,
|
|
2828
|
+
To as ErlenmeyerFlask,
|
|
2829
|
+
vt as ErlenmeyerFlaskGeometry,
|
|
2830
|
+
X as Falloff,
|
|
2831
|
+
po as FenceColumn,
|
|
2832
|
+
ft as FenceColumnGeometry,
|
|
2833
|
+
Bo as Flask,
|
|
2834
|
+
Vo as Gear,
|
|
2835
|
+
Tt as GearShape,
|
|
2836
|
+
Xo as Heart,
|
|
2837
|
+
Bt as HeartShape,
|
|
2838
|
+
Qo as Hill,
|
|
2839
|
+
It as HillGeometry,
|
|
2840
|
+
Wt as LShapedStaircaseGeometry,
|
|
2841
|
+
go as Lantern,
|
|
2842
|
+
Co as LeverPanel,
|
|
2843
|
+
uo as Mausoleum,
|
|
2844
|
+
ko as Microscope,
|
|
2845
|
+
co as Moon,
|
|
2846
|
+
No as MortarAndPestle,
|
|
2847
|
+
gt as MortarGeometry,
|
|
2848
|
+
bo as MossyRocks,
|
|
2849
|
+
Do as Mound,
|
|
2850
|
+
Pt as MoundGeometry,
|
|
2851
|
+
Wo as NightSkybox,
|
|
2852
|
+
mo as ObeliskHeadstone,
|
|
2853
|
+
ut as ObeliskHeadstoneGeometry,
|
|
2854
|
+
So as Rock,
|
|
2855
|
+
yt as RockGeometry,
|
|
2856
|
+
Io as Rocks,
|
|
2857
|
+
ho as RoundedHeadstone,
|
|
2858
|
+
mt as RoundedHeadstoneGeometry,
|
|
2859
|
+
ln as SceneUtils,
|
|
2860
|
+
oo as SimpleLeafGeometry,
|
|
2861
|
+
eo as SpiralStaircaseGeometry,
|
|
2862
|
+
_o as SpiralTube,
|
|
2863
|
+
fo as SquareHeadstone,
|
|
2864
|
+
ht as SquareHeadstoneGeometry,
|
|
2865
|
+
to as StaircaseGeometry,
|
|
2866
|
+
Uo as Stand,
|
|
2867
|
+
bt as StandGeometry,
|
|
2868
|
+
Ro as Star,
|
|
2869
|
+
Ct as StarShape,
|
|
2870
|
+
Fo as TeslaCoil,
|
|
2871
|
+
Oo as TestTube,
|
|
2872
|
+
H as TestTubeGeometry,
|
|
2873
|
+
zo as TestTubeRack,
|
|
2874
|
+
Yo as Tree,
|
|
2875
|
+
At as TreeGeometry,
|
|
2876
|
+
en as TwilightSkybox,
|
|
2877
|
+
qo as WineBottle,
|
|
2878
|
+
St as WineBottleGeometry,
|
|
2879
|
+
wo as WroughtIronBar,
|
|
2880
|
+
ue as WroughtIronBarGeometry,
|
|
2881
|
+
yo as WroughtIronFence,
|
|
2882
|
+
pt as WroughtIronFenceGeometry,
|
|
2883
|
+
Ko as addNoiseDisplacement,
|
|
2884
|
+
Ho as addWaterDisplacement,
|
|
2885
|
+
Gt as capHeightFromRadius,
|
|
2886
|
+
so as capWidthFromRadius,
|
|
2887
|
+
ro as cartesianToSpherical,
|
|
2888
|
+
on as centerGroup,
|
|
2889
|
+
nn as centerGroupAtTarget,
|
|
2890
|
+
sn as centerInstancedMesh,
|
|
2891
|
+
rn as centerMesh,
|
|
2892
|
+
cn as centerMeshGeometry,
|
|
2893
|
+
tn as checkerboardTexture,
|
|
2894
|
+
je as circularEaseIn,
|
|
2895
|
+
Je as circularEaseInOut,
|
|
2896
|
+
Ke as circularEaseOut,
|
|
2897
|
+
et as concave,
|
|
2898
|
+
tt as convex,
|
|
2899
|
+
Oe as cubicEaseIn,
|
|
2900
|
+
qe as cubicEaseInOut,
|
|
2901
|
+
ze as cubicEaseOut,
|
|
2902
|
+
ne as daySkyShader,
|
|
2903
|
+
Lt as displacementBrush,
|
|
2904
|
+
Qe as exponentialEaseIn,
|
|
2905
|
+
He as exponentialEaseInOut,
|
|
2906
|
+
De as exponentialEaseOut,
|
|
2907
|
+
kt as fadeShader,
|
|
2908
|
+
Vt as flattenBrush,
|
|
2909
|
+
at as gaussian,
|
|
2910
|
+
an as interpolateCurve,
|
|
2911
|
+
st as inverse,
|
|
2912
|
+
$e as linear,
|
|
2913
|
+
ot as logarithmic,
|
|
2914
|
+
ct as logarithmicRandomMax,
|
|
2915
|
+
it as logarithmicRandomMin,
|
|
2916
|
+
D as nightSkyShader,
|
|
2917
|
+
Xt as noiseBrush,
|
|
2918
|
+
_e as quadraticEaseIn,
|
|
2919
|
+
Fe as quadraticEaseInOut,
|
|
2920
|
+
Ue as quadraticEaseOut,
|
|
2921
|
+
Le as quarticEaseIn,
|
|
2922
|
+
Xe as quarticEaseInOut,
|
|
2923
|
+
Ve as quarticEaseOut,
|
|
2924
|
+
Re as quinticEaseIn,
|
|
2925
|
+
Ye as quinticEaseInOut,
|
|
2926
|
+
Ze as quinticEaseOut,
|
|
2927
|
+
no as radiusFromCapHeight,
|
|
2928
|
+
me as radiusFromCapWidth,
|
|
2929
|
+
rt as randomFloat,
|
|
2930
|
+
Ht as randomInteger,
|
|
2931
|
+
wt as randomTransformVertices,
|
|
2932
|
+
jt as rowOfBooksByCount,
|
|
2933
|
+
Kt as rowOfBooksByLength,
|
|
2934
|
+
le as rowOfBooksByScales,
|
|
2935
|
+
Ce as sineEaseIn,
|
|
2936
|
+
Ne as sineEaseInOut,
|
|
2937
|
+
ke as sineEaseOut,
|
|
2938
|
+
Rt as smoothBrush,
|
|
2939
|
+
We as smoothstep,
|
|
2940
|
+
ao as sphericalToCartesian,
|
|
2941
|
+
Zt as spikeBrush,
|
|
2942
|
+
nt as squareRoot,
|
|
2943
|
+
Yt as twistBrush,
|
|
2944
|
+
Jo as updateNoiseDisplacementTime,
|
|
2945
|
+
jo as updateWaterDisplacementTime
|
|
2775
2946
|
};
|
|
2776
2947
|
//# sourceMappingURL=index.es.js.map
|