@micjanic/recursive-grid 1.0.28 → 1.0.29
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { useApplication as
|
|
6
|
-
import { Graphics as
|
|
1
|
+
var fe = Object.defineProperty;
|
|
2
|
+
var de = (t, n, a) => n in t ? fe(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
|
|
3
|
+
var h = (t, n, a) => de(t, typeof n != "symbol" ? n + "" : n, a);
|
|
4
|
+
import me, { createContext as he, useMemo as pe, useContext as _e, useRef as L, useEffect as K, useCallback as Ee } from "react";
|
|
5
|
+
import { useApplication as ee, useTick as Re, extend as ve, Application as Te } from "@pixi/react";
|
|
6
|
+
import { Graphics as re, Particle as te, Sprite as be, Container as xe, Texture as Pe, ParticleContainer as ye } from "pixi.js";
|
|
7
7
|
var N = { exports: {} }, g = {};
|
|
8
8
|
/**
|
|
9
9
|
* @license React
|
|
@@ -14,29 +14,29 @@ var N = { exports: {} }, g = {};
|
|
|
14
14
|
* This source code is licensed under the MIT license found in the
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
|
16
16
|
*/
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
function
|
|
17
|
+
var J;
|
|
18
|
+
function Ae() {
|
|
19
|
+
if (J) return g;
|
|
20
|
+
J = 1;
|
|
21
|
+
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
22
|
+
function a(l, o, c) {
|
|
23
23
|
var f = null;
|
|
24
|
-
if (c !== void 0 && (f = "" + c),
|
|
24
|
+
if (c !== void 0 && (f = "" + c), o.key !== void 0 && (f = "" + o.key), "key" in o) {
|
|
25
25
|
c = {};
|
|
26
|
-
for (var d in
|
|
27
|
-
d !== "key" && (c[d] =
|
|
28
|
-
} else c =
|
|
29
|
-
return
|
|
30
|
-
$$typeof:
|
|
26
|
+
for (var d in o)
|
|
27
|
+
d !== "key" && (c[d] = o[d]);
|
|
28
|
+
} else c = o;
|
|
29
|
+
return o = c.ref, {
|
|
30
|
+
$$typeof: t,
|
|
31
31
|
type: l,
|
|
32
32
|
key: f,
|
|
33
|
-
ref:
|
|
33
|
+
ref: o !== void 0 ? o : null,
|
|
34
34
|
props: c
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
return g.Fragment =
|
|
37
|
+
return g.Fragment = n, g.jsx = a, g.jsxs = a, g;
|
|
38
38
|
}
|
|
39
|
-
var
|
|
39
|
+
var k = {};
|
|
40
40
|
/**
|
|
41
41
|
* @license React
|
|
42
42
|
* react-jsx-runtime.development.js
|
|
@@ -46,26 +46,26 @@ var S = {};
|
|
|
46
46
|
* This source code is licensed under the MIT license found in the
|
|
47
47
|
* LICENSE file in the root directory of this source tree.
|
|
48
48
|
*/
|
|
49
|
-
var
|
|
50
|
-
function
|
|
51
|
-
return
|
|
52
|
-
function
|
|
49
|
+
var V;
|
|
50
|
+
function ge() {
|
|
51
|
+
return V || (V = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
52
|
+
function t(e) {
|
|
53
53
|
if (e == null) return null;
|
|
54
54
|
if (typeof e == "function")
|
|
55
|
-
return e.$$typeof ===
|
|
55
|
+
return e.$$typeof === ie ? null : e.displayName || e.name || null;
|
|
56
56
|
if (typeof e == "string") return e;
|
|
57
57
|
switch (e) {
|
|
58
|
-
case x:
|
|
59
|
-
return "Fragment";
|
|
60
58
|
case P:
|
|
59
|
+
return "Fragment";
|
|
60
|
+
case y:
|
|
61
61
|
return "Profiler";
|
|
62
|
-
case
|
|
62
|
+
case C:
|
|
63
63
|
return "StrictMode";
|
|
64
|
-
case
|
|
64
|
+
case ae:
|
|
65
65
|
return "Suspense";
|
|
66
|
-
case ne:
|
|
67
|
-
return "SuspenseList";
|
|
68
66
|
case oe:
|
|
67
|
+
return "SuspenseList";
|
|
68
|
+
case le:
|
|
69
69
|
return "Activity";
|
|
70
70
|
}
|
|
71
71
|
if (typeof e == "object")
|
|
@@ -74,56 +74,56 @@ function Se() {
|
|
|
74
74
|
), e.$$typeof) {
|
|
75
75
|
case T:
|
|
76
76
|
return "Portal";
|
|
77
|
-
case
|
|
77
|
+
case O:
|
|
78
78
|
return e.displayName || "Context";
|
|
79
79
|
case A:
|
|
80
80
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
81
|
-
case
|
|
81
|
+
case w:
|
|
82
82
|
var r = e.render;
|
|
83
83
|
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
84
|
-
case
|
|
85
|
-
return r = e.displayName || null, r !== null ? r :
|
|
84
|
+
case se:
|
|
85
|
+
return r = e.displayName || null, r !== null ? r : t(e.type) || "Memo";
|
|
86
86
|
case D:
|
|
87
87
|
r = e._payload, e = e._init;
|
|
88
88
|
try {
|
|
89
|
-
return
|
|
89
|
+
return t(e(r));
|
|
90
90
|
} catch {
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
return null;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function n(e) {
|
|
96
96
|
return "" + e;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function a(e) {
|
|
99
99
|
try {
|
|
100
|
-
|
|
100
|
+
n(e);
|
|
101
101
|
var r = !1;
|
|
102
102
|
} catch {
|
|
103
103
|
r = !0;
|
|
104
104
|
}
|
|
105
105
|
if (r) {
|
|
106
106
|
r = console;
|
|
107
|
-
var
|
|
108
|
-
return
|
|
107
|
+
var s = r.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
108
|
+
return s.call(
|
|
109
109
|
r,
|
|
110
110
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
111
111
|
i
|
|
112
|
-
),
|
|
112
|
+
), n(e);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
function l(e) {
|
|
116
|
-
if (e ===
|
|
116
|
+
if (e === P) return "<>";
|
|
117
117
|
if (typeof e == "object" && e !== null && e.$$typeof === D)
|
|
118
118
|
return "<...>";
|
|
119
119
|
try {
|
|
120
|
-
var r =
|
|
120
|
+
var r = t(e);
|
|
121
121
|
return r ? "<" + r + ">" : "<...>";
|
|
122
122
|
} catch {
|
|
123
123
|
return "<...>";
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function o() {
|
|
127
127
|
var e = Y.A;
|
|
128
128
|
return e === null ? null : e.getOwner();
|
|
129
129
|
}
|
|
@@ -138,34 +138,34 @@ function Se() {
|
|
|
138
138
|
return e.key !== void 0;
|
|
139
139
|
}
|
|
140
140
|
function d(e, r) {
|
|
141
|
-
function
|
|
142
|
-
|
|
141
|
+
function s() {
|
|
142
|
+
G || (G = !0, console.error(
|
|
143
143
|
"%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://react.dev/link/special-props)",
|
|
144
144
|
r
|
|
145
145
|
));
|
|
146
146
|
}
|
|
147
|
-
|
|
148
|
-
get:
|
|
147
|
+
s.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
148
|
+
get: s,
|
|
149
149
|
configurable: !0
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
var e =
|
|
154
|
-
return
|
|
152
|
+
function S() {
|
|
153
|
+
var e = t(this.type);
|
|
154
|
+
return W[e] || (W[e] = !0, console.error(
|
|
155
155
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
156
156
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
var u =
|
|
158
|
+
function m(e, r, s, i, j, M) {
|
|
159
|
+
var u = s.ref;
|
|
160
160
|
return e = {
|
|
161
161
|
$$typeof: v,
|
|
162
162
|
type: e,
|
|
163
163
|
key: r,
|
|
164
|
-
props:
|
|
164
|
+
props: s,
|
|
165
165
|
_owner: i
|
|
166
166
|
}, (u !== void 0 ? u : null) !== null ? Object.defineProperty(e, "ref", {
|
|
167
167
|
enumerable: !1,
|
|
168
|
-
get:
|
|
168
|
+
get: S
|
|
169
169
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
170
170
|
configurable: !1,
|
|
171
171
|
enumerable: !1,
|
|
@@ -180,7 +180,7 @@ function Se() {
|
|
|
180
180
|
configurable: !1,
|
|
181
181
|
enumerable: !1,
|
|
182
182
|
writable: !0,
|
|
183
|
-
value:
|
|
183
|
+
value: j
|
|
184
184
|
}), Object.defineProperty(e, "_debugTask", {
|
|
185
185
|
configurable: !1,
|
|
186
186
|
enumerable: !1,
|
|
@@ -188,11 +188,11 @@ function Se() {
|
|
|
188
188
|
value: M
|
|
189
189
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function x(e, r, s, i, j, M) {
|
|
192
192
|
var u = r.children;
|
|
193
193
|
if (u !== void 0)
|
|
194
194
|
if (i)
|
|
195
|
-
if (
|
|
195
|
+
if (ue(u)) {
|
|
196
196
|
for (i = 0; i < u.length; i++)
|
|
197
197
|
E(u[i]);
|
|
198
198
|
Object.freeze && Object.freeze(u);
|
|
@@ -202,11 +202,11 @@ function Se() {
|
|
|
202
202
|
);
|
|
203
203
|
else E(u);
|
|
204
204
|
if (F.call(r, "key")) {
|
|
205
|
-
u =
|
|
206
|
-
var b = Object.keys(r).filter(function(
|
|
207
|
-
return
|
|
205
|
+
u = t(e);
|
|
206
|
+
var b = Object.keys(r).filter(function(ce) {
|
|
207
|
+
return ce !== "key";
|
|
208
208
|
});
|
|
209
|
-
i = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
209
|
+
i = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", z[u + i] || (b = 0 < b.length ? "{" + b.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
210
210
|
`A props object containing a "key" prop is being spread into JSX:
|
|
211
211
|
let props = %s;
|
|
212
212
|
<%s {...props} />
|
|
@@ -217,22 +217,22 @@ React keys must be passed directly to JSX without using spread:
|
|
|
217
217
|
u,
|
|
218
218
|
b,
|
|
219
219
|
u
|
|
220
|
-
),
|
|
220
|
+
), z[u + i] = !0);
|
|
221
221
|
}
|
|
222
|
-
if (u = null,
|
|
223
|
-
|
|
222
|
+
if (u = null, s !== void 0 && (a(s), u = "" + s), f(r) && (a(r.key), u = "" + r.key), "key" in r) {
|
|
223
|
+
s = {};
|
|
224
224
|
for (var $ in r)
|
|
225
|
-
$ !== "key" && (
|
|
226
|
-
} else
|
|
225
|
+
$ !== "key" && (s[$] = r[$]);
|
|
226
|
+
} else s = r;
|
|
227
227
|
return u && d(
|
|
228
|
-
|
|
228
|
+
s,
|
|
229
229
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
230
|
-
),
|
|
230
|
+
), m(
|
|
231
231
|
e,
|
|
232
232
|
u,
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
s,
|
|
234
|
+
o(),
|
|
235
|
+
j,
|
|
236
236
|
M
|
|
237
237
|
);
|
|
238
238
|
}
|
|
@@ -242,7 +242,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
242
242
|
function R(e) {
|
|
243
243
|
return typeof e == "object" && e !== null && e.$$typeof === v;
|
|
244
244
|
}
|
|
245
|
-
var p =
|
|
245
|
+
var p = me, v = Symbol.for("react.transitional.element"), T = Symbol.for("react.portal"), P = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), O = Symbol.for("react.context"), w = Symbol.for("react.forward_ref"), ae = Symbol.for("react.suspense"), oe = Symbol.for("react.suspense_list"), se = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), ie = Symbol.for("react.client.reference"), Y = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, ue = Array.isArray, I = console.createTask ? console.createTask : function() {
|
|
246
246
|
return null;
|
|
247
247
|
};
|
|
248
248
|
p = {
|
|
@@ -250,61 +250,61 @@ React keys must be passed directly to JSX without using spread:
|
|
|
250
250
|
return e();
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
|
-
var
|
|
253
|
+
var G, W = {}, U = p.react_stack_bottom_frame.bind(
|
|
254
254
|
p,
|
|
255
255
|
c
|
|
256
|
-
)(),
|
|
257
|
-
|
|
256
|
+
)(), q = I(l(c)), z = {};
|
|
257
|
+
k.Fragment = P, k.jsx = function(e, r, s) {
|
|
258
258
|
var i = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
259
|
-
return
|
|
259
|
+
return x(
|
|
260
260
|
e,
|
|
261
261
|
r,
|
|
262
|
-
|
|
262
|
+
s,
|
|
263
263
|
!1,
|
|
264
|
-
i ? Error("react-stack-top-frame") :
|
|
265
|
-
i ? I(l(e)) :
|
|
264
|
+
i ? Error("react-stack-top-frame") : U,
|
|
265
|
+
i ? I(l(e)) : q
|
|
266
266
|
);
|
|
267
|
-
},
|
|
267
|
+
}, k.jsxs = function(e, r, s) {
|
|
268
268
|
var i = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
269
|
-
return
|
|
269
|
+
return x(
|
|
270
270
|
e,
|
|
271
271
|
r,
|
|
272
|
-
|
|
272
|
+
s,
|
|
273
273
|
!0,
|
|
274
|
-
i ? Error("react-stack-top-frame") :
|
|
275
|
-
i ? I(l(e)) :
|
|
274
|
+
i ? Error("react-stack-top-frame") : U,
|
|
275
|
+
i ? I(l(e)) : q
|
|
276
276
|
);
|
|
277
277
|
};
|
|
278
|
-
})()),
|
|
278
|
+
})()), k;
|
|
279
279
|
}
|
|
280
280
|
var X;
|
|
281
281
|
function ke() {
|
|
282
|
-
return X || (X = 1, process.env.NODE_ENV === "production" ? N.exports =
|
|
282
|
+
return X || (X = 1, process.env.NODE_ENV === "production" ? N.exports = Ae() : N.exports = ge()), N.exports;
|
|
283
283
|
}
|
|
284
|
-
var
|
|
285
|
-
const
|
|
286
|
-
const { app:
|
|
287
|
-
if (!
|
|
288
|
-
const l = new
|
|
284
|
+
var _ = ke();
|
|
285
|
+
const ne = he({}), Se = ({ children: t }) => {
|
|
286
|
+
const { app: n } = ee(), a = pe(() => {
|
|
287
|
+
if (!n || !n.renderer) return null;
|
|
288
|
+
const l = new re();
|
|
289
289
|
l.setFillStyle({
|
|
290
290
|
color: "#121225"
|
|
291
291
|
}), l.rect(0, 0, 1, 1), l.fill();
|
|
292
|
-
const
|
|
293
|
-
return l.destroy(),
|
|
294
|
-
}, [
|
|
295
|
-
return
|
|
292
|
+
const o = n.renderer.generateTexture(l);
|
|
293
|
+
return l.destroy(), o;
|
|
294
|
+
}, [n == null ? void 0 : n.renderer]);
|
|
295
|
+
return a ? /* @__PURE__ */ _.jsx(ne.Provider, { value: a, children: t }) : null;
|
|
296
296
|
};
|
|
297
|
-
class
|
|
298
|
-
constructor(
|
|
299
|
-
super({ texture:
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
this.texture =
|
|
297
|
+
class Ce extends te {
|
|
298
|
+
constructor(a, l, o, c, f, d) {
|
|
299
|
+
super({ texture: a, x: l, y: o, scaleX: c, scaleY: f, alpha: 0 });
|
|
300
|
+
h(this, "animationProgress", 0);
|
|
301
|
+
h(this, "delayCounter", 0);
|
|
302
|
+
h(this, "randomSpeed");
|
|
303
|
+
h(this, "randomDelayOffset");
|
|
304
|
+
h(this, "startScaleX");
|
|
305
|
+
h(this, "startScaleY");
|
|
306
|
+
h(this, "targetAlpha");
|
|
307
|
+
this.texture = a, this.x = l, this.y = o, this.scaleX = c, this.scaleY = f, this.curLevel = d, this.startScaleX = c, this.startScaleY = f, this.curLevel = d, this.randomSpeed = 0.04 + Math.random() * 0.04, this.randomDelayOffset = Math.floor(Math.random() * 150), this.targetAlpha = 0.9 + Math.random() * 0.1;
|
|
308
308
|
}
|
|
309
309
|
update() {
|
|
310
310
|
if (this.delayCounter < this.curLevel * 15 + this.randomDelayOffset) {
|
|
@@ -318,73 +318,78 @@ class Oe extends ee {
|
|
|
318
318
|
this.animationProgress += (this.targetAlpha - this.animationProgress) * this.randomSpeed, this.alpha = this.animationProgress;
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
-
class
|
|
322
|
-
constructor(
|
|
323
|
-
|
|
324
|
-
this.texture =
|
|
321
|
+
class Oe {
|
|
322
|
+
constructor(n, a) {
|
|
323
|
+
h(this, "cells", []);
|
|
324
|
+
this.texture = n, this.particleContainerRefCurrent = a, this.texture = n;
|
|
325
325
|
}
|
|
326
|
-
add(
|
|
327
|
-
const f = new
|
|
326
|
+
add(n, a, l, o, c) {
|
|
327
|
+
const f = new Ce(this.texture, n, a, l, o, c);
|
|
328
328
|
this.particleContainerRefCurrent.addParticle(f), this.cells.push(f);
|
|
329
329
|
}
|
|
330
330
|
updateAll() {
|
|
331
|
-
for (const
|
|
332
|
-
|
|
331
|
+
for (const n of this.cells)
|
|
332
|
+
n.update();
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
const
|
|
336
|
-
gridRows:
|
|
337
|
-
gridCols:
|
|
338
|
-
cellWidth:
|
|
335
|
+
const we = ({
|
|
336
|
+
gridRows: t,
|
|
337
|
+
gridCols: n,
|
|
338
|
+
cellWidth: a,
|
|
339
339
|
cellHeight: l,
|
|
340
|
-
gridDepth:
|
|
340
|
+
gridDepth: o
|
|
341
341
|
}) => {
|
|
342
|
-
const c =
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
342
|
+
const c = _e(ne), f = L(null), d = L(null);
|
|
343
|
+
K(() => (f.current && (d.current = new Oe(
|
|
344
|
+
c,
|
|
345
|
+
f.current
|
|
346
|
+
), S(
|
|
347
|
+
0,
|
|
348
|
+
0,
|
|
349
|
+
a,
|
|
350
|
+
l,
|
|
351
|
+
n,
|
|
352
|
+
t,
|
|
353
|
+
o,
|
|
354
|
+
f.current
|
|
355
|
+
)), () => {
|
|
356
|
+
var m;
|
|
357
|
+
try {
|
|
358
|
+
(m = f.current) == null || m.removeChildren();
|
|
359
|
+
} catch {
|
|
360
|
+
}
|
|
361
|
+
d.current = null;
|
|
362
|
+
}), []), Re(() => {
|
|
363
|
+
var m;
|
|
364
|
+
(m = d.current) == null || m.updateAll();
|
|
360
365
|
});
|
|
361
|
-
const
|
|
362
|
-
(
|
|
363
|
-
var
|
|
364
|
-
for (let
|
|
366
|
+
const S = Ee(
|
|
367
|
+
(m, x, E, R, p, v, T, P) => {
|
|
368
|
+
var C;
|
|
369
|
+
for (let y = 0; y < v; y++)
|
|
365
370
|
for (let A = 0; A < p; A++) {
|
|
366
|
-
const
|
|
367
|
-
T <= 0 || Math.random() > 0.7 && T <
|
|
368
|
-
|
|
369
|
-
|
|
371
|
+
const O = m + A * E, w = x + y * R;
|
|
372
|
+
T <= 0 || Math.random() > 0.7 && T < o ? Math.random() > 0.1 && ((C = d.current) == null || C.add(
|
|
373
|
+
O,
|
|
374
|
+
w,
|
|
370
375
|
E - 1,
|
|
371
376
|
R - 1,
|
|
372
377
|
T
|
|
373
|
-
)) :
|
|
374
|
-
|
|
375
|
-
|
|
378
|
+
)) : S(
|
|
379
|
+
O,
|
|
380
|
+
w,
|
|
376
381
|
E / p,
|
|
377
382
|
R / v,
|
|
378
383
|
p,
|
|
379
384
|
v,
|
|
380
385
|
T - 1,
|
|
381
|
-
|
|
386
|
+
P
|
|
382
387
|
);
|
|
383
388
|
}
|
|
384
389
|
},
|
|
385
390
|
[]
|
|
386
391
|
);
|
|
387
|
-
return /* @__PURE__ */
|
|
392
|
+
return /* @__PURE__ */ _.jsx(
|
|
388
393
|
"pixiParticleContainer",
|
|
389
394
|
{
|
|
390
395
|
ref: f,
|
|
@@ -395,45 +400,70 @@ const je = ({
|
|
|
395
400
|
}
|
|
396
401
|
}
|
|
397
402
|
);
|
|
398
|
-
},
|
|
399
|
-
cellWidth:
|
|
400
|
-
cellHeight:
|
|
401
|
-
gridRows:
|
|
403
|
+
}, je = ({
|
|
404
|
+
cellWidth: t,
|
|
405
|
+
cellHeight: n,
|
|
406
|
+
gridRows: a,
|
|
402
407
|
gridCols: l,
|
|
403
|
-
gridDepth:
|
|
404
|
-
}) => /* @__PURE__ */
|
|
405
|
-
|
|
408
|
+
gridDepth: o
|
|
409
|
+
}) => /* @__PURE__ */ _.jsx(Se, { children: /* @__PURE__ */ _.jsx(
|
|
410
|
+
we,
|
|
406
411
|
{
|
|
407
|
-
cellWidth:
|
|
408
|
-
cellHeight:
|
|
412
|
+
cellWidth: t,
|
|
413
|
+
cellHeight: n,
|
|
409
414
|
gridCols: l,
|
|
410
|
-
gridRows:
|
|
411
|
-
gridDepth:
|
|
412
|
-
}
|
|
413
|
-
) });
|
|
414
|
-
ve({ ParticleContainer: Ae, Particle: ee, Texture: Pe, Container: xe, Sprite: be, Graphics: K });
|
|
415
|
-
const H = 2, B = 2, Z = 300, Q = 300, Ne = 6, $e = () => /* @__PURE__ */ h.jsx("div", { className: "flex flex-col items-center justify-center w-full h-full", children: /* @__PURE__ */ h.jsx(
|
|
416
|
-
Te,
|
|
417
|
-
{
|
|
418
|
-
antialias: !1,
|
|
419
|
-
width: Z * H,
|
|
420
|
-
height: Q * B,
|
|
421
|
-
className: "image-pixelated w-full",
|
|
422
|
-
backgroundAlpha: 0,
|
|
423
|
-
autoDensity: !0,
|
|
424
|
-
children: /* @__PURE__ */ h.jsx(
|
|
425
|
-
we,
|
|
426
|
-
{
|
|
427
|
-
gridCols: H,
|
|
428
|
-
gridRows: B,
|
|
429
|
-
cellWidth: Z,
|
|
430
|
-
cellHeight: Q,
|
|
431
|
-
gridDepth: Ne
|
|
432
|
-
}
|
|
433
|
-
)
|
|
415
|
+
gridRows: a,
|
|
416
|
+
gridDepth: o
|
|
434
417
|
}
|
|
435
418
|
) });
|
|
419
|
+
ve({ ParticleContainer: ye, Particle: te, Texture: Pe, Container: xe, Sprite: be, Graphics: re });
|
|
420
|
+
const H = 2, B = 2, Z = 300, Q = 300, Ne = 6, De = () => {
|
|
421
|
+
const { app: t } = ee();
|
|
422
|
+
return K(() => () => {
|
|
423
|
+
var n;
|
|
424
|
+
try {
|
|
425
|
+
(n = t == null ? void 0 : t.ticker) == null || n.stop(), t == null || t.destroy();
|
|
426
|
+
const a = (t == null ? void 0 : t.canvas) || (t == null ? void 0 : t.view);
|
|
427
|
+
a && a.parentNode && a.parentNode.removeChild(a);
|
|
428
|
+
} catch {
|
|
429
|
+
}
|
|
430
|
+
}, [t]), null;
|
|
431
|
+
}, Le = () => {
|
|
432
|
+
const t = typeof window < "u", n = L(null);
|
|
433
|
+
return t ? /* @__PURE__ */ _.jsx(
|
|
434
|
+
"div",
|
|
435
|
+
{
|
|
436
|
+
ref: n,
|
|
437
|
+
className: "flex flex-col items-center justify-center w-full h-full",
|
|
438
|
+
children: /* @__PURE__ */ _.jsxs(
|
|
439
|
+
Te,
|
|
440
|
+
{
|
|
441
|
+
antialias: !1,
|
|
442
|
+
width: Z * H,
|
|
443
|
+
height: Q * B,
|
|
444
|
+
className: "image-pixelated w-full",
|
|
445
|
+
backgroundAlpha: 0,
|
|
446
|
+
autoDensity: !0,
|
|
447
|
+
resizeTo: n,
|
|
448
|
+
children: [
|
|
449
|
+
/* @__PURE__ */ _.jsx(De, {}),
|
|
450
|
+
/* @__PURE__ */ _.jsx(
|
|
451
|
+
je,
|
|
452
|
+
{
|
|
453
|
+
gridCols: H,
|
|
454
|
+
gridRows: B,
|
|
455
|
+
cellWidth: Z,
|
|
456
|
+
cellHeight: Q,
|
|
457
|
+
gridDepth: Ne
|
|
458
|
+
}
|
|
459
|
+
)
|
|
460
|
+
]
|
|
461
|
+
}
|
|
462
|
+
)
|
|
463
|
+
}
|
|
464
|
+
) : null;
|
|
465
|
+
};
|
|
436
466
|
export {
|
|
437
|
-
|
|
467
|
+
Le as default
|
|
438
468
|
};
|
|
439
469
|
//# sourceMappingURL=recursive-grid.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recursive-grid.es.js","sources":["../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/context/CellTexturesContext.tsx","../src/classes/Cell.ts","../src/classes/CellManager.ts","../src/components/RecursiveGrid.tsx","../src/components/RecursiveGridContainer.tsx","../src/components/PixiApp.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { createContext, useContext, FC, ReactNode, useMemo } from 'react'\r\nimport { useApplication } from '@pixi/react'\r\nimport { Graphics, Texture } from 'pixi.js'\r\n\r\ntype CellTextures = Texture\r\n\r\nconst CellTexturesContext = createContext<CellTextures>({} as CellTextures)\r\n\r\nexport const useCellTextures = () => useContext(CellTexturesContext)\r\n\r\nconst CellTexturesProvider: FC<{ children: ReactNode }> = ({ children }) => {\r\n const { app } = useApplication()\r\n\r\n const texture = useMemo(() => {\r\n if (!app || !app.renderer) return null\r\n\r\n const g = new Graphics()\r\n\r\n g.setFillStyle({\r\n color: '#121225',\r\n })\r\n\r\n g.rect(0, 0, 1, 1)\r\n g.fill()\r\n const generatedTexture = app.renderer.generateTexture(g)\r\n g.destroy()\r\n return generatedTexture\r\n }, [app?.renderer])\r\n\r\n if (!texture) return null\r\n\r\n return (\r\n <CellTexturesContext.Provider value={texture}>\r\n {children}\r\n </CellTexturesContext.Provider>\r\n )\r\n}\r\n\r\nexport { CellTexturesContext, CellTexturesProvider }\r\n","import { Particle, Texture } from \"pixi.js\"\r\n\r\nexport class Cell extends Particle {\r\n private animationProgress = 0\r\n private delayCounter = 0\r\n private randomSpeed: number\r\n private randomDelayOffset: number\r\n startScaleX: number\r\n startScaleY: number\r\n targetAlpha: number\r\n\r\n constructor(\r\n public texture: Texture,\r\n public x: number,\r\n public y: number,\r\n public scaleX: number,\r\n public scaleY: number,\r\n public curLevel: number,\r\n ) {\r\n super({ texture, x, y, scaleX, scaleY, alpha: 0 })\r\n this.startScaleX = scaleX\r\n this.startScaleY = scaleY\r\n this.curLevel = curLevel\r\n\r\n // Randomize speed slightly (0.08 to 0.12)\r\n this.randomSpeed = 0.04 + Math.random() * 0.04\r\n // Randomize delay by a few frames\r\n this.randomDelayOffset = Math.floor(Math.random() * 150)\r\n this.targetAlpha = 0.9 + Math.random() * 0.1\r\n }\r\n\r\n update() {\r\n if (this.delayCounter < this.curLevel * 15 + this.randomDelayOffset) {\r\n this.delayCounter++\r\n return\r\n }\r\n\r\n if (this.animationProgress >= this.targetAlpha - 0.001) {\r\n this.animationProgress = this.targetAlpha\r\n this.alpha = this.targetAlpha\r\n return\r\n }\r\n\r\n this.animationProgress += (this.targetAlpha - this.animationProgress) * this.randomSpeed\r\n this.alpha = this.animationProgress\r\n }\r\n}\r\n","import { ParticleContainer, Texture } from 'pixi.js'\r\nimport { Cell } from './Cell'\r\n\r\nexport class CellManager {\r\n private cells: Cell[] = []\r\n\r\n constructor(\r\n public texture: Texture,\r\n public particleContainerRefCurrent: ParticleContainer\r\n ) {\r\n this.texture = texture\r\n }\r\n\r\n add(x: number, y: number, scaleX: number, scaleY: number, curLevel: number) {\r\n const cell = new Cell(this.texture, x, y, scaleX, scaleY, curLevel)\r\n this.particleContainerRefCurrent.addParticle(cell)\r\n this.cells.push(cell)\r\n }\r\n\r\n updateAll() {\r\n for (const cell of this.cells) {\r\n cell.update()\r\n }\r\n }\r\n}","import { FC, useCallback, useContext, useEffect, useRef } from 'react'\r\nimport { ParticleContainer } from 'pixi.js'\r\nimport { CellTexturesContext } from '../context/CellTexturesContext'\r\nimport { useTick } from '@pixi/react'\r\nimport { CellManager } from '../classes/CellManager'\r\n\r\ninterface GridProps {\r\n gridCols: number\r\n gridRows: number\r\n cellWidth: number\r\n cellHeight: number\r\n gridDepth: number\r\n}\r\n\r\nconst RecursiveGrid: FC<GridProps> = ({\r\n gridRows,\r\n gridCols,\r\n cellWidth,\r\n cellHeight,\r\n gridDepth,\r\n}) => {\r\n const texture = useContext(CellTexturesContext)\r\n const particleContainerRef = useRef<ParticleContainer>(null)\r\n const cellManager = useRef<CellManager>(null)\r\n\r\n useEffect(() => {\r\n if (particleContainerRef.current) {\r\n cellManager.current = new CellManager(\r\n texture,\r\n particleContainerRef.current\r\n )\r\n\r\n buildRecursiveGrid(\r\n 0,\r\n 0,\r\n cellWidth,\r\n cellHeight,\r\n gridCols,\r\n gridRows,\r\n gridDepth,\r\n particleContainerRef.current\r\n )\r\n }\r\n }, [])\r\n\r\n useTick(() => {\r\n cellManager.current?.updateAll()\r\n })\r\n\r\n const buildRecursiveGrid = useCallback(\r\n (\r\n x: number,\r\n y: number,\r\n cellWidth: number,\r\n cellHeight: number,\r\n gridCols: number,\r\n gridRows: number,\r\n curLevel: number,\r\n currentParticlesRef: ParticleContainer\r\n ) => {\r\n for (let row = 0; row < gridRows; row++) {\r\n for (let col = 0; col < gridCols; col++) {\r\n const startX = x + col * cellWidth\r\n const startY = y + row * cellHeight\r\n\r\n if (\r\n curLevel <= 0 ||\r\n (Math.random() > 0.7 && curLevel < gridDepth)\r\n ) {\r\n if (Math.random() > 0.1) {\r\n cellManager.current?.add(\r\n startX,\r\n startY,\r\n cellWidth - 1,\r\n cellHeight - 1,\r\n curLevel\r\n )\r\n }\r\n } else {\r\n buildRecursiveGrid(\r\n startX,\r\n startY,\r\n cellWidth / gridCols,\r\n cellHeight / gridRows,\r\n gridCols,\r\n gridRows,\r\n curLevel - 1,\r\n currentParticlesRef\r\n )\r\n }\r\n }\r\n }\r\n },\r\n []\r\n )\r\n\r\n return (\r\n <pixiParticleContainer\r\n ref={particleContainerRef}\r\n dynamicProperties={{\r\n position: true,\r\n vertex: true,\r\n color: true,\r\n }}\r\n />\r\n )\r\n}\r\n\r\nexport default RecursiveGrid\r\n","import { FC } from 'react'\r\nimport RecursiveGrid from './RecursiveGrid'\r\n\r\nimport { CellTexturesProvider } from '../context/CellTexturesContext'\r\n\r\ninterface RecursiveGridContainerProps {\r\n cellWidth: number\r\n cellHeight: number\r\n gridRows: number\r\n gridCols: number\r\n gridDepth: number\r\n}\r\n\r\nconst RecursiveGridContainer: FC<RecursiveGridContainerProps> = ({\r\n cellWidth,\r\n cellHeight,\r\n gridRows,\r\n gridCols,\r\n gridDepth,\r\n}) => {\r\n return (\r\n <CellTexturesProvider>\r\n <RecursiveGrid\r\n cellWidth={cellWidth}\r\n cellHeight={cellHeight}\r\n gridCols={gridCols}\r\n gridRows={gridRows}\r\n gridDepth={gridDepth}\r\n />\r\n </CellTexturesProvider>\r\n )\r\n}\r\n\r\nexport default RecursiveGridContainer\r\n","import { Application, extend } from '@pixi/react'\r\nimport {\r\n Sprite,\r\n Graphics,\r\n Container,\r\n Texture,\r\n Particle,\r\n ParticleContainer,\r\n} from 'pixi.js'\r\nimport RecursiveGridContainer from './RecursiveGridContainer'\r\n\r\nextend({ ParticleContainer, Particle, Texture, Container, Sprite, Graphics })\r\n\r\nconst GRID_COLS = 2\r\nconst GRID_ROWS = 2\r\nconst CELL_WIDTH = 300\r\nconst CELL_HEIGHT = 300\r\nconst GRID_DEPTH = 6\r\n\r\nconst PixiApp = () => {\r\n return (\r\n <div className=\"flex flex-col items-center justify-center w-full h-full\">\r\n <Application\r\n antialias={false}\r\n width={CELL_WIDTH * GRID_COLS}\r\n height={CELL_HEIGHT * GRID_ROWS}\r\n className=\"image-pixelated w-full\"\r\n backgroundAlpha={0}\r\n autoDensity={true}\r\n >\r\n <RecursiveGridContainer\r\n gridCols={GRID_COLS}\r\n gridRows={GRID_ROWS}\r\n cellWidth={CELL_WIDTH}\r\n cellHeight={CELL_HEIGHT}\r\n gridDepth={GRID_DEPTH}\r\n />\r\n </Application>\r\n </div>\r\n )\r\n}\r\n\r\nexport default PixiApp\r\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","owner","debugStack","debugTask","refProp","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","isValidElement","object","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","CellTexturesContext","createContext","CellTexturesProvider","app","useApplication","texture","useMemo","g","Graphics","generatedTexture","Cell","Particle","x","y","scaleX","scaleY","curLevel","__publicField","CellManager","particleContainerRefCurrent","cell","RecursiveGrid","gridRows","gridCols","cellWidth","cellHeight","gridDepth","useContext","particleContainerRef","useRef","cellManager","useEffect","buildRecursiveGrid","useTick","_a","useCallback","currentParticlesRef","row","col","startX","startY","jsx","RecursiveGridContainer","extend","ParticleContainer","Texture","Container","Sprite","GRID_COLS","GRID_ROWS","CELL_WIDTH","CELL_HEIGHT","GRID_DEPTH","PixiApp","Application"],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,MAAIA,IAAqB,OAAO,IAAI,4BAA4B,GAC9DC,IAAsB,OAAO,IAAI,gBAAgB;AACnD,WAASC,EAAQC,GAAMC,GAAQC,GAAU;AACvC,QAAIC,IAAM;AAGV,QAFWD,MAAX,WAAwBC,IAAM,KAAKD,IACxBD,EAAO,QAAlB,WAA0BE,IAAM,KAAKF,EAAO,MACxC,SAASA,GAAQ;AACnB,MAAAC,IAAW,CAAA;AACX,eAASE,KAAYH;AACnB,QAAUG,MAAV,UAAuBF,EAASE,CAAQ,IAAIH,EAAOG,CAAQ;AAAA,IACjE,MAAS,CAAAF,IAAWD;AAClB,WAAAA,IAASC,EAAS,KACX;AAAA,MACL,UAAUL;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C,GAAU;AAE5E,MAAMwC,IAAY,GACZC,IAAY,GACZC,IAAa,KACbC,IAAc,KACdC,KAAa,GAEbC,KAAU,MAERZ,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,2DACX,UAAAA,gBAAAA,EAAAA;AAAAA,EAACa;AAAA,EAAA;AAAA,IACG,WAAW;AAAA,IACX,OAAOJ,IAAaF;AAAA,IACpB,QAAQG,IAAcF;AAAA,IACtB,WAAU;AAAA,IACV,iBAAiB;AAAA,IACjB,aAAa;AAAA,IAEb,UAAAR,gBAAAA,EAAAA;AAAAA,MAACC;AAAA,MAAA;AAAA,QACG,UAAUM;AAAA,QACV,UAAUC;AAAA,QACV,WAAWC;AAAA,QACX,YAAYC;AAAA,QACZ,WAAWC;AAAA,MAAA;AAAA,IAAA;AAAA,EACf;AAAA,GAER;","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"recursive-grid.es.js","sources":["../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/context/CellTexturesContext.tsx","../src/classes/Cell.ts","../src/classes/CellManager.ts","../src/components/RecursiveGrid.tsx","../src/components/RecursiveGridContainer.tsx","../src/components/PixiApp.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { createContext, useContext, FC, ReactNode, useMemo } from 'react'\r\nimport { useApplication } from '@pixi/react'\r\nimport { Graphics, Texture } from 'pixi.js'\r\n\r\ntype CellTextures = Texture\r\n\r\nconst CellTexturesContext = createContext<CellTextures>({} as CellTextures)\r\n\r\nexport const useCellTextures = () => useContext(CellTexturesContext)\r\n\r\nconst CellTexturesProvider: FC<{ children: ReactNode }> = ({ children }) => {\r\n const { app } = useApplication()\r\n\r\n const texture = useMemo(() => {\r\n if (!app || !app.renderer) return null\r\n\r\n const g = new Graphics()\r\n\r\n g.setFillStyle({\r\n color: '#121225',\r\n })\r\n\r\n g.rect(0, 0, 1, 1)\r\n g.fill()\r\n const generatedTexture = app.renderer.generateTexture(g)\r\n g.destroy()\r\n return generatedTexture\r\n }, [app?.renderer])\r\n\r\n if (!texture) return null\r\n\r\n return (\r\n <CellTexturesContext.Provider value={texture}>\r\n {children}\r\n </CellTexturesContext.Provider>\r\n )\r\n}\r\n\r\nexport { CellTexturesContext, CellTexturesProvider }\r\n","import { Particle, Texture } from \"pixi.js\"\r\n\r\nexport class Cell extends Particle {\r\n private animationProgress = 0\r\n private delayCounter = 0\r\n private randomSpeed: number\r\n private randomDelayOffset: number\r\n startScaleX: number\r\n startScaleY: number\r\n targetAlpha: number\r\n\r\n constructor(\r\n public texture: Texture,\r\n public x: number,\r\n public y: number,\r\n public scaleX: number,\r\n public scaleY: number,\r\n public curLevel: number,\r\n ) {\r\n super({ texture, x, y, scaleX, scaleY, alpha: 0 })\r\n this.startScaleX = scaleX\r\n this.startScaleY = scaleY\r\n this.curLevel = curLevel\r\n\r\n // Randomize speed slightly (0.08 to 0.12)\r\n this.randomSpeed = 0.04 + Math.random() * 0.04\r\n // Randomize delay by a few frames\r\n this.randomDelayOffset = Math.floor(Math.random() * 150)\r\n this.targetAlpha = 0.9 + Math.random() * 0.1\r\n }\r\n\r\n update() {\r\n if (this.delayCounter < this.curLevel * 15 + this.randomDelayOffset) {\r\n this.delayCounter++\r\n return\r\n }\r\n\r\n if (this.animationProgress >= this.targetAlpha - 0.001) {\r\n this.animationProgress = this.targetAlpha\r\n this.alpha = this.targetAlpha\r\n return\r\n }\r\n\r\n this.animationProgress += (this.targetAlpha - this.animationProgress) * this.randomSpeed\r\n this.alpha = this.animationProgress\r\n }\r\n}\r\n","import { ParticleContainer, Texture } from 'pixi.js'\r\nimport { Cell } from './Cell'\r\n\r\nexport class CellManager {\r\n private cells: Cell[] = []\r\n\r\n constructor(\r\n public texture: Texture,\r\n public particleContainerRefCurrent: ParticleContainer\r\n ) {\r\n this.texture = texture\r\n }\r\n\r\n add(x: number, y: number, scaleX: number, scaleY: number, curLevel: number) {\r\n const cell = new Cell(this.texture, x, y, scaleX, scaleY, curLevel)\r\n this.particleContainerRefCurrent.addParticle(cell)\r\n this.cells.push(cell)\r\n }\r\n\r\n updateAll() {\r\n for (const cell of this.cells) {\r\n cell.update()\r\n }\r\n }\r\n}","import { FC, useCallback, useContext, useEffect, useRef } from 'react'\r\nimport { ParticleContainer } from 'pixi.js'\r\nimport { CellTexturesContext } from '../context/CellTexturesContext'\r\nimport { useTick } from '@pixi/react'\r\nimport { CellManager } from '../classes/CellManager'\r\n\r\ninterface GridProps {\r\n gridCols: number\r\n gridRows: number\r\n cellWidth: number\r\n cellHeight: number\r\n gridDepth: number\r\n}\r\n\r\nconst RecursiveGrid: FC<GridProps> = ({\r\n gridRows,\r\n gridCols,\r\n cellWidth,\r\n cellHeight,\r\n gridDepth,\r\n}) => {\r\n const texture = useContext(CellTexturesContext)\r\n const particleContainerRef = useRef<ParticleContainer>(null)\r\n const cellManager = useRef<CellManager>(null)\r\n\r\n useEffect(() => {\r\n if (particleContainerRef.current) {\r\n cellManager.current = new CellManager(\r\n texture,\r\n particleContainerRef.current\r\n )\r\n\r\n buildRecursiveGrid(\r\n 0,\r\n 0,\r\n cellWidth,\r\n cellHeight,\r\n gridCols,\r\n gridRows,\r\n gridDepth,\r\n particleContainerRef.current\r\n )\r\n }\r\n return () => {\r\n // Clean up particles and references on unmount to avoid stale objects across HMR/navigation\r\n try {\r\n particleContainerRef.current?.removeChildren()\r\n } catch (err) {}\r\n cellManager.current = null\r\n }\r\n }, [])\r\n\r\n useTick(() => {\r\n cellManager.current?.updateAll()\r\n })\r\n\r\n const buildRecursiveGrid = useCallback(\r\n (\r\n x: number,\r\n y: number,\r\n cellWidth: number,\r\n cellHeight: number,\r\n gridCols: number,\r\n gridRows: number,\r\n curLevel: number,\r\n currentParticlesRef: ParticleContainer\r\n ) => {\r\n for (let row = 0; row < gridRows; row++) {\r\n for (let col = 0; col < gridCols; col++) {\r\n const startX = x + col * cellWidth\r\n const startY = y + row * cellHeight\r\n\r\n if (\r\n curLevel <= 0 ||\r\n (Math.random() > 0.7 && curLevel < gridDepth)\r\n ) {\r\n if (Math.random() > 0.1) {\r\n cellManager.current?.add(\r\n startX,\r\n startY,\r\n cellWidth - 1,\r\n cellHeight - 1,\r\n curLevel\r\n )\r\n }\r\n } else {\r\n buildRecursiveGrid(\r\n startX,\r\n startY,\r\n cellWidth / gridCols,\r\n cellHeight / gridRows,\r\n gridCols,\r\n gridRows,\r\n curLevel - 1,\r\n currentParticlesRef\r\n )\r\n }\r\n }\r\n }\r\n },\r\n []\r\n )\r\n\r\n return (\r\n <pixiParticleContainer\r\n ref={particleContainerRef}\r\n dynamicProperties={{\r\n position: true,\r\n vertex: true,\r\n color: true,\r\n }}\r\n />\r\n )\r\n}\r\n\r\nexport default RecursiveGrid\r\n","import { FC } from 'react'\r\nimport RecursiveGrid from './RecursiveGrid'\r\n\r\nimport { CellTexturesProvider } from '../context/CellTexturesContext'\r\n\r\ninterface RecursiveGridContainerProps {\r\n cellWidth: number\r\n cellHeight: number\r\n gridRows: number\r\n gridCols: number\r\n gridDepth: number\r\n}\r\n\r\nconst RecursiveGridContainer: FC<RecursiveGridContainerProps> = ({\r\n cellWidth,\r\n cellHeight,\r\n gridRows,\r\n gridCols,\r\n gridDepth,\r\n}) => {\r\n return (\r\n <CellTexturesProvider>\r\n <RecursiveGrid\r\n cellWidth={cellWidth}\r\n cellHeight={cellHeight}\r\n gridCols={gridCols}\r\n gridRows={gridRows}\r\n gridDepth={gridDepth}\r\n />\r\n </CellTexturesProvider>\r\n )\r\n}\r\n\r\nexport default RecursiveGridContainer\r\n","import { Application, extend, useApplication } from '@pixi/react'\r\nimport {\r\n Sprite,\r\n Graphics,\r\n Container,\r\n Texture,\r\n Particle,\r\n ParticleContainer,\r\n} from 'pixi.js'\r\nimport RecursiveGridContainer from './RecursiveGridContainer'\r\nimport { useEffect, useRef } from 'react'\r\n\r\nextend({ ParticleContainer, Particle, Texture, Container, Sprite, Graphics })\r\n\r\nconst GRID_COLS = 2\r\nconst GRID_ROWS = 2\r\nconst CELL_WIDTH = 300\r\nconst CELL_HEIGHT = 300\r\nconst GRID_DEPTH = 6\r\n\r\nconst PixiLifecycle = () => {\r\n const { app } = useApplication()\r\n\r\n useEffect(() => {\r\n // Cleanup Pixi on unmount to avoid stale canvas/context across HMR or route changes\r\n return () => {\r\n try {\r\n // Stop ticker and destroy the application. Pixi v8 cleans up renderer/stage.\r\n // Removing the canvas from DOM ensures there are no dangling references.\r\n app?.ticker?.stop()\r\n app?.destroy()\r\n const canvas = (app as any)?.canvas || (app as any)?.view\r\n if (canvas && canvas.parentNode) {\r\n canvas.parentNode.removeChild(canvas)\r\n }\r\n } catch (err) {\r\n // Swallow errors during teardown to avoid crashing HMR\r\n }\r\n }\r\n }, [app])\r\n\r\n return null\r\n}\r\n\r\nconst PixiApp = () => {\r\n const isBrowser = typeof window !== 'undefined'\r\n const containerRef = useRef<HTMLDivElement | null>(null)\r\n\r\n if (!isBrowser) return null\r\n\r\n return (\r\n <div\r\n ref={containerRef}\r\n className=\"flex flex-col items-center justify-center w-full h-full\"\r\n >\r\n <Application\r\n antialias={false}\r\n width={CELL_WIDTH * GRID_COLS}\r\n height={CELL_HEIGHT * GRID_ROWS}\r\n className=\"image-pixelated w-full\"\r\n backgroundAlpha={0}\r\n autoDensity={true}\r\n resizeTo={containerRef}\r\n >\r\n <PixiLifecycle />\r\n <RecursiveGridContainer\r\n gridCols={GRID_COLS}\r\n gridRows={GRID_ROWS}\r\n cellWidth={CELL_WIDTH}\r\n cellHeight={CELL_HEIGHT}\r\n gridDepth={GRID_DEPTH}\r\n />\r\n </Application>\r\n </div>\r\n )\r\n}\r\n\r\nexport default PixiApp\r\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","owner","debugStack","debugTask","refProp","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","isValidElement","object","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","CellTexturesContext","createContext","CellTexturesProvider","app","useApplication","texture","useMemo","g","Graphics","generatedTexture","Cell","Particle","x","y","scaleX","scaleY","curLevel","__publicField","CellManager","particleContainerRefCurrent","cell","RecursiveGrid","gridRows","gridCols","cellWidth","cellHeight","gridDepth","useContext","particleContainerRef","useRef","cellManager","useEffect","buildRecursiveGrid","_a","useTick","useCallback","currentParticlesRef","row","col","startX","startY","jsx","RecursiveGridContainer","extend","ParticleContainer","Texture","Container","Sprite","GRID_COLS","GRID_ROWS","CELL_WIDTH","CELL_HEIGHT","GRID_DEPTH","PixiLifecycle","canvas","PixiApp","isBrowser","containerRef","jsxs","Application"],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,MAAIA,IAAqB,OAAO,IAAI,4BAA4B,GAC9DC,IAAsB,OAAO,IAAI,gBAAgB;AACnD,WAASC,EAAQC,GAAMC,GAAQC,GAAU;AACvC,QAAIC,IAAM;AAGV,QAFWD,MAAX,WAAwBC,IAAM,KAAKD,IACxBD,EAAO,QAAlB,WAA0BE,IAAM,KAAKF,EAAO,MACxC,SAASA,GAAQ;AACnB,MAAAC,IAAW,CAAA;AACX,eAASE,KAAYH;AACnB,QAAUG,MAAV,UAAuBF,EAASE,CAAQ,IAAIH,EAAOG,CAAQ;AAAA,IACjE,MAAS,CAAAF,IAAWD;AAClB,WAAAA,IAASC,EAAS,KACX;AAAA,MACL,UAAUL;AAAA,MACV,MAAMG;AAAA,MACN,KAAKG;AAAA,MACL,KAAgBF,MAAX,SAAoBA,IAAS;AAAA,MAClC,OAAOC;AAAA;EAEX;AACA,SAAAG,EAAA,WAAmBP,GACnBO,EAAA,MAAcN,GACdM,EAAA,OAAeN;;;;;;;;;;;;;;sBCtBE,QAAQ,IAAI,aAA7B,iBACG,WAAY;AACX,aAASO,EAAyBN,GAAM;AACtC,UAAYA,KAAR,KAAc,QAAO;AACzB,UAAmB,OAAOA,KAAtB;AACF,eAAOA,EAAK,aAAaO,KACrB,OACAP,EAAK,eAAeA,EAAK,QAAQ;AACvC,U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A,EAAK;AACL,YAAMmD,KAAUnD,KAAA,gBAAAA,EAAa,YAAWA,KAAA,gBAAAA,EAAa;AACrD,MAAImD,KAAUA,EAAO,cACjBA,EAAO,WAAW,YAAYA,CAAM;AAAA,IAE5C,QAAc;AAAA,IAEd;AAAA,EACJ,GACD,CAACnD,CAAG,CAAC,GAED;AACX,GAEMoD,KAAU,MAAM;AAClB,QAAMC,IAAY,OAAO,SAAW,KAC9BC,IAAe5B,EAA8B,IAAI;AAEvD,SAAK2B,IAGDf,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACG,KAAKgB;AAAA,MACL,WAAU;AAAA,MAEV,UAAAC,gBAAAA,EAAAA;AAAAA,QAACC;AAAA,QAAA;AAAA,UACG,WAAW;AAAA,UACX,OAAOT,IAAaF;AAAA,UACpB,QAAQG,IAAcF;AAAA,UACtB,WAAU;AAAA,UACV,iBAAiB;AAAA,UACjB,aAAa;AAAA,UACb,UAAUQ;AAAA,UAEV,UAAA;AAAA,YAAAhB,gBAAAA,EAAAA,IAACY,IAAA,EAAc;AAAA,YACfZ,gBAAAA,EAAAA;AAAAA,cAACC;AAAA,cAAA;AAAA,gBACG,UAAUM;AAAA,gBACV,UAAUC;AAAA,gBACV,WAAWC;AAAA,gBACX,YAAYC;AAAA,gBACZ,WAAWC;AAAA,cAAA;AAAA,YAAA;AAAA,UACf;AAAA,QAAA;AAAA,MAAA;AAAA,IACJ;AAAA,EAAA,IAxBe;AA2B3B;","x_google_ignoreList":[0,1,2]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(o,
|
|
1
|
+
(function(o,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("react"),require("@pixi/react"),require("pixi.js")):typeof define=="function"&&define.amd?define(["react","@pixi/react","pixi.js"],m):(o=typeof globalThis<"u"?globalThis:o||self,o["@micjanic/recursive-grid"]=m(o.React,o.PIXIReact,o.PIXI))})(this,(function(o,m,h){"use strict";var _e=Object.defineProperty;var Te=(o,m,h)=>m in o?_e(o,m,{enumerable:!0,configurable:!0,writable:!0,value:h}):o[m]=h;var E=(o,m,h)=>Te(o,typeof m!="symbol"?m+"":m,h);var w={exports:{}},A={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var U;function te(){if(U)return
|
|
9
|
+
*/var U;function te(){if(U)return A;U=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(l,s,f){var d=null;if(f!==void 0&&(d=""+f),s.key!==void 0&&(d=""+s.key),"key"in s){f={};for(var p in s)p!=="key"&&(f[p]=s[p])}else f=s;return s=f.ref,{$$typeof:t,type:l,key:d,ref:s!==void 0?s:null,props:f}}return A.Fragment=n,A.jsx=a,A.jsxs=a,A}var S={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var X;function ne(){return X||(X=1,process.env.NODE_ENV!=="production"&&(function(){function
|
|
17
|
+
*/var X;function ne(){return X||(X=1,process.env.NODE_ENV!=="production"&&(function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Re?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case g:return"Profiler";case N:return"StrictMode";case de:return"Suspense";case me:return"SuspenseList";case pe:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case P:return"Portal";case I:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case D:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case he:return r=e.displayName||null,r!==null?r:t(e.type)||"Memo";case M:r=e._payload,e=e._init;try{return t(e(r))}catch{}}return null}function n(e){return""+e}function a(e){try{n(e);var r=!1}catch{r=!0}if(r){r=console;var i=r.error,c=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",c),n(e)}}function l(e){if(e===C)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===M)return"<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function s(){var e=G.A;return e===null?null:e.getOwner()}function f(){return Error("react-stack-top-frame")}function d(e){if(q.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function p(e,r){function i(){Q||(Q=!0,console.error("%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://react.dev/link/special-props)",r))}i.isReactWarning=!0,Object.defineProperty(e,"key",{get:i,configurable:!0})}function j(){var e=t(this.type);return K[e]||(K[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function R(e,r,i,c,Y,F){var u=i.ref;return e={$$typeof:x,type:e,key:r,props:i,_owner:c},(u!==void 0?u:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:j}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:F}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function k(e,r,i,c,Y,F){var u=r.children;if(u!==void 0)if(c)if(Ee(u)){for(c=0;c<u.length;c++)T(u[c]);Object.freeze&&Object.freeze(u)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else T(u);if(q.call(r,"key")){u=t(e);var y=Object.keys(r).filter(function(ve){return ve!=="key"});c=0<y.length?"{key: someKey, "+y.join(": ..., ")+": ...}":"{key: someKey}",re[u+c]||(y=0<y.length?"{"+y.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
22
|
+
<%s key={someKey} {...props} />`,c,u,y,u),re[u+c]=!0)}if(u=null,i!==void 0&&(a(i),u=""+i),d(r)&&(a(r.key),u=""+r.key),"key"in r){i={};for(var W in r)W!=="key"&&(i[W]=r[W])}else i=r;return u&&p(i,typeof e=="function"?e.displayName||e.name||"Unknown":e),R(e,u,i,s(),Y,F)}function T(e){b(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===M&&(e._payload.status==="fulfilled"?b(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function b(e){return typeof e=="object"&&e!==null&&e.$$typeof===x}var _=o,x=Symbol.for("react.transitional.element"),P=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),I=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),he=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),pe=Symbol.for("react.activity"),Re=Symbol.for("react.client.reference"),G=_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=Object.prototype.hasOwnProperty,Ee=Array.isArray,L=console.createTask?console.createTask:function(){return null};_={react_stack_bottom_frame:function(e){return e()}};var Q,K={},$=_.react_stack_bottom_frame.bind(_,f)(),ee=L(l(f)),re={};S.Fragment=C,S.jsx=function(e,r,i){var c=1e4>G.recentlyCreatedOwnerStacks++;return k(e,r,i,!1,c?Error("react-stack-top-frame"):$,c?L(l(e)):ee)},S.jsxs=function(e,r,i){var c=1e4>G.recentlyCreatedOwnerStacks++;return k(e,r,i,!0,c?Error("react-stack-top-frame"):$,c?L(l(e)):ee)}})()),S}var z;function ae(){return z||(z=1,process.env.NODE_ENV==="production"?w.exports=te():w.exports=ne()),w.exports}var v=ae();const J=o.createContext({}),oe=({children:t})=>{const{app:n}=m.useApplication(),a=o.useMemo(()=>{if(!n||!n.renderer)return null;const l=new h.Graphics;l.setFillStyle({color:"#121225"}),l.rect(0,0,1,1),l.fill();const s=n.renderer.generateTexture(l);return l.destroy(),s},[n==null?void 0:n.renderer]);return a?v.jsx(J.Provider,{value:a,children:t}):null};class se extends h.Particle{constructor(a,l,s,f,d,p){super({texture:a,x:l,y:s,scaleX:f,scaleY:d,alpha:0});E(this,"animationProgress",0);E(this,"delayCounter",0);E(this,"randomSpeed");E(this,"randomDelayOffset");E(this,"startScaleX");E(this,"startScaleY");E(this,"targetAlpha");this.texture=a,this.x=l,this.y=s,this.scaleX=f,this.scaleY=d,this.curLevel=p,this.startScaleX=f,this.startScaleY=d,this.curLevel=p,this.randomSpeed=.04+Math.random()*.04,this.randomDelayOffset=Math.floor(Math.random()*150),this.targetAlpha=.9+Math.random()*.1}update(){if(this.delayCounter<this.curLevel*15+this.randomDelayOffset){this.delayCounter++;return}if(this.animationProgress>=this.targetAlpha-.001){this.animationProgress=this.targetAlpha,this.alpha=this.targetAlpha;return}this.animationProgress+=(this.targetAlpha-this.animationProgress)*this.randomSpeed,this.alpha=this.animationProgress}}class ie{constructor(n,a){E(this,"cells",[]);this.texture=n,this.particleContainerRefCurrent=a,this.texture=n}add(n,a,l,s,f){const d=new se(this.texture,n,a,l,s,f);this.particleContainerRefCurrent.addParticle(d),this.cells.push(d)}updateAll(){for(const n of this.cells)n.update()}}const le=({gridRows:t,gridCols:n,cellWidth:a,cellHeight:l,gridDepth:s})=>{const f=o.useContext(J),d=o.useRef(null),p=o.useRef(null);o.useEffect(()=>(d.current&&(p.current=new ie(f,d.current),j(0,0,a,l,n,t,s,d.current)),()=>{var R;try{(R=d.current)==null||R.removeChildren()}catch{}p.current=null}),[]),m.useTick(()=>{var R;(R=p.current)==null||R.updateAll()});const j=o.useCallback((R,k,T,b,_,x,P,C)=>{var N;for(let g=0;g<x;g++)for(let O=0;O<_;O++){const I=R+O*T,D=k+g*b;P<=0||Math.random()>.7&&P<s?Math.random()>.1&&((N=p.current)==null||N.add(I,D,T-1,b-1,P)):j(I,D,T/_,b/x,_,x,P-1,C)}},[]);return v.jsx("pixiParticleContainer",{ref:d,dynamicProperties:{position:!0,vertex:!0,color:!0}})},ce=({cellWidth:t,cellHeight:n,gridRows:a,gridCols:l,gridDepth:s})=>v.jsx(oe,{children:v.jsx(le,{cellWidth:t,cellHeight:n,gridCols:l,gridRows:a,gridDepth:s})});m.extend({ParticleContainer:h.ParticleContainer,Particle:h.Particle,Texture:h.Texture,Container:h.Container,Sprite:h.Sprite,Graphics:h.Graphics});const V=2,H=2,B=300,Z=300,ue=6,fe=()=>{const{app:t}=m.useApplication();return o.useEffect(()=>()=>{var n;try{(n=t==null?void 0:t.ticker)==null||n.stop(),t==null||t.destroy();const a=(t==null?void 0:t.canvas)||(t==null?void 0:t.view);a&&a.parentNode&&a.parentNode.removeChild(a)}catch{}},[t]),null};return()=>{const t=typeof window<"u",n=o.useRef(null);return t?v.jsx("div",{ref:n,className:"flex flex-col items-center justify-center w-full h-full",children:v.jsxs(m.Application,{antialias:!1,width:B*V,height:Z*H,className:"image-pixelated w-full",backgroundAlpha:0,autoDensity:!0,resizeTo:n,children:[v.jsx(fe,{}),v.jsx(ce,{gridCols:V,gridRows:H,cellWidth:B,cellHeight:Z,gridDepth:ue})]})}):null}}));
|
|
23
23
|
//# sourceMappingURL=recursive-grid.umd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recursive-grid.umd.js","sources":["../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/context/CellTexturesContext.tsx","../src/classes/Cell.ts","../src/classes/CellManager.ts","../src/components/RecursiveGrid.tsx","../src/components/RecursiveGridContainer.tsx","../src/components/PixiApp.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { createContext, useContext, FC, ReactNode, useMemo } from 'react'\r\nimport { useApplication } from '@pixi/react'\r\nimport { Graphics, Texture } from 'pixi.js'\r\n\r\ntype CellTextures = Texture\r\n\r\nconst CellTexturesContext = createContext<CellTextures>({} as CellTextures)\r\n\r\nexport const useCellTextures = () => useContext(CellTexturesContext)\r\n\r\nconst CellTexturesProvider: FC<{ children: ReactNode }> = ({ children }) => {\r\n const { app } = useApplication()\r\n\r\n const texture = useMemo(() => {\r\n if (!app || !app.renderer) return null\r\n\r\n const g = new Graphics()\r\n\r\n g.setFillStyle({\r\n color: '#121225',\r\n })\r\n\r\n g.rect(0, 0, 1, 1)\r\n g.fill()\r\n const generatedTexture = app.renderer.generateTexture(g)\r\n g.destroy()\r\n return generatedTexture\r\n }, [app?.renderer])\r\n\r\n if (!texture) return null\r\n\r\n return (\r\n <CellTexturesContext.Provider value={texture}>\r\n {children}\r\n </CellTexturesContext.Provider>\r\n )\r\n}\r\n\r\nexport { CellTexturesContext, CellTexturesProvider }\r\n","import { Particle, Texture } from \"pixi.js\"\r\n\r\nexport class Cell extends Particle {\r\n private animationProgress = 0\r\n private delayCounter = 0\r\n private randomSpeed: number\r\n private randomDelayOffset: number\r\n startScaleX: number\r\n startScaleY: number\r\n targetAlpha: number\r\n\r\n constructor(\r\n public texture: Texture,\r\n public x: number,\r\n public y: number,\r\n public scaleX: number,\r\n public scaleY: number,\r\n public curLevel: number,\r\n ) {\r\n super({ texture, x, y, scaleX, scaleY, alpha: 0 })\r\n this.startScaleX = scaleX\r\n this.startScaleY = scaleY\r\n this.curLevel = curLevel\r\n\r\n // Randomize speed slightly (0.08 to 0.12)\r\n this.randomSpeed = 0.04 + Math.random() * 0.04\r\n // Randomize delay by a few frames\r\n this.randomDelayOffset = Math.floor(Math.random() * 150)\r\n this.targetAlpha = 0.9 + Math.random() * 0.1\r\n }\r\n\r\n update() {\r\n if (this.delayCounter < this.curLevel * 15 + this.randomDelayOffset) {\r\n this.delayCounter++\r\n return\r\n }\r\n\r\n if (this.animationProgress >= this.targetAlpha - 0.001) {\r\n this.animationProgress = this.targetAlpha\r\n this.alpha = this.targetAlpha\r\n return\r\n }\r\n\r\n this.animationProgress += (this.targetAlpha - this.animationProgress) * this.randomSpeed\r\n this.alpha = this.animationProgress\r\n }\r\n}\r\n","import { ParticleContainer, Texture } from 'pixi.js'\r\nimport { Cell } from './Cell'\r\n\r\nexport class CellManager {\r\n private cells: Cell[] = []\r\n\r\n constructor(\r\n public texture: Texture,\r\n public particleContainerRefCurrent: ParticleContainer\r\n ) {\r\n this.texture = texture\r\n }\r\n\r\n add(x: number, y: number, scaleX: number, scaleY: number, curLevel: number) {\r\n const cell = new Cell(this.texture, x, y, scaleX, scaleY, curLevel)\r\n this.particleContainerRefCurrent.addParticle(cell)\r\n this.cells.push(cell)\r\n }\r\n\r\n updateAll() {\r\n for (const cell of this.cells) {\r\n cell.update()\r\n }\r\n }\r\n}","import { FC, useCallback, useContext, useEffect, useRef } from 'react'\r\nimport { ParticleContainer } from 'pixi.js'\r\nimport { CellTexturesContext } from '../context/CellTexturesContext'\r\nimport { useTick } from '@pixi/react'\r\nimport { CellManager } from '../classes/CellManager'\r\n\r\ninterface GridProps {\r\n gridCols: number\r\n gridRows: number\r\n cellWidth: number\r\n cellHeight: number\r\n gridDepth: number\r\n}\r\n\r\nconst RecursiveGrid: FC<GridProps> = ({\r\n gridRows,\r\n gridCols,\r\n cellWidth,\r\n cellHeight,\r\n gridDepth,\r\n}) => {\r\n const texture = useContext(CellTexturesContext)\r\n const particleContainerRef = useRef<ParticleContainer>(null)\r\n const cellManager = useRef<CellManager>(null)\r\n\r\n useEffect(() => {\r\n if (particleContainerRef.current) {\r\n cellManager.current = new CellManager(\r\n texture,\r\n particleContainerRef.current\r\n )\r\n\r\n buildRecursiveGrid(\r\n 0,\r\n 0,\r\n cellWidth,\r\n cellHeight,\r\n gridCols,\r\n gridRows,\r\n gridDepth,\r\n particleContainerRef.current\r\n )\r\n }\r\n }, [])\r\n\r\n useTick(() => {\r\n cellManager.current?.updateAll()\r\n })\r\n\r\n const buildRecursiveGrid = useCallback(\r\n (\r\n x: number,\r\n y: number,\r\n cellWidth: number,\r\n cellHeight: number,\r\n gridCols: number,\r\n gridRows: number,\r\n curLevel: number,\r\n currentParticlesRef: ParticleContainer\r\n ) => {\r\n for (let row = 0; row < gridRows; row++) {\r\n for (let col = 0; col < gridCols; col++) {\r\n const startX = x + col * cellWidth\r\n const startY = y + row * cellHeight\r\n\r\n if (\r\n curLevel <= 0 ||\r\n (Math.random() > 0.7 && curLevel < gridDepth)\r\n ) {\r\n if (Math.random() > 0.1) {\r\n cellManager.current?.add(\r\n startX,\r\n startY,\r\n cellWidth - 1,\r\n cellHeight - 1,\r\n curLevel\r\n )\r\n }\r\n } else {\r\n buildRecursiveGrid(\r\n startX,\r\n startY,\r\n cellWidth / gridCols,\r\n cellHeight / gridRows,\r\n gridCols,\r\n gridRows,\r\n curLevel - 1,\r\n currentParticlesRef\r\n )\r\n }\r\n }\r\n }\r\n },\r\n []\r\n )\r\n\r\n return (\r\n <pixiParticleContainer\r\n ref={particleContainerRef}\r\n dynamicProperties={{\r\n position: true,\r\n vertex: true,\r\n color: true,\r\n }}\r\n />\r\n )\r\n}\r\n\r\nexport default RecursiveGrid\r\n","import { FC } from 'react'\r\nimport RecursiveGrid from './RecursiveGrid'\r\n\r\nimport { CellTexturesProvider } from '../context/CellTexturesContext'\r\n\r\ninterface RecursiveGridContainerProps {\r\n cellWidth: number\r\n cellHeight: number\r\n gridRows: number\r\n gridCols: number\r\n gridDepth: number\r\n}\r\n\r\nconst RecursiveGridContainer: FC<RecursiveGridContainerProps> = ({\r\n cellWidth,\r\n cellHeight,\r\n gridRows,\r\n gridCols,\r\n gridDepth,\r\n}) => {\r\n return (\r\n <CellTexturesProvider>\r\n <RecursiveGrid\r\n cellWidth={cellWidth}\r\n cellHeight={cellHeight}\r\n gridCols={gridCols}\r\n gridRows={gridRows}\r\n gridDepth={gridDepth}\r\n />\r\n </CellTexturesProvider>\r\n )\r\n}\r\n\r\nexport default RecursiveGridContainer\r\n","import { Application, extend } from '@pixi/react'\r\nimport {\r\n Sprite,\r\n Graphics,\r\n Container,\r\n Texture,\r\n Particle,\r\n ParticleContainer,\r\n} from 'pixi.js'\r\nimport RecursiveGridContainer from './RecursiveGridContainer'\r\n\r\nextend({ ParticleContainer, Particle, Texture, Container, Sprite, Graphics })\r\n\r\nconst GRID_COLS = 2\r\nconst GRID_ROWS = 2\r\nconst CELL_WIDTH = 300\r\nconst CELL_HEIGHT = 300\r\nconst GRID_DEPTH = 6\r\n\r\nconst PixiApp = () => {\r\n return (\r\n <div className=\"flex flex-col items-center justify-center w-full h-full\">\r\n <Application\r\n antialias={false}\r\n width={CELL_WIDTH * GRID_COLS}\r\n height={CELL_HEIGHT * GRID_ROWS}\r\n className=\"image-pixelated w-full\"\r\n backgroundAlpha={0}\r\n autoDensity={true}\r\n >\r\n <RecursiveGridContainer\r\n gridCols={GRID_COLS}\r\n gridRows={GRID_ROWS}\r\n cellWidth={CELL_WIDTH}\r\n cellHeight={CELL_HEIGHT}\r\n gridDepth={GRID_DEPTH}\r\n />\r\n </Application>\r\n </div>\r\n )\r\n}\r\n\r\nexport default PixiApp\r\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","owner","debugStack","debugTask","refProp","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","isValidElement","object","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","CellTexturesContext","createContext","CellTexturesProvider","app","useApplication","texture","useMemo","g","Graphics","generatedTexture","Cell","Particle","x","y","scaleX","scaleY","curLevel","__publicField","CellManager","particleContainerRefCurrent","cell","RecursiveGrid","gridRows","gridCols","cellWidth","cellHeight","gridDepth","useContext","particleContainerRef","useRef","cellManager","useEffect","buildRecursiveGrid","useTick","_a","useCallback","currentParticlesRef","row","col","startX","startY","jsx","RecursiveGridContainer","extend","ParticleContainer","Texture","Container","Sprite","GRID_COLS","GRID_ROWS","CELL_WIDTH","CELL_HEIGHT","GRID_DEPTH","Application"],"mappings":";;;;;;;;yCAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAAO,MAAlB,SAA0BE,EAAM,GAAKF,EAAO,KACxC,QAASA,EAAQ,CACnBC,EAAW,CAAA,EACX,QAASE,KAAYH,EACTG,IAAV,QAAuBF,EAASE,CAAQ,EAAIH,EAAOG,CAAQ,EACjE,MAASF,EAAWD,EAClB,OAAAA,EAASC,EAAS,IACX,CACL,SAAUL,EACV,KAAMG,EACN,IAAKG,EACL,IAAgBF,IAAX,OAAoBA,EAAS,KAClC,MAAOC,EAEX,CACA,OAAAG,EAAA,SAAmBP,EACnBO,EAAA,IAAcN,EACdM,EAAA,KAAeN;;;;;;;;sCCtBE,QAAQ,IAAI,WAA7B,eACG,UAAY,CACX,SAASO,EAAyBN,EAAM,CACtC,GAAYA,GAAR,KAAc,OAAO,KACzB,GAAmB,OAAOA,GAAtB,WACF,OAAOA,EAAK,WAAaO,GACrB,KACAP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_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/context/CellTexturesContext.tsx","../src/classes/Cell.ts","../src/classes/CellManager.ts","../src/components/RecursiveGrid.tsx","../src/components/RecursiveGridContainer.tsx","../src/components/PixiApp.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { createContext, useContext, FC, ReactNode, useMemo } from 'react'\r\nimport { useApplication } from '@pixi/react'\r\nimport { Graphics, Texture } from 'pixi.js'\r\n\r\ntype CellTextures = Texture\r\n\r\nconst CellTexturesContext = createContext<CellTextures>({} as CellTextures)\r\n\r\nexport const useCellTextures = () => useContext(CellTexturesContext)\r\n\r\nconst CellTexturesProvider: FC<{ children: ReactNode }> = ({ children }) => {\r\n const { app } = useApplication()\r\n\r\n const texture = useMemo(() => {\r\n if (!app || !app.renderer) return null\r\n\r\n const g = new Graphics()\r\n\r\n g.setFillStyle({\r\n color: '#121225',\r\n })\r\n\r\n g.rect(0, 0, 1, 1)\r\n g.fill()\r\n const generatedTexture = app.renderer.generateTexture(g)\r\n g.destroy()\r\n return generatedTexture\r\n }, [app?.renderer])\r\n\r\n if (!texture) return null\r\n\r\n return (\r\n <CellTexturesContext.Provider value={texture}>\r\n {children}\r\n </CellTexturesContext.Provider>\r\n )\r\n}\r\n\r\nexport { CellTexturesContext, CellTexturesProvider }\r\n","import { Particle, Texture } from \"pixi.js\"\r\n\r\nexport class Cell extends Particle {\r\n private animationProgress = 0\r\n private delayCounter = 0\r\n private randomSpeed: number\r\n private randomDelayOffset: number\r\n startScaleX: number\r\n startScaleY: number\r\n targetAlpha: number\r\n\r\n constructor(\r\n public texture: Texture,\r\n public x: number,\r\n public y: number,\r\n public scaleX: number,\r\n public scaleY: number,\r\n public curLevel: number,\r\n ) {\r\n super({ texture, x, y, scaleX, scaleY, alpha: 0 })\r\n this.startScaleX = scaleX\r\n this.startScaleY = scaleY\r\n this.curLevel = curLevel\r\n\r\n // Randomize speed slightly (0.08 to 0.12)\r\n this.randomSpeed = 0.04 + Math.random() * 0.04\r\n // Randomize delay by a few frames\r\n this.randomDelayOffset = Math.floor(Math.random() * 150)\r\n this.targetAlpha = 0.9 + Math.random() * 0.1\r\n }\r\n\r\n update() {\r\n if (this.delayCounter < this.curLevel * 15 + this.randomDelayOffset) {\r\n this.delayCounter++\r\n return\r\n }\r\n\r\n if (this.animationProgress >= this.targetAlpha - 0.001) {\r\n this.animationProgress = this.targetAlpha\r\n this.alpha = this.targetAlpha\r\n return\r\n }\r\n\r\n this.animationProgress += (this.targetAlpha - this.animationProgress) * this.randomSpeed\r\n this.alpha = this.animationProgress\r\n }\r\n}\r\n","import { ParticleContainer, Texture } from 'pixi.js'\r\nimport { Cell } from './Cell'\r\n\r\nexport class CellManager {\r\n private cells: Cell[] = []\r\n\r\n constructor(\r\n public texture: Texture,\r\n public particleContainerRefCurrent: ParticleContainer\r\n ) {\r\n this.texture = texture\r\n }\r\n\r\n add(x: number, y: number, scaleX: number, scaleY: number, curLevel: number) {\r\n const cell = new Cell(this.texture, x, y, scaleX, scaleY, curLevel)\r\n this.particleContainerRefCurrent.addParticle(cell)\r\n this.cells.push(cell)\r\n }\r\n\r\n updateAll() {\r\n for (const cell of this.cells) {\r\n cell.update()\r\n }\r\n }\r\n}","import { FC, useCallback, useContext, useEffect, useRef } from 'react'\r\nimport { ParticleContainer } from 'pixi.js'\r\nimport { CellTexturesContext } from '../context/CellTexturesContext'\r\nimport { useTick } from '@pixi/react'\r\nimport { CellManager } from '../classes/CellManager'\r\n\r\ninterface GridProps {\r\n gridCols: number\r\n gridRows: number\r\n cellWidth: number\r\n cellHeight: number\r\n gridDepth: number\r\n}\r\n\r\nconst RecursiveGrid: FC<GridProps> = ({\r\n gridRows,\r\n gridCols,\r\n cellWidth,\r\n cellHeight,\r\n gridDepth,\r\n}) => {\r\n const texture = useContext(CellTexturesContext)\r\n const particleContainerRef = useRef<ParticleContainer>(null)\r\n const cellManager = useRef<CellManager>(null)\r\n\r\n useEffect(() => {\r\n if (particleContainerRef.current) {\r\n cellManager.current = new CellManager(\r\n texture,\r\n particleContainerRef.current\r\n )\r\n\r\n buildRecursiveGrid(\r\n 0,\r\n 0,\r\n cellWidth,\r\n cellHeight,\r\n gridCols,\r\n gridRows,\r\n gridDepth,\r\n particleContainerRef.current\r\n )\r\n }\r\n return () => {\r\n // Clean up particles and references on unmount to avoid stale objects across HMR/navigation\r\n try {\r\n particleContainerRef.current?.removeChildren()\r\n } catch (err) {}\r\n cellManager.current = null\r\n }\r\n }, [])\r\n\r\n useTick(() => {\r\n cellManager.current?.updateAll()\r\n })\r\n\r\n const buildRecursiveGrid = useCallback(\r\n (\r\n x: number,\r\n y: number,\r\n cellWidth: number,\r\n cellHeight: number,\r\n gridCols: number,\r\n gridRows: number,\r\n curLevel: number,\r\n currentParticlesRef: ParticleContainer\r\n ) => {\r\n for (let row = 0; row < gridRows; row++) {\r\n for (let col = 0; col < gridCols; col++) {\r\n const startX = x + col * cellWidth\r\n const startY = y + row * cellHeight\r\n\r\n if (\r\n curLevel <= 0 ||\r\n (Math.random() > 0.7 && curLevel < gridDepth)\r\n ) {\r\n if (Math.random() > 0.1) {\r\n cellManager.current?.add(\r\n startX,\r\n startY,\r\n cellWidth - 1,\r\n cellHeight - 1,\r\n curLevel\r\n )\r\n }\r\n } else {\r\n buildRecursiveGrid(\r\n startX,\r\n startY,\r\n cellWidth / gridCols,\r\n cellHeight / gridRows,\r\n gridCols,\r\n gridRows,\r\n curLevel - 1,\r\n currentParticlesRef\r\n )\r\n }\r\n }\r\n }\r\n },\r\n []\r\n )\r\n\r\n return (\r\n <pixiParticleContainer\r\n ref={particleContainerRef}\r\n dynamicProperties={{\r\n position: true,\r\n vertex: true,\r\n color: true,\r\n }}\r\n />\r\n )\r\n}\r\n\r\nexport default RecursiveGrid\r\n","import { FC } from 'react'\r\nimport RecursiveGrid from './RecursiveGrid'\r\n\r\nimport { CellTexturesProvider } from '../context/CellTexturesContext'\r\n\r\ninterface RecursiveGridContainerProps {\r\n cellWidth: number\r\n cellHeight: number\r\n gridRows: number\r\n gridCols: number\r\n gridDepth: number\r\n}\r\n\r\nconst RecursiveGridContainer: FC<RecursiveGridContainerProps> = ({\r\n cellWidth,\r\n cellHeight,\r\n gridRows,\r\n gridCols,\r\n gridDepth,\r\n}) => {\r\n return (\r\n <CellTexturesProvider>\r\n <RecursiveGrid\r\n cellWidth={cellWidth}\r\n cellHeight={cellHeight}\r\n gridCols={gridCols}\r\n gridRows={gridRows}\r\n gridDepth={gridDepth}\r\n />\r\n </CellTexturesProvider>\r\n )\r\n}\r\n\r\nexport default RecursiveGridContainer\r\n","import { Application, extend, useApplication } from '@pixi/react'\r\nimport {\r\n Sprite,\r\n Graphics,\r\n Container,\r\n Texture,\r\n Particle,\r\n ParticleContainer,\r\n} from 'pixi.js'\r\nimport RecursiveGridContainer from './RecursiveGridContainer'\r\nimport { useEffect, useRef } from 'react'\r\n\r\nextend({ ParticleContainer, Particle, Texture, Container, Sprite, Graphics })\r\n\r\nconst GRID_COLS = 2\r\nconst GRID_ROWS = 2\r\nconst CELL_WIDTH = 300\r\nconst CELL_HEIGHT = 300\r\nconst GRID_DEPTH = 6\r\n\r\nconst PixiLifecycle = () => {\r\n const { app } = useApplication()\r\n\r\n useEffect(() => {\r\n // Cleanup Pixi on unmount to avoid stale canvas/context across HMR or route changes\r\n return () => {\r\n try {\r\n // Stop ticker and destroy the application. Pixi v8 cleans up renderer/stage.\r\n // Removing the canvas from DOM ensures there are no dangling references.\r\n app?.ticker?.stop()\r\n app?.destroy()\r\n const canvas = (app as any)?.canvas || (app as any)?.view\r\n if (canvas && canvas.parentNode) {\r\n canvas.parentNode.removeChild(canvas)\r\n }\r\n } catch (err) {\r\n // Swallow errors during teardown to avoid crashing HMR\r\n }\r\n }\r\n }, [app])\r\n\r\n return null\r\n}\r\n\r\nconst PixiApp = () => {\r\n const isBrowser = typeof window !== 'undefined'\r\n const containerRef = useRef<HTMLDivElement | null>(null)\r\n\r\n if (!isBrowser) return null\r\n\r\n return (\r\n <div\r\n ref={containerRef}\r\n className=\"flex flex-col items-center justify-center w-full h-full\"\r\n >\r\n <Application\r\n antialias={false}\r\n width={CELL_WIDTH * GRID_COLS}\r\n height={CELL_HEIGHT * GRID_ROWS}\r\n className=\"image-pixelated w-full\"\r\n backgroundAlpha={0}\r\n autoDensity={true}\r\n resizeTo={containerRef}\r\n >\r\n <PixiLifecycle />\r\n <RecursiveGridContainer\r\n gridCols={GRID_COLS}\r\n gridRows={GRID_ROWS}\r\n cellWidth={CELL_WIDTH}\r\n cellHeight={CELL_HEIGHT}\r\n gridDepth={GRID_DEPTH}\r\n />\r\n </Application>\r\n </div>\r\n )\r\n}\r\n\r\nexport default PixiApp\r\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","owner","debugStack","debugTask","refProp","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","isValidElement","object","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","CellTexturesContext","createContext","CellTexturesProvider","app","useApplication","texture","useMemo","g","Graphics","generatedTexture","Cell","Particle","x","y","scaleX","scaleY","curLevel","__publicField","CellManager","particleContainerRefCurrent","cell","RecursiveGrid","gridRows","gridCols","cellWidth","cellHeight","gridDepth","useContext","particleContainerRef","useRef","cellManager","useEffect","buildRecursiveGrid","_a","useTick","useCallback","currentParticlesRef","row","col","startX","startY","jsx","RecursiveGridContainer","extend","ParticleContainer","Texture","Container","Sprite","GRID_COLS","GRID_ROWS","CELL_WIDTH","CELL_HEIGHT","GRID_DEPTH","PixiLifecycle","canvas","isBrowser","containerRef","jsxs","Application"],"mappings":";;;;;;;;yCAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAA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