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