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