three-low-poly 0.9.15 → 0.9.17
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 +44 -44
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +292 -45
- package/dist/index.es.js +1334 -993
- package/dist/index.es.js.map +1 -1
- package/dist/index.iife.js +44 -44
- package/dist/index.iife.js.map +1 -1
- package/dist/index.umd.js +44 -44
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var bt = (e, t, o) => t in e ?
|
|
3
|
-
var
|
|
4
|
-
import { Vector3 as
|
|
5
|
-
function
|
|
6
|
-
const r = e.position.clone(), s = r.clone().add(e.getWorldDirection(new
|
|
1
|
+
var At = Object.defineProperty;
|
|
2
|
+
var bt = (e, t, o) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
+
var E = (e, t, o) => bt(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
+
import { Vector3 as v, MathUtils as L, Quaternion as St, InstancedMesh as it, SphereGeometry as N, MeshStandardMaterial as y, Matrix4 as Y, BufferGeometry as A, Float32BufferAttribute as q, DoubleSide as k, Euler as Pt, BufferAttribute as F, BoxGeometry as b, Vector2 as g, LatheGeometry as D, CylinderGeometry as S, ConeGeometry as Z, Shape as j, ExtrudeGeometry as Q, CircleGeometry as Tt, TorusGeometry as pt, DodecahedronGeometry as ct, Mesh as M, ShaderMaterial as J, MeshPhysicalMaterial as W, Group as _, MeshBasicMaterial as Gt, PointLight as dt, CatmullRomCurve3 as Ct, TubeGeometry as Bt, Path as Rt, Color as $, BackSide as lt, DataTexture as Nt, RGBAFormat as _t, UnsignedByteType as Ut, RepeatWrapping as ht, NearestFilter as Ot, Box3 as ut } from "three";
|
|
5
|
+
function yo(e, t, o, n) {
|
|
6
|
+
const r = e.position.clone(), s = r.clone().add(e.getWorldDirection(new v()).multiplyScalar(-t));
|
|
7
7
|
let a = null;
|
|
8
8
|
function i(c) {
|
|
9
9
|
a === null && (a = c);
|
|
@@ -16,7 +16,7 @@ function ro(e, t, o, n) {
|
|
|
16
16
|
}
|
|
17
17
|
requestAnimationFrame(i);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function wo(e, t, o, n) {
|
|
20
20
|
const r = t.length - 1;
|
|
21
21
|
let s = null;
|
|
22
22
|
function a(i) {
|
|
@@ -31,7 +31,7 @@ function ao(e, t, o, n) {
|
|
|
31
31
|
}
|
|
32
32
|
requestAnimationFrame(a);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function vo(e, t, o, n, r) {
|
|
35
35
|
let s = null;
|
|
36
36
|
function a(i) {
|
|
37
37
|
s || (s = i);
|
|
@@ -45,7 +45,7 @@ function io(e, t, o, n, r) {
|
|
|
45
45
|
}
|
|
46
46
|
requestAnimationFrame(a);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function xo(e, t, o, n, r, s) {
|
|
49
49
|
let a = null, i = 0;
|
|
50
50
|
function c(l) {
|
|
51
51
|
a === null && (a = l);
|
|
@@ -58,7 +58,7 @@ function co(e, t, o, n, r, s) {
|
|
|
58
58
|
}
|
|
59
59
|
requestAnimationFrame(c);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function go(e, t, o, n, r, s, a) {
|
|
62
62
|
let i = null;
|
|
63
63
|
function c(l) {
|
|
64
64
|
i === null && (i = l);
|
|
@@ -72,7 +72,7 @@ function lo(e, t, o, n, r, s, a) {
|
|
|
72
72
|
}
|
|
73
73
|
requestAnimationFrame(c);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Io(e, t, o, n) {
|
|
76
76
|
const r = e.position.clone();
|
|
77
77
|
let s = null;
|
|
78
78
|
function a(i) {
|
|
@@ -80,7 +80,7 @@ function uo(e, t, o, n) {
|
|
|
80
80
|
e.position.copy(r), n && n();
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
const u = new
|
|
83
|
+
const u = new v(
|
|
84
84
|
(Math.random() - 0.5) * t,
|
|
85
85
|
(Math.random() - 0.5) * t,
|
|
86
86
|
(Math.random() - 0.5) * t
|
|
@@ -89,7 +89,7 @@ function uo(e, t, o, n) {
|
|
|
89
89
|
}
|
|
90
90
|
requestAnimationFrame(a);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function Eo(e, t, o, n, r, s) {
|
|
93
93
|
const a = e.fov;
|
|
94
94
|
e.fov = o, e.updateProjectionMatrix();
|
|
95
95
|
let i = null;
|
|
@@ -100,18 +100,18 @@ function mo(e, t, o, n, r, s) {
|
|
|
100
100
|
e.fov = n, e.updateProjectionMatrix(), e.lookAt(t), e.fov = a, e.updateProjectionMatrix(), s && s();
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
e.fov =
|
|
103
|
+
e.fov = L.lerp(o, n, m), e.updateProjectionMatrix(), e.lookAt(t), requestAnimationFrame(c);
|
|
104
104
|
}
|
|
105
105
|
requestAnimationFrame(c);
|
|
106
106
|
}
|
|
107
|
-
const
|
|
108
|
-
UP: new
|
|
109
|
-
DOWN: new
|
|
110
|
-
LEFT: new
|
|
111
|
-
RIGHT: new
|
|
112
|
-
FORWARD: new
|
|
113
|
-
BACKWARD: new
|
|
114
|
-
},
|
|
107
|
+
const tt = {
|
|
108
|
+
UP: new v(0, 1, 0),
|
|
109
|
+
DOWN: new v(0, -1, 0),
|
|
110
|
+
LEFT: new v(-1, 0, 0),
|
|
111
|
+
RIGHT: new v(1, 0, 0),
|
|
112
|
+
FORWARD: new v(0, 0, 1),
|
|
113
|
+
BACKWARD: new v(0, 0, -1)
|
|
114
|
+
}, K = {
|
|
115
115
|
LINEAR: (e, t) => 1 - e / t,
|
|
116
116
|
QUADRATIC: (e, t) => Math.pow(1 - e / t, 2),
|
|
117
117
|
SQUARE_ROOT: (e, t) => Math.pow(1 - e / t, 0.5),
|
|
@@ -125,10 +125,10 @@ const W = {
|
|
|
125
125
|
const o = Math.max(0, Math.min(1, 1 - e / t));
|
|
126
126
|
return o * o * (3 - 2 * o);
|
|
127
127
|
}
|
|
128
|
-
},
|
|
128
|
+
}, Ao = (e, t, o, n, r = tt.UP, s = K.LINEAR) => {
|
|
129
129
|
const a = e.attributes.position;
|
|
130
130
|
for (let i = 0; i < a.count; i++) {
|
|
131
|
-
const c = new
|
|
131
|
+
const c = new v();
|
|
132
132
|
c.fromBufferAttribute(a, i);
|
|
133
133
|
const l = c.distanceTo(t);
|
|
134
134
|
if (l < o) {
|
|
@@ -137,10 +137,10 @@ const W = {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
a.needsUpdate = !0;
|
|
140
|
-
},
|
|
140
|
+
}, bo = (e, t, o, n, r, s = tt.UP, a = K.LINEAR) => {
|
|
141
141
|
const i = e.attributes.position;
|
|
142
142
|
for (let c = 0; c < i.count; c++) {
|
|
143
|
-
const l = new
|
|
143
|
+
const l = new v();
|
|
144
144
|
l.fromBufferAttribute(i, c);
|
|
145
145
|
const u = l.distanceTo(t);
|
|
146
146
|
if (u < o) {
|
|
@@ -149,34 +149,34 @@ const W = {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
i.needsUpdate = !0;
|
|
152
|
-
},
|
|
152
|
+
}, So = (e, t, o, n, r = tt.UP, s = K.LINEAR) => {
|
|
153
153
|
const a = e.attributes.position;
|
|
154
154
|
for (let i = 0; i < a.count; i++) {
|
|
155
|
-
const c = new
|
|
155
|
+
const c = new v();
|
|
156
156
|
c.fromBufferAttribute(a, i);
|
|
157
157
|
const l = c.distanceTo(t);
|
|
158
158
|
if (l < o) {
|
|
159
159
|
const u = s(l, o), m = n * u, h = r.clone().normalize();
|
|
160
|
-
c.x +=
|
|
160
|
+
c.x += L.randFloatSpread(m) * h.x, c.y += L.randFloatSpread(m) * h.y, c.z += L.randFloatSpread(m) * h.z, a.setXYZ(i, c.x, c.y, c.z);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
a.needsUpdate = !0;
|
|
164
|
-
},
|
|
165
|
-
const r = e.attributes.position, s = new
|
|
164
|
+
}, Po = (e, t, o, n) => {
|
|
165
|
+
const r = e.attributes.position, s = new v();
|
|
166
166
|
for (let a = 0; a < r.count; a++) {
|
|
167
|
-
const i = new
|
|
167
|
+
const i = new v();
|
|
168
168
|
if (i.fromBufferAttribute(r, a), i.distanceTo(t) < o) {
|
|
169
|
-
let l = new
|
|
169
|
+
let l = new v(), u = 0;
|
|
170
170
|
for (let m = 0; m < r.count; m++)
|
|
171
171
|
s.fromBufferAttribute(r, m), s.distanceTo(i) < o && (l.add(s), u++);
|
|
172
172
|
u > 0 && (l.divideScalar(u), i.lerp(l, n), r.setXYZ(a, i.x, i.y, i.z));
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
r.needsUpdate = !0;
|
|
176
|
-
},
|
|
176
|
+
}, To = (e, t, o, n, r = !1, s = K.LINEAR) => {
|
|
177
177
|
const a = e.attributes.position;
|
|
178
178
|
for (let i = 0; i < a.count; i++) {
|
|
179
|
-
const c = new
|
|
179
|
+
const c = new v();
|
|
180
180
|
c.fromBufferAttribute(a, i);
|
|
181
181
|
const l = c.distanceTo(t);
|
|
182
182
|
if (l < o) {
|
|
@@ -185,10 +185,10 @@ const W = {
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
a.needsUpdate = !0;
|
|
188
|
-
},
|
|
189
|
-
const a = e.attributes.position, i = new
|
|
188
|
+
}, Go = (e, t, o, n, r = tt.UP, s = K.LINEAR) => {
|
|
189
|
+
const a = e.attributes.position, i = new St();
|
|
190
190
|
for (let c = 0; c < a.count; c++) {
|
|
191
|
-
const l = new
|
|
191
|
+
const l = new v();
|
|
192
192
|
l.fromBufferAttribute(a, c);
|
|
193
193
|
const u = l.distanceTo(t);
|
|
194
194
|
if (u < o) {
|
|
@@ -197,76 +197,219 @@ const W = {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
a.needsUpdate = !0;
|
|
200
|
-
},
|
|
201
|
-
X: new
|
|
202
|
-
Y: new
|
|
203
|
-
Z: new
|
|
204
|
-
XY: new
|
|
205
|
-
XZ: new
|
|
206
|
-
YZ: new
|
|
207
|
-
XYZ: new
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
|
|
200
|
+
}, mt = {
|
|
201
|
+
X: new v(1, 0, 0),
|
|
202
|
+
Y: new v(0, 1, 0),
|
|
203
|
+
Z: new v(0, 0, 1),
|
|
204
|
+
XY: new v(1, 1, 0).normalize(),
|
|
205
|
+
XZ: new v(1, 0, 1).normalize(),
|
|
206
|
+
YZ: new v(0, 1, 1).normalize(),
|
|
207
|
+
XYZ: new v(1, 1, 1).normalize()
|
|
208
|
+
}, rt = {
|
|
209
|
+
// Red
|
|
210
|
+
CADMIUM_RED: 15073318,
|
|
211
|
+
// Cadmium Red or Bright Red. Vivid, bold red shade with warm undertones.
|
|
212
|
+
CARDINAL_RED: 12981270,
|
|
213
|
+
// Bright Crimson or Cardinal Red. It’s a vivid, bold red shade with warm undertones.
|
|
214
|
+
CHERRY_RED: 14165028,
|
|
215
|
+
// Bold red with slightly warm undertones.
|
|
216
|
+
CRIMSON: 12986408,
|
|
217
|
+
// Crimson Red or Firebrick Red. It’s a bold, deep red with a slightly cool undertone.
|
|
218
|
+
ALIZARIN_CRIMSON: 11674146,
|
|
219
|
+
// Deep, rich red with cool undertones.
|
|
220
|
+
RUST: 12731693,
|
|
221
|
+
// Red clay or Brick Red. It’s a warm, earthy red-orange shade, often associated with weathered metal, autumn leaves, or natural clay tones.
|
|
222
|
+
DARK_RED: 9109504,
|
|
223
|
+
// Dark Red. It’s a deep, rich red shade resembling the color of garnets or dried blood.
|
|
224
|
+
// Orange
|
|
225
|
+
TANGERINE: 16733440,
|
|
226
|
+
// Tangerine or Bright Orange-Red. It’s a vibrant, warm shade of orange with red undertones with a tropical feel.
|
|
227
|
+
ORANGE_PEEL: 16737792,
|
|
228
|
+
// Orange Peel or Bright Orange. It’s a vivid, energetic orange.
|
|
229
|
+
CADMIUM_ORANGE: 16744228,
|
|
230
|
+
// warm orange with strong red undertones, giving it a slightly richer and darker appearance.
|
|
231
|
+
ORANGE: 16753920,
|
|
232
|
+
// Bright, vibrant hue associated with sunsets, citrus fruits, and autumn tones.
|
|
233
|
+
// Yellow
|
|
234
|
+
AMBER: 16755200,
|
|
235
|
+
// Bright Orange. It’s a warm, vibrant shade of orange with golden-yellow undertones, associated with autumn hues.
|
|
236
|
+
CADMIUM_YELLOW: 16766720,
|
|
237
|
+
// Bright golden yellow with warm undertones.
|
|
238
|
+
GOLD: 16766720,
|
|
239
|
+
// Rich, vibrant yellow with warm undertones, resembling the color of metallic gold.
|
|
240
|
+
YELLOW: 16776960,
|
|
241
|
+
// Bright, pure yellow shade.
|
|
242
|
+
// Green
|
|
243
|
+
LIME_GREEN: 10798080,
|
|
244
|
+
// Lime Green or Bright Chartreuse. It’s a vivid, energetic yellow-green shade
|
|
245
|
+
SPRING_GREEN: 8965205,
|
|
246
|
+
// Fresh, vibrant appearance, resembling new leaves or spring foliage
|
|
247
|
+
MOSS_GREEN: 8956467,
|
|
248
|
+
// Medium-light shade of green with yellow undertones, often seen in natural foliage.
|
|
249
|
+
FERN_GREEN: 4950843,
|
|
250
|
+
// It's a natural, medium-dark green with slightly muted tones, resembling the lush greenery of ferns or foliage.
|
|
251
|
+
FOREST_GREEN: 2263842,
|
|
252
|
+
// Rich, deep green shade, often associated with dense woodland and nature.
|
|
253
|
+
SAP_GREEN: 5274922,
|
|
254
|
+
// Natural green with a muted tone.
|
|
255
|
+
OLIVE_DRAB: 5597999,
|
|
256
|
+
// Muted earthy green with brownish undertones.
|
|
257
|
+
VIRIDIAN_GREEN: 43115,
|
|
258
|
+
// Vibrant cool green.
|
|
259
|
+
MINT_GREEN: 8965290,
|
|
260
|
+
// Mint Green or Light Jade. It’s a soft, pastel green with subtle blue undertones.
|
|
261
|
+
AQUAMARINE: 65450,
|
|
262
|
+
// Aquamarine or Mint Green. It’s a bright, vibrant turquoise shade that blends green and blue.
|
|
263
|
+
// Blue
|
|
264
|
+
PHTHALO_BLUE: 3977,
|
|
265
|
+
// Phthalo Blue or Bright Navy. Intense, rich blue with a slightly greenish cool undertone.
|
|
266
|
+
SKY_BLUE: 8965375,
|
|
267
|
+
// Sky Blue or Baby Blue. It’s a light, cheerful shade of blue with a slightly soft and pastel tone, evoking a sense of openness like a clear daytime sky.
|
|
268
|
+
CERULEAN_BLUE: 6139362,
|
|
269
|
+
// Cerulean Blue or Sky Blue. It’s a bright, vivid shade of blue with a slightly cool undertone, often associated with clear skies or tropical waters.
|
|
270
|
+
AZURE: 30719,
|
|
271
|
+
// Azure Blue or Bright Blue. It’s a vibrant, rich shade of blue with a cool undertone, often associated with clear skies or digital interfaces.
|
|
272
|
+
OCEAN_BLUE: 30654,
|
|
273
|
+
// Ocean Blue or Azure Blue. It’s a vibrant medium blue shade with a slight teal undertone, often associated with clear skies or tropical waters.
|
|
274
|
+
ROYAL_BLUE: 5592575,
|
|
275
|
+
// Royal Blue or Bright Indigo. It’s a vibrant medium blue shade with a slightly cool and saturated tone.
|
|
276
|
+
MIDNIGHT_BLUE: 51,
|
|
277
|
+
// A very deep, dark blue shade that evokes the feeling of a starless night sky or deep ocean depths, with subtle blue undertones.
|
|
278
|
+
ULTRAMARINE_BLUE: 4149685,
|
|
279
|
+
// Deep, rich blue with a slightly cool undertone.
|
|
280
|
+
// Purple
|
|
281
|
+
COBALT_VIOLET: 6950317,
|
|
282
|
+
// Soft, purple tone.
|
|
283
|
+
DEEP_VIOLET: 11141375,
|
|
284
|
+
// Electric Purple or Deep Violet. It’s a bright, vibrant shade of purple with a strong blue undertone.
|
|
285
|
+
CORAL_PINK: 16724838,
|
|
286
|
+
// Bright Rose or Coral Pink. It’s a vivid, bold pinkish-red shade with warm undertones.
|
|
287
|
+
VIVID_MAGENTA: 16720639,
|
|
288
|
+
// It's an intense, electric shade of pink with equal parts red and blue.
|
|
289
|
+
MAGENTA: 16711935,
|
|
290
|
+
// Bright, vivid hue that is a mix of equal parts red and blue, sometimes called Fuchsia.
|
|
291
|
+
HOT_PINK: 16711850,
|
|
292
|
+
// Hot Pink or Fuchsia Rose. It’s a vivid and bold pink with a magenta undertone.
|
|
293
|
+
PINK_SHERBET: 16751052,
|
|
294
|
+
// Pink Sherbet or Light Pink. It’s a soft, playful pink shade with a hint of warmth.
|
|
295
|
+
SOFT_PINK: 16762823,
|
|
296
|
+
// Blush Pink or Soft Pink. It’s a pale, delicate pink with warm undertones.
|
|
297
|
+
// Brown
|
|
298
|
+
BURNT_SIENNA: 15299665,
|
|
299
|
+
// warm, earthy brown with reddish undertones.
|
|
300
|
+
BURNT_UMBER: 9057060,
|
|
301
|
+
// Dark brown with red undertones.
|
|
302
|
+
SIENNA: 9132587,
|
|
303
|
+
// Dark Goldenrod Brown. It’s a warm, earthy brown with reddish and golden undertones, often associated with natural clay or autumn leaves.
|
|
304
|
+
SADDLE_BROWN: 9127187,
|
|
305
|
+
// Rich, earthy brown with reddish undertones, often associated with leather, wood, or other natural materials.
|
|
306
|
+
COFFEE_BROWN: 6045747,
|
|
307
|
+
// Rich, earthy tone with hints of red and gray, resembling the color of natural wood or dark leather.
|
|
308
|
+
DARK_UMBER: 4929057,
|
|
309
|
+
// Coffee Brown or Dark Umber. It’s a deep, rich brown with warm, earthy undertones, often resembling dark wood or roasted coffee beans.
|
|
310
|
+
RAW_UMBER: 8545860,
|
|
311
|
+
// Cool, muted brown.
|
|
312
|
+
YELLOW_OCHRE: 12951919,
|
|
313
|
+
// Warm, muted yellow-brown
|
|
314
|
+
RAW_SIENNA: 13808780,
|
|
315
|
+
// Light, golden brown.
|
|
316
|
+
TAUPE: 9141627,
|
|
317
|
+
// Rosy Brown or Taupe Gray. It’s a muted, earthy tone with a mix of brown and gray.
|
|
318
|
+
// Gray
|
|
319
|
+
ONYX: 197379,
|
|
320
|
+
// Extremely deep, almost black shade with a neutral tone.
|
|
321
|
+
CARBON: 3026478,
|
|
322
|
+
// Deep, neutral gray.
|
|
323
|
+
CHARCOAL: 3355443,
|
|
324
|
+
// Rich, neutral gray.
|
|
325
|
+
SLATE_GRAY: 4210752,
|
|
326
|
+
// Medium-dark shade of gray
|
|
327
|
+
ASH_GRAY: 4473924,
|
|
328
|
+
// Ash Gray or Dark Slate Gray.
|
|
329
|
+
GRAPHITE: 5263440,
|
|
330
|
+
// Medium-dark, neutral Graphite Gray or Smoky Gray shadowy muted depth.
|
|
331
|
+
STEEL_GRAY: 5592405,
|
|
332
|
+
// Medium Gray or Steel Gray.
|
|
333
|
+
DIM_GRAY: 6908265,
|
|
334
|
+
// Medium-dark neutral gray with a muted, balanced tone
|
|
335
|
+
IRON: 7829367,
|
|
336
|
+
// It’s a medium gray neutral.
|
|
337
|
+
GRAY: 8421504,
|
|
338
|
+
// It is a neutral, medium-gray tone that sits exactly halfway between black and white.
|
|
339
|
+
STONE: 8947848,
|
|
340
|
+
// It’s a medium-light neutral.
|
|
341
|
+
SILVER: 11184810,
|
|
342
|
+
// Light Gray. It’s a soft, pale gray shade with a slightly metallic undertone.
|
|
343
|
+
LIGHT_GRAY: 13421772,
|
|
344
|
+
// Light, neutral Gray, sits between medium grays and white.
|
|
345
|
+
PALE_GRAY: 15658734,
|
|
346
|
+
// Very Light Gray or Soft Gray. It’s a pale, almost white shade of gray.
|
|
347
|
+
WHITE_SMOKE: 16119285,
|
|
348
|
+
// White Smoke or Light Gray. It’s a soft, pale gray shade with a hint of warmth.
|
|
349
|
+
TITANIUM_WHITE: 16777215
|
|
350
|
+
// Pure white, the brightest color possible.
|
|
351
|
+
}, Lt = (e) => 1 - Math.cos(e * Math.PI / 2), zt = (e) => Math.sin(e * Math.PI / 2), Ft = (e) => -0.5 * (Math.cos(Math.PI * e) - 1), kt = (e) => e * e, Dt = (e) => 1 - Math.pow(1 - e, 2), qt = (e) => e < 0.5 ? 2 * e * e : 1 - Math.pow(-2 * e + 2, 2) / 2, Vt = (e) => e * e * e, Ht = (e) => 1 - Math.pow(1 - e, 3), Yt = (e) => e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2, Xt = (e) => e * e * e * e, Zt = (e) => 1 - Math.pow(1 - e, 4), jt = (e) => e < 0.5 ? 8 * e * e * e * e : 1 - Math.pow(-2 * e + 2, 4) / 2, Qt = (e) => e * e * e * e * e, Kt = (e) => 1 - Math.pow(1 - e, 5), $t = (e) => e < 0.5 ? 16 * e * e * e * e * e : 1 - Math.pow(-2 * e + 2, 5) / 2, Jt = (e) => e === 0 ? 0 : Math.pow(2, 10 * e - 10), Wt = (e) => e === 1 ? 1 : 1 - Math.pow(2, -10 * e), te = (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, ee = (e) => 1 - Math.sqrt(1 - Math.pow(e, 2)), oe = (e) => Math.sqrt(1 - Math.pow(e - 1, 2)), ne = (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, se = (e) => e, re = (e) => e * e * (3 - 2 * e), ae = (e) => 1 - Math.pow(1 - e, 0.3), ie = (e) => Math.pow(e, 0.3), ce = (e) => Math.log(Math.max(0.01, e)) / Math.log(2), le = (e) => Math.sqrt(e), ue = (e) => 1 - e, me = (e) => Math.exp(-Math.pow(e - 0.5, 2) / (2 * 0.5)), Co = {
|
|
352
|
+
SINE_EASE_IN: Lt,
|
|
353
|
+
SINE_EASE_OUT: zt,
|
|
211
354
|
SINE_EASE_IN_OUT: Ft,
|
|
212
|
-
QUADRATIC_EASE_IN:
|
|
213
|
-
QUADRATIC_EASE_OUT:
|
|
214
|
-
QUADRATIC_EASE_IN_OUT:
|
|
215
|
-
CUBIC_EASE_IN:
|
|
216
|
-
CUBIC_EASE_OUT:
|
|
217
|
-
CUBIC_EASE_IN_OUT:
|
|
218
|
-
QUARTIC_EASE_IN:
|
|
219
|
-
QUARTIC_EASE_OUT:
|
|
220
|
-
QUARTIC_EASE_IN_OUT:
|
|
221
|
-
QUINTIC_EASE_IN:
|
|
222
|
-
QUINTIC_EASE_OUT:
|
|
223
|
-
QUINTIC_EASE_IN_OUT:
|
|
224
|
-
EXPONENTIAL_EASE_IN:
|
|
225
|
-
EXPONENTIAL_EASE_OUT:
|
|
226
|
-
EXPONENTIAL_EASE_IN_OUT:
|
|
227
|
-
CIRCULAR_EASE_IN:
|
|
228
|
-
CIRCULAR_EASE_OUT:
|
|
229
|
-
CIRCULAR_EASE_IN_OUT:
|
|
230
|
-
LINEAR:
|
|
231
|
-
SMOOTHSTEP:
|
|
232
|
-
CONCAVE:
|
|
233
|
-
CONVEX:
|
|
234
|
-
LOGARITHMIC:
|
|
235
|
-
SQUARE_ROOT:
|
|
236
|
-
INVERSE:
|
|
237
|
-
GAUSSIAN:
|
|
238
|
-
},
|
|
355
|
+
QUADRATIC_EASE_IN: kt,
|
|
356
|
+
QUADRATIC_EASE_OUT: Dt,
|
|
357
|
+
QUADRATIC_EASE_IN_OUT: qt,
|
|
358
|
+
CUBIC_EASE_IN: Vt,
|
|
359
|
+
CUBIC_EASE_OUT: Ht,
|
|
360
|
+
CUBIC_EASE_IN_OUT: Yt,
|
|
361
|
+
QUARTIC_EASE_IN: Xt,
|
|
362
|
+
QUARTIC_EASE_OUT: Zt,
|
|
363
|
+
QUARTIC_EASE_IN_OUT: jt,
|
|
364
|
+
QUINTIC_EASE_IN: Qt,
|
|
365
|
+
QUINTIC_EASE_OUT: Kt,
|
|
366
|
+
QUINTIC_EASE_IN_OUT: $t,
|
|
367
|
+
EXPONENTIAL_EASE_IN: Jt,
|
|
368
|
+
EXPONENTIAL_EASE_OUT: Wt,
|
|
369
|
+
EXPONENTIAL_EASE_IN_OUT: te,
|
|
370
|
+
CIRCULAR_EASE_IN: ee,
|
|
371
|
+
CIRCULAR_EASE_OUT: oe,
|
|
372
|
+
CIRCULAR_EASE_IN_OUT: ne,
|
|
373
|
+
LINEAR: se,
|
|
374
|
+
SMOOTHSTEP: re,
|
|
375
|
+
CONCAVE: ae,
|
|
376
|
+
CONVEX: ie,
|
|
377
|
+
LOGARITHMIC: ce,
|
|
378
|
+
SQUARE_ROOT: le,
|
|
379
|
+
INVERSE: ue,
|
|
380
|
+
GAUSSIAN: me
|
|
381
|
+
}, he = (e, t, o, n, r) => {
|
|
239
382
|
const s = Math.max(0, Math.min(1, e)), a = 1 - s;
|
|
240
383
|
return a * a * a * t + 3 * a * a * s * o + 3 * a * s * s * n + s * s * s * r;
|
|
241
|
-
},
|
|
384
|
+
}, fe = (e, t = 1) => {
|
|
242
385
|
const o = Math.max(1e-3, t);
|
|
243
386
|
return (1 - Math.exp(-o * e)) / (1 - Math.exp(-o));
|
|
244
|
-
},
|
|
387
|
+
}, pe = (e, t = 1, o = 1) => {
|
|
245
388
|
const n = Math.max(0, Math.min(1, e));
|
|
246
389
|
return t * Math.pow(n, o);
|
|
247
|
-
},
|
|
390
|
+
}, de = (e, t = 1, o = 1) => {
|
|
248
391
|
const n = Math.max(1e-3, Math.min(1, e));
|
|
249
392
|
return t * Math.log(o * n + 1);
|
|
250
|
-
},
|
|
393
|
+
}, Me = (e, t = 1, o = 0, n = 0) => {
|
|
251
394
|
const r = Math.max(0, Math.min(1, e));
|
|
252
395
|
return t * r * r + o * r + n;
|
|
253
|
-
},
|
|
396
|
+
}, ye = (e, t, o, n) => {
|
|
254
397
|
const r = Math.max(0, Math.min(1, e)), s = 1 - r;
|
|
255
398
|
return s * s * t + 2 * s * r * o + r * r * n;
|
|
256
|
-
},
|
|
399
|
+
}, we = (e, t = 10) => {
|
|
257
400
|
const o = Math.max(0, Math.min(1, e));
|
|
258
401
|
return 1 / (1 + Math.exp(-t * (o - 0.5)));
|
|
259
|
-
},
|
|
260
|
-
CUBIC:
|
|
261
|
-
DAMPED:
|
|
262
|
-
EXPONENTIAL:
|
|
263
|
-
LOGARITHMIC:
|
|
264
|
-
PARABOLIC:
|
|
265
|
-
QUADRATIC:
|
|
266
|
-
SIGMOID:
|
|
267
|
-
SINUSOIDAL:
|
|
402
|
+
}, ve = (e) => Math.sin(e * Math.PI * 0.5), z = {
|
|
403
|
+
CUBIC: he,
|
|
404
|
+
DAMPED: fe,
|
|
405
|
+
EXPONENTIAL: pe,
|
|
406
|
+
LOGARITHMIC: de,
|
|
407
|
+
PARABOLIC: Me,
|
|
408
|
+
QUADRATIC: ye,
|
|
409
|
+
SIGMOID: we,
|
|
410
|
+
SINUSOIDAL: ve
|
|
268
411
|
};
|
|
269
|
-
class
|
|
412
|
+
class Bo extends it {
|
|
270
413
|
constructor(o = {}) {
|
|
271
414
|
const {
|
|
272
415
|
count: n = 20,
|
|
@@ -275,7 +418,7 @@ class xo extends rt {
|
|
|
275
418
|
depth: a = 1.5,
|
|
276
419
|
geometry: i = new N(0.1, 6, 6),
|
|
277
420
|
// Small spheres
|
|
278
|
-
material: c = new
|
|
421
|
+
material: c = new y({
|
|
279
422
|
color: 16777215,
|
|
280
423
|
transparent: !0,
|
|
281
424
|
opacity: 0.6,
|
|
@@ -284,14 +427,14 @@ class xo extends rt {
|
|
|
284
427
|
})
|
|
285
428
|
} = o;
|
|
286
429
|
super(i, c, n);
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
430
|
+
E(this, "bubblePositions", []);
|
|
431
|
+
E(this, "velocities", []);
|
|
432
|
+
E(this, "width");
|
|
433
|
+
E(this, "height");
|
|
434
|
+
E(this, "depth");
|
|
292
435
|
this.height = s, this.width = r, this.depth = a;
|
|
293
436
|
for (let l = 0; l < this.count; l++) {
|
|
294
|
-
const u = new
|
|
437
|
+
const u = new v(
|
|
295
438
|
(Math.random() - 0.5) * r,
|
|
296
439
|
Math.random() * (s - 1) + 0.5,
|
|
297
440
|
(Math.random() - 0.5) * a
|
|
@@ -303,7 +446,7 @@ class xo extends rt {
|
|
|
303
446
|
* Updates the position of a specific bubble instance in the InstancedMesh.
|
|
304
447
|
*/
|
|
305
448
|
updateInstanceMatrix(o) {
|
|
306
|
-
const n = this.bubblePositions[o], r = new
|
|
449
|
+
const n = this.bubblePositions[o], r = new Y().setPosition(n);
|
|
307
450
|
this.setMatrixAt(o, r), this.instanceMatrix.needsUpdate = !0;
|
|
308
451
|
}
|
|
309
452
|
/**
|
|
@@ -317,12 +460,12 @@ class xo extends rt {
|
|
|
317
460
|
}
|
|
318
461
|
}
|
|
319
462
|
}
|
|
320
|
-
class
|
|
463
|
+
class Ro {
|
|
321
464
|
constructor(t) {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
465
|
+
E(this, "speed");
|
|
466
|
+
E(this, "maxIntensity");
|
|
467
|
+
E(this, "minIntensity");
|
|
468
|
+
E(this, "material");
|
|
326
469
|
const {
|
|
327
470
|
speed: o = 2,
|
|
328
471
|
//
|
|
@@ -346,7 +489,7 @@ class go {
|
|
|
346
489
|
this.material.emissiveIntensity = this.minIntensity + Math.abs(Math.sin(t * this.speed)) * (this.maxIntensity - this.minIntensity);
|
|
347
490
|
}
|
|
348
491
|
}
|
|
349
|
-
class
|
|
492
|
+
class xe extends A {
|
|
350
493
|
constructor(t = 0.1) {
|
|
351
494
|
super();
|
|
352
495
|
const o = [], n = [], r = [
|
|
@@ -378,42 +521,42 @@ class Me extends S {
|
|
|
378
521
|
this.setAttribute("position", s), this.setIndex(n), this.computeVertexNormals();
|
|
379
522
|
}
|
|
380
523
|
}
|
|
381
|
-
class
|
|
524
|
+
class No extends it {
|
|
382
525
|
constructor(o = {}) {
|
|
383
526
|
const {
|
|
384
527
|
count: n = 200,
|
|
385
528
|
width: r = 20,
|
|
386
529
|
height: s = 10,
|
|
387
530
|
depth: a = 20,
|
|
388
|
-
geometry: i = new
|
|
389
|
-
material: c = new
|
|
531
|
+
geometry: i = new xe(),
|
|
532
|
+
material: c = new y({
|
|
390
533
|
color: 8956467,
|
|
391
534
|
metalness: 0.1,
|
|
392
535
|
roughness: 0.8,
|
|
393
536
|
flatShading: !0,
|
|
394
|
-
side:
|
|
537
|
+
side: k
|
|
395
538
|
})
|
|
396
539
|
} = o;
|
|
397
540
|
super(i, c, n);
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
this.dummyMatrix = new
|
|
541
|
+
E(this, "dummyMatrix");
|
|
542
|
+
E(this, "velocities");
|
|
543
|
+
E(this, "width");
|
|
544
|
+
E(this, "height");
|
|
545
|
+
E(this, "depth");
|
|
546
|
+
this.dummyMatrix = new Y(), this.velocities = [], this.width = r, this.height = s, this.depth = a;
|
|
404
547
|
for (let l = 0; l < n; l++) {
|
|
405
548
|
const u = (Math.random() - 0.5) * r, m = Math.random() * (s - 1) + 0.5, h = (Math.random() - 0.5) * a, f = (Math.random() - 0.5) * Math.PI, p = (Math.random() - 0.5) * Math.PI, d = (Math.random() - 0.5) * Math.PI;
|
|
406
|
-
this.dummyMatrix.makeRotationFromEuler(new
|
|
407
|
-
const w = new
|
|
549
|
+
this.dummyMatrix.makeRotationFromEuler(new Pt(f, p, d)), this.dummyMatrix.setPosition(u, m, h), this.setMatrixAt(l, this.dummyMatrix);
|
|
550
|
+
const w = new v((Math.random() - 0.5) * 0.01, -5e-3, (Math.random() - 0.5) * 0.01);
|
|
408
551
|
this.velocities.push(w);
|
|
409
552
|
}
|
|
410
553
|
this.instanceMatrix.needsUpdate = !0;
|
|
411
554
|
}
|
|
412
555
|
update() {
|
|
413
556
|
for (let o = 0; o < this.count; o++) {
|
|
414
|
-
const n = new
|
|
557
|
+
const n = new Y();
|
|
415
558
|
this.getMatrixAt(o, n);
|
|
416
|
-
const r = new
|
|
559
|
+
const r = new v();
|
|
417
560
|
r.setFromMatrixPosition(n);
|
|
418
561
|
const s = this.velocities[o];
|
|
419
562
|
r.add(s), r.y < 0 && (r.set(
|
|
@@ -425,23 +568,23 @@ class bo extends rt {
|
|
|
425
568
|
this.instanceMatrix.needsUpdate = !0;
|
|
426
569
|
}
|
|
427
570
|
}
|
|
428
|
-
function
|
|
571
|
+
function Mt(e = 0, t = 1) {
|
|
429
572
|
return Math.random() * (t - e) + e;
|
|
430
573
|
}
|
|
431
|
-
function
|
|
574
|
+
function _o(e = 0, t = 1) {
|
|
432
575
|
return Math.floor(Math.random() * (t - e + 1)) + e;
|
|
433
576
|
}
|
|
434
|
-
function
|
|
577
|
+
function ge(e = 0.5, t = 0, o = 1) {
|
|
435
578
|
return t + (o - t) * Math.pow(Math.random(), e);
|
|
436
579
|
}
|
|
437
|
-
function
|
|
580
|
+
function Ie(e = 0.5, t = 0, o = 1) {
|
|
438
581
|
return t + (o - t) * Math.pow(1 - Math.random(), e);
|
|
439
582
|
}
|
|
440
|
-
function
|
|
583
|
+
function Ee(e, t, o) {
|
|
441
584
|
const n = t + Math.random() * (o - t);
|
|
442
585
|
return setTimeout(e, n);
|
|
443
586
|
}
|
|
444
|
-
function
|
|
587
|
+
function Uo(e, t, o) {
|
|
445
588
|
let n;
|
|
446
589
|
function r() {
|
|
447
590
|
const s = t + Math.random() * (o - t);
|
|
@@ -451,7 +594,7 @@ function Ao(e, t, o) {
|
|
|
451
594
|
}
|
|
452
595
|
return r(), () => clearTimeout(n);
|
|
453
596
|
}
|
|
454
|
-
class
|
|
597
|
+
class Oo {
|
|
455
598
|
constructor({
|
|
456
599
|
light: t,
|
|
457
600
|
//
|
|
@@ -460,15 +603,15 @@ class So {
|
|
|
460
603
|
minDuration: r = 50,
|
|
461
604
|
maxDuration: s = 250
|
|
462
605
|
} = {}) {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
606
|
+
E(this, "light");
|
|
607
|
+
E(this, "minIntensity");
|
|
608
|
+
E(this, "maxIntensity");
|
|
609
|
+
E(this, "minDuration");
|
|
610
|
+
E(this, "maxDuration");
|
|
468
611
|
this.light = t, this.minIntensity = o, this.maxIntensity = n, this.minDuration = r, this.maxDuration = s;
|
|
469
612
|
}
|
|
470
613
|
triggerLightning() {
|
|
471
|
-
this.light && (this.light.intensity =
|
|
614
|
+
this.light && (this.light.intensity = Mt(this.minIntensity, this.maxIntensity)), Ee(
|
|
472
615
|
() => {
|
|
473
616
|
this.light && (this.light.intensity = 0);
|
|
474
617
|
},
|
|
@@ -480,8 +623,8 @@ class So {
|
|
|
480
623
|
Math.random() > 0.98 && this.triggerLightning();
|
|
481
624
|
}
|
|
482
625
|
}
|
|
483
|
-
const
|
|
484
|
-
const o = e[0].index !== null, n = new Set(Object.keys(e[0].attributes)), r = new Set(Object.keys(e[0].morphAttributes)), s = {}, a = {}, i = e[0].morphTargetsRelative, c = new
|
|
626
|
+
const P = (e, t) => {
|
|
627
|
+
const o = e[0].index !== null, n = new Set(Object.keys(e[0].attributes)), r = new Set(Object.keys(e[0].morphAttributes)), s = {}, a = {}, i = e[0].morphTargetsRelative, c = new A();
|
|
485
628
|
let l = 0;
|
|
486
629
|
if (e.forEach((u, m) => {
|
|
487
630
|
let h = 0;
|
|
@@ -534,7 +677,7 @@ const T = (e, t) => {
|
|
|
534
677
|
}), c.setIndex(m);
|
|
535
678
|
}
|
|
536
679
|
for (let u in s) {
|
|
537
|
-
const m =
|
|
680
|
+
const m = ft(s[u]);
|
|
538
681
|
if (!m)
|
|
539
682
|
return console.error(
|
|
540
683
|
"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the " + u + " attribute."
|
|
@@ -550,7 +693,7 @@ const T = (e, t) => {
|
|
|
550
693
|
const f = [];
|
|
551
694
|
for (let d = 0; d < a[u].length; ++d)
|
|
552
695
|
f.push(a[u][d][h]);
|
|
553
|
-
const p =
|
|
696
|
+
const p = ft(f);
|
|
554
697
|
if (!p)
|
|
555
698
|
return console.error(
|
|
556
699
|
"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the " + u + " morphAttribute."
|
|
@@ -559,7 +702,7 @@ const T = (e, t) => {
|
|
|
559
702
|
}
|
|
560
703
|
}
|
|
561
704
|
return c;
|
|
562
|
-
},
|
|
705
|
+
}, ft = (e) => {
|
|
563
706
|
let t, o, n, r = 0;
|
|
564
707
|
if (e.forEach((s) => {
|
|
565
708
|
if (t === void 0 && (t = s.array.constructor), t !== s.array.constructor)
|
|
@@ -580,56 +723,56 @@ const T = (e, t) => {
|
|
|
580
723
|
let a = 0;
|
|
581
724
|
return e.forEach((i) => {
|
|
582
725
|
s.set(i.array, a), a += i.array.length;
|
|
583
|
-
}), new
|
|
726
|
+
}), new F(s, o, n);
|
|
584
727
|
}
|
|
585
728
|
};
|
|
586
|
-
function
|
|
729
|
+
function Ae(e, t = 1e-4) {
|
|
587
730
|
t = Math.max(t, Number.EPSILON);
|
|
588
731
|
const o = {}, n = e.getIndex(), r = e.getAttribute("position"), s = n ? n.count : r.count;
|
|
589
732
|
let a = 0;
|
|
590
733
|
const i = Object.keys(e.attributes), c = {}, l = {}, u = [], m = ["getX", "getY", "getZ", "getW"];
|
|
591
734
|
for (let d = 0, w = i.length; d < w; d++) {
|
|
592
|
-
const
|
|
593
|
-
c[
|
|
594
|
-
const
|
|
595
|
-
|
|
735
|
+
const x = i[d];
|
|
736
|
+
c[x] = [];
|
|
737
|
+
const I = e.morphAttributes[x];
|
|
738
|
+
I && (l[x] = new Array(I.length).fill(0).map(() => []));
|
|
596
739
|
}
|
|
597
740
|
const h = Math.log10(1 / t), f = Math.pow(10, h);
|
|
598
741
|
for (let d = 0; d < s; d++) {
|
|
599
742
|
const w = n ? n.getX(d) : d;
|
|
600
|
-
let
|
|
601
|
-
for (let
|
|
602
|
-
const
|
|
603
|
-
for (let
|
|
604
|
-
|
|
743
|
+
let x = "";
|
|
744
|
+
for (let I = 0, R = i.length; I < R; I++) {
|
|
745
|
+
const B = i[I], T = e.getAttribute(B), G = T.itemSize;
|
|
746
|
+
for (let U = 0; U < G; U++)
|
|
747
|
+
x += `${~~(T[m[U]](w) * f)},`;
|
|
605
748
|
}
|
|
606
|
-
if (
|
|
607
|
-
u.push(o[
|
|
749
|
+
if (x in o)
|
|
750
|
+
u.push(o[x]);
|
|
608
751
|
else {
|
|
609
|
-
for (let
|
|
610
|
-
const
|
|
611
|
-
for (let
|
|
612
|
-
const
|
|
613
|
-
if (
|
|
614
|
-
for (let C = 0,
|
|
615
|
-
|
|
752
|
+
for (let I = 0, R = i.length; I < R; I++) {
|
|
753
|
+
const B = i[I], T = e.getAttribute(B), G = e.morphAttributes[B], U = T.itemSize, O = c[B], et = l[B];
|
|
754
|
+
for (let V = 0; V < U; V++) {
|
|
755
|
+
const H = m[V];
|
|
756
|
+
if (O.push(T[H](w)), G)
|
|
757
|
+
for (let C = 0, Et = G.length; C < Et; C++)
|
|
758
|
+
et[C].push(G[C][H](w));
|
|
616
759
|
}
|
|
617
760
|
}
|
|
618
|
-
o[
|
|
761
|
+
o[x] = a, u.push(a), a++;
|
|
619
762
|
}
|
|
620
763
|
}
|
|
621
764
|
const p = e.clone();
|
|
622
765
|
for (let d = 0, w = i.length; d < w; d++) {
|
|
623
|
-
const
|
|
624
|
-
if (p.setAttribute(
|
|
625
|
-
for (let
|
|
626
|
-
const
|
|
627
|
-
p.morphAttributes[
|
|
766
|
+
const x = i[d], I = e.getAttribute(x), R = new I.array.constructor(c[x]), B = new F(R, I.itemSize, I.normalized);
|
|
767
|
+
if (p.setAttribute(x, B), x in l)
|
|
768
|
+
for (let T = 0; T < l[x].length; T++) {
|
|
769
|
+
const G = e.morphAttributes[x][T], U = new G.array.constructor(l[x][T]), O = new F(U, G.itemSize, G.normalized);
|
|
770
|
+
p.morphAttributes[x][T] = O;
|
|
628
771
|
}
|
|
629
772
|
}
|
|
630
773
|
return p.setIndex(u), p;
|
|
631
774
|
}
|
|
632
|
-
class
|
|
775
|
+
class yt extends A {
|
|
633
776
|
constructor(t = 1, o = 1.5, n = 0.5, r = 0.05, s = 0.05) {
|
|
634
777
|
super();
|
|
635
778
|
const a = t, i = o, c = n, l = r, u = s, m = [
|
|
@@ -1224,13 +1367,13 @@ class dt extends S {
|
|
|
1224
1367
|
54,
|
|
1225
1368
|
55
|
|
1226
1369
|
// Back cover edge
|
|
1227
|
-
],
|
|
1228
|
-
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1370
|
+
], x = new Float32Array(m), I = new Float32Array(h), R = new Float32Array(d), B = new Uint16Array(w), T = new A();
|
|
1371
|
+
T.setAttribute("position", new F(x, 3)), T.setAttribute("normal", new F(I, 3)), T.setAttribute("uv", new F(R, 2)), T.setIndex(new F(B, 1));
|
|
1372
|
+
const G = new b(t - l - u, i - u * 2, c - l * 2);
|
|
1373
|
+
G.translate((t - l - u) / 2 + l, i / 2, -c / 2), this.copy(P([T, G], !0));
|
|
1231
1374
|
}
|
|
1232
1375
|
}
|
|
1233
|
-
function
|
|
1376
|
+
function wt({
|
|
1234
1377
|
scaleXMin: e = 0.4,
|
|
1235
1378
|
scaleXMax: t = 0.7,
|
|
1236
1379
|
scaleYMin: o = 0.3,
|
|
@@ -1238,26 +1381,26 @@ function yt({
|
|
|
1238
1381
|
scaleZMin: r = 0.1,
|
|
1239
1382
|
scaleZMax: s = 0.5
|
|
1240
1383
|
} = {}) {
|
|
1241
|
-
return new
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1384
|
+
return new v(
|
|
1385
|
+
Mt(e, t),
|
|
1386
|
+
ge(0.25, o, n),
|
|
1387
|
+
Ie(0.8, r, s)
|
|
1245
1388
|
);
|
|
1246
1389
|
}
|
|
1247
|
-
function
|
|
1390
|
+
function vt({
|
|
1248
1391
|
coverMaterial: e,
|
|
1249
1392
|
pagesMaterial: t,
|
|
1250
1393
|
scales: o
|
|
1251
1394
|
}) {
|
|
1252
|
-
const n = new
|
|
1395
|
+
const n = new yt(), r = new it(n, [e, t], o.length), s = new Y();
|
|
1253
1396
|
let a = 0;
|
|
1254
1397
|
for (let i = 0; i < o.length; i++) {
|
|
1255
|
-
const c = o[i], l = new
|
|
1398
|
+
const c = o[i], l = new Y();
|
|
1256
1399
|
l.makeScale(c.x, c.y, c.z), s.identity(), s.multiply(l), s.setPosition(0.01 + Math.random() * 0.1, 0, a + c.z * 0.5), r.setMatrixAt(i, s), a += c.z * 0.5;
|
|
1257
1400
|
}
|
|
1258
1401
|
return r;
|
|
1259
1402
|
}
|
|
1260
|
-
function
|
|
1403
|
+
function Lo({
|
|
1261
1404
|
coverMaterial: e,
|
|
1262
1405
|
pagesMaterial: t,
|
|
1263
1406
|
count: o = 10,
|
|
@@ -1270,11 +1413,11 @@ function Eo({
|
|
|
1270
1413
|
}) {
|
|
1271
1414
|
const l = Array.from(
|
|
1272
1415
|
{ length: o },
|
|
1273
|
-
() =>
|
|
1416
|
+
() => wt({ scaleXMin: n, scaleXMax: r, scaleYMin: s, scaleYMax: a, scaleZMin: i, scaleZMax: c })
|
|
1274
1417
|
);
|
|
1275
|
-
return
|
|
1418
|
+
return vt({ coverMaterial: e, pagesMaterial: t, scales: l });
|
|
1276
1419
|
}
|
|
1277
|
-
function
|
|
1420
|
+
function zo({
|
|
1278
1421
|
coverMaterial: e,
|
|
1279
1422
|
pagesMaterial: t,
|
|
1280
1423
|
length: o = 10,
|
|
@@ -1288,17 +1431,17 @@ function Po({
|
|
|
1288
1431
|
const l = [];
|
|
1289
1432
|
let u = o;
|
|
1290
1433
|
for (; u > 0; ) {
|
|
1291
|
-
const m =
|
|
1434
|
+
const m = wt({ scaleXMin: n, scaleXMax: r, scaleYMin: s, scaleYMax: a, scaleZMin: i, scaleZMax: c });
|
|
1292
1435
|
m.z = Math.min(m.z, u), l.push(m), u -= m.z;
|
|
1293
1436
|
}
|
|
1294
|
-
return
|
|
1437
|
+
return vt({ coverMaterial: e, pagesMaterial: t, scales: l });
|
|
1295
1438
|
}
|
|
1296
|
-
class
|
|
1439
|
+
class Fo extends A {
|
|
1297
1440
|
constructor(t = 2, o = 0.3, n = 0.6, r = 5, s = 5, a = Math.PI / 4) {
|
|
1298
1441
|
super();
|
|
1299
1442
|
const i = [], c = [];
|
|
1300
1443
|
for (let f = 0; f < r; f++) {
|
|
1301
|
-
const p = f * o, d = p + o, w = f * n,
|
|
1444
|
+
const p = f * o, d = p + o, w = f * n, x = w + n;
|
|
1302
1445
|
i.push(
|
|
1303
1446
|
// Vertical riser
|
|
1304
1447
|
-t / 2,
|
|
@@ -1328,28 +1471,28 @@ class To extends S {
|
|
|
1328
1471
|
// Top-right
|
|
1329
1472
|
t / 2,
|
|
1330
1473
|
d,
|
|
1331
|
-
|
|
1474
|
+
x,
|
|
1332
1475
|
// Back-right
|
|
1333
1476
|
-t / 2,
|
|
1334
1477
|
d,
|
|
1335
|
-
|
|
1478
|
+
x
|
|
1336
1479
|
// Back-left
|
|
1337
1480
|
);
|
|
1338
|
-
const
|
|
1481
|
+
const I = f * 8;
|
|
1339
1482
|
c.push(
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1483
|
+
I,
|
|
1484
|
+
I + 1,
|
|
1485
|
+
I + 2,
|
|
1486
|
+
I,
|
|
1487
|
+
I + 2,
|
|
1488
|
+
I + 3
|
|
1346
1489
|
), c.push(
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1490
|
+
I + 4,
|
|
1491
|
+
I + 5,
|
|
1492
|
+
I + 6,
|
|
1493
|
+
I + 4,
|
|
1494
|
+
I + 6,
|
|
1495
|
+
I + 7
|
|
1353
1496
|
);
|
|
1354
1497
|
}
|
|
1355
1498
|
const l = r * o, u = r * n, m = t * 2;
|
|
@@ -1386,41 +1529,41 @@ class To extends S {
|
|
|
1386
1529
|
for (let f = 0; f < 2; f++) {
|
|
1387
1530
|
const p = f === 0 ? 1 : -1;
|
|
1388
1531
|
for (let d = 0; d < s; d++) {
|
|
1389
|
-
const w = l + d * o,
|
|
1532
|
+
const w = l + d * o, x = w + o, I = p * (m / 4), R = u + n, B = d * n * Math.cos(a), T = d * n * Math.sin(a), G = I + p * B - t / 2 * Math.cos(a), U = I + p * B + t / 2 * Math.cos(a), O = R + T, et = G + p * n * Math.cos(a), V = U + p * n * Math.cos(a), H = O + n * Math.sin(a);
|
|
1390
1533
|
i.push(
|
|
1391
1534
|
// Vertical riser
|
|
1392
|
-
|
|
1535
|
+
G,
|
|
1393
1536
|
w,
|
|
1394
|
-
|
|
1537
|
+
O,
|
|
1395
1538
|
// Bottom-left
|
|
1396
|
-
|
|
1539
|
+
U,
|
|
1397
1540
|
w,
|
|
1398
|
-
|
|
1541
|
+
O,
|
|
1399
1542
|
// Bottom-right
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1543
|
+
U,
|
|
1544
|
+
x,
|
|
1545
|
+
O,
|
|
1403
1546
|
// Top-right
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1547
|
+
G,
|
|
1548
|
+
x,
|
|
1549
|
+
O,
|
|
1407
1550
|
// Top-left
|
|
1408
1551
|
// Horizontal tread
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1552
|
+
G,
|
|
1553
|
+
x,
|
|
1554
|
+
O,
|
|
1412
1555
|
// Top-left
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1556
|
+
U,
|
|
1557
|
+
x,
|
|
1558
|
+
O,
|
|
1416
1559
|
// Top-right
|
|
1417
|
-
D,
|
|
1418
|
-
v,
|
|
1419
1560
|
V,
|
|
1561
|
+
x,
|
|
1562
|
+
H,
|
|
1420
1563
|
// Back-right
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1564
|
+
et,
|
|
1565
|
+
x,
|
|
1566
|
+
H
|
|
1424
1567
|
// Back-left
|
|
1425
1568
|
);
|
|
1426
1569
|
const C = h + 4 + f * s * 8 + d * 8;
|
|
@@ -1444,7 +1587,7 @@ class To extends S {
|
|
|
1444
1587
|
this.setIndex(c), this.setAttribute("position", new q(i, 3)), this.computeVertexNormals();
|
|
1445
1588
|
}
|
|
1446
1589
|
}
|
|
1447
|
-
class
|
|
1590
|
+
class ko extends A {
|
|
1448
1591
|
constructor(t = 5, o = 3, n = 5, r = 0.2) {
|
|
1449
1592
|
super();
|
|
1450
1593
|
const s = [
|
|
@@ -1525,7 +1668,7 @@ class Go extends S {
|
|
|
1525
1668
|
this.setIndex(a), this.setAttribute("position", new q(s, 3)), this.computeVertexNormals();
|
|
1526
1669
|
}
|
|
1527
1670
|
}
|
|
1528
|
-
class
|
|
1671
|
+
class Do extends A {
|
|
1529
1672
|
constructor(t = 2, o = 0.3, n = 0.5, r = 5, s = 2) {
|
|
1530
1673
|
super();
|
|
1531
1674
|
const a = [], i = [];
|
|
@@ -1673,7 +1816,7 @@ class Bo extends S {
|
|
|
1673
1816
|
this.setIndex(i), this.setAttribute("position", new q(a, 3)), this.computeVertexNormals();
|
|
1674
1817
|
}
|
|
1675
1818
|
}
|
|
1676
|
-
class
|
|
1819
|
+
class qo extends A {
|
|
1677
1820
|
constructor(t = 1, o = 0.4, n = 0.2, r = 20, s = 2, a = Math.PI / 8) {
|
|
1678
1821
|
super();
|
|
1679
1822
|
const i = [], c = [];
|
|
@@ -1741,7 +1884,7 @@ class Co extends S {
|
|
|
1741
1884
|
this.setIndex(c), this.setAttribute("position", new q(i, 3)), this.computeVertexNormals();
|
|
1742
1885
|
}
|
|
1743
1886
|
}
|
|
1744
|
-
class
|
|
1887
|
+
class Vo extends A {
|
|
1745
1888
|
constructor(t = 2, o = 0.3, n = 0.5, r = 10) {
|
|
1746
1889
|
super();
|
|
1747
1890
|
const s = [], a = [];
|
|
@@ -1807,60 +1950,148 @@ class Uo extends S {
|
|
|
1807
1950
|
this.setIndex(a), this.setAttribute("position", new q(s, 3)), this.computeVertexNormals();
|
|
1808
1951
|
}
|
|
1809
1952
|
}
|
|
1810
|
-
|
|
1953
|
+
function xt(e, t, o, n, r) {
|
|
1954
|
+
const s = (n - t) / (o - e);
|
|
1955
|
+
return e + (r - t) / s;
|
|
1956
|
+
}
|
|
1957
|
+
function be(e, t, o, n, r) {
|
|
1958
|
+
const s = (n - t) / (o - e);
|
|
1959
|
+
return t + s * (r - e);
|
|
1960
|
+
}
|
|
1961
|
+
const Ho = {
|
|
1962
|
+
calculateXFromSlopeIntercept: xt,
|
|
1963
|
+
calculateYFromSlopeIntercept: be
|
|
1964
|
+
};
|
|
1965
|
+
class Se extends A {
|
|
1966
|
+
constructor() {
|
|
1967
|
+
super();
|
|
1968
|
+
const t = [
|
|
1969
|
+
new g(0, 0),
|
|
1970
|
+
// Origin
|
|
1971
|
+
new g(0.8, 0),
|
|
1972
|
+
// Base
|
|
1973
|
+
new g(1, 1.5),
|
|
1974
|
+
// Rounded body
|
|
1975
|
+
new g(0.5, 2.2),
|
|
1976
|
+
// Neck
|
|
1977
|
+
new g(0.6, 2.5),
|
|
1978
|
+
// Mouth
|
|
1979
|
+
new g(0.5, 2.5)
|
|
1980
|
+
// Cork
|
|
1981
|
+
], o = new D(t, 10), n = new S(0.55, 0.45, 0.2, 10);
|
|
1982
|
+
n.translate(0, 2.5, 0);
|
|
1983
|
+
const r = [
|
|
1984
|
+
new g(0, 0),
|
|
1985
|
+
new g(0.8, 0),
|
|
1986
|
+
new g(xt(0.8, 0, 1, 1.5, 1), 1),
|
|
1987
|
+
new g(0, 1)
|
|
1988
|
+
], s = new D(r, 10);
|
|
1989
|
+
s.translate(0, 0.1, 0), s.scale(0.9, 0.9, 0.9), this.copy(P([o, n, s], !0));
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
class Pe extends A {
|
|
1993
|
+
constructor({ radius: t = 0.5, neckRadius: o = 0.2, height: n = 3, neckHeight: r = 1, segments: s = 16 } = {}) {
|
|
1994
|
+
super();
|
|
1995
|
+
const a = n - r, i = new S(t, t, a, s);
|
|
1996
|
+
i.translate(0, a / 2, 0);
|
|
1997
|
+
const c = 0.3, l = new S(o, t, c, s);
|
|
1998
|
+
l.translate(0, a + c / 2, 0);
|
|
1999
|
+
const u = new S(o, o, r, s);
|
|
2000
|
+
u.translate(0, a + c + r / 2, 0), this.copy(P([i, l, u], !1));
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
class Te extends A {
|
|
1811
2004
|
constructor(t = 0.4, o = 1.2, n = 0.2) {
|
|
1812
2005
|
super();
|
|
1813
|
-
const r = o * 0.6, s = new
|
|
2006
|
+
const r = o * 0.6, s = new b(t / 2, r, n);
|
|
1814
2007
|
s.translate(0, r / 2, 0);
|
|
1815
|
-
const a = t * 1.5, i = new
|
|
1816
|
-
i.translate(0, r * 0.75, 0), this.copy(
|
|
2008
|
+
const a = t * 1.5, i = new b(a, t / 4, n);
|
|
2009
|
+
i.translate(0, r * 0.75, 0), this.copy(P([s, i], !1)), this.computeVertexNormals();
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
class Ge extends A {
|
|
2013
|
+
constructor() {
|
|
2014
|
+
super();
|
|
2015
|
+
const t = new b(5, 1, 5);
|
|
2016
|
+
t.translate(0, 0.5, 0);
|
|
2017
|
+
const o = new b(4, 3, 4);
|
|
2018
|
+
o.translate(0, 2.5, 0);
|
|
2019
|
+
const n = [
|
|
2020
|
+
[-1.8, 2.3, -2.2],
|
|
2021
|
+
[1.8, 2.3, -2.2],
|
|
2022
|
+
[-1.8, 2.3, 2.2],
|
|
2023
|
+
[1.8, 2.3, 2.2]
|
|
2024
|
+
], r = [];
|
|
2025
|
+
n.forEach((l) => {
|
|
2026
|
+
const u = new S(0.2, 0.2, 3.5, 16);
|
|
2027
|
+
u.translate(l[0], l[1], l[2]), r.push(u);
|
|
2028
|
+
});
|
|
2029
|
+
const s = new Z(3.5, 2, 4);
|
|
2030
|
+
s.rotateY(Math.PI / 4), s.translate(0, 5, 0);
|
|
2031
|
+
const a = new j();
|
|
2032
|
+
a.moveTo(-1, 0), a.lineTo(-1, 2), a.absarc(0, 2, 1, Math.PI, 0, !0), a.lineTo(1, 0);
|
|
2033
|
+
const i = {
|
|
2034
|
+
depth: 0.5,
|
|
2035
|
+
bevelEnabled: !1
|
|
2036
|
+
}, c = new Q(a, i);
|
|
2037
|
+
c.translate(0, 0.5, 1.7), c.setIndex([...Array(c.attributes.position.count).keys()]), this.copy(
|
|
2038
|
+
P(
|
|
2039
|
+
[
|
|
2040
|
+
t,
|
|
2041
|
+
P([o, ...r], !1),
|
|
2042
|
+
s,
|
|
2043
|
+
c
|
|
2044
|
+
],
|
|
2045
|
+
!0
|
|
2046
|
+
)
|
|
2047
|
+
), this.computeVertexNormals();
|
|
1817
2048
|
}
|
|
1818
2049
|
}
|
|
1819
|
-
class
|
|
2050
|
+
class Ce extends A {
|
|
1820
2051
|
constructor(t = 1.75, o = 0.75) {
|
|
1821
2052
|
super();
|
|
1822
2053
|
const n = t * 0.05, r = t * 0.15, s = t * 0.15, a = t * 0.75;
|
|
1823
2054
|
let i = 0;
|
|
1824
|
-
const c = new
|
|
2055
|
+
const c = new b(o, n, o);
|
|
1825
2056
|
c.translate(0, i + n / 2, 0), i += n;
|
|
1826
|
-
const l = new
|
|
2057
|
+
const l = new b(o * 0.8, r, o * 0.8);
|
|
1827
2058
|
l.translate(0, i + r / 2, 0), i += r;
|
|
1828
|
-
const u = new
|
|
2059
|
+
const u = new b(o * 0.6, s, o * 0.6);
|
|
1829
2060
|
u.translate(0, i + s / 2, 0), i += s;
|
|
1830
|
-
const m = new
|
|
2061
|
+
const m = new b(o * 0.4, a, o * 0.4);
|
|
1831
2062
|
m.translate(0, i + a / 2, 0), i += a;
|
|
1832
2063
|
const h = new Z(o * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
|
|
1833
|
-
h.translate(0, i + 0.1 / 2, 0), this.copy(
|
|
2064
|
+
h.translate(0, i + 0.1 / 2, 0), this.copy(P([c, l, u, m, h], !1)), this.computeVertexNormals();
|
|
1834
2065
|
}
|
|
1835
2066
|
}
|
|
1836
|
-
class
|
|
2067
|
+
class Be extends A {
|
|
1837
2068
|
constructor(t = 0.6, o = 1, n = 0.2, r = 0.6) {
|
|
1838
2069
|
super();
|
|
1839
|
-
const s = o - r / 2, a = new
|
|
2070
|
+
const s = o - r / 2, a = new b(t, s, n);
|
|
1840
2071
|
a.translate(0, s / 2, 0);
|
|
1841
|
-
const i = new
|
|
1842
|
-
i.rotateY(Math.PI / 2), i.rotateX(Math.PI / 2), i.translate(0, s, 0), this.copy(
|
|
2072
|
+
const i = new S(r / 2, r / 2, n, 16, 1, !1, 0, Math.PI);
|
|
2073
|
+
i.rotateY(Math.PI / 2), i.rotateX(Math.PI / 2), i.translate(0, s, 0), this.copy(P([a, i], !1)), this.computeVertexNormals();
|
|
1843
2074
|
}
|
|
1844
2075
|
}
|
|
1845
|
-
class
|
|
2076
|
+
class Re extends A {
|
|
1846
2077
|
constructor(t = 0.5, o = 0.8, n = 0.15) {
|
|
1847
2078
|
super();
|
|
1848
|
-
const r = new
|
|
2079
|
+
const r = new b(t, o, n);
|
|
1849
2080
|
r.translate(0, o / 2, 0), this.copy(r);
|
|
1850
2081
|
}
|
|
1851
2082
|
}
|
|
1852
|
-
class
|
|
2083
|
+
class Ne extends A {
|
|
1853
2084
|
constructor({ height: t = 2.25 } = {}) {
|
|
1854
2085
|
super();
|
|
1855
|
-
const o = new
|
|
2086
|
+
const o = new b(1.2, 0.5, 1.2);
|
|
1856
2087
|
o.translate(0, 0.25, 0);
|
|
1857
|
-
const n = new
|
|
2088
|
+
const n = new b(1, t, 1);
|
|
1858
2089
|
n.translate(0, 0.5 + t / 2, 0);
|
|
1859
|
-
const r = new
|
|
1860
|
-
r.translate(0, 0.5 + t + 0.15, 0), this.copy(
|
|
2090
|
+
const r = new b(1.4, 0.3, 1.4);
|
|
2091
|
+
r.translate(0, 0.5 + t + 0.15, 0), this.copy(P([o, n, r], !1));
|
|
1861
2092
|
}
|
|
1862
2093
|
}
|
|
1863
|
-
class
|
|
2094
|
+
class gt extends A {
|
|
1864
2095
|
constructor({
|
|
1865
2096
|
barHeight: t = 2,
|
|
1866
2097
|
//
|
|
@@ -1871,13 +2102,13 @@ class wt extends S {
|
|
|
1871
2102
|
radialSegments: a = 8
|
|
1872
2103
|
} = {}) {
|
|
1873
2104
|
super();
|
|
1874
|
-
const i = new
|
|
2105
|
+
const i = new S(o, o, t, a);
|
|
1875
2106
|
i.translate(0, t / 2, 0);
|
|
1876
2107
|
const c = new Z(r, n, a);
|
|
1877
|
-
c.translate(0, t + n / 2, 0), c.scale(1, 1, s), this.copy(
|
|
2108
|
+
c.translate(0, t + n / 2, 0), c.scale(1, 1, s), this.copy(P([i, c], !1));
|
|
1878
2109
|
}
|
|
1879
2110
|
}
|
|
1880
|
-
class
|
|
2111
|
+
class _e extends A {
|
|
1881
2112
|
constructor({
|
|
1882
2113
|
count: t = 20,
|
|
1883
2114
|
//
|
|
@@ -1893,18 +2124,18 @@ class Pe extends S {
|
|
|
1893
2124
|
radialSegments: m = 8
|
|
1894
2125
|
} = {}) {
|
|
1895
2126
|
super();
|
|
1896
|
-
const h = [], f = new
|
|
1897
|
-
for (let
|
|
1898
|
-
const
|
|
1899
|
-
|
|
2127
|
+
const h = [], f = new gt({ barHeight: n, barRadius: r, spikeHeight: s, spikeRadius: a, spikeScaleZ: i, radialSegments: m }), p = new b(t * o, c, l);
|
|
2128
|
+
for (let x = 0; x < t; x++) {
|
|
2129
|
+
const I = f.clone();
|
|
2130
|
+
I.translate(x * o, 0, 0), h.push(I);
|
|
1900
2131
|
}
|
|
1901
2132
|
const d = p.clone();
|
|
1902
2133
|
d.translate(o * (t - 1) / 2, n - u - c / 2, 0), h.push(d);
|
|
1903
2134
|
const w = p.clone();
|
|
1904
|
-
w.translate(o * (t - 1) / 2, c / 2, 0), h.push(w), this.copy(
|
|
2135
|
+
w.translate(o * (t - 1) / 2, c / 2, 0), h.push(w), this.copy(P(h));
|
|
1905
2136
|
}
|
|
1906
2137
|
}
|
|
1907
|
-
class
|
|
2138
|
+
class Ue extends A {
|
|
1908
2139
|
constructor({
|
|
1909
2140
|
width: t = 5,
|
|
1910
2141
|
//
|
|
@@ -1915,7 +2146,7 @@ class Te extends S {
|
|
|
1915
2146
|
open: a = !1
|
|
1916
2147
|
} = {}) {
|
|
1917
2148
|
super();
|
|
1918
|
-
const i = o, c = t, l = n, u = new
|
|
2149
|
+
const i = o, c = t, l = n, u = new b(s, i, l), m = new b(c - 2 * s, s, l), h = u.clone();
|
|
1919
2150
|
h.translate(-c / 2 + s / 2, i / 2, 0);
|
|
1920
2151
|
const f = u.clone();
|
|
1921
2152
|
f.translate(c / 2 - s / 2, i / 2, 0);
|
|
@@ -1923,36 +2154,36 @@ class Te extends S {
|
|
|
1923
2154
|
p.translate(0, i - s / 2, 0);
|
|
1924
2155
|
const d = m.clone();
|
|
1925
2156
|
d.translate(0, s / 2, 0);
|
|
1926
|
-
const w = new
|
|
2157
|
+
const w = new b(c, i, s);
|
|
1927
2158
|
w.translate(0, i / 2, -l / 2 + s / 2);
|
|
1928
|
-
const
|
|
1929
|
-
for (let
|
|
1930
|
-
const
|
|
1931
|
-
|
|
2159
|
+
const x = [], I = (i - s) / (r + 1);
|
|
2160
|
+
for (let R = 1; R <= r; R++) {
|
|
2161
|
+
const B = m.clone();
|
|
2162
|
+
B.translate(0, s / 2 + R * I, 0), x.push(B);
|
|
1932
2163
|
}
|
|
1933
|
-
this.copy(
|
|
2164
|
+
this.copy(P([
|
|
1934
2165
|
h,
|
|
1935
2166
|
//
|
|
1936
2167
|
f,
|
|
1937
2168
|
p,
|
|
1938
2169
|
d,
|
|
1939
2170
|
...a ? [] : [w],
|
|
1940
|
-
...
|
|
2171
|
+
...x
|
|
1941
2172
|
], !1));
|
|
1942
2173
|
}
|
|
1943
2174
|
}
|
|
1944
|
-
class
|
|
2175
|
+
class Oe extends A {
|
|
1945
2176
|
constructor() {
|
|
1946
2177
|
super();
|
|
1947
|
-
const t = new
|
|
2178
|
+
const t = new b(5, 0.3, 3);
|
|
1948
2179
|
t.translate(0, 3.15, 0);
|
|
1949
2180
|
const o = [
|
|
1950
|
-
new
|
|
2181
|
+
new g(0.2, 0),
|
|
1951
2182
|
//
|
|
1952
|
-
new
|
|
1953
|
-
new
|
|
1954
|
-
new
|
|
1955
|
-
], n = new
|
|
2183
|
+
new g(0.25, 0.5),
|
|
2184
|
+
new g(0.15, 1.5),
|
|
2185
|
+
new g(0.3, 3)
|
|
2186
|
+
], n = new D(o, 32), s = P(
|
|
1956
2187
|
[
|
|
1957
2188
|
[2.1, 0, 1.1],
|
|
1958
2189
|
[-2.1, 0, 1.1],
|
|
@@ -1963,35 +2194,35 @@ class Ge extends S {
|
|
|
1963
2194
|
return i.translate(a[0], a[1], a[2]), i;
|
|
1964
2195
|
})
|
|
1965
2196
|
);
|
|
1966
|
-
this.copy(
|
|
2197
|
+
this.copy(P([t, s], !0));
|
|
1967
2198
|
}
|
|
1968
2199
|
}
|
|
1969
|
-
function
|
|
1970
|
-
e.deleteAttribute("uv"), e.deleteAttribute("normal"), e =
|
|
2200
|
+
function Le(e, t = mt.XYZ, o = 0.5, n = 2) {
|
|
2201
|
+
e.deleteAttribute("uv"), e.deleteAttribute("normal"), e = Ae(e), e.computeVertexNormals();
|
|
1971
2202
|
const r = e.getAttribute("position");
|
|
1972
2203
|
for (let s = 0; s < r.count; s++) {
|
|
1973
|
-
const a = new
|
|
2204
|
+
const a = new v().fromBufferAttribute(r, s), i = Math.random() * (n - o) + o, c = t.clone().multiplyScalar(i);
|
|
1974
2205
|
a.add(c), r.setXYZ(s, a.x, a.y, a.z);
|
|
1975
2206
|
}
|
|
1976
2207
|
return r.needsUpdate = !0, e.computeVertexNormals(), e;
|
|
1977
2208
|
}
|
|
1978
|
-
class
|
|
2209
|
+
class ze extends A {
|
|
1979
2210
|
constructor(t = 1, o = 4, n = 4) {
|
|
1980
2211
|
super();
|
|
1981
2212
|
const r = new N(t, o, n);
|
|
1982
|
-
this.copy(
|
|
2213
|
+
this.copy(Le(r, mt.XYZ, 0.5, 1)), this.computeVertexNormals(), this.center();
|
|
1983
2214
|
}
|
|
1984
2215
|
}
|
|
1985
|
-
class
|
|
2216
|
+
class Fe extends A {
|
|
1986
2217
|
constructor(t = 0.1, o = 0.1, n = 0.4, r = 8) {
|
|
1987
2218
|
super();
|
|
1988
|
-
const s = new
|
|
2219
|
+
const s = new S(t * 0.6, o * 0.6, n, r);
|
|
1989
2220
|
s.translate(0, 0, 0);
|
|
1990
2221
|
const a = new N(t, r, r), i = a.clone(), c = a.clone(), l = a.clone(), u = a.clone();
|
|
1991
|
-
i.translate(0, n / 2 + t * 0.6, -t * 0.6), c.translate(0, n / 2 + t * 0.6, t * 0.6), l.translate(0, -n / 2 - o * 0.6, -o * 0.6), u.translate(0, -n / 2 - o * 0.6, o * 0.6), this.copy(
|
|
2222
|
+
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(P([s, i, c, l, u], !1));
|
|
1992
2223
|
}
|
|
1993
2224
|
}
|
|
1994
|
-
class
|
|
2225
|
+
class ke extends A {
|
|
1995
2226
|
constructor({
|
|
1996
2227
|
flaskRadius: t = 1,
|
|
1997
2228
|
//
|
|
@@ -2002,48 +2233,48 @@ class ze extends S {
|
|
|
2002
2233
|
} = {}) {
|
|
2003
2234
|
super();
|
|
2004
2235
|
const a = [
|
|
2005
|
-
new
|
|
2236
|
+
new g(0, 0),
|
|
2006
2237
|
// Bottom of the flask
|
|
2007
|
-
new
|
|
2238
|
+
new g(t * 0.875, 0),
|
|
2008
2239
|
// Flat base with minimum width
|
|
2009
|
-
new
|
|
2240
|
+
new g(t, 0.1),
|
|
2010
2241
|
// End of the rounded base
|
|
2011
|
-
new
|
|
2242
|
+
new g(o, n),
|
|
2012
2243
|
// Start of the straight neck
|
|
2013
|
-
new
|
|
2244
|
+
new g(o, n + r),
|
|
2014
2245
|
// End of the straight neck
|
|
2015
|
-
new
|
|
2246
|
+
new g(o * 1.1, n + r + 0.3)
|
|
2016
2247
|
// Slight outward lip at the top
|
|
2017
|
-
], i = new
|
|
2018
|
-
this.copy(
|
|
2248
|
+
], i = new D(a, s);
|
|
2249
|
+
this.copy(P([i], !1));
|
|
2019
2250
|
}
|
|
2020
2251
|
}
|
|
2021
|
-
class
|
|
2252
|
+
class De extends A {
|
|
2022
2253
|
constructor() {
|
|
2023
2254
|
super();
|
|
2024
|
-
const t = new N(1, 16, 16), o = new
|
|
2025
|
-
o.translate(0, 1.5, 0), o.rotateX(Math.PI / 2), this.copy(
|
|
2255
|
+
const t = new N(1, 16, 16), o = new S(0.2, 0.2, 2, 16, 1, !0);
|
|
2256
|
+
o.translate(0, 1.5, 0), o.rotateX(Math.PI / 2), this.copy(P([t, o], !1)), this.rotateX(-Math.PI / 2);
|
|
2026
2257
|
}
|
|
2027
2258
|
}
|
|
2028
|
-
class
|
|
2259
|
+
class qe extends A {
|
|
2029
2260
|
constructor() {
|
|
2030
2261
|
super();
|
|
2031
2262
|
const t = [
|
|
2032
|
-
new
|
|
2263
|
+
new g(1, 0),
|
|
2033
2264
|
// Bottom of the bowl
|
|
2034
|
-
new
|
|
2265
|
+
new g(1.2, 0.5),
|
|
2035
2266
|
// Slight flare at the base
|
|
2036
|
-
new
|
|
2267
|
+
new g(1.4, 1.5),
|
|
2037
2268
|
// Outer wall
|
|
2038
|
-
new
|
|
2269
|
+
new g(1.3, 1.8),
|
|
2039
2270
|
// Flared edge
|
|
2040
|
-
new
|
|
2271
|
+
new g(0.8, 1.8)
|
|
2041
2272
|
// Lip of the bowl
|
|
2042
|
-
], o = new
|
|
2043
|
-
n.rotateX(-Math.PI / 2), n.translate(0, 0, 0), this.copy(
|
|
2273
|
+
], o = new D(t, 12), n = new Tt(1, 12);
|
|
2274
|
+
n.rotateX(-Math.PI / 2), n.translate(0, 0, 0), this.copy(P([o, n], !1));
|
|
2044
2275
|
}
|
|
2045
2276
|
}
|
|
2046
|
-
class
|
|
2277
|
+
class Ve extends A {
|
|
2047
2278
|
constructor({
|
|
2048
2279
|
radius: t = 0.3,
|
|
2049
2280
|
//
|
|
@@ -2053,35 +2284,24 @@ class Fe extends S {
|
|
|
2053
2284
|
radialSegments: s = 16
|
|
2054
2285
|
} = {}) {
|
|
2055
2286
|
super();
|
|
2056
|
-
const a = new
|
|
2287
|
+
const a = new pt(t, r, 8, s);
|
|
2057
2288
|
a.rotateX(Math.PI / 2), a.translate(0, o, 0);
|
|
2058
|
-
const i = new
|
|
2289
|
+
const i = new S(r * 0.6, r * 0.6, o, s), c = [];
|
|
2059
2290
|
for (let l = 0; l < n; l++) {
|
|
2060
2291
|
const u = l / n * Math.PI * 2, m = i.clone();
|
|
2061
2292
|
m.translate(Math.cos(u) * t, o / 2, Math.sin(u) * t), c.push(m);
|
|
2062
2293
|
}
|
|
2063
|
-
this.copy(
|
|
2294
|
+
this.copy(P([a, ...c], !1));
|
|
2064
2295
|
}
|
|
2065
2296
|
}
|
|
2066
|
-
class
|
|
2297
|
+
class at extends A {
|
|
2067
2298
|
constructor(t = 0.2, o = 0.2, n = 3, r = 32, s = !0) {
|
|
2068
2299
|
super();
|
|
2069
|
-
const a = new
|
|
2070
|
-
i.translate(0, -(n / 2), 0), this.copy(
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
class Oe extends S {
|
|
2074
|
-
constructor({ radius: t = 0.5, neckRadius: o = 0.2, height: n = 3, neckHeight: r = 1, segments: s = 16 } = {}) {
|
|
2075
|
-
super();
|
|
2076
|
-
const a = n - r, i = new E(t, t, a, s);
|
|
2077
|
-
i.translate(0, a / 2, 0);
|
|
2078
|
-
const c = 0.3, l = new E(o, t, c, s);
|
|
2079
|
-
l.translate(0, a + c / 2, 0);
|
|
2080
|
-
const u = new E(o, o, r, s);
|
|
2081
|
-
u.translate(0, a + c + r / 2, 0), this.copy(T([i, l, u], !1));
|
|
2300
|
+
const a = new S(t, o, n, r, 1, s), i = new N(o, r, r / 2, 0, Math.PI * 2, Math.PI / 2, Math.PI / 2);
|
|
2301
|
+
i.translate(0, -(n / 2), 0), this.copy(P([a, i], !1));
|
|
2082
2302
|
}
|
|
2083
2303
|
}
|
|
2084
|
-
class
|
|
2304
|
+
class He extends A {
|
|
2085
2305
|
constructor({
|
|
2086
2306
|
radius: t = 3,
|
|
2087
2307
|
//
|
|
@@ -2094,17 +2314,17 @@ class _e extends S {
|
|
|
2094
2314
|
super(), this.copy(new N(t, n, r, s, a, 0, Math.PI / 2)), this.scale(1, o / t, 1);
|
|
2095
2315
|
}
|
|
2096
2316
|
}
|
|
2097
|
-
const
|
|
2317
|
+
const Yo = (e, t) => e / (1 - Math.cos(t)), It = (e, t) => e / (2 * Math.sin(t)), Ye = (e, t) => e * (1 - Math.cos(t)), Xo = (e, t) => 2 * e * Math.sin(t), Zo = (e, t, o) => ({
|
|
2098
2318
|
x: e * Math.sin(o) * Math.cos(t),
|
|
2099
2319
|
y: e * Math.sin(o) * Math.sin(t),
|
|
2100
2320
|
z: e * Math.cos(o)
|
|
2101
|
-
}),
|
|
2321
|
+
}), jo = (e, t, o) => {
|
|
2102
2322
|
const n = Math.sqrt(e * e + t * t + o * o), r = Math.atan2(t, e), s = Math.acos(o / n);
|
|
2103
2323
|
return { radius: n, theta: r, phi: s };
|
|
2104
2324
|
};
|
|
2105
|
-
class
|
|
2325
|
+
class Xe extends A {
|
|
2106
2326
|
constructor({
|
|
2107
|
-
radius: t =
|
|
2327
|
+
radius: t = It(5, Math.PI / 10),
|
|
2108
2328
|
//
|
|
2109
2329
|
widthSegments: o = 64,
|
|
2110
2330
|
heightSegments: n = 32,
|
|
@@ -2113,11 +2333,11 @@ class Le extends S {
|
|
|
2113
2333
|
thetaLength: a = Math.PI / 10
|
|
2114
2334
|
} = {}) {
|
|
2115
2335
|
super(), this.copy(new N(t, o, n, r, s, 0, a));
|
|
2116
|
-
const i =
|
|
2336
|
+
const i = Ye(t, a);
|
|
2117
2337
|
this.translate(0, -t + i, 0);
|
|
2118
2338
|
}
|
|
2119
2339
|
}
|
|
2120
|
-
class
|
|
2340
|
+
class Ze extends A {
|
|
2121
2341
|
constructor({
|
|
2122
2342
|
trunkRadiusTop: t = 0.25,
|
|
2123
2343
|
trunkRadiusBottom: o = 0.4,
|
|
@@ -2129,146 +2349,194 @@ class qe extends S {
|
|
|
2129
2349
|
leafSpreadRadius: c = 1.5
|
|
2130
2350
|
} = {}) {
|
|
2131
2351
|
super();
|
|
2132
|
-
const l = new
|
|
2352
|
+
const l = new S(t, o, n, r);
|
|
2133
2353
|
l.translate(0, n / 2, 0);
|
|
2134
2354
|
const u = [];
|
|
2135
2355
|
for (let m = 0; m < a; m++) {
|
|
2136
|
-
const h = new
|
|
2356
|
+
const h = new ct(s, i);
|
|
2137
2357
|
h.translate(
|
|
2138
2358
|
(Math.random() - 0.5) * c,
|
|
2139
2359
|
(Math.random() - 0.5) * s + n,
|
|
2140
2360
|
(Math.random() - 0.5) * c
|
|
2141
2361
|
), u.push(h);
|
|
2142
2362
|
}
|
|
2143
|
-
this.copy(
|
|
2363
|
+
this.copy(P([l.toNonIndexed(), P(u, !1)], !0)), this.computeVertexNormals();
|
|
2144
2364
|
}
|
|
2145
2365
|
}
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
fragmentShader: `
|
|
2163
|
-
varying vec3 vNormal;
|
|
2164
|
-
varying vec3 vPosition;
|
|
2366
|
+
const je = {
|
|
2367
|
+
uniforms: {
|
|
2368
|
+
time: { value: 0 }
|
|
2369
|
+
},
|
|
2370
|
+
vertexShader: `
|
|
2371
|
+
varying vec3 vNormal;
|
|
2372
|
+
varying vec3 vPosition;
|
|
2373
|
+
void main() {
|
|
2374
|
+
vNormal = normalize(normal);
|
|
2375
|
+
vPosition = position;
|
|
2376
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
2377
|
+
}
|
|
2378
|
+
`,
|
|
2379
|
+
fragmentShader: `
|
|
2380
|
+
varying vec3 vNormal;
|
|
2381
|
+
varying vec3 vPosition;
|
|
2165
2382
|
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2383
|
+
// Simple 3D noise function
|
|
2384
|
+
float hash(vec3 p) {
|
|
2385
|
+
p = fract(p * 0.3183099 + vec3(0.71, 0.113, 0.419));
|
|
2386
|
+
p *= 17.0;
|
|
2387
|
+
return fract(p.x * p.y * p.z * (p.x + p.y + p.z));
|
|
2388
|
+
}
|
|
2172
2389
|
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2390
|
+
float noise(vec3 p) {
|
|
2391
|
+
vec3 ip = floor(p);
|
|
2392
|
+
vec3 fp = fract(p);
|
|
2393
|
+
fp = fp * fp * (3.0 - 2.0 * fp); // Smoothstep
|
|
2394
|
+
return mix(
|
|
2395
|
+
mix(mix(hash(ip), hash(ip + vec3(1.0, 0.0, 0.0)), fp.x),
|
|
2396
|
+
mix(hash(ip + vec3(0.0, 1.0, 0.0)), hash(ip + vec3(1.0, 1.0, 0.0)), fp.x), fp.y),
|
|
2397
|
+
mix(mix(hash(ip + vec3(0.0, 0.0, 1.0)), hash(ip + vec3(1.0, 0.0, 1.0)), fp.x),
|
|
2398
|
+
mix(hash(ip + vec3(0.0, 1.0, 1.0)), hash(ip + vec3(1.0, 1.0, 1.0)), fp.x), fp.y),
|
|
2399
|
+
fp.z);
|
|
2400
|
+
}
|
|
2184
2401
|
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2402
|
+
void main() {
|
|
2403
|
+
vec3 color = vec3(0.8, 0.8, 0.7); // Base moon color
|
|
2404
|
+
float n = noise(vPosition * 0.5); // Apply noise with frequency
|
|
2405
|
+
color *= 0.8 + 0.2 * n; // Modulate color by noise
|
|
2406
|
+
gl_FragColor = vec4(color, 1.0);
|
|
2407
|
+
}
|
|
2408
|
+
`
|
|
2409
|
+
};
|
|
2410
|
+
class Qo extends M {
|
|
2411
|
+
constructor() {
|
|
2412
|
+
super(
|
|
2413
|
+
new N(5, 32, 32),
|
|
2414
|
+
new J(je)
|
|
2415
|
+
);
|
|
2194
2416
|
}
|
|
2195
2417
|
}
|
|
2196
|
-
class
|
|
2418
|
+
class Ko extends M {
|
|
2197
2419
|
constructor({
|
|
2198
2420
|
width: t = 1,
|
|
2199
2421
|
height: o = 1.5,
|
|
2200
2422
|
depth: n = 0.5,
|
|
2201
2423
|
coverThickness: r = 0.05,
|
|
2202
2424
|
pageIndent: s = 0.05,
|
|
2203
|
-
coverColor: a =
|
|
2204
|
-
pageColor: i =
|
|
2425
|
+
coverColor: a = rt.DARK_RED,
|
|
2426
|
+
pageColor: i = rt.TITANIUM_WHITE
|
|
2205
2427
|
} = {}) {
|
|
2206
|
-
super(
|
|
2207
|
-
new
|
|
2208
|
-
|
|
2209
|
-
|
|
2428
|
+
super(
|
|
2429
|
+
new yt(t, o, n, r, s),
|
|
2430
|
+
[
|
|
2431
|
+
new y({ color: a, metalness: 0.1, roughness: 0.7, flatShading: !0 }),
|
|
2432
|
+
new y({ color: i, flatShading: !0 })
|
|
2433
|
+
]
|
|
2434
|
+
);
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
class $o extends M {
|
|
2438
|
+
constructor() {
|
|
2439
|
+
super(new Se(), [
|
|
2440
|
+
new y({
|
|
2441
|
+
color: 8965375,
|
|
2442
|
+
transparent: !0,
|
|
2443
|
+
depthWrite: !1,
|
|
2444
|
+
opacity: 0.5,
|
|
2445
|
+
roughness: 0.1,
|
|
2446
|
+
metalness: 0.3
|
|
2447
|
+
}),
|
|
2448
|
+
new y({
|
|
2449
|
+
color: 9127187,
|
|
2450
|
+
roughness: 1
|
|
2451
|
+
}),
|
|
2452
|
+
new y({
|
|
2453
|
+
color: rt.PINK_SHERBET,
|
|
2454
|
+
transparent: !0,
|
|
2455
|
+
depthWrite: !1,
|
|
2456
|
+
opacity: 0.5
|
|
2457
|
+
})
|
|
2458
|
+
]);
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
class Jo extends M {
|
|
2462
|
+
constructor() {
|
|
2463
|
+
super(
|
|
2464
|
+
new Pe(),
|
|
2465
|
+
new W({
|
|
2466
|
+
color: 5597999,
|
|
2467
|
+
roughness: 0.1,
|
|
2468
|
+
transmission: 0.9,
|
|
2469
|
+
// Makes the material transparent
|
|
2470
|
+
thickness: 0.2,
|
|
2471
|
+
metalness: 0,
|
|
2472
|
+
clearcoat: 1,
|
|
2473
|
+
clearcoatRoughness: 0.1
|
|
2474
|
+
})
|
|
2475
|
+
);
|
|
2210
2476
|
}
|
|
2211
2477
|
}
|
|
2212
|
-
class
|
|
2478
|
+
class Wo extends M {
|
|
2213
2479
|
constructor({
|
|
2214
2480
|
width: t = 0.4,
|
|
2215
2481
|
height: o = 1.2,
|
|
2216
|
-
depth: n = 0.2
|
|
2217
|
-
material: r = new M({ color: 7829367, roughness: 0.8 })
|
|
2482
|
+
depth: n = 0.2
|
|
2218
2483
|
} = {}) {
|
|
2219
|
-
|
|
2220
|
-
|
|
2484
|
+
super(
|
|
2485
|
+
new Te(t, o, n),
|
|
2486
|
+
new y({ color: 7829367, roughness: 0.8 })
|
|
2487
|
+
);
|
|
2221
2488
|
}
|
|
2222
2489
|
}
|
|
2223
|
-
class
|
|
2490
|
+
class tn extends M {
|
|
2224
2491
|
constructor() {
|
|
2225
|
-
super(
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
].forEach((x) => {
|
|
2239
|
-
const U = new y(u, m);
|
|
2240
|
-
U.position.set(x[0], x[1], x[2]), this.add(U);
|
|
2241
|
-
});
|
|
2242
|
-
const f = new j();
|
|
2243
|
-
f.moveTo(-1, 0), f.lineTo(-1, 2), f.absarc(0, 2, 1, Math.PI, 0, !0), f.lineTo(1, 0);
|
|
2244
|
-
const p = {
|
|
2245
|
-
depth: 0.5,
|
|
2246
|
-
bevelEnabled: !1
|
|
2247
|
-
}, d = new H(f, p), w = new M({ color: 4210752, flatShading: !0 }), v = new y(d, w);
|
|
2248
|
-
v.position.set(0, 0.5, 1.7), this.add(v);
|
|
2492
|
+
super(
|
|
2493
|
+
new Ge(),
|
|
2494
|
+
[
|
|
2495
|
+
new y({ color: 8421504, flatShading: !0 }),
|
|
2496
|
+
// Base
|
|
2497
|
+
new y({ color: 6908265, flatShading: !0 }),
|
|
2498
|
+
// Building
|
|
2499
|
+
new y({ color: 5263440, flatShading: !0 }),
|
|
2500
|
+
// Roof
|
|
2501
|
+
new y({ color: 4210752, flatShading: !0 })
|
|
2502
|
+
// Arched entrance
|
|
2503
|
+
]
|
|
2504
|
+
);
|
|
2249
2505
|
}
|
|
2250
2506
|
}
|
|
2251
|
-
class
|
|
2507
|
+
class en extends M {
|
|
2252
2508
|
constructor({ totalHeight: t = 1.75, baseWidth: o = 0.75 } = {}) {
|
|
2253
|
-
super(
|
|
2509
|
+
super(
|
|
2510
|
+
new Ce(t, o),
|
|
2511
|
+
new y({ color: 7829367, roughness: 0.8 })
|
|
2512
|
+
);
|
|
2254
2513
|
}
|
|
2255
2514
|
}
|
|
2256
|
-
class
|
|
2515
|
+
class on extends M {
|
|
2257
2516
|
constructor(t = 0.6, o = 1, n = 0.2, r = 0.6) {
|
|
2258
|
-
super(
|
|
2517
|
+
super(
|
|
2518
|
+
new Be(t, o, n, r),
|
|
2519
|
+
new y({ color: 7829367, roughness: 0.8 })
|
|
2520
|
+
);
|
|
2259
2521
|
}
|
|
2260
2522
|
}
|
|
2261
|
-
class
|
|
2523
|
+
class nn extends M {
|
|
2262
2524
|
constructor(t = 0.5, o = 0.8, n = 0.15) {
|
|
2263
|
-
super(
|
|
2525
|
+
super(
|
|
2526
|
+
new Re(t, o, n),
|
|
2527
|
+
new y({ color: 7829367, roughness: 0.8 })
|
|
2528
|
+
);
|
|
2264
2529
|
}
|
|
2265
2530
|
}
|
|
2266
|
-
class
|
|
2531
|
+
class sn extends M {
|
|
2267
2532
|
constructor({ height: t = 2.25 } = {}) {
|
|
2268
|
-
super(
|
|
2533
|
+
super(
|
|
2534
|
+
new Ne({ height: t }),
|
|
2535
|
+
new y({ color: 9141627, flatShading: !0 })
|
|
2536
|
+
);
|
|
2269
2537
|
}
|
|
2270
2538
|
}
|
|
2271
|
-
class
|
|
2539
|
+
class rn extends M {
|
|
2272
2540
|
constructor({
|
|
2273
2541
|
barHeight: t = 2,
|
|
2274
2542
|
//
|
|
@@ -2278,17 +2546,20 @@ class Zo extends y {
|
|
|
2278
2546
|
spikeScaleZ: s = 1,
|
|
2279
2547
|
radialSegments: a = 8
|
|
2280
2548
|
} = {}) {
|
|
2281
|
-
super(
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2549
|
+
super(
|
|
2550
|
+
new gt({
|
|
2551
|
+
barHeight: t,
|
|
2552
|
+
barRadius: o,
|
|
2553
|
+
spikeHeight: n,
|
|
2554
|
+
spikeRadius: r,
|
|
2555
|
+
spikeScaleZ: s,
|
|
2556
|
+
radialSegments: a
|
|
2557
|
+
}),
|
|
2558
|
+
new y({ color: 3355443, metalness: 0.8, roughness: 0.4 })
|
|
2559
|
+
);
|
|
2289
2560
|
}
|
|
2290
2561
|
}
|
|
2291
|
-
class
|
|
2562
|
+
class an extends M {
|
|
2292
2563
|
constructor({
|
|
2293
2564
|
count: t = 20,
|
|
2294
2565
|
//
|
|
@@ -2303,22 +2574,25 @@ class Yo extends y {
|
|
|
2303
2574
|
railOffset: u = 0,
|
|
2304
2575
|
radialSegments: m = 8
|
|
2305
2576
|
} = {}) {
|
|
2306
|
-
super(
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
}
|
|
2321
|
-
|
|
2577
|
+
super(
|
|
2578
|
+
new _e({
|
|
2579
|
+
count: t,
|
|
2580
|
+
spacing: o,
|
|
2581
|
+
barHeight: n,
|
|
2582
|
+
barRadius: r,
|
|
2583
|
+
spikeHeight: s,
|
|
2584
|
+
spikeRadius: a,
|
|
2585
|
+
spikeScaleZ: i,
|
|
2586
|
+
railHeight: c,
|
|
2587
|
+
railDepth: l,
|
|
2588
|
+
railOffset: u,
|
|
2589
|
+
radialSegments: m
|
|
2590
|
+
}),
|
|
2591
|
+
new y({ color: 3355443, metalness: 0.8, roughness: 0.4 })
|
|
2592
|
+
);
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
class cn extends M {
|
|
2322
2596
|
constructor({
|
|
2323
2597
|
width: t = 5,
|
|
2324
2598
|
//
|
|
@@ -2328,35 +2602,35 @@ class jo extends y {
|
|
|
2328
2602
|
frameThickness: s = 0.1,
|
|
2329
2603
|
open: a = !1
|
|
2330
2604
|
} = {}) {
|
|
2331
|
-
super(
|
|
2605
|
+
super(
|
|
2606
|
+
new Ue({ width: t, height: o, depth: n, shelves: r, frameThickness: s, open: a }),
|
|
2607
|
+
new y({ color: 9127187 })
|
|
2608
|
+
);
|
|
2332
2609
|
}
|
|
2333
2610
|
}
|
|
2334
|
-
class
|
|
2611
|
+
class ln extends M {
|
|
2335
2612
|
constructor() {
|
|
2336
|
-
super()
|
|
2337
|
-
|
|
2338
|
-
g(this, "material");
|
|
2339
|
-
this.geometry = new Ge(), this.material = [
|
|
2340
|
-
new M({ color: 9132587 }),
|
|
2613
|
+
super(new Oe(), [
|
|
2614
|
+
new y({ color: 9132587 }),
|
|
2341
2615
|
// Desk surface
|
|
2342
|
-
new
|
|
2616
|
+
new y({ color: 4929057 })
|
|
2343
2617
|
// Desk legs
|
|
2344
|
-
];
|
|
2618
|
+
]);
|
|
2345
2619
|
}
|
|
2346
2620
|
}
|
|
2347
|
-
class
|
|
2621
|
+
class un extends _ {
|
|
2348
2622
|
constructor(o = 1, n = 0.2) {
|
|
2349
2623
|
super();
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2624
|
+
E(this, "candle");
|
|
2625
|
+
E(this, "flame");
|
|
2626
|
+
E(this, "candleLight");
|
|
2627
|
+
E(this, "height");
|
|
2628
|
+
E(this, "radius");
|
|
2355
2629
|
this.height = o, this.radius = n;
|
|
2356
|
-
const r = new
|
|
2357
|
-
this.candle = new
|
|
2358
|
-
const a = new N(0.05, 16, 16), i = new
|
|
2359
|
-
this.flame = new
|
|
2630
|
+
const r = new S(this.radius, this.radius, this.height, 32), s = new y({ color: 16777215 });
|
|
2631
|
+
this.candle = new M(r, s), this.candle.position.set(0, this.height / 2, 0), this.add(this.candle);
|
|
2632
|
+
const a = new N(0.05, 16, 16), i = new Gt({ color: 16753920 });
|
|
2633
|
+
this.flame = new M(a, i), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new dt(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight), this.animateFlicker();
|
|
2360
2634
|
}
|
|
2361
2635
|
animateFlicker() {
|
|
2362
2636
|
const o = () => {
|
|
@@ -2365,136 +2639,103 @@ class Qo extends G {
|
|
|
2365
2639
|
o();
|
|
2366
2640
|
}
|
|
2367
2641
|
}
|
|
2368
|
-
class
|
|
2642
|
+
class mn extends _ {
|
|
2369
2643
|
constructor(t = 1.3, o = 0.5) {
|
|
2370
2644
|
super();
|
|
2371
|
-
const n = new
|
|
2645
|
+
const n = new S(o, o, 0.2, 16), r = new y({ color: 9127187, flatShading: !0 }), s = new M(n, r);
|
|
2372
2646
|
s.position.set(0, 0, 0), this.add(s);
|
|
2373
|
-
const a = new
|
|
2647
|
+
const a = new S(o * 0.9, o * 0.9, t), i = new y({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), c = new M(a, i);
|
|
2374
2648
|
c.position.set(0, t / 2 + 0.1, 0), this.add(c);
|
|
2375
|
-
const l = new Z(o * 1.1, 0.5, 8), u = new
|
|
2649
|
+
const l = new Z(o * 1.1, 0.5, 8), u = new y({ color: 9127187, flatShading: !0 }), m = new M(l, u);
|
|
2376
2650
|
m.position.set(0, t + 0.35, 0), this.add(m);
|
|
2377
|
-
const h = new
|
|
2651
|
+
const h = new pt(o * 0.8, 0.05, 8, 16), f = new y({ color: 9127187, flatShading: !0 }), p = new M(h, f);
|
|
2378
2652
|
p.position.set(0, t + 0.85, 0), this.add(p);
|
|
2379
|
-
const d = new
|
|
2653
|
+
const d = new dt(16755200, 1.5, 15);
|
|
2380
2654
|
d.position.set(0, t / 2 + 0.1, 0), d.castShadow = !0, this.add(d);
|
|
2381
2655
|
}
|
|
2382
2656
|
}
|
|
2383
|
-
class
|
|
2657
|
+
class hn extends _ {
|
|
2384
2658
|
constructor() {
|
|
2385
2659
|
super();
|
|
2386
|
-
const t = new
|
|
2660
|
+
const t = new ct(1, 0), o = new y({ color: 8421504, flatShading: !0 }), n = new y({ color: 4950843, flatShading: !0, opacity: 0.8, transparent: !0 });
|
|
2387
2661
|
for (let r = 0; r < 5; r++) {
|
|
2388
|
-
const s = new
|
|
2662
|
+
const s = new M(t, o);
|
|
2389
2663
|
s.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), s.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), s.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(s);
|
|
2390
|
-
const a = new
|
|
2664
|
+
const a = new M(t, n);
|
|
2391
2665
|
a.scale.set(s.scale.x * 0.9, s.scale.y * 0.5, s.scale.z * 0.9), a.rotation.copy(s.rotation), a.position.copy(s.position), a.position.y += 0.3, this.add(a);
|
|
2392
2666
|
}
|
|
2393
2667
|
}
|
|
2394
2668
|
}
|
|
2395
|
-
class
|
|
2669
|
+
class fn extends M {
|
|
2396
2670
|
constructor(t = 1, o = 4, n = 4) {
|
|
2397
|
-
super(
|
|
2671
|
+
super(
|
|
2672
|
+
new ze(t, o, n),
|
|
2673
|
+
new y({ color: 8421504, flatShading: !0 })
|
|
2674
|
+
);
|
|
2398
2675
|
}
|
|
2399
2676
|
}
|
|
2400
|
-
class
|
|
2677
|
+
class pn extends _ {
|
|
2401
2678
|
constructor() {
|
|
2402
2679
|
super();
|
|
2403
|
-
const t = new
|
|
2680
|
+
const t = new ct(1, 0), o = new y({ color: 8421504, flatShading: !0 });
|
|
2404
2681
|
for (let n = 0; n < 5; n++) {
|
|
2405
|
-
const r = new
|
|
2682
|
+
const r = new M(t, o);
|
|
2406
2683
|
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);
|
|
2407
2684
|
}
|
|
2408
2685
|
}
|
|
2409
2686
|
}
|
|
2410
|
-
class
|
|
2687
|
+
class dn extends _ {
|
|
2411
2688
|
constructor() {
|
|
2412
2689
|
super();
|
|
2413
|
-
const t =
|
|
2414
|
-
new I(0, 0),
|
|
2415
|
-
// Bottom
|
|
2416
|
-
new I(0.8, 0),
|
|
2417
|
-
// Base
|
|
2418
|
-
new I(1, 1.5),
|
|
2419
|
-
// Rounded body
|
|
2420
|
-
new I(0.5, 2.2),
|
|
2421
|
-
// Neck
|
|
2422
|
-
new I(0.6, 2.5)
|
|
2423
|
-
// Mouth
|
|
2424
|
-
], o = new Y(t, 10), n = new E(0.3, 0.4, 0.2, 8), r = new M({
|
|
2425
|
-
color: 8965375,
|
|
2426
|
-
transparent: !0,
|
|
2427
|
-
opacity: 0.5,
|
|
2428
|
-
roughness: 0.1,
|
|
2429
|
-
metalness: 0.3
|
|
2430
|
-
}), s = new M({
|
|
2431
|
-
color: 16724838,
|
|
2432
|
-
// Vibrant potion color
|
|
2433
|
-
transparent: !0,
|
|
2434
|
-
opacity: 0.6
|
|
2435
|
-
}), a = new M({
|
|
2436
|
-
color: 9127187,
|
|
2437
|
-
roughness: 1
|
|
2438
|
-
}), i = new y(o, r);
|
|
2439
|
-
i.castShadow = !0;
|
|
2440
|
-
const c = new y(o, s), l = new y(n, a);
|
|
2441
|
-
c.scale.set(0.8, 0.8, 0.8), c.position.y = 0.1, l.position.y = 2.5;
|
|
2442
|
-
const u = new G();
|
|
2443
|
-
u.add(i, c, l), this.add(u);
|
|
2444
|
-
}
|
|
2445
|
-
}
|
|
2446
|
-
class en extends G {
|
|
2447
|
-
constructor() {
|
|
2448
|
-
super();
|
|
2449
|
-
const t = new E(0.3, 0.4, 0.1, 16), o = new M({
|
|
2690
|
+
const t = new S(0.3, 0.4, 0.1, 16), o = new y({
|
|
2450
2691
|
color: 3355443,
|
|
2451
2692
|
roughness: 0.6,
|
|
2452
2693
|
metalness: 0.3
|
|
2453
|
-
}), n = new
|
|
2694
|
+
}), n = new M(t, o);
|
|
2454
2695
|
n.position.y = 0.05;
|
|
2455
|
-
const r = new
|
|
2696
|
+
const r = new S(0.1, 0.1, 0.7, 16), s = new y({
|
|
2456
2697
|
color: 5592405,
|
|
2457
2698
|
roughness: 0.5,
|
|
2458
2699
|
metalness: 0.4
|
|
2459
|
-
}), a = new
|
|
2700
|
+
}), a = new M(r, s);
|
|
2460
2701
|
a.position.y = 0.4;
|
|
2461
|
-
const i = new Z(0.075, 0.2, 16), c = new
|
|
2702
|
+
const i = new Z(0.075, 0.2, 16), c = new y({
|
|
2462
2703
|
color: 16733440,
|
|
2463
2704
|
emissive: 16733440,
|
|
2464
2705
|
emissiveIntensity: 0.6,
|
|
2465
2706
|
transparent: !0,
|
|
2466
2707
|
opacity: 0.8
|
|
2467
|
-
}), l = new
|
|
2708
|
+
}), l = new M(i, c);
|
|
2468
2709
|
l.position.y = 0.8, this.add(n, a, l);
|
|
2469
2710
|
}
|
|
2470
2711
|
}
|
|
2471
|
-
class
|
|
2712
|
+
class Mn extends _ {
|
|
2472
2713
|
constructor() {
|
|
2473
2714
|
super();
|
|
2474
|
-
const t = new
|
|
2715
|
+
const t = new b(3, 4, 0.1), o = new y({
|
|
2475
2716
|
color: 3026478,
|
|
2476
2717
|
roughness: 0.8,
|
|
2477
2718
|
metalness: 0.6
|
|
2478
|
-
}), n = new
|
|
2719
|
+
}), n = new b(0.2, 0.5, 0.2), r = new y({
|
|
2479
2720
|
color: 11184810,
|
|
2480
2721
|
roughness: 0.5,
|
|
2481
2722
|
metalness: 0.7
|
|
2482
|
-
}), s = new
|
|
2723
|
+
}), s = new S(0.3, 0.3, 0.1, 16), a = new y({
|
|
2483
2724
|
color: 5592405,
|
|
2484
2725
|
roughness: 0.7,
|
|
2485
2726
|
metalness: 0.5
|
|
2486
|
-
}), i = new
|
|
2727
|
+
}), i = new M(t, o);
|
|
2487
2728
|
for (let w = -1; w <= 1; w++) {
|
|
2488
|
-
const
|
|
2489
|
-
|
|
2729
|
+
const x = new M(n, r);
|
|
2730
|
+
x.position.set(w, 1.5, 0.1), i.add(x);
|
|
2490
2731
|
}
|
|
2491
|
-
const c = new
|
|
2732
|
+
const c = new M(s, a);
|
|
2492
2733
|
c.rotation.x = Math.PI / 2, c.position.set(0, 0.5, 0.15), i.add(c);
|
|
2493
|
-
const l = new N(0.15, 8, 8), u = new
|
|
2734
|
+
const l = new N(0.15, 8, 8), u = new y({
|
|
2494
2735
|
color: 16711680,
|
|
2495
2736
|
emissive: 16711680,
|
|
2496
2737
|
emissiveIntensity: 0.5
|
|
2497
|
-
}), m = new
|
|
2738
|
+
}), m = new M(l, u);
|
|
2498
2739
|
m.position.set(0, -1, 0.1), i.add(m), this.add(i);
|
|
2499
2740
|
let h = 0.015, f = 0.8, p = 0.2;
|
|
2500
2741
|
function d() {
|
|
@@ -2505,7 +2746,7 @@ class on extends G {
|
|
|
2505
2746
|
d();
|
|
2506
2747
|
}
|
|
2507
2748
|
}
|
|
2508
|
-
class
|
|
2749
|
+
class yn extends M {
|
|
2509
2750
|
constructor({
|
|
2510
2751
|
flaskRadius: t = 1,
|
|
2511
2752
|
//
|
|
@@ -2514,148 +2755,151 @@ class nn extends y {
|
|
|
2514
2755
|
neckHeight: r = 1,
|
|
2515
2756
|
radialSegments: s = 16
|
|
2516
2757
|
} = {}) {
|
|
2517
|
-
super(
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2758
|
+
super(
|
|
2759
|
+
new ke({ flaskRadius: t, neckRadius: o, height: n, neckHeight: r, radialSegments: s }),
|
|
2760
|
+
new W({
|
|
2761
|
+
color: 8965375,
|
|
2762
|
+
transparent: !0,
|
|
2763
|
+
opacity: 0.4,
|
|
2764
|
+
roughness: 0.1,
|
|
2765
|
+
metalness: 0.1,
|
|
2766
|
+
reflectivity: 0.8,
|
|
2767
|
+
transmission: 0.9,
|
|
2768
|
+
side: k,
|
|
2769
|
+
wireframe: !1
|
|
2770
|
+
})
|
|
2771
|
+
);
|
|
2528
2772
|
}
|
|
2529
2773
|
}
|
|
2530
|
-
class
|
|
2774
|
+
class wn extends _ {
|
|
2531
2775
|
constructor() {
|
|
2532
2776
|
super();
|
|
2533
2777
|
const t = [
|
|
2534
|
-
new
|
|
2778
|
+
new g(0, 0),
|
|
2535
2779
|
// Bottom of the flask
|
|
2536
|
-
new
|
|
2780
|
+
new g(1.2, 0),
|
|
2537
2781
|
// Base
|
|
2538
|
-
new
|
|
2782
|
+
new g(1.5, 1.5),
|
|
2539
2783
|
// Mid-body
|
|
2540
|
-
new
|
|
2784
|
+
new g(1, 3),
|
|
2541
2785
|
// Narrow neck
|
|
2542
|
-
new
|
|
2786
|
+
new g(0.6, 3.5)
|
|
2543
2787
|
// Mouth of the flask
|
|
2544
|
-
], o = new
|
|
2788
|
+
], o = new D(t, 12), n = new S(0.6, 0.7, 0.3, 8), r = new y({
|
|
2545
2789
|
color: 8965290,
|
|
2546
2790
|
transparent: !0,
|
|
2547
2791
|
opacity: 0.4,
|
|
2548
2792
|
roughness: 0.1,
|
|
2549
2793
|
metalness: 0.5,
|
|
2550
2794
|
depthWrite: !1
|
|
2551
|
-
}), s = new
|
|
2795
|
+
}), s = new y({
|
|
2552
2796
|
color: 9127187,
|
|
2553
2797
|
roughness: 1
|
|
2554
|
-
}), a = new
|
|
2798
|
+
}), a = new M(o, r);
|
|
2555
2799
|
a.castShadow = !0;
|
|
2556
|
-
const i = new
|
|
2800
|
+
const i = new M(n, s);
|
|
2557
2801
|
i.position.y = 3.5, this.add(a, i);
|
|
2558
2802
|
}
|
|
2559
2803
|
}
|
|
2560
|
-
class
|
|
2804
|
+
class vn extends M {
|
|
2561
2805
|
constructor() {
|
|
2562
|
-
super(
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2806
|
+
super(
|
|
2807
|
+
new De(),
|
|
2808
|
+
new W({
|
|
2809
|
+
color: 8965375,
|
|
2810
|
+
transparent: !0,
|
|
2811
|
+
opacity: 0.4,
|
|
2812
|
+
roughness: 0.1,
|
|
2813
|
+
metalness: 0.1,
|
|
2814
|
+
reflectivity: 0.8,
|
|
2815
|
+
transmission: 0.9,
|
|
2816
|
+
side: k
|
|
2817
|
+
})
|
|
2818
|
+
);
|
|
2575
2819
|
}
|
|
2576
2820
|
}
|
|
2577
|
-
class
|
|
2821
|
+
class xn extends _ {
|
|
2578
2822
|
constructor() {
|
|
2579
2823
|
super();
|
|
2580
|
-
const t = new
|
|
2824
|
+
const t = new b(2, 3, 0.1), o = new y({
|
|
2581
2825
|
color: 3355443,
|
|
2582
2826
|
roughness: 0.8,
|
|
2583
2827
|
metalness: 0.5
|
|
2584
|
-
}), n = new
|
|
2828
|
+
}), n = new M(t, o), r = new S(0.1, 0.1, 0.2, 8), s = new S(0.05, 0.05, 1, 8), a = new y({
|
|
2585
2829
|
color: 11184810,
|
|
2586
2830
|
roughness: 0.5,
|
|
2587
2831
|
metalness: 0.7
|
|
2588
2832
|
});
|
|
2589
2833
|
for (let i = -0.5; i <= 0.5; i += 0.5) {
|
|
2590
|
-
const c = new
|
|
2834
|
+
const c = new M(r, a);
|
|
2591
2835
|
c.position.set(i, 1, 0.1);
|
|
2592
|
-
const l = new
|
|
2836
|
+
const l = new M(s, a);
|
|
2593
2837
|
l.position.y = 0.5, c.add(l), this.add(c);
|
|
2594
2838
|
}
|
|
2595
2839
|
this.add(n);
|
|
2596
2840
|
}
|
|
2597
2841
|
}
|
|
2598
|
-
class
|
|
2842
|
+
class gn extends _ {
|
|
2599
2843
|
constructor() {
|
|
2600
2844
|
super();
|
|
2601
|
-
const t = new
|
|
2845
|
+
const t = new b(1, 0.2, 0.5), o = new y({
|
|
2602
2846
|
color: 4473924,
|
|
2603
2847
|
roughness: 0.6,
|
|
2604
2848
|
metalness: 0.3
|
|
2605
|
-
}), n = new
|
|
2849
|
+
}), n = new M(t, o);
|
|
2606
2850
|
n.position.y = 0.1;
|
|
2607
|
-
const r = new
|
|
2851
|
+
const r = new b(0.2, 1, 0.2), s = new M(r, o);
|
|
2608
2852
|
s.position.set(0, 0.6, -0.2);
|
|
2609
|
-
const a = new
|
|
2853
|
+
const a = new S(0.1, 0.1, 0.4, 8), i = new y({
|
|
2610
2854
|
color: 3355443,
|
|
2611
2855
|
roughness: 0.5,
|
|
2612
2856
|
metalness: 0.6
|
|
2613
|
-
}), c = new
|
|
2857
|
+
}), c = new M(a, i);
|
|
2614
2858
|
c.position.set(0, 1.1, -0.35), c.rotation.x = -Math.PI / 4;
|
|
2615
|
-
const l = new
|
|
2859
|
+
const l = new b(0.6, 0.1, 0.6), u = new y({
|
|
2616
2860
|
color: 5592405,
|
|
2617
2861
|
roughness: 0.8,
|
|
2618
2862
|
metalness: 0.2
|
|
2619
|
-
}), m = new
|
|
2863
|
+
}), m = new M(l, u);
|
|
2620
2864
|
m.position.set(0, 0.6, 0), this.add(n, s, c, m);
|
|
2621
2865
|
}
|
|
2622
2866
|
}
|
|
2623
|
-
class
|
|
2867
|
+
class In extends _ {
|
|
2624
2868
|
constructor() {
|
|
2625
2869
|
super();
|
|
2626
|
-
const t = new
|
|
2870
|
+
const t = new qe(), o = new S(0.2, 0.3, 1.5, 8);
|
|
2627
2871
|
o.translate(0, 0.75, 0);
|
|
2628
|
-
const n = new
|
|
2872
|
+
const n = new y({
|
|
2629
2873
|
color: 6045747,
|
|
2630
2874
|
// Dark earthy tone
|
|
2631
2875
|
roughness: 1,
|
|
2632
2876
|
metalness: 0,
|
|
2633
|
-
side:
|
|
2877
|
+
side: k
|
|
2634
2878
|
// Render inside and outside
|
|
2635
|
-
}), r = new
|
|
2879
|
+
}), r = new y({
|
|
2636
2880
|
color: 9132587,
|
|
2637
2881
|
// Slightly lighter earthy color
|
|
2638
2882
|
roughness: 0.8,
|
|
2639
2883
|
metalness: 0.1
|
|
2640
|
-
}), s = new
|
|
2884
|
+
}), s = new M(t, n);
|
|
2641
2885
|
s.castShadow = !0;
|
|
2642
|
-
const a = new
|
|
2886
|
+
const a = new M(o, r);
|
|
2643
2887
|
a.castShadow = !0, a.position.set(0.3, 1.3, 0), a.rotation.z = Math.PI / 4, this.add(s, a);
|
|
2644
2888
|
}
|
|
2645
2889
|
}
|
|
2646
|
-
class
|
|
2890
|
+
class En extends M {
|
|
2647
2891
|
constructor({ width: o = 3, height: n = 4, depth: r = 0.1 } = {}) {
|
|
2648
2892
|
super();
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
this.geometry = new
|
|
2893
|
+
E(this, "geometry");
|
|
2894
|
+
E(this, "material");
|
|
2895
|
+
this.geometry = new b(o, n, r), this.material = new y({
|
|
2652
2896
|
color: 3026478,
|
|
2653
2897
|
roughness: 0.8,
|
|
2654
2898
|
metalness: 0.6
|
|
2655
2899
|
});
|
|
2656
2900
|
}
|
|
2657
2901
|
}
|
|
2658
|
-
class
|
|
2902
|
+
class An extends M {
|
|
2659
2903
|
constructor({
|
|
2660
2904
|
radius: o = 0.15,
|
|
2661
2905
|
//
|
|
@@ -2664,36 +2908,36 @@ class mn extends y {
|
|
|
2664
2908
|
emissiveIntensity: s = 0.5
|
|
2665
2909
|
} = {}) {
|
|
2666
2910
|
super();
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
this.geometry = new N(o, 8, 8), this.material = new
|
|
2911
|
+
E(this, "geometry");
|
|
2912
|
+
E(this, "material");
|
|
2913
|
+
this.geometry = new N(o, 8, 8), this.material = new y({
|
|
2670
2914
|
color: n,
|
|
2671
2915
|
emissive: r,
|
|
2672
2916
|
emissiveIntensity: s
|
|
2673
2917
|
});
|
|
2674
2918
|
}
|
|
2675
2919
|
}
|
|
2676
|
-
class
|
|
2920
|
+
class bn extends _ {
|
|
2677
2921
|
constructor() {
|
|
2678
2922
|
super();
|
|
2679
|
-
const t = 100, o = 0.05, n = new
|
|
2923
|
+
const t = 100, o = 0.05, n = new Ct(
|
|
2680
2924
|
Array.from({ length: t }, (l, u) => {
|
|
2681
2925
|
const m = u * 0.2;
|
|
2682
|
-
return new
|
|
2926
|
+
return new v(
|
|
2683
2927
|
Math.cos(m) * 0.4,
|
|
2684
2928
|
u * o,
|
|
2685
2929
|
// Gradual height increase
|
|
2686
2930
|
Math.sin(m) * 0.4
|
|
2687
2931
|
);
|
|
2688
2932
|
})
|
|
2689
|
-
), r = new
|
|
2933
|
+
), r = new Bt(n, 200, 0.1, 8, !1), s = new y({
|
|
2690
2934
|
color: 8965375,
|
|
2691
2935
|
transparent: !0,
|
|
2692
2936
|
opacity: 0.3,
|
|
2693
2937
|
roughness: 0.1,
|
|
2694
2938
|
metalness: 0.2,
|
|
2695
2939
|
emissive: 8965375
|
|
2696
|
-
}), a = new
|
|
2940
|
+
}), a = new M(r, s);
|
|
2697
2941
|
this.add(a);
|
|
2698
2942
|
function i() {
|
|
2699
2943
|
s.emissiveIntensity = 0.2 + Math.sin(Date.now() * 5e-3) * 0.1;
|
|
@@ -2704,114 +2948,98 @@ class hn extends G {
|
|
|
2704
2948
|
c();
|
|
2705
2949
|
}
|
|
2706
2950
|
}
|
|
2707
|
-
class
|
|
2951
|
+
class Sn extends M {
|
|
2708
2952
|
constructor({
|
|
2709
|
-
radius:
|
|
2953
|
+
radius: t = 0.3,
|
|
2710
2954
|
//
|
|
2711
|
-
height:
|
|
2712
|
-
count:
|
|
2713
|
-
thickness:
|
|
2714
|
-
radialSegments:
|
|
2955
|
+
height: o = 0.4,
|
|
2956
|
+
count: n = 3,
|
|
2957
|
+
thickness: r = 0.03,
|
|
2958
|
+
radialSegments: s = 16
|
|
2715
2959
|
} = {}) {
|
|
2716
|
-
super(
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2960
|
+
super(
|
|
2961
|
+
new Ve({ radius: t, height: o, count: n, thickness: r, radialSegments: s }),
|
|
2962
|
+
new y({
|
|
2963
|
+
color: 8947848,
|
|
2964
|
+
roughness: 0.7,
|
|
2965
|
+
metalness: 0.3
|
|
2966
|
+
})
|
|
2967
|
+
);
|
|
2724
2968
|
}
|
|
2725
2969
|
}
|
|
2726
|
-
class
|
|
2970
|
+
class Pn extends _ {
|
|
2727
2971
|
constructor() {
|
|
2728
2972
|
super();
|
|
2729
|
-
const t = new
|
|
2973
|
+
const t = new S(0.5, 0.6, 0.3, 16), o = new y({
|
|
2730
2974
|
color: 3355443,
|
|
2731
2975
|
roughness: 0.6,
|
|
2732
2976
|
metalness: 0.5
|
|
2733
|
-
}), n = new
|
|
2977
|
+
}), n = new M(t, o);
|
|
2734
2978
|
n.position.y = 0.15;
|
|
2735
|
-
const r = new
|
|
2979
|
+
const r = new S(0.15, 0.15, 2, 12, 1, !0), s = new y({
|
|
2736
2980
|
color: 16737792,
|
|
2737
2981
|
roughness: 0.5,
|
|
2738
2982
|
metalness: 0.8,
|
|
2739
|
-
side:
|
|
2740
|
-
}), a = new
|
|
2983
|
+
side: k
|
|
2984
|
+
}), a = new M(r, s);
|
|
2741
2985
|
a.position.y = 1.3;
|
|
2742
|
-
const i = new N(0.3, 16, 16), c = new
|
|
2986
|
+
const i = new N(0.3, 16, 16), c = new M(i, s);
|
|
2743
2987
|
c.position.y = 2.4, this.add(n, a, c);
|
|
2744
2988
|
}
|
|
2745
2989
|
}
|
|
2746
|
-
class
|
|
2990
|
+
class Tn extends M {
|
|
2747
2991
|
constructor(t = 0.2, o = 0.2, n = 3, r = 32) {
|
|
2748
|
-
super(
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2992
|
+
super(
|
|
2993
|
+
new at(t, o, n, r),
|
|
2994
|
+
new W({
|
|
2995
|
+
color: 8965375,
|
|
2996
|
+
transparent: !0,
|
|
2997
|
+
opacity: 0.4,
|
|
2998
|
+
roughness: 0.1,
|
|
2999
|
+
metalness: 0.1,
|
|
3000
|
+
reflectivity: 0.8,
|
|
3001
|
+
transmission: 0.9,
|
|
3002
|
+
depthWrite: !1,
|
|
3003
|
+
side: k
|
|
3004
|
+
})
|
|
3005
|
+
);
|
|
2762
3006
|
}
|
|
2763
3007
|
}
|
|
2764
|
-
class
|
|
3008
|
+
class Gn extends _ {
|
|
2765
3009
|
constructor(t = 3, o = [65450, 16711850, 11141375]) {
|
|
2766
3010
|
super();
|
|
2767
|
-
const n = new
|
|
3011
|
+
const n = new b(3, 0.2, 1), r = new y({
|
|
2768
3012
|
color: 9127187,
|
|
2769
3013
|
// Wooden color or change to metallic tone
|
|
2770
3014
|
roughness: 0.7,
|
|
2771
3015
|
metalness: 0.3
|
|
2772
|
-
}), s = new
|
|
3016
|
+
}), s = new M(n, r);
|
|
2773
3017
|
s.position.y = 0.5, s.castShadow = !0;
|
|
2774
|
-
const a = new
|
|
3018
|
+
const a = new at(0.1, 0.1, 1, 16), i = new y({
|
|
2775
3019
|
color: 11184810,
|
|
2776
3020
|
transparent: !0,
|
|
2777
3021
|
opacity: 0.4,
|
|
2778
3022
|
roughness: 0.1,
|
|
2779
3023
|
metalness: 0.5,
|
|
2780
3024
|
depthWrite: !1,
|
|
2781
|
-
side:
|
|
3025
|
+
side: k
|
|
2782
3026
|
});
|
|
2783
3027
|
for (let c = 0; c < t; c++) {
|
|
2784
|
-
const l = new
|
|
3028
|
+
const l = new M(a, i), u = (c - (t - 1) / 2) * 0.8;
|
|
2785
3029
|
l.position.set(u, 1, 0), l.castShadow = !0;
|
|
2786
|
-
const m = new
|
|
3030
|
+
const m = new at(0.099, 0.099, 0.5, 16, !1), h = o[c % o.length], f = new y({
|
|
2787
3031
|
color: h,
|
|
2788
3032
|
emissive: h,
|
|
2789
3033
|
emissiveIntensity: 0.5,
|
|
2790
3034
|
transparent: !0,
|
|
2791
3035
|
opacity: 0.6
|
|
2792
|
-
}), p = new
|
|
3036
|
+
}), p = new M(m, f);
|
|
2793
3037
|
p.position.set(0, -0.25, 0), l.add(p), s.add(l);
|
|
2794
3038
|
}
|
|
2795
3039
|
this.add(s);
|
|
2796
3040
|
}
|
|
2797
3041
|
}
|
|
2798
|
-
class
|
|
2799
|
-
constructor() {
|
|
2800
|
-
super();
|
|
2801
|
-
const t = new Oe(), o = new J({
|
|
2802
|
-
color: 5597999,
|
|
2803
|
-
roughness: 0.1,
|
|
2804
|
-
transmission: 0.9,
|
|
2805
|
-
// Makes the material transparent
|
|
2806
|
-
thickness: 0.2,
|
|
2807
|
-
metalness: 0,
|
|
2808
|
-
clearcoat: 1,
|
|
2809
|
-
clearcoatRoughness: 0.1
|
|
2810
|
-
});
|
|
2811
|
-
this.geometry = t, this.material = o;
|
|
2812
|
-
}
|
|
2813
|
-
}
|
|
2814
|
-
class De extends j {
|
|
3042
|
+
class Qe extends j {
|
|
2815
3043
|
constructor(t = 5, o = 0.5, n = 1) {
|
|
2816
3044
|
super();
|
|
2817
3045
|
const r = Math.PI * 2 / t, s = r / 2, a = r / 4;
|
|
@@ -2823,15 +3051,15 @@ class De extends j {
|
|
|
2823
3051
|
this.closePath();
|
|
2824
3052
|
}
|
|
2825
3053
|
}
|
|
2826
|
-
class
|
|
3054
|
+
class Cn extends M {
|
|
2827
3055
|
constructor(t = 5, o = 0.5, n = 1, r = 0.25) {
|
|
2828
3056
|
super();
|
|
2829
|
-
const s = new
|
|
3057
|
+
const s = new Qe(t, o, n), a = new Q(s, {
|
|
2830
3058
|
depth: r,
|
|
2831
3059
|
bevelEnabled: r > 0,
|
|
2832
3060
|
bevelThickness: 0,
|
|
2833
3061
|
bevelSize: 0
|
|
2834
|
-
}), i = new
|
|
3062
|
+
}), i = new y({
|
|
2835
3063
|
color: 16776960,
|
|
2836
3064
|
emissive: 16766720,
|
|
2837
3065
|
emissiveIntensity: 0.25,
|
|
@@ -2842,7 +3070,7 @@ class wn extends y {
|
|
|
2842
3070
|
a.center(), this.geometry = a, this.material = i;
|
|
2843
3071
|
}
|
|
2844
3072
|
}
|
|
2845
|
-
class
|
|
3073
|
+
class Ke extends j {
|
|
2846
3074
|
constructor(t = 5, o = 0.5, n = 1, r = 5, s = 0.25) {
|
|
2847
3075
|
super();
|
|
2848
3076
|
const a = Math.PI * 2 / t, i = a / 4;
|
|
@@ -2850,7 +3078,7 @@ class Ve extends j {
|
|
|
2850
3078
|
for (let c = 1; c <= t; ++c)
|
|
2851
3079
|
this.lineTo(Math.cos(a * c - i * 3) * o, -Math.sin(a * c - i * 3) * o), this.lineTo(Math.cos(a * c - i * 2) * o, -Math.sin(a * c - i * 2) * o), this.lineTo(Math.cos(a * c - i) * n, -Math.sin(a * c - i) * n), this.lineTo(Math.cos(a * c) * n, -Math.sin(a * c) * n);
|
|
2852
3080
|
if (this.closePath(), s > 0 && r > 2) {
|
|
2853
|
-
const c = new
|
|
3081
|
+
const c = new Rt(), l = Math.PI * 2 / r;
|
|
2854
3082
|
c.moveTo(Math.cos(0) * s, -Math.sin(0) * s);
|
|
2855
3083
|
for (let u = 1; u < r; ++u)
|
|
2856
3084
|
c.lineTo(Math.cos(l * u) * s, -Math.sin(l * u) * s);
|
|
@@ -2858,15 +3086,15 @@ class Ve extends j {
|
|
|
2858
3086
|
}
|
|
2859
3087
|
}
|
|
2860
3088
|
}
|
|
2861
|
-
class
|
|
3089
|
+
class Bn extends M {
|
|
2862
3090
|
constructor(t = 5, o = 0.5, n = 1, r = 5, s = 0.25, a = 0.25) {
|
|
2863
3091
|
super();
|
|
2864
|
-
const i = new
|
|
3092
|
+
const i = new Ke(t, o, n, r, s), c = new Q(i, {
|
|
2865
3093
|
depth: a,
|
|
2866
3094
|
bevelEnabled: a > 0,
|
|
2867
3095
|
bevelThickness: 0,
|
|
2868
3096
|
bevelSize: 0
|
|
2869
|
-
}), l = new
|
|
3097
|
+
}), l = new y({
|
|
2870
3098
|
color: 11184810,
|
|
2871
3099
|
metalness: 0.8,
|
|
2872
3100
|
roughness: 0.2
|
|
@@ -2874,7 +3102,7 @@ class vn extends y {
|
|
|
2874
3102
|
c.center(), this.geometry = c, this.material = l;
|
|
2875
3103
|
}
|
|
2876
3104
|
}
|
|
2877
|
-
class
|
|
3105
|
+
class $e extends j {
|
|
2878
3106
|
constructor(t = 1, o = 2.1, n = 1.4, r = 1.6) {
|
|
2879
3107
|
super(), this.moveTo(0, n * t / 3), this.bezierCurveTo(
|
|
2880
3108
|
-o * 0.375 * t,
|
|
@@ -2899,15 +3127,15 @@ class Xe extends j {
|
|
|
2899
3127
|
);
|
|
2900
3128
|
}
|
|
2901
3129
|
}
|
|
2902
|
-
class
|
|
3130
|
+
class Rn extends M {
|
|
2903
3131
|
constructor(t = 1, o = 1, n = 1, r = 10, s = 0.25) {
|
|
2904
3132
|
super();
|
|
2905
|
-
const a = new
|
|
3133
|
+
const a = new $e(t, o, n, r), i = new Q(a, {
|
|
2906
3134
|
depth: s,
|
|
2907
3135
|
bevelEnabled: s > 0,
|
|
2908
3136
|
bevelThickness: 0,
|
|
2909
3137
|
bevelSize: 0
|
|
2910
|
-
}), c = new
|
|
3138
|
+
}), c = new y({
|
|
2911
3139
|
color: 12986408,
|
|
2912
3140
|
emissive: 12981270,
|
|
2913
3141
|
emissiveIntensity: 0.25,
|
|
@@ -2918,7 +3146,7 @@ class xn extends y {
|
|
|
2918
3146
|
i.center(), this.geometry = i, this.material = c;
|
|
2919
3147
|
}
|
|
2920
3148
|
}
|
|
2921
|
-
class
|
|
3149
|
+
class Je extends j {
|
|
2922
3150
|
constructor(t = 5, o = 0.5, n = 1) {
|
|
2923
3151
|
super();
|
|
2924
3152
|
const r = Math.PI * 2 / t, s = r / 2;
|
|
@@ -2928,15 +3156,15 @@ class Ze extends j {
|
|
|
2928
3156
|
this.closePath();
|
|
2929
3157
|
}
|
|
2930
3158
|
}
|
|
2931
|
-
class
|
|
3159
|
+
class Nn extends M {
|
|
2932
3160
|
constructor(t = 5, o = 0.5, n = 1, r = 0.25) {
|
|
2933
3161
|
super();
|
|
2934
|
-
const s = new
|
|
3162
|
+
const s = new Je(t, o, n), a = new Q(s, {
|
|
2935
3163
|
depth: r,
|
|
2936
3164
|
bevelEnabled: r > 0,
|
|
2937
3165
|
bevelThickness: 0,
|
|
2938
3166
|
bevelSize: 0
|
|
2939
|
-
}), i = new
|
|
3167
|
+
}), i = new y({
|
|
2940
3168
|
color: 16776960,
|
|
2941
3169
|
emissive: 16766720,
|
|
2942
3170
|
emissiveIntensity: 0.25,
|
|
@@ -2947,12 +3175,12 @@ class gn extends y {
|
|
|
2947
3175
|
a.center(), this.geometry = a, this.material = i;
|
|
2948
3176
|
}
|
|
2949
3177
|
}
|
|
2950
|
-
class
|
|
3178
|
+
class _n extends M {
|
|
2951
3179
|
constructor() {
|
|
2952
|
-
super(
|
|
3180
|
+
super(new Fe(), new y({ color: 16777215 }));
|
|
2953
3181
|
}
|
|
2954
3182
|
}
|
|
2955
|
-
class
|
|
3183
|
+
class Un extends M {
|
|
2956
3184
|
constructor({
|
|
2957
3185
|
trunkRadiusTop: t = 0.25,
|
|
2958
3186
|
trunkRadiusBottom: o = 0.4,
|
|
@@ -2965,31 +3193,35 @@ class In extends y {
|
|
|
2965
3193
|
leafSpreadRadius: l = 1.5,
|
|
2966
3194
|
leafColor: u = 2263842
|
|
2967
3195
|
} = {}) {
|
|
2968
|
-
super(
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
3196
|
+
super(
|
|
3197
|
+
new Ze({
|
|
3198
|
+
trunkRadiusTop: t,
|
|
3199
|
+
trunkRadiusBottom: o,
|
|
3200
|
+
trunkHeight: n,
|
|
3201
|
+
trunkSegments: r,
|
|
3202
|
+
leafSize: a,
|
|
3203
|
+
leafCount: i,
|
|
3204
|
+
leafDetail: c,
|
|
3205
|
+
leafSpreadRadius: l
|
|
3206
|
+
}),
|
|
3207
|
+
[
|
|
3208
|
+
new y({
|
|
3209
|
+
color: s,
|
|
3210
|
+
roughness: 0.9,
|
|
3211
|
+
metalness: 0,
|
|
3212
|
+
flatShading: !0
|
|
3213
|
+
}),
|
|
3214
|
+
new y({
|
|
3215
|
+
color: u,
|
|
3216
|
+
roughness: 0.8,
|
|
3217
|
+
metalness: 0,
|
|
3218
|
+
flatShading: !0
|
|
3219
|
+
})
|
|
3220
|
+
]
|
|
3221
|
+
);
|
|
2990
3222
|
}
|
|
2991
3223
|
}
|
|
2992
|
-
class
|
|
3224
|
+
class On extends M {
|
|
2993
3225
|
constructor({
|
|
2994
3226
|
radius: t = 3,
|
|
2995
3227
|
//
|
|
@@ -2999,19 +3231,19 @@ class An extends y {
|
|
|
2999
3231
|
phiStart: s = 0,
|
|
3000
3232
|
phiLength: a = Math.PI * 2
|
|
3001
3233
|
} = {}) {
|
|
3002
|
-
super(), this.geometry = new
|
|
3234
|
+
super(), this.geometry = new He({
|
|
3003
3235
|
radius: t,
|
|
3004
3236
|
height: o,
|
|
3005
3237
|
widthSegments: n,
|
|
3006
3238
|
heightSegments: r,
|
|
3007
3239
|
phiStart: s,
|
|
3008
3240
|
phiLength: a
|
|
3009
|
-
}), this.material = new
|
|
3241
|
+
}), this.material = new y({ color: 65280, flatShading: !0 });
|
|
3010
3242
|
}
|
|
3011
3243
|
}
|
|
3012
|
-
class
|
|
3244
|
+
class Ln extends M {
|
|
3013
3245
|
constructor({
|
|
3014
|
-
radius: t =
|
|
3246
|
+
radius: t = It(5, Math.PI / 10),
|
|
3015
3247
|
//
|
|
3016
3248
|
widthSegments: o = 64,
|
|
3017
3249
|
heightSegments: n = 32,
|
|
@@ -3019,17 +3251,17 @@ class Sn extends y {
|
|
|
3019
3251
|
phiLength: s = Math.PI * 2,
|
|
3020
3252
|
thetaLength: a = Math.PI / 10
|
|
3021
3253
|
} = {}) {
|
|
3022
|
-
super(), this.geometry = new
|
|
3254
|
+
super(), this.geometry = new Xe({
|
|
3023
3255
|
radius: t,
|
|
3024
3256
|
widthSegments: o,
|
|
3025
3257
|
heightSegments: n,
|
|
3026
3258
|
phiStart: r,
|
|
3027
3259
|
phiLength: s,
|
|
3028
3260
|
thetaLength: a
|
|
3029
|
-
}), this.material = new
|
|
3261
|
+
}), this.material = new y({ color: 65280, flatShading: !0 });
|
|
3030
3262
|
}
|
|
3031
3263
|
}
|
|
3032
|
-
function
|
|
3264
|
+
function zn(e, { time: t = 0, waveFrequency: o = 0.2, waveAmplitude: n = 0.5 } = {}) {
|
|
3033
3265
|
e.onBeforeCompile = (r) => {
|
|
3034
3266
|
r.uniforms.time = { value: t }, r.uniforms.waveFrequency = { value: o }, r.uniforms.waveAmplitude = { value: n }, r.vertexShader = `
|
|
3035
3267
|
uniform float time;
|
|
@@ -3053,10 +3285,10 @@ function En(e, { time: t = 0, waveFrequency: o = 0.2, waveAmplitude: n = 0.5 } =
|
|
|
3053
3285
|
), e.userData.shader = r;
|
|
3054
3286
|
};
|
|
3055
3287
|
}
|
|
3056
|
-
function
|
|
3288
|
+
function Fn(e, t) {
|
|
3057
3289
|
e.userData.shader && (e.userData.shader.uniforms.time.value += t);
|
|
3058
3290
|
}
|
|
3059
|
-
function
|
|
3291
|
+
function kn(e, { time: t = 0, intensity: o = 1, axis: n = mt.XYZ, scale: r = 10 } = {}) {
|
|
3060
3292
|
e.onBeforeCompile = (s) => {
|
|
3061
3293
|
s.uniforms.time = { value: t }, s.uniforms.axis = { value: n }, s.uniforms.intensity = { value: o }, s.uniforms.scale = { value: r }, s.vertexShader = `
|
|
3062
3294
|
uniform float time;
|
|
@@ -3100,17 +3332,17 @@ function Tn(e, { time: t = 0, intensity: o = 1, axis: n = lt.XYZ, scale: r = 10
|
|
|
3100
3332
|
), e.userData.shader = s;
|
|
3101
3333
|
};
|
|
3102
3334
|
}
|
|
3103
|
-
function
|
|
3335
|
+
function Dn(e, t) {
|
|
3104
3336
|
e.userData.shader && (e.userData.shader.uniforms.time.value += t);
|
|
3105
3337
|
}
|
|
3106
|
-
const
|
|
3338
|
+
const ot = {
|
|
3107
3339
|
uniforms: {
|
|
3108
3340
|
turbidity: { value: 10 },
|
|
3109
3341
|
rayleigh: { value: 2 },
|
|
3110
3342
|
mieCoefficient: { value: 5e-3 },
|
|
3111
3343
|
mieDirectionalG: { value: 0.8 },
|
|
3112
|
-
sunPosition: { value: new
|
|
3113
|
-
up: { value: new
|
|
3344
|
+
sunPosition: { value: new v().setFromSphericalCoords(1, L.degToRad(90), L.degToRad(180)) },
|
|
3345
|
+
up: { value: new v(0, 1, 0) }
|
|
3114
3346
|
},
|
|
3115
3347
|
vertexShader: `
|
|
3116
3348
|
uniform vec3 sunPosition;
|
|
@@ -3265,10 +3497,10 @@ const et = {
|
|
|
3265
3497
|
#include <colorspace_fragment>
|
|
3266
3498
|
}
|
|
3267
3499
|
`
|
|
3268
|
-
},
|
|
3500
|
+
}, nt = {
|
|
3269
3501
|
uniforms: {
|
|
3270
|
-
topColor: { value: new
|
|
3271
|
-
bottomColor: { value: new
|
|
3502
|
+
topColor: { value: new $(0.5, 0.8, 1) },
|
|
3503
|
+
bottomColor: { value: new $(1, 1, 1) }
|
|
3272
3504
|
},
|
|
3273
3505
|
vertexShader: `
|
|
3274
3506
|
varying vec3 vPosition;
|
|
@@ -3286,7 +3518,7 @@ const et = {
|
|
|
3286
3518
|
gl_FragColor = vec4(mix(bottomColor, topColor, y), 1.0);
|
|
3287
3519
|
}
|
|
3288
3520
|
`
|
|
3289
|
-
},
|
|
3521
|
+
}, qn = {
|
|
3290
3522
|
uniforms: {
|
|
3291
3523
|
tDiffuse: { value: null },
|
|
3292
3524
|
opacity: { value: 1 }
|
|
@@ -3307,10 +3539,10 @@ const et = {
|
|
|
3307
3539
|
gl_FragColor = opacity * texel;
|
|
3308
3540
|
}
|
|
3309
3541
|
`
|
|
3310
|
-
},
|
|
3542
|
+
}, st = {
|
|
3311
3543
|
uniforms: {
|
|
3312
|
-
topColor: { value: new
|
|
3313
|
-
bottomColor: { value: new
|
|
3544
|
+
topColor: { value: new $(51) },
|
|
3545
|
+
bottomColor: { value: new $(17) },
|
|
3314
3546
|
offset: { value: 33 },
|
|
3315
3547
|
exponent: { value: 0.6 }
|
|
3316
3548
|
},
|
|
@@ -3334,19 +3566,19 @@ const et = {
|
|
|
3334
3566
|
}
|
|
3335
3567
|
`
|
|
3336
3568
|
};
|
|
3337
|
-
class
|
|
3569
|
+
class Vn extends M {
|
|
3338
3570
|
constructor() {
|
|
3339
3571
|
super();
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
this.geometry = new
|
|
3343
|
-
uniforms:
|
|
3344
|
-
vertexShader:
|
|
3345
|
-
fragmentShader:
|
|
3572
|
+
E(this, "geometry");
|
|
3573
|
+
E(this, "material");
|
|
3574
|
+
this.geometry = new b(1, 1, 1), this.material = new J({
|
|
3575
|
+
uniforms: ot.uniforms,
|
|
3576
|
+
vertexShader: ot.vertexShader,
|
|
3577
|
+
fragmentShader: ot.fragmentShader,
|
|
3346
3578
|
depthWrite: !1,
|
|
3347
|
-
side:
|
|
3579
|
+
side: lt
|
|
3348
3580
|
}), this.scale.setScalar(45e4);
|
|
3349
|
-
const o =
|
|
3581
|
+
const o = L.degToRad(89), n = L.degToRad(180), r = new v().setFromSphericalCoords(1, o, n);
|
|
3350
3582
|
this.material.uniforms.sunPosition.value = r;
|
|
3351
3583
|
}
|
|
3352
3584
|
/**
|
|
@@ -3363,146 +3595,235 @@ class Cn extends y {
|
|
|
3363
3595
|
* - This is the horizontal angle in the xy-plane.
|
|
3364
3596
|
*/
|
|
3365
3597
|
sunPosition(o, n) {
|
|
3366
|
-
const r = new
|
|
3598
|
+
const r = new v();
|
|
3367
3599
|
r.setFromSphericalCoords(1, o, n), this.material.uniforms.sunPosition.value = r;
|
|
3368
3600
|
}
|
|
3369
3601
|
}
|
|
3370
|
-
class
|
|
3602
|
+
class Hn extends M {
|
|
3371
3603
|
constructor(o = 1e3) {
|
|
3372
3604
|
super();
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
this.geometry = new
|
|
3376
|
-
uniforms:
|
|
3377
|
-
vertexShader:
|
|
3378
|
-
fragmentShader:
|
|
3379
|
-
side:
|
|
3605
|
+
E(this, "geometry");
|
|
3606
|
+
E(this, "material");
|
|
3607
|
+
this.geometry = new b(o, o, o), this.material = new J({
|
|
3608
|
+
uniforms: nt.uniforms,
|
|
3609
|
+
vertexShader: nt.vertexShader,
|
|
3610
|
+
fragmentShader: nt.fragmentShader,
|
|
3611
|
+
side: lt
|
|
3380
3612
|
});
|
|
3381
3613
|
}
|
|
3382
3614
|
}
|
|
3383
|
-
class
|
|
3615
|
+
class Yn extends M {
|
|
3384
3616
|
constructor(o = 1e3) {
|
|
3385
3617
|
super();
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
this.geometry = new N(o, 32, 15), this.material = new
|
|
3389
|
-
vertexShader:
|
|
3390
|
-
fragmentShader:
|
|
3391
|
-
uniforms:
|
|
3392
|
-
side:
|
|
3618
|
+
E(this, "geometry");
|
|
3619
|
+
E(this, "material");
|
|
3620
|
+
this.geometry = new N(o, 32, 15), this.material = new J({
|
|
3621
|
+
vertexShader: st.vertexShader,
|
|
3622
|
+
fragmentShader: st.fragmentShader,
|
|
3623
|
+
uniforms: st.uniforms,
|
|
3624
|
+
side: lt
|
|
3393
3625
|
});
|
|
3394
3626
|
}
|
|
3395
3627
|
}
|
|
3396
|
-
const
|
|
3628
|
+
const Xn = (e) => {
|
|
3397
3629
|
const t = new Uint8Array(4 * e * e);
|
|
3398
3630
|
for (let n = 0; n < e * e; n++) {
|
|
3399
3631
|
const r = n * 4, s = (n % e ^ Math.floor(n / e)) & 1 ? 255 : 0;
|
|
3400
3632
|
t[r] = s, t[r + 1] = s, t[r + 2] = s, t[r + 3] = 255;
|
|
3401
3633
|
}
|
|
3402
|
-
const o = new
|
|
3403
|
-
return o.wrapS =
|
|
3634
|
+
const o = new Nt(t, e, e, _t, Ut);
|
|
3635
|
+
return o.wrapS = ht, o.wrapT = ht, o.minFilter = Ot, o.needsUpdate = !0, o;
|
|
3404
3636
|
};
|
|
3405
|
-
function
|
|
3406
|
-
const t =
|
|
3637
|
+
function Zn(e) {
|
|
3638
|
+
const t = parseInt(e.slice(1), 16);
|
|
3639
|
+
return [
|
|
3640
|
+
t >> 16 & 255,
|
|
3641
|
+
// r
|
|
3642
|
+
t >> 8 & 255,
|
|
3643
|
+
// g
|
|
3644
|
+
t & 255
|
|
3645
|
+
// b
|
|
3646
|
+
];
|
|
3647
|
+
}
|
|
3648
|
+
function jn(e) {
|
|
3649
|
+
const [t, o, n] = X(e);
|
|
3650
|
+
return to(t, o, n);
|
|
3651
|
+
}
|
|
3652
|
+
function X(e) {
|
|
3653
|
+
const t = e >> 16 & 255, o = e >> 8 & 255, n = e & 255;
|
|
3654
|
+
return [t, o, n];
|
|
3655
|
+
}
|
|
3656
|
+
function Qn(e, t, o) {
|
|
3657
|
+
t /= 100, o /= 100;
|
|
3658
|
+
function n(c, l, u) {
|
|
3659
|
+
return u < 0 && (u += 1), u > 1 && (u -= 1), u < 1 / 6 ? c + (l - c) * 6 * u : u < 1 / 2 ? l : u < 2 / 3 ? c + (l - c) * (2 / 3 - u) * 6 : c;
|
|
3660
|
+
}
|
|
3661
|
+
let r, s, a;
|
|
3662
|
+
if (t === 0)
|
|
3663
|
+
r = s = a = o;
|
|
3664
|
+
else {
|
|
3665
|
+
const c = o < 0.5 ? o * (1 + t) : o + t - o * t, l = 2 * o - c;
|
|
3666
|
+
r = n(l, c, e / 360 + 1 / 3), s = n(l, c, e / 360), a = n(l, c, e / 360 - 1 / 3);
|
|
3667
|
+
}
|
|
3668
|
+
const i = (c) => Math.round(c * 255);
|
|
3669
|
+
return [
|
|
3670
|
+
i(r),
|
|
3671
|
+
i(s),
|
|
3672
|
+
i(a)
|
|
3673
|
+
];
|
|
3674
|
+
}
|
|
3675
|
+
function We(e, t, o) {
|
|
3676
|
+
t /= 100, o /= 100;
|
|
3677
|
+
const n = (a) => (a + e / 30) % 12, r = t * Math.min(o, 1 - o), s = (a) => o - r * Math.max(-1, Math.min(n(a) - 3, Math.min(9 - n(a), 1)));
|
|
3678
|
+
return [s(0) * 255, s(8) * 255, s(4) * 255];
|
|
3679
|
+
}
|
|
3680
|
+
function Kn(e, t, o) {
|
|
3681
|
+
return [e / 255, t / 255, o / 255];
|
|
3682
|
+
}
|
|
3683
|
+
function $n(e, t, o) {
|
|
3684
|
+
return e = Math.round(e), t = Math.round(t), o = Math.round(o), (e << 16) + (t << 8) + o;
|
|
3685
|
+
}
|
|
3686
|
+
function to(e, t, o) {
|
|
3687
|
+
e /= 255, t /= 255, o /= 255;
|
|
3688
|
+
const n = Math.max(e, t, o), r = Math.min(e, t, o), s = n - r;
|
|
3689
|
+
let a = 0, i = 0;
|
|
3690
|
+
const c = (n + r) / 2;
|
|
3691
|
+
s !== 0 && (n === e ? a = ((t - o) / s + (t < o ? 6 : 0)) * 60 : n === t ? a = ((o - e) / s + 2) * 60 : n === o && (a = ((e - t) / s + 4) * 60)), s !== 0 && (i = s / (1 - Math.abs(2 * c - 1))), a = Math.round(a), i = Math.round(i * 100);
|
|
3692
|
+
const l = Math.round(c * 100);
|
|
3693
|
+
return [a, i, l];
|
|
3694
|
+
}
|
|
3695
|
+
function eo(e, t) {
|
|
3696
|
+
return Math.sqrt(
|
|
3697
|
+
Math.pow(e[0] - t[0], 2) + Math.pow(e[1] - t[1], 2) + Math.pow(e[2] - t[2], 2)
|
|
3698
|
+
);
|
|
3699
|
+
}
|
|
3700
|
+
function oo(e, t) {
|
|
3701
|
+
return Math.abs(e[0] - t[0]) + //
|
|
3702
|
+
Math.abs(e[1] - t[1]) + Math.abs(e[2] - t[2]);
|
|
3703
|
+
}
|
|
3704
|
+
function Jn(e, t) {
|
|
3705
|
+
const o = X(e);
|
|
3706
|
+
let n = null, r = 1 / 0;
|
|
3707
|
+
for (const s of t) {
|
|
3708
|
+
const a = X(s), i = eo(o, a);
|
|
3709
|
+
i < r && (r = i, n = s);
|
|
3710
|
+
}
|
|
3711
|
+
return n;
|
|
3712
|
+
}
|
|
3713
|
+
function Wn(e, t) {
|
|
3714
|
+
const o = X(e);
|
|
3715
|
+
let n = null, r = 1 / 0;
|
|
3716
|
+
for (const s of t) {
|
|
3717
|
+
const a = X(s), i = oo(o, a);
|
|
3718
|
+
i < r && (r = i, n = s);
|
|
3719
|
+
}
|
|
3720
|
+
return n;
|
|
3721
|
+
}
|
|
3722
|
+
function ts(e) {
|
|
3723
|
+
const t = (e + Math.floor(-30 + Math.random() * 61)) % 360, o = Math.floor(60 + Math.random() * 21), n = Math.floor(50 + Math.random() * 21);
|
|
3724
|
+
return We(t, o, n);
|
|
3725
|
+
}
|
|
3726
|
+
function es(e) {
|
|
3727
|
+
const t = new ut().setFromObject(e), o = new v();
|
|
3407
3728
|
t.getCenter(o), e.position.sub(o);
|
|
3408
3729
|
}
|
|
3409
|
-
function
|
|
3410
|
-
const o = new
|
|
3730
|
+
function os(e, t = new v(0, 0, 0)) {
|
|
3731
|
+
const o = new ut().setFromObject(e), n = new v();
|
|
3411
3732
|
o.getCenter(n);
|
|
3412
|
-
const r = new
|
|
3733
|
+
const r = new v().subVectors(t, n);
|
|
3413
3734
|
e.position.add(r);
|
|
3414
3735
|
}
|
|
3415
|
-
function
|
|
3736
|
+
function ns(e) {
|
|
3416
3737
|
e.computeBoundingBox();
|
|
3417
3738
|
const t = e.boundingBox;
|
|
3418
3739
|
if (t) {
|
|
3419
|
-
const o = t.getCenter(new
|
|
3740
|
+
const o = t.getCenter(new v());
|
|
3420
3741
|
e.translateX(-o.x), e.translateY(-o.y), e.translateZ(-o.z);
|
|
3421
3742
|
}
|
|
3422
3743
|
}
|
|
3423
|
-
function
|
|
3744
|
+
function no(e, t, o) {
|
|
3424
3745
|
return Math.max(0, Math.min(1, (e - t) / (o - t)));
|
|
3425
3746
|
}
|
|
3426
|
-
function
|
|
3747
|
+
function ss(e, t, o, n, r, s = 20, a = 0, i = 1) {
|
|
3427
3748
|
const c = [];
|
|
3428
3749
|
for (let l = 0; l <= s; l++) {
|
|
3429
|
-
const u = l / s, m = e(
|
|
3430
|
-
c.push(new
|
|
3750
|
+
const u = l / s, m = e(no(u, a, i)), h = t + m * (o - t), f = n + u * (r - n);
|
|
3751
|
+
c.push(new g(h, f));
|
|
3431
3752
|
}
|
|
3432
3753
|
return c;
|
|
3433
3754
|
}
|
|
3434
|
-
function
|
|
3435
|
-
const o = new
|
|
3755
|
+
function rs(e) {
|
|
3756
|
+
const o = new ut().setFromObject(e).getCenter(new v());
|
|
3436
3757
|
e.translateX(-o.x), e.translateY(-o.y), e.translateZ(-o.z), e.updateMatrixWorld(!0);
|
|
3437
3758
|
}
|
|
3438
|
-
function
|
|
3759
|
+
function as(e) {
|
|
3439
3760
|
e.geometry.computeBoundingBox();
|
|
3440
3761
|
const t = e.geometry.boundingBox;
|
|
3441
3762
|
if (t) {
|
|
3442
|
-
const o = t.getCenter(new
|
|
3763
|
+
const o = t.getCenter(new v());
|
|
3443
3764
|
e.geometry.translate(-o.x, -o.y, -o.z);
|
|
3444
3765
|
}
|
|
3445
3766
|
}
|
|
3446
|
-
const
|
|
3767
|
+
const so = (e, t, o, n, r = 24) => {
|
|
3447
3768
|
let s = [];
|
|
3448
3769
|
for (let a = 0; a <= r; a++) {
|
|
3449
|
-
const i = a / r, c =
|
|
3450
|
-
s.push(new
|
|
3770
|
+
const i = a / r, c = z.CUBIC(i, e.x, t.x, o.x, n.x), l = z.CUBIC(i, e.y, t.y, o.y, n.y);
|
|
3771
|
+
s.push(new g(c, l));
|
|
3451
3772
|
}
|
|
3452
3773
|
return s;
|
|
3453
|
-
},
|
|
3774
|
+
}, ro = (e, t, o, n = 24) => {
|
|
3454
3775
|
let r = [];
|
|
3455
3776
|
for (let s = 0; s <= n; s++) {
|
|
3456
|
-
const a = s / n, i =
|
|
3457
|
-
r.push(new
|
|
3777
|
+
const a = s / n, i = z.DAMPED(a, o) * (t.x - e.x) + e.x, c = e.y + a * (t.y - e.y);
|
|
3778
|
+
r.push(new g(i, c));
|
|
3458
3779
|
}
|
|
3459
3780
|
return r;
|
|
3460
|
-
},
|
|
3781
|
+
}, ao = (e, t, o, n, r = 24) => {
|
|
3461
3782
|
let s = [];
|
|
3462
3783
|
for (let a = 0; a <= r; a++) {
|
|
3463
|
-
const i = a / r, c =
|
|
3464
|
-
s.push(new
|
|
3784
|
+
const i = a / r, c = z.EXPONENTIAL(i, o, n) * (t.x - e.x) + e.x, l = e.y + i * (t.y - e.y);
|
|
3785
|
+
s.push(new g(c, l));
|
|
3465
3786
|
}
|
|
3466
3787
|
return s;
|
|
3467
|
-
},
|
|
3788
|
+
}, io = (e, t, o, n, r = 24) => {
|
|
3468
3789
|
let s = [];
|
|
3469
3790
|
for (let a = 0; a <= r; a++) {
|
|
3470
|
-
const i = a / r, c =
|
|
3471
|
-
s.push(new
|
|
3791
|
+
const i = a / r, c = z.LOGARITHMIC(i, o, n) * (t.x - e.x) + e.x, l = e.y + i * (t.y - e.y);
|
|
3792
|
+
s.push(new g(c, l));
|
|
3472
3793
|
}
|
|
3473
3794
|
return s;
|
|
3474
|
-
},
|
|
3795
|
+
}, co = (e, t, o, n, r, s = 24) => {
|
|
3475
3796
|
let a = [];
|
|
3476
3797
|
for (let i = 0; i <= s; i++) {
|
|
3477
3798
|
const c = i / s, l = o * c * c + n * c + r + e.x, u = e.y + c * (t.y - e.y);
|
|
3478
|
-
a.push(new
|
|
3799
|
+
a.push(new g(l, u));
|
|
3479
3800
|
}
|
|
3480
3801
|
return a;
|
|
3481
|
-
},
|
|
3802
|
+
}, lo = (e, t, o, n = 24) => {
|
|
3482
3803
|
let r = [];
|
|
3483
3804
|
for (let s = 0; s <= n; s++) {
|
|
3484
|
-
const a = s / n, i =
|
|
3485
|
-
r.push(new
|
|
3805
|
+
const a = s / n, i = z.QUADRATIC(a, e.x, t.x, o.x), c = z.QUADRATIC(a, e.y, t.y, o.y);
|
|
3806
|
+
r.push(new g(i, c));
|
|
3486
3807
|
}
|
|
3487
3808
|
return r;
|
|
3488
|
-
},
|
|
3809
|
+
}, uo = (e, t, o, n = 24) => {
|
|
3489
3810
|
let r = [];
|
|
3490
3811
|
for (let s = 0; s <= n; s++) {
|
|
3491
|
-
const a = s / n, i =
|
|
3492
|
-
r.push(new
|
|
3812
|
+
const a = s / n, i = z.SIGMOID(a, o) * (t.x - e.x) + e.x, c = e.y + a * (t.y - e.y);
|
|
3813
|
+
r.push(new g(i, c));
|
|
3493
3814
|
}
|
|
3494
3815
|
return r;
|
|
3495
|
-
},
|
|
3496
|
-
createCubicCurvePoints:
|
|
3497
|
-
createDampedCurvePoints:
|
|
3498
|
-
createExponentialCurvePoints:
|
|
3499
|
-
createLogarithmicCurvePoints:
|
|
3500
|
-
createParabolicCurvePoints:
|
|
3501
|
-
createQuadraticCurvePoints:
|
|
3502
|
-
createSigmoidCurvePoints:
|
|
3816
|
+
}, is = {
|
|
3817
|
+
createCubicCurvePoints: so,
|
|
3818
|
+
createDampedCurvePoints: ro,
|
|
3819
|
+
createExponentialCurvePoints: ao,
|
|
3820
|
+
createLogarithmicCurvePoints: io,
|
|
3821
|
+
createParabolicCurvePoints: co,
|
|
3822
|
+
createQuadraticCurvePoints: lo,
|
|
3823
|
+
createSigmoidCurvePoints: uo
|
|
3503
3824
|
};
|
|
3504
|
-
function
|
|
3505
|
-
const l = r ||
|
|
3825
|
+
function cs(e, t, o, n, r, s = [0, 0], a = [1, 0], i = [0, 1], c = [1, 1]) {
|
|
3826
|
+
const l = r || mo(e, t, o);
|
|
3506
3827
|
return [
|
|
3507
3828
|
// Triangle 1
|
|
3508
3829
|
{ pos: e, norm: l, uv: s },
|
|
@@ -3514,7 +3835,7 @@ function Dn(e, t, o, n, r, s = [0, 0], a = [1, 0], i = [0, 1], c = [1, 1]) {
|
|
|
3514
3835
|
{ pos: o, norm: l, uv: i }
|
|
3515
3836
|
];
|
|
3516
3837
|
}
|
|
3517
|
-
function
|
|
3838
|
+
function mo(e, t, o) {
|
|
3518
3839
|
const n = [
|
|
3519
3840
|
t[0] - e[0],
|
|
3520
3841
|
t[1] - e[1],
|
|
@@ -3530,7 +3851,7 @@ function to(e, t, o) {
|
|
|
3530
3851
|
], a = Math.sqrt(s[0] ** 2 + s[1] ** 2 + s[2] ** 2);
|
|
3531
3852
|
return s.map((i) => i / a);
|
|
3532
3853
|
}
|
|
3533
|
-
function
|
|
3854
|
+
function ls(e, t) {
|
|
3534
3855
|
return e.map(([o, n, r]) => {
|
|
3535
3856
|
switch (t) {
|
|
3536
3857
|
case "x":
|
|
@@ -3544,39 +3865,39 @@ function Vn(e, t) {
|
|
|
3544
3865
|
}
|
|
3545
3866
|
});
|
|
3546
3867
|
}
|
|
3547
|
-
function
|
|
3868
|
+
function ho(e) {
|
|
3548
3869
|
const [t, o, n] = e, r = Math.abs(t), s = Math.abs(o), a = Math.abs(n);
|
|
3549
3870
|
return r >= s && r >= a ? [n > 0 ? n : -n, o] : s >= r && s >= a ? [t, n > 0 ? n : -n] : [t, o];
|
|
3550
3871
|
}
|
|
3551
|
-
function
|
|
3552
|
-
return e.map((t) =>
|
|
3872
|
+
function us(e) {
|
|
3873
|
+
return e.map((t) => ho(t));
|
|
3553
3874
|
}
|
|
3554
|
-
function
|
|
3875
|
+
function ms(e) {
|
|
3555
3876
|
return e.map(([t, o, n]) => {
|
|
3556
3877
|
const r = Math.atan2(n, t), s = Math.acos(o / Math.sqrt(t ** 2 + o ** 2 + n ** 2)), a = r / (2 * Math.PI) + 0.5, i = 1 - s / Math.PI;
|
|
3557
3878
|
return [a, i];
|
|
3558
3879
|
});
|
|
3559
3880
|
}
|
|
3560
|
-
function
|
|
3881
|
+
function hs(e) {
|
|
3561
3882
|
return e.map(([t, o, n]) => [Math.atan2(n, t) / (2 * Math.PI) + 0.5, o]);
|
|
3562
3883
|
}
|
|
3563
|
-
function
|
|
3884
|
+
function fs(e) {
|
|
3564
3885
|
return e.map(([t, o, n]) => {
|
|
3565
3886
|
const r = Math.sqrt(t ** 2 + n ** 2);
|
|
3566
3887
|
return [Math.atan2(n, t) / (2 * Math.PI) + 0.5, r];
|
|
3567
3888
|
});
|
|
3568
3889
|
}
|
|
3569
|
-
function
|
|
3890
|
+
function fo(e, t, o, n, r) {
|
|
3570
3891
|
return [
|
|
3571
3892
|
(e[0] - t) / (o - t),
|
|
3572
3893
|
(e[1] - n) / (r - n)
|
|
3573
3894
|
];
|
|
3574
3895
|
}
|
|
3575
|
-
function
|
|
3896
|
+
function ps(e, t, o) {
|
|
3576
3897
|
const [n, r] = t, [s, a] = o;
|
|
3577
|
-
return e.map((i) =>
|
|
3898
|
+
return e.map((i) => fo(i, n, s, r, a));
|
|
3578
3899
|
}
|
|
3579
|
-
function
|
|
3900
|
+
function ds(e) {
|
|
3580
3901
|
const t = Math.min(...e.map((s) => s[0])), o = Math.max(...e.map((s) => s[0])), n = Math.min(...e.map((s) => s[1])), r = Math.max(...e.map((s) => s[1]));
|
|
3581
3902
|
return {
|
|
3582
3903
|
minBounds: [t, n],
|
|
@@ -3584,189 +3905,209 @@ function Qn(e) {
|
|
|
3584
3905
|
};
|
|
3585
3906
|
}
|
|
3586
3907
|
export {
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
Pe as
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3908
|
+
Vn as AtmosphericSkybox,
|
|
3909
|
+
mt as Axis,
|
|
3910
|
+
Fo as BifurcatedStaircaseGeometry,
|
|
3911
|
+
_n as Bone,
|
|
3912
|
+
Fe as BoneGeometry,
|
|
3913
|
+
Ko as Book,
|
|
3914
|
+
yt as BookGeometry,
|
|
3915
|
+
cn as Bookshelf,
|
|
3916
|
+
Ue as BookshelfGeometry,
|
|
3917
|
+
Bo as BubblingEffect,
|
|
3918
|
+
dn as BunsenBurner,
|
|
3919
|
+
Cn as Burst,
|
|
3920
|
+
Qe as BurstShape,
|
|
3921
|
+
un as Candle,
|
|
3922
|
+
rt as ColorPalette,
|
|
3923
|
+
Wo as CrossHeadstone,
|
|
3924
|
+
Te as CrossHeadstoneGeometry,
|
|
3925
|
+
Hn as DaySkybox,
|
|
3926
|
+
ln as Desk,
|
|
3927
|
+
Oe as DeskGeometry,
|
|
3928
|
+
ko as DioramaGeometry,
|
|
3929
|
+
tt as Direction,
|
|
3930
|
+
Co as Easing,
|
|
3931
|
+
Mn as ElectricPanel,
|
|
3932
|
+
xe as EllipticLeafGeometry,
|
|
3933
|
+
Ro as EmissivePulseEffect,
|
|
3934
|
+
yn as ErlenmeyerFlask,
|
|
3935
|
+
ke as ErlenmeyerFlaskGeometry,
|
|
3936
|
+
K as Falloff,
|
|
3937
|
+
wn as Flask,
|
|
3938
|
+
vn as FlorenceFlask,
|
|
3939
|
+
De as FlorenceFlaskGeometry,
|
|
3940
|
+
Bn as Gear,
|
|
3941
|
+
Ke as GearShape,
|
|
3942
|
+
Rn as Heart,
|
|
3943
|
+
$e as HeartShape,
|
|
3944
|
+
On as Hill,
|
|
3945
|
+
He as HillGeometry,
|
|
3946
|
+
Do as LShapedStaircaseGeometry,
|
|
3947
|
+
mn as Lantern,
|
|
3948
|
+
No as LeafEffect,
|
|
3949
|
+
xn as LeverPanel,
|
|
3950
|
+
Oo as LightningEffect,
|
|
3951
|
+
Ho as LineEquations,
|
|
3952
|
+
tn as Mausoleum,
|
|
3953
|
+
Ge as MausoleumGeometry,
|
|
3954
|
+
gn as Microscope,
|
|
3955
|
+
Qo as Moon,
|
|
3956
|
+
In as MortarAndPestle,
|
|
3957
|
+
qe as MortarGeometry,
|
|
3958
|
+
hn as MossyRocks,
|
|
3959
|
+
Ln as Mound,
|
|
3960
|
+
Xe as MoundGeometry,
|
|
3961
|
+
Yn as NightSkybox,
|
|
3962
|
+
en as ObeliskHeadstone,
|
|
3963
|
+
Ce as ObeliskHeadstoneGeometry,
|
|
3964
|
+
En as Panel,
|
|
3965
|
+
An as PanelLight,
|
|
3966
|
+
z as ParametricCurve,
|
|
3967
|
+
is as ParametricCurveUtils,
|
|
3968
|
+
$o as PotionBottle,
|
|
3969
|
+
Se as PotionBottleGeometry,
|
|
3970
|
+
fn as Rock,
|
|
3971
|
+
ze as RockGeometry,
|
|
3972
|
+
pn as Rocks,
|
|
3973
|
+
on as RoundedHeadstone,
|
|
3974
|
+
Be as RoundedHeadstoneGeometry,
|
|
3975
|
+
qo as SpiralStaircaseGeometry,
|
|
3976
|
+
bn as SpiralTube,
|
|
3977
|
+
nn as SquareHeadstone,
|
|
3978
|
+
Re as SquareHeadstoneGeometry,
|
|
3979
|
+
Vo as StaircaseGeometry,
|
|
3980
|
+
Sn as Stand,
|
|
3981
|
+
Ve as StandGeometry,
|
|
3982
|
+
Nn as Star,
|
|
3983
|
+
Je as StarShape,
|
|
3984
|
+
sn as StoneFencePost,
|
|
3985
|
+
Ne as StoneFencePostGeometry,
|
|
3986
|
+
Pn as TeslaCoil,
|
|
3987
|
+
Tn as TestTube,
|
|
3988
|
+
at as TestTubeGeometry,
|
|
3989
|
+
Gn as TestTubeRack,
|
|
3990
|
+
Un as Tree,
|
|
3991
|
+
Ze as TreeGeometry,
|
|
3992
|
+
Jo as WineBottle,
|
|
3993
|
+
Pe as WineBottleGeometry,
|
|
3994
|
+
rn as WroughtIronBar,
|
|
3995
|
+
gt as WroughtIronBarGeometry,
|
|
3996
|
+
an as WroughtIronFence,
|
|
3997
|
+
_e as WroughtIronFenceGeometry,
|
|
3998
|
+
kn as addNoiseDisplacement,
|
|
3999
|
+
zn as addWaterDisplacement,
|
|
4000
|
+
ot as atmosphericShader,
|
|
4001
|
+
oo as calculateChannelDifference,
|
|
4002
|
+
eo as calculateDistance,
|
|
4003
|
+
mo as calculateNormal,
|
|
4004
|
+
ds as calculateUVBounds,
|
|
4005
|
+
xt as calculateXFromSlopeIntercept,
|
|
4006
|
+
be as calculateYFromSlopeIntercept,
|
|
4007
|
+
Ye as capHeightFromRadius,
|
|
4008
|
+
Xo as capWidthFromRadius,
|
|
4009
|
+
jo as cartesianToSpherical,
|
|
4010
|
+
es as centerGroup,
|
|
4011
|
+
os as centerGroupAtTarget,
|
|
4012
|
+
ns as centerInstancedMesh,
|
|
4013
|
+
rs as centerMesh,
|
|
4014
|
+
as as centerMeshGeometry,
|
|
4015
|
+
Xn as checkerboardTexture,
|
|
4016
|
+
ee as circularEaseIn,
|
|
4017
|
+
ne as circularEaseInOut,
|
|
4018
|
+
oe as circularEaseOut,
|
|
4019
|
+
ae as concave,
|
|
4020
|
+
ie as convex,
|
|
4021
|
+
so as createCubicCurvePoints,
|
|
4022
|
+
ro as createDampedCurvePoints,
|
|
4023
|
+
ao as createExponentialCurvePoints,
|
|
4024
|
+
io as createLogarithmicCurvePoints,
|
|
4025
|
+
co as createParabolicCurvePoints,
|
|
4026
|
+
cs as createQuad,
|
|
4027
|
+
lo as createQuadraticCurvePoints,
|
|
4028
|
+
uo as createSigmoidCurvePoints,
|
|
4029
|
+
he as cubicCurve,
|
|
4030
|
+
Vt as cubicEaseIn,
|
|
4031
|
+
Yt as cubicEaseInOut,
|
|
4032
|
+
Ht as cubicEaseOut,
|
|
4033
|
+
ho as cubicUVMapping,
|
|
4034
|
+
us as cubicUVMappingBatch,
|
|
4035
|
+
hs as cylindricalUVMapping,
|
|
4036
|
+
fe as dampedCurve,
|
|
4037
|
+
nt as daySkyShader,
|
|
4038
|
+
Ao as displacementBrush,
|
|
4039
|
+
yo as dollyAnimation,
|
|
4040
|
+
pe as exponentialCurve,
|
|
4041
|
+
Jt as exponentialEaseIn,
|
|
4042
|
+
te as exponentialEaseInOut,
|
|
4043
|
+
Wt as exponentialEaseOut,
|
|
4044
|
+
qn as fadeShader,
|
|
4045
|
+
Jn as findClosestColor,
|
|
4046
|
+
Wn as findClosestColorChannelWise,
|
|
4047
|
+
bo as flattenBrush,
|
|
4048
|
+
wo as flythroughAnimation,
|
|
4049
|
+
me as gaussian,
|
|
4050
|
+
ts as getAnalogousColors,
|
|
4051
|
+
jn as hexToHsl,
|
|
4052
|
+
X as hexToRgb,
|
|
4053
|
+
Qn as hslToHex,
|
|
4054
|
+
We as hslToRgb,
|
|
4055
|
+
ss as interpolateCurve,
|
|
4056
|
+
ue as inverse,
|
|
4057
|
+
se as linear,
|
|
4058
|
+
ce as logarithmic,
|
|
4059
|
+
de as logarithmicCurve,
|
|
4060
|
+
ge as logarithmicRandomMax,
|
|
4061
|
+
Ie as logarithmicRandomMin,
|
|
4062
|
+
je as moonShader,
|
|
4063
|
+
st as nightSkyShader,
|
|
4064
|
+
So as noiseBrush,
|
|
4065
|
+
Kn as normalizeRgb,
|
|
4066
|
+
fo as normalizeUV,
|
|
4067
|
+
ps as normalizeUVBatch,
|
|
4068
|
+
vo as orbitAnimation,
|
|
4069
|
+
Me as parabolicCurve,
|
|
4070
|
+
Zn as parseHexCode,
|
|
4071
|
+
xo as pendulumAnimation,
|
|
4072
|
+
ls as planarUVMapping,
|
|
4073
|
+
fs as polarUVMapping,
|
|
4074
|
+
ye as quadraticCurve,
|
|
4075
|
+
kt as quadraticEaseIn,
|
|
4076
|
+
qt as quadraticEaseInOut,
|
|
4077
|
+
Dt as quadraticEaseOut,
|
|
4078
|
+
Xt as quarticEaseIn,
|
|
4079
|
+
jt as quarticEaseInOut,
|
|
4080
|
+
Zt as quarticEaseOut,
|
|
4081
|
+
Qt as quinticEaseIn,
|
|
4082
|
+
$t as quinticEaseInOut,
|
|
4083
|
+
Kt as quinticEaseOut,
|
|
4084
|
+
Yo as radiusFromCapHeight,
|
|
4085
|
+
It as radiusFromCapWidth,
|
|
4086
|
+
Mt as randomFloat,
|
|
4087
|
+
_o as randomInteger,
|
|
4088
|
+
Le as randomTransformVertices,
|
|
4089
|
+
$n as rgbToHex,
|
|
4090
|
+
to as rgbToHsl,
|
|
4091
|
+
Lo as rowOfBooksByCount,
|
|
4092
|
+
zo as rowOfBooksByLength,
|
|
4093
|
+
vt as rowOfBooksByScales,
|
|
4094
|
+
Uo as setRandomInterval,
|
|
4095
|
+
Ee as setRandomTimeout,
|
|
4096
|
+
we as sigmoidCurve,
|
|
4097
|
+
Lt as sineEaseIn,
|
|
3757
4098
|
Ft as sineEaseInOut,
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
4099
|
+
zt as sineEaseOut,
|
|
4100
|
+
Po as smoothBrush,
|
|
4101
|
+
re as smoothstep,
|
|
4102
|
+
Zo as sphericalToCartesian,
|
|
4103
|
+
ms as sphericalUVMapping,
|
|
4104
|
+
To as spikeBrush,
|
|
4105
|
+
go as spiralAscensionAnimation,
|
|
4106
|
+
le as squareRoot,
|
|
4107
|
+
Go as twistBrush,
|
|
4108
|
+
Dn as updateNoiseDisplacementTime,
|
|
4109
|
+
Fn as updateWaterDisplacementTime,
|
|
4110
|
+
Io as wobbleAnimation,
|
|
4111
|
+
Eo as zoomInAnimation
|
|
3771
4112
|
};
|
|
3772
4113
|
//# sourceMappingURL=index.es.js.map
|