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