3d-shape-particle-text 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/3d-shape-particle-text.es.js +653 -600
- package/dist/3d-shape-particle-text.umd.js +10 -10
- package/index.d.ts +30 -0
- package/package.json +8 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import hr, { useRef as ir, useEffect as vr } from "react";
|
|
2
2
|
import * as f from "three";
|
|
3
|
-
var
|
|
3
|
+
var Qe = { exports: {} }, $e = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.min.js
|
|
@@ -10,21 +10,21 @@ var nt = { exports: {} }, Ae = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
var w, M = {},
|
|
20
|
-
|
|
21
|
-
for (w in
|
|
22
|
-
if (
|
|
23
|
-
return { $$typeof:
|
|
13
|
+
var or;
|
|
14
|
+
function gr() {
|
|
15
|
+
if (or) return $e;
|
|
16
|
+
or = 1;
|
|
17
|
+
var n = hr, l = Symbol.for("react.element"), d = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function O(j, E, T) {
|
|
19
|
+
var w, M = {}, C = null, H = null;
|
|
20
|
+
T !== void 0 && (C = "" + T), E.key !== void 0 && (C = "" + E.key), E.ref !== void 0 && (H = E.ref);
|
|
21
|
+
for (w in E) i.call(E, w) && !g.hasOwnProperty(w) && (M[w] = E[w]);
|
|
22
|
+
if (j && j.defaultProps) for (w in E = j.defaultProps, E) M[w] === void 0 && (M[w] = E[w]);
|
|
23
|
+
return { $$typeof: l, type: j, key: C, ref: H, props: M, _owner: a.current };
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return $e.Fragment = d, $e.jsx = O, $e.jsxs = O, $e;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
27
|
+
var Be = {};
|
|
28
28
|
/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-jsx-runtime.development.js
|
|
@@ -34,54 +34,54 @@ var Ce = {};
|
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
var
|
|
38
|
-
function
|
|
39
|
-
return
|
|
40
|
-
var
|
|
41
|
-
function
|
|
37
|
+
var sr;
|
|
38
|
+
function yr() {
|
|
39
|
+
return sr || (sr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
40
|
+
var n = hr, l = Symbol.for("react.element"), d = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), O = Symbol.for("react.provider"), j = Symbol.for("react.context"), E = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), H = Symbol.for("react.offscreen"), ee = Symbol.iterator, le = "@@iterator";
|
|
41
|
+
function G(e) {
|
|
42
42
|
if (e === null || typeof e != "object")
|
|
43
43
|
return null;
|
|
44
|
-
var
|
|
45
|
-
return typeof
|
|
44
|
+
var r = ee && e[ee] || e[le];
|
|
45
|
+
return typeof r == "function" ? r : null;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
47
|
+
var z = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
48
|
function _(e) {
|
|
49
49
|
{
|
|
50
|
-
for (var
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), c = 1; c < r; c++)
|
|
51
|
+
t[c - 1] = arguments[c];
|
|
52
|
+
me("error", e, t);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function me(e, r, t) {
|
|
56
56
|
{
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
var
|
|
60
|
-
return String(
|
|
57
|
+
var c = z.ReactDebugCurrentFrame, v = c.getStackAddendum();
|
|
58
|
+
v !== "" && (r += "%s", t = t.concat([v]));
|
|
59
|
+
var b = t.map(function(m) {
|
|
60
|
+
return String(m);
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
b.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, b);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
function
|
|
68
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
65
|
+
var J = !1, Y = !1, ue = !1, _e = !1, $ = !1, R;
|
|
66
|
+
R = Symbol.for("react.module.reference");
|
|
67
|
+
function re(e) {
|
|
68
|
+
return !!(typeof e == "string" || typeof e == "function" || e === i || e === g || $ || e === a || e === T || e === w || _e || e === H || J || Y || ue || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === M || e.$$typeof === O || e.$$typeof === j || e.$$typeof === E || // This needs to include all possible module reference object
|
|
69
69
|
// types supported by any Flight configuration anywhere since
|
|
70
70
|
// we don't know which Flight build this will end up being used
|
|
71
71
|
// with.
|
|
72
|
-
e.$$typeof ===
|
|
72
|
+
e.$$typeof === R || e.getModuleId !== void 0));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
var
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
78
|
-
var
|
|
79
|
-
return
|
|
74
|
+
function ve(e, r, t) {
|
|
75
|
+
var c = e.displayName;
|
|
76
|
+
if (c)
|
|
77
|
+
return c;
|
|
78
|
+
var v = r.displayName || r.name || "";
|
|
79
|
+
return v !== "" ? t + "(" + v + ")" : t;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Pe(e) {
|
|
82
82
|
return e.displayName || "Context";
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function te(e) {
|
|
85
85
|
if (e == null)
|
|
86
86
|
return null;
|
|
87
87
|
if (typeof e.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -89,36 +89,36 @@ function pt() {
|
|
|
89
89
|
if (typeof e == "string")
|
|
90
90
|
return e;
|
|
91
91
|
switch (e) {
|
|
92
|
-
case
|
|
92
|
+
case i:
|
|
93
93
|
return "Fragment";
|
|
94
|
-
case
|
|
94
|
+
case d:
|
|
95
95
|
return "Portal";
|
|
96
|
-
case
|
|
96
|
+
case g:
|
|
97
97
|
return "Profiler";
|
|
98
|
-
case
|
|
98
|
+
case a:
|
|
99
99
|
return "StrictMode";
|
|
100
|
-
case
|
|
100
|
+
case T:
|
|
101
101
|
return "Suspense";
|
|
102
102
|
case w:
|
|
103
103
|
return "SuspenseList";
|
|
104
104
|
}
|
|
105
105
|
if (typeof e == "object")
|
|
106
106
|
switch (e.$$typeof) {
|
|
107
|
-
case
|
|
108
|
-
var t = e;
|
|
109
|
-
return Q(t) + ".Consumer";
|
|
110
|
-
case oe:
|
|
107
|
+
case j:
|
|
111
108
|
var r = e;
|
|
112
|
-
return
|
|
113
|
-
case
|
|
114
|
-
|
|
109
|
+
return Pe(r) + ".Consumer";
|
|
110
|
+
case O:
|
|
111
|
+
var t = e;
|
|
112
|
+
return Pe(t._context) + ".Provider";
|
|
113
|
+
case E:
|
|
114
|
+
return ve(e, e.render, "ForwardRef");
|
|
115
115
|
case M:
|
|
116
|
-
var
|
|
117
|
-
return
|
|
118
|
-
case
|
|
119
|
-
var
|
|
116
|
+
var c = e.displayName || null;
|
|
117
|
+
return c !== null ? c : te(e.type) || "Memo";
|
|
118
|
+
case C: {
|
|
119
|
+
var v = e, b = v._payload, m = v._init;
|
|
120
120
|
try {
|
|
121
|
-
return
|
|
121
|
+
return te(m(b));
|
|
122
122
|
} catch {
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
@@ -126,18 +126,18 @@ function pt() {
|
|
|
126
126
|
}
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
var
|
|
130
|
-
function
|
|
129
|
+
var A = Object.assign, B = 0, V, U, q, fe, Z, ge, I;
|
|
130
|
+
function Ae() {
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
function
|
|
132
|
+
Ae.__reactDisabledLog = !0;
|
|
133
|
+
function Fe() {
|
|
134
134
|
{
|
|
135
|
-
if (
|
|
136
|
-
|
|
135
|
+
if (B === 0) {
|
|
136
|
+
V = console.log, U = console.info, q = console.warn, fe = console.error, Z = console.group, ge = console.groupCollapsed, I = console.groupEnd;
|
|
137
137
|
var e = {
|
|
138
138
|
configurable: !0,
|
|
139
139
|
enumerable: !0,
|
|
140
|
-
value:
|
|
140
|
+
value: Ae,
|
|
141
141
|
writable: !0
|
|
142
142
|
};
|
|
143
143
|
Object.defineProperties(console, {
|
|
@@ -150,332 +150,332 @@ function pt() {
|
|
|
150
150
|
groupEnd: e
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
B++;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function Le() {
|
|
157
157
|
{
|
|
158
|
-
if (
|
|
158
|
+
if (B--, B === 0) {
|
|
159
159
|
var e = {
|
|
160
160
|
configurable: !0,
|
|
161
161
|
enumerable: !0,
|
|
162
162
|
writable: !0
|
|
163
163
|
};
|
|
164
164
|
Object.defineProperties(console, {
|
|
165
|
-
log:
|
|
166
|
-
value:
|
|
165
|
+
log: A({}, e, {
|
|
166
|
+
value: V
|
|
167
167
|
}),
|
|
168
|
-
info:
|
|
169
|
-
value:
|
|
168
|
+
info: A({}, e, {
|
|
169
|
+
value: U
|
|
170
170
|
}),
|
|
171
|
-
warn:
|
|
172
|
-
value:
|
|
171
|
+
warn: A({}, e, {
|
|
172
|
+
value: q
|
|
173
173
|
}),
|
|
174
|
-
error:
|
|
175
|
-
value:
|
|
174
|
+
error: A({}, e, {
|
|
175
|
+
value: fe
|
|
176
176
|
}),
|
|
177
|
-
group:
|
|
178
|
-
value:
|
|
177
|
+
group: A({}, e, {
|
|
178
|
+
value: Z
|
|
179
179
|
}),
|
|
180
|
-
groupCollapsed:
|
|
181
|
-
value:
|
|
180
|
+
groupCollapsed: A({}, e, {
|
|
181
|
+
value: ge
|
|
182
182
|
}),
|
|
183
|
-
groupEnd:
|
|
184
|
-
value:
|
|
183
|
+
groupEnd: A({}, e, {
|
|
184
|
+
value: I
|
|
185
185
|
})
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
B < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
var
|
|
192
|
-
function
|
|
191
|
+
var F = z.ReactCurrentDispatcher, L;
|
|
192
|
+
function y(e, r, t) {
|
|
193
193
|
{
|
|
194
|
-
if (
|
|
194
|
+
if (L === void 0)
|
|
195
195
|
try {
|
|
196
196
|
throw Error();
|
|
197
|
-
} catch (
|
|
198
|
-
var
|
|
199
|
-
|
|
197
|
+
} catch (v) {
|
|
198
|
+
var c = v.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
+
L = c && c[1] || "";
|
|
200
200
|
}
|
|
201
201
|
return `
|
|
202
|
-
` +
|
|
202
|
+
` + L + e;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
var
|
|
205
|
+
var We = !1, xe;
|
|
206
206
|
{
|
|
207
|
-
var
|
|
208
|
-
|
|
207
|
+
var er = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
+
xe = new er();
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
if (!e ||
|
|
210
|
+
function Ve(e, r) {
|
|
211
|
+
if (!e || We)
|
|
212
212
|
return "";
|
|
213
213
|
{
|
|
214
|
-
var
|
|
215
|
-
if (
|
|
216
|
-
return
|
|
214
|
+
var t = xe.get(e);
|
|
215
|
+
if (t !== void 0)
|
|
216
|
+
return t;
|
|
217
217
|
}
|
|
218
|
-
var
|
|
219
|
-
|
|
220
|
-
var
|
|
218
|
+
var c;
|
|
219
|
+
We = !0;
|
|
220
|
+
var v = Error.prepareStackTrace;
|
|
221
221
|
Error.prepareStackTrace = void 0;
|
|
222
|
-
var
|
|
223
|
-
|
|
222
|
+
var b;
|
|
223
|
+
b = F.current, F.current = null, Fe();
|
|
224
224
|
try {
|
|
225
|
-
if (
|
|
226
|
-
var
|
|
225
|
+
if (r) {
|
|
226
|
+
var m = function() {
|
|
227
227
|
throw Error();
|
|
228
228
|
};
|
|
229
|
-
if (Object.defineProperty(
|
|
229
|
+
if (Object.defineProperty(m.prototype, "props", {
|
|
230
230
|
set: function() {
|
|
231
231
|
throw Error();
|
|
232
232
|
}
|
|
233
233
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
234
|
try {
|
|
235
|
-
Reflect.construct(
|
|
236
|
-
} catch (
|
|
237
|
-
|
|
235
|
+
Reflect.construct(m, []);
|
|
236
|
+
} catch (D) {
|
|
237
|
+
c = D;
|
|
238
238
|
}
|
|
239
|
-
Reflect.construct(e, [],
|
|
239
|
+
Reflect.construct(e, [], m);
|
|
240
240
|
} else {
|
|
241
241
|
try {
|
|
242
|
-
|
|
243
|
-
} catch (
|
|
244
|
-
|
|
242
|
+
m.call();
|
|
243
|
+
} catch (D) {
|
|
244
|
+
c = D;
|
|
245
245
|
}
|
|
246
|
-
e.call(
|
|
246
|
+
e.call(m.prototype);
|
|
247
247
|
}
|
|
248
248
|
} else {
|
|
249
249
|
try {
|
|
250
250
|
throw Error();
|
|
251
|
-
} catch (
|
|
252
|
-
|
|
251
|
+
} catch (D) {
|
|
252
|
+
c = D;
|
|
253
253
|
}
|
|
254
254
|
e();
|
|
255
255
|
}
|
|
256
|
-
} catch (
|
|
257
|
-
if (
|
|
258
|
-
for (var
|
|
259
|
-
`),
|
|
260
|
-
`),
|
|
261
|
-
|
|
262
|
-
for (;
|
|
263
|
-
if (
|
|
264
|
-
if (
|
|
256
|
+
} catch (D) {
|
|
257
|
+
if (D && c && typeof D.stack == "string") {
|
|
258
|
+
for (var p = D.stack.split(`
|
|
259
|
+
`), k = c.stack.split(`
|
|
260
|
+
`), P = p.length - 1, x = k.length - 1; P >= 1 && x >= 0 && p[P] !== k[x]; )
|
|
261
|
+
x--;
|
|
262
|
+
for (; P >= 1 && x >= 0; P--, x--)
|
|
263
|
+
if (p[P] !== k[x]) {
|
|
264
|
+
if (P !== 1 || x !== 1)
|
|
265
265
|
do
|
|
266
|
-
if (
|
|
267
|
-
var
|
|
268
|
-
` +
|
|
269
|
-
return e.displayName &&
|
|
266
|
+
if (P--, x--, x < 0 || p[P] !== k[x]) {
|
|
267
|
+
var N = `
|
|
268
|
+
` + p[P].replace(" at new ", " at ");
|
|
269
|
+
return e.displayName && N.includes("<anonymous>") && (N = N.replace("<anonymous>", e.displayName)), typeof e == "function" && xe.set(e, N), N;
|
|
270
270
|
}
|
|
271
|
-
while (
|
|
271
|
+
while (P >= 1 && x >= 0);
|
|
272
272
|
break;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
} finally {
|
|
276
|
-
|
|
276
|
+
We = !1, F.current = b, Le(), Error.prepareStackTrace = v;
|
|
277
277
|
}
|
|
278
|
-
var
|
|
279
|
-
return typeof e == "function" &&
|
|
278
|
+
var ke = e ? e.displayName || e.name : "", Ee = ke ? y(ke) : "";
|
|
279
|
+
return typeof e == "function" && xe.set(e, Ee), Ee;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
return
|
|
281
|
+
function ne(e, r, t) {
|
|
282
|
+
return Ve(e, !1);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
var
|
|
286
|
-
return !!(
|
|
284
|
+
function rr(e) {
|
|
285
|
+
var r = e.prototype;
|
|
286
|
+
return !!(r && r.isReactComponent);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function Te(e, r, t) {
|
|
289
289
|
if (e == null)
|
|
290
290
|
return "";
|
|
291
291
|
if (typeof e == "function")
|
|
292
|
-
return
|
|
292
|
+
return Ve(e, rr(e));
|
|
293
293
|
if (typeof e == "string")
|
|
294
|
-
return
|
|
294
|
+
return y(e);
|
|
295
295
|
switch (e) {
|
|
296
|
-
case
|
|
297
|
-
return
|
|
296
|
+
case T:
|
|
297
|
+
return y("Suspense");
|
|
298
298
|
case w:
|
|
299
|
-
return
|
|
299
|
+
return y("SuspenseList");
|
|
300
300
|
}
|
|
301
301
|
if (typeof e == "object")
|
|
302
302
|
switch (e.$$typeof) {
|
|
303
|
-
case
|
|
304
|
-
return
|
|
303
|
+
case E:
|
|
304
|
+
return ne(e.render);
|
|
305
305
|
case M:
|
|
306
|
-
return
|
|
307
|
-
case
|
|
308
|
-
var
|
|
306
|
+
return Te(e.type, r, t);
|
|
307
|
+
case C: {
|
|
308
|
+
var c = e, v = c._payload, b = c._init;
|
|
309
309
|
try {
|
|
310
|
-
return
|
|
310
|
+
return Te(b(v), r, t);
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
return "";
|
|
316
316
|
}
|
|
317
|
-
var
|
|
318
|
-
function
|
|
317
|
+
var ye = Object.prototype.hasOwnProperty, Ue = {}, De = z.ReactDebugCurrentFrame;
|
|
318
|
+
function be(e) {
|
|
319
319
|
if (e) {
|
|
320
|
-
var
|
|
321
|
-
|
|
320
|
+
var r = e._owner, t = Te(e.type, e._source, r ? r.type : null);
|
|
321
|
+
De.setExtraStackFrame(t);
|
|
322
322
|
} else
|
|
323
|
-
|
|
323
|
+
De.setExtraStackFrame(null);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function qe(e, r, t, c, v) {
|
|
326
326
|
{
|
|
327
|
-
var
|
|
328
|
-
for (var
|
|
329
|
-
if (
|
|
330
|
-
var
|
|
327
|
+
var b = Function.call.bind(ye);
|
|
328
|
+
for (var m in e)
|
|
329
|
+
if (b(e, m)) {
|
|
330
|
+
var p = void 0;
|
|
331
331
|
try {
|
|
332
|
-
if (typeof e[
|
|
333
|
-
var
|
|
334
|
-
throw
|
|
332
|
+
if (typeof e[m] != "function") {
|
|
333
|
+
var k = Error((c || "React class") + ": " + t + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
|
+
throw k.name = "Invariant Violation", k;
|
|
335
335
|
}
|
|
336
|
-
|
|
337
|
-
} catch (
|
|
338
|
-
|
|
336
|
+
p = e[m](r, m, c, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
|
+
} catch (P) {
|
|
338
|
+
p = P;
|
|
339
339
|
}
|
|
340
|
-
|
|
340
|
+
p && !(p instanceof Error) && (be(v), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", t, m, typeof p), be(null)), p instanceof Error && !(p.message in Ue) && (Ue[p.message] = !0, be(v), _("Failed %s type: %s", t, p.message), be(null));
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
var
|
|
345
|
-
function
|
|
346
|
-
return
|
|
344
|
+
var Me = Array.isArray;
|
|
345
|
+
function X(e) {
|
|
346
|
+
return Me(e);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Ie(e) {
|
|
349
349
|
{
|
|
350
|
-
var
|
|
351
|
-
return
|
|
350
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
351
|
+
return t;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function tr(e) {
|
|
355
355
|
try {
|
|
356
|
-
return
|
|
356
|
+
return Ne(e), !1;
|
|
357
357
|
} catch {
|
|
358
358
|
return !0;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Ne(e) {
|
|
362
362
|
return "" + e;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
if (
|
|
366
|
-
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
364
|
+
function He(e) {
|
|
365
|
+
if (tr(e))
|
|
366
|
+
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ie(e)), Ne(e);
|
|
367
367
|
}
|
|
368
|
-
var
|
|
368
|
+
var we = z.ReactCurrentOwner, Se = {
|
|
369
369
|
key: !0,
|
|
370
370
|
ref: !0,
|
|
371
371
|
__self: !0,
|
|
372
372
|
__source: !0
|
|
373
|
-
},
|
|
374
|
-
function
|
|
375
|
-
if (
|
|
376
|
-
var
|
|
377
|
-
if (
|
|
373
|
+
}, ae, Ge;
|
|
374
|
+
function de(e) {
|
|
375
|
+
if (ye.call(e, "ref")) {
|
|
376
|
+
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
377
|
+
if (r && r.isReactWarning)
|
|
378
378
|
return !1;
|
|
379
379
|
}
|
|
380
380
|
return e.ref !== void 0;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
if (
|
|
384
|
-
var
|
|
385
|
-
if (
|
|
382
|
+
function nr(e) {
|
|
383
|
+
if (ye.call(e, "key")) {
|
|
384
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
385
|
+
if (r && r.isReactWarning)
|
|
386
386
|
return !1;
|
|
387
387
|
}
|
|
388
388
|
return e.key !== void 0;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
typeof e.ref == "string" &&
|
|
390
|
+
function ie(e, r) {
|
|
391
|
+
typeof e.ref == "string" && we.current;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Je(e, r) {
|
|
394
394
|
{
|
|
395
|
-
var
|
|
396
|
-
|
|
395
|
+
var t = function() {
|
|
396
|
+
ae || (ae = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
397
397
|
};
|
|
398
|
-
|
|
399
|
-
get:
|
|
398
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
399
|
+
get: t,
|
|
400
400
|
configurable: !0
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function Xe(e, r) {
|
|
405
405
|
{
|
|
406
|
-
var
|
|
407
|
-
|
|
406
|
+
var t = function() {
|
|
407
|
+
Ge || (Ge = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
408
408
|
};
|
|
409
|
-
|
|
410
|
-
get:
|
|
409
|
+
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
410
|
+
get: t,
|
|
411
411
|
configurable: !0
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var
|
|
416
|
-
var
|
|
415
|
+
var ze = function(e, r, t, c, v, b, m) {
|
|
416
|
+
var p = {
|
|
417
417
|
// This tag allows us to uniquely identify this as a React Element
|
|
418
|
-
$$typeof:
|
|
418
|
+
$$typeof: l,
|
|
419
419
|
// Built-in properties that belong on the element
|
|
420
420
|
type: e,
|
|
421
|
-
key:
|
|
422
|
-
ref:
|
|
423
|
-
props:
|
|
421
|
+
key: r,
|
|
422
|
+
ref: t,
|
|
423
|
+
props: m,
|
|
424
424
|
// Record the component responsible for creating this element.
|
|
425
|
-
_owner:
|
|
425
|
+
_owner: b
|
|
426
426
|
};
|
|
427
|
-
return
|
|
427
|
+
return p._store = {}, Object.defineProperty(p._store, "validated", {
|
|
428
428
|
configurable: !1,
|
|
429
429
|
enumerable: !1,
|
|
430
430
|
writable: !0,
|
|
431
431
|
value: !1
|
|
432
|
-
}), Object.defineProperty(
|
|
432
|
+
}), Object.defineProperty(p, "_self", {
|
|
433
433
|
configurable: !1,
|
|
434
434
|
enumerable: !1,
|
|
435
435
|
writable: !1,
|
|
436
|
-
value:
|
|
437
|
-
}), Object.defineProperty(
|
|
436
|
+
value: c
|
|
437
|
+
}), Object.defineProperty(p, "_source", {
|
|
438
438
|
configurable: !1,
|
|
439
439
|
enumerable: !1,
|
|
440
440
|
writable: !1,
|
|
441
|
-
value:
|
|
442
|
-
}), Object.freeze && (Object.freeze(
|
|
441
|
+
value: v
|
|
442
|
+
}), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
|
|
443
443
|
};
|
|
444
|
-
function
|
|
444
|
+
function Ke(e, r, t, c, v) {
|
|
445
445
|
{
|
|
446
|
-
var
|
|
447
|
-
|
|
448
|
-
for (
|
|
449
|
-
|
|
446
|
+
var b, m = {}, p = null, k = null;
|
|
447
|
+
t !== void 0 && (He(t), p = "" + t), nr(r) && (He(r.key), p = "" + r.key), de(r) && (k = r.ref, ie(r, v));
|
|
448
|
+
for (b in r)
|
|
449
|
+
ye.call(r, b) && !Se.hasOwnProperty(b) && (m[b] = r[b]);
|
|
450
450
|
if (e && e.defaultProps) {
|
|
451
|
-
var
|
|
452
|
-
for (
|
|
453
|
-
|
|
451
|
+
var P = e.defaultProps;
|
|
452
|
+
for (b in P)
|
|
453
|
+
m[b] === void 0 && (m[b] = P[b]);
|
|
454
454
|
}
|
|
455
|
-
if (
|
|
456
|
-
var
|
|
457
|
-
|
|
455
|
+
if (p || k) {
|
|
456
|
+
var x = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
457
|
+
p && Je(m, x), k && Xe(m, x);
|
|
458
458
|
}
|
|
459
|
-
return
|
|
459
|
+
return ze(e, p, k, v, c, we.current, m);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
var
|
|
463
|
-
function
|
|
462
|
+
var Oe = z.ReactCurrentOwner, Ye = z.ReactDebugCurrentFrame;
|
|
463
|
+
function oe(e) {
|
|
464
464
|
if (e) {
|
|
465
|
-
var
|
|
466
|
-
|
|
465
|
+
var r = e._owner, t = Te(e.type, e._source, r ? r.type : null);
|
|
466
|
+
Ye.setExtraStackFrame(t);
|
|
467
467
|
} else
|
|
468
|
-
|
|
468
|
+
Ye.setExtraStackFrame(null);
|
|
469
469
|
}
|
|
470
|
-
var
|
|
471
|
-
|
|
472
|
-
function
|
|
473
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
470
|
+
var o;
|
|
471
|
+
o = !1;
|
|
472
|
+
function s(e) {
|
|
473
|
+
return typeof e == "object" && e !== null && e.$$typeof === l;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function u() {
|
|
476
476
|
{
|
|
477
|
-
if (
|
|
478
|
-
var e =
|
|
477
|
+
if (Oe.current) {
|
|
478
|
+
var e = te(Oe.current.type);
|
|
479
479
|
if (e)
|
|
480
480
|
return `
|
|
481
481
|
|
|
@@ -487,470 +487,523 @@ Check the render method of \`` + e + "`.";
|
|
|
487
487
|
function S(e) {
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
490
|
-
var
|
|
491
|
-
function
|
|
490
|
+
var h = {};
|
|
491
|
+
function se(e) {
|
|
492
492
|
{
|
|
493
|
-
var
|
|
494
|
-
if (!
|
|
495
|
-
var
|
|
496
|
-
|
|
493
|
+
var r = u();
|
|
494
|
+
if (!r) {
|
|
495
|
+
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
496
|
+
t && (r = `
|
|
497
497
|
|
|
498
|
-
Check the top-level render call using <` +
|
|
498
|
+
Check the top-level render call using <` + t + ">.");
|
|
499
499
|
}
|
|
500
|
-
return
|
|
500
|
+
return r;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Ce(e, r) {
|
|
504
504
|
{
|
|
505
505
|
if (!e._store || e._store.validated || e.key != null)
|
|
506
506
|
return;
|
|
507
507
|
e._store.validated = !0;
|
|
508
|
-
var
|
|
509
|
-
if (
|
|
508
|
+
var t = se(r);
|
|
509
|
+
if (h[t])
|
|
510
510
|
return;
|
|
511
|
-
|
|
512
|
-
var
|
|
513
|
-
e && e._owner && e._owner !==
|
|
511
|
+
h[t] = !0;
|
|
512
|
+
var c = "";
|
|
513
|
+
e && e._owner && e._owner !== Oe.current && (c = " It was passed a child from " + te(e._owner.type) + "."), oe(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, c), oe(null);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function W(e, r) {
|
|
517
517
|
{
|
|
518
518
|
if (typeof e != "object")
|
|
519
519
|
return;
|
|
520
|
-
if (
|
|
521
|
-
for (var
|
|
522
|
-
var
|
|
523
|
-
|
|
520
|
+
if (X(e))
|
|
521
|
+
for (var t = 0; t < e.length; t++) {
|
|
522
|
+
var c = e[t];
|
|
523
|
+
s(c) && Ce(c, r);
|
|
524
524
|
}
|
|
525
|
-
else if (
|
|
525
|
+
else if (s(e))
|
|
526
526
|
e._store && (e._store.validated = !0);
|
|
527
527
|
else if (e) {
|
|
528
|
-
var
|
|
529
|
-
if (typeof
|
|
530
|
-
for (var
|
|
531
|
-
|
|
528
|
+
var v = G(e);
|
|
529
|
+
if (typeof v == "function" && v !== e.entries)
|
|
530
|
+
for (var b = v.call(e), m; !(m = b.next()).done; )
|
|
531
|
+
s(m.value) && Ce(m.value, r);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Q(e) {
|
|
536
536
|
{
|
|
537
|
-
var
|
|
538
|
-
if (
|
|
537
|
+
var r = e.type;
|
|
538
|
+
if (r == null || typeof r == "string")
|
|
539
539
|
return;
|
|
540
|
-
var
|
|
541
|
-
if (typeof
|
|
542
|
-
|
|
543
|
-
else if (typeof
|
|
540
|
+
var t;
|
|
541
|
+
if (typeof r == "function")
|
|
542
|
+
t = r.propTypes;
|
|
543
|
+
else if (typeof r == "object" && (r.$$typeof === E || // Note: Memo only checks outer props here.
|
|
544
544
|
// Inner props are checked in the reconciler.
|
|
545
|
-
|
|
546
|
-
|
|
545
|
+
r.$$typeof === M))
|
|
546
|
+
t = r.propTypes;
|
|
547
547
|
else
|
|
548
548
|
return;
|
|
549
|
-
if (
|
|
550
|
-
var
|
|
551
|
-
|
|
552
|
-
} else if (
|
|
553
|
-
|
|
554
|
-
var
|
|
555
|
-
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
549
|
+
if (t) {
|
|
550
|
+
var c = te(r);
|
|
551
|
+
qe(t, e.props, "prop", c, e);
|
|
552
|
+
} else if (r.PropTypes !== void 0 && !o) {
|
|
553
|
+
o = !0;
|
|
554
|
+
var v = te(r);
|
|
555
|
+
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
556
556
|
}
|
|
557
|
-
typeof
|
|
557
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function ce(e) {
|
|
561
561
|
{
|
|
562
|
-
for (var
|
|
563
|
-
var
|
|
564
|
-
if (
|
|
565
|
-
|
|
562
|
+
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
563
|
+
var c = r[t];
|
|
564
|
+
if (c !== "children" && c !== "key") {
|
|
565
|
+
oe(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), oe(null);
|
|
566
566
|
break;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
e.ref !== null && (
|
|
569
|
+
e.ref !== null && (oe(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), oe(null));
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
var
|
|
573
|
-
function
|
|
572
|
+
var je = {};
|
|
573
|
+
function Re(e, r, t, c, v, b) {
|
|
574
574
|
{
|
|
575
|
-
var
|
|
576
|
-
if (!
|
|
577
|
-
var
|
|
578
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
579
|
-
var
|
|
580
|
-
|
|
581
|
-
var
|
|
582
|
-
e === null ?
|
|
575
|
+
var m = re(e);
|
|
576
|
+
if (!m) {
|
|
577
|
+
var p = "";
|
|
578
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (p += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
+
var k = S();
|
|
580
|
+
k ? p += k : p += u();
|
|
581
|
+
var P;
|
|
582
|
+
e === null ? P = "null" : X(e) ? P = "array" : e !== void 0 && e.$$typeof === l ? (P = "<" + (te(e.type) || "Unknown") + " />", p = " Did you accidentally export a JSX literal instead of a component?") : P = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", P, p);
|
|
583
583
|
}
|
|
584
|
-
var
|
|
585
|
-
if (
|
|
586
|
-
return
|
|
587
|
-
if (
|
|
588
|
-
var
|
|
589
|
-
if (
|
|
590
|
-
if (
|
|
591
|
-
if (
|
|
592
|
-
for (var
|
|
593
|
-
|
|
594
|
-
Object.freeze && Object.freeze(
|
|
584
|
+
var x = Ke(e, r, t, v, b);
|
|
585
|
+
if (x == null)
|
|
586
|
+
return x;
|
|
587
|
+
if (m) {
|
|
588
|
+
var N = r.children;
|
|
589
|
+
if (N !== void 0)
|
|
590
|
+
if (c)
|
|
591
|
+
if (X(N)) {
|
|
592
|
+
for (var ke = 0; ke < N.length; ke++)
|
|
593
|
+
W(N[ke], e);
|
|
594
|
+
Object.freeze && Object.freeze(N);
|
|
595
595
|
} else
|
|
596
596
|
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
597
|
else
|
|
598
|
-
|
|
598
|
+
W(N, e);
|
|
599
599
|
}
|
|
600
|
-
if (
|
|
601
|
-
var
|
|
602
|
-
return
|
|
603
|
-
}),
|
|
604
|
-
if (!
|
|
605
|
-
var
|
|
600
|
+
if (ye.call(r, "key")) {
|
|
601
|
+
var Ee = te(e), D = Object.keys(r).filter(function(mr) {
|
|
602
|
+
return mr !== "key";
|
|
603
|
+
}), ar = D.length > 0 ? "{key: someKey, " + D.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
+
if (!je[Ee + ar]) {
|
|
605
|
+
var pr = D.length > 0 ? "{" + D.join(": ..., ") + ": ...}" : "{}";
|
|
606
606
|
_(`A props object containing a "key" prop is being spread into JSX:
|
|
607
607
|
let props = %s;
|
|
608
608
|
<%s {...props} />
|
|
609
609
|
React keys must be passed directly to JSX without using spread:
|
|
610
610
|
let props = %s;
|
|
611
|
-
<%s key={someKey} {...props} />`,
|
|
611
|
+
<%s key={someKey} {...props} />`, ar, Ee, pr, Ee), je[Ee + ar] = !0;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
return e ===
|
|
614
|
+
return e === i ? ce(x) : Q(x), x;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
return
|
|
617
|
+
function Ze(e, r, t) {
|
|
618
|
+
return Re(e, r, t, !0);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
620
|
+
function K(e, r, t) {
|
|
621
|
+
return Re(e, r, t, !1);
|
|
622
622
|
}
|
|
623
|
-
var
|
|
624
|
-
|
|
625
|
-
}()),
|
|
623
|
+
var he = K, pe = Ze;
|
|
624
|
+
Be.Fragment = i, Be.jsx = he, Be.jsxs = pe;
|
|
625
|
+
})()), Be;
|
|
626
|
+
}
|
|
627
|
+
var cr;
|
|
628
|
+
function br() {
|
|
629
|
+
return cr || (cr = 1, process.env.NODE_ENV === "production" ? Qe.exports = gr() : Qe.exports = yr()), Qe.exports;
|
|
626
630
|
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
631
|
+
var lr = br();
|
|
632
|
+
const wr = (n) => n ? {
|
|
633
|
+
error: (...l) => console.error(...l),
|
|
634
|
+
warn: (...l) => console.warn(...l)
|
|
635
|
+
} : {
|
|
636
|
+
error: () => {
|
|
637
|
+
},
|
|
638
|
+
warn: () => {
|
|
639
|
+
}
|
|
640
|
+
}, ur = (n, l) => {
|
|
641
|
+
if (!n) return l;
|
|
642
|
+
if (typeof n == "string") {
|
|
643
|
+
const d = new f.Color(n);
|
|
644
|
+
return { r: d.r, g: d.g, b: d.b };
|
|
645
|
+
}
|
|
646
|
+
return typeof n == "object" && typeof n.r == "number" ? n : l;
|
|
647
|
+
}, Rr = (n) => {
|
|
648
|
+
if (!(!n || n.__shapeParticleTextPatched)) {
|
|
649
|
+
if (Object.defineProperty(n, "__shapeParticleTextPatched", {
|
|
650
|
+
value: !0,
|
|
651
|
+
configurable: !0
|
|
652
|
+
}), typeof n.getShaderPrecisionFormat == "function" && !n.getShaderPrecisionFormat.__shapeParticleTextPatched) {
|
|
653
|
+
const l = n.getShaderPrecisionFormat.bind(n), d = (...i) => {
|
|
654
|
+
try {
|
|
655
|
+
const a = l(...i);
|
|
656
|
+
if (a && typeof a.precision == "number") return a;
|
|
657
|
+
} catch {
|
|
658
|
+
}
|
|
659
|
+
return { rangeMin: 127, rangeMax: 127, precision: 23 };
|
|
660
|
+
};
|
|
661
|
+
Object.defineProperty(d, "__shapeParticleTextPatched", { value: !0 }), Object.defineProperty(n, "getShaderPrecisionFormat", { value: d, configurable: !0 });
|
|
662
|
+
}
|
|
663
|
+
if (typeof n.getParameter == "function" && !n.getParameter.__shapeParticleTextPatched) {
|
|
664
|
+
const l = n.getParameter.bind(n), d = (...i) => {
|
|
665
|
+
let a;
|
|
666
|
+
try {
|
|
667
|
+
a = l(...i);
|
|
668
|
+
} catch {
|
|
669
|
+
a = void 0;
|
|
670
|
+
}
|
|
671
|
+
const g = i[0];
|
|
672
|
+
return a ?? (g === 7938 ? "WebGL 1.0 (Three.js Mock)" : g === 35724 ? "WebGL GLSL ES 1.0 (Three.js Mock)" : g === 7936 ? "Three.js Mock Vendor" : g === 7937 ? "Three.js Mock Renderer" : g === 34921 || g === 34930 || g === 35657 || g === 35658 ? 16 : "");
|
|
673
|
+
};
|
|
674
|
+
Object.defineProperty(d, "__shapeParticleTextPatched", { value: !0 }), Object.defineProperty(n, "getParameter", { value: d, configurable: !0 });
|
|
675
|
+
}
|
|
676
|
+
if (typeof n.getExtension == "function" && !n.getExtension.__shapeParticleTextPatched) {
|
|
677
|
+
const l = n.getExtension.bind(n), d = (...i) => {
|
|
678
|
+
let a;
|
|
679
|
+
try {
|
|
680
|
+
a = l(...i);
|
|
681
|
+
} catch {
|
|
682
|
+
a = null;
|
|
683
|
+
}
|
|
684
|
+
return a === null && i[0] === "WEBGL_debug_renderer_info" ? null : a;
|
|
685
|
+
};
|
|
686
|
+
Object.defineProperty(d, "__shapeParticleTextPatched", { value: !0 }), Object.defineProperty(n, "getExtension", { value: d, configurable: !0 });
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
}, fr = ({ canvas: n, context: l, contextAttributes: d, log: i }) => {
|
|
690
|
+
try {
|
|
691
|
+
const a = new f.WebGLRenderer({
|
|
692
|
+
canvas: n,
|
|
693
|
+
context: l,
|
|
694
|
+
precision: "mediump",
|
|
695
|
+
...d
|
|
696
|
+
});
|
|
697
|
+
return a.capabilities && (a.capabilities.isWebGL2 || (a.capabilities.isWebGL2 = !0), a.capabilities.precision || (a.capabilities.precision = "mediump")), a;
|
|
698
|
+
} catch (a) {
|
|
699
|
+
return i.warn("ShapeParticleText: Failed to initialize WebGL renderer", a), null;
|
|
700
|
+
}
|
|
701
|
+
}, Er = ({ canvas: n, context: l, contextAttributes: d, log: i }) => {
|
|
702
|
+
const a = fr({ canvas: n, context: l, contextAttributes: d, log: { warn: () => {
|
|
703
|
+
} } });
|
|
704
|
+
if (a) return a;
|
|
705
|
+
Rr(l);
|
|
706
|
+
const g = fr({ canvas: n, context: l, contextAttributes: d, log: i });
|
|
707
|
+
if (g) return g;
|
|
708
|
+
i.warn("ShapeParticleText: Failed to initialize custom context renderer, attempting hard fallback...");
|
|
709
|
+
try {
|
|
710
|
+
return new f.WebGLRenderer({ canvas: n });
|
|
711
|
+
} catch (O) {
|
|
712
|
+
return i.error("ShapeParticleText: Fatal error initializing WebGL renderer:", O), null;
|
|
713
|
+
}
|
|
714
|
+
}, _r = (n, l = 1.5) => {
|
|
715
|
+
const d = n && n.trim().length > 0 ? n : "AI", i = document.createElement("canvas"), a = i.getContext("2d");
|
|
716
|
+
i.width = 1024, i.height = 512, a.fillStyle = "white", a.textAlign = "center", a.textBaseline = "middle";
|
|
717
|
+
let g = 350;
|
|
718
|
+
a.font = `bold ${g}px Arial`;
|
|
719
|
+
const O = i.width * 0.85;
|
|
720
|
+
let j = a.measureText(d);
|
|
721
|
+
for (; (j.width > O || g > i.height * 0.7) && g > 20; )
|
|
722
|
+
g -= 10, a.font = `bold ${g}px Arial`, j = a.measureText(d);
|
|
723
|
+
a.fillText(d, i.width / 2, i.height / 2);
|
|
724
|
+
const E = a.getImageData(0, 0, i.width, i.height), T = [], w = 3, M = 220;
|
|
725
|
+
let C = 1 / 0, H = -1 / 0, ee = 1 / 0, le = -1 / 0;
|
|
726
|
+
for (let Y = 0; Y < i.height; Y += w)
|
|
727
|
+
for (let ue = 0; ue < i.width; ue += w) {
|
|
728
|
+
const _e = (Math.floor(Y) * i.width + Math.floor(ue)) * 4;
|
|
729
|
+
if (E.data[_e + 3] > 160) {
|
|
730
|
+
const $ = (ue - i.width / 2) / M * l, R = -(Y - i.height / 2) / M * l, re = (Math.random() - 0.5) * 0.25;
|
|
731
|
+
T.push({ x: $, y: R, z: re }), $ < C && (C = $), $ > H && (H = $), R < ee && (ee = R), R > le && (le = R);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
const G = H - C, z = le - ee, _ = 3.2, me = 2.5;
|
|
735
|
+
let J = 1;
|
|
736
|
+
return G > _ && (J = _ / G), z * J > me && (J = me / z), J < 1 && T.forEach((Y) => {
|
|
737
|
+
Y.x *= J, Y.y *= J, Y.z *= J;
|
|
738
|
+
}), T;
|
|
739
|
+
}, Pr = ({ textParticlesData: n, actualCount: l }) => {
|
|
740
|
+
const d = [];
|
|
741
|
+
if (n.length > 0)
|
|
742
|
+
if (n.length > l) {
|
|
743
|
+
const i = n.length / l;
|
|
744
|
+
for (let a = 0; a < l; a++) {
|
|
745
|
+
const g = Math.floor(a * i), O = n[Math.min(g, n.length - 1)];
|
|
746
|
+
d.push(O.x, O.y, O.z);
|
|
747
|
+
}
|
|
748
|
+
} else
|
|
749
|
+
for (let i = 0; i < l; i++)
|
|
750
|
+
if (i < n.length)
|
|
751
|
+
d.push(n[i].x, n[i].y, n[i].z);
|
|
752
|
+
else {
|
|
753
|
+
const a = n[Math.floor(Math.random() * n.length)];
|
|
754
|
+
d.push(
|
|
755
|
+
a.x + (Math.random() - 0.5) * 0.5,
|
|
756
|
+
a.y + (Math.random() - 0.5) * 0.5,
|
|
757
|
+
a.z + (Math.random() - 0.5) * 0.3
|
|
758
|
+
);
|
|
759
|
+
}
|
|
760
|
+
else
|
|
761
|
+
for (let i = 0; i < l; i++)
|
|
762
|
+
d.push(0, 0, 0);
|
|
763
|
+
return d;
|
|
764
|
+
}, dr = (n) => new f.Vector3(
|
|
765
|
+
(Math.random() - 0.5) * n,
|
|
766
|
+
(Math.random() - 0.5) * n,
|
|
767
|
+
(Math.random() - 0.5) * n
|
|
768
|
+
), xr = ({ start: n, end: l, zapSpread: d, zapWidth: i, lightningColor: a }) => {
|
|
769
|
+
const g = n.clone().lerp(l, 0.3).add(dr(d)), O = n.clone().lerp(l, 0.7).add(dr(d)), j = new f.CatmullRomCurve3([n, g, O, l]), E = new f.TubeGeometry(j, 12, i, 4, !1);
|
|
770
|
+
let T;
|
|
771
|
+
a ? a.r !== void 0 ? T = new f.Color(a.r, a.g, a.b) : T = new f.Color(a) : T = new f.Color().setHSL(0.7 + Math.random() * 0.08, 1, 0.7 + Math.random() * 0.15);
|
|
772
|
+
const w = new f.MeshBasicMaterial({
|
|
773
|
+
color: T,
|
|
774
|
+
transparent: !0,
|
|
775
|
+
opacity: 0.85,
|
|
776
|
+
blending: f.AdditiveBlending
|
|
777
|
+
}), M = new f.Mesh(E, w), C = {
|
|
778
|
+
line: M,
|
|
779
|
+
material: w,
|
|
780
|
+
life: 0,
|
|
781
|
+
maxLife: 0.5 + Math.random() * 0.9,
|
|
782
|
+
flickerSpeed: 18 + Math.random() * 20,
|
|
783
|
+
phase: Math.random() * Math.PI * 2
|
|
784
|
+
};
|
|
785
|
+
return { line: M, material: w, segment: C };
|
|
786
|
+
}, Mr = ({
|
|
787
|
+
text: n = "AI",
|
|
788
|
+
particleCount: l = 24e3,
|
|
789
|
+
particleSize: d = 0.01,
|
|
790
|
+
primaryColor: i = { r: 0.396, g: 0.239, b: 0.82 },
|
|
634
791
|
// #653DD1
|
|
635
|
-
secondaryColor:
|
|
792
|
+
secondaryColor: a = { r: 0.537, g: 0.239, b: 0.82 },
|
|
636
793
|
// Purple variant
|
|
637
|
-
backgroundColor:
|
|
638
|
-
transparent:
|
|
639
|
-
morphDuration:
|
|
640
|
-
rotationSpeed:
|
|
641
|
-
hoverIntensity:
|
|
794
|
+
backgroundColor: g = "#000000",
|
|
795
|
+
transparent: O = !1,
|
|
796
|
+
morphDuration: j = 2.5,
|
|
797
|
+
rotationSpeed: E = 0.4,
|
|
798
|
+
hoverIntensity: T = 0.05,
|
|
642
799
|
lightningIntensity: w = 1,
|
|
643
800
|
lightningColor: M = null,
|
|
644
801
|
// Optional hex or {r,g,b} object. If null, uses random colors
|
|
645
|
-
zapSpread:
|
|
802
|
+
zapSpread: C = 0.7,
|
|
646
803
|
// Amplitude/Spread of lightning
|
|
647
|
-
zapWidth:
|
|
804
|
+
zapWidth: H = 0.02,
|
|
648
805
|
// Thickness of lightning
|
|
649
|
-
cameraDistance:
|
|
650
|
-
globeOpacity:
|
|
651
|
-
globeColor:
|
|
806
|
+
cameraDistance: ee = 5.5,
|
|
807
|
+
globeOpacity: le = 0.08,
|
|
808
|
+
globeColor: G = null,
|
|
652
809
|
// Optional override for globe color
|
|
653
|
-
showGlobe:
|
|
810
|
+
showGlobe: z = !0,
|
|
654
811
|
glowEffect: _ = !0,
|
|
655
|
-
|
|
656
|
-
|
|
812
|
+
debug: me = !1,
|
|
813
|
+
className: J = "",
|
|
814
|
+
style: Y = {},
|
|
815
|
+
...ue
|
|
657
816
|
}) => {
|
|
658
|
-
const
|
|
659
|
-
return
|
|
660
|
-
const
|
|
661
|
-
if (!
|
|
662
|
-
|
|
817
|
+
const _e = ir(null), $ = ir(null);
|
|
818
|
+
return vr(() => {
|
|
819
|
+
const R = _e.current, re = wr(me);
|
|
820
|
+
if (!R) {
|
|
821
|
+
re.error("ShapeParticleText: Canvas element not found");
|
|
663
822
|
return;
|
|
664
823
|
}
|
|
665
|
-
let
|
|
666
|
-
const
|
|
824
|
+
let ve = !0;
|
|
825
|
+
const Pe = [];
|
|
667
826
|
return (() => {
|
|
668
|
-
var
|
|
669
|
-
if (!
|
|
670
|
-
const
|
|
671
|
-
let
|
|
827
|
+
var Ye, oe;
|
|
828
|
+
if (!ve) return;
|
|
829
|
+
const A = new f.Scene(), B = new f.PerspectiveCamera(50, R.offsetWidth / R.offsetHeight, 0.1, 1e3);
|
|
830
|
+
let V;
|
|
672
831
|
try {
|
|
673
|
-
const
|
|
832
|
+
const o = {
|
|
674
833
|
alpha: !0,
|
|
675
834
|
antialias: !0,
|
|
676
835
|
powerPreference: "default"
|
|
677
|
-
}, a = x.getContext("webgl2", n) || x.getContext("webgl", n) || x.getContext("experimental-webgl", n);
|
|
678
|
-
if (!a) {
|
|
679
|
-
console.error("ShapeParticleText: WebGL not supported in this environment");
|
|
680
|
-
return;
|
|
681
|
-
}
|
|
682
|
-
const o = (c, i) => {
|
|
683
|
-
const m = Object.getOwnPropertyDescriptor(c, i);
|
|
684
|
-
return m && !m.writable && !m.configurable;
|
|
685
836
|
};
|
|
686
|
-
|
|
687
|
-
const c = a.getShaderPrecisionFormat, i = function(...m) {
|
|
688
|
-
return { rangeMin: 127, rangeMax: 127, precision: 23 };
|
|
689
|
-
};
|
|
690
|
-
i._isPatched = !0, Object.defineProperty(a, "getShaderPrecisionFormat", {
|
|
691
|
-
value: i,
|
|
692
|
-
configurable: !0
|
|
693
|
-
});
|
|
694
|
-
}
|
|
695
|
-
if (!a.getParameter._isPatched) {
|
|
696
|
-
const c = a.getParameter, i = function(...m) {
|
|
697
|
-
let S = null;
|
|
698
|
-
try {
|
|
699
|
-
S = c.apply(a, m);
|
|
700
|
-
} catch {
|
|
701
|
-
}
|
|
702
|
-
const v = m[0];
|
|
703
|
-
return S ?? (v === 7938 ? "WebGL 1.0 (Three.js Mock)" : v === 35724 ? "WebGL GLSL ES 1.0 (Three.js Mock)" : v === 7936 ? "Three.js Mock Vendor" : v === 7937 ? "Three.js Mock Renderer" : v === 34921 || v === 34930 || v === 35657 || v === 35658 ? 16 : "");
|
|
704
|
-
};
|
|
705
|
-
i._isPatched = !0, Object.defineProperty(a, "getParameter", {
|
|
706
|
-
value: i,
|
|
707
|
-
configurable: !0
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
|
-
if (!a.getExtension._isPatched) {
|
|
711
|
-
const c = a.getExtension, i = function(...m) {
|
|
712
|
-
let S = null;
|
|
713
|
-
try {
|
|
714
|
-
S = c.apply(a, m);
|
|
715
|
-
} catch {
|
|
716
|
-
}
|
|
717
|
-
return S === null && m[0] === "WEBGL_debug_renderer_info" ? null : S;
|
|
718
|
-
};
|
|
719
|
-
i._isPatched = !0, Object.defineProperty(a, "getExtension", {
|
|
720
|
-
value: i,
|
|
721
|
-
configurable: !0
|
|
722
|
-
});
|
|
723
|
-
}
|
|
724
|
-
g = new f.WebGLRenderer({
|
|
725
|
-
canvas: x,
|
|
726
|
-
context: a,
|
|
727
|
-
precision: "mediump",
|
|
728
|
-
...n
|
|
729
|
-
}), g.capabilities && (g.capabilities.isWebGL2 || (g.capabilities.isWebGL2 = !0), g.capabilities.precision || (g.capabilities.precision = "mediump"));
|
|
730
|
-
} catch (n) {
|
|
731
|
-
console.warn("ShapeParticleText: Failed to initialize custom context renderer, attempting hard fallback...", n);
|
|
837
|
+
let s = null;
|
|
732
838
|
try {
|
|
733
|
-
|
|
734
|
-
} catch
|
|
735
|
-
|
|
839
|
+
s = R.getContext("webgl2", o) || R.getContext("webgl", o) || R.getContext("experimental-webgl", o);
|
|
840
|
+
} catch {
|
|
841
|
+
s = null;
|
|
842
|
+
}
|
|
843
|
+
if (!s) {
|
|
844
|
+
re.error("ShapeParticleText: WebGL not supported in this environment");
|
|
736
845
|
return;
|
|
737
846
|
}
|
|
847
|
+
if (V = Er({ canvas: R, context: s, contextAttributes: o, log: re }), !V) return;
|
|
848
|
+
} catch (o) {
|
|
849
|
+
re.error("ShapeParticleText: Unexpected error initializing scene:", o);
|
|
850
|
+
return;
|
|
738
851
|
}
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
852
|
+
V.setSize(R.offsetWidth, R.offsetHeight), V.setPixelRatio(Math.min(window.devicePixelRatio, 2)), V.setClearColor(0, 0);
|
|
853
|
+
const U = ur(i, { r: 0.396, g: 0.239, b: 0.82 }), q = ur(a, { r: 0.537, g: 0.239, b: 0.82 });
|
|
854
|
+
let fe = null;
|
|
855
|
+
if (z) {
|
|
856
|
+
const o = new f.SphereGeometry(2, 48, 48);
|
|
857
|
+
let s;
|
|
858
|
+
G ? s = typeof G == "string" ? new f.Color(G) : new f.Color(G.r, G.g, G.b) : s = new f.Color(U.r, U.g, U.b);
|
|
859
|
+
const u = new f.MeshBasicMaterial({
|
|
860
|
+
color: s,
|
|
747
861
|
wireframe: !0,
|
|
748
862
|
transparent: !0,
|
|
749
|
-
opacity:
|
|
863
|
+
opacity: le
|
|
750
864
|
});
|
|
751
|
-
|
|
865
|
+
fe = new f.Mesh(o, u), A.add(fe);
|
|
752
866
|
}
|
|
753
|
-
const
|
|
754
|
-
let
|
|
755
|
-
for (let
|
|
756
|
-
const
|
|
757
|
-
let
|
|
758
|
-
|
|
759
|
-
const
|
|
760
|
-
|
|
761
|
-
const
|
|
762
|
-
if (
|
|
867
|
+
const Z = new f.Group(), ge = new Float32Array(l * 3), I = new Float32Array(l * 3), Ae = new Float32Array(l), Fe = [], Le = [], F = [], L = [];
|
|
868
|
+
let y = 0;
|
|
869
|
+
for (let o = 0; o < l; o++) {
|
|
870
|
+
const s = o < l / 2 ? -1 : 1, u = Math.random() * Math.PI, S = Math.random() * Math.PI * 2, h = 1.4 + Math.random() * 0.3, se = 1.2 + Math.random() * 0.2, Ce = 1 + Math.random() * 0.2;
|
|
871
|
+
let W = h * Math.sin(u) * Math.cos(S), Q = se * Math.sin(u) * Math.sin(S), ce = Ce * Math.cos(u);
|
|
872
|
+
W = W * 0.85 + s * 0.35;
|
|
873
|
+
const je = (Math.sin(u * 8) * Math.cos(S * 6) + Math.sin(u * 12) * Math.sin(S * 8)) * 0.12, Re = Math.sqrt(W * W + Q * Q + ce * ce);
|
|
874
|
+
Re > 0.1 && (W += je * (W / Re), Q += je * (Q / Re), ce += je * (ce / Re));
|
|
875
|
+
const Ze = Math.sqrt(W * W + Q * Q + ce * ce);
|
|
876
|
+
if (Ze < 1 || Ze > 2 || s === -1 && W > -0.15 || s === 1 && W < 0.15)
|
|
763
877
|
continue;
|
|
764
|
-
const
|
|
765
|
-
|
|
766
|
-
const
|
|
767
|
-
if (
|
|
768
|
-
|
|
769
|
-
else if (
|
|
770
|
-
const
|
|
771
|
-
|
|
878
|
+
const K = new f.Vector3(W, Q, ce);
|
|
879
|
+
K.x < 0 ? Fe.push(K.clone()) : Le.push(K.clone()), ge[y * 3] = K.x, ge[y * 3 + 1] = K.y, ge[y * 3 + 2] = K.z, F.push(K.x, K.y, K.z);
|
|
880
|
+
const he = (Q + se) / (se * 2);
|
|
881
|
+
if (he < 0.3)
|
|
882
|
+
I[y * 3] = U.r * 0.5 + he * 0.4, I[y * 3 + 1] = U.g * 1 + he * 0.05, I[y * 3 + 2] = U.b * 1 + he * 0.05;
|
|
883
|
+
else if (he < 0.6) {
|
|
884
|
+
const pe = (he - 0.3) / 0.3;
|
|
885
|
+
I[y * 3] = (U.r * (1 - pe) + q.r * pe) * 1.1, I[y * 3 + 1] = (U.g * (1 - pe) + q.g * pe) * 1.1, I[y * 3 + 2] = (U.b * (1 - pe) + q.b * pe) * 1.1;
|
|
772
886
|
} else
|
|
773
|
-
|
|
774
|
-
|
|
887
|
+
I[y * 3] = q.r * 1, I[y * 3 + 1] = q.g * 1, I[y * 3 + 2] = q.b * 1;
|
|
888
|
+
Ae[y] = Math.random() * 1.5 + 0.8, y++;
|
|
775
889
|
}
|
|
776
|
-
const
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
let v = i.measureText(o);
|
|
783
|
-
for (; (v.width > S || m > c.height * 0.7) && m > 20; )
|
|
784
|
-
m -= 10, i.font = `bold ${m}px Arial`, v = i.measureText(o);
|
|
785
|
-
i.fillText(o, c.width / 2, c.height / 2);
|
|
786
|
-
const k = i.getImageData(0, 0, c.width, c.height), E = [], $ = 3, z = 220;
|
|
787
|
-
let ie = 1 / 0, O = -1 / 0, I = 1 / 0, B = -1 / 0;
|
|
788
|
-
for (let r = 0; r < c.height; r += $)
|
|
789
|
-
for (let s = 0; s < c.width; s += $) {
|
|
790
|
-
const h = (Math.floor(r) * c.width + Math.floor(s)) * 4;
|
|
791
|
-
if (k.data[h + 3] > 160) {
|
|
792
|
-
const d = (s - c.width / 2) / z * a, l = -(r - c.height / 2) / z * a, u = (Math.random() - 0.5) * 0.25;
|
|
793
|
-
E.push({ x: d, y: l, z: u }), d < ie && (ie = d), d > O && (O = d), l < I && (I = l), l > B && (B = l);
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
const qe = O - ie, Ne = B - I, He = 3.2, e = 2.5;
|
|
797
|
-
let t = 1;
|
|
798
|
-
return qe > He && (t = He / qe), Ne * t > e && (t = e / Ne), t < 1 && E.forEach((r) => {
|
|
799
|
-
r.x *= t, r.y *= t, r.z *= t;
|
|
800
|
-
}), E;
|
|
801
|
-
})(pe, 1.8);
|
|
802
|
-
if (G.length > 0)
|
|
803
|
-
if (G.length > p) {
|
|
804
|
-
const n = G.length / p;
|
|
805
|
-
for (let a = 0; a < p; a++) {
|
|
806
|
-
const o = Math.floor(a * n), c = G[Math.min(o, G.length - 1)];
|
|
807
|
-
T.push(c.x, c.y, c.z);
|
|
808
|
-
}
|
|
809
|
-
} else
|
|
810
|
-
for (let n = 0; n < p; n++)
|
|
811
|
-
if (n < G.length)
|
|
812
|
-
T.push(
|
|
813
|
-
G[n].x,
|
|
814
|
-
G[n].y,
|
|
815
|
-
G[n].z
|
|
816
|
-
);
|
|
817
|
-
else {
|
|
818
|
-
const a = G[Math.floor(Math.random() * G.length)];
|
|
819
|
-
T.push(
|
|
820
|
-
a.x + (Math.random() - 0.5) * 0.5,
|
|
821
|
-
a.y + (Math.random() - 0.5) * 0.5,
|
|
822
|
-
a.z + (Math.random() - 0.5) * 0.3
|
|
823
|
-
);
|
|
824
|
-
}
|
|
825
|
-
else
|
|
826
|
-
for (let n = 0; n < p; n++)
|
|
827
|
-
T.push(0, 0, 0);
|
|
828
|
-
const Te = le.slice(0, p * 3), Se = L.slice(0, p * 3), xe = Me.slice(0, p), q = new f.BufferGeometry();
|
|
829
|
-
q.setAttribute("position", new f.BufferAttribute(Te, 3)), q.setAttribute("color", new f.BufferAttribute(Se, 3)), q.setAttribute("size", new f.BufferAttribute(xe, 1)), q.setDrawRange(0, p);
|
|
830
|
-
const Ee = new f.PointsMaterial({
|
|
831
|
-
size: ve,
|
|
890
|
+
const We = _r(n, 1.8);
|
|
891
|
+
L.push(...Pr({ textParticlesData: We, actualCount: y }));
|
|
892
|
+
const xe = ge.slice(0, y * 3), er = I.slice(0, y * 3), Ve = Ae.slice(0, y), ne = new f.BufferGeometry();
|
|
893
|
+
ne.setAttribute("position", new f.BufferAttribute(xe, 3)), ne.setAttribute("color", new f.BufferAttribute(er, 3)), ne.setAttribute("size", new f.BufferAttribute(Ve, 1)), ne.setDrawRange(0, y);
|
|
894
|
+
const rr = new f.PointsMaterial({
|
|
895
|
+
size: d,
|
|
832
896
|
vertexColors: !0,
|
|
833
897
|
transparent: !0,
|
|
834
898
|
opacity: 1,
|
|
835
899
|
blending: _ ? f.AdditiveBlending : f.NormalBlending,
|
|
836
900
|
sizeAttenuation: !0
|
|
837
|
-
}),
|
|
838
|
-
|
|
839
|
-
const
|
|
840
|
-
color:
|
|
901
|
+
}), Te = new f.Points(ne, rr);
|
|
902
|
+
Z.add(Te), A.add(Z);
|
|
903
|
+
const ye = new f.Color(q.r, q.g, q.b), Ue = new f.LineBasicMaterial({
|
|
904
|
+
color: ye,
|
|
841
905
|
transparent: !0,
|
|
842
906
|
opacity: 0.2
|
|
843
|
-
}),
|
|
844
|
-
if (
|
|
845
|
-
for (let
|
|
846
|
-
const
|
|
847
|
-
if (!
|
|
848
|
-
const
|
|
849
|
-
|
|
907
|
+
}), De = new f.Group(), be = Fe.length, qe = Le.length;
|
|
908
|
+
if (be > 0 && qe > 0)
|
|
909
|
+
for (let o = 0; o < 80; o++) {
|
|
910
|
+
const s = (Ye = Fe[Math.floor(Math.random() * be)]) == null ? void 0 : Ye.clone(), u = (oe = Le[Math.floor(Math.random() * qe)]) == null ? void 0 : oe.clone();
|
|
911
|
+
if (!s || !u) continue;
|
|
912
|
+
const S = new f.BufferGeometry().setFromPoints([s, u]), h = new f.Line(S, Ue);
|
|
913
|
+
De.add(h);
|
|
850
914
|
}
|
|
851
|
-
|
|
852
|
-
const
|
|
853
|
-
|
|
915
|
+
Z.add(De);
|
|
916
|
+
const Me = new f.Group();
|
|
917
|
+
Z.add(Me);
|
|
854
918
|
const X = [];
|
|
855
|
-
let
|
|
856
|
-
const
|
|
857
|
-
(
|
|
858
|
-
(Math.random()
|
|
859
|
-
(
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
color: E,
|
|
869
|
-
transparent: !0,
|
|
870
|
-
opacity: 0.85,
|
|
871
|
-
blending: f.AdditiveBlending
|
|
872
|
-
}), z = new f.Mesh(k, $);
|
|
873
|
-
fe.add(z), X.push({
|
|
874
|
-
line: z,
|
|
875
|
-
material: $,
|
|
876
|
-
life: 0,
|
|
877
|
-
maxLife: 0.5 + Math.random() * 0.9,
|
|
878
|
-
flickerSpeed: 18 + Math.random() * 20,
|
|
879
|
-
phase: Math.random() * Math.PI * 2
|
|
880
|
-
});
|
|
881
|
-
}, et = new f.Clock();
|
|
882
|
-
Q.position.set(0, 0, Pe);
|
|
883
|
-
const Re = { x: 0, y: 0 }, de = { x: 0, y: 0 }, ee = { x: 0, y: 0 }, je = (n) => {
|
|
884
|
-
if (!x) return;
|
|
885
|
-
const a = x.getBoundingClientRect();
|
|
886
|
-
Re.x = (n.clientX - a.left) / a.width * 2 - 1, Re.y = -((n.clientY - a.top) / a.height) * 2 + 1, de.y = Re.x * 0.3 * (H / 0.05), de.x = Re.y * 0.2 * (H / 0.05);
|
|
919
|
+
let Ie = 0;
|
|
920
|
+
const tr = 6, Ne = () => {
|
|
921
|
+
if (!ve || !y) return;
|
|
922
|
+
const o = Math.floor(Math.random() * y), s = Math.floor(Math.random() * y), u = ne.attributes.position.array, S = new f.Vector3(u[o * 3], u[o * 3 + 1], u[o * 3 + 2]), h = new f.Vector3(u[s * 3], u[s * 3 + 1], u[s * 3 + 2]);
|
|
923
|
+
if (S.lengthSq() < 0.1 || h.lengthSq() < 0.1 || S.distanceToSquared(h) < 0.5) return;
|
|
924
|
+
const { line: se, segment: Ce } = xr({ start: S, end: h, zapSpread: C, zapWidth: H, lightningColor: M });
|
|
925
|
+
Me.add(se), X.push(Ce);
|
|
926
|
+
}, He = new f.Clock();
|
|
927
|
+
B.position.set(0, 0, ee);
|
|
928
|
+
const we = { x: 0, y: 0 }, Se = { x: 0, y: 0 }, ae = { x: 0, y: 0 }, Ge = (o) => {
|
|
929
|
+
if (!R) return;
|
|
930
|
+
const s = R.getBoundingClientRect();
|
|
931
|
+
we.x = (o.clientX - s.left) / s.width * 2 - 1, we.y = -((o.clientY - s.top) / s.height) * 2 + 1, Se.y = we.x * 0.3 * (T / 0.05), Se.x = we.y * 0.2 * (T / 0.05);
|
|
887
932
|
};
|
|
888
|
-
|
|
889
|
-
|
|
933
|
+
R.addEventListener("mousemove", Ge), Pe.push(() => {
|
|
934
|
+
R.removeEventListener("mousemove", Ge);
|
|
890
935
|
});
|
|
891
|
-
let
|
|
892
|
-
const
|
|
893
|
-
let
|
|
894
|
-
const
|
|
895
|
-
let
|
|
896
|
-
function
|
|
897
|
-
if (!
|
|
898
|
-
|
|
899
|
-
const
|
|
900
|
-
if (
|
|
901
|
-
|
|
902
|
-
const
|
|
903
|
-
for (let
|
|
904
|
-
const
|
|
905
|
-
|
|
936
|
+
let de = 0;
|
|
937
|
+
const nr = 0.08;
|
|
938
|
+
let ie = 0, Je = 1;
|
|
939
|
+
const Xe = 3;
|
|
940
|
+
let ze = Xe;
|
|
941
|
+
function Ke() {
|
|
942
|
+
if (!ve) return;
|
|
943
|
+
$.current = requestAnimationFrame(Ke);
|
|
944
|
+
const o = He.getDelta();
|
|
945
|
+
if (de += o, ae.x += (Se.x - ae.x) * 0.05, ae.y += (Se.y - ae.y) * 0.05, fe && (fe.rotation.y += o * 0.1, fe.rotation.x = Math.sin(de * 0.3) * 0.03), Z.rotation.y = Math.sin(de * 0.4) * E + ae.y, Z.rotation.x = Math.sin(de * 0.25) * nr + ae.x, Z.rotation.z = Math.cos(de * 0.15) * 0.015, ze -= o, ze <= 0) {
|
|
946
|
+
ie += o / j, ie >= 1 && (ie = 0, Je *= -1, ze = Xe);
|
|
947
|
+
const s = ie < 0.5 ? 2 * ie * ie : 1 - Math.pow(-2 * ie + 2, 2) / 2, u = ne.attributes.position;
|
|
948
|
+
for (let S = 0; S < y; S++) {
|
|
949
|
+
const h = S * 3;
|
|
950
|
+
Je === 1 ? (u.array[h] = F[h] + (L[h] - F[h]) * s, u.array[h + 1] = F[h + 1] + (L[h + 1] - F[h + 1]) * s, u.array[h + 2] = F[h + 2] + (L[h + 2] - F[h + 2]) * s) : (u.array[h] = L[h] + (F[h] - L[h]) * s, u.array[h + 1] = L[h + 1] + (F[h + 1] - L[h + 1]) * s, u.array[h + 2] = L[h + 2] + (F[h + 2] - L[h + 2]) * s);
|
|
906
951
|
}
|
|
907
|
-
|
|
952
|
+
u.needsUpdate = !0;
|
|
908
953
|
}
|
|
909
|
-
|
|
910
|
-
for (let
|
|
911
|
-
const
|
|
912
|
-
if (!
|
|
913
|
-
|
|
914
|
-
const
|
|
915
|
-
|
|
954
|
+
Ie -= o, w > 0 && Ie <= 0 && X.length < tr * w && (Ne(), Ie = (0.12 + Math.random() * 0.25) / Math.max(0.1, w));
|
|
955
|
+
for (let s = X.length - 1; s >= 0; s--) {
|
|
956
|
+
const u = X[s];
|
|
957
|
+
if (!u || !u.material) continue;
|
|
958
|
+
u.life += o;
|
|
959
|
+
const S = u.life / u.maxLife, h = Math.pow(Math.max(0, 1 - S), 1.5), se = 0.6 + Math.sin(de * u.flickerSpeed + u.phase) * 0.4;
|
|
960
|
+
u.material.opacity = Math.max(0, h * se * Math.min(1, w)), u.life >= u.maxLife && (Me.remove(u.line), u.line.geometry && u.line.geometry.dispose(), u.material && u.material.dispose(), X.splice(s, 1));
|
|
916
961
|
}
|
|
917
|
-
|
|
962
|
+
V.render(A, B);
|
|
918
963
|
}
|
|
919
|
-
|
|
920
|
-
const
|
|
921
|
-
if (!
|
|
922
|
-
const
|
|
923
|
-
|
|
964
|
+
Ke();
|
|
965
|
+
const Oe = () => {
|
|
966
|
+
if (!ve || !R) return;
|
|
967
|
+
const o = R.offsetWidth, s = R.offsetHeight;
|
|
968
|
+
o === 0 || s === 0 || (B.aspect = o / s, B.updateProjectionMatrix(), V.setSize(o, s), V.setPixelRatio(Math.min(window.devicePixelRatio * 1.5, 3)));
|
|
924
969
|
};
|
|
925
|
-
window.addEventListener("resize",
|
|
926
|
-
window.removeEventListener("resize",
|
|
927
|
-
|
|
928
|
-
}), X.length = 0,
|
|
929
|
-
|
|
930
|
-
}),
|
|
970
|
+
window.addEventListener("resize", Oe), Pe.push(() => {
|
|
971
|
+
window.removeEventListener("resize", Oe), X.forEach((o) => {
|
|
972
|
+
o.line && (Me.remove(o.line), o.line.geometry && o.line.geometry.dispose(), o.material && o.material.dispose());
|
|
973
|
+
}), X.length = 0, A.traverse((o) => {
|
|
974
|
+
o.geometry && o.geometry.dispose(), o.material && (Array.isArray(o.material) ? o.material.forEach((s) => s.dispose()) : o.material.dispose());
|
|
975
|
+
}), V.dispose();
|
|
931
976
|
});
|
|
932
977
|
})(), () => {
|
|
933
|
-
|
|
978
|
+
ve = !1, $.current && (cancelAnimationFrame($.current), $.current = null), Pe.forEach((A) => {
|
|
934
979
|
try {
|
|
935
|
-
|
|
936
|
-
} catch (
|
|
937
|
-
|
|
980
|
+
A();
|
|
981
|
+
} catch (B) {
|
|
982
|
+
re.error("Cleanup error:", B);
|
|
938
983
|
}
|
|
939
984
|
});
|
|
940
985
|
};
|
|
941
|
-
}, [
|
|
942
|
-
"
|
|
986
|
+
}, [n, l, d, i, a, j, E, T, w, M, C, H, ee, le, G, z, _, me]), /* @__PURE__ */ lr.jsx(
|
|
987
|
+
"div",
|
|
943
988
|
{
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
989
|
+
...ue,
|
|
990
|
+
className: J,
|
|
991
|
+
style: { position: "relative", width: "100%", height: "100%", backgroundColor: O ? "transparent" : g, ...Y },
|
|
992
|
+
children: /* @__PURE__ */ lr.jsx(
|
|
993
|
+
"canvas",
|
|
994
|
+
{
|
|
995
|
+
ref: _e,
|
|
996
|
+
style: {
|
|
997
|
+
display: "block",
|
|
998
|
+
width: "100%",
|
|
999
|
+
height: "100%",
|
|
1000
|
+
outline: "none"
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
)
|
|
951
1004
|
}
|
|
952
|
-
)
|
|
1005
|
+
);
|
|
953
1006
|
};
|
|
954
1007
|
export {
|
|
955
|
-
|
|
1008
|
+
Mr as ShapeParticleText
|
|
956
1009
|
};
|