three-low-poly 0.9.13 → 0.9.14
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 +9 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +140 -17
- package/dist/index.es.js +1532 -1365
- package/dist/index.es.js.map +1 -1
- package/dist/index.iife.js +10 -10
- package/dist/index.iife.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,110 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { Vector3 as g, MathUtils as
|
|
5
|
-
|
|
1
|
+
var vt = Object.defineProperty;
|
|
2
|
+
var xt = (e, t, o) => t in e ? vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
+
var E = (e, t, o) => xt(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
+
import { Vector3 as g, MathUtils as _, Quaternion as gt, InstancedMesh as rt, SphereGeometry as N, MeshStandardMaterial as M, Matrix4 as Z, BufferGeometry as I, Float32BufferAttribute as D, DoubleSide as L, Euler as bt, BufferAttribute as R, BoxGeometry as A, ConeGeometry as j, CylinderGeometry as S, Vector2 as b, LatheGeometry as Y, CircleGeometry as At, TorusGeometry as mt, DodecahedronGeometry as at, Group as P, ShaderMaterial as J, Mesh as y, Shape as H, ExtrudeGeometry as Q, MeshBasicMaterial as It, PointLight as ht, MeshPhysicalMaterial as W, CatmullRomCurve3 as St, TubeGeometry as Et, Path as Pt, Color as $, BackSide as it, DataTexture as Tt, RGBAFormat as Gt, UnsignedByteType as Ct, RepeatWrapping as lt, NearestFilter as Bt, Box3 as ct } from "three";
|
|
5
|
+
function We(e, t, o, n) {
|
|
6
|
+
const r = e.position.clone(), a = r.clone().add(e.getWorldDirection(new g()).multiplyScalar(-t));
|
|
7
|
+
let s = null;
|
|
8
|
+
function i(c) {
|
|
9
|
+
s === null && (s = c);
|
|
10
|
+
const u = (c - s) / o;
|
|
11
|
+
if (u >= 1) {
|
|
12
|
+
e.position.copy(a), n && n();
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
e.position.lerpVectors(r, a, u), requestAnimationFrame(i);
|
|
16
|
+
}
|
|
17
|
+
requestAnimationFrame(i);
|
|
18
|
+
}
|
|
19
|
+
function to(e, t, o, n) {
|
|
20
|
+
const r = t.length - 1;
|
|
21
|
+
let a = null;
|
|
22
|
+
function s(i) {
|
|
23
|
+
a === null && (a = i);
|
|
24
|
+
const l = (i - a) / o;
|
|
25
|
+
if (l >= 1) {
|
|
26
|
+
e.position.copy(t[t.length - 1]), n && n();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
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(s);
|
|
31
|
+
}
|
|
32
|
+
requestAnimationFrame(s);
|
|
33
|
+
}
|
|
34
|
+
function eo(e, t, o, n, r) {
|
|
35
|
+
let a = null;
|
|
36
|
+
function s(i) {
|
|
37
|
+
a || (a = i);
|
|
38
|
+
const l = (i - a) / n;
|
|
39
|
+
if (l >= 1) {
|
|
40
|
+
r && r();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
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(s);
|
|
45
|
+
}
|
|
46
|
+
requestAnimationFrame(s);
|
|
47
|
+
}
|
|
48
|
+
function oo(e, t, o, n, r, a) {
|
|
49
|
+
let s = null, i = 0;
|
|
50
|
+
function c(l) {
|
|
51
|
+
s === null && (s = l);
|
|
52
|
+
const u = l - s, 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
|
+
if (e.position.set(p, e.position.y, d), e.lookAt(t), u >= (i + 1) * m && i++, i >= r) {
|
|
54
|
+
a && a();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
requestAnimationFrame(c);
|
|
58
|
+
}
|
|
59
|
+
requestAnimationFrame(c);
|
|
60
|
+
}
|
|
61
|
+
function no(e, t, o, n, r, a, s) {
|
|
62
|
+
let i = null;
|
|
63
|
+
function c(l) {
|
|
64
|
+
i === null && (i = l);
|
|
65
|
+
const m = (l - i) / a;
|
|
66
|
+
if (m >= 1) {
|
|
67
|
+
s && s();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
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;
|
|
71
|
+
e.position.set(f, d, p), e.lookAt(t), requestAnimationFrame(c);
|
|
72
|
+
}
|
|
73
|
+
requestAnimationFrame(c);
|
|
74
|
+
}
|
|
75
|
+
function so(e, t, o, n) {
|
|
76
|
+
const r = e.position.clone();
|
|
77
|
+
let a = null;
|
|
78
|
+
function s(i) {
|
|
79
|
+
if (a === null && (a = i), (i - a) / o >= 1) {
|
|
80
|
+
e.position.copy(r), n && n();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const u = new g(
|
|
84
|
+
(Math.random() - 0.5) * t,
|
|
85
|
+
(Math.random() - 0.5) * t,
|
|
86
|
+
(Math.random() - 0.5) * t
|
|
87
|
+
);
|
|
88
|
+
e.position.copy(r).add(u), requestAnimationFrame(s);
|
|
89
|
+
}
|
|
90
|
+
requestAnimationFrame(s);
|
|
91
|
+
}
|
|
92
|
+
function ro(e, t, o, n, r, a) {
|
|
93
|
+
const s = e.fov;
|
|
94
|
+
e.fov = o, e.updateProjectionMatrix();
|
|
95
|
+
let i = null;
|
|
96
|
+
function c(l) {
|
|
97
|
+
i === null && (i = l);
|
|
98
|
+
const m = (l - i) / r;
|
|
99
|
+
if (m >= 1) {
|
|
100
|
+
e.fov = n, e.updateProjectionMatrix(), e.lookAt(t), e.fov = s, e.updateProjectionMatrix(), a && a();
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
e.fov = _.lerp(o, n, m), e.updateProjectionMatrix(), e.lookAt(t), requestAnimationFrame(c);
|
|
104
|
+
}
|
|
105
|
+
requestAnimationFrame(c);
|
|
106
|
+
}
|
|
107
|
+
const q = {
|
|
6
108
|
UP: new g(0, 1, 0),
|
|
7
109
|
DOWN: new g(0, -1, 0),
|
|
8
110
|
LEFT: new g(-1, 0, 0),
|
|
@@ -16,201 +118,287 @@ const L = {
|
|
|
16
118
|
XZ: new g(1, 0, 1).normalize(),
|
|
17
119
|
YZ: new g(0, 1, 1).normalize(),
|
|
18
120
|
XYZ: new g(1, 1, 1).normalize()
|
|
19
|
-
},
|
|
20
|
-
LINEAR: (
|
|
21
|
-
QUADRATIC: (
|
|
22
|
-
SQUARE_ROOT: (
|
|
23
|
-
LOGARITHMIC: (
|
|
24
|
-
SINE: (
|
|
25
|
-
EXPONENTIAL: (
|
|
26
|
-
CUBIC: (
|
|
27
|
-
GAUSSIAN: (
|
|
28
|
-
INVERSE: (
|
|
29
|
-
SMOOTHSTEP: (
|
|
30
|
-
const o = Math.max(0, Math.min(1, 1 -
|
|
121
|
+
}, K = {
|
|
122
|
+
LINEAR: (e, t) => 1 - e / t,
|
|
123
|
+
QUADRATIC: (e, t) => Math.pow(1 - e / t, 2),
|
|
124
|
+
SQUARE_ROOT: (e, t) => Math.pow(1 - e / t, 0.5),
|
|
125
|
+
LOGARITHMIC: (e, t) => Math.log(1 + (t - e)) / Math.log(1 + t),
|
|
126
|
+
SINE: (e, t) => Math.cos(e / t * Math.PI / 2),
|
|
127
|
+
EXPONENTIAL: (e, t) => Math.exp(-e / t),
|
|
128
|
+
CUBIC: (e, t) => Math.pow(1 - e / t, 3),
|
|
129
|
+
GAUSSIAN: (e, t) => Math.exp(-Math.pow(e, 2) / (2 * Math.pow(t / 3, 2))),
|
|
130
|
+
INVERSE: (e, t) => t / (t + e),
|
|
131
|
+
SMOOTHSTEP: (e, t) => {
|
|
132
|
+
const o = Math.max(0, Math.min(1, 1 - e / t));
|
|
31
133
|
return o * o * (3 - 2 * o);
|
|
32
134
|
}
|
|
33
|
-
},
|
|
34
|
-
const s =
|
|
35
|
-
for (let
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const l =
|
|
135
|
+
}, ao = (e, t, o, n, r = q.UP, a = K.LINEAR) => {
|
|
136
|
+
const s = e.attributes.position;
|
|
137
|
+
for (let i = 0; i < s.count; i++) {
|
|
138
|
+
const c = new g();
|
|
139
|
+
c.fromBufferAttribute(s, i);
|
|
140
|
+
const l = c.distanceTo(t);
|
|
39
141
|
if (l < o) {
|
|
40
|
-
const m =
|
|
41
|
-
|
|
142
|
+
const m = a(l, o) * n;
|
|
143
|
+
c.add(r.clone().multiplyScalar(m)), s.setXYZ(i, c.x, c.y, c.z);
|
|
42
144
|
}
|
|
43
145
|
}
|
|
44
146
|
s.needsUpdate = !0;
|
|
45
|
-
},
|
|
46
|
-
const
|
|
47
|
-
for (let
|
|
147
|
+
}, io = (e, t, o, n, r, a = q.UP, s = K.LINEAR) => {
|
|
148
|
+
const i = e.attributes.position;
|
|
149
|
+
for (let c = 0; c < i.count; c++) {
|
|
48
150
|
const l = new g();
|
|
49
|
-
l.fromBufferAttribute(
|
|
50
|
-
const u = l.distanceTo(
|
|
151
|
+
l.fromBufferAttribute(i, c);
|
|
152
|
+
const u = l.distanceTo(t);
|
|
51
153
|
if (u < o) {
|
|
52
|
-
const h = s(u, o) *
|
|
53
|
-
l.add(
|
|
154
|
+
const h = s(u, o) * r, f = l.dot(a.normalize()), p = n - f;
|
|
155
|
+
l.add(a.clone().multiplyScalar(p * h)), i.setXYZ(c, l.x, l.y, l.z);
|
|
54
156
|
}
|
|
55
157
|
}
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
const s =
|
|
59
|
-
for (let
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
const l =
|
|
158
|
+
i.needsUpdate = !0;
|
|
159
|
+
}, co = (e, t, o, n, r = q.UP, a = K.LINEAR) => {
|
|
160
|
+
const s = e.attributes.position;
|
|
161
|
+
for (let i = 0; i < s.count; i++) {
|
|
162
|
+
const c = new g();
|
|
163
|
+
c.fromBufferAttribute(s, i);
|
|
164
|
+
const l = c.distanceTo(t);
|
|
63
165
|
if (l < o) {
|
|
64
|
-
const u =
|
|
65
|
-
|
|
166
|
+
const u = a(l, o), m = n * u, h = r.clone().normalize();
|
|
167
|
+
c.x += _.randFloatSpread(m) * h.x, c.y += _.randFloatSpread(m) * h.y, c.z += _.randFloatSpread(m) * h.z, s.setXYZ(i, c.x, c.y, c.z);
|
|
66
168
|
}
|
|
67
169
|
}
|
|
68
170
|
s.needsUpdate = !0;
|
|
69
|
-
},
|
|
70
|
-
const
|
|
71
|
-
for (let s = 0; s <
|
|
72
|
-
const
|
|
73
|
-
if (
|
|
171
|
+
}, lo = (e, t, o, n) => {
|
|
172
|
+
const r = e.attributes.position, a = new g();
|
|
173
|
+
for (let s = 0; s < r.count; s++) {
|
|
174
|
+
const i = new g();
|
|
175
|
+
if (i.fromBufferAttribute(r, s), i.distanceTo(t) < o) {
|
|
74
176
|
let l = new g(), u = 0;
|
|
75
|
-
for (let m = 0; m <
|
|
76
|
-
|
|
77
|
-
u > 0 && (l.divideScalar(u),
|
|
177
|
+
for (let m = 0; m < r.count; m++)
|
|
178
|
+
a.fromBufferAttribute(r, m), a.distanceTo(i) < o && (l.add(a), u++);
|
|
179
|
+
u > 0 && (l.divideScalar(u), i.lerp(l, n), r.setXYZ(s, i.x, i.y, i.z));
|
|
78
180
|
}
|
|
79
181
|
}
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
const s =
|
|
83
|
-
for (let
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
const l =
|
|
182
|
+
r.needsUpdate = !0;
|
|
183
|
+
}, uo = (e, t, o, n, r = !1, a = K.LINEAR) => {
|
|
184
|
+
const s = e.attributes.position;
|
|
185
|
+
for (let i = 0; i < s.count; i++) {
|
|
186
|
+
const c = new g();
|
|
187
|
+
c.fromBufferAttribute(s, i);
|
|
188
|
+
const l = c.distanceTo(t);
|
|
87
189
|
if (l < o) {
|
|
88
|
-
const m =
|
|
89
|
-
|
|
190
|
+
const m = a(l, o) * n * (r ? -1 : 1), h = c.clone().sub(t).normalize();
|
|
191
|
+
c.add(h.multiplyScalar(m)), s.setXYZ(i, c.x, c.y, c.z);
|
|
90
192
|
}
|
|
91
193
|
}
|
|
92
194
|
s.needsUpdate = !0;
|
|
93
|
-
},
|
|
94
|
-
const s =
|
|
95
|
-
for (let
|
|
195
|
+
}, mo = (e, t, o, n, r = q.UP, a = K.LINEAR) => {
|
|
196
|
+
const s = e.attributes.position, i = new gt();
|
|
197
|
+
for (let c = 0; c < s.count; c++) {
|
|
96
198
|
const l = new g();
|
|
97
|
-
l.fromBufferAttribute(s,
|
|
98
|
-
const u = l.distanceTo(
|
|
199
|
+
l.fromBufferAttribute(s, c);
|
|
200
|
+
const u = l.distanceTo(t);
|
|
99
201
|
if (u < o) {
|
|
100
|
-
const h =
|
|
101
|
-
|
|
202
|
+
const h = a(u, o) * n;
|
|
203
|
+
i.setFromAxisAngle(r, h), l.sub(t).applyQuaternion(i).add(t), s.setXYZ(c, l.x, l.y, l.z);
|
|
102
204
|
}
|
|
103
205
|
}
|
|
104
206
|
s.needsUpdate = !0;
|
|
105
|
-
},
|
|
106
|
-
SINE_EASE_IN:
|
|
107
|
-
SINE_EASE_OUT:
|
|
108
|
-
SINE_EASE_IN_OUT:
|
|
109
|
-
QUADRATIC_EASE_IN:
|
|
110
|
-
QUADRATIC_EASE_OUT:
|
|
111
|
-
QUADRATIC_EASE_IN_OUT:
|
|
112
|
-
CUBIC_EASE_IN:
|
|
113
|
-
CUBIC_EASE_OUT:
|
|
114
|
-
CUBIC_EASE_IN_OUT:
|
|
115
|
-
QUARTIC_EASE_IN:
|
|
116
|
-
QUARTIC_EASE_OUT:
|
|
117
|
-
QUARTIC_EASE_IN_OUT:
|
|
118
|
-
QUINTIC_EASE_IN:
|
|
119
|
-
QUINTIC_EASE_OUT:
|
|
120
|
-
QUINTIC_EASE_IN_OUT:
|
|
121
|
-
EXPONENTIAL_EASE_IN:
|
|
122
|
-
EXPONENTIAL_EASE_OUT:
|
|
123
|
-
EXPONENTIAL_EASE_IN_OUT:
|
|
124
|
-
CIRCULAR_EASE_IN:
|
|
125
|
-
CIRCULAR_EASE_OUT:
|
|
126
|
-
CIRCULAR_EASE_IN_OUT:
|
|
127
|
-
LINEAR:
|
|
128
|
-
SMOOTHSTEP:
|
|
129
|
-
CONCAVE:
|
|
130
|
-
CONVEX:
|
|
131
|
-
LOGARITHMIC:
|
|
132
|
-
SQUARE_ROOT:
|
|
133
|
-
INVERSE:
|
|
134
|
-
GAUSSIAN:
|
|
135
|
-
},
|
|
136
|
-
const
|
|
137
|
-
return s * s * s *
|
|
138
|
-
},
|
|
139
|
-
const o = Math.max(1e-3,
|
|
140
|
-
return (1 - Math.exp(-o *
|
|
141
|
-
},
|
|
142
|
-
const n = Math.max(0, Math.min(1,
|
|
143
|
-
return
|
|
144
|
-
},
|
|
145
|
-
const n = Math.max(1e-3, Math.min(1,
|
|
146
|
-
return
|
|
147
|
-
},
|
|
148
|
-
const
|
|
149
|
-
return
|
|
150
|
-
},
|
|
151
|
-
const
|
|
152
|
-
return
|
|
153
|
-
},
|
|
154
|
-
const o = Math.max(0, Math.min(1,
|
|
155
|
-
return 1 / (1 + Math.exp(-
|
|
156
|
-
},
|
|
157
|
-
CUBIC:
|
|
158
|
-
DAMPED:
|
|
159
|
-
EXPONENTIAL:
|
|
160
|
-
LOGARITHMIC:
|
|
161
|
-
PARABOLIC:
|
|
162
|
-
QUADRATIC:
|
|
163
|
-
SIGMOID:
|
|
164
|
-
SINUSOIDAL:
|
|
207
|
+
}, Ut = (e) => 1 - Math.cos(e * Math.PI / 2), zt = (e) => Math.sin(e * Math.PI / 2), kt = (e) => -0.5 * (Math.cos(Math.PI * e) - 1), Nt = (e) => e * e, Ot = (e) => 1 - Math.pow(1 - e, 2), _t = (e) => e < 0.5 ? 2 * e * e : 1 - Math.pow(-2 * e + 2, 2) / 2, Ft = (e) => e * e * e, Rt = (e) => 1 - Math.pow(1 - e, 3), Lt = (e) => e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2, qt = (e) => e * e * e * e, Dt = (e) => 1 - Math.pow(1 - e, 4), Vt = (e) => e < 0.5 ? 8 * e * e * e * e : 1 - Math.pow(-2 * e + 2, 4) / 2, Xt = (e) => e * e * e * e * e, Zt = (e) => 1 - Math.pow(1 - e, 5), jt = (e) => e < 0.5 ? 16 * e * e * e * e * e : 1 - Math.pow(-2 * e + 2, 5) / 2, Yt = (e) => e === 0 ? 0 : Math.pow(2, 10 * e - 10), Ht = (e) => e === 1 ? 1 : 1 - Math.pow(2, -10 * e), Qt = (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, Kt = (e) => 1 - Math.sqrt(1 - Math.pow(e, 2)), $t = (e) => Math.sqrt(1 - Math.pow(e - 1, 2)), Jt = (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, Wt = (e) => e, te = (e) => e * e * (3 - 2 * e), ee = (e) => 1 - Math.pow(1 - e, 0.3), oe = (e) => Math.pow(e, 0.3), ne = (e) => Math.log(Math.max(0.01, e)) / Math.log(2), se = (e) => Math.sqrt(e), re = (e) => 1 - e, ae = (e) => Math.exp(-Math.pow(e - 0.5, 2) / (2 * 0.5)), ho = {
|
|
208
|
+
SINE_EASE_IN: Ut,
|
|
209
|
+
SINE_EASE_OUT: zt,
|
|
210
|
+
SINE_EASE_IN_OUT: kt,
|
|
211
|
+
QUADRATIC_EASE_IN: Nt,
|
|
212
|
+
QUADRATIC_EASE_OUT: Ot,
|
|
213
|
+
QUADRATIC_EASE_IN_OUT: _t,
|
|
214
|
+
CUBIC_EASE_IN: Ft,
|
|
215
|
+
CUBIC_EASE_OUT: Rt,
|
|
216
|
+
CUBIC_EASE_IN_OUT: Lt,
|
|
217
|
+
QUARTIC_EASE_IN: qt,
|
|
218
|
+
QUARTIC_EASE_OUT: Dt,
|
|
219
|
+
QUARTIC_EASE_IN_OUT: Vt,
|
|
220
|
+
QUINTIC_EASE_IN: Xt,
|
|
221
|
+
QUINTIC_EASE_OUT: Zt,
|
|
222
|
+
QUINTIC_EASE_IN_OUT: jt,
|
|
223
|
+
EXPONENTIAL_EASE_IN: Yt,
|
|
224
|
+
EXPONENTIAL_EASE_OUT: Ht,
|
|
225
|
+
EXPONENTIAL_EASE_IN_OUT: Qt,
|
|
226
|
+
CIRCULAR_EASE_IN: Kt,
|
|
227
|
+
CIRCULAR_EASE_OUT: $t,
|
|
228
|
+
CIRCULAR_EASE_IN_OUT: Jt,
|
|
229
|
+
LINEAR: Wt,
|
|
230
|
+
SMOOTHSTEP: te,
|
|
231
|
+
CONCAVE: ee,
|
|
232
|
+
CONVEX: oe,
|
|
233
|
+
LOGARITHMIC: ne,
|
|
234
|
+
SQUARE_ROOT: se,
|
|
235
|
+
INVERSE: re,
|
|
236
|
+
GAUSSIAN: ae
|
|
237
|
+
}, ie = (e, t, o, n, r) => {
|
|
238
|
+
const a = Math.max(0, Math.min(1, e)), s = 1 - a;
|
|
239
|
+
return s * s * s * t + 3 * s * s * a * o + 3 * s * a * a * n + a * a * a * r;
|
|
240
|
+
}, ce = (e, t = 1) => {
|
|
241
|
+
const o = Math.max(1e-3, t);
|
|
242
|
+
return (1 - Math.exp(-o * e)) / (1 - Math.exp(-o));
|
|
243
|
+
}, le = (e, t = 1, o = 1) => {
|
|
244
|
+
const n = Math.max(0, Math.min(1, e));
|
|
245
|
+
return t * Math.pow(n, o);
|
|
246
|
+
}, ue = (e, t = 1, o = 1) => {
|
|
247
|
+
const n = Math.max(1e-3, Math.min(1, e));
|
|
248
|
+
return t * Math.log(o * n + 1);
|
|
249
|
+
}, me = (e, t = 1, o = 0, n = 0) => {
|
|
250
|
+
const r = Math.max(0, Math.min(1, e));
|
|
251
|
+
return t * r * r + o * r + n;
|
|
252
|
+
}, he = (e, t, o, n) => {
|
|
253
|
+
const r = Math.max(0, Math.min(1, e)), a = 1 - r;
|
|
254
|
+
return a * a * t + 2 * a * r * o + r * r * n;
|
|
255
|
+
}, fe = (e, t = 10) => {
|
|
256
|
+
const o = Math.max(0, Math.min(1, e));
|
|
257
|
+
return 1 / (1 + Math.exp(-t * (o - 0.5)));
|
|
258
|
+
}, pe = (e) => Math.sin(e * Math.PI * 0.5), F = {
|
|
259
|
+
CUBIC: ie,
|
|
260
|
+
DAMPED: ce,
|
|
261
|
+
EXPONENTIAL: le,
|
|
262
|
+
LOGARITHMIC: ue,
|
|
263
|
+
PARABOLIC: me,
|
|
264
|
+
QUADRATIC: he,
|
|
265
|
+
SIGMOID: fe,
|
|
266
|
+
SINUSOIDAL: pe
|
|
165
267
|
};
|
|
166
|
-
class
|
|
167
|
-
constructor() {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
268
|
+
class fo extends rt {
|
|
269
|
+
constructor(o = {}) {
|
|
270
|
+
const {
|
|
271
|
+
count: n = 20,
|
|
272
|
+
width: r = 1.5,
|
|
273
|
+
height: a = 3,
|
|
274
|
+
depth: s = 1.5,
|
|
275
|
+
geometry: i = new N(0.1, 6, 6),
|
|
276
|
+
// Small spheres
|
|
277
|
+
material: c = new M({
|
|
278
|
+
color: 16777215,
|
|
279
|
+
transparent: !0,
|
|
280
|
+
opacity: 0.6,
|
|
281
|
+
roughness: 0.3,
|
|
282
|
+
metalness: 0.3
|
|
283
|
+
})
|
|
284
|
+
} = o;
|
|
285
|
+
super(i, c, n);
|
|
286
|
+
E(this, "bubblePositions", []);
|
|
287
|
+
E(this, "velocities", []);
|
|
288
|
+
E(this, "width");
|
|
289
|
+
E(this, "height");
|
|
290
|
+
E(this, "depth");
|
|
291
|
+
this.height = a, this.width = r, this.depth = s;
|
|
292
|
+
for (let l = 0; l < this.count; l++) {
|
|
293
|
+
const u = new g(
|
|
294
|
+
(Math.random() - 0.5) * r,
|
|
295
|
+
Math.random() * (a - 1) + 0.5,
|
|
296
|
+
(Math.random() - 0.5) * s
|
|
297
|
+
);
|
|
298
|
+
this.bubblePositions.push(u), this.velocities.push(0.01 + Math.random() * 0.02), this.updateInstanceMatrix(l);
|
|
188
299
|
}
|
|
189
|
-
this.animateBubbles();
|
|
190
300
|
}
|
|
191
301
|
/**
|
|
192
|
-
* Updates
|
|
193
|
-
* to the bottom if they reach the top.
|
|
302
|
+
* Updates the position of a specific bubble instance in the InstancedMesh.
|
|
194
303
|
*/
|
|
195
|
-
|
|
196
|
-
this.
|
|
197
|
-
|
|
198
|
-
});
|
|
304
|
+
updateInstanceMatrix(o) {
|
|
305
|
+
const n = this.bubblePositions[o], r = new Z().setPosition(n);
|
|
306
|
+
this.setMatrixAt(o, r), this.instanceMatrix.needsUpdate = !0;
|
|
199
307
|
}
|
|
200
308
|
/**
|
|
201
|
-
*
|
|
309
|
+
* Updates bubble positions, moving them upward and resetting them
|
|
310
|
+
* to the bottom if they reach the top.
|
|
202
311
|
*/
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
312
|
+
update() {
|
|
313
|
+
for (let o = 0; o < this.count; o++) {
|
|
314
|
+
const n = this.bubblePositions[o];
|
|
315
|
+
n.y += this.velocities[o], n.y > this.height && (n.x = (Math.random() - 0.5) * this.width, n.y = 0, n.z = (Math.random() - 0.5) * this.depth), this.updateInstanceMatrix(o);
|
|
316
|
+
}
|
|
208
317
|
}
|
|
209
318
|
}
|
|
210
|
-
|
|
211
|
-
|
|
319
|
+
class de extends I {
|
|
320
|
+
constructor(t = 0.1) {
|
|
321
|
+
super();
|
|
322
|
+
const o = [], n = [], r = [
|
|
323
|
+
[0, 1],
|
|
324
|
+
// Top point
|
|
325
|
+
[0.5, 0.75],
|
|
326
|
+
// Right upper middle
|
|
327
|
+
[0.75, 0.25],
|
|
328
|
+
// Right lower middle
|
|
329
|
+
[0.5, -0.5],
|
|
330
|
+
// Right bottom middle
|
|
331
|
+
[0, -1],
|
|
332
|
+
// Bottom point
|
|
333
|
+
[-0.5, -0.5],
|
|
334
|
+
// Left bottom middle
|
|
335
|
+
[-0.75, 0.25],
|
|
336
|
+
// Left lower middle
|
|
337
|
+
[-0.5, 0.75]
|
|
338
|
+
// Left upper middle
|
|
339
|
+
];
|
|
340
|
+
for (let s = 0; s < r.length; s++) {
|
|
341
|
+
const [i, c] = r[s];
|
|
342
|
+
o.push(i * t, c * t, 0);
|
|
343
|
+
}
|
|
344
|
+
for (let s = 1; s < r.length - 1; s++)
|
|
345
|
+
n.push(0, s, s + 1);
|
|
346
|
+
n.push(0, r.length - 1, 1);
|
|
347
|
+
const a = new D(o, 3);
|
|
348
|
+
this.setAttribute("position", a), this.setIndex(n), this.computeVertexNormals();
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
class po extends rt {
|
|
352
|
+
constructor(o = {}) {
|
|
353
|
+
const {
|
|
354
|
+
count: n = 200,
|
|
355
|
+
width: r = 20,
|
|
356
|
+
height: a = 10,
|
|
357
|
+
depth: s = 20,
|
|
358
|
+
geometry: i = new de(),
|
|
359
|
+
material: c = new M({
|
|
360
|
+
color: 8956467,
|
|
361
|
+
metalness: 0.1,
|
|
362
|
+
roughness: 0.8,
|
|
363
|
+
flatShading: !0,
|
|
364
|
+
side: L
|
|
365
|
+
})
|
|
366
|
+
} = o;
|
|
367
|
+
super(i, c, n);
|
|
368
|
+
E(this, "dummyMatrix");
|
|
369
|
+
E(this, "velocities");
|
|
370
|
+
E(this, "width");
|
|
371
|
+
E(this, "height");
|
|
372
|
+
E(this, "depth");
|
|
373
|
+
this.dummyMatrix = new Z(), this.velocities = [], this.width = r, this.height = a, this.depth = s;
|
|
374
|
+
for (let l = 0; l < n; l++) {
|
|
375
|
+
const u = (Math.random() - 0.5) * r, m = Math.random() * (a - 1) + 0.5, h = (Math.random() - 0.5) * s, f = (Math.random() - 0.5) * Math.PI, p = (Math.random() - 0.5) * Math.PI, d = (Math.random() - 0.5) * Math.PI;
|
|
376
|
+
this.dummyMatrix.makeRotationFromEuler(new bt(f, p, d)), this.dummyMatrix.setPosition(u, m, h), this.setMatrixAt(l, this.dummyMatrix);
|
|
377
|
+
const w = new g((Math.random() - 0.5) * 0.01, -5e-3, (Math.random() - 0.5) * 0.01);
|
|
378
|
+
this.velocities.push(w);
|
|
379
|
+
}
|
|
380
|
+
this.instanceMatrix.needsUpdate = !0;
|
|
381
|
+
}
|
|
382
|
+
update() {
|
|
383
|
+
for (let o = 0; o < this.count; o++) {
|
|
384
|
+
const n = new Z();
|
|
385
|
+
this.getMatrixAt(o, n);
|
|
386
|
+
const r = new g();
|
|
387
|
+
r.setFromMatrixPosition(n);
|
|
388
|
+
const a = this.velocities[o];
|
|
389
|
+
r.add(a), r.y < 0 && (r.set(
|
|
390
|
+
(Math.random() - 0.5) * this.width,
|
|
391
|
+
Math.random() * (this.height - 1) + 0.5,
|
|
392
|
+
(Math.random() - 0.5) * this.depth
|
|
393
|
+
), a.set((Math.random() - 0.5) * 0.01, -5e-3, (Math.random() - 0.5) * 0.01)), n.setPosition(r), this.setMatrixAt(o, n);
|
|
394
|
+
}
|
|
395
|
+
this.instanceMatrix.needsUpdate = !0;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
const B = (e, t) => {
|
|
399
|
+
const o = e[0].index !== null, n = new Set(Object.keys(e[0].attributes)), r = new Set(Object.keys(e[0].morphAttributes)), a = {}, s = {}, i = e[0].morphTargetsRelative, c = new I();
|
|
212
400
|
let l = 0;
|
|
213
|
-
if (
|
|
401
|
+
if (e.forEach((u, m) => {
|
|
214
402
|
let h = 0;
|
|
215
403
|
if (o !== (u.index !== null))
|
|
216
404
|
return console.error(
|
|
@@ -221,24 +409,24 @@ const C = (t, e) => {
|
|
|
221
409
|
return console.error(
|
|
222
410
|
"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.'
|
|
223
411
|
), null;
|
|
224
|
-
|
|
412
|
+
a[f] === void 0 && (a[f] = []), a[f].push(u.attributes[f]), h++;
|
|
225
413
|
}
|
|
226
414
|
if (h !== n.size)
|
|
227
415
|
return console.error(
|
|
228
416
|
"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + m + ". Make sure all geometries have the same number of attributes."
|
|
229
417
|
), null;
|
|
230
|
-
if (
|
|
418
|
+
if (i !== u.morphTargetsRelative)
|
|
231
419
|
return console.error(
|
|
232
420
|
"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + m + ". .morphTargetsRelative must be consistent throughout all geometries."
|
|
233
421
|
), null;
|
|
234
422
|
for (let f in u.morphAttributes) {
|
|
235
|
-
if (!
|
|
423
|
+
if (!r.has(f))
|
|
236
424
|
return console.error(
|
|
237
425
|
"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + m + ". .morphAttributes must be consistent throughout all geometries."
|
|
238
426
|
), null;
|
|
239
427
|
s[f] === void 0 && (s[f] = []), s[f].push(u.morphAttributes[f]);
|
|
240
428
|
}
|
|
241
|
-
if (
|
|
429
|
+
if (c.userData.mergedUserData = c.userData.mergedUserData || [], c.userData.mergedUserData.push(u.userData), t) {
|
|
242
430
|
let f;
|
|
243
431
|
if (u.index)
|
|
244
432
|
f = u.index.count;
|
|
@@ -248,118 +436,118 @@ const C = (t, e) => {
|
|
|
248
436
|
return console.error(
|
|
249
437
|
"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + m + ". The geometry must have either an index or a position attribute"
|
|
250
438
|
), null;
|
|
251
|
-
|
|
439
|
+
c.addGroup(l, f, m), l += f;
|
|
252
440
|
}
|
|
253
441
|
}), o) {
|
|
254
442
|
let u = 0;
|
|
255
443
|
const m = [];
|
|
256
|
-
|
|
444
|
+
e.forEach((h) => {
|
|
257
445
|
const f = h.index;
|
|
258
446
|
for (let p = 0; p < f.count; ++p)
|
|
259
447
|
m.push(f.getX(p) + u);
|
|
260
448
|
u += h.attributes.position.count;
|
|
261
|
-
}),
|
|
449
|
+
}), c.setIndex(m);
|
|
262
450
|
}
|
|
263
|
-
for (let u in
|
|
264
|
-
const m =
|
|
451
|
+
for (let u in a) {
|
|
452
|
+
const m = ut(a[u]);
|
|
265
453
|
if (!m)
|
|
266
454
|
return console.error(
|
|
267
455
|
"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the " + u + " attribute."
|
|
268
456
|
), null;
|
|
269
|
-
|
|
457
|
+
c.setAttribute(u, m);
|
|
270
458
|
}
|
|
271
459
|
for (let u in s) {
|
|
272
460
|
const m = s[u][0].length;
|
|
273
461
|
if (m === 0)
|
|
274
462
|
break;
|
|
275
|
-
|
|
463
|
+
c.morphAttributes = c.morphAttributes || {}, c.morphAttributes[u] = [];
|
|
276
464
|
for (let h = 0; h < m; ++h) {
|
|
277
465
|
const f = [];
|
|
278
|
-
for (let
|
|
279
|
-
f.push(s[u][
|
|
280
|
-
const p =
|
|
466
|
+
for (let d = 0; d < s[u].length; ++d)
|
|
467
|
+
f.push(s[u][d][h]);
|
|
468
|
+
const p = ut(f);
|
|
281
469
|
if (!p)
|
|
282
470
|
return console.error(
|
|
283
471
|
"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the " + u + " morphAttribute."
|
|
284
472
|
), null;
|
|
285
|
-
|
|
473
|
+
c.morphAttributes[u].push(p);
|
|
286
474
|
}
|
|
287
475
|
}
|
|
288
|
-
return
|
|
289
|
-
},
|
|
290
|
-
let
|
|
291
|
-
if (
|
|
292
|
-
if (
|
|
476
|
+
return c;
|
|
477
|
+
}, ut = (e) => {
|
|
478
|
+
let t, o, n, r = 0;
|
|
479
|
+
if (e.forEach((a) => {
|
|
480
|
+
if (t === void 0 && (t = a.array.constructor), t !== a.array.constructor)
|
|
293
481
|
return console.error(
|
|
294
482
|
"THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."
|
|
295
483
|
), null;
|
|
296
|
-
if (o === void 0 && (o =
|
|
484
|
+
if (o === void 0 && (o = a.itemSize), o !== a.itemSize)
|
|
297
485
|
return console.error(
|
|
298
486
|
"THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."
|
|
299
487
|
), null;
|
|
300
|
-
if (n === void 0 && (n =
|
|
488
|
+
if (n === void 0 && (n = a.normalized), n !== a.normalized)
|
|
301
489
|
return console.error(
|
|
302
490
|
"THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."
|
|
303
491
|
), null;
|
|
304
|
-
|
|
305
|
-
}),
|
|
306
|
-
const
|
|
492
|
+
r += a.array.length;
|
|
493
|
+
}), t && o) {
|
|
494
|
+
const a = new t(r);
|
|
307
495
|
let s = 0;
|
|
308
|
-
return
|
|
309
|
-
|
|
310
|
-
}), new R(
|
|
496
|
+
return e.forEach((i) => {
|
|
497
|
+
a.set(i.array, s), s += i.array.length;
|
|
498
|
+
}), new R(a, o, n);
|
|
311
499
|
}
|
|
312
500
|
};
|
|
313
|
-
function
|
|
314
|
-
|
|
315
|
-
const o = {}, n =
|
|
501
|
+
function ye(e, t = 1e-4) {
|
|
502
|
+
t = Math.max(t, Number.EPSILON);
|
|
503
|
+
const o = {}, n = e.getIndex(), r = e.getAttribute("position"), a = n ? n.count : r.count;
|
|
316
504
|
let s = 0;
|
|
317
|
-
const
|
|
318
|
-
for (let
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
const x =
|
|
322
|
-
x && (l[
|
|
323
|
-
}
|
|
324
|
-
const h = Math.log10(1 /
|
|
325
|
-
for (let
|
|
326
|
-
const
|
|
327
|
-
let
|
|
328
|
-
for (let x = 0,
|
|
329
|
-
const
|
|
330
|
-
for (let
|
|
331
|
-
|
|
505
|
+
const i = Object.keys(e.attributes), c = {}, l = {}, u = [], m = ["getX", "getY", "getZ", "getW"];
|
|
506
|
+
for (let d = 0, w = i.length; d < w; d++) {
|
|
507
|
+
const v = i[d];
|
|
508
|
+
c[v] = [];
|
|
509
|
+
const x = e.morphAttributes[v];
|
|
510
|
+
x && (l[v] = new Array(x.length).fill(0).map(() => []));
|
|
511
|
+
}
|
|
512
|
+
const h = Math.log10(1 / t), f = Math.pow(10, h);
|
|
513
|
+
for (let d = 0; d < a; d++) {
|
|
514
|
+
const w = n ? n.getX(d) : d;
|
|
515
|
+
let v = "";
|
|
516
|
+
for (let x = 0, U = i.length; x < U; x++) {
|
|
517
|
+
const z = i[x], T = e.getAttribute(z), G = T.itemSize;
|
|
518
|
+
for (let k = 0; k < G; k++)
|
|
519
|
+
v += `${~~(T[m[k]](w) * f)},`;
|
|
332
520
|
}
|
|
333
|
-
if (
|
|
334
|
-
u.push(o[
|
|
521
|
+
if (v in o)
|
|
522
|
+
u.push(o[v]);
|
|
335
523
|
else {
|
|
336
|
-
for (let x = 0,
|
|
337
|
-
const
|
|
338
|
-
for (let
|
|
339
|
-
const
|
|
340
|
-
if (
|
|
341
|
-
for (let
|
|
342
|
-
|
|
524
|
+
for (let x = 0, U = i.length; x < U; x++) {
|
|
525
|
+
const z = i[x], T = e.getAttribute(z), G = e.morphAttributes[z], k = T.itemSize, O = c[z], tt = l[z];
|
|
526
|
+
for (let V = 0; V < k; V++) {
|
|
527
|
+
const X = m[V];
|
|
528
|
+
if (O.push(T[X](w)), G)
|
|
529
|
+
for (let C = 0, Mt = G.length; C < Mt; C++)
|
|
530
|
+
tt[C].push(G[C][X](w));
|
|
343
531
|
}
|
|
344
532
|
}
|
|
345
|
-
o[
|
|
533
|
+
o[v] = s, u.push(s), s++;
|
|
346
534
|
}
|
|
347
535
|
}
|
|
348
|
-
const p =
|
|
349
|
-
for (let
|
|
350
|
-
const
|
|
351
|
-
if (p.setAttribute(
|
|
352
|
-
for (let
|
|
353
|
-
const
|
|
354
|
-
p.morphAttributes[
|
|
536
|
+
const p = e.clone();
|
|
537
|
+
for (let d = 0, w = i.length; d < w; d++) {
|
|
538
|
+
const v = i[d], x = e.getAttribute(v), U = new x.array.constructor(c[v]), z = new R(U, x.itemSize, x.normalized);
|
|
539
|
+
if (p.setAttribute(v, z), v in l)
|
|
540
|
+
for (let T = 0; T < l[v].length; T++) {
|
|
541
|
+
const G = e.morphAttributes[v][T], k = new G.array.constructor(l[v][T]), O = new R(k, G.itemSize, G.normalized);
|
|
542
|
+
p.morphAttributes[v][T] = O;
|
|
355
543
|
}
|
|
356
544
|
}
|
|
357
545
|
return p.setIndex(u), p;
|
|
358
546
|
}
|
|
359
|
-
class
|
|
360
|
-
constructor(
|
|
547
|
+
class ft extends I {
|
|
548
|
+
constructor(t = 1, o = 1.5, n = 0.5, r = 0.05, a = 0.05) {
|
|
361
549
|
super();
|
|
362
|
-
const s =
|
|
550
|
+
const s = t, i = o, c = n, l = r, u = a, m = [
|
|
363
551
|
// Front cover
|
|
364
552
|
0,
|
|
365
553
|
0,
|
|
@@ -368,37 +556,37 @@ class he extends I {
|
|
|
368
556
|
0,
|
|
369
557
|
0,
|
|
370
558
|
s,
|
|
371
|
-
|
|
559
|
+
i,
|
|
372
560
|
0,
|
|
373
561
|
0,
|
|
374
|
-
|
|
562
|
+
i,
|
|
375
563
|
0,
|
|
376
564
|
// Back cover
|
|
377
565
|
s,
|
|
378
566
|
0,
|
|
379
|
-
-
|
|
567
|
+
-c,
|
|
380
568
|
0,
|
|
381
569
|
0,
|
|
382
|
-
-
|
|
570
|
+
-c,
|
|
383
571
|
0,
|
|
384
|
-
|
|
385
|
-
-
|
|
572
|
+
i,
|
|
573
|
+
-c,
|
|
386
574
|
s,
|
|
387
|
-
|
|
388
|
-
-
|
|
575
|
+
i,
|
|
576
|
+
-c,
|
|
389
577
|
// Spine
|
|
390
578
|
0,
|
|
391
579
|
0,
|
|
392
|
-
-
|
|
580
|
+
-c,
|
|
393
581
|
0,
|
|
394
582
|
0,
|
|
395
583
|
0,
|
|
396
584
|
0,
|
|
397
|
-
|
|
585
|
+
i,
|
|
398
586
|
0,
|
|
399
587
|
0,
|
|
400
|
-
|
|
401
|
-
-
|
|
588
|
+
i,
|
|
589
|
+
-c,
|
|
402
590
|
// Inside front cover
|
|
403
591
|
s,
|
|
404
592
|
0,
|
|
@@ -407,76 +595,76 @@ class he extends I {
|
|
|
407
595
|
0,
|
|
408
596
|
-l,
|
|
409
597
|
l,
|
|
410
|
-
|
|
598
|
+
i,
|
|
411
599
|
-l,
|
|
412
600
|
s,
|
|
413
|
-
|
|
601
|
+
i,
|
|
414
602
|
-l,
|
|
415
603
|
// Inside back cover
|
|
416
604
|
l,
|
|
417
605
|
0,
|
|
418
|
-
-
|
|
606
|
+
-c + l,
|
|
419
607
|
s,
|
|
420
608
|
0,
|
|
421
|
-
-
|
|
609
|
+
-c + l,
|
|
422
610
|
s,
|
|
423
|
-
|
|
424
|
-
-
|
|
611
|
+
i,
|
|
612
|
+
-c + l,
|
|
425
613
|
l,
|
|
426
|
-
|
|
427
|
-
-
|
|
614
|
+
i,
|
|
615
|
+
-c + l,
|
|
428
616
|
// Inside spine
|
|
429
617
|
l,
|
|
430
618
|
0,
|
|
431
619
|
-l,
|
|
432
620
|
l,
|
|
433
621
|
0,
|
|
434
|
-
-
|
|
622
|
+
-c + l,
|
|
435
623
|
l,
|
|
436
|
-
|
|
437
|
-
-
|
|
624
|
+
i,
|
|
625
|
+
-c + l,
|
|
438
626
|
l,
|
|
439
|
-
|
|
627
|
+
i,
|
|
440
628
|
-l,
|
|
441
629
|
// Front cover top
|
|
442
630
|
0,
|
|
443
|
-
|
|
631
|
+
i,
|
|
444
632
|
0,
|
|
445
633
|
s,
|
|
446
|
-
|
|
634
|
+
i,
|
|
447
635
|
0,
|
|
448
636
|
s,
|
|
449
|
-
|
|
637
|
+
i,
|
|
450
638
|
-l,
|
|
451
639
|
l,
|
|
452
|
-
|
|
640
|
+
i,
|
|
453
641
|
-l,
|
|
454
642
|
// Back cover top
|
|
455
643
|
0,
|
|
456
|
-
|
|
457
|
-
-
|
|
644
|
+
i,
|
|
645
|
+
-c,
|
|
458
646
|
l,
|
|
459
|
-
|
|
460
|
-
-
|
|
647
|
+
i,
|
|
648
|
+
-c + l,
|
|
461
649
|
s,
|
|
462
|
-
|
|
463
|
-
-
|
|
650
|
+
i,
|
|
651
|
+
-c + l,
|
|
464
652
|
s,
|
|
465
|
-
|
|
466
|
-
-
|
|
653
|
+
i,
|
|
654
|
+
-c,
|
|
467
655
|
// Spine cover top
|
|
468
656
|
0,
|
|
469
|
-
|
|
657
|
+
i,
|
|
470
658
|
0,
|
|
471
659
|
l,
|
|
472
|
-
|
|
660
|
+
i,
|
|
473
661
|
-l,
|
|
474
662
|
l,
|
|
475
|
-
|
|
476
|
-
-
|
|
663
|
+
i,
|
|
664
|
+
-c + l,
|
|
477
665
|
0,
|
|
478
|
-
|
|
479
|
-
-
|
|
666
|
+
i,
|
|
667
|
+
-c,
|
|
480
668
|
// Front cover bottom
|
|
481
669
|
0,
|
|
482
670
|
0,
|
|
@@ -493,26 +681,26 @@ class he extends I {
|
|
|
493
681
|
// Back cover bottom
|
|
494
682
|
0,
|
|
495
683
|
0,
|
|
496
|
-
-
|
|
684
|
+
-c,
|
|
497
685
|
s,
|
|
498
686
|
0,
|
|
499
|
-
-
|
|
687
|
+
-c,
|
|
500
688
|
s,
|
|
501
689
|
0,
|
|
502
|
-
-
|
|
690
|
+
-c + l,
|
|
503
691
|
l,
|
|
504
692
|
0,
|
|
505
|
-
-
|
|
693
|
+
-c + l,
|
|
506
694
|
// Spine cover bottom
|
|
507
695
|
0,
|
|
508
696
|
0,
|
|
509
697
|
0,
|
|
510
698
|
0,
|
|
511
699
|
0,
|
|
512
|
-
-
|
|
700
|
+
-c,
|
|
513
701
|
l,
|
|
514
702
|
0,
|
|
515
|
-
-
|
|
703
|
+
-c + l,
|
|
516
704
|
l,
|
|
517
705
|
0,
|
|
518
706
|
-l,
|
|
@@ -524,24 +712,24 @@ class he extends I {
|
|
|
524
712
|
0,
|
|
525
713
|
-l,
|
|
526
714
|
s,
|
|
527
|
-
|
|
715
|
+
i,
|
|
528
716
|
-l,
|
|
529
717
|
s,
|
|
530
|
-
|
|
718
|
+
i,
|
|
531
719
|
0,
|
|
532
720
|
// Back cover edge
|
|
533
721
|
s,
|
|
534
722
|
0,
|
|
535
|
-
-
|
|
723
|
+
-c,
|
|
536
724
|
s,
|
|
537
|
-
|
|
538
|
-
-
|
|
725
|
+
i,
|
|
726
|
+
-c,
|
|
539
727
|
s,
|
|
540
|
-
|
|
541
|
-
-
|
|
728
|
+
i,
|
|
729
|
+
-c + l,
|
|
542
730
|
s,
|
|
543
731
|
0,
|
|
544
|
-
-
|
|
732
|
+
-c + l
|
|
545
733
|
], h = [
|
|
546
734
|
0,
|
|
547
735
|
0,
|
|
@@ -725,7 +913,7 @@ class he extends I {
|
|
|
725
913
|
0,
|
|
726
914
|
0
|
|
727
915
|
// Back cover edge
|
|
728
|
-
], f =
|
|
916
|
+
], f = t / (t * 2 + n), p = (t + n) / (t * 2 + n), d = [
|
|
729
917
|
p,
|
|
730
918
|
0,
|
|
731
919
|
1,
|
|
@@ -852,7 +1040,7 @@ class he extends I {
|
|
|
852
1040
|
0,
|
|
853
1041
|
1
|
|
854
1042
|
// Back cover edge
|
|
855
|
-
],
|
|
1043
|
+
], w = [
|
|
856
1044
|
0,
|
|
857
1045
|
1,
|
|
858
1046
|
2,
|
|
@@ -951,138 +1139,138 @@ class he extends I {
|
|
|
951
1139
|
54,
|
|
952
1140
|
55
|
|
953
1141
|
// Back cover edge
|
|
954
|
-
],
|
|
955
|
-
|
|
956
|
-
const
|
|
957
|
-
|
|
1142
|
+
], v = new Float32Array(m), x = new Float32Array(h), U = new Float32Array(d), z = new Uint16Array(w), T = new I();
|
|
1143
|
+
T.setAttribute("position", new R(v, 3)), T.setAttribute("normal", new R(x, 3)), T.setAttribute("uv", new R(U, 2)), T.setIndex(new R(z, 1));
|
|
1144
|
+
const G = new A(t - l - u, i - u * 2, c - l * 2);
|
|
1145
|
+
G.translate((t - l - u) / 2 + l, i / 2, -c / 2), this.copy(B([T, G], !0));
|
|
958
1146
|
}
|
|
959
1147
|
}
|
|
960
|
-
function
|
|
961
|
-
return Math.random() * (
|
|
1148
|
+
function we(e = 0, t = 1) {
|
|
1149
|
+
return Math.random() * (t - e) + e;
|
|
962
1150
|
}
|
|
963
|
-
function
|
|
964
|
-
return Math.floor(Math.random() * (
|
|
1151
|
+
function yo(e = 0, t = 1) {
|
|
1152
|
+
return Math.floor(Math.random() * (t - e + 1)) + e;
|
|
965
1153
|
}
|
|
966
|
-
function
|
|
967
|
-
return
|
|
1154
|
+
function Me(e = 0.5, t = 0, o = 1) {
|
|
1155
|
+
return t + (o - t) * Math.pow(Math.random(), e);
|
|
968
1156
|
}
|
|
969
|
-
function
|
|
970
|
-
return
|
|
1157
|
+
function ve(e = 0.5, t = 0, o = 1) {
|
|
1158
|
+
return t + (o - t) * Math.pow(1 - Math.random(), e);
|
|
971
1159
|
}
|
|
972
|
-
function
|
|
973
|
-
scaleXMin:
|
|
974
|
-
scaleXMax:
|
|
1160
|
+
function pt({
|
|
1161
|
+
scaleXMin: e = 0.4,
|
|
1162
|
+
scaleXMax: t = 0.7,
|
|
975
1163
|
scaleYMin: o = 0.3,
|
|
976
1164
|
scaleYMax: n = 0.95,
|
|
977
|
-
scaleZMin:
|
|
978
|
-
scaleZMax:
|
|
1165
|
+
scaleZMin: r = 0.1,
|
|
1166
|
+
scaleZMax: a = 0.5
|
|
979
1167
|
} = {}) {
|
|
980
1168
|
return new g(
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1169
|
+
we(e, t),
|
|
1170
|
+
Me(0.25, o, n),
|
|
1171
|
+
ve(0.8, r, a)
|
|
984
1172
|
);
|
|
985
1173
|
}
|
|
986
|
-
function
|
|
987
|
-
coverMaterial:
|
|
988
|
-
pagesMaterial:
|
|
1174
|
+
function dt({
|
|
1175
|
+
coverMaterial: e,
|
|
1176
|
+
pagesMaterial: t,
|
|
989
1177
|
scales: o
|
|
990
1178
|
}) {
|
|
991
|
-
const n = new
|
|
1179
|
+
const n = new ft(), r = new rt(n, [e, t], o.length), a = new Z();
|
|
992
1180
|
let s = 0;
|
|
993
|
-
for (let
|
|
994
|
-
const
|
|
995
|
-
l.makeScale(
|
|
1181
|
+
for (let i = 0; i < o.length; i++) {
|
|
1182
|
+
const c = o[i], l = new Z();
|
|
1183
|
+
l.makeScale(c.x, c.y, c.z), a.identity(), a.multiply(l), a.setPosition(0.01 + Math.random() * 0.1, 0, s + c.z * 0.5), r.setMatrixAt(i, a), s += c.z * 0.5;
|
|
996
1184
|
}
|
|
997
|
-
return
|
|
1185
|
+
return r;
|
|
998
1186
|
}
|
|
999
|
-
function
|
|
1000
|
-
coverMaterial:
|
|
1001
|
-
pagesMaterial:
|
|
1187
|
+
function wo({
|
|
1188
|
+
coverMaterial: e,
|
|
1189
|
+
pagesMaterial: t,
|
|
1002
1190
|
count: o = 10,
|
|
1003
1191
|
scaleXMin: n = 0.4,
|
|
1004
|
-
scaleXMax:
|
|
1005
|
-
scaleYMin:
|
|
1192
|
+
scaleXMax: r = 0.7,
|
|
1193
|
+
scaleYMin: a = 0.3,
|
|
1006
1194
|
scaleYMax: s = 0.95,
|
|
1007
|
-
scaleZMin:
|
|
1008
|
-
scaleZMax:
|
|
1195
|
+
scaleZMin: i = 0.1,
|
|
1196
|
+
scaleZMax: c = 0.5
|
|
1009
1197
|
}) {
|
|
1010
1198
|
const l = Array.from(
|
|
1011
1199
|
{ length: o },
|
|
1012
|
-
() =>
|
|
1200
|
+
() => pt({ scaleXMin: n, scaleXMax: r, scaleYMin: a, scaleYMax: s, scaleZMin: i, scaleZMax: c })
|
|
1013
1201
|
);
|
|
1014
|
-
return
|
|
1202
|
+
return dt({ coverMaterial: e, pagesMaterial: t, scales: l });
|
|
1015
1203
|
}
|
|
1016
|
-
function
|
|
1017
|
-
coverMaterial:
|
|
1018
|
-
pagesMaterial:
|
|
1204
|
+
function Mo({
|
|
1205
|
+
coverMaterial: e,
|
|
1206
|
+
pagesMaterial: t,
|
|
1019
1207
|
length: o = 10,
|
|
1020
1208
|
scaleXMin: n = 0.4,
|
|
1021
|
-
scaleXMax:
|
|
1022
|
-
scaleYMin:
|
|
1209
|
+
scaleXMax: r = 0.7,
|
|
1210
|
+
scaleYMin: a = 0.3,
|
|
1023
1211
|
scaleYMax: s = 0.95,
|
|
1024
|
-
scaleZMin:
|
|
1025
|
-
scaleZMax:
|
|
1212
|
+
scaleZMin: i = 0.1,
|
|
1213
|
+
scaleZMax: c = 0.5
|
|
1026
1214
|
}) {
|
|
1027
1215
|
const l = [];
|
|
1028
1216
|
let u = o;
|
|
1029
1217
|
for (; u > 0; ) {
|
|
1030
|
-
const m =
|
|
1218
|
+
const m = pt({ scaleXMin: n, scaleXMax: r, scaleYMin: a, scaleYMax: s, scaleZMin: i, scaleZMax: c });
|
|
1031
1219
|
m.z = Math.min(m.z, u), l.push(m), u -= m.z;
|
|
1032
1220
|
}
|
|
1033
|
-
return
|
|
1221
|
+
return dt({ coverMaterial: e, pagesMaterial: t, scales: l });
|
|
1034
1222
|
}
|
|
1035
|
-
class
|
|
1036
|
-
constructor(
|
|
1223
|
+
class vo extends I {
|
|
1224
|
+
constructor(t = 2, o = 0.3, n = 0.6, r = 5, a = 5, s = Math.PI / 4) {
|
|
1037
1225
|
super();
|
|
1038
|
-
const
|
|
1039
|
-
for (let f = 0; f <
|
|
1040
|
-
const p = f * o,
|
|
1041
|
-
|
|
1226
|
+
const i = [], c = [];
|
|
1227
|
+
for (let f = 0; f < r; f++) {
|
|
1228
|
+
const p = f * o, d = p + o, w = f * n, v = w + n;
|
|
1229
|
+
i.push(
|
|
1042
1230
|
// Vertical riser
|
|
1043
|
-
-
|
|
1231
|
+
-t / 2,
|
|
1044
1232
|
p,
|
|
1045
|
-
|
|
1233
|
+
w,
|
|
1046
1234
|
// Bottom-left
|
|
1047
|
-
|
|
1235
|
+
t / 2,
|
|
1048
1236
|
p,
|
|
1049
|
-
|
|
1237
|
+
w,
|
|
1050
1238
|
// Bottom-right
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1239
|
+
t / 2,
|
|
1240
|
+
d,
|
|
1241
|
+
w,
|
|
1054
1242
|
// Top-right
|
|
1055
|
-
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1243
|
+
-t / 2,
|
|
1244
|
+
d,
|
|
1245
|
+
w,
|
|
1058
1246
|
// Top-left
|
|
1059
1247
|
// Horizontal tread
|
|
1060
|
-
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1248
|
+
-t / 2,
|
|
1249
|
+
d,
|
|
1250
|
+
w,
|
|
1063
1251
|
// Top-left
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1252
|
+
t / 2,
|
|
1253
|
+
d,
|
|
1254
|
+
w,
|
|
1067
1255
|
// Top-right
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1256
|
+
t / 2,
|
|
1257
|
+
d,
|
|
1258
|
+
v,
|
|
1071
1259
|
// Back-right
|
|
1072
|
-
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1260
|
+
-t / 2,
|
|
1261
|
+
d,
|
|
1262
|
+
v
|
|
1075
1263
|
// Back-left
|
|
1076
1264
|
);
|
|
1077
1265
|
const x = f * 8;
|
|
1078
|
-
|
|
1266
|
+
c.push(
|
|
1079
1267
|
x,
|
|
1080
1268
|
x + 1,
|
|
1081
1269
|
x + 2,
|
|
1082
1270
|
x,
|
|
1083
1271
|
x + 2,
|
|
1084
1272
|
x + 3
|
|
1085
|
-
),
|
|
1273
|
+
), c.push(
|
|
1086
1274
|
x + 4,
|
|
1087
1275
|
x + 5,
|
|
1088
1276
|
x + 6,
|
|
@@ -1091,8 +1279,8 @@ class io extends I {
|
|
|
1091
1279
|
x + 7
|
|
1092
1280
|
);
|
|
1093
1281
|
}
|
|
1094
|
-
const l =
|
|
1095
|
-
|
|
1282
|
+
const l = r * o, u = r * n, m = t * 2;
|
|
1283
|
+
i.push(
|
|
1096
1284
|
// Landing platform (4 vertices)
|
|
1097
1285
|
-m / 2,
|
|
1098
1286
|
l,
|
|
@@ -1111,8 +1299,8 @@ class io extends I {
|
|
|
1111
1299
|
u + n
|
|
1112
1300
|
// Top-left
|
|
1113
1301
|
);
|
|
1114
|
-
const h =
|
|
1115
|
-
|
|
1302
|
+
const h = r * 8;
|
|
1303
|
+
c.push(
|
|
1116
1304
|
h,
|
|
1117
1305
|
h + 1,
|
|
1118
1306
|
h + 2,
|
|
@@ -1124,117 +1312,117 @@ class io extends I {
|
|
|
1124
1312
|
);
|
|
1125
1313
|
for (let f = 0; f < 2; f++) {
|
|
1126
1314
|
const p = f === 0 ? 1 : -1;
|
|
1127
|
-
for (let
|
|
1128
|
-
const
|
|
1129
|
-
|
|
1315
|
+
for (let d = 0; d < a; d++) {
|
|
1316
|
+
const w = l + d * o, v = w + o, x = p * (m / 4), U = u + n, z = d * n * Math.cos(s), T = d * n * Math.sin(s), G = x + p * z - t / 2 * Math.cos(s), k = x + p * z + t / 2 * Math.cos(s), O = U + T, tt = G + p * n * Math.cos(s), V = k + p * n * Math.cos(s), X = O + n * Math.sin(s);
|
|
1317
|
+
i.push(
|
|
1130
1318
|
// Vertical riser
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1319
|
+
G,
|
|
1320
|
+
w,
|
|
1321
|
+
O,
|
|
1134
1322
|
// Bottom-left
|
|
1323
|
+
k,
|
|
1324
|
+
w,
|
|
1135
1325
|
O,
|
|
1136
|
-
v,
|
|
1137
|
-
_,
|
|
1138
1326
|
// Bottom-right
|
|
1327
|
+
k,
|
|
1328
|
+
v,
|
|
1139
1329
|
O,
|
|
1140
|
-
M,
|
|
1141
|
-
_,
|
|
1142
1330
|
// Top-right
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1331
|
+
G,
|
|
1332
|
+
v,
|
|
1333
|
+
O,
|
|
1146
1334
|
// Top-left
|
|
1147
1335
|
// Horizontal tread
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1336
|
+
G,
|
|
1337
|
+
v,
|
|
1338
|
+
O,
|
|
1151
1339
|
// Top-left
|
|
1340
|
+
k,
|
|
1341
|
+
v,
|
|
1152
1342
|
O,
|
|
1153
|
-
M,
|
|
1154
|
-
_,
|
|
1155
1343
|
// Top-right
|
|
1156
|
-
X,
|
|
1157
|
-
M,
|
|
1158
1344
|
V,
|
|
1345
|
+
v,
|
|
1346
|
+
X,
|
|
1159
1347
|
// Back-right
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1348
|
+
tt,
|
|
1349
|
+
v,
|
|
1350
|
+
X
|
|
1163
1351
|
// Back-left
|
|
1164
1352
|
);
|
|
1165
|
-
const
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
),
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1353
|
+
const C = h + 4 + f * a * 8 + d * 8;
|
|
1354
|
+
c.push(
|
|
1355
|
+
C,
|
|
1356
|
+
C + 1,
|
|
1357
|
+
C + 2,
|
|
1358
|
+
C,
|
|
1359
|
+
C + 2,
|
|
1360
|
+
C + 3
|
|
1361
|
+
), c.push(
|
|
1362
|
+
C + 4,
|
|
1363
|
+
C + 5,
|
|
1364
|
+
C + 6,
|
|
1365
|
+
C + 4,
|
|
1366
|
+
C + 6,
|
|
1367
|
+
C + 7
|
|
1180
1368
|
);
|
|
1181
1369
|
}
|
|
1182
1370
|
}
|
|
1183
|
-
this.setIndex(
|
|
1371
|
+
this.setIndex(c), this.setAttribute("position", new D(i, 3)), this.computeVertexNormals();
|
|
1184
1372
|
}
|
|
1185
1373
|
}
|
|
1186
|
-
class
|
|
1187
|
-
constructor(
|
|
1374
|
+
class xo extends I {
|
|
1375
|
+
constructor(t = 5, o = 3, n = 5, r = 0.2) {
|
|
1188
1376
|
super();
|
|
1189
|
-
const
|
|
1377
|
+
const a = [
|
|
1190
1378
|
// Floor vertices
|
|
1191
|
-
-
|
|
1379
|
+
-t / 2,
|
|
1192
1380
|
0,
|
|
1193
1381
|
-n / 2,
|
|
1194
1382
|
// 0
|
|
1195
|
-
|
|
1383
|
+
t / 2,
|
|
1196
1384
|
0,
|
|
1197
1385
|
-n / 2,
|
|
1198
1386
|
// 1
|
|
1199
|
-
|
|
1387
|
+
t / 2,
|
|
1200
1388
|
0,
|
|
1201
1389
|
n / 2,
|
|
1202
1390
|
// 2
|
|
1203
|
-
-
|
|
1391
|
+
-t / 2,
|
|
1204
1392
|
0,
|
|
1205
1393
|
n / 2,
|
|
1206
1394
|
// 3
|
|
1207
1395
|
// Back wall vertices
|
|
1208
|
-
-
|
|
1396
|
+
-t / 2,
|
|
1209
1397
|
0,
|
|
1210
1398
|
-n / 2,
|
|
1211
1399
|
// 4
|
|
1212
|
-
|
|
1400
|
+
t / 2,
|
|
1213
1401
|
0,
|
|
1214
1402
|
-n / 2,
|
|
1215
1403
|
// 5
|
|
1216
|
-
|
|
1404
|
+
t / 2,
|
|
1217
1405
|
o,
|
|
1218
1406
|
-n / 2,
|
|
1219
1407
|
// 6
|
|
1220
|
-
-
|
|
1408
|
+
-t / 2,
|
|
1221
1409
|
o,
|
|
1222
1410
|
-n / 2,
|
|
1223
1411
|
// 7
|
|
1224
1412
|
// Left wall vertices
|
|
1225
|
-
-
|
|
1413
|
+
-t / 2,
|
|
1226
1414
|
0,
|
|
1227
1415
|
-n / 2,
|
|
1228
1416
|
// 8
|
|
1229
|
-
-
|
|
1417
|
+
-t / 2,
|
|
1230
1418
|
0,
|
|
1231
1419
|
n / 2,
|
|
1232
1420
|
// 9
|
|
1233
|
-
-
|
|
1421
|
+
-t / 2,
|
|
1234
1422
|
o,
|
|
1235
1423
|
n / 2,
|
|
1236
1424
|
// 10
|
|
1237
|
-
-
|
|
1425
|
+
-t / 2,
|
|
1238
1426
|
o,
|
|
1239
1427
|
-n / 2
|
|
1240
1428
|
// 11
|
|
@@ -1261,90 +1449,90 @@ class lo extends I {
|
|
|
1261
1449
|
10,
|
|
1262
1450
|
11
|
|
1263
1451
|
];
|
|
1264
|
-
this.setIndex(s), this.setAttribute("position", new D(
|
|
1452
|
+
this.setIndex(s), this.setAttribute("position", new D(a, 3)), this.computeVertexNormals();
|
|
1265
1453
|
}
|
|
1266
1454
|
}
|
|
1267
|
-
class
|
|
1268
|
-
constructor(
|
|
1455
|
+
class go extends I {
|
|
1456
|
+
constructor(t = 2, o = 0.3, n = 0.5, r = 5, a = 2) {
|
|
1269
1457
|
super();
|
|
1270
|
-
const s = [],
|
|
1271
|
-
for (let m = 0; m <
|
|
1272
|
-
const h = m * o, f = h + o, p = m * n,
|
|
1458
|
+
const s = [], i = [];
|
|
1459
|
+
for (let m = 0; m < r; m++) {
|
|
1460
|
+
const h = m * o, f = h + o, p = m * n, d = p + n;
|
|
1273
1461
|
s.push(
|
|
1274
1462
|
// Vertical riser
|
|
1275
|
-
-
|
|
1463
|
+
-t / 2,
|
|
1276
1464
|
h,
|
|
1277
1465
|
p,
|
|
1278
1466
|
// Bottom-left
|
|
1279
|
-
|
|
1467
|
+
t / 2,
|
|
1280
1468
|
h,
|
|
1281
1469
|
p,
|
|
1282
1470
|
// Bottom-right
|
|
1283
|
-
|
|
1471
|
+
t / 2,
|
|
1284
1472
|
f,
|
|
1285
1473
|
p,
|
|
1286
1474
|
// Top-right
|
|
1287
|
-
-
|
|
1475
|
+
-t / 2,
|
|
1288
1476
|
f,
|
|
1289
1477
|
p,
|
|
1290
1478
|
// Top-left
|
|
1291
1479
|
// Horizontal tread
|
|
1292
|
-
-
|
|
1480
|
+
-t / 2,
|
|
1293
1481
|
f,
|
|
1294
1482
|
p,
|
|
1295
1483
|
// Top-left
|
|
1296
|
-
|
|
1484
|
+
t / 2,
|
|
1297
1485
|
f,
|
|
1298
1486
|
p,
|
|
1299
1487
|
// Top-right
|
|
1300
|
-
|
|
1488
|
+
t / 2,
|
|
1301
1489
|
f,
|
|
1302
|
-
|
|
1490
|
+
d,
|
|
1303
1491
|
// Back-right
|
|
1304
|
-
-
|
|
1492
|
+
-t / 2,
|
|
1305
1493
|
f,
|
|
1306
|
-
|
|
1494
|
+
d
|
|
1307
1495
|
// Back-left
|
|
1308
1496
|
);
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
),
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1497
|
+
const w = m * 8;
|
|
1498
|
+
i.push(
|
|
1499
|
+
w,
|
|
1500
|
+
w + 1,
|
|
1501
|
+
w + 2,
|
|
1502
|
+
w,
|
|
1503
|
+
w + 2,
|
|
1504
|
+
w + 3
|
|
1505
|
+
), i.push(
|
|
1506
|
+
w + 4,
|
|
1507
|
+
w + 5,
|
|
1508
|
+
w + 6,
|
|
1509
|
+
w + 4,
|
|
1510
|
+
w + 6,
|
|
1511
|
+
w + 7
|
|
1324
1512
|
);
|
|
1325
1513
|
}
|
|
1326
|
-
const
|
|
1514
|
+
const c = r * o, l = r * n;
|
|
1327
1515
|
s.push(
|
|
1328
1516
|
// Landing platform (4 vertices)
|
|
1329
|
-
-
|
|
1330
|
-
|
|
1517
|
+
-t / 2,
|
|
1518
|
+
c,
|
|
1331
1519
|
l,
|
|
1332
1520
|
// Bottom-left
|
|
1333
|
-
|
|
1334
|
-
|
|
1521
|
+
t / 2,
|
|
1522
|
+
c,
|
|
1335
1523
|
l,
|
|
1336
1524
|
// Bottom-right
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
l +
|
|
1525
|
+
t / 2,
|
|
1526
|
+
c,
|
|
1527
|
+
l + a,
|
|
1340
1528
|
// Top-right
|
|
1341
|
-
-
|
|
1342
|
-
|
|
1343
|
-
l +
|
|
1529
|
+
-t / 2,
|
|
1530
|
+
c,
|
|
1531
|
+
l + a
|
|
1344
1532
|
// Top-left
|
|
1345
1533
|
);
|
|
1346
|
-
const u =
|
|
1347
|
-
|
|
1534
|
+
const u = r * 8;
|
|
1535
|
+
i.push(
|
|
1348
1536
|
u,
|
|
1349
1537
|
u + 1,
|
|
1350
1538
|
u + 2,
|
|
@@ -1354,175 +1542,175 @@ class uo extends I {
|
|
|
1354
1542
|
u + 3
|
|
1355
1543
|
// Second triangle for landing
|
|
1356
1544
|
);
|
|
1357
|
-
for (let m = 0; m <
|
|
1358
|
-
const h =
|
|
1545
|
+
for (let m = 0; m < r; m++) {
|
|
1546
|
+
const h = c + m * o, f = h + o, p = -t / 2 - m * n, d = p - n;
|
|
1359
1547
|
s.push(
|
|
1360
1548
|
// Vertical riser
|
|
1361
1549
|
p,
|
|
1362
1550
|
h,
|
|
1363
|
-
l +
|
|
1551
|
+
l + a,
|
|
1364
1552
|
// Bottom-left
|
|
1365
1553
|
p,
|
|
1366
1554
|
h,
|
|
1367
|
-
l +
|
|
1555
|
+
l + a - t,
|
|
1368
1556
|
// Bottom-right
|
|
1369
1557
|
p,
|
|
1370
1558
|
f,
|
|
1371
|
-
l +
|
|
1559
|
+
l + a - t,
|
|
1372
1560
|
// Top-right
|
|
1373
1561
|
p,
|
|
1374
1562
|
f,
|
|
1375
|
-
l +
|
|
1563
|
+
l + a,
|
|
1376
1564
|
// Top-left
|
|
1377
1565
|
// Horizontal tread
|
|
1378
1566
|
p,
|
|
1379
1567
|
f,
|
|
1380
|
-
l +
|
|
1568
|
+
l + a,
|
|
1381
1569
|
// Top-left
|
|
1382
1570
|
p,
|
|
1383
1571
|
f,
|
|
1384
|
-
l +
|
|
1572
|
+
l + a - t,
|
|
1385
1573
|
// Top-right
|
|
1386
|
-
|
|
1574
|
+
d,
|
|
1387
1575
|
f,
|
|
1388
|
-
l +
|
|
1576
|
+
l + a - t,
|
|
1389
1577
|
// Back-right
|
|
1390
|
-
|
|
1578
|
+
d,
|
|
1391
1579
|
f,
|
|
1392
|
-
l +
|
|
1580
|
+
l + a
|
|
1393
1581
|
// Back-left
|
|
1394
1582
|
);
|
|
1395
|
-
const
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
),
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1583
|
+
const w = u + 4 + m * 8;
|
|
1584
|
+
i.push(
|
|
1585
|
+
w,
|
|
1586
|
+
w + 1,
|
|
1587
|
+
w + 2,
|
|
1588
|
+
w,
|
|
1589
|
+
w + 2,
|
|
1590
|
+
w + 3
|
|
1591
|
+
), i.push(
|
|
1592
|
+
w + 4,
|
|
1593
|
+
w + 5,
|
|
1594
|
+
w + 6,
|
|
1595
|
+
w + 4,
|
|
1596
|
+
w + 6,
|
|
1597
|
+
w + 7
|
|
1410
1598
|
);
|
|
1411
1599
|
}
|
|
1412
|
-
this.setIndex(
|
|
1600
|
+
this.setIndex(i), this.setAttribute("position", new D(s, 3)), this.computeVertexNormals();
|
|
1413
1601
|
}
|
|
1414
1602
|
}
|
|
1415
|
-
class
|
|
1416
|
-
constructor(
|
|
1603
|
+
class bo extends I {
|
|
1604
|
+
constructor(t = 1, o = 0.4, n = 0.2, r = 20, a = 2, s = Math.PI / 8) {
|
|
1417
1605
|
super();
|
|
1418
|
-
const
|
|
1606
|
+
const i = [], c = [];
|
|
1419
1607
|
let l = 0;
|
|
1420
|
-
for (let u = 0; u <
|
|
1421
|
-
const m =
|
|
1422
|
-
|
|
1608
|
+
for (let u = 0; u < r; u++) {
|
|
1609
|
+
const m = a * Math.cos(l), h = a * Math.sin(l), f = u * n, p = f + n;
|
|
1610
|
+
i.push(
|
|
1423
1611
|
// Front face (vertical riser)
|
|
1424
|
-
m -
|
|
1612
|
+
m - t / 2 * Math.cos(l),
|
|
1425
1613
|
f,
|
|
1426
|
-
h -
|
|
1614
|
+
h - t / 2 * Math.sin(l),
|
|
1427
1615
|
// Bottom-left
|
|
1428
|
-
m +
|
|
1616
|
+
m + t / 2 * Math.cos(l),
|
|
1429
1617
|
f,
|
|
1430
|
-
h +
|
|
1618
|
+
h + t / 2 * Math.sin(l),
|
|
1431
1619
|
// Bottom-right
|
|
1432
|
-
m +
|
|
1620
|
+
m + t / 2 * Math.cos(l),
|
|
1433
1621
|
p,
|
|
1434
|
-
h +
|
|
1622
|
+
h + t / 2 * Math.sin(l),
|
|
1435
1623
|
// Top-right
|
|
1436
|
-
m -
|
|
1624
|
+
m - t / 2 * Math.cos(l),
|
|
1437
1625
|
p,
|
|
1438
|
-
h -
|
|
1626
|
+
h - t / 2 * Math.sin(l)
|
|
1439
1627
|
// Top-left
|
|
1440
|
-
),
|
|
1628
|
+
), i.push(
|
|
1441
1629
|
// Top face (horizontal tread)
|
|
1442
|
-
m -
|
|
1630
|
+
m - t / 2 * Math.cos(l),
|
|
1443
1631
|
p,
|
|
1444
|
-
h -
|
|
1632
|
+
h - t / 2 * Math.sin(l),
|
|
1445
1633
|
// Top-left-front
|
|
1446
|
-
m +
|
|
1634
|
+
m + t / 2 * Math.cos(l),
|
|
1447
1635
|
p,
|
|
1448
|
-
h +
|
|
1636
|
+
h + t / 2 * Math.sin(l),
|
|
1449
1637
|
// Top-right-front
|
|
1450
|
-
m +
|
|
1638
|
+
m + t / 2 * Math.cos(l) - o * Math.sin(l),
|
|
1451
1639
|
p,
|
|
1452
|
-
h +
|
|
1640
|
+
h + t / 2 * Math.sin(l) + o * Math.cos(l),
|
|
1453
1641
|
// Back-right
|
|
1454
|
-
m -
|
|
1642
|
+
m - t / 2 * Math.cos(l) - o * Math.sin(l),
|
|
1455
1643
|
p,
|
|
1456
|
-
h -
|
|
1644
|
+
h - t / 2 * Math.sin(l) + o * Math.cos(l)
|
|
1457
1645
|
// Back-left
|
|
1458
1646
|
);
|
|
1459
|
-
const
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1647
|
+
const d = u * 8;
|
|
1648
|
+
c.push(
|
|
1649
|
+
d,
|
|
1650
|
+
d + 1,
|
|
1651
|
+
d + 2,
|
|
1464
1652
|
// First triangle for riser
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1653
|
+
d,
|
|
1654
|
+
d + 2,
|
|
1655
|
+
d + 3
|
|
1468
1656
|
// Second triangle for riser
|
|
1469
|
-
),
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1657
|
+
), c.push(
|
|
1658
|
+
d + 4,
|
|
1659
|
+
d + 5,
|
|
1660
|
+
d + 6,
|
|
1473
1661
|
// First triangle for tread
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1662
|
+
d + 4,
|
|
1663
|
+
d + 6,
|
|
1664
|
+
d + 7
|
|
1477
1665
|
// Second triangle for tread
|
|
1478
1666
|
), l += s;
|
|
1479
1667
|
}
|
|
1480
|
-
this.setIndex(
|
|
1668
|
+
this.setIndex(c), this.setAttribute("position", new D(i, 3)), this.computeVertexNormals();
|
|
1481
1669
|
}
|
|
1482
1670
|
}
|
|
1483
|
-
class
|
|
1484
|
-
constructor(
|
|
1671
|
+
class Ao extends I {
|
|
1672
|
+
constructor(t = 2, o = 0.3, n = 0.5, r = 10) {
|
|
1485
1673
|
super();
|
|
1486
|
-
const
|
|
1487
|
-
for (let
|
|
1488
|
-
const
|
|
1489
|
-
|
|
1674
|
+
const a = [], s = [];
|
|
1675
|
+
for (let i = 0; i < r; i++) {
|
|
1676
|
+
const c = i * o, l = c + o, u = i * n, m = u + n;
|
|
1677
|
+
a.push(
|
|
1490
1678
|
// Bottom face of riser (front face)
|
|
1491
|
-
-
|
|
1492
|
-
|
|
1679
|
+
-t / 2,
|
|
1680
|
+
c,
|
|
1493
1681
|
u,
|
|
1494
1682
|
// 0: Bottom-left-front
|
|
1495
|
-
|
|
1496
|
-
|
|
1683
|
+
t / 2,
|
|
1684
|
+
c,
|
|
1497
1685
|
u,
|
|
1498
1686
|
// 1: Bottom-right-front
|
|
1499
|
-
|
|
1687
|
+
t / 2,
|
|
1500
1688
|
l,
|
|
1501
1689
|
u,
|
|
1502
1690
|
// 2: Top-right-front
|
|
1503
|
-
-
|
|
1691
|
+
-t / 2,
|
|
1504
1692
|
l,
|
|
1505
1693
|
u,
|
|
1506
1694
|
// 3: Top-left-front
|
|
1507
1695
|
// Top face of tread (horizontal step)
|
|
1508
|
-
-
|
|
1696
|
+
-t / 2,
|
|
1509
1697
|
l,
|
|
1510
1698
|
u,
|
|
1511
1699
|
// 4: Top-left-front (repeated)
|
|
1512
|
-
|
|
1700
|
+
t / 2,
|
|
1513
1701
|
l,
|
|
1514
1702
|
u,
|
|
1515
1703
|
// 5: Top-right-front (repeated)
|
|
1516
|
-
|
|
1704
|
+
t / 2,
|
|
1517
1705
|
l,
|
|
1518
1706
|
m,
|
|
1519
1707
|
// 6: Top-right-back
|
|
1520
|
-
-
|
|
1708
|
+
-t / 2,
|
|
1521
1709
|
l,
|
|
1522
1710
|
m
|
|
1523
1711
|
// 7: Top-left-back
|
|
1524
1712
|
);
|
|
1525
|
-
const h =
|
|
1713
|
+
const h = i * 8;
|
|
1526
1714
|
s.push(
|
|
1527
1715
|
h,
|
|
1528
1716
|
h + 1,
|
|
@@ -1543,238 +1731,206 @@ class ho extends I {
|
|
|
1543
1731
|
// Second triangle for tread
|
|
1544
1732
|
);
|
|
1545
1733
|
}
|
|
1546
|
-
this.setIndex(s), this.setAttribute("position", new D(
|
|
1734
|
+
this.setIndex(s), this.setAttribute("position", new D(a, 3)), this.computeVertexNormals();
|
|
1547
1735
|
}
|
|
1548
1736
|
}
|
|
1549
|
-
class
|
|
1550
|
-
constructor(
|
|
1737
|
+
class xe extends I {
|
|
1738
|
+
constructor(t = 0.4, o = 1.2, n = 0.2) {
|
|
1551
1739
|
super();
|
|
1552
|
-
const
|
|
1553
|
-
|
|
1554
|
-
const s =
|
|
1555
|
-
|
|
1740
|
+
const r = o * 0.6, a = new A(t / 2, r, n);
|
|
1741
|
+
a.translate(0, r / 2, 0);
|
|
1742
|
+
const s = t * 1.5, i = new A(s, t / 4, n);
|
|
1743
|
+
i.translate(0, r * 0.75, 0), this.copy(B([a, i], !1)), this.computeVertexNormals();
|
|
1556
1744
|
}
|
|
1557
1745
|
}
|
|
1558
|
-
class
|
|
1559
|
-
constructor(
|
|
1746
|
+
class ge extends I {
|
|
1747
|
+
constructor(t = 1.75, o = 0.75) {
|
|
1560
1748
|
super();
|
|
1561
|
-
const n =
|
|
1562
|
-
let
|
|
1563
|
-
const
|
|
1564
|
-
|
|
1565
|
-
const l = new
|
|
1566
|
-
l.translate(0,
|
|
1567
|
-
const u = new
|
|
1568
|
-
u.translate(0,
|
|
1569
|
-
const m = new
|
|
1570
|
-
m.translate(0,
|
|
1571
|
-
const h = new
|
|
1572
|
-
h.translate(0,
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
|
-
class
|
|
1576
|
-
constructor(
|
|
1749
|
+
const n = t * 0.05, r = t * 0.15, a = t * 0.15, s = t * 0.75;
|
|
1750
|
+
let i = 0;
|
|
1751
|
+
const c = new A(o, n, o);
|
|
1752
|
+
c.translate(0, i + n / 2, 0), i += n;
|
|
1753
|
+
const l = new A(o * 0.8, r, o * 0.8);
|
|
1754
|
+
l.translate(0, i + r / 2, 0), i += r;
|
|
1755
|
+
const u = new A(o * 0.6, a, o * 0.6);
|
|
1756
|
+
u.translate(0, i + a / 2, 0), i += a;
|
|
1757
|
+
const m = new A(o * 0.4, s, o * 0.4);
|
|
1758
|
+
m.translate(0, i + s / 2, 0), i += s;
|
|
1759
|
+
const h = new j(o * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
|
|
1760
|
+
h.translate(0, i + 0.1 / 2, 0), this.copy(B([c, l, u, m, h], !1)), this.computeVertexNormals();
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
class be extends I {
|
|
1764
|
+
constructor(t = 0.6, o = 1, n = 0.2, r = 0.6) {
|
|
1577
1765
|
super();
|
|
1578
|
-
const
|
|
1579
|
-
s.translate(0,
|
|
1580
|
-
const
|
|
1581
|
-
|
|
1766
|
+
const a = o - r / 2, s = new A(t, a, n);
|
|
1767
|
+
s.translate(0, a / 2, 0);
|
|
1768
|
+
const i = new S(r / 2, r / 2, n, 16, 1, !1, 0, Math.PI);
|
|
1769
|
+
i.rotateY(Math.PI / 2), i.rotateX(Math.PI / 2), i.translate(0, a, 0), this.copy(B([s, i], !1)), this.computeVertexNormals();
|
|
1582
1770
|
}
|
|
1583
1771
|
}
|
|
1584
|
-
class
|
|
1585
|
-
constructor(
|
|
1772
|
+
class Ae extends I {
|
|
1773
|
+
constructor(t = 0.5, o = 0.8, n = 0.15) {
|
|
1586
1774
|
super();
|
|
1587
|
-
const
|
|
1588
|
-
|
|
1775
|
+
const r = new A(t, o, n);
|
|
1776
|
+
r.translate(0, o / 2, 0), this.copy(r);
|
|
1589
1777
|
}
|
|
1590
1778
|
}
|
|
1591
|
-
class
|
|
1592
|
-
constructor({ height:
|
|
1779
|
+
class Ie extends I {
|
|
1780
|
+
constructor({ height: t = 2.25 } = {}) {
|
|
1593
1781
|
super();
|
|
1594
|
-
const o = new
|
|
1782
|
+
const o = new A(1.2, 0.5, 1.2);
|
|
1595
1783
|
o.translate(0, 0.25, 0);
|
|
1596
|
-
const n = new
|
|
1597
|
-
n.translate(0, 0.5 +
|
|
1598
|
-
const
|
|
1599
|
-
|
|
1784
|
+
const n = new A(1, t, 1);
|
|
1785
|
+
n.translate(0, 0.5 + t / 2, 0);
|
|
1786
|
+
const r = new A(1.4, 0.3, 1.4);
|
|
1787
|
+
r.translate(0, 0.5 + t + 0.15, 0), this.copy(B([o, n, r], !1));
|
|
1600
1788
|
}
|
|
1601
1789
|
}
|
|
1602
|
-
class
|
|
1790
|
+
class yt extends I {
|
|
1603
1791
|
constructor({
|
|
1604
|
-
barHeight:
|
|
1792
|
+
barHeight: t = 2,
|
|
1605
1793
|
//
|
|
1606
1794
|
barRadius: o = 0.05,
|
|
1607
1795
|
spikeHeight: n = 0.3,
|
|
1608
|
-
spikeRadius:
|
|
1609
|
-
spikeScaleZ:
|
|
1796
|
+
spikeRadius: r = 0.075,
|
|
1797
|
+
spikeScaleZ: a = 1,
|
|
1610
1798
|
radialSegments: s = 8
|
|
1611
1799
|
} = {}) {
|
|
1612
1800
|
super();
|
|
1613
|
-
const
|
|
1614
|
-
|
|
1615
|
-
const
|
|
1616
|
-
|
|
1801
|
+
const i = new S(o, o, t, s);
|
|
1802
|
+
i.translate(0, t / 2, 0);
|
|
1803
|
+
const c = new j(r, n, s);
|
|
1804
|
+
c.translate(0, t + n / 2, 0), c.scale(1, 1, a), this.copy(B([i, c], !1));
|
|
1617
1805
|
}
|
|
1618
1806
|
}
|
|
1619
|
-
class
|
|
1807
|
+
class Se extends I {
|
|
1620
1808
|
constructor({
|
|
1621
|
-
count:
|
|
1809
|
+
count: t = 20,
|
|
1622
1810
|
//
|
|
1623
1811
|
spacing: o = 0.4,
|
|
1624
1812
|
barHeight: n = 2,
|
|
1625
|
-
barRadius:
|
|
1626
|
-
spikeHeight:
|
|
1813
|
+
barRadius: r = 0.05,
|
|
1814
|
+
spikeHeight: a = 0.3,
|
|
1627
1815
|
spikeRadius: s = 0.075,
|
|
1628
|
-
spikeScaleZ:
|
|
1629
|
-
railHeight:
|
|
1816
|
+
spikeScaleZ: i = 1,
|
|
1817
|
+
railHeight: c = 0.1,
|
|
1630
1818
|
railDepth: l = 0.05,
|
|
1631
1819
|
railOffset: u = 0,
|
|
1632
1820
|
radialSegments: m = 8
|
|
1633
1821
|
} = {}) {
|
|
1634
1822
|
super();
|
|
1635
|
-
const h = [], f = new
|
|
1636
|
-
for (let
|
|
1823
|
+
const h = [], f = new yt({ barHeight: n, barRadius: r, spikeHeight: a, spikeRadius: s, spikeScaleZ: i, radialSegments: m }), p = new A(t * o, c, l);
|
|
1824
|
+
for (let v = 0; v < t; v++) {
|
|
1637
1825
|
const x = f.clone();
|
|
1638
|
-
x.translate(
|
|
1826
|
+
x.translate(v * o, 0, 0), h.push(x);
|
|
1639
1827
|
}
|
|
1640
|
-
const
|
|
1641
|
-
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1828
|
+
const d = p.clone();
|
|
1829
|
+
d.translate(o * (t - 1) / 2, n - u - c / 2, 0), h.push(d);
|
|
1830
|
+
const w = p.clone();
|
|
1831
|
+
w.translate(o * (t - 1) / 2, c / 2, 0), h.push(w), this.copy(B(h));
|
|
1644
1832
|
}
|
|
1645
1833
|
}
|
|
1646
|
-
class
|
|
1834
|
+
class Ee extends I {
|
|
1647
1835
|
constructor({
|
|
1648
|
-
width:
|
|
1836
|
+
width: t = 5,
|
|
1649
1837
|
//
|
|
1650
1838
|
height: o = 8,
|
|
1651
1839
|
depth: n = 1,
|
|
1652
|
-
shelves:
|
|
1653
|
-
frameThickness:
|
|
1840
|
+
shelves: r = 4,
|
|
1841
|
+
frameThickness: a = 0.1,
|
|
1654
1842
|
open: s = !1
|
|
1655
1843
|
} = {}) {
|
|
1656
1844
|
super();
|
|
1657
|
-
const
|
|
1658
|
-
h.translate(-
|
|
1845
|
+
const i = o, c = t, l = n, u = new A(a, i, l), m = new A(c - 2 * a, a, l), h = u.clone();
|
|
1846
|
+
h.translate(-c / 2 + a / 2, i / 2, 0);
|
|
1659
1847
|
const f = u.clone();
|
|
1660
|
-
f.translate(
|
|
1848
|
+
f.translate(c / 2 - a / 2, i / 2, 0);
|
|
1661
1849
|
const p = m.clone();
|
|
1662
|
-
p.translate(0,
|
|
1663
|
-
const
|
|
1664
|
-
|
|
1665
|
-
const
|
|
1666
|
-
|
|
1667
|
-
const
|
|
1668
|
-
for (let
|
|
1669
|
-
const
|
|
1670
|
-
|
|
1850
|
+
p.translate(0, i - a / 2, 0);
|
|
1851
|
+
const d = m.clone();
|
|
1852
|
+
d.translate(0, a / 2, 0);
|
|
1853
|
+
const w = new A(c, i, a);
|
|
1854
|
+
w.translate(0, i / 2, -l / 2 + a / 2);
|
|
1855
|
+
const v = [], x = (i - a) / (r + 1);
|
|
1856
|
+
for (let U = 1; U <= r; U++) {
|
|
1857
|
+
const z = m.clone();
|
|
1858
|
+
z.translate(0, a / 2 + U * x, 0), v.push(z);
|
|
1671
1859
|
}
|
|
1672
|
-
this.copy(
|
|
1860
|
+
this.copy(B([
|
|
1673
1861
|
h,
|
|
1674
1862
|
//
|
|
1675
1863
|
f,
|
|
1676
1864
|
p,
|
|
1677
|
-
|
|
1678
|
-
...s ? [] : [
|
|
1679
|
-
...
|
|
1865
|
+
d,
|
|
1866
|
+
...s ? [] : [w],
|
|
1867
|
+
...v
|
|
1680
1868
|
], !1));
|
|
1681
1869
|
}
|
|
1682
1870
|
}
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
[0.5, 0.75],
|
|
1690
|
-
// Right upper middle
|
|
1691
|
-
[0.75, 0.25],
|
|
1692
|
-
// Right lower middle
|
|
1693
|
-
[0.5, -0.5],
|
|
1694
|
-
// Right bottom middle
|
|
1695
|
-
[0, -1],
|
|
1696
|
-
// Bottom point
|
|
1697
|
-
[-0.5, -0.5],
|
|
1698
|
-
// Left bottom middle
|
|
1699
|
-
[-0.75, 0.25],
|
|
1700
|
-
// Left lower middle
|
|
1701
|
-
[-0.5, 0.75]
|
|
1702
|
-
// Left upper middle
|
|
1703
|
-
];
|
|
1704
|
-
for (let s = 0; s < a.length; s++) {
|
|
1705
|
-
const [c, i] = a[s];
|
|
1706
|
-
o.push(c * e, i * e, 0);
|
|
1707
|
-
}
|
|
1708
|
-
for (let s = 1; s < a.length - 1; s++)
|
|
1709
|
-
n.push(0, s, s + 1);
|
|
1710
|
-
n.push(0, a.length - 1, 1);
|
|
1711
|
-
const r = new D(o, 3);
|
|
1712
|
-
this.setAttribute("position", r), this.setIndex(n), this.computeVertexNormals();
|
|
1871
|
+
function Pe(e, t = q.XYZ, o = 0.5, n = 2) {
|
|
1872
|
+
e.deleteAttribute("uv"), e.deleteAttribute("normal"), e = ye(e), e.computeVertexNormals();
|
|
1873
|
+
const r = e.getAttribute("position");
|
|
1874
|
+
for (let a = 0; a < r.count; a++) {
|
|
1875
|
+
const s = new g().fromBufferAttribute(r, a), i = Math.random() * (n - o) + o, c = t.clone().multiplyScalar(i);
|
|
1876
|
+
s.add(c), r.setXYZ(a, s.x, s.y, s.z);
|
|
1713
1877
|
}
|
|
1878
|
+
return r.needsUpdate = !0, e.computeVertexNormals(), e;
|
|
1714
1879
|
}
|
|
1715
|
-
|
|
1716
|
-
t
|
|
1717
|
-
const a = t.getAttribute("position");
|
|
1718
|
-
for (let r = 0; r < a.count; r++) {
|
|
1719
|
-
const s = new g().fromBufferAttribute(a, r), c = Math.random() * (n - o) + o, i = e.clone().multiplyScalar(c);
|
|
1720
|
-
s.add(i), a.setXYZ(r, s.x, s.y, s.z);
|
|
1721
|
-
}
|
|
1722
|
-
return a.needsUpdate = !0, t.computeVertexNormals(), t;
|
|
1723
|
-
}
|
|
1724
|
-
class At extends I {
|
|
1725
|
-
constructor(e = 1, o = 4, n = 4) {
|
|
1880
|
+
class Te extends I {
|
|
1881
|
+
constructor(t = 1, o = 4, n = 4) {
|
|
1726
1882
|
super();
|
|
1727
|
-
const
|
|
1728
|
-
this.copy(
|
|
1883
|
+
const r = new N(t, o, n);
|
|
1884
|
+
this.copy(Pe(r, q.XYZ, 0.5, 1)), this.computeVertexNormals(), this.center();
|
|
1729
1885
|
}
|
|
1730
1886
|
}
|
|
1731
|
-
class
|
|
1732
|
-
constructor(
|
|
1887
|
+
class Ge extends I {
|
|
1888
|
+
constructor(t = 0.1, o = 0.1, n = 0.4, r = 8) {
|
|
1733
1889
|
super();
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1736
|
-
const s = new
|
|
1737
|
-
|
|
1890
|
+
const a = new S(t * 0.6, o * 0.6, n, r);
|
|
1891
|
+
a.translate(0, 0, 0);
|
|
1892
|
+
const s = new N(t, r, r), i = s.clone(), c = s.clone(), l = s.clone(), u = s.clone();
|
|
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(B([a, i, c, l, u], !1));
|
|
1738
1894
|
}
|
|
1739
1895
|
}
|
|
1740
|
-
class
|
|
1896
|
+
class Ce extends I {
|
|
1741
1897
|
constructor() {
|
|
1742
1898
|
super();
|
|
1743
|
-
const
|
|
1744
|
-
o.translate(0, 1.5, 0), o.rotateX(Math.PI / 2), this.copy(
|
|
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));
|
|
1745
1901
|
}
|
|
1746
1902
|
}
|
|
1747
|
-
class
|
|
1903
|
+
class Be extends I {
|
|
1748
1904
|
constructor({
|
|
1749
|
-
flaskRadius:
|
|
1905
|
+
flaskRadius: t = 1,
|
|
1750
1906
|
//
|
|
1751
1907
|
neckRadius: o = 0.3,
|
|
1752
1908
|
height: n = 2.5,
|
|
1753
|
-
neckHeight:
|
|
1754
|
-
radialSegments:
|
|
1909
|
+
neckHeight: r = 1,
|
|
1910
|
+
radialSegments: a = 16
|
|
1755
1911
|
} = {}) {
|
|
1756
1912
|
super();
|
|
1757
1913
|
const s = [
|
|
1758
1914
|
new b(0, 0),
|
|
1759
1915
|
// Bottom of the flask
|
|
1760
|
-
new b(
|
|
1916
|
+
new b(t * 0.875, 0),
|
|
1761
1917
|
// Flat base with minimum width
|
|
1762
|
-
new b(
|
|
1918
|
+
new b(t, 0.1),
|
|
1763
1919
|
// End of the rounded base
|
|
1764
1920
|
new b(o, n),
|
|
1765
1921
|
// Start of the straight neck
|
|
1766
|
-
new b(o, n +
|
|
1922
|
+
new b(o, n + r),
|
|
1767
1923
|
// End of the straight neck
|
|
1768
|
-
new b(o * 1.1, n +
|
|
1924
|
+
new b(o * 1.1, n + r + 0.3)
|
|
1769
1925
|
// Slight outward lip at the top
|
|
1770
|
-
],
|
|
1771
|
-
this.copy(
|
|
1926
|
+
], i = new Y(s, a);
|
|
1927
|
+
this.copy(B([i], !1));
|
|
1772
1928
|
}
|
|
1773
1929
|
}
|
|
1774
|
-
class
|
|
1930
|
+
class Ue extends I {
|
|
1775
1931
|
constructor() {
|
|
1776
1932
|
super();
|
|
1777
|
-
const
|
|
1933
|
+
const t = [
|
|
1778
1934
|
new b(1, 0),
|
|
1779
1935
|
// Bottom of the bowl
|
|
1780
1936
|
new b(1.2, 0.5),
|
|
@@ -1785,114 +1941,114 @@ class Ct extends I {
|
|
|
1785
1941
|
// Flared edge
|
|
1786
1942
|
new b(0.8, 1.8)
|
|
1787
1943
|
// Lip of the bowl
|
|
1788
|
-
], o = new
|
|
1789
|
-
n.rotateX(-Math.PI / 2), n.translate(0, 0, 0), this.copy(
|
|
1944
|
+
], o = new Y(t, 12), n = new At(1, 12);
|
|
1945
|
+
n.rotateX(-Math.PI / 2), n.translate(0, 0, 0), this.copy(B([o, n], !1));
|
|
1790
1946
|
}
|
|
1791
1947
|
}
|
|
1792
|
-
class
|
|
1948
|
+
class ze extends I {
|
|
1793
1949
|
constructor({
|
|
1794
|
-
radius:
|
|
1950
|
+
radius: t = 0.3,
|
|
1795
1951
|
//
|
|
1796
1952
|
height: o = 0.4,
|
|
1797
1953
|
count: n = 3,
|
|
1798
|
-
thickness:
|
|
1799
|
-
radialSegments:
|
|
1954
|
+
thickness: r = 0.03,
|
|
1955
|
+
radialSegments: a = 16
|
|
1800
1956
|
} = {}) {
|
|
1801
1957
|
super();
|
|
1802
|
-
const s = new
|
|
1958
|
+
const s = new mt(t, r, 8, a);
|
|
1803
1959
|
s.rotateX(Math.PI / 2), s.translate(0, o, 0);
|
|
1804
|
-
const
|
|
1960
|
+
const i = new S(r * 0.6, r * 0.6, o, a), c = [];
|
|
1805
1961
|
for (let l = 0; l < n; l++) {
|
|
1806
|
-
const u = l / n * Math.PI * 2, m =
|
|
1807
|
-
m.translate(Math.cos(u) *
|
|
1962
|
+
const u = l / n * Math.PI * 2, m = i.clone();
|
|
1963
|
+
m.translate(Math.cos(u) * t, o / 2, Math.sin(u) * t), c.push(m);
|
|
1808
1964
|
}
|
|
1809
|
-
this.copy(
|
|
1965
|
+
this.copy(B([s, ...c], !1));
|
|
1810
1966
|
}
|
|
1811
1967
|
}
|
|
1812
|
-
class
|
|
1813
|
-
constructor(
|
|
1968
|
+
class st extends I {
|
|
1969
|
+
constructor(t = 0.2, o = 0.2, n = 3, r = 32, a = !0) {
|
|
1814
1970
|
super();
|
|
1815
|
-
const s = new
|
|
1816
|
-
|
|
1971
|
+
const s = new S(t, o, n, r, 1, a), i = new N(o, r, r / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
|
|
1972
|
+
i.translate(0, -(n / 2), 0), this.copy(B([s, i], !1));
|
|
1817
1973
|
}
|
|
1818
1974
|
}
|
|
1819
|
-
class
|
|
1820
|
-
constructor({ radius:
|
|
1975
|
+
class ke extends I {
|
|
1976
|
+
constructor({ radius: t = 0.5, neckRadius: o = 0.2, height: n = 3, neckHeight: r = 1, segments: a = 16 } = {}) {
|
|
1821
1977
|
super();
|
|
1822
|
-
const s = n -
|
|
1823
|
-
|
|
1824
|
-
const
|
|
1825
|
-
l.translate(0, s +
|
|
1826
|
-
const u = new
|
|
1827
|
-
u.translate(0, s +
|
|
1978
|
+
const s = n - r, i = new S(t, t, s, a);
|
|
1979
|
+
i.translate(0, s / 2, 0);
|
|
1980
|
+
const c = 0.3, l = new S(o, t, c, a);
|
|
1981
|
+
l.translate(0, s + c / 2, 0);
|
|
1982
|
+
const u = new S(o, o, r, a);
|
|
1983
|
+
u.translate(0, s + c + r / 2, 0), this.copy(B([i, l, u], !1));
|
|
1828
1984
|
}
|
|
1829
1985
|
}
|
|
1830
|
-
class
|
|
1986
|
+
class Ne extends I {
|
|
1831
1987
|
constructor({
|
|
1832
|
-
radius:
|
|
1988
|
+
radius: t = 3,
|
|
1833
1989
|
//
|
|
1834
1990
|
height: o = 0.6,
|
|
1835
1991
|
widthSegments: n = 64,
|
|
1836
|
-
heightSegments:
|
|
1837
|
-
phiStart:
|
|
1992
|
+
heightSegments: r = 16,
|
|
1993
|
+
phiStart: a = 0,
|
|
1838
1994
|
phiLength: s = Math.PI * 2
|
|
1839
1995
|
} = {}) {
|
|
1840
|
-
super(), this.copy(new
|
|
1996
|
+
super(), this.copy(new N(t, n, r, a, s, 0, Math.PI / 2)), this.scale(1, o / t, 1);
|
|
1841
1997
|
}
|
|
1842
1998
|
}
|
|
1843
|
-
const
|
|
1844
|
-
x:
|
|
1845
|
-
y:
|
|
1846
|
-
z:
|
|
1847
|
-
}),
|
|
1848
|
-
const n = Math.sqrt(
|
|
1849
|
-
return { radius: n, theta:
|
|
1999
|
+
const Io = (e, t) => e / (1 - Math.cos(t)), wt = (e, t) => e / (2 * Math.sin(t)), Oe = (e, t) => e * (1 - Math.cos(t)), So = (e, t) => 2 * e * Math.sin(t), Eo = (e, t, o) => ({
|
|
2000
|
+
x: e * Math.sin(o) * Math.cos(t),
|
|
2001
|
+
y: e * Math.sin(o) * Math.sin(t),
|
|
2002
|
+
z: e * Math.cos(o)
|
|
2003
|
+
}), Po = (e, t, o) => {
|
|
2004
|
+
const n = Math.sqrt(e * e + t * t + o * o), r = Math.atan2(t, e), a = Math.acos(o / n);
|
|
2005
|
+
return { radius: n, theta: r, phi: a };
|
|
1850
2006
|
};
|
|
1851
|
-
class
|
|
2007
|
+
class _e extends I {
|
|
1852
2008
|
constructor({
|
|
1853
|
-
radius:
|
|
2009
|
+
radius: t = wt(5, Math.PI / 10),
|
|
1854
2010
|
//
|
|
1855
2011
|
widthSegments: o = 64,
|
|
1856
2012
|
heightSegments: n = 32,
|
|
1857
|
-
phiStart:
|
|
1858
|
-
phiLength:
|
|
2013
|
+
phiStart: r = 0,
|
|
2014
|
+
phiLength: a = Math.PI * 2,
|
|
1859
2015
|
thetaLength: s = Math.PI / 10
|
|
1860
2016
|
} = {}) {
|
|
1861
|
-
super(), this.copy(new
|
|
1862
|
-
const
|
|
1863
|
-
this.translate(0, -
|
|
2017
|
+
super(), this.copy(new N(t, o, n, r, a, 0, s));
|
|
2018
|
+
const i = Oe(t, s);
|
|
2019
|
+
this.translate(0, -t + i, 0);
|
|
1864
2020
|
}
|
|
1865
2021
|
}
|
|
1866
|
-
class
|
|
2022
|
+
class Fe extends I {
|
|
1867
2023
|
constructor({
|
|
1868
|
-
trunkRadiusTop:
|
|
2024
|
+
trunkRadiusTop: t = 0.25,
|
|
1869
2025
|
trunkRadiusBottom: o = 0.4,
|
|
1870
2026
|
trunkHeight: n = 2.5,
|
|
1871
|
-
trunkSegments:
|
|
1872
|
-
leafSize:
|
|
2027
|
+
trunkSegments: r = 14,
|
|
2028
|
+
leafSize: a = 0.8,
|
|
1873
2029
|
leafCount: s = 6,
|
|
1874
|
-
leafDetail:
|
|
1875
|
-
leafSpreadRadius:
|
|
2030
|
+
leafDetail: i = 0,
|
|
2031
|
+
leafSpreadRadius: c = 1.5
|
|
1876
2032
|
} = {}) {
|
|
1877
2033
|
super();
|
|
1878
|
-
const l = new
|
|
2034
|
+
const l = new S(t, o, n, r);
|
|
1879
2035
|
l.translate(0, n / 2, 0);
|
|
1880
2036
|
const u = [];
|
|
1881
2037
|
for (let m = 0; m < s; m++) {
|
|
1882
|
-
const h = new
|
|
2038
|
+
const h = new at(a, i);
|
|
1883
2039
|
h.translate(
|
|
1884
|
-
(Math.random() - 0.5) *
|
|
1885
|
-
(Math.random() - 0.5) *
|
|
1886
|
-
(Math.random() - 0.5) *
|
|
2040
|
+
(Math.random() - 0.5) * c,
|
|
2041
|
+
(Math.random() - 0.5) * a + n,
|
|
2042
|
+
(Math.random() - 0.5) * c
|
|
1887
2043
|
), u.push(h);
|
|
1888
2044
|
}
|
|
1889
|
-
this.copy(
|
|
2045
|
+
this.copy(B([l.toNonIndexed(), B(u, !1)], !0)), this.computeVertexNormals();
|
|
1890
2046
|
}
|
|
1891
2047
|
}
|
|
1892
|
-
class
|
|
2048
|
+
class To extends P {
|
|
1893
2049
|
constructor() {
|
|
1894
2050
|
super();
|
|
1895
|
-
const
|
|
2051
|
+
const t = new N(5, 32, 32), o = new J({
|
|
1896
2052
|
uniforms: {
|
|
1897
2053
|
time: { value: 0 }
|
|
1898
2054
|
},
|
|
@@ -1935,181 +2091,181 @@ class Mo extends A {
|
|
|
1935
2091
|
gl_FragColor = vec4(color, 1.0);
|
|
1936
2092
|
}
|
|
1937
2093
|
`
|
|
1938
|
-
}), n = new
|
|
2094
|
+
}), n = new y(t, o);
|
|
1939
2095
|
this.add(n);
|
|
1940
2096
|
}
|
|
1941
2097
|
}
|
|
1942
|
-
class
|
|
2098
|
+
class Go extends y {
|
|
1943
2099
|
constructor({
|
|
1944
|
-
width:
|
|
2100
|
+
width: t = 1,
|
|
1945
2101
|
height: o = 1.5,
|
|
1946
2102
|
depth: n = 0.5,
|
|
1947
|
-
coverThickness:
|
|
1948
|
-
pageIndent:
|
|
2103
|
+
coverThickness: r = 0.05,
|
|
2104
|
+
pageIndent: a = 0.05,
|
|
1949
2105
|
coverColor: s = 9109504,
|
|
1950
|
-
pageColor:
|
|
2106
|
+
pageColor: i = 16777215
|
|
1951
2107
|
} = {}) {
|
|
1952
|
-
super(), this.geometry = new
|
|
1953
|
-
new
|
|
1954
|
-
new
|
|
2108
|
+
super(), this.geometry = new ft(t, o, n, r, a), this.material = [
|
|
2109
|
+
new M({ color: s, metalness: 0.1, roughness: 0.7, flatShading: !0 }),
|
|
2110
|
+
new M({ color: i, flatShading: !0 })
|
|
1955
2111
|
];
|
|
1956
2112
|
}
|
|
1957
2113
|
}
|
|
1958
|
-
class
|
|
2114
|
+
class Co extends y {
|
|
1959
2115
|
constructor({
|
|
1960
|
-
width:
|
|
2116
|
+
width: t = 0.4,
|
|
1961
2117
|
height: o = 1.2,
|
|
1962
2118
|
depth: n = 0.2,
|
|
1963
|
-
material:
|
|
2119
|
+
material: r = new M({ color: 7829367, roughness: 0.8 })
|
|
1964
2120
|
} = {}) {
|
|
1965
|
-
const
|
|
1966
|
-
super(
|
|
2121
|
+
const a = new xe(t, o, n);
|
|
2122
|
+
super(a, r);
|
|
1967
2123
|
}
|
|
1968
2124
|
}
|
|
1969
|
-
class
|
|
2125
|
+
class Bo extends P {
|
|
1970
2126
|
constructor() {
|
|
1971
2127
|
super();
|
|
1972
|
-
const
|
|
2128
|
+
const t = new A(5, 1, 5), o = new M({ color: 8421504, flatShading: !0 }), n = new y(t, o);
|
|
1973
2129
|
n.position.set(0, 0.5, 0), this.add(n);
|
|
1974
|
-
const
|
|
2130
|
+
const r = new A(4, 3, 4), a = new M({ color: 6908265, flatShading: !0 }), s = new y(r, a);
|
|
1975
2131
|
s.position.set(0, 2.5, 0), this.add(s);
|
|
1976
|
-
const
|
|
2132
|
+
const i = new j(3.5, 2, 4), c = new M({ color: 5263440, flatShading: !0 }), l = new y(i, c);
|
|
1977
2133
|
l.rotation.y = Math.PI / 4, l.position.set(0, 5, 0), this.add(l);
|
|
1978
|
-
const u = new
|
|
2134
|
+
const u = new S(0.2, 0.2, 3.5, 16), m = new M({ color: 6908265, flatShading: !0 });
|
|
1979
2135
|
[
|
|
1980
2136
|
[-1.8, 2.3, -2.2],
|
|
1981
2137
|
[1.8, 2.3, -2.2],
|
|
1982
2138
|
[-1.8, 2.3, 2.2],
|
|
1983
2139
|
[1.8, 2.3, 2.2]
|
|
1984
2140
|
].forEach((x) => {
|
|
1985
|
-
const
|
|
1986
|
-
|
|
2141
|
+
const U = new y(u, m);
|
|
2142
|
+
U.position.set(x[0], x[1], x[2]), this.add(U);
|
|
1987
2143
|
});
|
|
1988
|
-
const f = new
|
|
2144
|
+
const f = new H();
|
|
1989
2145
|
f.moveTo(-1, 0), f.lineTo(-1, 2), f.absarc(0, 2, 1, Math.PI, 0, !0), f.lineTo(1, 0);
|
|
1990
2146
|
const p = {
|
|
1991
2147
|
depth: 0.5,
|
|
1992
2148
|
bevelEnabled: !1
|
|
1993
|
-
},
|
|
1994
|
-
|
|
2149
|
+
}, d = new Q(f, p), w = new M({ color: 4210752, flatShading: !0 }), v = new y(d, w);
|
|
2150
|
+
v.position.set(0, 0.5, 1.7), this.add(v);
|
|
1995
2151
|
}
|
|
1996
2152
|
}
|
|
1997
|
-
class
|
|
1998
|
-
constructor({ totalHeight:
|
|
1999
|
-
super(), this.geometry = new
|
|
2153
|
+
class Uo extends y {
|
|
2154
|
+
constructor({ totalHeight: t = 1.75, baseWidth: o = 0.75 } = {}) {
|
|
2155
|
+
super(), this.geometry = new ge(t, o), this.material = new M({ color: 7829367, roughness: 0.8 });
|
|
2000
2156
|
}
|
|
2001
2157
|
}
|
|
2002
|
-
class
|
|
2003
|
-
constructor(
|
|
2004
|
-
super(), this.geometry = new
|
|
2158
|
+
class zo extends y {
|
|
2159
|
+
constructor(t = 0.6, o = 1, n = 0.2, r = 0.6) {
|
|
2160
|
+
super(), this.geometry = new be(t, o, n, r), this.material = new M({ color: 7829367, roughness: 0.8 });
|
|
2005
2161
|
}
|
|
2006
2162
|
}
|
|
2007
|
-
class
|
|
2008
|
-
constructor(
|
|
2009
|
-
super(), this.geometry = new
|
|
2163
|
+
class ko extends y {
|
|
2164
|
+
constructor(t = 0.5, o = 0.8, n = 0.15) {
|
|
2165
|
+
super(), this.geometry = new Ae(t, o, n), this.material = new M({ color: 7829367, roughness: 0.8 });
|
|
2010
2166
|
}
|
|
2011
2167
|
}
|
|
2012
|
-
class
|
|
2013
|
-
constructor({ height:
|
|
2014
|
-
super(), this.geometry = new
|
|
2168
|
+
class No extends y {
|
|
2169
|
+
constructor({ height: t = 2.25 } = {}) {
|
|
2170
|
+
super(), this.geometry = new Ie({ height: t }), this.material = new M({ color: 9141627, flatShading: !0 });
|
|
2015
2171
|
}
|
|
2016
2172
|
}
|
|
2017
|
-
class
|
|
2173
|
+
class Oo extends y {
|
|
2018
2174
|
constructor({
|
|
2019
|
-
barHeight:
|
|
2175
|
+
barHeight: t = 2,
|
|
2020
2176
|
//
|
|
2021
2177
|
barRadius: o = 0.05,
|
|
2022
2178
|
spikeHeight: n = 0.3,
|
|
2023
|
-
spikeRadius:
|
|
2024
|
-
spikeScaleZ:
|
|
2179
|
+
spikeRadius: r = 0.075,
|
|
2180
|
+
spikeScaleZ: a = 1,
|
|
2025
2181
|
radialSegments: s = 8
|
|
2026
2182
|
} = {}) {
|
|
2027
|
-
super(), this.geometry = new
|
|
2028
|
-
barHeight:
|
|
2183
|
+
super(), this.geometry = new yt({
|
|
2184
|
+
barHeight: t,
|
|
2029
2185
|
barRadius: o,
|
|
2030
2186
|
spikeHeight: n,
|
|
2031
|
-
spikeRadius:
|
|
2032
|
-
spikeScaleZ:
|
|
2187
|
+
spikeRadius: r,
|
|
2188
|
+
spikeScaleZ: a,
|
|
2033
2189
|
radialSegments: s
|
|
2034
|
-
}), this.material = new
|
|
2190
|
+
}), this.material = new M({ color: 3355443, metalness: 0.8, roughness: 0.4 });
|
|
2035
2191
|
}
|
|
2036
2192
|
}
|
|
2037
|
-
class
|
|
2193
|
+
class _o extends y {
|
|
2038
2194
|
constructor({
|
|
2039
|
-
count:
|
|
2195
|
+
count: t = 20,
|
|
2040
2196
|
//
|
|
2041
2197
|
spacing: o = 0.4,
|
|
2042
2198
|
barHeight: n = 2,
|
|
2043
|
-
barRadius:
|
|
2044
|
-
spikeHeight:
|
|
2199
|
+
barRadius: r = 0.05,
|
|
2200
|
+
spikeHeight: a = 0.3,
|
|
2045
2201
|
spikeRadius: s = 0.075,
|
|
2046
|
-
spikeScaleZ:
|
|
2047
|
-
railHeight:
|
|
2202
|
+
spikeScaleZ: i = 1,
|
|
2203
|
+
railHeight: c = 0.1,
|
|
2048
2204
|
railDepth: l = 0.05,
|
|
2049
2205
|
railOffset: u = 0,
|
|
2050
2206
|
radialSegments: m = 8
|
|
2051
2207
|
} = {}) {
|
|
2052
|
-
super(), this.geometry = new
|
|
2053
|
-
count:
|
|
2208
|
+
super(), this.geometry = new Se({
|
|
2209
|
+
count: t,
|
|
2054
2210
|
spacing: o,
|
|
2055
2211
|
barHeight: n,
|
|
2056
|
-
barRadius:
|
|
2057
|
-
spikeHeight:
|
|
2212
|
+
barRadius: r,
|
|
2213
|
+
spikeHeight: a,
|
|
2058
2214
|
spikeRadius: s,
|
|
2059
|
-
spikeScaleZ:
|
|
2060
|
-
railHeight:
|
|
2215
|
+
spikeScaleZ: i,
|
|
2216
|
+
railHeight: c,
|
|
2061
2217
|
railDepth: l,
|
|
2062
2218
|
railOffset: u,
|
|
2063
2219
|
radialSegments: m
|
|
2064
|
-
}), this.material = new
|
|
2220
|
+
}), this.material = new M({ color: 3355443, metalness: 0.8, roughness: 0.4 });
|
|
2065
2221
|
}
|
|
2066
2222
|
}
|
|
2067
|
-
class
|
|
2223
|
+
class Fo extends y {
|
|
2068
2224
|
constructor({
|
|
2069
|
-
width:
|
|
2225
|
+
width: t = 5,
|
|
2070
2226
|
//
|
|
2071
2227
|
height: o = 8,
|
|
2072
2228
|
depth: n = 1,
|
|
2073
|
-
shelves:
|
|
2074
|
-
frameThickness:
|
|
2229
|
+
shelves: r = 4,
|
|
2230
|
+
frameThickness: a = 0.1,
|
|
2075
2231
|
open: s = !1
|
|
2076
2232
|
} = {}) {
|
|
2077
|
-
super(), this.geometry = new
|
|
2233
|
+
super(), this.geometry = new Ee({ width: t, height: o, depth: n, shelves: r, frameThickness: a, open: s }), this.material = new M({ color: 9127187 });
|
|
2078
2234
|
}
|
|
2079
2235
|
}
|
|
2080
|
-
class
|
|
2236
|
+
class Ro extends P {
|
|
2081
2237
|
constructor() {
|
|
2082
2238
|
super();
|
|
2083
|
-
const
|
|
2239
|
+
const t = new A(5, 0.3, 3), o = new M({ color: 9132587 }), n = new y(t, o);
|
|
2084
2240
|
n.position.set(0, 3.15, 0);
|
|
2085
|
-
const
|
|
2086
|
-
|
|
2087
|
-
const
|
|
2241
|
+
const r = [];
|
|
2242
|
+
r.push(new b(0.2, 0)), r.push(new b(0.25, 0.5)), r.push(new b(0.15, 1.5)), r.push(new b(0.3, 3));
|
|
2243
|
+
const a = new Y(r, 32), s = new M({ color: 4929057 });
|
|
2088
2244
|
[
|
|
2089
2245
|
[2.2, 0, 1.2],
|
|
2090
2246
|
// Adjust Y to 0 so legs start at ground level
|
|
2091
2247
|
[-2.2, 0, 1.2],
|
|
2092
2248
|
[2.2, 0, -1.2],
|
|
2093
2249
|
[-2.2, 0, -1.2]
|
|
2094
|
-
].forEach((
|
|
2095
|
-
const l = new
|
|
2096
|
-
l.position.set(
|
|
2250
|
+
].forEach((c) => {
|
|
2251
|
+
const l = new y(a, s);
|
|
2252
|
+
l.position.set(c[0], c[1], c[2]), this.add(l);
|
|
2097
2253
|
}), this.add(n);
|
|
2098
2254
|
}
|
|
2099
2255
|
}
|
|
2100
|
-
class
|
|
2256
|
+
class Lo extends P {
|
|
2101
2257
|
constructor(o = 1, n = 0.2) {
|
|
2102
2258
|
super();
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2259
|
+
E(this, "candle");
|
|
2260
|
+
E(this, "flame");
|
|
2261
|
+
E(this, "candleLight");
|
|
2262
|
+
E(this, "height");
|
|
2263
|
+
E(this, "radius");
|
|
2108
2264
|
this.height = o, this.radius = n;
|
|
2109
|
-
const
|
|
2110
|
-
this.candle = new
|
|
2111
|
-
const s = new
|
|
2112
|
-
this.flame = new
|
|
2265
|
+
const r = new S(this.radius, this.radius, this.height, 32), a = new M({ color: 16777215 });
|
|
2266
|
+
this.candle = new y(r, a), this.candle.position.set(0, this.height / 2, 0), this.add(this.candle);
|
|
2267
|
+
const s = new N(0.05, 16, 16), i = new It({ color: 16753920 });
|
|
2268
|
+
this.flame = new y(s, i), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new ht(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight), this.animateFlicker();
|
|
2113
2269
|
}
|
|
2114
2270
|
animateFlicker() {
|
|
2115
2271
|
const o = () => {
|
|
@@ -2118,52 +2274,52 @@ class Bo extends A {
|
|
|
2118
2274
|
o();
|
|
2119
2275
|
}
|
|
2120
2276
|
}
|
|
2121
|
-
class
|
|
2122
|
-
constructor(
|
|
2277
|
+
class qo extends P {
|
|
2278
|
+
constructor(t = 1.3, o = 0.5) {
|
|
2123
2279
|
super();
|
|
2124
|
-
const n = new
|
|
2125
|
-
|
|
2126
|
-
const s = new
|
|
2127
|
-
|
|
2128
|
-
const l = new
|
|
2129
|
-
m.position.set(0,
|
|
2130
|
-
const h = new
|
|
2131
|
-
p.position.set(0,
|
|
2132
|
-
const
|
|
2133
|
-
|
|
2134
|
-
}
|
|
2135
|
-
}
|
|
2136
|
-
class
|
|
2280
|
+
const n = new S(o, o, 0.2, 16), r = new M({ color: 9127187, flatShading: !0 }), a = new y(n, r);
|
|
2281
|
+
a.position.set(0, 0, 0), this.add(a);
|
|
2282
|
+
const s = new S(o * 0.9, o * 0.9, t), i = new M({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), c = new y(s, i);
|
|
2283
|
+
c.position.set(0, t / 2 + 0.1, 0), this.add(c);
|
|
2284
|
+
const l = new j(o * 1.1, 0.5, 8), u = new M({ color: 9127187, flatShading: !0 }), m = new y(l, u);
|
|
2285
|
+
m.position.set(0, t + 0.35, 0), this.add(m);
|
|
2286
|
+
const h = new mt(o * 0.8, 0.05, 8, 16), f = new M({ color: 9127187, flatShading: !0 }), p = new y(h, f);
|
|
2287
|
+
p.position.set(0, t + 0.85, 0), this.add(p);
|
|
2288
|
+
const d = new ht(16755200, 1.5, 15);
|
|
2289
|
+
d.position.set(0, t / 2 + 0.1, 0), d.castShadow = !0, this.add(d);
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2292
|
+
class Do extends P {
|
|
2137
2293
|
constructor() {
|
|
2138
2294
|
super();
|
|
2139
|
-
const
|
|
2140
|
-
for (let
|
|
2141
|
-
const
|
|
2142
|
-
|
|
2143
|
-
const s = new
|
|
2144
|
-
s.scale.set(
|
|
2295
|
+
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
|
+
for (let r = 0; r < 5; r++) {
|
|
2297
|
+
const a = new y(t, o);
|
|
2298
|
+
a.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), a.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), a.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(a);
|
|
2299
|
+
const s = new y(t, n);
|
|
2300
|
+
s.scale.set(a.scale.x * 0.9, a.scale.y * 0.5, a.scale.z * 0.9), s.rotation.copy(a.rotation), s.position.copy(a.position), s.position.y += 0.3, this.add(s);
|
|
2145
2301
|
}
|
|
2146
2302
|
}
|
|
2147
2303
|
}
|
|
2148
|
-
class
|
|
2149
|
-
constructor(
|
|
2150
|
-
super(), this.geometry = new
|
|
2304
|
+
class Vo extends y {
|
|
2305
|
+
constructor(t = 1, o = 4, n = 4) {
|
|
2306
|
+
super(), this.geometry = new Te(t, o, n), this.material = new M({ color: 8421504, flatShading: !0 });
|
|
2151
2307
|
}
|
|
2152
2308
|
}
|
|
2153
|
-
class
|
|
2309
|
+
class Xo extends P {
|
|
2154
2310
|
constructor() {
|
|
2155
2311
|
super();
|
|
2156
|
-
const
|
|
2312
|
+
const t = new at(1, 0), o = new M({ color: 8421504, flatShading: !0 });
|
|
2157
2313
|
for (let n = 0; n < 5; n++) {
|
|
2158
|
-
const
|
|
2159
|
-
|
|
2314
|
+
const r = new y(t, o);
|
|
2315
|
+
r.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), r.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), r.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(r);
|
|
2160
2316
|
}
|
|
2161
2317
|
}
|
|
2162
2318
|
}
|
|
2163
|
-
class
|
|
2319
|
+
class Zo extends P {
|
|
2164
2320
|
constructor() {
|
|
2165
2321
|
super();
|
|
2166
|
-
const
|
|
2322
|
+
const t = new Ce(), o = new W({
|
|
2167
2323
|
color: 8965375,
|
|
2168
2324
|
transparent: !0,
|
|
2169
2325
|
opacity: 0.4,
|
|
@@ -2171,15 +2327,15 @@ class _o extends A {
|
|
|
2171
2327
|
metalness: 0.1,
|
|
2172
2328
|
reflectivity: 0.8,
|
|
2173
2329
|
transmission: 0.9,
|
|
2174
|
-
side:
|
|
2175
|
-
}), n = new
|
|
2330
|
+
side: L
|
|
2331
|
+
}), n = new y(t, o);
|
|
2176
2332
|
n.rotation.x = -Math.PI / 2, this.add(n);
|
|
2177
2333
|
}
|
|
2178
2334
|
}
|
|
2179
|
-
class
|
|
2335
|
+
class jo extends P {
|
|
2180
2336
|
constructor() {
|
|
2181
2337
|
super();
|
|
2182
|
-
const
|
|
2338
|
+
const t = [
|
|
2183
2339
|
new b(0, 0),
|
|
2184
2340
|
// Bottom
|
|
2185
2341
|
new b(0.8, 0),
|
|
@@ -2190,98 +2346,98 @@ class ko extends A {
|
|
|
2190
2346
|
// Neck
|
|
2191
2347
|
new b(0.6, 2.5)
|
|
2192
2348
|
// Mouth
|
|
2193
|
-
], o = new
|
|
2349
|
+
], o = new Y(t, 10), n = new S(0.3, 0.4, 0.2, 8), r = new M({
|
|
2194
2350
|
color: 8965375,
|
|
2195
2351
|
transparent: !0,
|
|
2196
2352
|
opacity: 0.5,
|
|
2197
2353
|
roughness: 0.1,
|
|
2198
2354
|
metalness: 0.3
|
|
2199
|
-
}),
|
|
2355
|
+
}), a = new M({
|
|
2200
2356
|
color: 16724838,
|
|
2201
2357
|
// Vibrant potion color
|
|
2202
2358
|
transparent: !0,
|
|
2203
2359
|
opacity: 0.6
|
|
2204
|
-
}), s = new
|
|
2360
|
+
}), s = new M({
|
|
2205
2361
|
color: 9127187,
|
|
2206
2362
|
roughness: 1
|
|
2207
|
-
}),
|
|
2208
|
-
|
|
2209
|
-
const u = new
|
|
2210
|
-
u.add(
|
|
2363
|
+
}), i = new y(o, r), c = new y(o, a), l = new y(n, s);
|
|
2364
|
+
c.scale.set(0.8, 0.8, 0.8), c.position.y = 0.1, l.position.y = 2.5;
|
|
2365
|
+
const u = new P();
|
|
2366
|
+
u.add(i, c, l), this.add(u);
|
|
2211
2367
|
}
|
|
2212
2368
|
}
|
|
2213
|
-
class
|
|
2369
|
+
class Yo extends P {
|
|
2214
2370
|
constructor() {
|
|
2215
2371
|
super();
|
|
2216
|
-
const
|
|
2372
|
+
const t = new S(0.3, 0.4, 0.1, 16), o = new M({
|
|
2217
2373
|
color: 3355443,
|
|
2218
2374
|
roughness: 0.6,
|
|
2219
2375
|
metalness: 0.3
|
|
2220
|
-
}), n = new
|
|
2376
|
+
}), n = new y(t, o);
|
|
2221
2377
|
n.position.y = 0.05;
|
|
2222
|
-
const
|
|
2378
|
+
const r = new S(0.1, 0.1, 0.7, 16), a = new M({
|
|
2223
2379
|
color: 5592405,
|
|
2224
2380
|
roughness: 0.5,
|
|
2225
2381
|
metalness: 0.4
|
|
2226
|
-
}), s = new
|
|
2382
|
+
}), s = new y(r, a);
|
|
2227
2383
|
s.position.y = 0.4;
|
|
2228
|
-
const
|
|
2384
|
+
const i = new j(0.075, 0.2, 16), c = new M({
|
|
2229
2385
|
color: 16733440,
|
|
2230
2386
|
emissive: 16733440,
|
|
2231
2387
|
emissiveIntensity: 0.6,
|
|
2232
2388
|
transparent: !0,
|
|
2233
2389
|
opacity: 0.8
|
|
2234
|
-
}), l = new
|
|
2390
|
+
}), l = new y(i, c);
|
|
2235
2391
|
l.position.y = 0.8, this.add(n, s, l);
|
|
2236
2392
|
}
|
|
2237
2393
|
}
|
|
2238
|
-
class
|
|
2394
|
+
class Ho extends P {
|
|
2239
2395
|
constructor() {
|
|
2240
2396
|
super();
|
|
2241
|
-
const
|
|
2397
|
+
const t = new A(3, 4, 0.1), o = new M({
|
|
2242
2398
|
color: 3026478,
|
|
2243
2399
|
roughness: 0.8,
|
|
2244
2400
|
metalness: 0.6
|
|
2245
|
-
}), n = new
|
|
2401
|
+
}), n = new A(0.2, 0.5, 0.2), r = new M({
|
|
2246
2402
|
color: 11184810,
|
|
2247
2403
|
roughness: 0.5,
|
|
2248
2404
|
metalness: 0.7
|
|
2249
|
-
}),
|
|
2405
|
+
}), a = new S(0.3, 0.3, 0.1, 16), s = new M({
|
|
2250
2406
|
color: 5592405,
|
|
2251
2407
|
roughness: 0.7,
|
|
2252
2408
|
metalness: 0.5
|
|
2253
|
-
}),
|
|
2254
|
-
for (let
|
|
2255
|
-
const
|
|
2256
|
-
|
|
2409
|
+
}), i = new y(t, o);
|
|
2410
|
+
for (let w = -1; w <= 1; w++) {
|
|
2411
|
+
const v = new y(n, r);
|
|
2412
|
+
v.position.set(w, 1.5, 0.1), i.add(v);
|
|
2257
2413
|
}
|
|
2258
|
-
const
|
|
2259
|
-
|
|
2260
|
-
const l = new
|
|
2414
|
+
const c = new y(a, s);
|
|
2415
|
+
c.rotation.x = Math.PI / 2, c.position.set(0, 0.5, 0.15), i.add(c);
|
|
2416
|
+
const l = new N(0.15, 8, 8), u = new M({
|
|
2261
2417
|
color: 16711680,
|
|
2262
2418
|
emissive: 16711680,
|
|
2263
2419
|
emissiveIntensity: 0.5
|
|
2264
|
-
}), m = new
|
|
2265
|
-
m.position.set(0, -1, 0.1),
|
|
2420
|
+
}), m = new y(l, u);
|
|
2421
|
+
m.position.set(0, -1, 0.1), i.add(m), this.add(i);
|
|
2266
2422
|
let h = 0.015, f = 0.8, p = 0.2;
|
|
2267
|
-
function
|
|
2268
|
-
requestAnimationFrame(
|
|
2269
|
-
const
|
|
2270
|
-
m.material.emissiveIntensity =
|
|
2423
|
+
function d() {
|
|
2424
|
+
requestAnimationFrame(d);
|
|
2425
|
+
const w = p + Math.abs(Math.sin(Date.now() * h)) * (f - p);
|
|
2426
|
+
m.material.emissiveIntensity = w;
|
|
2271
2427
|
}
|
|
2272
|
-
|
|
2428
|
+
d();
|
|
2273
2429
|
}
|
|
2274
2430
|
}
|
|
2275
|
-
class
|
|
2431
|
+
class Qo extends y {
|
|
2276
2432
|
constructor({
|
|
2277
|
-
flaskRadius:
|
|
2433
|
+
flaskRadius: t = 1,
|
|
2278
2434
|
//
|
|
2279
2435
|
neckRadius: o = 0.3,
|
|
2280
2436
|
height: n = 2.5,
|
|
2281
|
-
neckHeight:
|
|
2282
|
-
radialSegments:
|
|
2437
|
+
neckHeight: r = 1,
|
|
2438
|
+
radialSegments: a = 16
|
|
2283
2439
|
} = {}) {
|
|
2284
|
-
super(), this.geometry = new
|
|
2440
|
+
super(), this.geometry = new Be({ flaskRadius: t, neckRadius: o, height: n, neckHeight: r, radialSegments: a }), this.material = new W({
|
|
2285
2441
|
color: 8965375,
|
|
2286
2442
|
transparent: !0,
|
|
2287
2443
|
opacity: 0.4,
|
|
@@ -2289,15 +2445,15 @@ class Lo extends d {
|
|
|
2289
2445
|
metalness: 0.1,
|
|
2290
2446
|
reflectivity: 0.8,
|
|
2291
2447
|
transmission: 0.9,
|
|
2292
|
-
side:
|
|
2448
|
+
side: L,
|
|
2293
2449
|
wireframe: !1
|
|
2294
2450
|
});
|
|
2295
2451
|
}
|
|
2296
2452
|
}
|
|
2297
|
-
class
|
|
2453
|
+
class Ko extends P {
|
|
2298
2454
|
constructor() {
|
|
2299
2455
|
super();
|
|
2300
|
-
const
|
|
2456
|
+
const t = [
|
|
2301
2457
|
new b(0, 0),
|
|
2302
2458
|
// Bottom of the flask
|
|
2303
2459
|
new b(1.2, 0),
|
|
@@ -2308,91 +2464,92 @@ class Do extends A {
|
|
|
2308
2464
|
// Narrow neck
|
|
2309
2465
|
new b(0.6, 3.5)
|
|
2310
2466
|
// Mouth of the flask
|
|
2311
|
-
], o = new
|
|
2467
|
+
], o = new Y(t, 12), n = new S(0.6, 0.7, 0.3, 8), r = new M({
|
|
2312
2468
|
color: 8965290,
|
|
2313
2469
|
transparent: !0,
|
|
2314
2470
|
opacity: 0.4,
|
|
2315
2471
|
roughness: 0.1,
|
|
2316
|
-
metalness: 0.5
|
|
2317
|
-
|
|
2472
|
+
metalness: 0.5,
|
|
2473
|
+
depthWrite: !1
|
|
2474
|
+
}), a = new M({
|
|
2318
2475
|
color: 9127187,
|
|
2319
2476
|
roughness: 1
|
|
2320
|
-
}), s = new
|
|
2321
|
-
|
|
2477
|
+
}), s = new y(o, r), i = new y(n, a);
|
|
2478
|
+
i.position.y = 3.5, this.add(s, i);
|
|
2322
2479
|
}
|
|
2323
2480
|
}
|
|
2324
|
-
class
|
|
2481
|
+
class $o extends P {
|
|
2325
2482
|
constructor() {
|
|
2326
2483
|
super();
|
|
2327
|
-
const
|
|
2484
|
+
const t = new A(2, 3, 0.1), o = new M({
|
|
2328
2485
|
color: 3355443,
|
|
2329
2486
|
roughness: 0.8,
|
|
2330
2487
|
metalness: 0.5
|
|
2331
|
-
}), n = new
|
|
2488
|
+
}), n = new y(t, o), r = new S(0.1, 0.1, 0.2, 8), a = new S(0.05, 0.05, 1, 8), s = new M({
|
|
2332
2489
|
color: 11184810,
|
|
2333
2490
|
roughness: 0.5,
|
|
2334
2491
|
metalness: 0.7
|
|
2335
2492
|
});
|
|
2336
|
-
for (let
|
|
2337
|
-
const
|
|
2338
|
-
|
|
2339
|
-
const l = new
|
|
2340
|
-
l.position.y = 0.5,
|
|
2493
|
+
for (let i = -0.5; i <= 0.5; i += 0.5) {
|
|
2494
|
+
const c = new y(r, s);
|
|
2495
|
+
c.position.set(i, 1, 0.1);
|
|
2496
|
+
const l = new y(a, s);
|
|
2497
|
+
l.position.y = 0.5, c.add(l), this.add(c);
|
|
2341
2498
|
}
|
|
2342
2499
|
this.add(n);
|
|
2343
2500
|
}
|
|
2344
2501
|
}
|
|
2345
|
-
class
|
|
2502
|
+
class Jo extends P {
|
|
2346
2503
|
constructor() {
|
|
2347
2504
|
super();
|
|
2348
|
-
const
|
|
2505
|
+
const t = new A(1, 0.2, 0.5), o = new M({
|
|
2349
2506
|
color: 4473924,
|
|
2350
2507
|
roughness: 0.6,
|
|
2351
2508
|
metalness: 0.3
|
|
2352
|
-
}), n = new
|
|
2509
|
+
}), n = new y(t, o);
|
|
2353
2510
|
n.position.y = 0.1;
|
|
2354
|
-
const
|
|
2355
|
-
|
|
2356
|
-
const s = new
|
|
2511
|
+
const r = new A(0.2, 1, 0.2), a = new y(r, o);
|
|
2512
|
+
a.position.set(0, 0.6, -0.2);
|
|
2513
|
+
const s = new S(0.1, 0.1, 0.4, 8), i = new M({
|
|
2357
2514
|
color: 3355443,
|
|
2358
2515
|
roughness: 0.5,
|
|
2359
2516
|
metalness: 0.6
|
|
2360
|
-
}),
|
|
2361
|
-
|
|
2362
|
-
const l = new
|
|
2517
|
+
}), c = new y(s, i);
|
|
2518
|
+
c.position.set(0, 1.1, -0.35), c.rotation.x = -Math.PI / 4;
|
|
2519
|
+
const l = new A(0.6, 0.1, 0.6), u = new M({
|
|
2363
2520
|
color: 5592405,
|
|
2364
2521
|
roughness: 0.8,
|
|
2365
2522
|
metalness: 0.2
|
|
2366
|
-
}), m = new
|
|
2367
|
-
m.position.set(0, 0.6, 0), this.add(n,
|
|
2523
|
+
}), m = new y(l, u);
|
|
2524
|
+
m.position.set(0, 0.6, 0), this.add(n, a, c, m);
|
|
2368
2525
|
}
|
|
2369
2526
|
}
|
|
2370
|
-
class
|
|
2527
|
+
class Wo extends P {
|
|
2371
2528
|
constructor() {
|
|
2372
2529
|
super();
|
|
2373
|
-
const
|
|
2530
|
+
const t = new Ue(), o = new S(0.2, 0.3, 1.5, 8);
|
|
2374
2531
|
o.translate(0, 0.75, 0);
|
|
2375
|
-
const n = new
|
|
2532
|
+
const n = new M({
|
|
2376
2533
|
color: 6045747,
|
|
2377
2534
|
// Dark earthy tone
|
|
2378
2535
|
roughness: 1,
|
|
2379
2536
|
metalness: 0,
|
|
2380
|
-
side:
|
|
2537
|
+
side: L
|
|
2381
2538
|
// Render inside and outside
|
|
2382
|
-
}),
|
|
2539
|
+
}), r = new M({
|
|
2383
2540
|
color: 9132587,
|
|
2384
2541
|
// Slightly lighter earthy color
|
|
2385
2542
|
roughness: 0.8,
|
|
2386
2543
|
metalness: 0.1
|
|
2387
|
-
}),
|
|
2388
|
-
s.position.set(0.3, 1.3, 0), s.rotation.z = Math.PI / 4, this.add(
|
|
2544
|
+
}), a = new y(t, n), s = new y(o, r);
|
|
2545
|
+
s.position.set(0.3, 1.3, 0), s.rotation.z = Math.PI / 4, this.add(a, s);
|
|
2389
2546
|
}
|
|
2390
2547
|
}
|
|
2391
|
-
class
|
|
2548
|
+
class tn extends P {
|
|
2392
2549
|
constructor() {
|
|
2393
2550
|
super();
|
|
2394
|
-
const
|
|
2395
|
-
Array.from({ length:
|
|
2551
|
+
const t = 100, o = 0.05, n = new St(
|
|
2552
|
+
Array.from({ length: t }, (l, u) => {
|
|
2396
2553
|
const m = u * 0.2;
|
|
2397
2554
|
return new g(
|
|
2398
2555
|
Math.cos(m) * 0.4,
|
|
@@ -2401,64 +2558,64 @@ class Zo extends A {
|
|
|
2401
2558
|
Math.sin(m) * 0.4
|
|
2402
2559
|
);
|
|
2403
2560
|
})
|
|
2404
|
-
),
|
|
2561
|
+
), r = new Et(n, 200, 0.1, 8, !1), a = new M({
|
|
2405
2562
|
color: 8965375,
|
|
2406
2563
|
transparent: !0,
|
|
2407
2564
|
opacity: 0.3,
|
|
2408
2565
|
roughness: 0.1,
|
|
2409
2566
|
metalness: 0.2,
|
|
2410
2567
|
emissive: 8965375
|
|
2411
|
-
}), s = new
|
|
2568
|
+
}), s = new y(r, a);
|
|
2412
2569
|
this.add(s);
|
|
2413
|
-
function c() {
|
|
2414
|
-
r.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
|
|
2415
|
-
}
|
|
2416
2570
|
function i() {
|
|
2417
|
-
|
|
2571
|
+
a.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
|
|
2572
|
+
}
|
|
2573
|
+
function c() {
|
|
2574
|
+
requestAnimationFrame(c), i();
|
|
2418
2575
|
}
|
|
2419
|
-
|
|
2576
|
+
c();
|
|
2420
2577
|
}
|
|
2421
2578
|
}
|
|
2422
|
-
class
|
|
2579
|
+
class en extends y {
|
|
2423
2580
|
constructor({
|
|
2424
|
-
radius:
|
|
2581
|
+
radius: t = 0.3,
|
|
2425
2582
|
//
|
|
2426
2583
|
height: o = 0.4,
|
|
2427
2584
|
count: n = 3,
|
|
2428
|
-
thickness:
|
|
2429
|
-
radialSegments:
|
|
2585
|
+
thickness: r = 0.03,
|
|
2586
|
+
radialSegments: a = 16
|
|
2430
2587
|
} = {}) {
|
|
2431
|
-
super(), this.geometry = new
|
|
2588
|
+
super(), this.geometry = new ze({ radius: t, height: o, count: n, thickness: r, radialSegments: a }), this.material = new M({
|
|
2432
2589
|
color: 8947848,
|
|
2433
2590
|
roughness: 0.7,
|
|
2434
2591
|
metalness: 0.3
|
|
2435
2592
|
});
|
|
2436
2593
|
}
|
|
2437
2594
|
}
|
|
2438
|
-
class
|
|
2595
|
+
class on extends P {
|
|
2439
2596
|
constructor() {
|
|
2440
2597
|
super();
|
|
2441
|
-
const
|
|
2598
|
+
const t = new S(0.5, 0.6, 0.3, 16), o = new M({
|
|
2442
2599
|
color: 3355443,
|
|
2443
2600
|
roughness: 0.6,
|
|
2444
2601
|
metalness: 0.5
|
|
2445
|
-
}), n = new
|
|
2602
|
+
}), n = new y(t, o);
|
|
2446
2603
|
n.position.y = 0.15;
|
|
2447
|
-
const
|
|
2604
|
+
const r = new S(0.15, 0.15, 2, 12, 1, !0), a = new M({
|
|
2448
2605
|
color: 16737792,
|
|
2449
2606
|
roughness: 0.5,
|
|
2450
2607
|
metalness: 0.8,
|
|
2451
|
-
side:
|
|
2452
|
-
}), s = new
|
|
2608
|
+
side: L
|
|
2609
|
+
}), s = new y(r, a);
|
|
2453
2610
|
s.position.y = 1.3;
|
|
2454
|
-
const
|
|
2455
|
-
|
|
2611
|
+
const i = new N(0.3, 16, 16), c = new y(i, a);
|
|
2612
|
+
c.position.y = 2.4, this.add(n, s, c);
|
|
2456
2613
|
}
|
|
2457
2614
|
}
|
|
2458
|
-
class
|
|
2459
|
-
constructor(
|
|
2615
|
+
class nn extends P {
|
|
2616
|
+
constructor(t = 0.2, o = 0.2, n = 3, r = 32) {
|
|
2460
2617
|
super();
|
|
2461
|
-
const
|
|
2618
|
+
const a = new st(t, o, n, r), s = new W({
|
|
2462
2619
|
color: 8965375,
|
|
2463
2620
|
transparent: !0,
|
|
2464
2621
|
opacity: 0.4,
|
|
@@ -2467,48 +2624,50 @@ class jo extends A {
|
|
|
2467
2624
|
reflectivity: 0.8,
|
|
2468
2625
|
transmission: 0.9,
|
|
2469
2626
|
// For glass effect
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2627
|
+
depthWrite: !1,
|
|
2628
|
+
side: L
|
|
2629
|
+
}), i = new y(a, s);
|
|
2630
|
+
this.add(i);
|
|
2473
2631
|
}
|
|
2474
2632
|
}
|
|
2475
|
-
class
|
|
2476
|
-
constructor(
|
|
2633
|
+
class sn extends P {
|
|
2634
|
+
constructor(t = 3, o = [65450, 16711850, 11141375]) {
|
|
2477
2635
|
super();
|
|
2478
|
-
const n = new
|
|
2636
|
+
const n = new A(3, 0.2, 1), r = new M({
|
|
2479
2637
|
color: 9127187,
|
|
2480
2638
|
// Wooden color or change to metallic tone
|
|
2481
2639
|
roughness: 0.7,
|
|
2482
2640
|
metalness: 0.3
|
|
2483
|
-
}),
|
|
2484
|
-
|
|
2485
|
-
const s = new
|
|
2641
|
+
}), a = new y(n, r);
|
|
2642
|
+
a.position.y = 0.5;
|
|
2643
|
+
const s = new st(0.1, 0.1, 1, 16), i = new M({
|
|
2486
2644
|
color: 11184810,
|
|
2487
2645
|
transparent: !0,
|
|
2488
2646
|
opacity: 0.4,
|
|
2489
2647
|
roughness: 0.1,
|
|
2490
2648
|
metalness: 0.5,
|
|
2491
|
-
|
|
2649
|
+
depthWrite: !1,
|
|
2650
|
+
side: L
|
|
2492
2651
|
});
|
|
2493
|
-
for (let
|
|
2494
|
-
const l = new
|
|
2652
|
+
for (let c = 0; c < t; c++) {
|
|
2653
|
+
const l = new y(s, i), u = (c - (t - 1) / 2) * 0.8;
|
|
2495
2654
|
l.position.set(u, 1, 0);
|
|
2496
|
-
const m = new
|
|
2655
|
+
const m = new st(0.099, 0.099, 0.5, 16, !1), h = o[c % o.length], f = new M({
|
|
2497
2656
|
color: h,
|
|
2498
2657
|
emissive: h,
|
|
2499
2658
|
emissiveIntensity: 0.5,
|
|
2500
2659
|
transparent: !0,
|
|
2501
2660
|
opacity: 0.6
|
|
2502
|
-
}), p = new
|
|
2503
|
-
p.position.set(0, -0.25, 0), l.add(p),
|
|
2661
|
+
}), p = new y(m, f);
|
|
2662
|
+
p.position.set(0, -0.25, 0), l.add(p), a.add(l);
|
|
2504
2663
|
}
|
|
2505
|
-
this.add(
|
|
2664
|
+
this.add(a);
|
|
2506
2665
|
}
|
|
2507
2666
|
}
|
|
2508
|
-
class
|
|
2667
|
+
class rn extends y {
|
|
2509
2668
|
constructor() {
|
|
2510
2669
|
super();
|
|
2511
|
-
const
|
|
2670
|
+
const t = new ke(), o = new W({
|
|
2512
2671
|
color: 5597999,
|
|
2513
2672
|
roughness: 0.1,
|
|
2514
2673
|
transmission: 0.9,
|
|
@@ -2518,30 +2677,30 @@ class Ko extends d {
|
|
|
2518
2677
|
clearcoat: 1,
|
|
2519
2678
|
clearcoatRoughness: 0.1
|
|
2520
2679
|
});
|
|
2521
|
-
this.geometry =
|
|
2680
|
+
this.geometry = t, this.material = o;
|
|
2522
2681
|
}
|
|
2523
2682
|
}
|
|
2524
|
-
class
|
|
2525
|
-
constructor(
|
|
2683
|
+
class Re extends H {
|
|
2684
|
+
constructor(t = 5, o = 0.5, n = 1) {
|
|
2526
2685
|
super();
|
|
2527
|
-
const
|
|
2686
|
+
const r = Math.PI * 2 / t, a = r / 2, s = r / 4;
|
|
2528
2687
|
this.moveTo(Math.cos(0) * n, -Math.sin(0) * n);
|
|
2529
|
-
for (let
|
|
2530
|
-
let
|
|
2531
|
-
this.quadraticCurveTo(
|
|
2688
|
+
for (let i = 1; i <= t; ++i) {
|
|
2689
|
+
let c = Math.cos(r * i - s * 3) * (o / Math.cos(s)), l = -Math.sin(r * i - s * 3) * (o / Math.cos(s)), u = Math.cos(r * i - a) * o, m = -Math.sin(r * i - a) * o;
|
|
2690
|
+
this.quadraticCurveTo(c, l, u, m), c = Math.cos(r * i - s) * (o / Math.cos(s)), l = -Math.sin(r * i - s) * (o / Math.cos(s)), u = Math.cos(r * i) * n, m = -Math.sin(r * i) * n, this.quadraticCurveTo(c, l, u, m);
|
|
2532
2691
|
}
|
|
2533
2692
|
this.closePath();
|
|
2534
2693
|
}
|
|
2535
2694
|
}
|
|
2536
|
-
class
|
|
2537
|
-
constructor(
|
|
2695
|
+
class an extends y {
|
|
2696
|
+
constructor(t = 5, o = 0.5, n = 1, r = 0.25) {
|
|
2538
2697
|
super();
|
|
2539
|
-
const
|
|
2540
|
-
depth:
|
|
2541
|
-
bevelEnabled:
|
|
2698
|
+
const a = new Re(t, o, n), s = new Q(a, {
|
|
2699
|
+
depth: r,
|
|
2700
|
+
bevelEnabled: r > 0,
|
|
2542
2701
|
bevelThickness: 0,
|
|
2543
2702
|
bevelSize: 0
|
|
2544
|
-
}),
|
|
2703
|
+
}), i = new M({
|
|
2545
2704
|
color: 16776960,
|
|
2546
2705
|
emissive: 16766720,
|
|
2547
2706
|
emissiveIntensity: 0.25,
|
|
@@ -2549,75 +2708,75 @@ class $o extends d {
|
|
|
2549
2708
|
roughness: 0.3,
|
|
2550
2709
|
flatShading: !0
|
|
2551
2710
|
});
|
|
2552
|
-
s.center(), this.geometry = s, this.material =
|
|
2711
|
+
s.center(), this.geometry = s, this.material = i;
|
|
2553
2712
|
}
|
|
2554
2713
|
}
|
|
2555
|
-
class
|
|
2556
|
-
constructor(
|
|
2714
|
+
class Le extends H {
|
|
2715
|
+
constructor(t = 5, o = 0.5, n = 1, r = 5, a = 0.25) {
|
|
2557
2716
|
super();
|
|
2558
|
-
const s = Math.PI * 2 /
|
|
2717
|
+
const s = Math.PI * 2 / t, i = s / 4;
|
|
2559
2718
|
this.moveTo(Math.cos(0) * n, -Math.sin(0) * n);
|
|
2560
|
-
for (let
|
|
2561
|
-
this.lineTo(Math.cos(s *
|
|
2562
|
-
if (this.closePath(),
|
|
2563
|
-
const
|
|
2564
|
-
|
|
2565
|
-
for (let u = 1; u <
|
|
2566
|
-
|
|
2567
|
-
|
|
2719
|
+
for (let c = 1; c <= t; ++c)
|
|
2720
|
+
this.lineTo(Math.cos(s * c - i * 3) * o, -Math.sin(s * c - i * 3) * o), this.lineTo(Math.cos(s * c - i * 2) * o, -Math.sin(s * c - i * 2) * o), this.lineTo(Math.cos(s * c - i) * n, -Math.sin(s * c - i) * n), this.lineTo(Math.cos(s * c) * n, -Math.sin(s * c) * n);
|
|
2721
|
+
if (this.closePath(), a > 0 && r > 2) {
|
|
2722
|
+
const c = new Pt(), l = Math.PI * 2 / r;
|
|
2723
|
+
c.moveTo(Math.cos(0) * a, -Math.sin(0) * a);
|
|
2724
|
+
for (let u = 1; u < r; ++u)
|
|
2725
|
+
c.lineTo(Math.cos(l * u) * a, -Math.sin(l * u) * a);
|
|
2726
|
+
c.lineTo(Math.cos(0) * a, -Math.sin(0) * a), this.holes.push(c);
|
|
2568
2727
|
}
|
|
2569
2728
|
}
|
|
2570
2729
|
}
|
|
2571
|
-
class
|
|
2572
|
-
constructor(
|
|
2730
|
+
class cn extends y {
|
|
2731
|
+
constructor(t = 5, o = 0.5, n = 1, r = 5, a = 0.25, s = 0.25) {
|
|
2573
2732
|
super();
|
|
2574
|
-
const
|
|
2733
|
+
const i = new Le(t, o, n, r, a), c = new Q(i, {
|
|
2575
2734
|
depth: s,
|
|
2576
2735
|
bevelEnabled: s > 0,
|
|
2577
2736
|
bevelThickness: 0,
|
|
2578
2737
|
bevelSize: 0
|
|
2579
|
-
}), l = new
|
|
2738
|
+
}), l = new M({
|
|
2580
2739
|
color: 11184810,
|
|
2581
2740
|
metalness: 0.8,
|
|
2582
2741
|
roughness: 0.2
|
|
2583
2742
|
});
|
|
2584
|
-
|
|
2743
|
+
c.center(), this.geometry = c, this.material = l;
|
|
2585
2744
|
}
|
|
2586
2745
|
}
|
|
2587
|
-
class
|
|
2588
|
-
constructor(
|
|
2589
|
-
super(), this.moveTo(0, n *
|
|
2590
|
-
-o * 0.375 *
|
|
2591
|
-
n *
|
|
2746
|
+
class qe extends H {
|
|
2747
|
+
constructor(t = 1, o = 2.1, n = 1.4, r = 1.6) {
|
|
2748
|
+
super(), this.moveTo(0, n * t / 3), this.bezierCurveTo(
|
|
2749
|
+
-o * 0.375 * t,
|
|
2750
|
+
n * t,
|
|
2592
2751
|
// Control point 1 for the left lobe
|
|
2593
|
-
-o *
|
|
2594
|
-
n *
|
|
2752
|
+
-o * t,
|
|
2753
|
+
n * t / 3,
|
|
2595
2754
|
// Control point 2 for the left side of the heart
|
|
2596
2755
|
0,
|
|
2597
|
-
-
|
|
2756
|
+
-r * t
|
|
2598
2757
|
// Bottom tip of the heart, controlled by `tipDepth`
|
|
2599
2758
|
), this.bezierCurveTo(
|
|
2600
|
-
o *
|
|
2601
|
-
n *
|
|
2759
|
+
o * t,
|
|
2760
|
+
n * t / 3,
|
|
2602
2761
|
// Control point 3 for the right side of the heart
|
|
2603
|
-
o * 0.375 *
|
|
2604
|
-
n *
|
|
2762
|
+
o * 0.375 * t,
|
|
2763
|
+
n * t,
|
|
2605
2764
|
// Control point 4 for the right lobe
|
|
2606
2765
|
0,
|
|
2607
|
-
n *
|
|
2766
|
+
n * t / 3
|
|
2608
2767
|
// Close shape at the top middle
|
|
2609
2768
|
);
|
|
2610
2769
|
}
|
|
2611
2770
|
}
|
|
2612
|
-
class
|
|
2613
|
-
constructor(
|
|
2771
|
+
class ln extends y {
|
|
2772
|
+
constructor(t = 1, o = 1, n = 1, r = 10, a = 0.25) {
|
|
2614
2773
|
super();
|
|
2615
|
-
const s = new
|
|
2616
|
-
depth:
|
|
2617
|
-
bevelEnabled:
|
|
2774
|
+
const s = new qe(t, o, n, r), i = new Q(s, {
|
|
2775
|
+
depth: a,
|
|
2776
|
+
bevelEnabled: a > 0,
|
|
2618
2777
|
bevelThickness: 0,
|
|
2619
2778
|
bevelSize: 0
|
|
2620
|
-
}),
|
|
2779
|
+
}), c = new M({
|
|
2621
2780
|
color: 12986408,
|
|
2622
2781
|
emissive: 12981270,
|
|
2623
2782
|
emissiveIntensity: 0.25,
|
|
@@ -2625,28 +2784,28 @@ class Wo extends d {
|
|
|
2625
2784
|
roughness: 0.3,
|
|
2626
2785
|
flatShading: !0
|
|
2627
2786
|
});
|
|
2628
|
-
|
|
2787
|
+
i.center(), this.geometry = i, this.material = c;
|
|
2629
2788
|
}
|
|
2630
2789
|
}
|
|
2631
|
-
class
|
|
2632
|
-
constructor(
|
|
2790
|
+
class De extends H {
|
|
2791
|
+
constructor(t = 5, o = 0.5, n = 1) {
|
|
2633
2792
|
super();
|
|
2634
|
-
const
|
|
2793
|
+
const r = Math.PI * 2 / t, a = r / 2;
|
|
2635
2794
|
this.moveTo(Math.cos(0) * n, Math.sin(0) * n);
|
|
2636
|
-
for (let s = 1; s <=
|
|
2637
|
-
this.lineTo(Math.cos(
|
|
2795
|
+
for (let s = 1; s <= t; ++s)
|
|
2796
|
+
this.lineTo(Math.cos(r * s - a) * o, Math.sin(r * s - a) * o), this.lineTo(Math.cos(r * s) * n, Math.sin(r * s) * n);
|
|
2638
2797
|
this.closePath();
|
|
2639
2798
|
}
|
|
2640
2799
|
}
|
|
2641
|
-
class
|
|
2642
|
-
constructor(
|
|
2800
|
+
class un extends y {
|
|
2801
|
+
constructor(t = 5, o = 0.5, n = 1, r = 0.25) {
|
|
2643
2802
|
super();
|
|
2644
|
-
const
|
|
2645
|
-
depth:
|
|
2646
|
-
bevelEnabled:
|
|
2803
|
+
const a = new De(t, o, n), s = new Q(a, {
|
|
2804
|
+
depth: r,
|
|
2805
|
+
bevelEnabled: r > 0,
|
|
2647
2806
|
bevelThickness: 0,
|
|
2648
2807
|
bevelSize: 0
|
|
2649
|
-
}),
|
|
2808
|
+
}), i = new M({
|
|
2650
2809
|
color: 16776960,
|
|
2651
2810
|
emissive: 16766720,
|
|
2652
2811
|
emissiveIntensity: 0.25,
|
|
@@ -2654,43 +2813,43 @@ class en extends d {
|
|
|
2654
2813
|
roughness: 0.3,
|
|
2655
2814
|
flatShading: !0
|
|
2656
2815
|
});
|
|
2657
|
-
s.center(), this.geometry = s, this.material =
|
|
2816
|
+
s.center(), this.geometry = s, this.material = i;
|
|
2658
2817
|
}
|
|
2659
2818
|
}
|
|
2660
|
-
class
|
|
2819
|
+
class mn extends y {
|
|
2661
2820
|
constructor() {
|
|
2662
|
-
super(), this.geometry = new
|
|
2821
|
+
super(), this.geometry = new Ge(), this.material = new M({ color: 16777215 });
|
|
2663
2822
|
}
|
|
2664
2823
|
}
|
|
2665
|
-
class
|
|
2824
|
+
class hn extends y {
|
|
2666
2825
|
constructor({
|
|
2667
|
-
trunkRadiusTop:
|
|
2826
|
+
trunkRadiusTop: t = 0.25,
|
|
2668
2827
|
trunkRadiusBottom: o = 0.4,
|
|
2669
2828
|
trunkHeight: n = 2.5,
|
|
2670
|
-
trunkSegments:
|
|
2671
|
-
trunkColor:
|
|
2829
|
+
trunkSegments: r = 14,
|
|
2830
|
+
trunkColor: a = 9127187,
|
|
2672
2831
|
leafSize: s = 0.8,
|
|
2673
|
-
leafCount:
|
|
2674
|
-
leafDetail:
|
|
2832
|
+
leafCount: i = 6,
|
|
2833
|
+
leafDetail: c = 0,
|
|
2675
2834
|
leafSpreadRadius: l = 1.5,
|
|
2676
2835
|
leafColor: u = 2263842
|
|
2677
2836
|
} = {}) {
|
|
2678
2837
|
super();
|
|
2679
|
-
const m = new
|
|
2680
|
-
trunkRadiusTop:
|
|
2838
|
+
const m = new Fe({
|
|
2839
|
+
trunkRadiusTop: t,
|
|
2681
2840
|
trunkRadiusBottom: o,
|
|
2682
2841
|
trunkHeight: n,
|
|
2683
|
-
trunkSegments:
|
|
2842
|
+
trunkSegments: r,
|
|
2684
2843
|
leafSize: s,
|
|
2685
|
-
leafCount:
|
|
2686
|
-
leafDetail:
|
|
2844
|
+
leafCount: i,
|
|
2845
|
+
leafDetail: c,
|
|
2687
2846
|
leafSpreadRadius: l
|
|
2688
|
-
}), h = new
|
|
2689
|
-
color:
|
|
2847
|
+
}), h = new M({
|
|
2848
|
+
color: a,
|
|
2690
2849
|
roughness: 0.9,
|
|
2691
2850
|
metalness: 0,
|
|
2692
2851
|
flatShading: !0
|
|
2693
|
-
}), f = new
|
|
2852
|
+
}), f = new M({
|
|
2694
2853
|
color: u,
|
|
2695
2854
|
roughness: 0.8,
|
|
2696
2855
|
metalness: 0,
|
|
@@ -2699,49 +2858,49 @@ class on extends d {
|
|
|
2699
2858
|
this.geometry = m, this.material = [h, f];
|
|
2700
2859
|
}
|
|
2701
2860
|
}
|
|
2702
|
-
class
|
|
2861
|
+
class fn extends y {
|
|
2703
2862
|
constructor({
|
|
2704
|
-
radius:
|
|
2863
|
+
radius: t = 3,
|
|
2705
2864
|
//
|
|
2706
2865
|
height: o = 0.6,
|
|
2707
2866
|
widthSegments: n = 64,
|
|
2708
|
-
heightSegments:
|
|
2709
|
-
phiStart:
|
|
2867
|
+
heightSegments: r = 16,
|
|
2868
|
+
phiStart: a = 0,
|
|
2710
2869
|
phiLength: s = Math.PI * 2
|
|
2711
2870
|
} = {}) {
|
|
2712
|
-
super(), this.geometry = new
|
|
2713
|
-
radius:
|
|
2871
|
+
super(), this.geometry = new Ne({
|
|
2872
|
+
radius: t,
|
|
2714
2873
|
height: o,
|
|
2715
2874
|
widthSegments: n,
|
|
2716
|
-
heightSegments:
|
|
2717
|
-
phiStart:
|
|
2875
|
+
heightSegments: r,
|
|
2876
|
+
phiStart: a,
|
|
2718
2877
|
phiLength: s
|
|
2719
|
-
}), this.material = new
|
|
2878
|
+
}), this.material = new M({ color: 65280, flatShading: !0 });
|
|
2720
2879
|
}
|
|
2721
2880
|
}
|
|
2722
|
-
class
|
|
2881
|
+
class pn extends y {
|
|
2723
2882
|
constructor({
|
|
2724
|
-
radius:
|
|
2883
|
+
radius: t = wt(5, Math.PI / 10),
|
|
2725
2884
|
//
|
|
2726
2885
|
widthSegments: o = 64,
|
|
2727
2886
|
heightSegments: n = 32,
|
|
2728
|
-
phiStart:
|
|
2729
|
-
phiLength:
|
|
2887
|
+
phiStart: r = 0,
|
|
2888
|
+
phiLength: a = Math.PI * 2,
|
|
2730
2889
|
thetaLength: s = Math.PI / 10
|
|
2731
2890
|
} = {}) {
|
|
2732
|
-
super(), this.geometry = new
|
|
2733
|
-
radius:
|
|
2891
|
+
super(), this.geometry = new _e({
|
|
2892
|
+
radius: t,
|
|
2734
2893
|
widthSegments: o,
|
|
2735
2894
|
heightSegments: n,
|
|
2736
|
-
phiStart:
|
|
2737
|
-
phiLength:
|
|
2895
|
+
phiStart: r,
|
|
2896
|
+
phiLength: a,
|
|
2738
2897
|
thetaLength: s
|
|
2739
|
-
}), this.material = new
|
|
2898
|
+
}), this.material = new M({ color: 65280, flatShading: !0 });
|
|
2740
2899
|
}
|
|
2741
2900
|
}
|
|
2742
|
-
function
|
|
2743
|
-
|
|
2744
|
-
|
|
2901
|
+
function dn(e, { time: t = 0, waveFrequency: o = 0.2, waveAmplitude: n = 0.5 } = {}) {
|
|
2902
|
+
e.onBeforeCompile = (r) => {
|
|
2903
|
+
r.uniforms.time = { value: t }, r.uniforms.waveFrequency = { value: o }, r.uniforms.waveAmplitude = { value: n }, r.vertexShader = `
|
|
2745
2904
|
uniform float time;
|
|
2746
2905
|
uniform float waveFrequency;
|
|
2747
2906
|
uniform float waveAmplitude;
|
|
@@ -2755,20 +2914,20 @@ function rn(t, { time: e = 0, waveFrequency: o = 0.2, waveAmplitude: n = 0.5 } =
|
|
|
2755
2914
|
|
|
2756
2915
|
return displaced;
|
|
2757
2916
|
}
|
|
2758
|
-
` +
|
|
2917
|
+
` + r.vertexShader, r.vertexShader = r.vertexShader.replace(
|
|
2759
2918
|
"#include <begin_vertex>",
|
|
2760
2919
|
`
|
|
2761
2920
|
vec3 transformed = waterDisplacement(position, normal);
|
|
2762
2921
|
`
|
|
2763
|
-
),
|
|
2922
|
+
), e.userData.shader = r;
|
|
2764
2923
|
};
|
|
2765
2924
|
}
|
|
2766
|
-
function
|
|
2767
|
-
|
|
2925
|
+
function yn(e, t) {
|
|
2926
|
+
e.userData.shader && (e.userData.shader.uniforms.time.value += t);
|
|
2768
2927
|
}
|
|
2769
|
-
function
|
|
2770
|
-
|
|
2771
|
-
|
|
2928
|
+
function wn(e, { time: t = 0, intensity: o = 1, direction: n = q.XYZ, scale: r = 10 } = {}) {
|
|
2929
|
+
e.onBeforeCompile = (a) => {
|
|
2930
|
+
a.uniforms.time = { value: t }, a.uniforms.direction = { value: n }, a.uniforms.intensity = { value: o }, a.uniforms.scale = { value: r }, a.vertexShader = `
|
|
2772
2931
|
uniform float time;
|
|
2773
2932
|
uniform vec3 direction;
|
|
2774
2933
|
uniform float intensity;
|
|
@@ -2799,7 +2958,7 @@ function cn(t, { time: e = 0, intensity: o = 1, direction: n = L.XYZ, scale: a =
|
|
|
2799
2958
|
|
|
2800
2959
|
return o4.y * d.y + o4.x * (1.0 - d.y);
|
|
2801
2960
|
}
|
|
2802
|
-
` +
|
|
2961
|
+
` + a.vertexShader, a.vertexShader = a.vertexShader.replace(
|
|
2803
2962
|
"#include <begin_vertex>",
|
|
2804
2963
|
`
|
|
2805
2964
|
vec3 transformed = vec3(position);
|
|
@@ -2807,19 +2966,19 @@ function cn(t, { time: e = 0, intensity: o = 1, direction: n = L.XYZ, scale: a =
|
|
|
2807
2966
|
transformed += normalize(direction) * n * intensity;
|
|
2808
2967
|
vec3 transformedNormal = normal;
|
|
2809
2968
|
`
|
|
2810
|
-
),
|
|
2969
|
+
), e.userData.shader = a;
|
|
2811
2970
|
};
|
|
2812
2971
|
}
|
|
2813
|
-
function
|
|
2814
|
-
|
|
2972
|
+
function Mn(e, t) {
|
|
2973
|
+
e.userData.shader && (e.userData.shader.uniforms.time.value += t);
|
|
2815
2974
|
}
|
|
2816
|
-
const
|
|
2975
|
+
const et = {
|
|
2817
2976
|
uniforms: {
|
|
2818
2977
|
turbidity: { value: 10 },
|
|
2819
2978
|
rayleigh: { value: 2 },
|
|
2820
2979
|
mieCoefficient: { value: 5e-3 },
|
|
2821
2980
|
mieDirectionalG: { value: 0.8 },
|
|
2822
|
-
sunPosition: { value: new g().setFromSphericalCoords(1,
|
|
2981
|
+
sunPosition: { value: new g().setFromSphericalCoords(1, _.degToRad(90), _.degToRad(180)) },
|
|
2823
2982
|
up: { value: new g(0, 1, 0) }
|
|
2824
2983
|
},
|
|
2825
2984
|
vertexShader: `
|
|
@@ -2975,10 +3134,10 @@ const ee = {
|
|
|
2975
3134
|
#include <colorspace_fragment>
|
|
2976
3135
|
}
|
|
2977
3136
|
`
|
|
2978
|
-
},
|
|
3137
|
+
}, ot = {
|
|
2979
3138
|
uniforms: {
|
|
2980
|
-
topColor: { value: new
|
|
2981
|
-
bottomColor: { value: new
|
|
3139
|
+
topColor: { value: new $(0.5, 0.8, 1) },
|
|
3140
|
+
bottomColor: { value: new $(1, 1, 1) }
|
|
2982
3141
|
},
|
|
2983
3142
|
vertexShader: `
|
|
2984
3143
|
varying vec3 vPosition;
|
|
@@ -2996,7 +3155,7 @@ const ee = {
|
|
|
2996
3155
|
gl_FragColor = vec4(mix(bottomColor, topColor, y), 1.0);
|
|
2997
3156
|
}
|
|
2998
3157
|
`
|
|
2999
|
-
},
|
|
3158
|
+
}, vn = {
|
|
3000
3159
|
uniforms: {
|
|
3001
3160
|
tDiffuse: { value: null },
|
|
3002
3161
|
opacity: { value: 1 }
|
|
@@ -3017,10 +3176,10 @@ const ee = {
|
|
|
3017
3176
|
gl_FragColor = opacity * texel;
|
|
3018
3177
|
}
|
|
3019
3178
|
`
|
|
3020
|
-
},
|
|
3179
|
+
}, nt = {
|
|
3021
3180
|
uniforms: {
|
|
3022
|
-
topColor: { value: new
|
|
3023
|
-
bottomColor: { value: new
|
|
3181
|
+
topColor: { value: new $(51) },
|
|
3182
|
+
bottomColor: { value: new $(17) },
|
|
3024
3183
|
offset: { value: 33 },
|
|
3025
3184
|
exponent: { value: 0.6 }
|
|
3026
3185
|
},
|
|
@@ -3044,20 +3203,20 @@ const ee = {
|
|
|
3044
3203
|
}
|
|
3045
3204
|
`
|
|
3046
3205
|
};
|
|
3047
|
-
class
|
|
3206
|
+
class xn extends y {
|
|
3048
3207
|
constructor() {
|
|
3049
3208
|
super();
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
this.geometry = new
|
|
3053
|
-
uniforms:
|
|
3054
|
-
vertexShader:
|
|
3055
|
-
fragmentShader:
|
|
3209
|
+
E(this, "geometry");
|
|
3210
|
+
E(this, "material");
|
|
3211
|
+
this.geometry = new A(1, 1, 1), this.material = new J({
|
|
3212
|
+
uniforms: et.uniforms,
|
|
3213
|
+
vertexShader: et.vertexShader,
|
|
3214
|
+
fragmentShader: et.fragmentShader,
|
|
3056
3215
|
depthWrite: !1,
|
|
3057
|
-
side:
|
|
3216
|
+
side: it
|
|
3058
3217
|
}), this.scale.setScalar(45e4);
|
|
3059
|
-
const o =
|
|
3060
|
-
this.material.uniforms.sunPosition.value =
|
|
3218
|
+
const o = _.degToRad(89), n = _.degToRad(180), r = new g().setFromSphericalCoords(1, o, n);
|
|
3219
|
+
this.material.uniforms.sunPosition.value = r;
|
|
3061
3220
|
}
|
|
3062
3221
|
/**
|
|
3063
3222
|
* Set the sun position.
|
|
@@ -3073,301 +3232,309 @@ class mn extends d {
|
|
|
3073
3232
|
* - This is the horizontal angle in the xy-plane.
|
|
3074
3233
|
*/
|
|
3075
3234
|
sunPosition(o, n) {
|
|
3076
|
-
const
|
|
3077
|
-
|
|
3235
|
+
const r = new g();
|
|
3236
|
+
r.setFromSphericalCoords(1, o, n), this.material.uniforms.sunPosition.value = r;
|
|
3078
3237
|
}
|
|
3079
3238
|
}
|
|
3080
|
-
class
|
|
3239
|
+
class gn extends y {
|
|
3081
3240
|
constructor(o = 1e3) {
|
|
3082
3241
|
super();
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
this.geometry = new
|
|
3086
|
-
uniforms:
|
|
3087
|
-
vertexShader:
|
|
3088
|
-
fragmentShader:
|
|
3089
|
-
side:
|
|
3242
|
+
E(this, "geometry");
|
|
3243
|
+
E(this, "material");
|
|
3244
|
+
this.geometry = new A(o, o, o), this.material = new J({
|
|
3245
|
+
uniforms: ot.uniforms,
|
|
3246
|
+
vertexShader: ot.vertexShader,
|
|
3247
|
+
fragmentShader: ot.fragmentShader,
|
|
3248
|
+
side: it
|
|
3090
3249
|
});
|
|
3091
3250
|
}
|
|
3092
3251
|
}
|
|
3093
|
-
class
|
|
3252
|
+
class bn extends y {
|
|
3094
3253
|
constructor(o = 1e3) {
|
|
3095
3254
|
super();
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
this.geometry = new
|
|
3099
|
-
vertexShader:
|
|
3100
|
-
fragmentShader:
|
|
3101
|
-
uniforms:
|
|
3102
|
-
side:
|
|
3255
|
+
E(this, "geometry");
|
|
3256
|
+
E(this, "material");
|
|
3257
|
+
this.geometry = new N(o, 32, 15), this.material = new J({
|
|
3258
|
+
vertexShader: nt.vertexShader,
|
|
3259
|
+
fragmentShader: nt.fragmentShader,
|
|
3260
|
+
uniforms: nt.uniforms,
|
|
3261
|
+
side: it
|
|
3103
3262
|
});
|
|
3104
3263
|
}
|
|
3105
3264
|
}
|
|
3106
|
-
const
|
|
3107
|
-
const
|
|
3108
|
-
for (let n = 0; n <
|
|
3109
|
-
const
|
|
3110
|
-
|
|
3265
|
+
const An = (e) => {
|
|
3266
|
+
const t = new Uint8Array(4 * e * e);
|
|
3267
|
+
for (let n = 0; n < e * e; n++) {
|
|
3268
|
+
const r = n * 4, a = (n % e ^ Math.floor(n / e)) & 1 ? 255 : 0;
|
|
3269
|
+
t[r] = a, t[r + 1] = a, t[r + 2] = a, t[r + 3] = 255;
|
|
3111
3270
|
}
|
|
3112
|
-
const o = new
|
|
3113
|
-
return o.wrapS =
|
|
3271
|
+
const o = new Tt(t, e, e, Gt, Ct);
|
|
3272
|
+
return o.wrapS = lt, o.wrapT = lt, o.minFilter = Bt, o.needsUpdate = !0, o;
|
|
3114
3273
|
};
|
|
3115
|
-
function
|
|
3116
|
-
const
|
|
3117
|
-
|
|
3274
|
+
function In(e) {
|
|
3275
|
+
const t = new ct().setFromObject(e), o = new g();
|
|
3276
|
+
t.getCenter(o), e.position.sub(o);
|
|
3118
3277
|
}
|
|
3119
|
-
function
|
|
3120
|
-
const o = new
|
|
3278
|
+
function Sn(e, t = new g(0, 0, 0)) {
|
|
3279
|
+
const o = new ct().setFromObject(e), n = new g();
|
|
3121
3280
|
o.getCenter(n);
|
|
3122
|
-
const
|
|
3123
|
-
|
|
3281
|
+
const r = new g().subVectors(t, n);
|
|
3282
|
+
e.position.add(r);
|
|
3124
3283
|
}
|
|
3125
|
-
function
|
|
3126
|
-
|
|
3127
|
-
const
|
|
3128
|
-
if (
|
|
3129
|
-
const o =
|
|
3130
|
-
|
|
3284
|
+
function En(e) {
|
|
3285
|
+
e.computeBoundingBox();
|
|
3286
|
+
const t = e.boundingBox;
|
|
3287
|
+
if (t) {
|
|
3288
|
+
const o = t.getCenter(new g());
|
|
3289
|
+
e.translateX(-o.x), e.translateY(-o.y), e.translateZ(-o.z);
|
|
3131
3290
|
}
|
|
3132
3291
|
}
|
|
3133
|
-
function
|
|
3134
|
-
return Math.max(0, Math.min(1, (
|
|
3292
|
+
function Ve(e, t, o) {
|
|
3293
|
+
return Math.max(0, Math.min(1, (e - t) / (o - t)));
|
|
3135
3294
|
}
|
|
3136
|
-
function
|
|
3137
|
-
const
|
|
3138
|
-
for (let l = 0; l <=
|
|
3139
|
-
const u = l /
|
|
3140
|
-
|
|
3295
|
+
function Pn(e, t, o, n, r, a = 20, s = 0, i = 1) {
|
|
3296
|
+
const c = [];
|
|
3297
|
+
for (let l = 0; l <= a; l++) {
|
|
3298
|
+
const u = l / a, m = e(Ve(u, s, i)), h = t + m * (o - t), f = n + u * (r - n);
|
|
3299
|
+
c.push(new b(h, f));
|
|
3141
3300
|
}
|
|
3142
|
-
return
|
|
3301
|
+
return c;
|
|
3143
3302
|
}
|
|
3144
|
-
function
|
|
3145
|
-
const o = new
|
|
3146
|
-
|
|
3303
|
+
function Tn(e) {
|
|
3304
|
+
const o = new ct().setFromObject(e).getCenter(new g());
|
|
3305
|
+
e.translateX(-o.x), e.translateY(-o.y), e.translateZ(-o.z), e.updateMatrixWorld(!0);
|
|
3147
3306
|
}
|
|
3148
|
-
function
|
|
3149
|
-
|
|
3150
|
-
const
|
|
3151
|
-
if (
|
|
3152
|
-
const o =
|
|
3153
|
-
|
|
3307
|
+
function Gn(e) {
|
|
3308
|
+
e.geometry.computeBoundingBox();
|
|
3309
|
+
const t = e.geometry.boundingBox;
|
|
3310
|
+
if (t) {
|
|
3311
|
+
const o = t.getCenter(new g());
|
|
3312
|
+
e.geometry.translate(-o.x, -o.y, -o.z);
|
|
3154
3313
|
}
|
|
3155
3314
|
}
|
|
3156
|
-
const
|
|
3157
|
-
let r = [];
|
|
3158
|
-
for (let s = 0; s <= a; s++) {
|
|
3159
|
-
const c = s / a, i = k.CUBIC(c, t.x, e.x, o.x, n.x), l = k.CUBIC(c, t.y, e.y, o.y, n.y);
|
|
3160
|
-
r.push(new b(i, l));
|
|
3161
|
-
}
|
|
3162
|
-
return r;
|
|
3163
|
-
}, Xt = (t, e, o, n = 24) => {
|
|
3315
|
+
const Xe = (e, t, o, n, r = 24) => {
|
|
3164
3316
|
let a = [];
|
|
3165
|
-
for (let
|
|
3166
|
-
const
|
|
3167
|
-
a.push(new b(c,
|
|
3317
|
+
for (let s = 0; s <= r; s++) {
|
|
3318
|
+
const i = s / r, c = F.CUBIC(i, e.x, t.x, o.x, n.x), l = F.CUBIC(i, e.y, t.y, o.y, n.y);
|
|
3319
|
+
a.push(new b(c, l));
|
|
3168
3320
|
}
|
|
3169
3321
|
return a;
|
|
3170
|
-
},
|
|
3322
|
+
}, Ze = (e, t, o, n = 24) => {
|
|
3171
3323
|
let r = [];
|
|
3172
|
-
for (let
|
|
3173
|
-
const
|
|
3174
|
-
r.push(new b(i,
|
|
3324
|
+
for (let a = 0; a <= n; a++) {
|
|
3325
|
+
const s = a / n, i = F.DAMPED(s, o) * (t.x - e.x) + e.x, c = e.y + s * (t.y - e.y);
|
|
3326
|
+
r.push(new b(i, c));
|
|
3175
3327
|
}
|
|
3176
3328
|
return r;
|
|
3177
|
-
},
|
|
3178
|
-
let
|
|
3179
|
-
for (let s = 0; s <=
|
|
3180
|
-
const
|
|
3181
|
-
|
|
3329
|
+
}, je = (e, t, o, n, r = 24) => {
|
|
3330
|
+
let a = [];
|
|
3331
|
+
for (let s = 0; s <= r; s++) {
|
|
3332
|
+
const i = s / r, c = F.EXPONENTIAL(i, o, n) * (t.x - e.x) + e.x, l = e.y + i * (t.y - e.y);
|
|
3333
|
+
a.push(new b(c, l));
|
|
3182
3334
|
}
|
|
3183
|
-
return
|
|
3184
|
-
},
|
|
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));
|
|
3341
|
+
}
|
|
3342
|
+
return a;
|
|
3343
|
+
}, He = (e, t, o, n, r, a = 24) => {
|
|
3185
3344
|
let s = [];
|
|
3186
|
-
for (let
|
|
3187
|
-
const
|
|
3345
|
+
for (let i = 0; i <= a; i++) {
|
|
3346
|
+
const c = i / a, l = o * c * c + n * c + r + e.x, u = e.y + c * (t.y - e.y);
|
|
3188
3347
|
s.push(new b(l, u));
|
|
3189
3348
|
}
|
|
3190
3349
|
return s;
|
|
3191
|
-
},
|
|
3192
|
-
let
|
|
3193
|
-
for (let
|
|
3194
|
-
const s =
|
|
3195
|
-
|
|
3350
|
+
}, Qe = (e, t, o, n = 24) => {
|
|
3351
|
+
let r = [];
|
|
3352
|
+
for (let a = 0; a <= n; a++) {
|
|
3353
|
+
const s = a / n, i = F.QUADRATIC(s, e.x, t.x, o.x), c = F.QUADRATIC(s, e.y, t.y, o.y);
|
|
3354
|
+
r.push(new b(i, c));
|
|
3196
3355
|
}
|
|
3197
|
-
return
|
|
3198
|
-
},
|
|
3199
|
-
let
|
|
3200
|
-
for (let
|
|
3201
|
-
const s =
|
|
3202
|
-
|
|
3356
|
+
return r;
|
|
3357
|
+
}, Ke = (e, t, o, n = 24) => {
|
|
3358
|
+
let r = [];
|
|
3359
|
+
for (let a = 0; a <= n; a++) {
|
|
3360
|
+
const s = a / n, i = F.SIGMOID(s, o) * (t.x - e.x) + e.x, c = e.y + s * (t.y - e.y);
|
|
3361
|
+
r.push(new b(i, c));
|
|
3203
3362
|
}
|
|
3204
|
-
return
|
|
3205
|
-
},
|
|
3206
|
-
createCubicCurvePoints:
|
|
3207
|
-
createDampedCurvePoints:
|
|
3208
|
-
createExponentialCurvePoints:
|
|
3209
|
-
createLogarithmicCurvePoints:
|
|
3210
|
-
createParabolicCurvePoints:
|
|
3211
|
-
createQuadraticCurvePoints:
|
|
3212
|
-
createSigmoidCurvePoints:
|
|
3363
|
+
return r;
|
|
3364
|
+
}, Cn = {
|
|
3365
|
+
createCubicCurvePoints: Xe,
|
|
3366
|
+
createDampedCurvePoints: Ze,
|
|
3367
|
+
createExponentialCurvePoints: je,
|
|
3368
|
+
createLogarithmicCurvePoints: Ye,
|
|
3369
|
+
createParabolicCurvePoints: He,
|
|
3370
|
+
createQuadraticCurvePoints: Qe,
|
|
3371
|
+
createSigmoidCurvePoints: Ke
|
|
3213
3372
|
};
|
|
3214
3373
|
export {
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
qo as
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3374
|
+
xn as AtmosphericSkybox,
|
|
3375
|
+
Zo as Beaker,
|
|
3376
|
+
Ce as BeakerGeometry,
|
|
3377
|
+
vo as BifurcatedStaircaseGeometry,
|
|
3378
|
+
mn as Bone,
|
|
3379
|
+
Ge as BoneGeometry,
|
|
3380
|
+
Go as Book,
|
|
3381
|
+
ft as BookGeometry,
|
|
3382
|
+
Fo as Bookshelf,
|
|
3383
|
+
Ee as BookshelfGeometry,
|
|
3384
|
+
jo as Bottle,
|
|
3385
|
+
fo as BubblingEffect,
|
|
3386
|
+
Yo as BunsenBurner,
|
|
3387
|
+
an as Burst,
|
|
3388
|
+
Re as BurstShape,
|
|
3389
|
+
Lo as Candle,
|
|
3390
|
+
Co as CrossHeadstone,
|
|
3391
|
+
xe as CrossHeadstoneGeometry,
|
|
3392
|
+
gn as DaySkybox,
|
|
3393
|
+
Ro as Desk,
|
|
3394
|
+
xo as DioramaGeometry,
|
|
3395
|
+
q as Direction,
|
|
3396
|
+
ho as Easing,
|
|
3397
|
+
Ho as ElectricPanel,
|
|
3398
|
+
de as EllipticLeafGeometry,
|
|
3399
|
+
Qo as ErlenmeyerFlask,
|
|
3400
|
+
Be as ErlenmeyerFlaskGeometry,
|
|
3401
|
+
K as Falloff,
|
|
3402
|
+
No as FenceColumn,
|
|
3403
|
+
Ie as FenceColumnGeometry,
|
|
3404
|
+
Ko as Flask,
|
|
3405
|
+
cn as Gear,
|
|
3406
|
+
Le as GearShape,
|
|
3407
|
+
ln as Heart,
|
|
3408
|
+
qe as HeartShape,
|
|
3409
|
+
fn as Hill,
|
|
3410
|
+
Ne as HillGeometry,
|
|
3411
|
+
go as LShapedStaircaseGeometry,
|
|
3412
|
+
qo as Lantern,
|
|
3413
|
+
po as LeafEffect,
|
|
3414
|
+
$o as LeverPanel,
|
|
3415
|
+
Bo as Mausoleum,
|
|
3416
|
+
Jo as Microscope,
|
|
3417
|
+
To as Moon,
|
|
3418
|
+
Wo as MortarAndPestle,
|
|
3419
|
+
Ue as MortarGeometry,
|
|
3420
|
+
Do as MossyRocks,
|
|
3421
|
+
pn as Mound,
|
|
3422
|
+
_e as MoundGeometry,
|
|
3423
|
+
bn as NightSkybox,
|
|
3424
|
+
Uo as ObeliskHeadstone,
|
|
3425
|
+
ge as ObeliskHeadstoneGeometry,
|
|
3426
|
+
F as ParametricCurve,
|
|
3427
|
+
Cn as ParametricCurveUtils,
|
|
3428
|
+
Vo as Rock,
|
|
3429
|
+
Te as RockGeometry,
|
|
3430
|
+
Xo as Rocks,
|
|
3431
|
+
zo as RoundedHeadstone,
|
|
3432
|
+
be as RoundedHeadstoneGeometry,
|
|
3433
|
+
bo as SpiralStaircaseGeometry,
|
|
3434
|
+
tn as SpiralTube,
|
|
3435
|
+
ko as SquareHeadstone,
|
|
3436
|
+
Ae as SquareHeadstoneGeometry,
|
|
3437
|
+
Ao as StaircaseGeometry,
|
|
3438
|
+
en as Stand,
|
|
3439
|
+
ze as StandGeometry,
|
|
3440
|
+
un as Star,
|
|
3441
|
+
De as StarShape,
|
|
3442
|
+
on as TeslaCoil,
|
|
3443
|
+
nn as TestTube,
|
|
3444
|
+
st as TestTubeGeometry,
|
|
3445
|
+
sn as TestTubeRack,
|
|
3446
|
+
hn as Tree,
|
|
3447
|
+
Fe as TreeGeometry,
|
|
3448
|
+
rn as WineBottle,
|
|
3449
|
+
ke as WineBottleGeometry,
|
|
3450
|
+
Oo as WroughtIronBar,
|
|
3451
|
+
yt as WroughtIronBarGeometry,
|
|
3452
|
+
_o as WroughtIronFence,
|
|
3453
|
+
Se as WroughtIronFenceGeometry,
|
|
3454
|
+
wn as addNoiseDisplacement,
|
|
3455
|
+
dn as addWaterDisplacement,
|
|
3456
|
+
et as atmosphericShader,
|
|
3457
|
+
Oe as capHeightFromRadius,
|
|
3458
|
+
So as capWidthFromRadius,
|
|
3459
|
+
Po as cartesianToSpherical,
|
|
3460
|
+
In as centerGroup,
|
|
3461
|
+
Sn as centerGroupAtTarget,
|
|
3462
|
+
En as centerInstancedMesh,
|
|
3463
|
+
Tn as centerMesh,
|
|
3464
|
+
Gn as centerMeshGeometry,
|
|
3465
|
+
An as checkerboardTexture,
|
|
3466
|
+
Kt as circularEaseIn,
|
|
3467
|
+
Jt as circularEaseInOut,
|
|
3468
|
+
$t as circularEaseOut,
|
|
3469
|
+
ee as concave,
|
|
3470
|
+
oe as convex,
|
|
3471
|
+
Xe as createCubicCurvePoints,
|
|
3472
|
+
Ze as createDampedCurvePoints,
|
|
3473
|
+
je as createExponentialCurvePoints,
|
|
3474
|
+
Ye as createLogarithmicCurvePoints,
|
|
3475
|
+
He as createParabolicCurvePoints,
|
|
3476
|
+
Qe as createQuadraticCurvePoints,
|
|
3477
|
+
Ke as createSigmoidCurvePoints,
|
|
3478
|
+
ie as cubicCurve,
|
|
3479
|
+
Ft as cubicEaseIn,
|
|
3480
|
+
Lt as cubicEaseInOut,
|
|
3481
|
+
Rt as cubicEaseOut,
|
|
3482
|
+
ce as dampedCurve,
|
|
3483
|
+
ot as daySkyShader,
|
|
3484
|
+
ao as displacementBrush,
|
|
3485
|
+
We as dollyAnimation,
|
|
3486
|
+
le as exponentialCurve,
|
|
3487
|
+
Yt as exponentialEaseIn,
|
|
3488
|
+
Qt as exponentialEaseInOut,
|
|
3489
|
+
Ht as exponentialEaseOut,
|
|
3490
|
+
vn as fadeShader,
|
|
3491
|
+
io as flattenBrush,
|
|
3492
|
+
to as flythroughAnimation,
|
|
3493
|
+
ae as gaussian,
|
|
3494
|
+
Pn as interpolateCurve,
|
|
3495
|
+
re as inverse,
|
|
3496
|
+
Wt as linear,
|
|
3497
|
+
ne as logarithmic,
|
|
3498
|
+
ue as logarithmicCurve,
|
|
3499
|
+
Me as logarithmicRandomMax,
|
|
3500
|
+
ve as logarithmicRandomMin,
|
|
3501
|
+
nt as nightSkyShader,
|
|
3502
|
+
co as noiseBrush,
|
|
3503
|
+
eo as orbitAnimation,
|
|
3504
|
+
me as parabolicCurve,
|
|
3505
|
+
oo as pendulumAnimation,
|
|
3506
|
+
he as quadraticCurve,
|
|
3507
|
+
Nt as quadraticEaseIn,
|
|
3508
|
+
_t as quadraticEaseInOut,
|
|
3509
|
+
Ot as quadraticEaseOut,
|
|
3510
|
+
qt as quarticEaseIn,
|
|
3511
|
+
Vt as quarticEaseInOut,
|
|
3512
|
+
Dt as quarticEaseOut,
|
|
3513
|
+
Xt as quinticEaseIn,
|
|
3514
|
+
jt as quinticEaseInOut,
|
|
3515
|
+
Zt as quinticEaseOut,
|
|
3516
|
+
Io as radiusFromCapHeight,
|
|
3517
|
+
wt as radiusFromCapWidth,
|
|
3518
|
+
we as randomFloat,
|
|
3519
|
+
yo as randomInteger,
|
|
3520
|
+
Pe as randomTransformVertices,
|
|
3521
|
+
wo as rowOfBooksByCount,
|
|
3522
|
+
Mo as rowOfBooksByLength,
|
|
3523
|
+
dt as rowOfBooksByScales,
|
|
3524
|
+
fe as sigmoidCurve,
|
|
3525
|
+
Ut as sineEaseIn,
|
|
3526
|
+
kt as sineEaseInOut,
|
|
3527
|
+
zt as sineEaseOut,
|
|
3528
|
+
lo as smoothBrush,
|
|
3529
|
+
te as smoothstep,
|
|
3530
|
+
Eo as sphericalToCartesian,
|
|
3531
|
+
uo as spikeBrush,
|
|
3532
|
+
no as spiralAscensionAnimation,
|
|
3533
|
+
se as squareRoot,
|
|
3534
|
+
mo as twistBrush,
|
|
3535
|
+
Mn as updateNoiseDisplacementTime,
|
|
3536
|
+
yn as updateWaterDisplacementTime,
|
|
3537
|
+
so as wobbleAnimation,
|
|
3538
|
+
ro as zoomInAnimation
|
|
3372
3539
|
};
|
|
3373
3540
|
//# sourceMappingURL=index.es.js.map
|