@micjanic/recursive-grid 1.0.29 → 1.0.30
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 ce = Object.defineProperty;
|
|
2
|
+
var fe = (l, t, n) => t in l ? ce(l, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : l[t] = n;
|
|
3
|
+
var p = (l, t, n) => fe(l, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import de, { createContext as me, useState as pe, useEffect as F, useContext as he, useRef as V, useCallback as _e } from "react";
|
|
5
|
+
import { useApplication as Ee, useTick as Re, extend as ve, Application as Te } from "@pixi/react";
|
|
6
|
+
import { Graphics as ee, Particle as re, Sprite as be, Container as xe, Texture as Pe, ParticleContainer as Ae } 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
|
|
23
|
-
var
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
for (var d in
|
|
27
|
-
d !== "key" && (
|
|
28
|
-
} else
|
|
29
|
-
return
|
|
30
|
-
$$typeof:
|
|
31
|
-
type:
|
|
32
|
-
key:
|
|
33
|
-
ref:
|
|
34
|
-
props:
|
|
17
|
+
var z;
|
|
18
|
+
function ge() {
|
|
19
|
+
if (z) return g;
|
|
20
|
+
z = 1;
|
|
21
|
+
var l = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
22
|
+
function n(f, a, s) {
|
|
23
|
+
var o = null;
|
|
24
|
+
if (s !== void 0 && (o = "" + s), a.key !== void 0 && (o = "" + a.key), "key" in a) {
|
|
25
|
+
s = {};
|
|
26
|
+
for (var d in a)
|
|
27
|
+
d !== "key" && (s[d] = a[d]);
|
|
28
|
+
} else s = a;
|
|
29
|
+
return a = s.ref, {
|
|
30
|
+
$$typeof: l,
|
|
31
|
+
type: f,
|
|
32
|
+
key: o,
|
|
33
|
+
ref: a !== void 0 ? a : null,
|
|
34
|
+
props: s
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
return g.Fragment =
|
|
37
|
+
return g.Fragment = t, g.jsx = n, g.jsxs = n, g;
|
|
38
38
|
}
|
|
39
|
-
var
|
|
39
|
+
var y = {};
|
|
40
40
|
/**
|
|
41
41
|
* @license React
|
|
42
42
|
* react-jsx-runtime.development.js
|
|
@@ -46,26 +46,26 @@ var k = {};
|
|
|
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 X;
|
|
50
|
+
function ye() {
|
|
51
|
+
return X || (X = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
52
|
+
function l(e) {
|
|
53
53
|
if (e == null) return null;
|
|
54
54
|
if (typeof e == "function")
|
|
55
|
-
return e.$$typeof ===
|
|
55
|
+
return e.$$typeof === le ? null : e.displayName || e.name || null;
|
|
56
56
|
if (typeof e == "string") return e;
|
|
57
57
|
switch (e) {
|
|
58
|
-
case
|
|
58
|
+
case x:
|
|
59
59
|
return "Fragment";
|
|
60
|
-
case
|
|
60
|
+
case P:
|
|
61
61
|
return "Profiler";
|
|
62
|
-
case
|
|
62
|
+
case O:
|
|
63
63
|
return "StrictMode";
|
|
64
|
-
case
|
|
64
|
+
case ne:
|
|
65
65
|
return "Suspense";
|
|
66
|
-
case
|
|
66
|
+
case ae:
|
|
67
67
|
return "SuspenseList";
|
|
68
|
-
case
|
|
68
|
+
case se:
|
|
69
69
|
return "Activity";
|
|
70
70
|
}
|
|
71
71
|
if (typeof e == "object")
|
|
@@ -74,96 +74,96 @@ function ge() {
|
|
|
74
74
|
), e.$$typeof) {
|
|
75
75
|
case T:
|
|
76
76
|
return "Portal";
|
|
77
|
-
case
|
|
77
|
+
case C:
|
|
78
78
|
return e.displayName || "Context";
|
|
79
79
|
case A:
|
|
80
80
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
81
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 oe:
|
|
85
|
+
return r = e.displayName || null, r !== null ? r : l(e.type) || "Memo";
|
|
86
86
|
case D:
|
|
87
87
|
r = e._payload, e = e._init;
|
|
88
88
|
try {
|
|
89
|
-
return
|
|
89
|
+
return l(e(r));
|
|
90
90
|
} catch {
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
return null;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function t(e) {
|
|
96
96
|
return "" + e;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function n(e) {
|
|
99
99
|
try {
|
|
100
|
-
|
|
100
|
+
t(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 i = r.error, u = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
108
|
+
return i.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
|
-
|
|
112
|
-
),
|
|
111
|
+
u
|
|
112
|
+
), t(e);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
if (e ===
|
|
115
|
+
function f(e) {
|
|
116
|
+
if (e === x) return "<>";
|
|
117
117
|
if (typeof e == "object" && e !== null && e.$$typeof === D)
|
|
118
118
|
return "<...>";
|
|
119
119
|
try {
|
|
120
|
-
var r =
|
|
120
|
+
var r = l(e);
|
|
121
121
|
return r ? "<" + r + ">" : "<...>";
|
|
122
122
|
} catch {
|
|
123
123
|
return "<...>";
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function a() {
|
|
127
127
|
var e = Y.A;
|
|
128
128
|
return e === null ? null : e.getOwner();
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function s() {
|
|
131
131
|
return Error("react-stack-top-frame");
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
if (
|
|
133
|
+
function o(e) {
|
|
134
|
+
if (L.call(e, "key")) {
|
|
135
135
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
136
136
|
if (r && r.isReactWarning) return !1;
|
|
137
137
|
}
|
|
138
138
|
return e.key !== void 0;
|
|
139
139
|
}
|
|
140
140
|
function d(e, r) {
|
|
141
|
-
function
|
|
141
|
+
function i() {
|
|
142
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
|
+
i.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
148
|
+
get: i,
|
|
149
149
|
configurable: !0
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
152
|
function S() {
|
|
153
|
-
var e =
|
|
154
|
-
return
|
|
153
|
+
var e = l(this.type);
|
|
154
|
+
return U[e] || (U[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 m(e, r,
|
|
159
|
-
var
|
|
158
|
+
function m(e, r, i, u, j, M) {
|
|
159
|
+
var c = i.ref;
|
|
160
160
|
return e = {
|
|
161
161
|
$$typeof: v,
|
|
162
162
|
type: e,
|
|
163
163
|
key: r,
|
|
164
|
-
props:
|
|
165
|
-
_owner:
|
|
166
|
-
}, (
|
|
164
|
+
props: i,
|
|
165
|
+
_owner: u
|
|
166
|
+
}, (c !== void 0 ? c : null) !== null ? Object.defineProperty(e, "ref", {
|
|
167
167
|
enumerable: !1,
|
|
168
168
|
get: S
|
|
169
169
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
@@ -188,50 +188,50 @@ function ge() {
|
|
|
188
188
|
value: M
|
|
189
189
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
var
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
195
|
-
if (
|
|
196
|
-
for (
|
|
197
|
-
E(u
|
|
198
|
-
Object.freeze && Object.freeze(
|
|
191
|
+
function k(e, r, i, u, j, M) {
|
|
192
|
+
var c = r.children;
|
|
193
|
+
if (c !== void 0)
|
|
194
|
+
if (u)
|
|
195
|
+
if (ie(c)) {
|
|
196
|
+
for (u = 0; u < c.length; u++)
|
|
197
|
+
E(c[u]);
|
|
198
|
+
Object.freeze && Object.freeze(c);
|
|
199
199
|
} else
|
|
200
200
|
console.error(
|
|
201
201
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
202
202
|
);
|
|
203
|
-
else E(
|
|
204
|
-
if (
|
|
205
|
-
|
|
206
|
-
var b = Object.keys(r).filter(function(
|
|
207
|
-
return
|
|
203
|
+
else E(c);
|
|
204
|
+
if (L.call(r, "key")) {
|
|
205
|
+
c = l(e);
|
|
206
|
+
var b = Object.keys(r).filter(function(ue) {
|
|
207
|
+
return ue !== "key";
|
|
208
208
|
});
|
|
209
|
-
|
|
209
|
+
u = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", J[c + u] || (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} />
|
|
213
213
|
React keys must be passed directly to JSX without using spread:
|
|
214
214
|
let props = %s;
|
|
215
215
|
<%s key={someKey} {...props} />`,
|
|
216
|
-
i,
|
|
217
216
|
u,
|
|
217
|
+
c,
|
|
218
218
|
b,
|
|
219
|
-
|
|
220
|
-
),
|
|
219
|
+
c
|
|
220
|
+
), J[c + u] = !0);
|
|
221
221
|
}
|
|
222
|
-
if (
|
|
223
|
-
|
|
222
|
+
if (c = null, i !== void 0 && (n(i), c = "" + i), o(r) && (n(r.key), c = "" + r.key), "key" in r) {
|
|
223
|
+
i = {};
|
|
224
224
|
for (var $ in r)
|
|
225
|
-
$ !== "key" && (
|
|
226
|
-
} else
|
|
227
|
-
return
|
|
228
|
-
|
|
225
|
+
$ !== "key" && (i[$] = r[$]);
|
|
226
|
+
} else i = r;
|
|
227
|
+
return c && d(
|
|
228
|
+
i,
|
|
229
229
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
230
230
|
), m(
|
|
231
231
|
e,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
c,
|
|
233
|
+
i,
|
|
234
|
+
a(),
|
|
235
235
|
j,
|
|
236
236
|
M
|
|
237
237
|
);
|
|
@@ -242,69 +242,82 @@ 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
|
|
245
|
+
var h = de, v = Symbol.for("react.transitional.element"), T = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), C = Symbol.for("react.context"), w = Symbol.for("react.forward_ref"), ne = Symbol.for("react.suspense"), ae = Symbol.for("react.suspense_list"), oe = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), se = Symbol.for("react.activity"), le = Symbol.for("react.client.reference"), Y = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, ie = Array.isArray, I = console.createTask ? console.createTask : function() {
|
|
246
246
|
return null;
|
|
247
247
|
};
|
|
248
|
-
|
|
248
|
+
h = {
|
|
249
249
|
react_stack_bottom_frame: function(e) {
|
|
250
250
|
return e();
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
|
-
var G,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
)(), q = I(
|
|
257
|
-
|
|
258
|
-
var
|
|
259
|
-
return
|
|
253
|
+
var G, U = {}, W = h.react_stack_bottom_frame.bind(
|
|
254
|
+
h,
|
|
255
|
+
s
|
|
256
|
+
)(), q = I(f(s)), J = {};
|
|
257
|
+
y.Fragment = x, y.jsx = function(e, r, i) {
|
|
258
|
+
var u = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
259
|
+
return k(
|
|
260
260
|
e,
|
|
261
261
|
r,
|
|
262
|
-
|
|
262
|
+
i,
|
|
263
263
|
!1,
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
u ? Error("react-stack-top-frame") : W,
|
|
265
|
+
u ? I(f(e)) : q
|
|
266
266
|
);
|
|
267
|
-
},
|
|
268
|
-
var
|
|
269
|
-
return
|
|
267
|
+
}, y.jsxs = function(e, r, i) {
|
|
268
|
+
var u = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
269
|
+
return k(
|
|
270
270
|
e,
|
|
271
271
|
r,
|
|
272
|
-
|
|
272
|
+
i,
|
|
273
273
|
!0,
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
u ? Error("react-stack-top-frame") : W,
|
|
275
|
+
u ? I(f(e)) : q
|
|
276
276
|
);
|
|
277
277
|
};
|
|
278
|
-
})()),
|
|
278
|
+
})()), y;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
function
|
|
282
|
-
return
|
|
280
|
+
var H;
|
|
281
|
+
function Se() {
|
|
282
|
+
return H || (H = 1, process.env.NODE_ENV === "production" ? N.exports = ge() : N.exports = ye()), N.exports;
|
|
283
283
|
}
|
|
284
|
-
var _ =
|
|
285
|
-
const
|
|
286
|
-
const { app:
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
284
|
+
var _ = Se();
|
|
285
|
+
const te = me({}), ke = ({ children: l }) => {
|
|
286
|
+
const { app: t } = Ee(), [n, f] = pe(null);
|
|
287
|
+
return F(() => {
|
|
288
|
+
if (!t) return;
|
|
289
|
+
let a = !1;
|
|
290
|
+
const s = () => {
|
|
291
|
+
if (!t.renderer) {
|
|
292
|
+
requestAnimationFrame(s);
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
const o = new ee();
|
|
296
|
+
o.setFillStyle({ color: "#121225" }), o.rect(0, 0, 1, 1), o.fill();
|
|
297
|
+
const d = t.renderer.generateTexture(o);
|
|
298
|
+
o.destroy(), a || f(d);
|
|
299
|
+
};
|
|
300
|
+
return s(), () => {
|
|
301
|
+
a = !0;
|
|
302
|
+
try {
|
|
303
|
+
n == null || n.destroy(!0);
|
|
304
|
+
} catch {
|
|
305
|
+
}
|
|
306
|
+
f(null);
|
|
307
|
+
};
|
|
308
|
+
}, [t]), n ? /* @__PURE__ */ _.jsx(te.Provider, { value: n, children: l }) : null;
|
|
296
309
|
};
|
|
297
|
-
class
|
|
298
|
-
constructor(
|
|
299
|
-
super({ texture:
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
this.texture =
|
|
310
|
+
class Oe extends re {
|
|
311
|
+
constructor(n, f, a, s, o, d) {
|
|
312
|
+
super({ texture: n, x: f, y: a, scaleX: s, scaleY: o, alpha: 0 });
|
|
313
|
+
p(this, "animationProgress", 0);
|
|
314
|
+
p(this, "delayCounter", 0);
|
|
315
|
+
p(this, "randomSpeed");
|
|
316
|
+
p(this, "randomDelayOffset");
|
|
317
|
+
p(this, "startScaleX");
|
|
318
|
+
p(this, "startScaleY");
|
|
319
|
+
p(this, "targetAlpha");
|
|
320
|
+
this.texture = n, this.x = f, this.y = a, this.scaleX = s, this.scaleY = o, this.curLevel = d, this.startScaleX = s, this.startScaleY = o, 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
321
|
}
|
|
309
322
|
update() {
|
|
310
323
|
if (this.delayCounter < this.curLevel * 15 + this.randomDelayOffset) {
|
|
@@ -318,72 +331,83 @@ class Ce extends te {
|
|
|
318
331
|
this.animationProgress += (this.targetAlpha - this.animationProgress) * this.randomSpeed, this.alpha = this.animationProgress;
|
|
319
332
|
}
|
|
320
333
|
}
|
|
321
|
-
class
|
|
322
|
-
constructor(
|
|
323
|
-
|
|
324
|
-
this.texture =
|
|
334
|
+
class Ce {
|
|
335
|
+
constructor(t, n) {
|
|
336
|
+
p(this, "cells", []);
|
|
337
|
+
this.texture = t, this.particleContainerRefCurrent = n, this.texture = t;
|
|
325
338
|
}
|
|
326
|
-
add(
|
|
327
|
-
const
|
|
328
|
-
this.particleContainerRefCurrent.addParticle(
|
|
339
|
+
add(t, n, f, a, s) {
|
|
340
|
+
const o = new Oe(this.texture, t, n, f, a, s);
|
|
341
|
+
this.particleContainerRefCurrent.addParticle(o), this.cells.push(o);
|
|
329
342
|
}
|
|
330
343
|
updateAll() {
|
|
331
|
-
for (const
|
|
332
|
-
|
|
344
|
+
for (const t of this.cells)
|
|
345
|
+
t.update();
|
|
333
346
|
}
|
|
334
347
|
}
|
|
335
348
|
const we = ({
|
|
336
|
-
gridRows:
|
|
337
|
-
gridCols:
|
|
338
|
-
cellWidth:
|
|
339
|
-
cellHeight:
|
|
340
|
-
gridDepth:
|
|
349
|
+
gridRows: l,
|
|
350
|
+
gridCols: t,
|
|
351
|
+
cellWidth: n,
|
|
352
|
+
cellHeight: f,
|
|
353
|
+
gridDepth: a
|
|
341
354
|
}) => {
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
355
|
+
const s = he(te), o = V(null), d = V(null);
|
|
356
|
+
F(() => {
|
|
357
|
+
if (s) {
|
|
358
|
+
if (o.current) {
|
|
359
|
+
try {
|
|
360
|
+
o.current.removeChildren();
|
|
361
|
+
} catch {
|
|
362
|
+
}
|
|
363
|
+
d.current = new Ce(
|
|
364
|
+
s,
|
|
365
|
+
o.current
|
|
366
|
+
), S(
|
|
367
|
+
0,
|
|
368
|
+
0,
|
|
369
|
+
n,
|
|
370
|
+
f,
|
|
371
|
+
t,
|
|
372
|
+
l,
|
|
373
|
+
a,
|
|
374
|
+
o.current
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
return () => {
|
|
378
|
+
var m;
|
|
379
|
+
try {
|
|
380
|
+
(m = o.current) == null || m.removeChildren();
|
|
381
|
+
} catch {
|
|
382
|
+
}
|
|
383
|
+
d.current = null;
|
|
384
|
+
};
|
|
360
385
|
}
|
|
361
|
-
|
|
362
|
-
}), []), Re(() => {
|
|
386
|
+
}, [s, n, f, t, l, a]), Re(() => {
|
|
363
387
|
var m;
|
|
364
388
|
(m = d.current) == null || m.updateAll();
|
|
365
389
|
});
|
|
366
|
-
const S =
|
|
367
|
-
(m,
|
|
368
|
-
var
|
|
369
|
-
for (let
|
|
370
|
-
for (let A = 0; A <
|
|
371
|
-
const
|
|
372
|
-
T <= 0 || Math.random() > 0.7 && T <
|
|
373
|
-
|
|
390
|
+
const S = _e(
|
|
391
|
+
(m, k, E, R, h, v, T, x) => {
|
|
392
|
+
var O;
|
|
393
|
+
for (let P = 0; P < v; P++)
|
|
394
|
+
for (let A = 0; A < h; A++) {
|
|
395
|
+
const C = m + A * E, w = k + P * R;
|
|
396
|
+
T <= 0 || Math.random() > 0.7 && T < a ? Math.random() > 0.1 && ((O = d.current) == null || O.add(
|
|
397
|
+
C,
|
|
374
398
|
w,
|
|
375
399
|
E - 1,
|
|
376
400
|
R - 1,
|
|
377
401
|
T
|
|
378
402
|
)) : S(
|
|
379
|
-
|
|
403
|
+
C,
|
|
380
404
|
w,
|
|
381
|
-
E /
|
|
405
|
+
E / h,
|
|
382
406
|
R / v,
|
|
383
|
-
|
|
407
|
+
h,
|
|
384
408
|
v,
|
|
385
409
|
T - 1,
|
|
386
|
-
|
|
410
|
+
x
|
|
387
411
|
);
|
|
388
412
|
}
|
|
389
413
|
},
|
|
@@ -392,7 +416,7 @@ const we = ({
|
|
|
392
416
|
return /* @__PURE__ */ _.jsx(
|
|
393
417
|
"pixiParticleContainer",
|
|
394
418
|
{
|
|
395
|
-
ref:
|
|
419
|
+
ref: o,
|
|
396
420
|
dynamicProperties: {
|
|
397
421
|
position: !0,
|
|
398
422
|
vertex: !0,
|
|
@@ -401,69 +425,46 @@ const we = ({
|
|
|
401
425
|
}
|
|
402
426
|
);
|
|
403
427
|
}, je = ({
|
|
404
|
-
cellWidth:
|
|
405
|
-
cellHeight:
|
|
406
|
-
gridRows:
|
|
407
|
-
gridCols:
|
|
408
|
-
gridDepth:
|
|
409
|
-
}) => /* @__PURE__ */ _.jsx(
|
|
428
|
+
cellWidth: l,
|
|
429
|
+
cellHeight: t,
|
|
430
|
+
gridRows: n,
|
|
431
|
+
gridCols: f,
|
|
432
|
+
gridDepth: a
|
|
433
|
+
}) => /* @__PURE__ */ _.jsx(ke, { children: /* @__PURE__ */ _.jsx(
|
|
410
434
|
we,
|
|
411
435
|
{
|
|
412
|
-
cellWidth:
|
|
413
|
-
cellHeight:
|
|
414
|
-
gridCols:
|
|
415
|
-
gridRows:
|
|
416
|
-
gridDepth:
|
|
436
|
+
cellWidth: l,
|
|
437
|
+
cellHeight: t,
|
|
438
|
+
gridCols: f,
|
|
439
|
+
gridRows: n,
|
|
440
|
+
gridDepth: a
|
|
417
441
|
}
|
|
418
442
|
) });
|
|
419
|
-
ve({ ParticleContainer:
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
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
|
-
};
|
|
443
|
+
ve({ ParticleContainer: Ae, Particle: re, Texture: Pe, Container: xe, Sprite: be, Graphics: ee });
|
|
444
|
+
const B = 2, Z = 2, Q = 300, K = 300, Ne = 6, $e = () => (F(() => (console.log("Pixi mounted"), () => console.log("Pixi unmounted")), []), /* @__PURE__ */ _.jsx("div", { className: "flex flex-col items-center justify-center w-full h-full", children: /* @__PURE__ */ _.jsx(
|
|
445
|
+
Te,
|
|
446
|
+
{
|
|
447
|
+
antialias: !1,
|
|
448
|
+
width: Q * B,
|
|
449
|
+
height: K * Z,
|
|
450
|
+
className: "image-pixelated w-full",
|
|
451
|
+
backgroundAlpha: 0,
|
|
452
|
+
autoDensity: !0,
|
|
453
|
+
preserveDrawingBuffer: !0,
|
|
454
|
+
powerPreference: "high-performance",
|
|
455
|
+
children: /* @__PURE__ */ _.jsx(
|
|
456
|
+
je,
|
|
457
|
+
{
|
|
458
|
+
gridCols: B,
|
|
459
|
+
gridRows: Z,
|
|
460
|
+
cellWidth: Q,
|
|
461
|
+
cellHeight: K,
|
|
462
|
+
gridDepth: Ne
|
|
463
|
+
}
|
|
464
|
+
)
|
|
465
|
+
}
|
|
466
|
+
) }));
|
|
466
467
|
export {
|
|
467
|
-
|
|
468
|
+
$e as default
|
|
468
469
|
};
|
|
469
470
|
//# 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 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;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AAA,MAAA;AAAA,IACJ;AAAA,EAAA,IAxBe;AA2B3B;","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, useEffect, useState } 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 const [texture, setTexture] = useState<Texture | null>(null)\r\n\r\n useEffect(() => {\r\n if (!app) return\r\n\r\n let isUnmounted = false\r\n\r\n const generate = () => {\r\n // Wait until Pixi Application has initialised the renderer\r\n if (!app.renderer) {\r\n requestAnimationFrame(generate)\r\n return\r\n }\r\n\r\n const g = new Graphics()\r\n g.setFillStyle({ color: '#121225' })\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 if (!isUnmounted) setTexture(generatedTexture)\r\n }\r\n\r\n generate()\r\n\r\n return () => {\r\n isUnmounted = true\r\n // Destroy generated texture to free GPU memory\r\n try {\r\n texture?.destroy(true)\r\n } catch {}\r\n setTexture(null)\r\n }\r\n }, [app])\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 (!texture) return\r\n if (particleContainerRef.current) {\r\n // Clear any previous content on re-init\r\n try {\r\n particleContainerRef.current.removeChildren()\r\n } catch {}\r\n\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/texture change\r\n try {\r\n particleContainerRef.current?.removeChildren()\r\n } catch {}\r\n cellManager.current = null\r\n }\r\n }, [texture, cellWidth, cellHeight, gridCols, gridRows, gridDepth])\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\nimport { useEffect } from 'react'\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 useEffect(() => {\r\n console.log('Pixi mounted')\r\n return () => console.log('Pixi unmounted')\r\n }, [])\r\n\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 preserveDrawingBuffer={true}\r\n powerPreference=\"high-performance\"\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","setTexture","useState","useEffect","isUnmounted","generate","g","Graphics","generatedTexture","Cell","Particle","x","y","scaleX","scaleY","curLevel","__publicField","CellManager","particleContainerRefCurrent","cell","RecursiveGrid","gridRows","gridCols","cellWidth","cellHeight","gridDepth","useContext","particleContainerRef","useRef","cellManager","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","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,IAA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IAAcF;AAAA,IACtB,WAAU;AAAA,IACV,iBAAiB;AAAA,IACjB,aAAa;AAAA,IACb,uBAAuB;AAAA,IACvB,iBAAgB;AAAA,IAEhB,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,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(a,d){typeof exports=="object"&&typeof module<"u"?module.exports=d(require("react"),require("@pixi/react"),require("pixi.js")):typeof define=="function"&&define.amd?define(["react","@pixi/react","pixi.js"],d):(a=typeof globalThis<"u"?globalThis:a||self,a["@micjanic/recursive-grid"]=d(a.React,a.PIXIReact,a.PIXI))})(this,(function(a,d,h){"use strict";var ve=Object.defineProperty;var _e=(a,d,h)=>d in a?ve(a,d,{enumerable:!0,configurable:!0,writable:!0,value:h}):a[d]=h;var R=(a,d,h)=>_e(a,typeof d!="symbol"?d+"":d,h);var O={exports:{}},y={};/**
|
|
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
|
|
9
|
+
*/var W;function te(){if(W)return y;W=1;var m=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(f,t,s){var n=null;if(s!==void 0&&(n=""+s),t.key!==void 0&&(n=""+t.key),"key"in t){s={};for(var p in t)p!=="key"&&(s[p]=t[p])}else s=t;return t=s.ref,{$$typeof:m,type:f,key:n,ref:t!==void 0?t:null,props:s}}return y.Fragment=i,y.jsx=o,y.jsxs=o,y}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 m(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g:return"Fragment";case k:return"Profiler";case N:return"StrictMode";case fe:return"Suspense";case de: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 C: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 me:return r=e.displayName||null,r!==null?r:m(e.type)||"Memo";case M:r=e._payload,e=e._init;try{return m(e(r))}catch{}}return null}function i(e){return""+e}function o(e){try{i(e);var r=!1}catch{r=!0}if(r){r=console;var l=r.error,u=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return l.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",u),i(e)}}function f(e){if(e===g)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===M)return"<...>";try{var r=m(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function t(){var e=F.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function n(e){if(Z.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 l(){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))}l.isReactWarning=!0,Object.defineProperty(e,"key",{get:l,configurable:!0})}function w(){var e=m(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 E(e,r,l,u,Y,L){var c=l.ref;return e={$$typeof:x,type:e,key:r,props:l,_owner:u},(c!==void 0?c:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:w}):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:L}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function j(e,r,l,u,Y,L){var c=r.children;if(c!==void 0)if(u)if(Ee(c)){for(u=0;u<c.length;u++)T(c[u]);Object.freeze&&Object.freeze(c)}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(c);if(Z.call(r,"key")){c=m(e);var A=Object.keys(r).filter(function(Re){return Re!=="key"});u=0<A.length?"{key: someKey, "+A.join(": ..., ")+": ...}":"{key: someKey}",re[c+u]||(A=0<A.length?"{"+A.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} />`,c,
|
|
22
|
+
<%s key={someKey} {...props} />`,u,c,A,c),re[c+u]=!0)}if(c=null,l!==void 0&&(o(l),c=""+l),n(r)&&(o(r.key),c=""+r.key),"key"in r){l={};for(var U in r)U!=="key"&&(l[U]=r[U])}else l=r;return c&&p(l,typeof e=="function"?e.displayName||e.name||"Unknown":e),E(e,c,l,t(),Y,L)}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 v=a,x=Symbol.for("react.transitional.element"),P=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),I=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),pe=Symbol.for("react.activity"),he=Symbol.for("react.client.reference"),F=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,Ee=Array.isArray,G=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(e){return e()}};var Q,K={},$=v.react_stack_bottom_frame.bind(v,s)(),ee=G(f(s)),re={};S.Fragment=g,S.jsx=function(e,r,l){var u=1e4>F.recentlyCreatedOwnerStacks++;return j(e,r,l,!1,u?Error("react-stack-top-frame"):$,u?G(f(e)):ee)},S.jsxs=function(e,r,l){var u=1e4>F.recentlyCreatedOwnerStacks++;return j(e,r,l,!0,u?Error("react-stack-top-frame"):$,u?G(f(e)):ee)}})()),S}var J;function ae(){return J||(J=1,process.env.NODE_ENV==="production"?O.exports=te():O.exports=ne()),O.exports}var _=ae();const V=a.createContext({}),oe=({children:m})=>{const{app:i}=d.useApplication(),[o,f]=a.useState(null);return a.useEffect(()=>{if(!i)return;let t=!1;const s=()=>{if(!i.renderer){requestAnimationFrame(s);return}const n=new h.Graphics;n.setFillStyle({color:"#121225"}),n.rect(0,0,1,1),n.fill();const p=i.renderer.generateTexture(n);n.destroy(),t||f(p)};return s(),()=>{t=!0;try{o==null||o.destroy(!0)}catch{}f(null)}},[i]),o?_.jsx(V.Provider,{value:o,children:m}):null};class se extends h.Particle{constructor(o,f,t,s,n,p){super({texture:o,x:f,y:t,scaleX:s,scaleY:n,alpha:0});R(this,"animationProgress",0);R(this,"delayCounter",0);R(this,"randomSpeed");R(this,"randomDelayOffset");R(this,"startScaleX");R(this,"startScaleY");R(this,"targetAlpha");this.texture=o,this.x=f,this.y=t,this.scaleX=s,this.scaleY=n,this.curLevel=p,this.startScaleX=s,this.startScaleY=n,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(i,o){R(this,"cells",[]);this.texture=i,this.particleContainerRefCurrent=o,this.texture=i}add(i,o,f,t,s){const n=new se(this.texture,i,o,f,t,s);this.particleContainerRefCurrent.addParticle(n),this.cells.push(n)}updateAll(){for(const i of this.cells)i.update()}}const le=({gridRows:m,gridCols:i,cellWidth:o,cellHeight:f,gridDepth:t})=>{const s=a.useContext(V),n=a.useRef(null),p=a.useRef(null);a.useEffect(()=>{if(s){if(n.current){try{n.current.removeChildren()}catch{}p.current=new ie(s,n.current),w(0,0,o,f,i,m,t,n.current)}return()=>{var E;try{(E=n.current)==null||E.removeChildren()}catch{}p.current=null}}},[s,o,f,i,m,t]),d.useTick(()=>{var E;(E=p.current)==null||E.updateAll()});const w=a.useCallback((E,j,T,b,v,x,P,g)=>{var N;for(let k=0;k<x;k++)for(let C=0;C<v;C++){const I=E+C*T,D=j+k*b;P<=0||Math.random()>.7&&P<t?Math.random()>.1&&((N=p.current)==null||N.add(I,D,T-1,b-1,P)):w(I,D,T/v,b/x,v,x,P-1,g)}},[]);return _.jsx("pixiParticleContainer",{ref:n,dynamicProperties:{position:!0,vertex:!0,color:!0}})},ue=({cellWidth:m,cellHeight:i,gridRows:o,gridCols:f,gridDepth:t})=>_.jsx(oe,{children:_.jsx(le,{cellWidth:m,cellHeight:i,gridCols:f,gridRows:o,gridDepth:t})});d.extend({ParticleContainer:h.ParticleContainer,Particle:h.Particle,Texture:h.Texture,Container:h.Container,Sprite:h.Sprite,Graphics:h.Graphics});const z=2,H=2,B=300,q=300,ce=6;return()=>(a.useEffect(()=>(console.log("Pixi mounted"),()=>console.log("Pixi unmounted")),[]),_.jsx("div",{className:"flex flex-col items-center justify-center w-full h-full",children:_.jsx(d.Application,{antialias:!1,width:B*z,height:q*H,className:"image-pixelated w-full",backgroundAlpha:0,autoDensity:!0,preserveDrawingBuffer:!0,powerPreference:"high-performance",children:_.jsx(ue,{gridCols:z,gridRows:H,cellWidth:B,cellHeight:q,gridDepth:ce})})}))}));
|
|
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 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,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,GA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AAAA,EAAK,UACL,MAAMmD,GAAUnD,GAAA,YAAAA,EAAa,UAAWA,GAAA,YAAAA,EAAa,MACjDmD,GAAUA,EAAO,YACjBA,EAAO,WAAW,YAAYA,CAAM,CAE5C,MAAc,CAEd,CACJ,EACD,CAACnD,CAAG,CAAC,EAED,IACX,QAEgB,IAAM,CAClB,MAAMoD,EAAY,OAAO,OAAW,IAC9BC,EAAe3B,EAAAA,OAA8B,IAAI,EAEvD,OAAK0B,EAGDd,EAAAA,IAAC,MAAA,CACG,IAAKe,EACL,UAAU,0DAEV,SAAAC,EAAAA,KAACC,EAAAA,YAAA,CACG,UAAW,GACX,MAAOR,EAAaF,EACpB,OAAQG,EAAcF,EACtB,UAAU,yBACV,gBAAiB,EACjB,YAAa,GACb,SAAUO,EAEV,SAAA,CAAAf,EAAAA,IAACY,GAAA,EAAc,EACfZ,EAAAA,IAACC,GAAA,CACG,SAAUM,EACV,SAAUC,EACV,UAAWC,EACX,WAAYC,EACZ,UAAWC,EAAA,CAAA,CACf,CAAA,CAAA,CACJ,CAAA,EAxBe,IA2B3B","x_google_ignoreList":[0,1,2]}
|
|
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, useEffect, useState } 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 const [texture, setTexture] = useState<Texture | null>(null)\r\n\r\n useEffect(() => {\r\n if (!app) return\r\n\r\n let isUnmounted = false\r\n\r\n const generate = () => {\r\n // Wait until Pixi Application has initialised the renderer\r\n if (!app.renderer) {\r\n requestAnimationFrame(generate)\r\n return\r\n }\r\n\r\n const g = new Graphics()\r\n g.setFillStyle({ color: '#121225' })\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 if (!isUnmounted) setTexture(generatedTexture)\r\n }\r\n\r\n generate()\r\n\r\n return () => {\r\n isUnmounted = true\r\n // Destroy generated texture to free GPU memory\r\n try {\r\n texture?.destroy(true)\r\n } catch {}\r\n setTexture(null)\r\n }\r\n }, [app])\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 (!texture) return\r\n if (particleContainerRef.current) {\r\n // Clear any previous content on re-init\r\n try {\r\n particleContainerRef.current.removeChildren()\r\n } catch {}\r\n\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/texture change\r\n try {\r\n particleContainerRef.current?.removeChildren()\r\n } catch {}\r\n cellManager.current = null\r\n }\r\n }, [texture, cellWidth, cellHeight, gridCols, gridRows, gridDepth])\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\nimport { useEffect } from 'react'\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 useEffect(() => {\r\n console.log('Pixi mounted')\r\n return () => console.log('Pixi unmounted')\r\n }, [])\r\n\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 preserveDrawingBuffer={true}\r\n powerPreference=\"high-performance\"\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","setTexture","useState","useEffect","isUnmounted","generate","g","Graphics","generatedTexture","Cell","Particle","x","y","scaleX","scaleY","curLevel","__publicField","CellManager","particleContainerRefCurrent","cell","RecursiveGrid","gridRows","gridCols","cellWidth","cellHeight","gridDepth","useContext","particleContainerRef","useRef","cellManager","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","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,EAAK,aAAeA,EAAK,MAAQ,KACvC,GAAiB,OAAOA,GAApB,SAA0B,OAAOA,EACrC,OAAQA,EAAI,C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