three-low-poly 0.9.14 → 0.9.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +11 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +471 -36
- package/dist/index.es.js +1190 -958
- package/dist/index.es.js.map +1 -1
- package/dist/index.iife.js +11 -11
- package/dist/index.iife.js.map +1 -1
- package/dist/index.umd.js +11 -11
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { Vector3 as
|
|
5
|
-
function
|
|
6
|
-
const r = e.position.clone(),
|
|
7
|
-
let
|
|
1
|
+
var gt = Object.defineProperty;
|
|
2
|
+
var bt = (e, t, o) => t in e ? gt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
+
var g = (e, t, o) => bt(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
+
import { Vector3 as b, MathUtils as O, Quaternion as It, InstancedMesh as rt, SphereGeometry as N, MeshStandardMaterial as M, Matrix4 as X, BufferGeometry as S, Float32BufferAttribute as q, DoubleSide as L, Euler as At, BufferAttribute as R, BoxGeometry as A, ConeGeometry as Z, CylinderGeometry as E, Vector2 as I, LatheGeometry as Y, CircleGeometry as St, TorusGeometry as ht, DodecahedronGeometry as at, Group as G, ShaderMaterial as $, Mesh as y, Shape as j, ExtrudeGeometry as H, MeshBasicMaterial as Et, PointLight as ft, MeshPhysicalMaterial as J, CatmullRomCurve3 as Pt, TubeGeometry as Tt, Path as Gt, Color as K, BackSide as it, DataTexture as Bt, RGBAFormat as Ct, UnsignedByteType as Ut, RepeatWrapping as ut, NearestFilter as zt, Box3 as ct } from "three";
|
|
5
|
+
function ro(e, t, o, n) {
|
|
6
|
+
const r = e.position.clone(), s = r.clone().add(e.getWorldDirection(new b()).multiplyScalar(-t));
|
|
7
|
+
let a = null;
|
|
8
8
|
function i(c) {
|
|
9
|
-
|
|
10
|
-
const u = (c -
|
|
9
|
+
a === null && (a = c);
|
|
10
|
+
const u = (c - a) / o;
|
|
11
11
|
if (u >= 1) {
|
|
12
|
-
e.position.copy(
|
|
12
|
+
e.position.copy(s), n && n();
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
-
e.position.lerpVectors(r,
|
|
15
|
+
e.position.lerpVectors(r, s, u), requestAnimationFrame(i);
|
|
16
16
|
}
|
|
17
17
|
requestAnimationFrame(i);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function ao(e, t, o, n) {
|
|
20
20
|
const r = t.length - 1;
|
|
21
|
-
let
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
const l = (i -
|
|
21
|
+
let s = null;
|
|
22
|
+
function a(i) {
|
|
23
|
+
s === null && (s = i);
|
|
24
|
+
const l = (i - s) / o;
|
|
25
25
|
if (l >= 1) {
|
|
26
26
|
e.position.copy(t[t.length - 1]), n && n();
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
const u = l * r, m = Math.floor(u), h = u - m, f = t[m], p = t[m + 1];
|
|
30
|
-
e.position.lerpVectors(f, p, h), e.lookAt(p), requestAnimationFrame(
|
|
30
|
+
e.position.lerpVectors(f, p, h), e.lookAt(p), requestAnimationFrame(a);
|
|
31
31
|
}
|
|
32
|
-
requestAnimationFrame(
|
|
32
|
+
requestAnimationFrame(a);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
let
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
const l = (i -
|
|
34
|
+
function io(e, t, o, n, r) {
|
|
35
|
+
let s = null;
|
|
36
|
+
function a(i) {
|
|
37
|
+
s || (s = i);
|
|
38
|
+
const l = (i - s) / n;
|
|
39
39
|
if (l >= 1) {
|
|
40
40
|
r && r();
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
const u = l * Math.PI * 2, m = t.x + o * Math.cos(u), h = t.z + o * Math.sin(u);
|
|
44
|
-
e.position.set(m, e.position.y, h), e.lookAt(t), requestAnimationFrame(
|
|
44
|
+
e.position.set(m, e.position.y, h), e.lookAt(t), requestAnimationFrame(a);
|
|
45
45
|
}
|
|
46
|
-
requestAnimationFrame(
|
|
46
|
+
requestAnimationFrame(a);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
let
|
|
48
|
+
function co(e, t, o, n, r, s) {
|
|
49
|
+
let a = null, i = 0;
|
|
50
50
|
function c(l) {
|
|
51
|
-
|
|
52
|
-
const u = l -
|
|
51
|
+
a === null && (a = l);
|
|
52
|
+
const u = l - a, m = n / r, h = u % m / m, f = Math.sin(h * Math.PI * 2) * Math.PI / 6, p = t.x + o * Math.sin(f), d = t.z + o * Math.cos(f);
|
|
53
53
|
if (e.position.set(p, e.position.y, d), e.lookAt(t), u >= (i + 1) * m && i++, i >= r) {
|
|
54
|
-
|
|
54
|
+
s && s();
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
requestAnimationFrame(c);
|
|
58
58
|
}
|
|
59
59
|
requestAnimationFrame(c);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function lo(e, t, o, n, r, s, a) {
|
|
62
62
|
let i = null;
|
|
63
63
|
function c(l) {
|
|
64
64
|
i === null && (i = l);
|
|
65
|
-
const m = (l - i) /
|
|
65
|
+
const m = (l - i) / s;
|
|
66
66
|
if (m >= 1) {
|
|
67
|
-
|
|
67
|
+
a && a();
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
const h = m * Math.PI * 2 * r, f = t.x + o * Math.cos(h), p = t.z + o * Math.sin(h), d = t.y + n * m;
|
|
@@ -72,53 +72,46 @@ function no(e, t, o, n, r, a, s) {
|
|
|
72
72
|
}
|
|
73
73
|
requestAnimationFrame(c);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function uo(e, t, o, n) {
|
|
76
76
|
const r = e.position.clone();
|
|
77
|
-
let
|
|
78
|
-
function
|
|
79
|
-
if (
|
|
77
|
+
let s = null;
|
|
78
|
+
function a(i) {
|
|
79
|
+
if (s === null && (s = i), (i - s) / o >= 1) {
|
|
80
80
|
e.position.copy(r), n && n();
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
const u = new
|
|
83
|
+
const u = new b(
|
|
84
84
|
(Math.random() - 0.5) * t,
|
|
85
85
|
(Math.random() - 0.5) * t,
|
|
86
86
|
(Math.random() - 0.5) * t
|
|
87
87
|
);
|
|
88
|
-
e.position.copy(r).add(u), requestAnimationFrame(
|
|
88
|
+
e.position.copy(r).add(u), requestAnimationFrame(a);
|
|
89
89
|
}
|
|
90
|
-
requestAnimationFrame(
|
|
90
|
+
requestAnimationFrame(a);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
const
|
|
92
|
+
function mo(e, t, o, n, r, s) {
|
|
93
|
+
const a = e.fov;
|
|
94
94
|
e.fov = o, e.updateProjectionMatrix();
|
|
95
95
|
let i = null;
|
|
96
96
|
function c(l) {
|
|
97
97
|
i === null && (i = l);
|
|
98
98
|
const m = (l - i) / r;
|
|
99
99
|
if (m >= 1) {
|
|
100
|
-
e.fov = n, e.updateProjectionMatrix(), e.lookAt(t), e.fov =
|
|
100
|
+
e.fov = n, e.updateProjectionMatrix(), e.lookAt(t), e.fov = a, e.updateProjectionMatrix(), s && s();
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
e.fov =
|
|
103
|
+
e.fov = O.lerp(o, n, m), e.updateProjectionMatrix(), e.lookAt(t), requestAnimationFrame(c);
|
|
104
104
|
}
|
|
105
105
|
requestAnimationFrame(c);
|
|
106
106
|
}
|
|
107
|
-
const
|
|
108
|
-
UP: new
|
|
109
|
-
DOWN: new
|
|
110
|
-
LEFT: new
|
|
111
|
-
RIGHT: new
|
|
112
|
-
FORWARD: new
|
|
113
|
-
BACKWARD: new
|
|
114
|
-
|
|
115
|
-
Y: new g(0, 1, 0),
|
|
116
|
-
Z: new g(0, 0, 1),
|
|
117
|
-
XY: new g(1, 1, 0).normalize(),
|
|
118
|
-
XZ: new g(1, 0, 1).normalize(),
|
|
119
|
-
YZ: new g(0, 1, 1).normalize(),
|
|
120
|
-
XYZ: new g(1, 1, 1).normalize()
|
|
121
|
-
}, K = {
|
|
107
|
+
const W = {
|
|
108
|
+
UP: new b(0, 1, 0),
|
|
109
|
+
DOWN: new b(0, -1, 0),
|
|
110
|
+
LEFT: new b(-1, 0, 0),
|
|
111
|
+
RIGHT: new b(1, 0, 0),
|
|
112
|
+
FORWARD: new b(0, 0, 1),
|
|
113
|
+
BACKWARD: new b(0, 0, -1)
|
|
114
|
+
}, Q = {
|
|
122
115
|
LINEAR: (e, t) => 1 - e / t,
|
|
123
116
|
QUADRATIC: (e, t) => Math.pow(1 - e / t, 2),
|
|
124
117
|
SQUARE_ROOT: (e, t) => Math.pow(1 - e / t, 0.5),
|
|
@@ -132,146 +125,154 @@ const q = {
|
|
|
132
125
|
const o = Math.max(0, Math.min(1, 1 - e / t));
|
|
133
126
|
return o * o * (3 - 2 * o);
|
|
134
127
|
}
|
|
135
|
-
},
|
|
136
|
-
const
|
|
137
|
-
for (let i = 0; i <
|
|
138
|
-
const c = new
|
|
139
|
-
c.fromBufferAttribute(
|
|
128
|
+
}, ho = (e, t, o, n, r = W.UP, s = Q.LINEAR) => {
|
|
129
|
+
const a = e.attributes.position;
|
|
130
|
+
for (let i = 0; i < a.count; i++) {
|
|
131
|
+
const c = new b();
|
|
132
|
+
c.fromBufferAttribute(a, i);
|
|
140
133
|
const l = c.distanceTo(t);
|
|
141
134
|
if (l < o) {
|
|
142
|
-
const m =
|
|
143
|
-
c.add(r.clone().multiplyScalar(m)),
|
|
135
|
+
const m = s(l, o) * n;
|
|
136
|
+
c.add(r.clone().multiplyScalar(m)), a.setXYZ(i, c.x, c.y, c.z);
|
|
144
137
|
}
|
|
145
138
|
}
|
|
146
|
-
|
|
147
|
-
},
|
|
139
|
+
a.needsUpdate = !0;
|
|
140
|
+
}, fo = (e, t, o, n, r, s = W.UP, a = Q.LINEAR) => {
|
|
148
141
|
const i = e.attributes.position;
|
|
149
142
|
for (let c = 0; c < i.count; c++) {
|
|
150
|
-
const l = new
|
|
143
|
+
const l = new b();
|
|
151
144
|
l.fromBufferAttribute(i, c);
|
|
152
145
|
const u = l.distanceTo(t);
|
|
153
146
|
if (u < o) {
|
|
154
|
-
const h =
|
|
155
|
-
l.add(
|
|
147
|
+
const h = a(u, o) * r, f = l.dot(s.normalize()), p = n - f;
|
|
148
|
+
l.add(s.clone().multiplyScalar(p * h)), i.setXYZ(c, l.x, l.y, l.z);
|
|
156
149
|
}
|
|
157
150
|
}
|
|
158
151
|
i.needsUpdate = !0;
|
|
159
|
-
},
|
|
160
|
-
const
|
|
161
|
-
for (let i = 0; i <
|
|
162
|
-
const c = new
|
|
163
|
-
c.fromBufferAttribute(
|
|
152
|
+
}, po = (e, t, o, n, r = W.UP, s = Q.LINEAR) => {
|
|
153
|
+
const a = e.attributes.position;
|
|
154
|
+
for (let i = 0; i < a.count; i++) {
|
|
155
|
+
const c = new b();
|
|
156
|
+
c.fromBufferAttribute(a, i);
|
|
164
157
|
const l = c.distanceTo(t);
|
|
165
158
|
if (l < o) {
|
|
166
|
-
const u =
|
|
167
|
-
c.x +=
|
|
159
|
+
const u = s(l, o), m = n * u, h = r.clone().normalize();
|
|
160
|
+
c.x += O.randFloatSpread(m) * h.x, c.y += O.randFloatSpread(m) * h.y, c.z += O.randFloatSpread(m) * h.z, a.setXYZ(i, c.x, c.y, c.z);
|
|
168
161
|
}
|
|
169
162
|
}
|
|
170
|
-
|
|
171
|
-
},
|
|
172
|
-
const r = e.attributes.position,
|
|
173
|
-
for (let
|
|
174
|
-
const i = new
|
|
175
|
-
if (i.fromBufferAttribute(r,
|
|
176
|
-
let l = new
|
|
163
|
+
a.needsUpdate = !0;
|
|
164
|
+
}, yo = (e, t, o, n) => {
|
|
165
|
+
const r = e.attributes.position, s = new b();
|
|
166
|
+
for (let a = 0; a < r.count; a++) {
|
|
167
|
+
const i = new b();
|
|
168
|
+
if (i.fromBufferAttribute(r, a), i.distanceTo(t) < o) {
|
|
169
|
+
let l = new b(), u = 0;
|
|
177
170
|
for (let m = 0; m < r.count; m++)
|
|
178
|
-
|
|
179
|
-
u > 0 && (l.divideScalar(u), i.lerp(l, n), r.setXYZ(
|
|
171
|
+
s.fromBufferAttribute(r, m), s.distanceTo(i) < o && (l.add(s), u++);
|
|
172
|
+
u > 0 && (l.divideScalar(u), i.lerp(l, n), r.setXYZ(a, i.x, i.y, i.z));
|
|
180
173
|
}
|
|
181
174
|
}
|
|
182
175
|
r.needsUpdate = !0;
|
|
183
|
-
},
|
|
184
|
-
const
|
|
185
|
-
for (let i = 0; i <
|
|
186
|
-
const c = new
|
|
187
|
-
c.fromBufferAttribute(
|
|
176
|
+
}, Mo = (e, t, o, n, r = !1, s = Q.LINEAR) => {
|
|
177
|
+
const a = e.attributes.position;
|
|
178
|
+
for (let i = 0; i < a.count; i++) {
|
|
179
|
+
const c = new b();
|
|
180
|
+
c.fromBufferAttribute(a, i);
|
|
188
181
|
const l = c.distanceTo(t);
|
|
189
182
|
if (l < o) {
|
|
190
|
-
const m =
|
|
191
|
-
c.add(h.multiplyScalar(m)),
|
|
183
|
+
const m = s(l, o) * n * (r ? -1 : 1), h = c.clone().sub(t).normalize();
|
|
184
|
+
c.add(h.multiplyScalar(m)), a.setXYZ(i, c.x, c.y, c.z);
|
|
192
185
|
}
|
|
193
186
|
}
|
|
194
|
-
|
|
195
|
-
},
|
|
196
|
-
const
|
|
197
|
-
for (let c = 0; c <
|
|
198
|
-
const l = new
|
|
199
|
-
l.fromBufferAttribute(
|
|
187
|
+
a.needsUpdate = !0;
|
|
188
|
+
}, wo = (e, t, o, n, r = W.UP, s = Q.LINEAR) => {
|
|
189
|
+
const a = e.attributes.position, i = new It();
|
|
190
|
+
for (let c = 0; c < a.count; c++) {
|
|
191
|
+
const l = new b();
|
|
192
|
+
l.fromBufferAttribute(a, c);
|
|
200
193
|
const u = l.distanceTo(t);
|
|
201
194
|
if (u < o) {
|
|
202
|
-
const h =
|
|
203
|
-
i.setFromAxisAngle(r, h), l.sub(t).applyQuaternion(i).add(t),
|
|
195
|
+
const h = s(u, o) * n;
|
|
196
|
+
i.setFromAxisAngle(r, h), l.sub(t).applyQuaternion(i).add(t), a.setXYZ(c, l.x, l.y, l.z);
|
|
204
197
|
}
|
|
205
198
|
}
|
|
206
|
-
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
199
|
+
a.needsUpdate = !0;
|
|
200
|
+
}, lt = {
|
|
201
|
+
X: new b(1, 0, 0),
|
|
202
|
+
Y: new b(0, 1, 0),
|
|
203
|
+
Z: new b(0, 0, 1),
|
|
204
|
+
XY: new b(1, 1, 0).normalize(),
|
|
205
|
+
XZ: new b(1, 0, 1).normalize(),
|
|
206
|
+
YZ: new b(0, 1, 1).normalize(),
|
|
207
|
+
XYZ: new b(1, 1, 1).normalize()
|
|
208
|
+
}, Nt = (e) => 1 - Math.cos(e * Math.PI / 2), kt = (e) => Math.sin(e * Math.PI / 2), Ft = (e) => -0.5 * (Math.cos(Math.PI * e) - 1), Ot = (e) => e * e, _t = (e) => 1 - Math.pow(1 - e, 2), Rt = (e) => e < 0.5 ? 2 * e * e : 1 - Math.pow(-2 * e + 2, 2) / 2, Lt = (e) => e * e * e, qt = (e) => 1 - Math.pow(1 - e, 3), Dt = (e) => e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2, Vt = (e) => e * e * e * e, Xt = (e) => 1 - Math.pow(1 - e, 4), Zt = (e) => e < 0.5 ? 8 * e * e * e * e : 1 - Math.pow(-2 * e + 2, 4) / 2, Yt = (e) => e * e * e * e * e, jt = (e) => 1 - Math.pow(1 - e, 5), Ht = (e) => e < 0.5 ? 16 * e * e * e * e * e : 1 - Math.pow(-2 * e + 2, 5) / 2, Qt = (e) => e === 0 ? 0 : Math.pow(2, 10 * e - 10), Kt = (e) => e === 1 ? 1 : 1 - Math.pow(2, -10 * e), $t = (e) => e === 0 ? 0 : e === 1 ? 1 : e < 0.5 ? Math.pow(2, 20 * e - 10) / 2 : (2 - Math.pow(2, -20 * e + 10)) / 2, Jt = (e) => 1 - Math.sqrt(1 - Math.pow(e, 2)), Wt = (e) => Math.sqrt(1 - Math.pow(e - 1, 2)), te = (e) => e < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * e, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * e + 2, 2)) + 1) / 2, ee = (e) => e, oe = (e) => e * e * (3 - 2 * e), ne = (e) => 1 - Math.pow(1 - e, 0.3), se = (e) => Math.pow(e, 0.3), re = (e) => Math.log(Math.max(0.01, e)) / Math.log(2), ae = (e) => Math.sqrt(e), ie = (e) => 1 - e, ce = (e) => Math.exp(-Math.pow(e - 0.5, 2) / (2 * 0.5)), vo = {
|
|
209
|
+
SINE_EASE_IN: Nt,
|
|
210
|
+
SINE_EASE_OUT: kt,
|
|
211
|
+
SINE_EASE_IN_OUT: Ft,
|
|
212
|
+
QUADRATIC_EASE_IN: Ot,
|
|
213
|
+
QUADRATIC_EASE_OUT: _t,
|
|
214
|
+
QUADRATIC_EASE_IN_OUT: Rt,
|
|
215
|
+
CUBIC_EASE_IN: Lt,
|
|
216
|
+
CUBIC_EASE_OUT: qt,
|
|
217
|
+
CUBIC_EASE_IN_OUT: Dt,
|
|
218
|
+
QUARTIC_EASE_IN: Vt,
|
|
219
|
+
QUARTIC_EASE_OUT: Xt,
|
|
220
|
+
QUARTIC_EASE_IN_OUT: Zt,
|
|
221
|
+
QUINTIC_EASE_IN: Yt,
|
|
222
|
+
QUINTIC_EASE_OUT: jt,
|
|
223
|
+
QUINTIC_EASE_IN_OUT: Ht,
|
|
224
|
+
EXPONENTIAL_EASE_IN: Qt,
|
|
225
|
+
EXPONENTIAL_EASE_OUT: Kt,
|
|
226
|
+
EXPONENTIAL_EASE_IN_OUT: $t,
|
|
227
|
+
CIRCULAR_EASE_IN: Jt,
|
|
228
|
+
CIRCULAR_EASE_OUT: Wt,
|
|
229
|
+
CIRCULAR_EASE_IN_OUT: te,
|
|
230
|
+
LINEAR: ee,
|
|
231
|
+
SMOOTHSTEP: oe,
|
|
232
|
+
CONCAVE: ne,
|
|
233
|
+
CONVEX: se,
|
|
234
|
+
LOGARITHMIC: re,
|
|
235
|
+
SQUARE_ROOT: ae,
|
|
236
|
+
INVERSE: ie,
|
|
237
|
+
GAUSSIAN: ce
|
|
238
|
+
}, le = (e, t, o, n, r) => {
|
|
239
|
+
const s = Math.max(0, Math.min(1, e)), a = 1 - s;
|
|
240
|
+
return a * a * a * t + 3 * a * a * s * o + 3 * a * s * s * n + s * s * s * r;
|
|
241
|
+
}, ue = (e, t = 1) => {
|
|
241
242
|
const o = Math.max(1e-3, t);
|
|
242
243
|
return (1 - Math.exp(-o * e)) / (1 - Math.exp(-o));
|
|
243
|
-
},
|
|
244
|
+
}, me = (e, t = 1, o = 1) => {
|
|
244
245
|
const n = Math.max(0, Math.min(1, e));
|
|
245
246
|
return t * Math.pow(n, o);
|
|
246
|
-
},
|
|
247
|
+
}, he = (e, t = 1, o = 1) => {
|
|
247
248
|
const n = Math.max(1e-3, Math.min(1, e));
|
|
248
249
|
return t * Math.log(o * n + 1);
|
|
249
|
-
},
|
|
250
|
+
}, fe = (e, t = 1, o = 0, n = 0) => {
|
|
250
251
|
const r = Math.max(0, Math.min(1, e));
|
|
251
252
|
return t * r * r + o * r + n;
|
|
252
|
-
},
|
|
253
|
-
const r = Math.max(0, Math.min(1, e)),
|
|
254
|
-
return
|
|
255
|
-
},
|
|
253
|
+
}, pe = (e, t, o, n) => {
|
|
254
|
+
const r = Math.max(0, Math.min(1, e)), s = 1 - r;
|
|
255
|
+
return s * s * t + 2 * s * r * o + r * r * n;
|
|
256
|
+
}, de = (e, t = 10) => {
|
|
256
257
|
const o = Math.max(0, Math.min(1, e));
|
|
257
258
|
return 1 / (1 + Math.exp(-t * (o - 0.5)));
|
|
258
|
-
},
|
|
259
|
-
CUBIC:
|
|
260
|
-
DAMPED:
|
|
261
|
-
EXPONENTIAL:
|
|
262
|
-
LOGARITHMIC:
|
|
263
|
-
PARABOLIC:
|
|
264
|
-
QUADRATIC:
|
|
265
|
-
SIGMOID:
|
|
266
|
-
SINUSOIDAL:
|
|
259
|
+
}, ye = (e) => Math.sin(e * Math.PI * 0.5), _ = {
|
|
260
|
+
CUBIC: le,
|
|
261
|
+
DAMPED: ue,
|
|
262
|
+
EXPONENTIAL: me,
|
|
263
|
+
LOGARITHMIC: he,
|
|
264
|
+
PARABOLIC: fe,
|
|
265
|
+
QUADRATIC: pe,
|
|
266
|
+
SIGMOID: de,
|
|
267
|
+
SINUSOIDAL: ye
|
|
267
268
|
};
|
|
268
|
-
class
|
|
269
|
+
class xo extends rt {
|
|
269
270
|
constructor(o = {}) {
|
|
270
271
|
const {
|
|
271
272
|
count: n = 20,
|
|
272
273
|
width: r = 1.5,
|
|
273
|
-
height:
|
|
274
|
-
depth:
|
|
274
|
+
height: s = 3,
|
|
275
|
+
depth: a = 1.5,
|
|
275
276
|
geometry: i = new N(0.1, 6, 6),
|
|
276
277
|
// Small spheres
|
|
277
278
|
material: c = new M({
|
|
@@ -283,17 +284,17 @@ class fo extends rt {
|
|
|
283
284
|
})
|
|
284
285
|
} = o;
|
|
285
286
|
super(i, c, n);
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
this.height =
|
|
287
|
+
g(this, "bubblePositions", []);
|
|
288
|
+
g(this, "velocities", []);
|
|
289
|
+
g(this, "width");
|
|
290
|
+
g(this, "height");
|
|
291
|
+
g(this, "depth");
|
|
292
|
+
this.height = s, this.width = r, this.depth = a;
|
|
292
293
|
for (let l = 0; l < this.count; l++) {
|
|
293
|
-
const u = new
|
|
294
|
+
const u = new b(
|
|
294
295
|
(Math.random() - 0.5) * r,
|
|
295
|
-
Math.random() * (
|
|
296
|
-
(Math.random() - 0.5) *
|
|
296
|
+
Math.random() * (s - 1) + 0.5,
|
|
297
|
+
(Math.random() - 0.5) * a
|
|
297
298
|
);
|
|
298
299
|
this.bubblePositions.push(u), this.velocities.push(0.01 + Math.random() * 0.02), this.updateInstanceMatrix(l);
|
|
299
300
|
}
|
|
@@ -302,7 +303,7 @@ class fo extends rt {
|
|
|
302
303
|
* Updates the position of a specific bubble instance in the InstancedMesh.
|
|
303
304
|
*/
|
|
304
305
|
updateInstanceMatrix(o) {
|
|
305
|
-
const n = this.bubblePositions[o], r = new
|
|
306
|
+
const n = this.bubblePositions[o], r = new X().setPosition(n);
|
|
306
307
|
this.setMatrixAt(o, r), this.instanceMatrix.needsUpdate = !0;
|
|
307
308
|
}
|
|
308
309
|
/**
|
|
@@ -316,7 +317,36 @@ class fo extends rt {
|
|
|
316
317
|
}
|
|
317
318
|
}
|
|
318
319
|
}
|
|
319
|
-
class
|
|
320
|
+
class go {
|
|
321
|
+
constructor(t) {
|
|
322
|
+
g(this, "speed");
|
|
323
|
+
g(this, "maxIntensity");
|
|
324
|
+
g(this, "minIntensity");
|
|
325
|
+
g(this, "material");
|
|
326
|
+
const {
|
|
327
|
+
speed: o = 2,
|
|
328
|
+
//
|
|
329
|
+
maxIntensity: n = 0.8,
|
|
330
|
+
minIntensity: r = 0.2
|
|
331
|
+
} = t;
|
|
332
|
+
this.speed = o, this.maxIntensity = n, this.minIntensity = r, this.material = t.material;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Update the emissive intensity of the material.
|
|
336
|
+
*
|
|
337
|
+
* Use Three.Clock getElapsedTime()
|
|
338
|
+
*
|
|
339
|
+
* Example:
|
|
340
|
+
* ```
|
|
341
|
+
* const clock = new THREE.Clock();
|
|
342
|
+
* effect.update(clock.getElapsedTime());
|
|
343
|
+
* ```
|
|
344
|
+
*/
|
|
345
|
+
update(t = 0) {
|
|
346
|
+
this.material.emissiveIntensity = this.minIntensity + Math.abs(Math.sin(t * this.speed)) * (this.maxIntensity - this.minIntensity);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
class Me extends S {
|
|
320
350
|
constructor(t = 0.1) {
|
|
321
351
|
super();
|
|
322
352
|
const o = [], n = [], r = [
|
|
@@ -337,25 +367,25 @@ class de extends I {
|
|
|
337
367
|
[-0.5, 0.75]
|
|
338
368
|
// Left upper middle
|
|
339
369
|
];
|
|
340
|
-
for (let
|
|
341
|
-
const [i, c] = r[
|
|
370
|
+
for (let a = 0; a < r.length; a++) {
|
|
371
|
+
const [i, c] = r[a];
|
|
342
372
|
o.push(i * t, c * t, 0);
|
|
343
373
|
}
|
|
344
|
-
for (let
|
|
345
|
-
n.push(0,
|
|
374
|
+
for (let a = 1; a < r.length - 1; a++)
|
|
375
|
+
n.push(0, a, a + 1);
|
|
346
376
|
n.push(0, r.length - 1, 1);
|
|
347
|
-
const
|
|
348
|
-
this.setAttribute("position",
|
|
377
|
+
const s = new q(o, 3);
|
|
378
|
+
this.setAttribute("position", s), this.setIndex(n), this.computeVertexNormals();
|
|
349
379
|
}
|
|
350
380
|
}
|
|
351
|
-
class
|
|
381
|
+
class bo extends rt {
|
|
352
382
|
constructor(o = {}) {
|
|
353
383
|
const {
|
|
354
384
|
count: n = 200,
|
|
355
385
|
width: r = 20,
|
|
356
|
-
height:
|
|
357
|
-
depth:
|
|
358
|
-
geometry: i = new
|
|
386
|
+
height: s = 10,
|
|
387
|
+
depth: a = 20,
|
|
388
|
+
geometry: i = new Me(),
|
|
359
389
|
material: c = new M({
|
|
360
390
|
color: 8956467,
|
|
361
391
|
metalness: 0.1,
|
|
@@ -365,38 +395,93 @@ class po extends rt {
|
|
|
365
395
|
})
|
|
366
396
|
} = o;
|
|
367
397
|
super(i, c, n);
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
this.dummyMatrix = new
|
|
398
|
+
g(this, "dummyMatrix");
|
|
399
|
+
g(this, "velocities");
|
|
400
|
+
g(this, "width");
|
|
401
|
+
g(this, "height");
|
|
402
|
+
g(this, "depth");
|
|
403
|
+
this.dummyMatrix = new X(), this.velocities = [], this.width = r, this.height = s, this.depth = a;
|
|
374
404
|
for (let l = 0; l < n; l++) {
|
|
375
|
-
const u = (Math.random() - 0.5) * r, m = Math.random() * (
|
|
376
|
-
this.dummyMatrix.makeRotationFromEuler(new
|
|
377
|
-
const w = new
|
|
405
|
+
const u = (Math.random() - 0.5) * r, m = Math.random() * (s - 1) + 0.5, h = (Math.random() - 0.5) * a, f = (Math.random() - 0.5) * Math.PI, p = (Math.random() - 0.5) * Math.PI, d = (Math.random() - 0.5) * Math.PI;
|
|
406
|
+
this.dummyMatrix.makeRotationFromEuler(new At(f, p, d)), this.dummyMatrix.setPosition(u, m, h), this.setMatrixAt(l, this.dummyMatrix);
|
|
407
|
+
const w = new b((Math.random() - 0.5) * 0.01, -5e-3, (Math.random() - 0.5) * 0.01);
|
|
378
408
|
this.velocities.push(w);
|
|
379
409
|
}
|
|
380
410
|
this.instanceMatrix.needsUpdate = !0;
|
|
381
411
|
}
|
|
382
412
|
update() {
|
|
383
413
|
for (let o = 0; o < this.count; o++) {
|
|
384
|
-
const n = new
|
|
414
|
+
const n = new X();
|
|
385
415
|
this.getMatrixAt(o, n);
|
|
386
|
-
const r = new
|
|
416
|
+
const r = new b();
|
|
387
417
|
r.setFromMatrixPosition(n);
|
|
388
|
-
const
|
|
389
|
-
r.add(
|
|
418
|
+
const s = this.velocities[o];
|
|
419
|
+
r.add(s), r.y < 0 && (r.set(
|
|
390
420
|
(Math.random() - 0.5) * this.width,
|
|
391
421
|
Math.random() * (this.height - 1) + 0.5,
|
|
392
422
|
(Math.random() - 0.5) * this.depth
|
|
393
|
-
),
|
|
423
|
+
), s.set((Math.random() - 0.5) * 0.01, -5e-3, (Math.random() - 0.5) * 0.01)), n.setPosition(r), this.setMatrixAt(o, n);
|
|
394
424
|
}
|
|
395
425
|
this.instanceMatrix.needsUpdate = !0;
|
|
396
426
|
}
|
|
397
427
|
}
|
|
398
|
-
|
|
399
|
-
|
|
428
|
+
function pt(e = 0, t = 1) {
|
|
429
|
+
return Math.random() * (t - e) + e;
|
|
430
|
+
}
|
|
431
|
+
function Io(e = 0, t = 1) {
|
|
432
|
+
return Math.floor(Math.random() * (t - e + 1)) + e;
|
|
433
|
+
}
|
|
434
|
+
function we(e = 0.5, t = 0, o = 1) {
|
|
435
|
+
return t + (o - t) * Math.pow(Math.random(), e);
|
|
436
|
+
}
|
|
437
|
+
function ve(e = 0.5, t = 0, o = 1) {
|
|
438
|
+
return t + (o - t) * Math.pow(1 - Math.random(), e);
|
|
439
|
+
}
|
|
440
|
+
function xe(e, t, o) {
|
|
441
|
+
const n = t + Math.random() * (o - t);
|
|
442
|
+
return setTimeout(e, n);
|
|
443
|
+
}
|
|
444
|
+
function Ao(e, t, o) {
|
|
445
|
+
let n;
|
|
446
|
+
function r() {
|
|
447
|
+
const s = t + Math.random() * (o - t);
|
|
448
|
+
n = setTimeout(() => {
|
|
449
|
+
e(), r();
|
|
450
|
+
}, s);
|
|
451
|
+
}
|
|
452
|
+
return r(), () => clearTimeout(n);
|
|
453
|
+
}
|
|
454
|
+
class So {
|
|
455
|
+
constructor({
|
|
456
|
+
light: t,
|
|
457
|
+
//
|
|
458
|
+
minIntensity: o = 15,
|
|
459
|
+
maxIntensity: n = 20,
|
|
460
|
+
minDuration: r = 50,
|
|
461
|
+
maxDuration: s = 250
|
|
462
|
+
} = {}) {
|
|
463
|
+
g(this, "light");
|
|
464
|
+
g(this, "minIntensity");
|
|
465
|
+
g(this, "maxIntensity");
|
|
466
|
+
g(this, "minDuration");
|
|
467
|
+
g(this, "maxDuration");
|
|
468
|
+
this.light = t, this.minIntensity = o, this.maxIntensity = n, this.minDuration = r, this.maxDuration = s;
|
|
469
|
+
}
|
|
470
|
+
triggerLightning() {
|
|
471
|
+
this.light && (this.light.intensity = pt(this.minIntensity, this.maxIntensity)), xe(
|
|
472
|
+
() => {
|
|
473
|
+
this.light && (this.light.intensity = 0);
|
|
474
|
+
},
|
|
475
|
+
this.minDuration,
|
|
476
|
+
this.maxDuration
|
|
477
|
+
);
|
|
478
|
+
}
|
|
479
|
+
update() {
|
|
480
|
+
Math.random() > 0.98 && this.triggerLightning();
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
const T = (e, t) => {
|
|
484
|
+
const o = e[0].index !== null, n = new Set(Object.keys(e[0].attributes)), r = new Set(Object.keys(e[0].morphAttributes)), s = {}, a = {}, i = e[0].morphTargetsRelative, c = new S();
|
|
400
485
|
let l = 0;
|
|
401
486
|
if (e.forEach((u, m) => {
|
|
402
487
|
let h = 0;
|
|
@@ -409,7 +494,7 @@ const B = (e, t) => {
|
|
|
409
494
|
return console.error(
|
|
410
495
|
"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + m + '. All geometries must have compatible attributes; make sure "' + f + '" attribute exists among all geometries, or in none of them.'
|
|
411
496
|
), null;
|
|
412
|
-
|
|
497
|
+
s[f] === void 0 && (s[f] = []), s[f].push(u.attributes[f]), h++;
|
|
413
498
|
}
|
|
414
499
|
if (h !== n.size)
|
|
415
500
|
return console.error(
|
|
@@ -424,7 +509,7 @@ const B = (e, t) => {
|
|
|
424
509
|
return console.error(
|
|
425
510
|
"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + m + ". .morphAttributes must be consistent throughout all geometries."
|
|
426
511
|
), null;
|
|
427
|
-
|
|
512
|
+
a[f] === void 0 && (a[f] = []), a[f].push(u.morphAttributes[f]);
|
|
428
513
|
}
|
|
429
514
|
if (c.userData.mergedUserData = c.userData.mergedUserData || [], c.userData.mergedUserData.push(u.userData), t) {
|
|
430
515
|
let f;
|
|
@@ -448,24 +533,24 @@ const B = (e, t) => {
|
|
|
448
533
|
u += h.attributes.position.count;
|
|
449
534
|
}), c.setIndex(m);
|
|
450
535
|
}
|
|
451
|
-
for (let u in
|
|
452
|
-
const m =
|
|
536
|
+
for (let u in s) {
|
|
537
|
+
const m = mt(s[u]);
|
|
453
538
|
if (!m)
|
|
454
539
|
return console.error(
|
|
455
540
|
"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the " + u + " attribute."
|
|
456
541
|
), null;
|
|
457
542
|
c.setAttribute(u, m);
|
|
458
543
|
}
|
|
459
|
-
for (let u in
|
|
460
|
-
const m =
|
|
544
|
+
for (let u in a) {
|
|
545
|
+
const m = a[u][0].length;
|
|
461
546
|
if (m === 0)
|
|
462
547
|
break;
|
|
463
548
|
c.morphAttributes = c.morphAttributes || {}, c.morphAttributes[u] = [];
|
|
464
549
|
for (let h = 0; h < m; ++h) {
|
|
465
550
|
const f = [];
|
|
466
|
-
for (let d = 0; d <
|
|
467
|
-
f.push(
|
|
468
|
-
const p =
|
|
551
|
+
for (let d = 0; d < a[u].length; ++d)
|
|
552
|
+
f.push(a[u][d][h]);
|
|
553
|
+
const p = mt(f);
|
|
469
554
|
if (!p)
|
|
470
555
|
return console.error(
|
|
471
556
|
"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the " + u + " morphAttribute."
|
|
@@ -474,34 +559,34 @@ const B = (e, t) => {
|
|
|
474
559
|
}
|
|
475
560
|
}
|
|
476
561
|
return c;
|
|
477
|
-
},
|
|
562
|
+
}, mt = (e) => {
|
|
478
563
|
let t, o, n, r = 0;
|
|
479
|
-
if (e.forEach((
|
|
480
|
-
if (t === void 0 && (t =
|
|
564
|
+
if (e.forEach((s) => {
|
|
565
|
+
if (t === void 0 && (t = s.array.constructor), t !== s.array.constructor)
|
|
481
566
|
return console.error(
|
|
482
567
|
"THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."
|
|
483
568
|
), null;
|
|
484
|
-
if (o === void 0 && (o =
|
|
569
|
+
if (o === void 0 && (o = s.itemSize), o !== s.itemSize)
|
|
485
570
|
return console.error(
|
|
486
571
|
"THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."
|
|
487
572
|
), null;
|
|
488
|
-
if (n === void 0 && (n =
|
|
573
|
+
if (n === void 0 && (n = s.normalized), n !== s.normalized)
|
|
489
574
|
return console.error(
|
|
490
575
|
"THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."
|
|
491
576
|
), null;
|
|
492
|
-
r +=
|
|
577
|
+
r += s.array.length;
|
|
493
578
|
}), t && o) {
|
|
494
|
-
const
|
|
495
|
-
let
|
|
579
|
+
const s = new t(r);
|
|
580
|
+
let a = 0;
|
|
496
581
|
return e.forEach((i) => {
|
|
497
|
-
|
|
498
|
-
}), new R(
|
|
582
|
+
s.set(i.array, a), a += i.array.length;
|
|
583
|
+
}), new R(s, o, n);
|
|
499
584
|
}
|
|
500
585
|
};
|
|
501
|
-
function
|
|
586
|
+
function ge(e, t = 1e-4) {
|
|
502
587
|
t = Math.max(t, Number.EPSILON);
|
|
503
|
-
const o = {}, n = e.getIndex(), r = e.getAttribute("position"),
|
|
504
|
-
let
|
|
588
|
+
const o = {}, n = e.getIndex(), r = e.getAttribute("position"), s = n ? n.count : r.count;
|
|
589
|
+
let a = 0;
|
|
505
590
|
const i = Object.keys(e.attributes), c = {}, l = {}, u = [], m = ["getX", "getY", "getZ", "getW"];
|
|
506
591
|
for (let d = 0, w = i.length; d < w; d++) {
|
|
507
592
|
const v = i[d];
|
|
@@ -510,59 +595,59 @@ function ye(e, t = 1e-4) {
|
|
|
510
595
|
x && (l[v] = new Array(x.length).fill(0).map(() => []));
|
|
511
596
|
}
|
|
512
597
|
const h = Math.log10(1 / t), f = Math.pow(10, h);
|
|
513
|
-
for (let d = 0; d <
|
|
598
|
+
for (let d = 0; d < s; d++) {
|
|
514
599
|
const w = n ? n.getX(d) : d;
|
|
515
600
|
let v = "";
|
|
516
601
|
for (let x = 0, U = i.length; x < U; x++) {
|
|
517
|
-
const z = i[x],
|
|
518
|
-
for (let k = 0; k <
|
|
519
|
-
v += `${~~(
|
|
602
|
+
const z = i[x], P = e.getAttribute(z), B = P.itemSize;
|
|
603
|
+
for (let k = 0; k < B; k++)
|
|
604
|
+
v += `${~~(P[m[k]](w) * f)},`;
|
|
520
605
|
}
|
|
521
606
|
if (v in o)
|
|
522
607
|
u.push(o[v]);
|
|
523
608
|
else {
|
|
524
609
|
for (let x = 0, U = i.length; x < U; x++) {
|
|
525
|
-
const z = i[x],
|
|
526
|
-
for (let
|
|
527
|
-
const
|
|
528
|
-
if (
|
|
529
|
-
for (let C = 0,
|
|
530
|
-
tt[C].push(
|
|
610
|
+
const z = i[x], P = e.getAttribute(z), B = e.morphAttributes[z], k = P.itemSize, F = c[z], tt = l[z];
|
|
611
|
+
for (let D = 0; D < k; D++) {
|
|
612
|
+
const V = m[D];
|
|
613
|
+
if (F.push(P[V](w)), B)
|
|
614
|
+
for (let C = 0, xt = B.length; C < xt; C++)
|
|
615
|
+
tt[C].push(B[C][V](w));
|
|
531
616
|
}
|
|
532
617
|
}
|
|
533
|
-
o[v] =
|
|
618
|
+
o[v] = a, u.push(a), a++;
|
|
534
619
|
}
|
|
535
620
|
}
|
|
536
621
|
const p = e.clone();
|
|
537
622
|
for (let d = 0, w = i.length; d < w; d++) {
|
|
538
623
|
const v = i[d], x = e.getAttribute(v), U = new x.array.constructor(c[v]), z = new R(U, x.itemSize, x.normalized);
|
|
539
624
|
if (p.setAttribute(v, z), v in l)
|
|
540
|
-
for (let
|
|
541
|
-
const
|
|
542
|
-
p.morphAttributes[v][
|
|
625
|
+
for (let P = 0; P < l[v].length; P++) {
|
|
626
|
+
const B = e.morphAttributes[v][P], k = new B.array.constructor(l[v][P]), F = new R(k, B.itemSize, B.normalized);
|
|
627
|
+
p.morphAttributes[v][P] = F;
|
|
543
628
|
}
|
|
544
629
|
}
|
|
545
630
|
return p.setIndex(u), p;
|
|
546
631
|
}
|
|
547
|
-
class
|
|
548
|
-
constructor(t = 1, o = 1.5, n = 0.5, r = 0.05,
|
|
632
|
+
class dt extends S {
|
|
633
|
+
constructor(t = 1, o = 1.5, n = 0.5, r = 0.05, s = 0.05) {
|
|
549
634
|
super();
|
|
550
|
-
const
|
|
635
|
+
const a = t, i = o, c = n, l = r, u = s, m = [
|
|
551
636
|
// Front cover
|
|
552
637
|
0,
|
|
553
638
|
0,
|
|
554
639
|
0,
|
|
555
|
-
|
|
640
|
+
a,
|
|
556
641
|
0,
|
|
557
642
|
0,
|
|
558
|
-
|
|
643
|
+
a,
|
|
559
644
|
i,
|
|
560
645
|
0,
|
|
561
646
|
0,
|
|
562
647
|
i,
|
|
563
648
|
0,
|
|
564
649
|
// Back cover
|
|
565
|
-
|
|
650
|
+
a,
|
|
566
651
|
0,
|
|
567
652
|
-c,
|
|
568
653
|
0,
|
|
@@ -571,7 +656,7 @@ class ft extends I {
|
|
|
571
656
|
0,
|
|
572
657
|
i,
|
|
573
658
|
-c,
|
|
574
|
-
|
|
659
|
+
a,
|
|
575
660
|
i,
|
|
576
661
|
-c,
|
|
577
662
|
// Spine
|
|
@@ -588,7 +673,7 @@ class ft extends I {
|
|
|
588
673
|
i,
|
|
589
674
|
-c,
|
|
590
675
|
// Inside front cover
|
|
591
|
-
|
|
676
|
+
a,
|
|
592
677
|
0,
|
|
593
678
|
-l,
|
|
594
679
|
l,
|
|
@@ -597,17 +682,17 @@ class ft extends I {
|
|
|
597
682
|
l,
|
|
598
683
|
i,
|
|
599
684
|
-l,
|
|
600
|
-
|
|
685
|
+
a,
|
|
601
686
|
i,
|
|
602
687
|
-l,
|
|
603
688
|
// Inside back cover
|
|
604
689
|
l,
|
|
605
690
|
0,
|
|
606
691
|
-c + l,
|
|
607
|
-
|
|
692
|
+
a,
|
|
608
693
|
0,
|
|
609
694
|
-c + l,
|
|
610
|
-
|
|
695
|
+
a,
|
|
611
696
|
i,
|
|
612
697
|
-c + l,
|
|
613
698
|
l,
|
|
@@ -630,10 +715,10 @@ class ft extends I {
|
|
|
630
715
|
0,
|
|
631
716
|
i,
|
|
632
717
|
0,
|
|
633
|
-
|
|
718
|
+
a,
|
|
634
719
|
i,
|
|
635
720
|
0,
|
|
636
|
-
|
|
721
|
+
a,
|
|
637
722
|
i,
|
|
638
723
|
-l,
|
|
639
724
|
l,
|
|
@@ -646,10 +731,10 @@ class ft extends I {
|
|
|
646
731
|
l,
|
|
647
732
|
i,
|
|
648
733
|
-c + l,
|
|
649
|
-
|
|
734
|
+
a,
|
|
650
735
|
i,
|
|
651
736
|
-c + l,
|
|
652
|
-
|
|
737
|
+
a,
|
|
653
738
|
i,
|
|
654
739
|
-c,
|
|
655
740
|
// Spine cover top
|
|
@@ -672,20 +757,20 @@ class ft extends I {
|
|
|
672
757
|
l,
|
|
673
758
|
0,
|
|
674
759
|
-l,
|
|
675
|
-
|
|
760
|
+
a,
|
|
676
761
|
0,
|
|
677
762
|
-l,
|
|
678
|
-
|
|
763
|
+
a,
|
|
679
764
|
0,
|
|
680
765
|
0,
|
|
681
766
|
// Back cover bottom
|
|
682
767
|
0,
|
|
683
768
|
0,
|
|
684
769
|
-c,
|
|
685
|
-
|
|
770
|
+
a,
|
|
686
771
|
0,
|
|
687
772
|
-c,
|
|
688
|
-
|
|
773
|
+
a,
|
|
689
774
|
0,
|
|
690
775
|
-c + l,
|
|
691
776
|
l,
|
|
@@ -705,29 +790,29 @@ class ft extends I {
|
|
|
705
790
|
0,
|
|
706
791
|
-l,
|
|
707
792
|
// Front cover edge
|
|
708
|
-
|
|
793
|
+
a,
|
|
709
794
|
0,
|
|
710
795
|
0,
|
|
711
|
-
|
|
796
|
+
a,
|
|
712
797
|
0,
|
|
713
798
|
-l,
|
|
714
|
-
|
|
799
|
+
a,
|
|
715
800
|
i,
|
|
716
801
|
-l,
|
|
717
|
-
|
|
802
|
+
a,
|
|
718
803
|
i,
|
|
719
804
|
0,
|
|
720
805
|
// Back cover edge
|
|
721
|
-
|
|
806
|
+
a,
|
|
722
807
|
0,
|
|
723
808
|
-c,
|
|
724
|
-
|
|
809
|
+
a,
|
|
725
810
|
i,
|
|
726
811
|
-c,
|
|
727
|
-
|
|
812
|
+
a,
|
|
728
813
|
i,
|
|
729
814
|
-c + l,
|
|
730
|
-
|
|
815
|
+
a,
|
|
731
816
|
0,
|
|
732
817
|
-c + l
|
|
733
818
|
], h = [
|
|
@@ -1139,89 +1224,77 @@ class ft extends I {
|
|
|
1139
1224
|
54,
|
|
1140
1225
|
55
|
|
1141
1226
|
// Back cover edge
|
|
1142
|
-
], v = new Float32Array(m), x = new Float32Array(h), U = new Float32Array(d), z = new Uint16Array(w),
|
|
1143
|
-
|
|
1144
|
-
const
|
|
1145
|
-
|
|
1227
|
+
], v = new Float32Array(m), x = new Float32Array(h), U = new Float32Array(d), z = new Uint16Array(w), P = new S();
|
|
1228
|
+
P.setAttribute("position", new R(v, 3)), P.setAttribute("normal", new R(x, 3)), P.setAttribute("uv", new R(U, 2)), P.setIndex(new R(z, 1));
|
|
1229
|
+
const B = new A(t - l - u, i - u * 2, c - l * 2);
|
|
1230
|
+
B.translate((t - l - u) / 2 + l, i / 2, -c / 2), this.copy(T([P, B], !0));
|
|
1146
1231
|
}
|
|
1147
1232
|
}
|
|
1148
|
-
function
|
|
1149
|
-
return Math.random() * (t - e) + e;
|
|
1150
|
-
}
|
|
1151
|
-
function yo(e = 0, t = 1) {
|
|
1152
|
-
return Math.floor(Math.random() * (t - e + 1)) + e;
|
|
1153
|
-
}
|
|
1154
|
-
function Me(e = 0.5, t = 0, o = 1) {
|
|
1155
|
-
return t + (o - t) * Math.pow(Math.random(), e);
|
|
1156
|
-
}
|
|
1157
|
-
function ve(e = 0.5, t = 0, o = 1) {
|
|
1158
|
-
return t + (o - t) * Math.pow(1 - Math.random(), e);
|
|
1159
|
-
}
|
|
1160
|
-
function pt({
|
|
1233
|
+
function yt({
|
|
1161
1234
|
scaleXMin: e = 0.4,
|
|
1162
1235
|
scaleXMax: t = 0.7,
|
|
1163
1236
|
scaleYMin: o = 0.3,
|
|
1164
1237
|
scaleYMax: n = 0.95,
|
|
1165
1238
|
scaleZMin: r = 0.1,
|
|
1166
|
-
scaleZMax:
|
|
1239
|
+
scaleZMax: s = 0.5
|
|
1167
1240
|
} = {}) {
|
|
1168
|
-
return new
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
ve(0.8, r,
|
|
1241
|
+
return new b(
|
|
1242
|
+
pt(e, t),
|
|
1243
|
+
we(0.25, o, n),
|
|
1244
|
+
ve(0.8, r, s)
|
|
1172
1245
|
);
|
|
1173
1246
|
}
|
|
1174
|
-
function
|
|
1247
|
+
function Mt({
|
|
1175
1248
|
coverMaterial: e,
|
|
1176
1249
|
pagesMaterial: t,
|
|
1177
1250
|
scales: o
|
|
1178
1251
|
}) {
|
|
1179
|
-
const n = new
|
|
1180
|
-
let
|
|
1252
|
+
const n = new dt(), r = new rt(n, [e, t], o.length), s = new X();
|
|
1253
|
+
let a = 0;
|
|
1181
1254
|
for (let i = 0; i < o.length; i++) {
|
|
1182
|
-
const c = o[i], l = new
|
|
1183
|
-
l.makeScale(c.x, c.y, c.z),
|
|
1255
|
+
const c = o[i], l = new X();
|
|
1256
|
+
l.makeScale(c.x, c.y, c.z), s.identity(), s.multiply(l), s.setPosition(0.01 + Math.random() * 0.1, 0, a + c.z * 0.5), r.setMatrixAt(i, s), a += c.z * 0.5;
|
|
1184
1257
|
}
|
|
1185
1258
|
return r;
|
|
1186
1259
|
}
|
|
1187
|
-
function
|
|
1260
|
+
function Eo({
|
|
1188
1261
|
coverMaterial: e,
|
|
1189
1262
|
pagesMaterial: t,
|
|
1190
1263
|
count: o = 10,
|
|
1191
1264
|
scaleXMin: n = 0.4,
|
|
1192
1265
|
scaleXMax: r = 0.7,
|
|
1193
|
-
scaleYMin:
|
|
1194
|
-
scaleYMax:
|
|
1266
|
+
scaleYMin: s = 0.3,
|
|
1267
|
+
scaleYMax: a = 0.95,
|
|
1195
1268
|
scaleZMin: i = 0.1,
|
|
1196
1269
|
scaleZMax: c = 0.5
|
|
1197
1270
|
}) {
|
|
1198
1271
|
const l = Array.from(
|
|
1199
1272
|
{ length: o },
|
|
1200
|
-
() =>
|
|
1273
|
+
() => yt({ scaleXMin: n, scaleXMax: r, scaleYMin: s, scaleYMax: a, scaleZMin: i, scaleZMax: c })
|
|
1201
1274
|
);
|
|
1202
|
-
return
|
|
1275
|
+
return Mt({ coverMaterial: e, pagesMaterial: t, scales: l });
|
|
1203
1276
|
}
|
|
1204
|
-
function
|
|
1277
|
+
function Po({
|
|
1205
1278
|
coverMaterial: e,
|
|
1206
1279
|
pagesMaterial: t,
|
|
1207
1280
|
length: o = 10,
|
|
1208
1281
|
scaleXMin: n = 0.4,
|
|
1209
1282
|
scaleXMax: r = 0.7,
|
|
1210
|
-
scaleYMin:
|
|
1211
|
-
scaleYMax:
|
|
1283
|
+
scaleYMin: s = 0.3,
|
|
1284
|
+
scaleYMax: a = 0.95,
|
|
1212
1285
|
scaleZMin: i = 0.1,
|
|
1213
1286
|
scaleZMax: c = 0.5
|
|
1214
1287
|
}) {
|
|
1215
1288
|
const l = [];
|
|
1216
1289
|
let u = o;
|
|
1217
1290
|
for (; u > 0; ) {
|
|
1218
|
-
const m =
|
|
1291
|
+
const m = yt({ scaleXMin: n, scaleXMax: r, scaleYMin: s, scaleYMax: a, scaleZMin: i, scaleZMax: c });
|
|
1219
1292
|
m.z = Math.min(m.z, u), l.push(m), u -= m.z;
|
|
1220
1293
|
}
|
|
1221
|
-
return
|
|
1294
|
+
return Mt({ coverMaterial: e, pagesMaterial: t, scales: l });
|
|
1222
1295
|
}
|
|
1223
|
-
class
|
|
1224
|
-
constructor(t = 2, o = 0.3, n = 0.6, r = 5,
|
|
1296
|
+
class To extends S {
|
|
1297
|
+
constructor(t = 2, o = 0.3, n = 0.6, r = 5, s = 5, a = Math.PI / 4) {
|
|
1225
1298
|
super();
|
|
1226
1299
|
const i = [], c = [];
|
|
1227
1300
|
for (let f = 0; f < r; f++) {
|
|
@@ -1312,45 +1385,45 @@ class vo extends I {
|
|
|
1312
1385
|
);
|
|
1313
1386
|
for (let f = 0; f < 2; f++) {
|
|
1314
1387
|
const p = f === 0 ? 1 : -1;
|
|
1315
|
-
for (let d = 0; d <
|
|
1316
|
-
const w = l + d * o, v = w + o, x = p * (m / 4), U = u + n, z = d * n * Math.cos(
|
|
1388
|
+
for (let d = 0; d < s; d++) {
|
|
1389
|
+
const w = l + d * o, v = w + o, x = p * (m / 4), U = u + n, z = d * n * Math.cos(a), P = d * n * Math.sin(a), B = x + p * z - t / 2 * Math.cos(a), k = x + p * z + t / 2 * Math.cos(a), F = U + P, tt = B + p * n * Math.cos(a), D = k + p * n * Math.cos(a), V = F + n * Math.sin(a);
|
|
1317
1390
|
i.push(
|
|
1318
1391
|
// Vertical riser
|
|
1319
|
-
|
|
1392
|
+
B,
|
|
1320
1393
|
w,
|
|
1321
|
-
|
|
1394
|
+
F,
|
|
1322
1395
|
// Bottom-left
|
|
1323
1396
|
k,
|
|
1324
1397
|
w,
|
|
1325
|
-
|
|
1398
|
+
F,
|
|
1326
1399
|
// Bottom-right
|
|
1327
1400
|
k,
|
|
1328
1401
|
v,
|
|
1329
|
-
|
|
1402
|
+
F,
|
|
1330
1403
|
// Top-right
|
|
1331
|
-
|
|
1404
|
+
B,
|
|
1332
1405
|
v,
|
|
1333
|
-
|
|
1406
|
+
F,
|
|
1334
1407
|
// Top-left
|
|
1335
1408
|
// Horizontal tread
|
|
1336
|
-
|
|
1409
|
+
B,
|
|
1337
1410
|
v,
|
|
1338
|
-
|
|
1411
|
+
F,
|
|
1339
1412
|
// Top-left
|
|
1340
1413
|
k,
|
|
1341
1414
|
v,
|
|
1342
|
-
|
|
1415
|
+
F,
|
|
1343
1416
|
// Top-right
|
|
1344
|
-
|
|
1417
|
+
D,
|
|
1345
1418
|
v,
|
|
1346
|
-
|
|
1419
|
+
V,
|
|
1347
1420
|
// Back-right
|
|
1348
1421
|
tt,
|
|
1349
1422
|
v,
|
|
1350
|
-
|
|
1423
|
+
V
|
|
1351
1424
|
// Back-left
|
|
1352
1425
|
);
|
|
1353
|
-
const C = h + 4 + f *
|
|
1426
|
+
const C = h + 4 + f * s * 8 + d * 8;
|
|
1354
1427
|
c.push(
|
|
1355
1428
|
C,
|
|
1356
1429
|
C + 1,
|
|
@@ -1368,13 +1441,13 @@ class vo extends I {
|
|
|
1368
1441
|
);
|
|
1369
1442
|
}
|
|
1370
1443
|
}
|
|
1371
|
-
this.setIndex(c), this.setAttribute("position", new
|
|
1444
|
+
this.setIndex(c), this.setAttribute("position", new q(i, 3)), this.computeVertexNormals();
|
|
1372
1445
|
}
|
|
1373
1446
|
}
|
|
1374
|
-
class
|
|
1447
|
+
class Go extends S {
|
|
1375
1448
|
constructor(t = 5, o = 3, n = 5, r = 0.2) {
|
|
1376
1449
|
super();
|
|
1377
|
-
const
|
|
1450
|
+
const s = [
|
|
1378
1451
|
// Floor vertices
|
|
1379
1452
|
-t / 2,
|
|
1380
1453
|
0,
|
|
@@ -1426,7 +1499,7 @@ class xo extends I {
|
|
|
1426
1499
|
o,
|
|
1427
1500
|
-n / 2
|
|
1428
1501
|
// 11
|
|
1429
|
-
],
|
|
1502
|
+
], a = [
|
|
1430
1503
|
// Floor
|
|
1431
1504
|
0,
|
|
1432
1505
|
1,
|
|
@@ -1449,16 +1522,16 @@ class xo extends I {
|
|
|
1449
1522
|
10,
|
|
1450
1523
|
11
|
|
1451
1524
|
];
|
|
1452
|
-
this.setIndex(
|
|
1525
|
+
this.setIndex(a), this.setAttribute("position", new q(s, 3)), this.computeVertexNormals();
|
|
1453
1526
|
}
|
|
1454
1527
|
}
|
|
1455
|
-
class
|
|
1456
|
-
constructor(t = 2, o = 0.3, n = 0.5, r = 5,
|
|
1528
|
+
class Bo extends S {
|
|
1529
|
+
constructor(t = 2, o = 0.3, n = 0.5, r = 5, s = 2) {
|
|
1457
1530
|
super();
|
|
1458
|
-
const
|
|
1531
|
+
const a = [], i = [];
|
|
1459
1532
|
for (let m = 0; m < r; m++) {
|
|
1460
1533
|
const h = m * o, f = h + o, p = m * n, d = p + n;
|
|
1461
|
-
|
|
1534
|
+
a.push(
|
|
1462
1535
|
// Vertical riser
|
|
1463
1536
|
-t / 2,
|
|
1464
1537
|
h,
|
|
@@ -1512,7 +1585,7 @@ class go extends I {
|
|
|
1512
1585
|
);
|
|
1513
1586
|
}
|
|
1514
1587
|
const c = r * o, l = r * n;
|
|
1515
|
-
|
|
1588
|
+
a.push(
|
|
1516
1589
|
// Landing platform (4 vertices)
|
|
1517
1590
|
-t / 2,
|
|
1518
1591
|
c,
|
|
@@ -1524,11 +1597,11 @@ class go extends I {
|
|
|
1524
1597
|
// Bottom-right
|
|
1525
1598
|
t / 2,
|
|
1526
1599
|
c,
|
|
1527
|
-
l +
|
|
1600
|
+
l + s,
|
|
1528
1601
|
// Top-right
|
|
1529
1602
|
-t / 2,
|
|
1530
1603
|
c,
|
|
1531
|
-
l +
|
|
1604
|
+
l + s
|
|
1532
1605
|
// Top-left
|
|
1533
1606
|
);
|
|
1534
1607
|
const u = r * 8;
|
|
@@ -1544,40 +1617,40 @@ class go extends I {
|
|
|
1544
1617
|
);
|
|
1545
1618
|
for (let m = 0; m < r; m++) {
|
|
1546
1619
|
const h = c + m * o, f = h + o, p = -t / 2 - m * n, d = p - n;
|
|
1547
|
-
|
|
1620
|
+
a.push(
|
|
1548
1621
|
// Vertical riser
|
|
1549
1622
|
p,
|
|
1550
1623
|
h,
|
|
1551
|
-
l +
|
|
1624
|
+
l + s,
|
|
1552
1625
|
// Bottom-left
|
|
1553
1626
|
p,
|
|
1554
1627
|
h,
|
|
1555
|
-
l +
|
|
1628
|
+
l + s - t,
|
|
1556
1629
|
// Bottom-right
|
|
1557
1630
|
p,
|
|
1558
1631
|
f,
|
|
1559
|
-
l +
|
|
1632
|
+
l + s - t,
|
|
1560
1633
|
// Top-right
|
|
1561
1634
|
p,
|
|
1562
1635
|
f,
|
|
1563
|
-
l +
|
|
1636
|
+
l + s,
|
|
1564
1637
|
// Top-left
|
|
1565
1638
|
// Horizontal tread
|
|
1566
1639
|
p,
|
|
1567
1640
|
f,
|
|
1568
|
-
l +
|
|
1641
|
+
l + s,
|
|
1569
1642
|
// Top-left
|
|
1570
1643
|
p,
|
|
1571
1644
|
f,
|
|
1572
|
-
l +
|
|
1645
|
+
l + s - t,
|
|
1573
1646
|
// Top-right
|
|
1574
1647
|
d,
|
|
1575
1648
|
f,
|
|
1576
|
-
l +
|
|
1649
|
+
l + s - t,
|
|
1577
1650
|
// Back-right
|
|
1578
1651
|
d,
|
|
1579
1652
|
f,
|
|
1580
|
-
l +
|
|
1653
|
+
l + s
|
|
1581
1654
|
// Back-left
|
|
1582
1655
|
);
|
|
1583
1656
|
const w = u + 4 + m * 8;
|
|
@@ -1597,16 +1670,16 @@ class go extends I {
|
|
|
1597
1670
|
w + 7
|
|
1598
1671
|
);
|
|
1599
1672
|
}
|
|
1600
|
-
this.setIndex(i), this.setAttribute("position", new
|
|
1673
|
+
this.setIndex(i), this.setAttribute("position", new q(a, 3)), this.computeVertexNormals();
|
|
1601
1674
|
}
|
|
1602
1675
|
}
|
|
1603
|
-
class
|
|
1604
|
-
constructor(t = 1, o = 0.4, n = 0.2, r = 20,
|
|
1676
|
+
class Co extends S {
|
|
1677
|
+
constructor(t = 1, o = 0.4, n = 0.2, r = 20, s = 2, a = Math.PI / 8) {
|
|
1605
1678
|
super();
|
|
1606
1679
|
const i = [], c = [];
|
|
1607
1680
|
let l = 0;
|
|
1608
1681
|
for (let u = 0; u < r; u++) {
|
|
1609
|
-
const m =
|
|
1682
|
+
const m = s * Math.cos(l), h = s * Math.sin(l), f = u * n, p = f + n;
|
|
1610
1683
|
i.push(
|
|
1611
1684
|
// Front face (vertical riser)
|
|
1612
1685
|
m - t / 2 * Math.cos(l),
|
|
@@ -1663,18 +1736,18 @@ class bo extends I {
|
|
|
1663
1736
|
d + 6,
|
|
1664
1737
|
d + 7
|
|
1665
1738
|
// Second triangle for tread
|
|
1666
|
-
), l +=
|
|
1739
|
+
), l += a;
|
|
1667
1740
|
}
|
|
1668
|
-
this.setIndex(c), this.setAttribute("position", new
|
|
1741
|
+
this.setIndex(c), this.setAttribute("position", new q(i, 3)), this.computeVertexNormals();
|
|
1669
1742
|
}
|
|
1670
1743
|
}
|
|
1671
|
-
class
|
|
1744
|
+
class Uo extends S {
|
|
1672
1745
|
constructor(t = 2, o = 0.3, n = 0.5, r = 10) {
|
|
1673
1746
|
super();
|
|
1674
|
-
const
|
|
1747
|
+
const s = [], a = [];
|
|
1675
1748
|
for (let i = 0; i < r; i++) {
|
|
1676
1749
|
const c = i * o, l = c + o, u = i * n, m = u + n;
|
|
1677
|
-
|
|
1750
|
+
s.push(
|
|
1678
1751
|
// Bottom face of riser (front face)
|
|
1679
1752
|
-t / 2,
|
|
1680
1753
|
c,
|
|
@@ -1711,7 +1784,7 @@ class Ao extends I {
|
|
|
1711
1784
|
// 7: Top-left-back
|
|
1712
1785
|
);
|
|
1713
1786
|
const h = i * 8;
|
|
1714
|
-
|
|
1787
|
+
a.push(
|
|
1715
1788
|
h,
|
|
1716
1789
|
h + 1,
|
|
1717
1790
|
h + 2,
|
|
@@ -1720,7 +1793,7 @@ class Ao extends I {
|
|
|
1720
1793
|
h + 2,
|
|
1721
1794
|
h + 3
|
|
1722
1795
|
// Second triangle for riser
|
|
1723
|
-
),
|
|
1796
|
+
), a.push(
|
|
1724
1797
|
h + 4,
|
|
1725
1798
|
h + 6,
|
|
1726
1799
|
h + 5,
|
|
@@ -1731,52 +1804,52 @@ class Ao extends I {
|
|
|
1731
1804
|
// Second triangle for tread
|
|
1732
1805
|
);
|
|
1733
1806
|
}
|
|
1734
|
-
this.setIndex(
|
|
1807
|
+
this.setIndex(a), this.setAttribute("position", new q(s, 3)), this.computeVertexNormals();
|
|
1735
1808
|
}
|
|
1736
1809
|
}
|
|
1737
|
-
class
|
|
1810
|
+
class be extends S {
|
|
1738
1811
|
constructor(t = 0.4, o = 1.2, n = 0.2) {
|
|
1739
1812
|
super();
|
|
1740
|
-
const r = o * 0.6,
|
|
1741
|
-
|
|
1742
|
-
const
|
|
1743
|
-
i.translate(0, r * 0.75, 0), this.copy(
|
|
1813
|
+
const r = o * 0.6, s = new A(t / 2, r, n);
|
|
1814
|
+
s.translate(0, r / 2, 0);
|
|
1815
|
+
const a = t * 1.5, i = new A(a, t / 4, n);
|
|
1816
|
+
i.translate(0, r * 0.75, 0), this.copy(T([s, i], !1)), this.computeVertexNormals();
|
|
1744
1817
|
}
|
|
1745
1818
|
}
|
|
1746
|
-
class
|
|
1819
|
+
class Ie extends S {
|
|
1747
1820
|
constructor(t = 1.75, o = 0.75) {
|
|
1748
1821
|
super();
|
|
1749
|
-
const n = t * 0.05, r = t * 0.15,
|
|
1822
|
+
const n = t * 0.05, r = t * 0.15, s = t * 0.15, a = t * 0.75;
|
|
1750
1823
|
let i = 0;
|
|
1751
1824
|
const c = new A(o, n, o);
|
|
1752
1825
|
c.translate(0, i + n / 2, 0), i += n;
|
|
1753
1826
|
const l = new A(o * 0.8, r, o * 0.8);
|
|
1754
1827
|
l.translate(0, i + r / 2, 0), i += r;
|
|
1755
|
-
const u = new A(o * 0.6,
|
|
1756
|
-
u.translate(0, i +
|
|
1757
|
-
const m = new A(o * 0.4,
|
|
1758
|
-
m.translate(0, i +
|
|
1759
|
-
const h = new
|
|
1760
|
-
h.translate(0, i + 0.1 / 2, 0), this.copy(
|
|
1828
|
+
const u = new A(o * 0.6, s, o * 0.6);
|
|
1829
|
+
u.translate(0, i + s / 2, 0), i += s;
|
|
1830
|
+
const m = new A(o * 0.4, a, o * 0.4);
|
|
1831
|
+
m.translate(0, i + a / 2, 0), i += a;
|
|
1832
|
+
const h = new Z(o * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
|
|
1833
|
+
h.translate(0, i + 0.1 / 2, 0), this.copy(T([c, l, u, m, h], !1)), this.computeVertexNormals();
|
|
1761
1834
|
}
|
|
1762
1835
|
}
|
|
1763
|
-
class
|
|
1836
|
+
class Ae extends S {
|
|
1764
1837
|
constructor(t = 0.6, o = 1, n = 0.2, r = 0.6) {
|
|
1765
1838
|
super();
|
|
1766
|
-
const
|
|
1767
|
-
|
|
1768
|
-
const i = new
|
|
1769
|
-
i.rotateY(Math.PI / 2), i.rotateX(Math.PI / 2), i.translate(0,
|
|
1839
|
+
const s = o - r / 2, a = new A(t, s, n);
|
|
1840
|
+
a.translate(0, s / 2, 0);
|
|
1841
|
+
const i = new E(r / 2, r / 2, n, 16, 1, !1, 0, Math.PI);
|
|
1842
|
+
i.rotateY(Math.PI / 2), i.rotateX(Math.PI / 2), i.translate(0, s, 0), this.copy(T([a, i], !1)), this.computeVertexNormals();
|
|
1770
1843
|
}
|
|
1771
1844
|
}
|
|
1772
|
-
class
|
|
1845
|
+
class Se extends S {
|
|
1773
1846
|
constructor(t = 0.5, o = 0.8, n = 0.15) {
|
|
1774
1847
|
super();
|
|
1775
1848
|
const r = new A(t, o, n);
|
|
1776
1849
|
r.translate(0, o / 2, 0), this.copy(r);
|
|
1777
1850
|
}
|
|
1778
1851
|
}
|
|
1779
|
-
class
|
|
1852
|
+
class Ee extends S {
|
|
1780
1853
|
constructor({ height: t = 2.25 } = {}) {
|
|
1781
1854
|
super();
|
|
1782
1855
|
const o = new A(1.2, 0.5, 1.2);
|
|
@@ -1784,35 +1857,35 @@ class Ie extends I {
|
|
|
1784
1857
|
const n = new A(1, t, 1);
|
|
1785
1858
|
n.translate(0, 0.5 + t / 2, 0);
|
|
1786
1859
|
const r = new A(1.4, 0.3, 1.4);
|
|
1787
|
-
r.translate(0, 0.5 + t + 0.15, 0), this.copy(
|
|
1860
|
+
r.translate(0, 0.5 + t + 0.15, 0), this.copy(T([o, n, r], !1));
|
|
1788
1861
|
}
|
|
1789
1862
|
}
|
|
1790
|
-
class
|
|
1863
|
+
class wt extends S {
|
|
1791
1864
|
constructor({
|
|
1792
1865
|
barHeight: t = 2,
|
|
1793
1866
|
//
|
|
1794
1867
|
barRadius: o = 0.05,
|
|
1795
1868
|
spikeHeight: n = 0.3,
|
|
1796
1869
|
spikeRadius: r = 0.075,
|
|
1797
|
-
spikeScaleZ:
|
|
1798
|
-
radialSegments:
|
|
1870
|
+
spikeScaleZ: s = 1,
|
|
1871
|
+
radialSegments: a = 8
|
|
1799
1872
|
} = {}) {
|
|
1800
1873
|
super();
|
|
1801
|
-
const i = new
|
|
1874
|
+
const i = new E(o, o, t, a);
|
|
1802
1875
|
i.translate(0, t / 2, 0);
|
|
1803
|
-
const c = new
|
|
1804
|
-
c.translate(0, t + n / 2, 0), c.scale(1, 1,
|
|
1876
|
+
const c = new Z(r, n, a);
|
|
1877
|
+
c.translate(0, t + n / 2, 0), c.scale(1, 1, s), this.copy(T([i, c], !1));
|
|
1805
1878
|
}
|
|
1806
1879
|
}
|
|
1807
|
-
class
|
|
1880
|
+
class Pe extends S {
|
|
1808
1881
|
constructor({
|
|
1809
1882
|
count: t = 20,
|
|
1810
1883
|
//
|
|
1811
1884
|
spacing: o = 0.4,
|
|
1812
1885
|
barHeight: n = 2,
|
|
1813
1886
|
barRadius: r = 0.05,
|
|
1814
|
-
spikeHeight:
|
|
1815
|
-
spikeRadius:
|
|
1887
|
+
spikeHeight: s = 0.3,
|
|
1888
|
+
spikeRadius: a = 0.075,
|
|
1816
1889
|
spikeScaleZ: i = 1,
|
|
1817
1890
|
railHeight: c = 0.1,
|
|
1818
1891
|
railDepth: l = 0.05,
|
|
@@ -1820,7 +1893,7 @@ class Se extends I {
|
|
|
1820
1893
|
radialSegments: m = 8
|
|
1821
1894
|
} = {}) {
|
|
1822
1895
|
super();
|
|
1823
|
-
const h = [], f = new
|
|
1896
|
+
const h = [], f = new wt({ barHeight: n, barRadius: r, spikeHeight: s, spikeRadius: a, spikeScaleZ: i, radialSegments: m }), p = new A(t * o, c, l);
|
|
1824
1897
|
for (let v = 0; v < t; v++) {
|
|
1825
1898
|
const x = f.clone();
|
|
1826
1899
|
x.translate(v * o, 0, 0), h.push(x);
|
|
@@ -1828,227 +1901,252 @@ class Se extends I {
|
|
|
1828
1901
|
const d = p.clone();
|
|
1829
1902
|
d.translate(o * (t - 1) / 2, n - u - c / 2, 0), h.push(d);
|
|
1830
1903
|
const w = p.clone();
|
|
1831
|
-
w.translate(o * (t - 1) / 2, c / 2, 0), h.push(w), this.copy(
|
|
1904
|
+
w.translate(o * (t - 1) / 2, c / 2, 0), h.push(w), this.copy(T(h));
|
|
1832
1905
|
}
|
|
1833
1906
|
}
|
|
1834
|
-
class
|
|
1907
|
+
class Te extends S {
|
|
1835
1908
|
constructor({
|
|
1836
1909
|
width: t = 5,
|
|
1837
1910
|
//
|
|
1838
1911
|
height: o = 8,
|
|
1839
1912
|
depth: n = 1,
|
|
1840
1913
|
shelves: r = 4,
|
|
1841
|
-
frameThickness:
|
|
1842
|
-
open:
|
|
1914
|
+
frameThickness: s = 0.1,
|
|
1915
|
+
open: a = !1
|
|
1843
1916
|
} = {}) {
|
|
1844
1917
|
super();
|
|
1845
|
-
const i = o, c = t, l = n, u = new A(
|
|
1846
|
-
h.translate(-c / 2 +
|
|
1918
|
+
const i = o, c = t, l = n, u = new A(s, i, l), m = new A(c - 2 * s, s, l), h = u.clone();
|
|
1919
|
+
h.translate(-c / 2 + s / 2, i / 2, 0);
|
|
1847
1920
|
const f = u.clone();
|
|
1848
|
-
f.translate(c / 2 -
|
|
1921
|
+
f.translate(c / 2 - s / 2, i / 2, 0);
|
|
1849
1922
|
const p = m.clone();
|
|
1850
|
-
p.translate(0, i -
|
|
1923
|
+
p.translate(0, i - s / 2, 0);
|
|
1851
1924
|
const d = m.clone();
|
|
1852
|
-
d.translate(0,
|
|
1853
|
-
const w = new A(c, i,
|
|
1854
|
-
w.translate(0, i / 2, -l / 2 +
|
|
1855
|
-
const v = [], x = (i -
|
|
1925
|
+
d.translate(0, s / 2, 0);
|
|
1926
|
+
const w = new A(c, i, s);
|
|
1927
|
+
w.translate(0, i / 2, -l / 2 + s / 2);
|
|
1928
|
+
const v = [], x = (i - s) / (r + 1);
|
|
1856
1929
|
for (let U = 1; U <= r; U++) {
|
|
1857
1930
|
const z = m.clone();
|
|
1858
|
-
z.translate(0,
|
|
1931
|
+
z.translate(0, s / 2 + U * x, 0), v.push(z);
|
|
1859
1932
|
}
|
|
1860
|
-
this.copy(
|
|
1933
|
+
this.copy(T([
|
|
1861
1934
|
h,
|
|
1862
1935
|
//
|
|
1863
1936
|
f,
|
|
1864
1937
|
p,
|
|
1865
1938
|
d,
|
|
1866
|
-
...
|
|
1939
|
+
...a ? [] : [w],
|
|
1867
1940
|
...v
|
|
1868
1941
|
], !1));
|
|
1869
1942
|
}
|
|
1870
1943
|
}
|
|
1871
|
-
|
|
1872
|
-
|
|
1944
|
+
class Ge extends S {
|
|
1945
|
+
constructor() {
|
|
1946
|
+
super();
|
|
1947
|
+
const t = new A(5, 0.3, 3);
|
|
1948
|
+
t.translate(0, 3.15, 0);
|
|
1949
|
+
const o = [
|
|
1950
|
+
new I(0.2, 0),
|
|
1951
|
+
//
|
|
1952
|
+
new I(0.25, 0.5),
|
|
1953
|
+
new I(0.15, 1.5),
|
|
1954
|
+
new I(0.3, 3)
|
|
1955
|
+
], n = new Y(o, 32), s = T(
|
|
1956
|
+
[
|
|
1957
|
+
[2.1, 0, 1.1],
|
|
1958
|
+
[-2.1, 0, 1.1],
|
|
1959
|
+
[2.1, 0, -1.1],
|
|
1960
|
+
[-2.1, 0, -1.1]
|
|
1961
|
+
].map((a) => {
|
|
1962
|
+
const i = n.clone();
|
|
1963
|
+
return i.translate(a[0], a[1], a[2]), i;
|
|
1964
|
+
})
|
|
1965
|
+
);
|
|
1966
|
+
this.copy(T([t, s], !0));
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
function Be(e, t = lt.XYZ, o = 0.5, n = 2) {
|
|
1970
|
+
e.deleteAttribute("uv"), e.deleteAttribute("normal"), e = ge(e), e.computeVertexNormals();
|
|
1873
1971
|
const r = e.getAttribute("position");
|
|
1874
|
-
for (let
|
|
1875
|
-
const
|
|
1876
|
-
|
|
1972
|
+
for (let s = 0; s < r.count; s++) {
|
|
1973
|
+
const a = new b().fromBufferAttribute(r, s), i = Math.random() * (n - o) + o, c = t.clone().multiplyScalar(i);
|
|
1974
|
+
a.add(c), r.setXYZ(s, a.x, a.y, a.z);
|
|
1877
1975
|
}
|
|
1878
1976
|
return r.needsUpdate = !0, e.computeVertexNormals(), e;
|
|
1879
1977
|
}
|
|
1880
|
-
class
|
|
1978
|
+
class Ce extends S {
|
|
1881
1979
|
constructor(t = 1, o = 4, n = 4) {
|
|
1882
1980
|
super();
|
|
1883
1981
|
const r = new N(t, o, n);
|
|
1884
|
-
this.copy(
|
|
1982
|
+
this.copy(Be(r, lt.XYZ, 0.5, 1)), this.computeVertexNormals(), this.center();
|
|
1885
1983
|
}
|
|
1886
1984
|
}
|
|
1887
|
-
class
|
|
1985
|
+
class Ue extends S {
|
|
1888
1986
|
constructor(t = 0.1, o = 0.1, n = 0.4, r = 8) {
|
|
1889
1987
|
super();
|
|
1890
|
-
const
|
|
1891
|
-
|
|
1892
|
-
const
|
|
1893
|
-
i.translate(0, n / 2 + t * 0.6, -t * 0.6), c.translate(0, n / 2 + t * 0.6, t * 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(
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1896
|
-
class Ce extends I {
|
|
1897
|
-
constructor() {
|
|
1898
|
-
super();
|
|
1899
|
-
const t = new N(1, 16, 16), o = new S(0.2, 0.2, 2, 16, 1, !0);
|
|
1900
|
-
o.translate(0, 1.5, 0), o.rotateX(Math.PI / 2), this.copy(B([t, o], !1));
|
|
1988
|
+
const s = new E(t * 0.6, o * 0.6, n, r);
|
|
1989
|
+
s.translate(0, 0, 0);
|
|
1990
|
+
const a = new N(t, r, r), i = a.clone(), c = a.clone(), l = a.clone(), u = a.clone();
|
|
1991
|
+
i.translate(0, n / 2 + t * 0.6, -t * 0.6), c.translate(0, n / 2 + t * 0.6, t * 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(T([s, i, c, l, u], !1));
|
|
1901
1992
|
}
|
|
1902
1993
|
}
|
|
1903
|
-
class
|
|
1994
|
+
class ze extends S {
|
|
1904
1995
|
constructor({
|
|
1905
1996
|
flaskRadius: t = 1,
|
|
1906
1997
|
//
|
|
1907
1998
|
neckRadius: o = 0.3,
|
|
1908
1999
|
height: n = 2.5,
|
|
1909
2000
|
neckHeight: r = 1,
|
|
1910
|
-
radialSegments:
|
|
2001
|
+
radialSegments: s = 16
|
|
1911
2002
|
} = {}) {
|
|
1912
2003
|
super();
|
|
1913
|
-
const
|
|
1914
|
-
new
|
|
2004
|
+
const a = [
|
|
2005
|
+
new I(0, 0),
|
|
1915
2006
|
// Bottom of the flask
|
|
1916
|
-
new
|
|
2007
|
+
new I(t * 0.875, 0),
|
|
1917
2008
|
// Flat base with minimum width
|
|
1918
|
-
new
|
|
2009
|
+
new I(t, 0.1),
|
|
1919
2010
|
// End of the rounded base
|
|
1920
|
-
new
|
|
2011
|
+
new I(o, n),
|
|
1921
2012
|
// Start of the straight neck
|
|
1922
|
-
new
|
|
2013
|
+
new I(o, n + r),
|
|
1923
2014
|
// End of the straight neck
|
|
1924
|
-
new
|
|
2015
|
+
new I(o * 1.1, n + r + 0.3)
|
|
1925
2016
|
// Slight outward lip at the top
|
|
1926
|
-
], i = new Y(
|
|
1927
|
-
this.copy(
|
|
2017
|
+
], i = new Y(a, s);
|
|
2018
|
+
this.copy(T([i], !1));
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
class Ne extends S {
|
|
2022
|
+
constructor() {
|
|
2023
|
+
super();
|
|
2024
|
+
const t = new N(1, 16, 16), o = new E(0.2, 0.2, 2, 16, 1, !0);
|
|
2025
|
+
o.translate(0, 1.5, 0), o.rotateX(Math.PI / 2), this.copy(T([t, o], !1));
|
|
1928
2026
|
}
|
|
1929
2027
|
}
|
|
1930
|
-
class
|
|
2028
|
+
class ke extends S {
|
|
1931
2029
|
constructor() {
|
|
1932
2030
|
super();
|
|
1933
2031
|
const t = [
|
|
1934
|
-
new
|
|
2032
|
+
new I(1, 0),
|
|
1935
2033
|
// Bottom of the bowl
|
|
1936
|
-
new
|
|
2034
|
+
new I(1.2, 0.5),
|
|
1937
2035
|
// Slight flare at the base
|
|
1938
|
-
new
|
|
2036
|
+
new I(1.4, 1.5),
|
|
1939
2037
|
// Outer wall
|
|
1940
|
-
new
|
|
2038
|
+
new I(1.3, 1.8),
|
|
1941
2039
|
// Flared edge
|
|
1942
|
-
new
|
|
2040
|
+
new I(0.8, 1.8)
|
|
1943
2041
|
// Lip of the bowl
|
|
1944
|
-
], o = new Y(t, 12), n = new
|
|
1945
|
-
n.rotateX(-Math.PI / 2), n.translate(0, 0, 0), this.copy(
|
|
2042
|
+
], o = new Y(t, 12), n = new St(1, 12);
|
|
2043
|
+
n.rotateX(-Math.PI / 2), n.translate(0, 0, 0), this.copy(T([o, n], !1));
|
|
1946
2044
|
}
|
|
1947
2045
|
}
|
|
1948
|
-
class
|
|
2046
|
+
class Fe extends S {
|
|
1949
2047
|
constructor({
|
|
1950
2048
|
radius: t = 0.3,
|
|
1951
2049
|
//
|
|
1952
2050
|
height: o = 0.4,
|
|
1953
2051
|
count: n = 3,
|
|
1954
2052
|
thickness: r = 0.03,
|
|
1955
|
-
radialSegments:
|
|
2053
|
+
radialSegments: s = 16
|
|
1956
2054
|
} = {}) {
|
|
1957
2055
|
super();
|
|
1958
|
-
const
|
|
1959
|
-
|
|
1960
|
-
const i = new
|
|
2056
|
+
const a = new ht(t, r, 8, s);
|
|
2057
|
+
a.rotateX(Math.PI / 2), a.translate(0, o, 0);
|
|
2058
|
+
const i = new E(r * 0.6, r * 0.6, o, s), c = [];
|
|
1961
2059
|
for (let l = 0; l < n; l++) {
|
|
1962
2060
|
const u = l / n * Math.PI * 2, m = i.clone();
|
|
1963
2061
|
m.translate(Math.cos(u) * t, o / 2, Math.sin(u) * t), c.push(m);
|
|
1964
2062
|
}
|
|
1965
|
-
this.copy(
|
|
2063
|
+
this.copy(T([a, ...c], !1));
|
|
1966
2064
|
}
|
|
1967
2065
|
}
|
|
1968
|
-
class st extends
|
|
1969
|
-
constructor(t = 0.2, o = 0.2, n = 3, r = 32,
|
|
2066
|
+
class st extends S {
|
|
2067
|
+
constructor(t = 0.2, o = 0.2, n = 3, r = 32, s = !0) {
|
|
1970
2068
|
super();
|
|
1971
|
-
const
|
|
1972
|
-
i.translate(0, -(n / 2), 0), this.copy(
|
|
2069
|
+
const a = new E(t, o, n, r, 1, s), i = new N(o, r, r / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
|
|
2070
|
+
i.translate(0, -(n / 2), 0), this.copy(T([a, i], !1));
|
|
1973
2071
|
}
|
|
1974
2072
|
}
|
|
1975
|
-
class
|
|
1976
|
-
constructor({ radius: t = 0.5, neckRadius: o = 0.2, height: n = 3, neckHeight: r = 1, segments:
|
|
2073
|
+
class Oe extends S {
|
|
2074
|
+
constructor({ radius: t = 0.5, neckRadius: o = 0.2, height: n = 3, neckHeight: r = 1, segments: s = 16 } = {}) {
|
|
1977
2075
|
super();
|
|
1978
|
-
const
|
|
1979
|
-
i.translate(0,
|
|
1980
|
-
const c = 0.3, l = new
|
|
1981
|
-
l.translate(0,
|
|
1982
|
-
const u = new
|
|
1983
|
-
u.translate(0,
|
|
2076
|
+
const a = n - r, i = new E(t, t, a, s);
|
|
2077
|
+
i.translate(0, a / 2, 0);
|
|
2078
|
+
const c = 0.3, l = new E(o, t, c, s);
|
|
2079
|
+
l.translate(0, a + c / 2, 0);
|
|
2080
|
+
const u = new E(o, o, r, s);
|
|
2081
|
+
u.translate(0, a + c + r / 2, 0), this.copy(T([i, l, u], !1));
|
|
1984
2082
|
}
|
|
1985
2083
|
}
|
|
1986
|
-
class
|
|
2084
|
+
class _e extends S {
|
|
1987
2085
|
constructor({
|
|
1988
2086
|
radius: t = 3,
|
|
1989
2087
|
//
|
|
1990
2088
|
height: o = 0.6,
|
|
1991
2089
|
widthSegments: n = 64,
|
|
1992
2090
|
heightSegments: r = 16,
|
|
1993
|
-
phiStart:
|
|
1994
|
-
phiLength:
|
|
2091
|
+
phiStart: s = 0,
|
|
2092
|
+
phiLength: a = Math.PI * 2
|
|
1995
2093
|
} = {}) {
|
|
1996
|
-
super(), this.copy(new N(t, n, r,
|
|
2094
|
+
super(), this.copy(new N(t, n, r, s, a, 0, Math.PI / 2)), this.scale(1, o / t, 1);
|
|
1997
2095
|
}
|
|
1998
2096
|
}
|
|
1999
|
-
const
|
|
2097
|
+
const zo = (e, t) => e / (1 - Math.cos(t)), vt = (e, t) => e / (2 * Math.sin(t)), Re = (e, t) => e * (1 - Math.cos(t)), No = (e, t) => 2 * e * Math.sin(t), ko = (e, t, o) => ({
|
|
2000
2098
|
x: e * Math.sin(o) * Math.cos(t),
|
|
2001
2099
|
y: e * Math.sin(o) * Math.sin(t),
|
|
2002
2100
|
z: e * Math.cos(o)
|
|
2003
|
-
}),
|
|
2004
|
-
const n = Math.sqrt(e * e + t * t + o * o), r = Math.atan2(t, e),
|
|
2005
|
-
return { radius: n, theta: r, phi:
|
|
2101
|
+
}), Fo = (e, t, o) => {
|
|
2102
|
+
const n = Math.sqrt(e * e + t * t + o * o), r = Math.atan2(t, e), s = Math.acos(o / n);
|
|
2103
|
+
return { radius: n, theta: r, phi: s };
|
|
2006
2104
|
};
|
|
2007
|
-
class
|
|
2105
|
+
class Le extends S {
|
|
2008
2106
|
constructor({
|
|
2009
|
-
radius: t =
|
|
2107
|
+
radius: t = vt(5, Math.PI / 10),
|
|
2010
2108
|
//
|
|
2011
2109
|
widthSegments: o = 64,
|
|
2012
2110
|
heightSegments: n = 32,
|
|
2013
2111
|
phiStart: r = 0,
|
|
2014
|
-
phiLength:
|
|
2015
|
-
thetaLength:
|
|
2112
|
+
phiLength: s = Math.PI * 2,
|
|
2113
|
+
thetaLength: a = Math.PI / 10
|
|
2016
2114
|
} = {}) {
|
|
2017
|
-
super(), this.copy(new N(t, o, n, r,
|
|
2018
|
-
const i =
|
|
2115
|
+
super(), this.copy(new N(t, o, n, r, s, 0, a));
|
|
2116
|
+
const i = Re(t, a);
|
|
2019
2117
|
this.translate(0, -t + i, 0);
|
|
2020
2118
|
}
|
|
2021
2119
|
}
|
|
2022
|
-
class
|
|
2120
|
+
class qe extends S {
|
|
2023
2121
|
constructor({
|
|
2024
2122
|
trunkRadiusTop: t = 0.25,
|
|
2025
2123
|
trunkRadiusBottom: o = 0.4,
|
|
2026
2124
|
trunkHeight: n = 2.5,
|
|
2027
2125
|
trunkSegments: r = 14,
|
|
2028
|
-
leafSize:
|
|
2029
|
-
leafCount:
|
|
2126
|
+
leafSize: s = 0.8,
|
|
2127
|
+
leafCount: a = 6,
|
|
2030
2128
|
leafDetail: i = 0,
|
|
2031
2129
|
leafSpreadRadius: c = 1.5
|
|
2032
2130
|
} = {}) {
|
|
2033
2131
|
super();
|
|
2034
|
-
const l = new
|
|
2132
|
+
const l = new E(t, o, n, r);
|
|
2035
2133
|
l.translate(0, n / 2, 0);
|
|
2036
2134
|
const u = [];
|
|
2037
|
-
for (let m = 0; m <
|
|
2038
|
-
const h = new at(
|
|
2135
|
+
for (let m = 0; m < a; m++) {
|
|
2136
|
+
const h = new at(s, i);
|
|
2039
2137
|
h.translate(
|
|
2040
2138
|
(Math.random() - 0.5) * c,
|
|
2041
|
-
(Math.random() - 0.5) *
|
|
2139
|
+
(Math.random() - 0.5) * s + n,
|
|
2042
2140
|
(Math.random() - 0.5) * c
|
|
2043
2141
|
), u.push(h);
|
|
2044
2142
|
}
|
|
2045
|
-
this.copy(
|
|
2143
|
+
this.copy(T([l.toNonIndexed(), T(u, !1)], !0)), this.computeVertexNormals();
|
|
2046
2144
|
}
|
|
2047
2145
|
}
|
|
2048
|
-
class
|
|
2146
|
+
class Oo extends G {
|
|
2049
2147
|
constructor() {
|
|
2050
2148
|
super();
|
|
2051
|
-
const t = new N(5, 32, 32), o = new
|
|
2149
|
+
const t = new N(5, 32, 32), o = new $({
|
|
2052
2150
|
uniforms: {
|
|
2053
2151
|
time: { value: 0 }
|
|
2054
2152
|
},
|
|
@@ -2095,43 +2193,43 @@ class To extends P {
|
|
|
2095
2193
|
this.add(n);
|
|
2096
2194
|
}
|
|
2097
2195
|
}
|
|
2098
|
-
class
|
|
2196
|
+
class _o extends y {
|
|
2099
2197
|
constructor({
|
|
2100
2198
|
width: t = 1,
|
|
2101
2199
|
height: o = 1.5,
|
|
2102
2200
|
depth: n = 0.5,
|
|
2103
2201
|
coverThickness: r = 0.05,
|
|
2104
|
-
pageIndent:
|
|
2105
|
-
coverColor:
|
|
2202
|
+
pageIndent: s = 0.05,
|
|
2203
|
+
coverColor: a = 9109504,
|
|
2106
2204
|
pageColor: i = 16777215
|
|
2107
2205
|
} = {}) {
|
|
2108
|
-
super(), this.geometry = new
|
|
2109
|
-
new M({ color:
|
|
2206
|
+
super(), this.geometry = new dt(t, o, n, r, s), this.material = [
|
|
2207
|
+
new M({ color: a, metalness: 0.1, roughness: 0.7, flatShading: !0 }),
|
|
2110
2208
|
new M({ color: i, flatShading: !0 })
|
|
2111
2209
|
];
|
|
2112
2210
|
}
|
|
2113
2211
|
}
|
|
2114
|
-
class
|
|
2212
|
+
class Ro extends y {
|
|
2115
2213
|
constructor({
|
|
2116
2214
|
width: t = 0.4,
|
|
2117
2215
|
height: o = 1.2,
|
|
2118
2216
|
depth: n = 0.2,
|
|
2119
2217
|
material: r = new M({ color: 7829367, roughness: 0.8 })
|
|
2120
2218
|
} = {}) {
|
|
2121
|
-
const
|
|
2122
|
-
super(
|
|
2219
|
+
const s = new be(t, o, n);
|
|
2220
|
+
super(s, r);
|
|
2123
2221
|
}
|
|
2124
2222
|
}
|
|
2125
|
-
class
|
|
2223
|
+
class Lo extends G {
|
|
2126
2224
|
constructor() {
|
|
2127
2225
|
super();
|
|
2128
2226
|
const t = new A(5, 1, 5), o = new M({ color: 8421504, flatShading: !0 }), n = new y(t, o);
|
|
2129
2227
|
n.position.set(0, 0.5, 0), this.add(n);
|
|
2130
|
-
const r = new A(4, 3, 4),
|
|
2131
|
-
|
|
2132
|
-
const i = new
|
|
2228
|
+
const r = new A(4, 3, 4), s = new M({ color: 6908265, flatShading: !0 }), a = new y(r, s);
|
|
2229
|
+
a.position.set(0, 2.5, 0), this.add(a);
|
|
2230
|
+
const i = new Z(3.5, 2, 4), c = new M({ color: 5263440, flatShading: !0 }), l = new y(i, c);
|
|
2133
2231
|
l.rotation.y = Math.PI / 4, l.position.set(0, 5, 0), this.add(l);
|
|
2134
|
-
const u = new
|
|
2232
|
+
const u = new E(0.2, 0.2, 3.5, 16), m = new M({ color: 6908265, flatShading: !0 });
|
|
2135
2233
|
[
|
|
2136
2234
|
[-1.8, 2.3, -2.2],
|
|
2137
2235
|
[1.8, 2.3, -2.2],
|
|
@@ -2141,77 +2239,77 @@ class Bo extends P {
|
|
|
2141
2239
|
const U = new y(u, m);
|
|
2142
2240
|
U.position.set(x[0], x[1], x[2]), this.add(U);
|
|
2143
2241
|
});
|
|
2144
|
-
const f = new
|
|
2242
|
+
const f = new j();
|
|
2145
2243
|
f.moveTo(-1, 0), f.lineTo(-1, 2), f.absarc(0, 2, 1, Math.PI, 0, !0), f.lineTo(1, 0);
|
|
2146
2244
|
const p = {
|
|
2147
2245
|
depth: 0.5,
|
|
2148
2246
|
bevelEnabled: !1
|
|
2149
|
-
}, d = new
|
|
2247
|
+
}, d = new H(f, p), w = new M({ color: 4210752, flatShading: !0 }), v = new y(d, w);
|
|
2150
2248
|
v.position.set(0, 0.5, 1.7), this.add(v);
|
|
2151
2249
|
}
|
|
2152
2250
|
}
|
|
2153
|
-
class
|
|
2251
|
+
class qo extends y {
|
|
2154
2252
|
constructor({ totalHeight: t = 1.75, baseWidth: o = 0.75 } = {}) {
|
|
2155
|
-
super(), this.geometry = new
|
|
2253
|
+
super(), this.geometry = new Ie(t, o), this.material = new M({ color: 7829367, roughness: 0.8 });
|
|
2156
2254
|
}
|
|
2157
2255
|
}
|
|
2158
|
-
class
|
|
2256
|
+
class Do extends y {
|
|
2159
2257
|
constructor(t = 0.6, o = 1, n = 0.2, r = 0.6) {
|
|
2160
|
-
super(), this.geometry = new
|
|
2258
|
+
super(), this.geometry = new Ae(t, o, n, r), this.material = new M({ color: 7829367, roughness: 0.8 });
|
|
2161
2259
|
}
|
|
2162
2260
|
}
|
|
2163
|
-
class
|
|
2261
|
+
class Vo extends y {
|
|
2164
2262
|
constructor(t = 0.5, o = 0.8, n = 0.15) {
|
|
2165
|
-
super(), this.geometry = new
|
|
2263
|
+
super(), this.geometry = new Se(t, o, n), this.material = new M({ color: 7829367, roughness: 0.8 });
|
|
2166
2264
|
}
|
|
2167
2265
|
}
|
|
2168
|
-
class
|
|
2266
|
+
class Xo extends y {
|
|
2169
2267
|
constructor({ height: t = 2.25 } = {}) {
|
|
2170
|
-
super(), this.geometry = new
|
|
2268
|
+
super(), this.geometry = new Ee({ height: t }), this.material = new M({ color: 9141627, flatShading: !0 });
|
|
2171
2269
|
}
|
|
2172
2270
|
}
|
|
2173
|
-
class
|
|
2271
|
+
class Zo extends y {
|
|
2174
2272
|
constructor({
|
|
2175
2273
|
barHeight: t = 2,
|
|
2176
2274
|
//
|
|
2177
2275
|
barRadius: o = 0.05,
|
|
2178
2276
|
spikeHeight: n = 0.3,
|
|
2179
2277
|
spikeRadius: r = 0.075,
|
|
2180
|
-
spikeScaleZ:
|
|
2181
|
-
radialSegments:
|
|
2278
|
+
spikeScaleZ: s = 1,
|
|
2279
|
+
radialSegments: a = 8
|
|
2182
2280
|
} = {}) {
|
|
2183
|
-
super(), this.geometry = new
|
|
2281
|
+
super(), this.geometry = new wt({
|
|
2184
2282
|
barHeight: t,
|
|
2185
2283
|
barRadius: o,
|
|
2186
2284
|
spikeHeight: n,
|
|
2187
2285
|
spikeRadius: r,
|
|
2188
|
-
spikeScaleZ:
|
|
2189
|
-
radialSegments:
|
|
2286
|
+
spikeScaleZ: s,
|
|
2287
|
+
radialSegments: a
|
|
2190
2288
|
}), this.material = new M({ color: 3355443, metalness: 0.8, roughness: 0.4 });
|
|
2191
2289
|
}
|
|
2192
2290
|
}
|
|
2193
|
-
class
|
|
2291
|
+
class Yo extends y {
|
|
2194
2292
|
constructor({
|
|
2195
2293
|
count: t = 20,
|
|
2196
2294
|
//
|
|
2197
2295
|
spacing: o = 0.4,
|
|
2198
2296
|
barHeight: n = 2,
|
|
2199
2297
|
barRadius: r = 0.05,
|
|
2200
|
-
spikeHeight:
|
|
2201
|
-
spikeRadius:
|
|
2298
|
+
spikeHeight: s = 0.3,
|
|
2299
|
+
spikeRadius: a = 0.075,
|
|
2202
2300
|
spikeScaleZ: i = 1,
|
|
2203
2301
|
railHeight: c = 0.1,
|
|
2204
2302
|
railDepth: l = 0.05,
|
|
2205
2303
|
railOffset: u = 0,
|
|
2206
2304
|
radialSegments: m = 8
|
|
2207
2305
|
} = {}) {
|
|
2208
|
-
super(), this.geometry = new
|
|
2306
|
+
super(), this.geometry = new Pe({
|
|
2209
2307
|
count: t,
|
|
2210
2308
|
spacing: o,
|
|
2211
2309
|
barHeight: n,
|
|
2212
2310
|
barRadius: r,
|
|
2213
|
-
spikeHeight:
|
|
2214
|
-
spikeRadius:
|
|
2311
|
+
spikeHeight: s,
|
|
2312
|
+
spikeRadius: a,
|
|
2215
2313
|
spikeScaleZ: i,
|
|
2216
2314
|
railHeight: c,
|
|
2217
2315
|
railDepth: l,
|
|
@@ -2220,52 +2318,45 @@ class _o extends y {
|
|
|
2220
2318
|
}), this.material = new M({ color: 3355443, metalness: 0.8, roughness: 0.4 });
|
|
2221
2319
|
}
|
|
2222
2320
|
}
|
|
2223
|
-
class
|
|
2321
|
+
class jo extends y {
|
|
2224
2322
|
constructor({
|
|
2225
2323
|
width: t = 5,
|
|
2226
2324
|
//
|
|
2227
2325
|
height: o = 8,
|
|
2228
2326
|
depth: n = 1,
|
|
2229
2327
|
shelves: r = 4,
|
|
2230
|
-
frameThickness:
|
|
2231
|
-
open:
|
|
2328
|
+
frameThickness: s = 0.1,
|
|
2329
|
+
open: a = !1
|
|
2232
2330
|
} = {}) {
|
|
2233
|
-
super(), this.geometry = new
|
|
2331
|
+
super(), this.geometry = new Te({ width: t, height: o, depth: n, shelves: r, frameThickness: s, open: a }), this.material = new M({ color: 9127187 });
|
|
2234
2332
|
}
|
|
2235
2333
|
}
|
|
2236
|
-
class
|
|
2334
|
+
class Ho extends y {
|
|
2237
2335
|
constructor() {
|
|
2238
2336
|
super();
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
].forEach((c) => {
|
|
2251
|
-
const l = new y(a, s);
|
|
2252
|
-
l.position.set(c[0], c[1], c[2]), this.add(l);
|
|
2253
|
-
}), this.add(n);
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2256
|
-
class Lo extends P {
|
|
2337
|
+
g(this, "geometry");
|
|
2338
|
+
g(this, "material");
|
|
2339
|
+
this.geometry = new Ge(), this.material = [
|
|
2340
|
+
new M({ color: 9132587 }),
|
|
2341
|
+
// Desk surface
|
|
2342
|
+
new M({ color: 4929057 })
|
|
2343
|
+
// Desk legs
|
|
2344
|
+
];
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
class Qo extends G {
|
|
2257
2348
|
constructor(o = 1, n = 0.2) {
|
|
2258
2349
|
super();
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2350
|
+
g(this, "candle");
|
|
2351
|
+
g(this, "flame");
|
|
2352
|
+
g(this, "candleLight");
|
|
2353
|
+
g(this, "height");
|
|
2354
|
+
g(this, "radius");
|
|
2264
2355
|
this.height = o, this.radius = n;
|
|
2265
|
-
const r = new
|
|
2266
|
-
this.candle = new y(r,
|
|
2267
|
-
const
|
|
2268
|
-
this.flame = new y(
|
|
2356
|
+
const r = new E(this.radius, this.radius, this.height, 32), s = new M({ color: 16777215 });
|
|
2357
|
+
this.candle = new y(r, s), this.candle.position.set(0, this.height / 2, 0), this.add(this.candle);
|
|
2358
|
+
const a = new N(0.05, 16, 16), i = new Et({ color: 16753920 });
|
|
2359
|
+
this.flame = new y(a, i), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new ft(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight), this.animateFlicker();
|
|
2269
2360
|
}
|
|
2270
2361
|
animateFlicker() {
|
|
2271
2362
|
const o = () => {
|
|
@@ -2274,39 +2365,39 @@ class Lo extends P {
|
|
|
2274
2365
|
o();
|
|
2275
2366
|
}
|
|
2276
2367
|
}
|
|
2277
|
-
class
|
|
2368
|
+
class Ko extends G {
|
|
2278
2369
|
constructor(t = 1.3, o = 0.5) {
|
|
2279
2370
|
super();
|
|
2280
|
-
const n = new
|
|
2281
|
-
|
|
2282
|
-
const
|
|
2371
|
+
const n = new E(o, o, 0.2, 16), r = new M({ color: 9127187, flatShading: !0 }), s = new y(n, r);
|
|
2372
|
+
s.position.set(0, 0, 0), this.add(s);
|
|
2373
|
+
const a = new E(o * 0.9, o * 0.9, t), i = new M({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), c = new y(a, i);
|
|
2283
2374
|
c.position.set(0, t / 2 + 0.1, 0), this.add(c);
|
|
2284
|
-
const l = new
|
|
2375
|
+
const l = new Z(o * 1.1, 0.5, 8), u = new M({ color: 9127187, flatShading: !0 }), m = new y(l, u);
|
|
2285
2376
|
m.position.set(0, t + 0.35, 0), this.add(m);
|
|
2286
|
-
const h = new
|
|
2377
|
+
const h = new ht(o * 0.8, 0.05, 8, 16), f = new M({ color: 9127187, flatShading: !0 }), p = new y(h, f);
|
|
2287
2378
|
p.position.set(0, t + 0.85, 0), this.add(p);
|
|
2288
|
-
const d = new
|
|
2379
|
+
const d = new ft(16755200, 1.5, 15);
|
|
2289
2380
|
d.position.set(0, t / 2 + 0.1, 0), d.castShadow = !0, this.add(d);
|
|
2290
2381
|
}
|
|
2291
2382
|
}
|
|
2292
|
-
class
|
|
2383
|
+
class $o extends G {
|
|
2293
2384
|
constructor() {
|
|
2294
2385
|
super();
|
|
2295
2386
|
const t = new at(1, 0), o = new M({ color: 8421504, flatShading: !0 }), n = new M({ color: 4950843, flatShading: !0, opacity: 0.8, transparent: !0 });
|
|
2296
2387
|
for (let r = 0; r < 5; r++) {
|
|
2297
|
-
const
|
|
2298
|
-
|
|
2299
|
-
const
|
|
2300
|
-
|
|
2388
|
+
const s = new y(t, o);
|
|
2389
|
+
s.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), s.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), s.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(s);
|
|
2390
|
+
const a = new y(t, n);
|
|
2391
|
+
a.scale.set(s.scale.x * 0.9, s.scale.y * 0.5, s.scale.z * 0.9), a.rotation.copy(s.rotation), a.position.copy(s.position), a.position.y += 0.3, this.add(a);
|
|
2301
2392
|
}
|
|
2302
2393
|
}
|
|
2303
2394
|
}
|
|
2304
|
-
class
|
|
2395
|
+
class Jo extends y {
|
|
2305
2396
|
constructor(t = 1, o = 4, n = 4) {
|
|
2306
|
-
super(), this.geometry = new
|
|
2397
|
+
super(), this.geometry = new Ce(t, o, n), this.material = new M({ color: 8421504, flatShading: !0 });
|
|
2307
2398
|
}
|
|
2308
2399
|
}
|
|
2309
|
-
class
|
|
2400
|
+
class Wo extends G {
|
|
2310
2401
|
constructor() {
|
|
2311
2402
|
super();
|
|
2312
2403
|
const t = new at(1, 0), o = new M({ color: 8421504, flatShading: !0 });
|
|
@@ -2316,82 +2407,68 @@ class Xo extends P {
|
|
|
2316
2407
|
}
|
|
2317
2408
|
}
|
|
2318
2409
|
}
|
|
2319
|
-
class
|
|
2320
|
-
constructor() {
|
|
2321
|
-
super();
|
|
2322
|
-
const t = new Ce(), o = new W({
|
|
2323
|
-
color: 8965375,
|
|
2324
|
-
transparent: !0,
|
|
2325
|
-
opacity: 0.4,
|
|
2326
|
-
roughness: 0.1,
|
|
2327
|
-
metalness: 0.1,
|
|
2328
|
-
reflectivity: 0.8,
|
|
2329
|
-
transmission: 0.9,
|
|
2330
|
-
side: L
|
|
2331
|
-
}), n = new y(t, o);
|
|
2332
|
-
n.rotation.x = -Math.PI / 2, this.add(n);
|
|
2333
|
-
}
|
|
2334
|
-
}
|
|
2335
|
-
class jo extends P {
|
|
2410
|
+
class tn extends G {
|
|
2336
2411
|
constructor() {
|
|
2337
2412
|
super();
|
|
2338
2413
|
const t = [
|
|
2339
|
-
new
|
|
2414
|
+
new I(0, 0),
|
|
2340
2415
|
// Bottom
|
|
2341
|
-
new
|
|
2416
|
+
new I(0.8, 0),
|
|
2342
2417
|
// Base
|
|
2343
|
-
new
|
|
2418
|
+
new I(1, 1.5),
|
|
2344
2419
|
// Rounded body
|
|
2345
|
-
new
|
|
2420
|
+
new I(0.5, 2.2),
|
|
2346
2421
|
// Neck
|
|
2347
|
-
new
|
|
2422
|
+
new I(0.6, 2.5)
|
|
2348
2423
|
// Mouth
|
|
2349
|
-
], o = new Y(t, 10), n = new
|
|
2424
|
+
], o = new Y(t, 10), n = new E(0.3, 0.4, 0.2, 8), r = new M({
|
|
2350
2425
|
color: 8965375,
|
|
2351
2426
|
transparent: !0,
|
|
2352
2427
|
opacity: 0.5,
|
|
2353
2428
|
roughness: 0.1,
|
|
2354
2429
|
metalness: 0.3
|
|
2355
|
-
}),
|
|
2430
|
+
}), s = new M({
|
|
2356
2431
|
color: 16724838,
|
|
2357
2432
|
// Vibrant potion color
|
|
2358
2433
|
transparent: !0,
|
|
2359
2434
|
opacity: 0.6
|
|
2360
|
-
}),
|
|
2435
|
+
}), a = new M({
|
|
2361
2436
|
color: 9127187,
|
|
2362
2437
|
roughness: 1
|
|
2363
|
-
}), i = new y(o, r)
|
|
2438
|
+
}), i = new y(o, r);
|
|
2439
|
+
i.castShadow = !0;
|
|
2440
|
+
const c = new y(o, s), l = new y(n, a);
|
|
2364
2441
|
c.scale.set(0.8, 0.8, 0.8), c.position.y = 0.1, l.position.y = 2.5;
|
|
2365
|
-
const u = new
|
|
2442
|
+
const u = new G();
|
|
2366
2443
|
u.add(i, c, l), this.add(u);
|
|
2367
2444
|
}
|
|
2368
2445
|
}
|
|
2369
|
-
class
|
|
2446
|
+
class en extends G {
|
|
2370
2447
|
constructor() {
|
|
2371
2448
|
super();
|
|
2372
|
-
const t = new
|
|
2449
|
+
const t = new E(0.3, 0.4, 0.1, 16), o = new M({
|
|
2373
2450
|
color: 3355443,
|
|
2374
2451
|
roughness: 0.6,
|
|
2375
2452
|
metalness: 0.3
|
|
2376
2453
|
}), n = new y(t, o);
|
|
2377
2454
|
n.position.y = 0.05;
|
|
2378
|
-
const r = new
|
|
2455
|
+
const r = new E(0.1, 0.1, 0.7, 16), s = new M({
|
|
2379
2456
|
color: 5592405,
|
|
2380
2457
|
roughness: 0.5,
|
|
2381
2458
|
metalness: 0.4
|
|
2382
|
-
}),
|
|
2383
|
-
|
|
2384
|
-
const i = new
|
|
2459
|
+
}), a = new y(r, s);
|
|
2460
|
+
a.position.y = 0.4;
|
|
2461
|
+
const i = new Z(0.075, 0.2, 16), c = new M({
|
|
2385
2462
|
color: 16733440,
|
|
2386
2463
|
emissive: 16733440,
|
|
2387
2464
|
emissiveIntensity: 0.6,
|
|
2388
2465
|
transparent: !0,
|
|
2389
2466
|
opacity: 0.8
|
|
2390
2467
|
}), l = new y(i, c);
|
|
2391
|
-
l.position.y = 0.8, this.add(n,
|
|
2468
|
+
l.position.y = 0.8, this.add(n, a, l);
|
|
2392
2469
|
}
|
|
2393
2470
|
}
|
|
2394
|
-
class
|
|
2471
|
+
class on extends G {
|
|
2395
2472
|
constructor() {
|
|
2396
2473
|
super();
|
|
2397
2474
|
const t = new A(3, 4, 0.1), o = new M({
|
|
@@ -2402,7 +2479,7 @@ class Ho extends P {
|
|
|
2402
2479
|
color: 11184810,
|
|
2403
2480
|
roughness: 0.5,
|
|
2404
2481
|
metalness: 0.7
|
|
2405
|
-
}),
|
|
2482
|
+
}), s = new E(0.3, 0.3, 0.1, 16), a = new M({
|
|
2406
2483
|
color: 5592405,
|
|
2407
2484
|
roughness: 0.7,
|
|
2408
2485
|
metalness: 0.5
|
|
@@ -2411,7 +2488,7 @@ class Ho extends P {
|
|
|
2411
2488
|
const v = new y(n, r);
|
|
2412
2489
|
v.position.set(w, 1.5, 0.1), i.add(v);
|
|
2413
2490
|
}
|
|
2414
|
-
const c = new y(
|
|
2491
|
+
const c = new y(s, a);
|
|
2415
2492
|
c.rotation.x = Math.PI / 2, c.position.set(0, 0.5, 0.15), i.add(c);
|
|
2416
2493
|
const l = new N(0.15, 8, 8), u = new M({
|
|
2417
2494
|
color: 16711680,
|
|
@@ -2428,16 +2505,16 @@ class Ho extends P {
|
|
|
2428
2505
|
d();
|
|
2429
2506
|
}
|
|
2430
2507
|
}
|
|
2431
|
-
class
|
|
2508
|
+
class nn extends y {
|
|
2432
2509
|
constructor({
|
|
2433
2510
|
flaskRadius: t = 1,
|
|
2434
2511
|
//
|
|
2435
2512
|
neckRadius: o = 0.3,
|
|
2436
2513
|
height: n = 2.5,
|
|
2437
2514
|
neckHeight: r = 1,
|
|
2438
|
-
radialSegments:
|
|
2515
|
+
radialSegments: s = 16
|
|
2439
2516
|
} = {}) {
|
|
2440
|
-
super(), this.geometry = new
|
|
2517
|
+
super(), this.geometry = new ze({ flaskRadius: t, neckRadius: o, height: n, neckHeight: r, radialSegments: s }), this.material = new J({
|
|
2441
2518
|
color: 8965375,
|
|
2442
2519
|
transparent: !0,
|
|
2443
2520
|
opacity: 0.4,
|
|
@@ -2450,56 +2527,75 @@ class Qo extends y {
|
|
|
2450
2527
|
});
|
|
2451
2528
|
}
|
|
2452
2529
|
}
|
|
2453
|
-
class
|
|
2530
|
+
class sn extends G {
|
|
2454
2531
|
constructor() {
|
|
2455
2532
|
super();
|
|
2456
2533
|
const t = [
|
|
2457
|
-
new
|
|
2534
|
+
new I(0, 0),
|
|
2458
2535
|
// Bottom of the flask
|
|
2459
|
-
new
|
|
2536
|
+
new I(1.2, 0),
|
|
2460
2537
|
// Base
|
|
2461
|
-
new
|
|
2538
|
+
new I(1.5, 1.5),
|
|
2462
2539
|
// Mid-body
|
|
2463
|
-
new
|
|
2540
|
+
new I(1, 3),
|
|
2464
2541
|
// Narrow neck
|
|
2465
|
-
new
|
|
2542
|
+
new I(0.6, 3.5)
|
|
2466
2543
|
// Mouth of the flask
|
|
2467
|
-
], o = new Y(t, 12), n = new
|
|
2544
|
+
], o = new Y(t, 12), n = new E(0.6, 0.7, 0.3, 8), r = new M({
|
|
2468
2545
|
color: 8965290,
|
|
2469
2546
|
transparent: !0,
|
|
2470
2547
|
opacity: 0.4,
|
|
2471
2548
|
roughness: 0.1,
|
|
2472
2549
|
metalness: 0.5,
|
|
2473
2550
|
depthWrite: !1
|
|
2474
|
-
}),
|
|
2551
|
+
}), s = new M({
|
|
2475
2552
|
color: 9127187,
|
|
2476
2553
|
roughness: 1
|
|
2477
|
-
}),
|
|
2478
|
-
|
|
2554
|
+
}), a = new y(o, r);
|
|
2555
|
+
a.castShadow = !0;
|
|
2556
|
+
const i = new y(n, s);
|
|
2557
|
+
i.position.y = 3.5, this.add(a, i);
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
class rn extends y {
|
|
2561
|
+
constructor() {
|
|
2562
|
+
super();
|
|
2563
|
+
g(this, "geometry");
|
|
2564
|
+
g(this, "material");
|
|
2565
|
+
this.geometry = new Ne(), this.material = new J({
|
|
2566
|
+
color: 8965375,
|
|
2567
|
+
transparent: !0,
|
|
2568
|
+
opacity: 0.4,
|
|
2569
|
+
roughness: 0.1,
|
|
2570
|
+
metalness: 0.1,
|
|
2571
|
+
reflectivity: 0.8,
|
|
2572
|
+
transmission: 0.9,
|
|
2573
|
+
side: L
|
|
2574
|
+
}), this.rotation.x = -Math.PI / 2;
|
|
2479
2575
|
}
|
|
2480
2576
|
}
|
|
2481
|
-
class
|
|
2577
|
+
class an extends G {
|
|
2482
2578
|
constructor() {
|
|
2483
2579
|
super();
|
|
2484
2580
|
const t = new A(2, 3, 0.1), o = new M({
|
|
2485
2581
|
color: 3355443,
|
|
2486
2582
|
roughness: 0.8,
|
|
2487
2583
|
metalness: 0.5
|
|
2488
|
-
}), n = new y(t, o), r = new
|
|
2584
|
+
}), n = new y(t, o), r = new E(0.1, 0.1, 0.2, 8), s = new E(0.05, 0.05, 1, 8), a = new M({
|
|
2489
2585
|
color: 11184810,
|
|
2490
2586
|
roughness: 0.5,
|
|
2491
2587
|
metalness: 0.7
|
|
2492
2588
|
});
|
|
2493
2589
|
for (let i = -0.5; i <= 0.5; i += 0.5) {
|
|
2494
|
-
const c = new y(r,
|
|
2590
|
+
const c = new y(r, a);
|
|
2495
2591
|
c.position.set(i, 1, 0.1);
|
|
2496
|
-
const l = new y(
|
|
2592
|
+
const l = new y(s, a);
|
|
2497
2593
|
l.position.y = 0.5, c.add(l), this.add(c);
|
|
2498
2594
|
}
|
|
2499
2595
|
this.add(n);
|
|
2500
2596
|
}
|
|
2501
2597
|
}
|
|
2502
|
-
class
|
|
2598
|
+
class cn extends G {
|
|
2503
2599
|
constructor() {
|
|
2504
2600
|
super();
|
|
2505
2601
|
const t = new A(1, 0.2, 0.5), o = new M({
|
|
@@ -2508,26 +2604,26 @@ class Jo extends P {
|
|
|
2508
2604
|
metalness: 0.3
|
|
2509
2605
|
}), n = new y(t, o);
|
|
2510
2606
|
n.position.y = 0.1;
|
|
2511
|
-
const r = new A(0.2, 1, 0.2),
|
|
2512
|
-
|
|
2513
|
-
const
|
|
2607
|
+
const r = new A(0.2, 1, 0.2), s = new y(r, o);
|
|
2608
|
+
s.position.set(0, 0.6, -0.2);
|
|
2609
|
+
const a = new E(0.1, 0.1, 0.4, 8), i = new M({
|
|
2514
2610
|
color: 3355443,
|
|
2515
2611
|
roughness: 0.5,
|
|
2516
2612
|
metalness: 0.6
|
|
2517
|
-
}), c = new y(
|
|
2613
|
+
}), c = new y(a, i);
|
|
2518
2614
|
c.position.set(0, 1.1, -0.35), c.rotation.x = -Math.PI / 4;
|
|
2519
2615
|
const l = new A(0.6, 0.1, 0.6), u = new M({
|
|
2520
2616
|
color: 5592405,
|
|
2521
2617
|
roughness: 0.8,
|
|
2522
2618
|
metalness: 0.2
|
|
2523
2619
|
}), m = new y(l, u);
|
|
2524
|
-
m.position.set(0, 0.6, 0), this.add(n,
|
|
2620
|
+
m.position.set(0, 0.6, 0), this.add(n, s, c, m);
|
|
2525
2621
|
}
|
|
2526
2622
|
}
|
|
2527
|
-
class
|
|
2623
|
+
class ln extends G {
|
|
2528
2624
|
constructor() {
|
|
2529
2625
|
super();
|
|
2530
|
-
const t = new
|
|
2626
|
+
const t = new ke(), o = new E(0.2, 0.3, 1.5, 8);
|
|
2531
2627
|
o.translate(0, 0.75, 0);
|
|
2532
2628
|
const n = new M({
|
|
2533
2629
|
color: 6045747,
|
|
@@ -2541,34 +2637,66 @@ class Wo extends P {
|
|
|
2541
2637
|
// Slightly lighter earthy color
|
|
2542
2638
|
roughness: 0.8,
|
|
2543
2639
|
metalness: 0.1
|
|
2544
|
-
}),
|
|
2545
|
-
s.
|
|
2640
|
+
}), s = new y(t, n);
|
|
2641
|
+
s.castShadow = !0;
|
|
2642
|
+
const a = new y(o, r);
|
|
2643
|
+
a.castShadow = !0, a.position.set(0.3, 1.3, 0), a.rotation.z = Math.PI / 4, this.add(s, a);
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2646
|
+
class un extends y {
|
|
2647
|
+
constructor({ width: o = 3, height: n = 4, depth: r = 0.1 } = {}) {
|
|
2648
|
+
super();
|
|
2649
|
+
g(this, "geometry");
|
|
2650
|
+
g(this, "material");
|
|
2651
|
+
this.geometry = new A(o, n, r), this.material = new M({
|
|
2652
|
+
color: 3026478,
|
|
2653
|
+
roughness: 0.8,
|
|
2654
|
+
metalness: 0.6
|
|
2655
|
+
});
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
class mn extends y {
|
|
2659
|
+
constructor({
|
|
2660
|
+
radius: o = 0.15,
|
|
2661
|
+
//
|
|
2662
|
+
color: n = 16762823,
|
|
2663
|
+
emissive: r = 16711680,
|
|
2664
|
+
emissiveIntensity: s = 0.5
|
|
2665
|
+
} = {}) {
|
|
2666
|
+
super();
|
|
2667
|
+
g(this, "geometry");
|
|
2668
|
+
g(this, "material");
|
|
2669
|
+
this.geometry = new N(o, 8, 8), this.material = new M({
|
|
2670
|
+
color: n,
|
|
2671
|
+
emissive: r,
|
|
2672
|
+
emissiveIntensity: s
|
|
2673
|
+
});
|
|
2546
2674
|
}
|
|
2547
2675
|
}
|
|
2548
|
-
class
|
|
2676
|
+
class hn extends G {
|
|
2549
2677
|
constructor() {
|
|
2550
2678
|
super();
|
|
2551
|
-
const t = 100, o = 0.05, n = new
|
|
2679
|
+
const t = 100, o = 0.05, n = new Pt(
|
|
2552
2680
|
Array.from({ length: t }, (l, u) => {
|
|
2553
2681
|
const m = u * 0.2;
|
|
2554
|
-
return new
|
|
2682
|
+
return new b(
|
|
2555
2683
|
Math.cos(m) * 0.4,
|
|
2556
2684
|
u * o,
|
|
2557
2685
|
// Gradual height increase
|
|
2558
2686
|
Math.sin(m) * 0.4
|
|
2559
2687
|
);
|
|
2560
2688
|
})
|
|
2561
|
-
), r = new
|
|
2689
|
+
), r = new Tt(n, 200, 0.1, 8, !1), s = new M({
|
|
2562
2690
|
color: 8965375,
|
|
2563
2691
|
transparent: !0,
|
|
2564
2692
|
opacity: 0.3,
|
|
2565
2693
|
roughness: 0.1,
|
|
2566
2694
|
metalness: 0.2,
|
|
2567
2695
|
emissive: 8965375
|
|
2568
|
-
}),
|
|
2569
|
-
this.add(
|
|
2696
|
+
}), a = new y(r, s);
|
|
2697
|
+
this.add(a);
|
|
2570
2698
|
function i() {
|
|
2571
|
-
|
|
2699
|
+
s.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
|
|
2572
2700
|
}
|
|
2573
2701
|
function c() {
|
|
2574
2702
|
requestAnimationFrame(c), i();
|
|
@@ -2576,46 +2704,49 @@ class tn extends P {
|
|
|
2576
2704
|
c();
|
|
2577
2705
|
}
|
|
2578
2706
|
}
|
|
2579
|
-
class
|
|
2707
|
+
class fn extends y {
|
|
2580
2708
|
constructor({
|
|
2581
|
-
radius:
|
|
2709
|
+
radius: o = 0.3,
|
|
2582
2710
|
//
|
|
2583
|
-
height:
|
|
2584
|
-
count:
|
|
2585
|
-
thickness:
|
|
2711
|
+
height: n = 0.4,
|
|
2712
|
+
count: r = 3,
|
|
2713
|
+
thickness: s = 0.03,
|
|
2586
2714
|
radialSegments: a = 16
|
|
2587
2715
|
} = {}) {
|
|
2588
|
-
super()
|
|
2716
|
+
super();
|
|
2717
|
+
g(this, "geometry");
|
|
2718
|
+
g(this, "material");
|
|
2719
|
+
this.geometry = new Fe({ radius: o, height: n, count: r, thickness: s, radialSegments: a }), this.material = new M({
|
|
2589
2720
|
color: 8947848,
|
|
2590
2721
|
roughness: 0.7,
|
|
2591
2722
|
metalness: 0.3
|
|
2592
2723
|
});
|
|
2593
2724
|
}
|
|
2594
2725
|
}
|
|
2595
|
-
class
|
|
2726
|
+
class pn extends G {
|
|
2596
2727
|
constructor() {
|
|
2597
2728
|
super();
|
|
2598
|
-
const t = new
|
|
2729
|
+
const t = new E(0.5, 0.6, 0.3, 16), o = new M({
|
|
2599
2730
|
color: 3355443,
|
|
2600
2731
|
roughness: 0.6,
|
|
2601
2732
|
metalness: 0.5
|
|
2602
2733
|
}), n = new y(t, o);
|
|
2603
2734
|
n.position.y = 0.15;
|
|
2604
|
-
const r = new
|
|
2735
|
+
const r = new E(0.15, 0.15, 2, 12, 1, !0), s = new M({
|
|
2605
2736
|
color: 16737792,
|
|
2606
2737
|
roughness: 0.5,
|
|
2607
2738
|
metalness: 0.8,
|
|
2608
2739
|
side: L
|
|
2609
|
-
}),
|
|
2610
|
-
|
|
2611
|
-
const i = new N(0.3, 16, 16), c = new y(i,
|
|
2612
|
-
c.position.y = 2.4, this.add(n,
|
|
2740
|
+
}), a = new y(r, s);
|
|
2741
|
+
a.position.y = 1.3;
|
|
2742
|
+
const i = new N(0.3, 16, 16), c = new y(i, s);
|
|
2743
|
+
c.position.y = 2.4, this.add(n, a, c);
|
|
2613
2744
|
}
|
|
2614
2745
|
}
|
|
2615
|
-
class
|
|
2746
|
+
class dn extends G {
|
|
2616
2747
|
constructor(t = 0.2, o = 0.2, n = 3, r = 32) {
|
|
2617
2748
|
super();
|
|
2618
|
-
const
|
|
2749
|
+
const s = new st(t, o, n, r), a = new J({
|
|
2619
2750
|
color: 8965375,
|
|
2620
2751
|
transparent: !0,
|
|
2621
2752
|
opacity: 0.4,
|
|
@@ -2626,11 +2757,11 @@ class nn extends P {
|
|
|
2626
2757
|
// For glass effect
|
|
2627
2758
|
depthWrite: !1,
|
|
2628
2759
|
side: L
|
|
2629
|
-
}), i = new y(
|
|
2760
|
+
}), i = new y(s, a);
|
|
2630
2761
|
this.add(i);
|
|
2631
2762
|
}
|
|
2632
2763
|
}
|
|
2633
|
-
class
|
|
2764
|
+
class yn extends G {
|
|
2634
2765
|
constructor(t = 3, o = [65450, 16711850, 11141375]) {
|
|
2635
2766
|
super();
|
|
2636
2767
|
const n = new A(3, 0.2, 1), r = new M({
|
|
@@ -2638,9 +2769,9 @@ class sn extends P {
|
|
|
2638
2769
|
// Wooden color or change to metallic tone
|
|
2639
2770
|
roughness: 0.7,
|
|
2640
2771
|
metalness: 0.3
|
|
2641
|
-
}),
|
|
2642
|
-
|
|
2643
|
-
const
|
|
2772
|
+
}), s = new y(n, r);
|
|
2773
|
+
s.position.y = 0.5, s.castShadow = !0;
|
|
2774
|
+
const a = new st(0.1, 0.1, 1, 16), i = new M({
|
|
2644
2775
|
color: 11184810,
|
|
2645
2776
|
transparent: !0,
|
|
2646
2777
|
opacity: 0.4,
|
|
@@ -2650,8 +2781,8 @@ class sn extends P {
|
|
|
2650
2781
|
side: L
|
|
2651
2782
|
});
|
|
2652
2783
|
for (let c = 0; c < t; c++) {
|
|
2653
|
-
const l = new y(
|
|
2654
|
-
l.position.set(u, 1, 0);
|
|
2784
|
+
const l = new y(a, i), u = (c - (t - 1) / 2) * 0.8;
|
|
2785
|
+
l.position.set(u, 1, 0), l.castShadow = !0;
|
|
2655
2786
|
const m = new st(0.099, 0.099, 0.5, 16, !1), h = o[c % o.length], f = new M({
|
|
2656
2787
|
color: h,
|
|
2657
2788
|
emissive: h,
|
|
@@ -2659,15 +2790,15 @@ class sn extends P {
|
|
|
2659
2790
|
transparent: !0,
|
|
2660
2791
|
opacity: 0.6
|
|
2661
2792
|
}), p = new y(m, f);
|
|
2662
|
-
p.position.set(0, -0.25, 0), l.add(p),
|
|
2793
|
+
p.position.set(0, -0.25, 0), l.add(p), s.add(l);
|
|
2663
2794
|
}
|
|
2664
|
-
this.add(
|
|
2795
|
+
this.add(s);
|
|
2665
2796
|
}
|
|
2666
2797
|
}
|
|
2667
|
-
class
|
|
2798
|
+
class Mn extends y {
|
|
2668
2799
|
constructor() {
|
|
2669
2800
|
super();
|
|
2670
|
-
const t = new
|
|
2801
|
+
const t = new Oe(), o = new J({
|
|
2671
2802
|
color: 5597999,
|
|
2672
2803
|
roughness: 0.1,
|
|
2673
2804
|
transmission: 0.9,
|
|
@@ -2680,22 +2811,22 @@ class rn extends y {
|
|
|
2680
2811
|
this.geometry = t, this.material = o;
|
|
2681
2812
|
}
|
|
2682
2813
|
}
|
|
2683
|
-
class
|
|
2814
|
+
class De extends j {
|
|
2684
2815
|
constructor(t = 5, o = 0.5, n = 1) {
|
|
2685
2816
|
super();
|
|
2686
|
-
const r = Math.PI * 2 / t,
|
|
2817
|
+
const r = Math.PI * 2 / t, s = r / 2, a = r / 4;
|
|
2687
2818
|
this.moveTo(Math.cos(0) * n, -Math.sin(0) * n);
|
|
2688
2819
|
for (let i = 1; i <= t; ++i) {
|
|
2689
|
-
let c = Math.cos(r * i -
|
|
2690
|
-
this.quadraticCurveTo(c, l, u, m), c = Math.cos(r * i -
|
|
2820
|
+
let c = Math.cos(r * i - a * 3) * (o / Math.cos(a)), l = -Math.sin(r * i - a * 3) * (o / Math.cos(a)), u = Math.cos(r * i - s) * o, m = -Math.sin(r * i - s) * o;
|
|
2821
|
+
this.quadraticCurveTo(c, l, u, m), c = Math.cos(r * i - a) * (o / Math.cos(a)), l = -Math.sin(r * i - a) * (o / Math.cos(a)), u = Math.cos(r * i) * n, m = -Math.sin(r * i) * n, this.quadraticCurveTo(c, l, u, m);
|
|
2691
2822
|
}
|
|
2692
2823
|
this.closePath();
|
|
2693
2824
|
}
|
|
2694
2825
|
}
|
|
2695
|
-
class
|
|
2826
|
+
class wn extends y {
|
|
2696
2827
|
constructor(t = 5, o = 0.5, n = 1, r = 0.25) {
|
|
2697
2828
|
super();
|
|
2698
|
-
const
|
|
2829
|
+
const s = new De(t, o, n), a = new H(s, {
|
|
2699
2830
|
depth: r,
|
|
2700
2831
|
bevelEnabled: r > 0,
|
|
2701
2832
|
bevelThickness: 0,
|
|
@@ -2708,31 +2839,31 @@ class an extends y {
|
|
|
2708
2839
|
roughness: 0.3,
|
|
2709
2840
|
flatShading: !0
|
|
2710
2841
|
});
|
|
2711
|
-
|
|
2842
|
+
a.center(), this.geometry = a, this.material = i;
|
|
2712
2843
|
}
|
|
2713
2844
|
}
|
|
2714
|
-
class
|
|
2715
|
-
constructor(t = 5, o = 0.5, n = 1, r = 5,
|
|
2845
|
+
class Ve extends j {
|
|
2846
|
+
constructor(t = 5, o = 0.5, n = 1, r = 5, s = 0.25) {
|
|
2716
2847
|
super();
|
|
2717
|
-
const
|
|
2848
|
+
const a = Math.PI * 2 / t, i = a / 4;
|
|
2718
2849
|
this.moveTo(Math.cos(0) * n, -Math.sin(0) * n);
|
|
2719
2850
|
for (let c = 1; c <= t; ++c)
|
|
2720
|
-
this.lineTo(Math.cos(
|
|
2721
|
-
if (this.closePath(),
|
|
2722
|
-
const c = new
|
|
2723
|
-
c.moveTo(Math.cos(0) *
|
|
2851
|
+
this.lineTo(Math.cos(a * c - i * 3) * o, -Math.sin(a * c - i * 3) * o), this.lineTo(Math.cos(a * c - i * 2) * o, -Math.sin(a * c - i * 2) * o), this.lineTo(Math.cos(a * c - i) * n, -Math.sin(a * c - i) * n), this.lineTo(Math.cos(a * c) * n, -Math.sin(a * c) * n);
|
|
2852
|
+
if (this.closePath(), s > 0 && r > 2) {
|
|
2853
|
+
const c = new Gt(), l = Math.PI * 2 / r;
|
|
2854
|
+
c.moveTo(Math.cos(0) * s, -Math.sin(0) * s);
|
|
2724
2855
|
for (let u = 1; u < r; ++u)
|
|
2725
|
-
c.lineTo(Math.cos(l * u) *
|
|
2726
|
-
c.lineTo(Math.cos(0) *
|
|
2856
|
+
c.lineTo(Math.cos(l * u) * s, -Math.sin(l * u) * s);
|
|
2857
|
+
c.lineTo(Math.cos(0) * s, -Math.sin(0) * s), this.holes.push(c);
|
|
2727
2858
|
}
|
|
2728
2859
|
}
|
|
2729
2860
|
}
|
|
2730
|
-
class
|
|
2731
|
-
constructor(t = 5, o = 0.5, n = 1, r = 5,
|
|
2861
|
+
class vn extends y {
|
|
2862
|
+
constructor(t = 5, o = 0.5, n = 1, r = 5, s = 0.25, a = 0.25) {
|
|
2732
2863
|
super();
|
|
2733
|
-
const i = new
|
|
2734
|
-
depth:
|
|
2735
|
-
bevelEnabled:
|
|
2864
|
+
const i = new Ve(t, o, n, r, s), c = new H(i, {
|
|
2865
|
+
depth: a,
|
|
2866
|
+
bevelEnabled: a > 0,
|
|
2736
2867
|
bevelThickness: 0,
|
|
2737
2868
|
bevelSize: 0
|
|
2738
2869
|
}), l = new M({
|
|
@@ -2743,7 +2874,7 @@ class cn extends y {
|
|
|
2743
2874
|
c.center(), this.geometry = c, this.material = l;
|
|
2744
2875
|
}
|
|
2745
2876
|
}
|
|
2746
|
-
class
|
|
2877
|
+
class Xe extends j {
|
|
2747
2878
|
constructor(t = 1, o = 2.1, n = 1.4, r = 1.6) {
|
|
2748
2879
|
super(), this.moveTo(0, n * t / 3), this.bezierCurveTo(
|
|
2749
2880
|
-o * 0.375 * t,
|
|
@@ -2768,12 +2899,12 @@ class qe extends H {
|
|
|
2768
2899
|
);
|
|
2769
2900
|
}
|
|
2770
2901
|
}
|
|
2771
|
-
class
|
|
2772
|
-
constructor(t = 1, o = 1, n = 1, r = 10,
|
|
2902
|
+
class xn extends y {
|
|
2903
|
+
constructor(t = 1, o = 1, n = 1, r = 10, s = 0.25) {
|
|
2773
2904
|
super();
|
|
2774
|
-
const
|
|
2775
|
-
depth:
|
|
2776
|
-
bevelEnabled:
|
|
2905
|
+
const a = new Xe(t, o, n, r), i = new H(a, {
|
|
2906
|
+
depth: s,
|
|
2907
|
+
bevelEnabled: s > 0,
|
|
2777
2908
|
bevelThickness: 0,
|
|
2778
2909
|
bevelSize: 0
|
|
2779
2910
|
}), c = new M({
|
|
@@ -2787,20 +2918,20 @@ class ln extends y {
|
|
|
2787
2918
|
i.center(), this.geometry = i, this.material = c;
|
|
2788
2919
|
}
|
|
2789
2920
|
}
|
|
2790
|
-
class
|
|
2921
|
+
class Ze extends j {
|
|
2791
2922
|
constructor(t = 5, o = 0.5, n = 1) {
|
|
2792
2923
|
super();
|
|
2793
|
-
const r = Math.PI * 2 / t,
|
|
2924
|
+
const r = Math.PI * 2 / t, s = r / 2;
|
|
2794
2925
|
this.moveTo(Math.cos(0) * n, Math.sin(0) * n);
|
|
2795
|
-
for (let
|
|
2796
|
-
this.lineTo(Math.cos(r *
|
|
2926
|
+
for (let a = 1; a <= t; ++a)
|
|
2927
|
+
this.lineTo(Math.cos(r * a - s) * o, Math.sin(r * a - s) * o), this.lineTo(Math.cos(r * a) * n, Math.sin(r * a) * n);
|
|
2797
2928
|
this.closePath();
|
|
2798
2929
|
}
|
|
2799
2930
|
}
|
|
2800
|
-
class
|
|
2931
|
+
class gn extends y {
|
|
2801
2932
|
constructor(t = 5, o = 0.5, n = 1, r = 0.25) {
|
|
2802
2933
|
super();
|
|
2803
|
-
const
|
|
2934
|
+
const s = new Ze(t, o, n), a = new H(s, {
|
|
2804
2935
|
depth: r,
|
|
2805
2936
|
bevelEnabled: r > 0,
|
|
2806
2937
|
bevelThickness: 0,
|
|
@@ -2813,39 +2944,39 @@ class un extends y {
|
|
|
2813
2944
|
roughness: 0.3,
|
|
2814
2945
|
flatShading: !0
|
|
2815
2946
|
});
|
|
2816
|
-
|
|
2947
|
+
a.center(), this.geometry = a, this.material = i;
|
|
2817
2948
|
}
|
|
2818
2949
|
}
|
|
2819
|
-
class
|
|
2950
|
+
class bn extends y {
|
|
2820
2951
|
constructor() {
|
|
2821
|
-
super(), this.geometry = new
|
|
2952
|
+
super(), this.geometry = new Ue(), this.material = new M({ color: 16777215 });
|
|
2822
2953
|
}
|
|
2823
2954
|
}
|
|
2824
|
-
class
|
|
2955
|
+
class In extends y {
|
|
2825
2956
|
constructor({
|
|
2826
2957
|
trunkRadiusTop: t = 0.25,
|
|
2827
2958
|
trunkRadiusBottom: o = 0.4,
|
|
2828
2959
|
trunkHeight: n = 2.5,
|
|
2829
2960
|
trunkSegments: r = 14,
|
|
2830
|
-
trunkColor:
|
|
2831
|
-
leafSize:
|
|
2961
|
+
trunkColor: s = 9127187,
|
|
2962
|
+
leafSize: a = 0.8,
|
|
2832
2963
|
leafCount: i = 6,
|
|
2833
2964
|
leafDetail: c = 0,
|
|
2834
2965
|
leafSpreadRadius: l = 1.5,
|
|
2835
2966
|
leafColor: u = 2263842
|
|
2836
2967
|
} = {}) {
|
|
2837
2968
|
super();
|
|
2838
|
-
const m = new
|
|
2969
|
+
const m = new qe({
|
|
2839
2970
|
trunkRadiusTop: t,
|
|
2840
2971
|
trunkRadiusBottom: o,
|
|
2841
2972
|
trunkHeight: n,
|
|
2842
2973
|
trunkSegments: r,
|
|
2843
|
-
leafSize:
|
|
2974
|
+
leafSize: a,
|
|
2844
2975
|
leafCount: i,
|
|
2845
2976
|
leafDetail: c,
|
|
2846
2977
|
leafSpreadRadius: l
|
|
2847
2978
|
}), h = new M({
|
|
2848
|
-
color:
|
|
2979
|
+
color: s,
|
|
2849
2980
|
roughness: 0.9,
|
|
2850
2981
|
metalness: 0,
|
|
2851
2982
|
flatShading: !0
|
|
@@ -2858,47 +2989,47 @@ class hn extends y {
|
|
|
2858
2989
|
this.geometry = m, this.material = [h, f];
|
|
2859
2990
|
}
|
|
2860
2991
|
}
|
|
2861
|
-
class
|
|
2992
|
+
class An extends y {
|
|
2862
2993
|
constructor({
|
|
2863
2994
|
radius: t = 3,
|
|
2864
2995
|
//
|
|
2865
2996
|
height: o = 0.6,
|
|
2866
2997
|
widthSegments: n = 64,
|
|
2867
2998
|
heightSegments: r = 16,
|
|
2868
|
-
phiStart:
|
|
2869
|
-
phiLength:
|
|
2999
|
+
phiStart: s = 0,
|
|
3000
|
+
phiLength: a = Math.PI * 2
|
|
2870
3001
|
} = {}) {
|
|
2871
|
-
super(), this.geometry = new
|
|
3002
|
+
super(), this.geometry = new _e({
|
|
2872
3003
|
radius: t,
|
|
2873
3004
|
height: o,
|
|
2874
3005
|
widthSegments: n,
|
|
2875
3006
|
heightSegments: r,
|
|
2876
|
-
phiStart:
|
|
2877
|
-
phiLength:
|
|
3007
|
+
phiStart: s,
|
|
3008
|
+
phiLength: a
|
|
2878
3009
|
}), this.material = new M({ color: 65280, flatShading: !0 });
|
|
2879
3010
|
}
|
|
2880
3011
|
}
|
|
2881
|
-
class
|
|
3012
|
+
class Sn extends y {
|
|
2882
3013
|
constructor({
|
|
2883
|
-
radius: t =
|
|
3014
|
+
radius: t = vt(5, Math.PI / 10),
|
|
2884
3015
|
//
|
|
2885
3016
|
widthSegments: o = 64,
|
|
2886
3017
|
heightSegments: n = 32,
|
|
2887
3018
|
phiStart: r = 0,
|
|
2888
|
-
phiLength:
|
|
2889
|
-
thetaLength:
|
|
3019
|
+
phiLength: s = Math.PI * 2,
|
|
3020
|
+
thetaLength: a = Math.PI / 10
|
|
2890
3021
|
} = {}) {
|
|
2891
|
-
super(), this.geometry = new
|
|
3022
|
+
super(), this.geometry = new Le({
|
|
2892
3023
|
radius: t,
|
|
2893
3024
|
widthSegments: o,
|
|
2894
3025
|
heightSegments: n,
|
|
2895
3026
|
phiStart: r,
|
|
2896
|
-
phiLength:
|
|
2897
|
-
thetaLength:
|
|
3027
|
+
phiLength: s,
|
|
3028
|
+
thetaLength: a
|
|
2898
3029
|
}), this.material = new M({ color: 65280, flatShading: !0 });
|
|
2899
3030
|
}
|
|
2900
3031
|
}
|
|
2901
|
-
function
|
|
3032
|
+
function En(e, { time: t = 0, waveFrequency: o = 0.2, waveAmplitude: n = 0.5 } = {}) {
|
|
2902
3033
|
e.onBeforeCompile = (r) => {
|
|
2903
3034
|
r.uniforms.time = { value: t }, r.uniforms.waveFrequency = { value: o }, r.uniforms.waveAmplitude = { value: n }, r.vertexShader = `
|
|
2904
3035
|
uniform float time;
|
|
@@ -2922,14 +3053,14 @@ function dn(e, { time: t = 0, waveFrequency: o = 0.2, waveAmplitude: n = 0.5 } =
|
|
|
2922
3053
|
), e.userData.shader = r;
|
|
2923
3054
|
};
|
|
2924
3055
|
}
|
|
2925
|
-
function
|
|
3056
|
+
function Pn(e, t) {
|
|
2926
3057
|
e.userData.shader && (e.userData.shader.uniforms.time.value += t);
|
|
2927
3058
|
}
|
|
2928
|
-
function
|
|
2929
|
-
e.onBeforeCompile = (
|
|
2930
|
-
|
|
3059
|
+
function Tn(e, { time: t = 0, intensity: o = 1, axis: n = lt.XYZ, scale: r = 10 } = {}) {
|
|
3060
|
+
e.onBeforeCompile = (s) => {
|
|
3061
|
+
s.uniforms.time = { value: t }, s.uniforms.axis = { value: n }, s.uniforms.intensity = { value: o }, s.uniforms.scale = { value: r }, s.vertexShader = `
|
|
2931
3062
|
uniform float time;
|
|
2932
|
-
uniform vec3
|
|
3063
|
+
uniform vec3 axis;
|
|
2933
3064
|
uniform float intensity;
|
|
2934
3065
|
uniform float scale;
|
|
2935
3066
|
|
|
@@ -2958,18 +3089,18 @@ function wn(e, { time: t = 0, intensity: o = 1, direction: n = q.XYZ, scale: r =
|
|
|
2958
3089
|
|
|
2959
3090
|
return o4.y * d.y + o4.x * (1.0 - d.y);
|
|
2960
3091
|
}
|
|
2961
|
-
` +
|
|
3092
|
+
` + s.vertexShader, s.vertexShader = s.vertexShader.replace(
|
|
2962
3093
|
"#include <begin_vertex>",
|
|
2963
3094
|
`
|
|
2964
3095
|
vec3 transformed = vec3(position);
|
|
2965
3096
|
float n = noise(transformed * scale + time);
|
|
2966
|
-
transformed += normalize(
|
|
3097
|
+
transformed += normalize(axis) * n * intensity;
|
|
2967
3098
|
vec3 transformedNormal = normal;
|
|
2968
3099
|
`
|
|
2969
|
-
), e.userData.shader =
|
|
3100
|
+
), e.userData.shader = s;
|
|
2970
3101
|
};
|
|
2971
3102
|
}
|
|
2972
|
-
function
|
|
3103
|
+
function Gn(e, t) {
|
|
2973
3104
|
e.userData.shader && (e.userData.shader.uniforms.time.value += t);
|
|
2974
3105
|
}
|
|
2975
3106
|
const et = {
|
|
@@ -2978,8 +3109,8 @@ const et = {
|
|
|
2978
3109
|
rayleigh: { value: 2 },
|
|
2979
3110
|
mieCoefficient: { value: 5e-3 },
|
|
2980
3111
|
mieDirectionalG: { value: 0.8 },
|
|
2981
|
-
sunPosition: { value: new
|
|
2982
|
-
up: { value: new
|
|
3112
|
+
sunPosition: { value: new b().setFromSphericalCoords(1, O.degToRad(90), O.degToRad(180)) },
|
|
3113
|
+
up: { value: new b(0, 1, 0) }
|
|
2983
3114
|
},
|
|
2984
3115
|
vertexShader: `
|
|
2985
3116
|
uniform vec3 sunPosition;
|
|
@@ -3136,8 +3267,8 @@ const et = {
|
|
|
3136
3267
|
`
|
|
3137
3268
|
}, ot = {
|
|
3138
3269
|
uniforms: {
|
|
3139
|
-
topColor: { value: new
|
|
3140
|
-
bottomColor: { value: new
|
|
3270
|
+
topColor: { value: new K(0.5, 0.8, 1) },
|
|
3271
|
+
bottomColor: { value: new K(1, 1, 1) }
|
|
3141
3272
|
},
|
|
3142
3273
|
vertexShader: `
|
|
3143
3274
|
varying vec3 vPosition;
|
|
@@ -3155,7 +3286,7 @@ const et = {
|
|
|
3155
3286
|
gl_FragColor = vec4(mix(bottomColor, topColor, y), 1.0);
|
|
3156
3287
|
}
|
|
3157
3288
|
`
|
|
3158
|
-
},
|
|
3289
|
+
}, Bn = {
|
|
3159
3290
|
uniforms: {
|
|
3160
3291
|
tDiffuse: { value: null },
|
|
3161
3292
|
opacity: { value: 1 }
|
|
@@ -3178,8 +3309,8 @@ const et = {
|
|
|
3178
3309
|
`
|
|
3179
3310
|
}, nt = {
|
|
3180
3311
|
uniforms: {
|
|
3181
|
-
topColor: { value: new
|
|
3182
|
-
bottomColor: { value: new
|
|
3312
|
+
topColor: { value: new K(51) },
|
|
3313
|
+
bottomColor: { value: new K(17) },
|
|
3183
3314
|
offset: { value: 33 },
|
|
3184
3315
|
exponent: { value: 0.6 }
|
|
3185
3316
|
},
|
|
@@ -3203,19 +3334,19 @@ const et = {
|
|
|
3203
3334
|
}
|
|
3204
3335
|
`
|
|
3205
3336
|
};
|
|
3206
|
-
class
|
|
3337
|
+
class Cn extends y {
|
|
3207
3338
|
constructor() {
|
|
3208
3339
|
super();
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
this.geometry = new A(1, 1, 1), this.material = new
|
|
3340
|
+
g(this, "geometry");
|
|
3341
|
+
g(this, "material");
|
|
3342
|
+
this.geometry = new A(1, 1, 1), this.material = new $({
|
|
3212
3343
|
uniforms: et.uniforms,
|
|
3213
3344
|
vertexShader: et.vertexShader,
|
|
3214
3345
|
fragmentShader: et.fragmentShader,
|
|
3215
3346
|
depthWrite: !1,
|
|
3216
3347
|
side: it
|
|
3217
3348
|
}), this.scale.setScalar(45e4);
|
|
3218
|
-
const o =
|
|
3349
|
+
const o = O.degToRad(89), n = O.degToRad(180), r = new b().setFromSphericalCoords(1, o, n);
|
|
3219
3350
|
this.material.uniforms.sunPosition.value = r;
|
|
3220
3351
|
}
|
|
3221
3352
|
/**
|
|
@@ -3232,16 +3363,16 @@ class xn extends y {
|
|
|
3232
3363
|
* - This is the horizontal angle in the xy-plane.
|
|
3233
3364
|
*/
|
|
3234
3365
|
sunPosition(o, n) {
|
|
3235
|
-
const r = new
|
|
3366
|
+
const r = new b();
|
|
3236
3367
|
r.setFromSphericalCoords(1, o, n), this.material.uniforms.sunPosition.value = r;
|
|
3237
3368
|
}
|
|
3238
3369
|
}
|
|
3239
|
-
class
|
|
3370
|
+
class Un extends y {
|
|
3240
3371
|
constructor(o = 1e3) {
|
|
3241
3372
|
super();
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
this.geometry = new A(o, o, o), this.material = new
|
|
3373
|
+
g(this, "geometry");
|
|
3374
|
+
g(this, "material");
|
|
3375
|
+
this.geometry = new A(o, o, o), this.material = new $({
|
|
3245
3376
|
uniforms: ot.uniforms,
|
|
3246
3377
|
vertexShader: ot.vertexShader,
|
|
3247
3378
|
fragmentShader: ot.fragmentShader,
|
|
@@ -3249,12 +3380,12 @@ class gn extends y {
|
|
|
3249
3380
|
});
|
|
3250
3381
|
}
|
|
3251
3382
|
}
|
|
3252
|
-
class
|
|
3383
|
+
class zn extends y {
|
|
3253
3384
|
constructor(o = 1e3) {
|
|
3254
3385
|
super();
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
this.geometry = new N(o, 32, 15), this.material = new
|
|
3386
|
+
g(this, "geometry");
|
|
3387
|
+
g(this, "material");
|
|
3388
|
+
this.geometry = new N(o, 32, 15), this.material = new $({
|
|
3258
3389
|
vertexShader: nt.vertexShader,
|
|
3259
3390
|
fragmentShader: nt.fragmentShader,
|
|
3260
3391
|
uniforms: nt.uniforms,
|
|
@@ -3262,279 +3393,380 @@ class bn extends y {
|
|
|
3262
3393
|
});
|
|
3263
3394
|
}
|
|
3264
3395
|
}
|
|
3265
|
-
const
|
|
3396
|
+
const Nn = (e) => {
|
|
3266
3397
|
const t = new Uint8Array(4 * e * e);
|
|
3267
3398
|
for (let n = 0; n < e * e; n++) {
|
|
3268
|
-
const r = n * 4,
|
|
3269
|
-
t[r] =
|
|
3399
|
+
const r = n * 4, s = (n % e ^ Math.floor(n / e)) & 1 ? 255 : 0;
|
|
3400
|
+
t[r] = s, t[r + 1] = s, t[r + 2] = s, t[r + 3] = 255;
|
|
3270
3401
|
}
|
|
3271
|
-
const o = new
|
|
3272
|
-
return o.wrapS =
|
|
3402
|
+
const o = new Bt(t, e, e, Ct, Ut);
|
|
3403
|
+
return o.wrapS = ut, o.wrapT = ut, o.minFilter = zt, o.needsUpdate = !0, o;
|
|
3273
3404
|
};
|
|
3274
|
-
function
|
|
3275
|
-
const t = new ct().setFromObject(e), o = new
|
|
3405
|
+
function kn(e) {
|
|
3406
|
+
const t = new ct().setFromObject(e), o = new b();
|
|
3276
3407
|
t.getCenter(o), e.position.sub(o);
|
|
3277
3408
|
}
|
|
3278
|
-
function
|
|
3279
|
-
const o = new ct().setFromObject(e), n = new
|
|
3409
|
+
function Fn(e, t = new b(0, 0, 0)) {
|
|
3410
|
+
const o = new ct().setFromObject(e), n = new b();
|
|
3280
3411
|
o.getCenter(n);
|
|
3281
|
-
const r = new
|
|
3412
|
+
const r = new b().subVectors(t, n);
|
|
3282
3413
|
e.position.add(r);
|
|
3283
3414
|
}
|
|
3284
|
-
function
|
|
3415
|
+
function On(e) {
|
|
3285
3416
|
e.computeBoundingBox();
|
|
3286
3417
|
const t = e.boundingBox;
|
|
3287
3418
|
if (t) {
|
|
3288
|
-
const o = t.getCenter(new
|
|
3419
|
+
const o = t.getCenter(new b());
|
|
3289
3420
|
e.translateX(-o.x), e.translateY(-o.y), e.translateZ(-o.z);
|
|
3290
3421
|
}
|
|
3291
3422
|
}
|
|
3292
|
-
function
|
|
3423
|
+
function Ye(e, t, o) {
|
|
3293
3424
|
return Math.max(0, Math.min(1, (e - t) / (o - t)));
|
|
3294
3425
|
}
|
|
3295
|
-
function
|
|
3426
|
+
function _n(e, t, o, n, r, s = 20, a = 0, i = 1) {
|
|
3296
3427
|
const c = [];
|
|
3297
|
-
for (let l = 0; l <=
|
|
3298
|
-
const u = l /
|
|
3299
|
-
c.push(new
|
|
3428
|
+
for (let l = 0; l <= s; l++) {
|
|
3429
|
+
const u = l / s, m = e(Ye(u, a, i)), h = t + m * (o - t), f = n + u * (r - n);
|
|
3430
|
+
c.push(new I(h, f));
|
|
3300
3431
|
}
|
|
3301
3432
|
return c;
|
|
3302
3433
|
}
|
|
3303
|
-
function
|
|
3304
|
-
const o = new ct().setFromObject(e).getCenter(new
|
|
3434
|
+
function Rn(e) {
|
|
3435
|
+
const o = new ct().setFromObject(e).getCenter(new b());
|
|
3305
3436
|
e.translateX(-o.x), e.translateY(-o.y), e.translateZ(-o.z), e.updateMatrixWorld(!0);
|
|
3306
3437
|
}
|
|
3307
|
-
function
|
|
3438
|
+
function Ln(e) {
|
|
3308
3439
|
e.geometry.computeBoundingBox();
|
|
3309
3440
|
const t = e.geometry.boundingBox;
|
|
3310
3441
|
if (t) {
|
|
3311
|
-
const o = t.getCenter(new
|
|
3442
|
+
const o = t.getCenter(new b());
|
|
3312
3443
|
e.geometry.translate(-o.x, -o.y, -o.z);
|
|
3313
3444
|
}
|
|
3314
3445
|
}
|
|
3315
|
-
const
|
|
3316
|
-
let
|
|
3317
|
-
for (let
|
|
3318
|
-
const i =
|
|
3319
|
-
|
|
3446
|
+
const je = (e, t, o, n, r = 24) => {
|
|
3447
|
+
let s = [];
|
|
3448
|
+
for (let a = 0; a <= r; a++) {
|
|
3449
|
+
const i = a / r, c = _.CUBIC(i, e.x, t.x, o.x, n.x), l = _.CUBIC(i, e.y, t.y, o.y, n.y);
|
|
3450
|
+
s.push(new I(c, l));
|
|
3320
3451
|
}
|
|
3321
|
-
return
|
|
3322
|
-
},
|
|
3452
|
+
return s;
|
|
3453
|
+
}, He = (e, t, o, n = 24) => {
|
|
3323
3454
|
let r = [];
|
|
3324
|
-
for (let
|
|
3325
|
-
const
|
|
3326
|
-
r.push(new
|
|
3455
|
+
for (let s = 0; s <= n; s++) {
|
|
3456
|
+
const a = s / n, i = _.DAMPED(a, o) * (t.x - e.x) + e.x, c = e.y + a * (t.y - e.y);
|
|
3457
|
+
r.push(new I(i, c));
|
|
3327
3458
|
}
|
|
3328
3459
|
return r;
|
|
3329
|
-
},
|
|
3330
|
-
let
|
|
3331
|
-
for (let
|
|
3332
|
-
const i =
|
|
3333
|
-
|
|
3334
|
-
}
|
|
3335
|
-
return a;
|
|
3336
|
-
}, Ye = (e, t, o, n, r = 24) => {
|
|
3337
|
-
let a = [];
|
|
3338
|
-
for (let s = 0; s <= r; s++) {
|
|
3339
|
-
const i = s / r, c = F.LOGARITHMIC(i, o, n) * (t.x - e.x) + e.x, l = e.y + i * (t.y - e.y);
|
|
3340
|
-
a.push(new b(c, l));
|
|
3460
|
+
}, Qe = (e, t, o, n, r = 24) => {
|
|
3461
|
+
let s = [];
|
|
3462
|
+
for (let a = 0; a <= r; a++) {
|
|
3463
|
+
const i = a / r, c = _.EXPONENTIAL(i, o, n) * (t.x - e.x) + e.x, l = e.y + i * (t.y - e.y);
|
|
3464
|
+
s.push(new I(c, l));
|
|
3341
3465
|
}
|
|
3342
|
-
return
|
|
3343
|
-
},
|
|
3466
|
+
return s;
|
|
3467
|
+
}, Ke = (e, t, o, n, r = 24) => {
|
|
3344
3468
|
let s = [];
|
|
3345
|
-
for (let
|
|
3346
|
-
const
|
|
3347
|
-
s.push(new
|
|
3469
|
+
for (let a = 0; a <= r; a++) {
|
|
3470
|
+
const i = a / r, c = _.LOGARITHMIC(i, o, n) * (t.x - e.x) + e.x, l = e.y + i * (t.y - e.y);
|
|
3471
|
+
s.push(new I(c, l));
|
|
3348
3472
|
}
|
|
3349
3473
|
return s;
|
|
3350
|
-
},
|
|
3474
|
+
}, $e = (e, t, o, n, r, s = 24) => {
|
|
3475
|
+
let a = [];
|
|
3476
|
+
for (let i = 0; i <= s; i++) {
|
|
3477
|
+
const c = i / s, l = o * c * c + n * c + r + e.x, u = e.y + c * (t.y - e.y);
|
|
3478
|
+
a.push(new I(l, u));
|
|
3479
|
+
}
|
|
3480
|
+
return a;
|
|
3481
|
+
}, Je = (e, t, o, n = 24) => {
|
|
3351
3482
|
let r = [];
|
|
3352
|
-
for (let
|
|
3353
|
-
const
|
|
3354
|
-
r.push(new
|
|
3483
|
+
for (let s = 0; s <= n; s++) {
|
|
3484
|
+
const a = s / n, i = _.QUADRATIC(a, e.x, t.x, o.x), c = _.QUADRATIC(a, e.y, t.y, o.y);
|
|
3485
|
+
r.push(new I(i, c));
|
|
3355
3486
|
}
|
|
3356
3487
|
return r;
|
|
3357
|
-
},
|
|
3488
|
+
}, We = (e, t, o, n = 24) => {
|
|
3358
3489
|
let r = [];
|
|
3359
|
-
for (let
|
|
3360
|
-
const
|
|
3361
|
-
r.push(new
|
|
3490
|
+
for (let s = 0; s <= n; s++) {
|
|
3491
|
+
const a = s / n, i = _.SIGMOID(a, o) * (t.x - e.x) + e.x, c = e.y + a * (t.y - e.y);
|
|
3492
|
+
r.push(new I(i, c));
|
|
3362
3493
|
}
|
|
3363
3494
|
return r;
|
|
3364
|
-
},
|
|
3365
|
-
createCubicCurvePoints:
|
|
3366
|
-
createDampedCurvePoints:
|
|
3367
|
-
createExponentialCurvePoints:
|
|
3368
|
-
createLogarithmicCurvePoints:
|
|
3369
|
-
createParabolicCurvePoints:
|
|
3370
|
-
createQuadraticCurvePoints:
|
|
3371
|
-
createSigmoidCurvePoints:
|
|
3495
|
+
}, qn = {
|
|
3496
|
+
createCubicCurvePoints: je,
|
|
3497
|
+
createDampedCurvePoints: He,
|
|
3498
|
+
createExponentialCurvePoints: Qe,
|
|
3499
|
+
createLogarithmicCurvePoints: Ke,
|
|
3500
|
+
createParabolicCurvePoints: $e,
|
|
3501
|
+
createQuadraticCurvePoints: Je,
|
|
3502
|
+
createSigmoidCurvePoints: We
|
|
3372
3503
|
};
|
|
3504
|
+
function Dn(e, t, o, n, r, s = [0, 0], a = [1, 0], i = [0, 1], c = [1, 1]) {
|
|
3505
|
+
const l = r || to(e, t, o);
|
|
3506
|
+
return [
|
|
3507
|
+
// Triangle 1
|
|
3508
|
+
{ pos: e, norm: l, uv: s },
|
|
3509
|
+
{ pos: t, norm: l, uv: a },
|
|
3510
|
+
{ pos: n, norm: l, uv: c },
|
|
3511
|
+
// Triangle 2
|
|
3512
|
+
{ pos: e, norm: l, uv: s },
|
|
3513
|
+
{ pos: n, norm: l, uv: c },
|
|
3514
|
+
{ pos: o, norm: l, uv: i }
|
|
3515
|
+
];
|
|
3516
|
+
}
|
|
3517
|
+
function to(e, t, o) {
|
|
3518
|
+
const n = [
|
|
3519
|
+
t[0] - e[0],
|
|
3520
|
+
t[1] - e[1],
|
|
3521
|
+
t[2] - e[2]
|
|
3522
|
+
], r = [
|
|
3523
|
+
o[0] - e[0],
|
|
3524
|
+
o[1] - e[1],
|
|
3525
|
+
o[2] - e[2]
|
|
3526
|
+
], s = [
|
|
3527
|
+
n[1] * r[2] - n[2] * r[1],
|
|
3528
|
+
n[2] * r[0] - n[0] * r[2],
|
|
3529
|
+
n[0] * r[1] - n[1] * r[0]
|
|
3530
|
+
], a = Math.sqrt(s[0] ** 2 + s[1] ** 2 + s[2] ** 2);
|
|
3531
|
+
return s.map((i) => i / a);
|
|
3532
|
+
}
|
|
3533
|
+
function Vn(e, t) {
|
|
3534
|
+
return e.map(([o, n, r]) => {
|
|
3535
|
+
switch (t) {
|
|
3536
|
+
case "x":
|
|
3537
|
+
return [n, r];
|
|
3538
|
+
case "y":
|
|
3539
|
+
return [o, r];
|
|
3540
|
+
case "z":
|
|
3541
|
+
return [o, n];
|
|
3542
|
+
default:
|
|
3543
|
+
throw new Error(`Invalid axis: ${t}`);
|
|
3544
|
+
}
|
|
3545
|
+
});
|
|
3546
|
+
}
|
|
3547
|
+
function eo(e) {
|
|
3548
|
+
const [t, o, n] = e, r = Math.abs(t), s = Math.abs(o), a = Math.abs(n);
|
|
3549
|
+
return r >= s && r >= a ? [n > 0 ? n : -n, o] : s >= r && s >= a ? [t, n > 0 ? n : -n] : [t, o];
|
|
3550
|
+
}
|
|
3551
|
+
function Xn(e) {
|
|
3552
|
+
return e.map((t) => eo(t));
|
|
3553
|
+
}
|
|
3554
|
+
function Zn(e) {
|
|
3555
|
+
return e.map(([t, o, n]) => {
|
|
3556
|
+
const r = Math.atan2(n, t), s = Math.acos(o / Math.sqrt(t ** 2 + o ** 2 + n ** 2)), a = r / (2 * Math.PI) + 0.5, i = 1 - s / Math.PI;
|
|
3557
|
+
return [a, i];
|
|
3558
|
+
});
|
|
3559
|
+
}
|
|
3560
|
+
function Yn(e) {
|
|
3561
|
+
return e.map(([t, o, n]) => [Math.atan2(n, t) / (2 * Math.PI) + 0.5, o]);
|
|
3562
|
+
}
|
|
3563
|
+
function jn(e) {
|
|
3564
|
+
return e.map(([t, o, n]) => {
|
|
3565
|
+
const r = Math.sqrt(t ** 2 + n ** 2);
|
|
3566
|
+
return [Math.atan2(n, t) / (2 * Math.PI) + 0.5, r];
|
|
3567
|
+
});
|
|
3568
|
+
}
|
|
3569
|
+
function oo(e, t, o, n, r) {
|
|
3570
|
+
return [
|
|
3571
|
+
(e[0] - t) / (o - t),
|
|
3572
|
+
(e[1] - n) / (r - n)
|
|
3573
|
+
];
|
|
3574
|
+
}
|
|
3575
|
+
function Hn(e, t, o) {
|
|
3576
|
+
const [n, r] = t, [s, a] = o;
|
|
3577
|
+
return e.map((i) => oo(i, n, s, r, a));
|
|
3578
|
+
}
|
|
3579
|
+
function Qn(e) {
|
|
3580
|
+
const t = Math.min(...e.map((s) => s[0])), o = Math.max(...e.map((s) => s[0])), n = Math.min(...e.map((s) => s[1])), r = Math.max(...e.map((s) => s[1]));
|
|
3581
|
+
return {
|
|
3582
|
+
minBounds: [t, n],
|
|
3583
|
+
maxBounds: [o, r]
|
|
3584
|
+
};
|
|
3585
|
+
}
|
|
3373
3586
|
export {
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3587
|
+
Cn as AtmosphericSkybox,
|
|
3588
|
+
lt as Axis,
|
|
3589
|
+
To as BifurcatedStaircaseGeometry,
|
|
3590
|
+
bn as Bone,
|
|
3591
|
+
Ue as BoneGeometry,
|
|
3592
|
+
_o as Book,
|
|
3593
|
+
dt as BookGeometry,
|
|
3594
|
+
jo as Bookshelf,
|
|
3595
|
+
Te as BookshelfGeometry,
|
|
3596
|
+
tn as Bottle,
|
|
3597
|
+
xo as BubblingEffect,
|
|
3598
|
+
en as BunsenBurner,
|
|
3599
|
+
wn as Burst,
|
|
3600
|
+
De as BurstShape,
|
|
3601
|
+
Qo as Candle,
|
|
3602
|
+
Ro as CrossHeadstone,
|
|
3603
|
+
be as CrossHeadstoneGeometry,
|
|
3604
|
+
Un as DaySkybox,
|
|
3605
|
+
Ho as Desk,
|
|
3606
|
+
Ge as DeskGeometry,
|
|
3607
|
+
Go as DioramaGeometry,
|
|
3608
|
+
W as Direction,
|
|
3609
|
+
vo as Easing,
|
|
3610
|
+
on as ElectricPanel,
|
|
3611
|
+
Me as EllipticLeafGeometry,
|
|
3612
|
+
go as EmissivePulseEffect,
|
|
3613
|
+
nn as ErlenmeyerFlask,
|
|
3614
|
+
ze as ErlenmeyerFlaskGeometry,
|
|
3615
|
+
Q as Falloff,
|
|
3616
|
+
Xo as FenceColumn,
|
|
3617
|
+
Ee as FenceColumnGeometry,
|
|
3618
|
+
sn as Flask,
|
|
3619
|
+
rn as FlorenceFlask,
|
|
3620
|
+
Ne as FlorenceFlaskGeometry,
|
|
3621
|
+
vn as Gear,
|
|
3622
|
+
Ve as GearShape,
|
|
3623
|
+
xn as Heart,
|
|
3624
|
+
Xe as HeartShape,
|
|
3625
|
+
An as Hill,
|
|
3626
|
+
_e as HillGeometry,
|
|
3627
|
+
Bo as LShapedStaircaseGeometry,
|
|
3628
|
+
Ko as Lantern,
|
|
3629
|
+
bo as LeafEffect,
|
|
3630
|
+
an as LeverPanel,
|
|
3631
|
+
So as LightningEffect,
|
|
3632
|
+
Lo as Mausoleum,
|
|
3633
|
+
cn as Microscope,
|
|
3634
|
+
Oo as Moon,
|
|
3635
|
+
ln as MortarAndPestle,
|
|
3636
|
+
ke as MortarGeometry,
|
|
3637
|
+
$o as MossyRocks,
|
|
3638
|
+
Sn as Mound,
|
|
3639
|
+
Le as MoundGeometry,
|
|
3640
|
+
zn as NightSkybox,
|
|
3641
|
+
qo as ObeliskHeadstone,
|
|
3642
|
+
Ie as ObeliskHeadstoneGeometry,
|
|
3643
|
+
un as Panel,
|
|
3644
|
+
mn as PanelLight,
|
|
3645
|
+
_ as ParametricCurve,
|
|
3646
|
+
qn as ParametricCurveUtils,
|
|
3647
|
+
Jo as Rock,
|
|
3648
|
+
Ce as RockGeometry,
|
|
3649
|
+
Wo as Rocks,
|
|
3650
|
+
Do as RoundedHeadstone,
|
|
3651
|
+
Ae as RoundedHeadstoneGeometry,
|
|
3652
|
+
Co as SpiralStaircaseGeometry,
|
|
3653
|
+
hn as SpiralTube,
|
|
3654
|
+
Vo as SquareHeadstone,
|
|
3655
|
+
Se as SquareHeadstoneGeometry,
|
|
3656
|
+
Uo as StaircaseGeometry,
|
|
3657
|
+
fn as Stand,
|
|
3658
|
+
Fe as StandGeometry,
|
|
3659
|
+
gn as Star,
|
|
3660
|
+
Ze as StarShape,
|
|
3661
|
+
pn as TeslaCoil,
|
|
3662
|
+
dn as TestTube,
|
|
3444
3663
|
st as TestTubeGeometry,
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3664
|
+
yn as TestTubeRack,
|
|
3665
|
+
In as Tree,
|
|
3666
|
+
qe as TreeGeometry,
|
|
3667
|
+
Mn as WineBottle,
|
|
3668
|
+
Oe as WineBottleGeometry,
|
|
3669
|
+
Zo as WroughtIronBar,
|
|
3670
|
+
wt as WroughtIronBarGeometry,
|
|
3671
|
+
Yo as WroughtIronFence,
|
|
3672
|
+
Pe as WroughtIronFenceGeometry,
|
|
3673
|
+
Tn as addNoiseDisplacement,
|
|
3674
|
+
En as addWaterDisplacement,
|
|
3456
3675
|
et as atmosphericShader,
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
je as
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3676
|
+
to as calculateNormal,
|
|
3677
|
+
Qn as calculateUVBounds,
|
|
3678
|
+
Re as capHeightFromRadius,
|
|
3679
|
+
No as capWidthFromRadius,
|
|
3680
|
+
Fo as cartesianToSpherical,
|
|
3681
|
+
kn as centerGroup,
|
|
3682
|
+
Fn as centerGroupAtTarget,
|
|
3683
|
+
On as centerInstancedMesh,
|
|
3684
|
+
Rn as centerMesh,
|
|
3685
|
+
Ln as centerMeshGeometry,
|
|
3686
|
+
Nn as checkerboardTexture,
|
|
3687
|
+
Jt as circularEaseIn,
|
|
3688
|
+
te as circularEaseInOut,
|
|
3689
|
+
Wt as circularEaseOut,
|
|
3690
|
+
ne as concave,
|
|
3691
|
+
se as convex,
|
|
3692
|
+
je as createCubicCurvePoints,
|
|
3693
|
+
He as createDampedCurvePoints,
|
|
3694
|
+
Qe as createExponentialCurvePoints,
|
|
3695
|
+
Ke as createLogarithmicCurvePoints,
|
|
3696
|
+
$e as createParabolicCurvePoints,
|
|
3697
|
+
Dn as createQuad,
|
|
3698
|
+
Je as createQuadraticCurvePoints,
|
|
3699
|
+
We as createSigmoidCurvePoints,
|
|
3700
|
+
le as cubicCurve,
|
|
3701
|
+
Lt as cubicEaseIn,
|
|
3702
|
+
Dt as cubicEaseInOut,
|
|
3703
|
+
qt as cubicEaseOut,
|
|
3704
|
+
eo as cubicUVMapping,
|
|
3705
|
+
Xn as cubicUVMappingBatch,
|
|
3706
|
+
Yn as cylindricalUVMapping,
|
|
3707
|
+
ue as dampedCurve,
|
|
3483
3708
|
ot as daySkyShader,
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3709
|
+
ho as displacementBrush,
|
|
3710
|
+
ro as dollyAnimation,
|
|
3711
|
+
me as exponentialCurve,
|
|
3712
|
+
Qt as exponentialEaseIn,
|
|
3713
|
+
$t as exponentialEaseInOut,
|
|
3714
|
+
Kt as exponentialEaseOut,
|
|
3715
|
+
Bn as fadeShader,
|
|
3716
|
+
fo as flattenBrush,
|
|
3717
|
+
ao as flythroughAnimation,
|
|
3718
|
+
ce as gaussian,
|
|
3719
|
+
_n as interpolateCurve,
|
|
3720
|
+
ie as inverse,
|
|
3721
|
+
ee as linear,
|
|
3722
|
+
re as logarithmic,
|
|
3723
|
+
he as logarithmicCurve,
|
|
3724
|
+
we as logarithmicRandomMax,
|
|
3500
3725
|
ve as logarithmicRandomMin,
|
|
3501
3726
|
nt as nightSkyShader,
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
Zt as
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3727
|
+
po as noiseBrush,
|
|
3728
|
+
oo as normalizeUV,
|
|
3729
|
+
Hn as normalizeUVBatch,
|
|
3730
|
+
io as orbitAnimation,
|
|
3731
|
+
fe as parabolicCurve,
|
|
3732
|
+
co as pendulumAnimation,
|
|
3733
|
+
Vn as planarUVMapping,
|
|
3734
|
+
jn as polarUVMapping,
|
|
3735
|
+
pe as quadraticCurve,
|
|
3736
|
+
Ot as quadraticEaseIn,
|
|
3737
|
+
Rt as quadraticEaseInOut,
|
|
3738
|
+
_t as quadraticEaseOut,
|
|
3739
|
+
Vt as quarticEaseIn,
|
|
3740
|
+
Zt as quarticEaseInOut,
|
|
3741
|
+
Xt as quarticEaseOut,
|
|
3742
|
+
Yt as quinticEaseIn,
|
|
3743
|
+
Ht as quinticEaseInOut,
|
|
3744
|
+
jt as quinticEaseOut,
|
|
3745
|
+
zo as radiusFromCapHeight,
|
|
3746
|
+
vt as radiusFromCapWidth,
|
|
3747
|
+
pt as randomFloat,
|
|
3748
|
+
Io as randomInteger,
|
|
3749
|
+
Be as randomTransformVertices,
|
|
3750
|
+
Eo as rowOfBooksByCount,
|
|
3751
|
+
Po as rowOfBooksByLength,
|
|
3752
|
+
Mt as rowOfBooksByScales,
|
|
3753
|
+
Ao as setRandomInterval,
|
|
3754
|
+
xe as setRandomTimeout,
|
|
3755
|
+
de as sigmoidCurve,
|
|
3756
|
+
Nt as sineEaseIn,
|
|
3757
|
+
Ft as sineEaseInOut,
|
|
3758
|
+
kt as sineEaseOut,
|
|
3759
|
+
yo as smoothBrush,
|
|
3760
|
+
oe as smoothstep,
|
|
3761
|
+
ko as sphericalToCartesian,
|
|
3762
|
+
Zn as sphericalUVMapping,
|
|
3763
|
+
Mo as spikeBrush,
|
|
3764
|
+
lo as spiralAscensionAnimation,
|
|
3765
|
+
ae as squareRoot,
|
|
3766
|
+
wo as twistBrush,
|
|
3767
|
+
Gn as updateNoiseDisplacementTime,
|
|
3768
|
+
Pn as updateWaterDisplacementTime,
|
|
3769
|
+
uo as wobbleAnimation,
|
|
3770
|
+
mo as zoomInAnimation
|
|
3539
3771
|
};
|
|
3540
3772
|
//# sourceMappingURL=index.es.js.map
|