@kolkrabbi/design-editor 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -26
- package/dist/{BufferResource-CKQMSOM4.js → BufferResource-BfLgK37S.js} +42 -34
- package/dist/{CanvasPool-ilDNHrRx.js → CanvasPool-YNSF8hsR.js} +9 -9
- package/dist/CanvasRenderer-Bl0rlqNq.js +2 -0
- package/dist/{browserAll-CJ593myQ.js → FederatedEventTarget-BJgROaRQ.js} +119 -127
- package/dist/FilterSystem-BUrPNXx-.js +1323 -0
- package/dist/{Geometry-D3fkwmax.js → Geometry-C5s5KpWq.js} +492 -411
- package/dist/{OrbitControls-CE3qSrHQ.js → OrbitControls-Cql8Rn2i.js} +1944 -1914
- package/dist/{RenderTargetSystem-umK0aqrs.js → RenderTargetSystem-oFwWv5IW.js} +1107 -612
- package/dist/WebGLRenderer-CXxpVIx3.js +2 -0
- package/dist/WebGPURenderer-BwLEUYBa.js +2 -0
- package/dist/browserAll-CAzdTUbR.js +6 -0
- package/dist/canvasUtils-BoNfkAod.js +168 -0
- package/dist/{rolldown-runtime-B0aSnxlc.js → chunk-3b4jIN3o.js} +4 -11
- package/dist/design-editor.css +2 -2
- package/dist/design-editor.js +7675 -8478
- package/dist/{getTextureBatchBindGroup-ChWkOJ3t.js → getTextureBatchBindGroup-CNWhZRbV.js} +5 -5
- package/dist/{host-6EhdLf5-.js → host-CVR9RL_W.js} +8 -6
- package/dist/{host-DPFYZP9I.js → host-be1CWhN1.js} +4 -2
- package/dist/init-jApIMi04.js +4 -0
- package/dist/{phase-D3rwI6OO.js → phase-t_DhU5Nm.js} +2 -2
- package/dist/pipeline-CMpuPUaX.js +11995 -0
- package/dist/{src-zDOFeQWX.js → src-QwKcYKfv.js} +747 -746
- package/dist/webworkerAll-DEZhpG90.js +2 -0
- package/package.json +32 -26
- package/LICENSE +0 -21
- package/dist/CanvasRenderer-CDbc3nH9.js +0 -3396
- package/dist/WebGLRenderer-DVKPZbKc.js +0 -2145
- package/dist/WebGPURenderer-DHSBocAL.js +0 -1656
- package/dist/canvasUtils-CXoNqK7T.js +0 -168
- package/dist/defaultFilter.vert-C9efGgir.js +0 -888
- package/dist/init-4Y6mtayI.js +0 -441
- package/dist/pipeline-DfTD40M-.js +0 -4825
- package/dist/webworkerAll-wTH3MKcZ.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1
|
+
import { n as e, t } from "./chunk-3b4jIN3o.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/extensions/Extensions.mjs
|
|
3
3
|
var n = /* @__PURE__ */ ((e) => (e.Application = "application", e.WebGLPipes = "webgl-pipes", e.WebGLPipesAdaptor = "webgl-pipes-adaptor", e.WebGLSystem = "webgl-system", e.WebGPUPipes = "webgpu-pipes", e.WebGPUPipesAdaptor = "webgpu-pipes-adaptor", e.WebGPUSystem = "webgpu-system", e.CanvasSystem = "canvas-system", e.CanvasPipesAdaptor = "canvas-pipes-adaptor", e.CanvasPipes = "canvas-pipes", e.Asset = "asset", e.LoadParser = "load-parser", e.ResolveParser = "resolve-parser", e.CacheParser = "cache-parser", e.DetectionParser = "detection-parser", e.MaskEffect = "mask-effect", e.BlendMode = "blend-mode", e.TextureSource = "texture-source", e.TextureUploaderWebGL = "texture-uploader-webgl", e.TextureUploaderWebGPU = "texture-uploader-webgpu", e.Environment = "environment", e.ShapeBuilder = "shape-builder", e.Batcher = "batcher", e))(n || {}), r = (e) => {
|
|
4
4
|
if (typeof e == "function" || typeof e == "object" && e.extension) {
|
|
5
5
|
if (!e.extension) throw Error("Extension class must have an extension object");
|
|
@@ -433,7 +433,7 @@ var n = /* @__PURE__ */ ((e) => (e.Application = "application", e.WebGLPipes = "
|
|
|
433
433
|
});
|
|
434
434
|
};
|
|
435
435
|
//#endregion
|
|
436
|
-
//#region node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/names.mjs
|
|
436
|
+
//#region ../../node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/names.mjs
|
|
437
437
|
function pe(e, t) {
|
|
438
438
|
var n = {
|
|
439
439
|
white: "#ffffff",
|
|
@@ -592,7 +592,7 @@ function pe(e, t) {
|
|
|
592
592
|
var i, o, s = r[this.toHex()];
|
|
593
593
|
if (s) return s;
|
|
594
594
|
if (t?.closest) {
|
|
595
|
-
var c = this.toRgb(), l =
|
|
595
|
+
var c = this.toRgb(), l = Infinity, u = "black";
|
|
596
596
|
if (!a.length) for (var d in n) a[d] = new e(n[d]).toRgb();
|
|
597
597
|
for (var f in n) {
|
|
598
598
|
var p = (i = c, o = a[f], (i.r - o.r) ** 2 + (i.g - o.g) ** 2 + (i.b - o.b) ** 2);
|
|
@@ -606,11 +606,11 @@ function pe(e, t) {
|
|
|
606
606
|
}, "name"]);
|
|
607
607
|
}
|
|
608
608
|
//#endregion
|
|
609
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
609
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/color/Color.mjs
|
|
610
610
|
fe([pe]);
|
|
611
611
|
var C = class e {
|
|
612
612
|
constructor(e = 16777215) {
|
|
613
|
-
this._value = null, this._components =
|
|
613
|
+
this._value = null, this._components = new Float32Array(4), this._components.fill(1), this._int = 16777215, this.value = e;
|
|
614
614
|
}
|
|
615
615
|
get red() {
|
|
616
616
|
return this._components[0];
|
|
@@ -642,10 +642,10 @@ var C = class e {
|
|
|
642
642
|
let n = typeof e;
|
|
643
643
|
if (n !== typeof t) return !1;
|
|
644
644
|
if (n === "number" || n === "string" || e instanceof Number) return e === t;
|
|
645
|
-
if (Array.isArray(e) && Array.isArray(t) || ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) return e.length === t.length
|
|
645
|
+
if (Array.isArray(e) && Array.isArray(t) || ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) return e.length === t.length ? e.every((e, n) => e === t[n]) : !1;
|
|
646
646
|
if (e !== null && t !== null) {
|
|
647
647
|
let n = Object.keys(e), r = Object.keys(t);
|
|
648
|
-
return n.length === r.length
|
|
648
|
+
return n.length === r.length ? n.every((n) => e[n] === t[n]) : !1;
|
|
649
649
|
}
|
|
650
650
|
return e === t;
|
|
651
651
|
}
|
|
@@ -792,7 +792,7 @@ var me = C, he = {
|
|
|
792
792
|
return this.a = e, this.b = t, this.c = n, this.d = r, this.tx = i, this.ty = a, this;
|
|
793
793
|
}
|
|
794
794
|
toArray(e, t) {
|
|
795
|
-
this.array ||=
|
|
795
|
+
this.array ||= new Float32Array(9);
|
|
796
796
|
let n = t || this.array;
|
|
797
797
|
return e ? (n[0] = this.a, n[1] = this.b, n[2] = 0, n[3] = this.c, n[4] = this.d, n[5] = 0, n[6] = this.tx, n[7] = this.ty, n[8] = 1) : (n[0] = this.a, n[1] = this.c, n[2] = this.tx, n[3] = this.b, n[4] = this.d, n[5] = this.ty, n[6] = 0, n[7] = 0, n[8] = 1), n;
|
|
798
798
|
}
|
|
@@ -910,7 +910,7 @@ function D(e = "default") {
|
|
|
910
910
|
return Se[e] === void 0 && (Se[e] = -1), ++Se[e];
|
|
911
911
|
}
|
|
912
912
|
//#endregion
|
|
913
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
913
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/logging/deprecation.mjs
|
|
914
914
|
var Ce = /* @__PURE__ */ new Set(), O = "8.0.0", we = "8.3.4", k = {
|
|
915
915
|
quiet: !1,
|
|
916
916
|
noColor: !1
|
|
@@ -939,14 +939,14 @@ Object.defineProperties(A, {
|
|
|
939
939
|
}
|
|
940
940
|
});
|
|
941
941
|
//#endregion
|
|
942
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
942
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/logging/warn.mjs
|
|
943
943
|
var Te = 0, Ee = 500;
|
|
944
|
-
function
|
|
944
|
+
function j(...e) {
|
|
945
945
|
Te !== Ee && (Te++, Te === Ee ? console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS.") : console.warn("PixiJS Warning: ", ...e));
|
|
946
946
|
}
|
|
947
947
|
//#endregion
|
|
948
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
949
|
-
var
|
|
948
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/pool/GlobalResourceRegistry.mjs
|
|
949
|
+
var De = {
|
|
950
950
|
_registeredResources: /* @__PURE__ */ new Set(),
|
|
951
951
|
register(e) {
|
|
952
952
|
this._registeredResources.add(e);
|
|
@@ -966,7 +966,7 @@ var Oe = {
|
|
|
966
966
|
reset() {
|
|
967
967
|
this._registeredResources.clear();
|
|
968
968
|
}
|
|
969
|
-
},
|
|
969
|
+
}, Oe = class {
|
|
970
970
|
constructor(e, t) {
|
|
971
971
|
this._pool = [], this._count = 0, this._index = 0, this._classType = e, t && this.prepopulate(t);
|
|
972
972
|
}
|
|
@@ -994,7 +994,7 @@ var Oe = {
|
|
|
994
994
|
if (this._pool.length > 0 && this._pool[0].destroy) for (let e = 0; e < this._index; e++) this._pool[e].destroy();
|
|
995
995
|
this._pool.length = 0, this._count = 0, this._index = 0;
|
|
996
996
|
}
|
|
997
|
-
},
|
|
997
|
+
}, M = new class {
|
|
998
998
|
constructor() {
|
|
999
999
|
this._poolsByClass = /* @__PURE__ */ new Map();
|
|
1000
1000
|
}
|
|
@@ -1008,7 +1008,7 @@ var Oe = {
|
|
|
1008
1008
|
this.getPool(e.constructor).return(e);
|
|
1009
1009
|
}
|
|
1010
1010
|
getPool(e) {
|
|
1011
|
-
return this._poolsByClass.has(e) || this._poolsByClass.set(e, new
|
|
1011
|
+
return this._poolsByClass.has(e) || this._poolsByClass.set(e, new Oe(e)), this._poolsByClass.get(e);
|
|
1012
1012
|
}
|
|
1013
1013
|
stats() {
|
|
1014
1014
|
let e = {};
|
|
@@ -1025,10 +1025,10 @@ var Oe = {
|
|
|
1025
1025
|
this._poolsByClass.forEach((e) => e.clear()), this._poolsByClass.clear();
|
|
1026
1026
|
}
|
|
1027
1027
|
}();
|
|
1028
|
-
|
|
1028
|
+
De.register(M);
|
|
1029
1029
|
//#endregion
|
|
1030
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1031
|
-
var
|
|
1030
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/container-mixins/cacheAsTextureMixin.mjs
|
|
1031
|
+
var ke = {
|
|
1032
1032
|
get isCachedAsTexture() {
|
|
1033
1033
|
return !!this.renderGroup?.isCachedAsTexture;
|
|
1034
1034
|
},
|
|
@@ -1046,8 +1046,8 @@ var Ae = {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
};
|
|
1048
1048
|
//#endregion
|
|
1049
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1050
|
-
function
|
|
1049
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/data/removeItems.mjs
|
|
1050
|
+
function Ae(e, t, n) {
|
|
1051
1051
|
let r = e.length, i;
|
|
1052
1052
|
if (t >= r || n === 0) return;
|
|
1053
1053
|
n = t + n > r ? r - t : n;
|
|
@@ -1056,8 +1056,8 @@ function je(e, t, n) {
|
|
|
1056
1056
|
e.length = a;
|
|
1057
1057
|
}
|
|
1058
1058
|
//#endregion
|
|
1059
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1060
|
-
var
|
|
1059
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/container-mixins/childrenHelperMixin.mjs
|
|
1060
|
+
var je = {
|
|
1061
1061
|
allowChildren: !0,
|
|
1062
1062
|
removeChildren(e = 0, t) {
|
|
1063
1063
|
let n = t ?? this.children.length, r = n - e, i = [];
|
|
@@ -1066,7 +1066,7 @@ var Me = {
|
|
|
1066
1066
|
let e = this.children[t];
|
|
1067
1067
|
e && (i.push(e), e.parent = null);
|
|
1068
1068
|
}
|
|
1069
|
-
|
|
1069
|
+
Ae(this.children, e, n);
|
|
1070
1070
|
let t = this.renderGroup || this.parentRenderGroup;
|
|
1071
1071
|
t && t.removeChildren(i);
|
|
1072
1072
|
for (let e = 0; e < i.length; ++e) {
|
|
@@ -1074,8 +1074,7 @@ var Me = {
|
|
|
1074
1074
|
t.parentRenderLayer?.detach(t), this.emit("childRemoved", t, this, e), i[e].emit("removed", this);
|
|
1075
1075
|
}
|
|
1076
1076
|
return i.length > 0 && this._didViewChangeTick++, i;
|
|
1077
|
-
}
|
|
1078
|
-
if (r === 0 && this.children.length === 0) return i;
|
|
1077
|
+
} else if (r === 0 && this.children.length === 0) return i;
|
|
1079
1078
|
throw RangeError("removeChildren: numeric values are outside the acceptable range.");
|
|
1080
1079
|
},
|
|
1081
1080
|
removeChildAt(e) {
|
|
@@ -1107,9 +1106,9 @@ var Me = {
|
|
|
1107
1106
|
e.parent.children.splice(n, 1);
|
|
1108
1107
|
} else e.removeFromParent();
|
|
1109
1108
|
}
|
|
1110
|
-
t === n.length ? n.push(e) : n.splice(t, 0, e)
|
|
1109
|
+
t === n.length ? n.push(e) : n.splice(t, 0, e);
|
|
1111
1110
|
let i = this.renderGroup || this.parentRenderGroup;
|
|
1112
|
-
return
|
|
1111
|
+
return this.sortableChildren && (this.sortDirty = !0), r ? (i && (i.structureDidChange = !0), e) : (e.parent = this, e.didChange = !0, e._updateFlags = 15, i && i.addChild(e), this.emit("childAdded", e, this, t), e.emit("added", this), e);
|
|
1113
1112
|
},
|
|
1114
1113
|
swapChildren(e, t) {
|
|
1115
1114
|
if (e === t) return;
|
|
@@ -1134,7 +1133,7 @@ var Me = {
|
|
|
1134
1133
|
replaceChild(e, t) {
|
|
1135
1134
|
e.updateLocalTransform(), this.addChildAt(t, this.getChildIndex(e)), t.setFromMatrix(e.localTransform), t.updateLocalTransform(), this.removeChild(e);
|
|
1136
1135
|
}
|
|
1137
|
-
},
|
|
1136
|
+
}, Me = {
|
|
1138
1137
|
collectRenderables(e, t, n) {
|
|
1139
1138
|
this.parentRenderLayer && this.parentRenderLayer !== n || this.globalDisplayStatus < 7 || !this.includeInBuild || (this.sortableChildren && this.sortChildren(), this.isSimple ? this.collectRenderablesSimple(e, t, n) : this.renderGroup ? t.renderPipes.renderGroup.addRenderGroup(this.renderGroup, e) : this.collectRenderablesWithEffects(e, t, n));
|
|
1140
1139
|
},
|
|
@@ -1154,7 +1153,7 @@ var Me = {
|
|
|
1154
1153
|
r[n.pipe].pop(n, this, e);
|
|
1155
1154
|
}
|
|
1156
1155
|
}
|
|
1157
|
-
},
|
|
1156
|
+
}, Ne = class {
|
|
1158
1157
|
constructor() {
|
|
1159
1158
|
this.pipe = "filter", this.priority = 1;
|
|
1160
1159
|
}
|
|
@@ -1162,7 +1161,7 @@ var Me = {
|
|
|
1162
1161
|
for (let e = 0; e < this.filters.length; e++) this.filters[e].destroy();
|
|
1163
1162
|
this.filters = null, this.filterArea = null;
|
|
1164
1163
|
}
|
|
1165
|
-
},
|
|
1164
|
+
}, Pe = new class {
|
|
1166
1165
|
constructor() {
|
|
1167
1166
|
this._effectClasses = [], this._tests = [], this._initialized = !1;
|
|
1168
1167
|
}
|
|
@@ -1181,18 +1180,18 @@ var Me = {
|
|
|
1181
1180
|
this._initialized || this.init();
|
|
1182
1181
|
for (let t = 0; t < this._tests.length; t++) {
|
|
1183
1182
|
let n = this._tests[t];
|
|
1184
|
-
if (n.test(e)) return
|
|
1183
|
+
if (n.test(e)) return M.get(n.maskClass, e);
|
|
1185
1184
|
}
|
|
1186
1185
|
return e;
|
|
1187
1186
|
}
|
|
1188
1187
|
returnMaskEffect(e) {
|
|
1189
|
-
|
|
1188
|
+
M.return(e);
|
|
1190
1189
|
}
|
|
1191
1190
|
}();
|
|
1192
|
-
a.handleByList(n.MaskEffect,
|
|
1191
|
+
a.handleByList(n.MaskEffect, Pe._effectClasses);
|
|
1193
1192
|
//#endregion
|
|
1194
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1195
|
-
var
|
|
1193
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/container-mixins/effectsMixin.mjs
|
|
1194
|
+
var Fe = {
|
|
1196
1195
|
_maskEffect: null,
|
|
1197
1196
|
_maskOptions: {
|
|
1198
1197
|
inverse: !1,
|
|
@@ -1213,7 +1212,7 @@ var Ie = {
|
|
|
1213
1212
|
},
|
|
1214
1213
|
set mask(e) {
|
|
1215
1214
|
let t = this._maskEffect;
|
|
1216
|
-
t?.mask !== e && (t && (this.removeEffect(t),
|
|
1215
|
+
t?.mask !== e && (t && (this.removeEffect(t), Pe.returnMaskEffect(t), this._maskEffect = null), e != null && (this._maskEffect = Pe.getMaskEffect(e), this.addEffect(this._maskEffect)));
|
|
1217
1216
|
},
|
|
1218
1217
|
get mask() {
|
|
1219
1218
|
return this._maskEffect?.mask;
|
|
@@ -1226,7 +1225,7 @@ var Ie = {
|
|
|
1226
1225
|
},
|
|
1227
1226
|
set filters(e) {
|
|
1228
1227
|
!Array.isArray(e) && e && (e = [e]);
|
|
1229
|
-
let t = this._filterEffect ||= new
|
|
1228
|
+
let t = this._filterEffect ||= new Ne();
|
|
1230
1229
|
e = e;
|
|
1231
1230
|
let n = e?.length > 0, r = n !== t.filters?.length > 0;
|
|
1232
1231
|
e = Array.isArray(e) ? e.slice(0) : e, t.filters = Object.freeze(e), r && (n ? this.addEffect(t) : (this.removeEffect(t), t.filters = e ?? null));
|
|
@@ -1235,12 +1234,12 @@ var Ie = {
|
|
|
1235
1234
|
return this._filterEffect?.filters;
|
|
1236
1235
|
},
|
|
1237
1236
|
set filterArea(e) {
|
|
1238
|
-
this._filterEffect ||= new
|
|
1237
|
+
this._filterEffect ||= new Ne(), this._filterEffect.filterArea = e;
|
|
1239
1238
|
},
|
|
1240
1239
|
get filterArea() {
|
|
1241
1240
|
return this._filterEffect?.filterArea;
|
|
1242
1241
|
}
|
|
1243
|
-
},
|
|
1242
|
+
}, Ie = {
|
|
1244
1243
|
label: null,
|
|
1245
1244
|
get name() {
|
|
1246
1245
|
return A(O, "Container.name property has been removed, use Container.label instead"), this.label;
|
|
@@ -1272,12 +1271,12 @@ var Ie = {
|
|
|
1272
1271
|
if (t) for (let t = 0; t < r.length; t++) r[t].getChildrenByLabel(e, !0, n);
|
|
1273
1272
|
return n;
|
|
1274
1273
|
}
|
|
1275
|
-
},
|
|
1274
|
+
}, Le = [
|
|
1276
1275
|
new w(),
|
|
1277
1276
|
new w(),
|
|
1278
1277
|
new w(),
|
|
1279
1278
|
new w()
|
|
1280
|
-
],
|
|
1279
|
+
], Re = class e {
|
|
1281
1280
|
constructor(e = 0, t = 0, n = 0, r = 0) {
|
|
1282
1281
|
this.type = "rectangle", this.x = Number(e), this.y = Number(t), this.width = Number(n), this.height = Number(r);
|
|
1283
1282
|
}
|
|
@@ -1329,7 +1328,7 @@ var Ie = {
|
|
|
1329
1328
|
}
|
|
1330
1329
|
let n = this.left, r = this.right, i = this.top, a = this.bottom;
|
|
1331
1330
|
if (r <= n || a <= i) return !1;
|
|
1332
|
-
let o =
|
|
1331
|
+
let o = Le[0].set(e.left, e.top), s = Le[1].set(e.left, e.bottom), c = Le[2].set(e.right, e.top), l = Le[3].set(e.right, e.bottom);
|
|
1333
1332
|
if (c.x <= o.x || s.y <= o.y) return !1;
|
|
1334
1333
|
let u = Math.sign(t.a * t.d - t.b * t.c);
|
|
1335
1334
|
if (u === 0 || (t.apply(o, o), t.apply(s, s), t.apply(c, c), t.apply(l, l), Math.max(o.x, s.x, c.x, l.x) <= n || Math.min(o.x, s.x, c.x, l.x) >= r || Math.max(o.y, s.y, c.y, l.y) <= i || Math.min(o.y, s.y, c.y, l.y) >= a)) return !1;
|
|
@@ -1362,7 +1361,7 @@ var Ie = {
|
|
|
1362
1361
|
containsRect(e) {
|
|
1363
1362
|
if (this.width <= 0 || this.height <= 0) return !1;
|
|
1364
1363
|
let t = e.x, n = e.y, r = e.x + e.width, i = e.y + e.height;
|
|
1365
|
-
return t >= this.x && t < this.x + this.width && n >= this.y && n < this.y + this.height && r >= this.x && r
|
|
1364
|
+
return t >= this.x && t < this.x + this.width && n >= this.y && n < this.y + this.height && r >= this.x && r <= this.x + this.width && i >= this.y && i <= this.y + this.height;
|
|
1366
1365
|
}
|
|
1367
1366
|
set(e, t, n, r) {
|
|
1368
1367
|
return this.x = e, this.y = t, this.width = n, this.height = r, this;
|
|
@@ -1370,20 +1369,20 @@ var Ie = {
|
|
|
1370
1369
|
toString() {
|
|
1371
1370
|
return `[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`;
|
|
1372
1371
|
}
|
|
1373
|
-
},
|
|
1372
|
+
}, ze = new T(), N = class e {
|
|
1374
1373
|
constructor(e = Infinity, t = Infinity, n = -Infinity, r = -Infinity) {
|
|
1375
|
-
this.minX = Infinity, this.minY = Infinity, this.maxX = -Infinity, this.maxY = -Infinity, this.matrix =
|
|
1374
|
+
this.minX = Infinity, this.minY = Infinity, this.maxX = -Infinity, this.maxY = -Infinity, this.matrix = ze, this.minX = e, this.minY = t, this.maxX = n, this.maxY = r;
|
|
1376
1375
|
}
|
|
1377
1376
|
isEmpty() {
|
|
1378
1377
|
return this.minX > this.maxX || this.minY > this.maxY;
|
|
1379
1378
|
}
|
|
1380
1379
|
get rectangle() {
|
|
1381
|
-
this._rectangle ||= new
|
|
1380
|
+
this._rectangle ||= new Re();
|
|
1382
1381
|
let e = this._rectangle;
|
|
1383
1382
|
return this.minX > this.maxX || this.minY > this.maxY ? (e.x = 0, e.y = 0, e.width = 0, e.height = 0) : e.copyFromBounds(this), e;
|
|
1384
1383
|
}
|
|
1385
1384
|
clear() {
|
|
1386
|
-
return this.minX = Infinity, this.minY = Infinity, this.maxX = -Infinity, this.maxY = -Infinity, this.matrix =
|
|
1385
|
+
return this.minX = Infinity, this.minY = Infinity, this.maxX = -Infinity, this.maxY = -Infinity, this.matrix = ze, this;
|
|
1387
1386
|
}
|
|
1388
1387
|
set(e, t, n, r) {
|
|
1389
1388
|
this.minX = e, this.minY = t, this.maxX = n, this.maxY = r;
|
|
@@ -1487,9 +1486,9 @@ var Ie = {
|
|
|
1487
1486
|
copyFrom(e) {
|
|
1488
1487
|
return this.minX = e.minX, this.minY = e.minY, this.maxX = e.maxX, this.maxY = e.maxY, this;
|
|
1489
1488
|
}
|
|
1490
|
-
},
|
|
1489
|
+
}, P = M.getPool(T), F = M.getPool(N), Be = new T(), Ve = {
|
|
1491
1490
|
getFastGlobalBounds(e, t) {
|
|
1492
|
-
t ||= new
|
|
1491
|
+
t ||= new N(), t.clear(), this._getGlobalBoundsRecursive(!!e, t, this.parentRenderLayer), t.isValid || t.set(0, 0, 0, 0);
|
|
1493
1492
|
let n = this.renderGroup || this.parentRenderGroup;
|
|
1494
1493
|
return t.applyMatrix(n.worldTransform), t;
|
|
1495
1494
|
},
|
|
@@ -1497,7 +1496,7 @@ var Ie = {
|
|
|
1497
1496
|
let r = t;
|
|
1498
1497
|
if (e && this.parentRenderLayer && this.parentRenderLayer !== n || this.localDisplayStatus !== 7 || !this.measurable) return;
|
|
1499
1498
|
let i = !!this.effects.length;
|
|
1500
|
-
if ((this.renderGroup || i) && (r =
|
|
1499
|
+
if ((this.renderGroup || i) && (r = F.get().clear()), this.boundsArea) t.addRect(this.boundsArea, this.worldTransform);
|
|
1501
1500
|
else {
|
|
1502
1501
|
if (this.renderPipeId) {
|
|
1503
1502
|
let e = this.bounds;
|
|
@@ -1509,58 +1508,58 @@ var Ie = {
|
|
|
1509
1508
|
if (i) {
|
|
1510
1509
|
let e = !1, n = this.renderGroup || this.parentRenderGroup;
|
|
1511
1510
|
for (let t = 0; t < this.effects.length; t++) this.effects[t].addBounds && (e || (e = !0, r.applyMatrix(n.worldTransform)), this.effects[t].addBounds(r, !0));
|
|
1512
|
-
e && r.applyMatrix(n.worldTransform.copyTo(
|
|
1513
|
-
} else this.renderGroup && (t.addBounds(r, this.relativeGroupTransform),
|
|
1511
|
+
e && r.applyMatrix(n.worldTransform.copyTo(Be).invert()), t.addBounds(r), F.return(r);
|
|
1512
|
+
} else this.renderGroup && (t.addBounds(r, this.relativeGroupTransform), F.return(r));
|
|
1514
1513
|
}
|
|
1515
1514
|
};
|
|
1516
1515
|
//#endregion
|
|
1517
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1518
|
-
function
|
|
1516
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/bounds/getGlobalBounds.mjs
|
|
1517
|
+
function He(e, t, n) {
|
|
1519
1518
|
n.clear();
|
|
1520
1519
|
let r, i;
|
|
1521
|
-
return e.parent ? t ? r = e.parent.worldTransform : (i =
|
|
1520
|
+
return e.parent ? t ? r = e.parent.worldTransform : (i = P.get().identity(), r = We(e, i)) : r = T.IDENTITY, Ue(e, n, r, t), i && P.return(i), n.isValid || n.set(0, 0, 0, 0), n;
|
|
1522
1521
|
}
|
|
1523
|
-
function
|
|
1522
|
+
function Ue(e, t, n, r) {
|
|
1524
1523
|
if (!e.visible || !e.measurable) return;
|
|
1525
1524
|
let i;
|
|
1526
|
-
r ? i = e.worldTransform : (e.updateLocalTransform(), i =
|
|
1525
|
+
r ? i = e.worldTransform : (e.updateLocalTransform(), i = P.get(), i.appendFrom(e.localTransform, n));
|
|
1527
1526
|
let a = t, o = !!e.effects.length;
|
|
1528
|
-
if (o && (t =
|
|
1527
|
+
if (o && (t = F.get().clear()), e.boundsArea) t.addRect(e.boundsArea, i);
|
|
1529
1528
|
else {
|
|
1530
1529
|
let n = e.bounds;
|
|
1531
1530
|
n && !n.isEmpty() && (t.matrix = i, t.addBounds(n));
|
|
1532
|
-
for (let n = 0; n < e.children.length; n++)
|
|
1531
|
+
for (let n = 0; n < e.children.length; n++) Ue(e.children[n], t, i, r);
|
|
1533
1532
|
}
|
|
1534
1533
|
if (o) {
|
|
1535
1534
|
for (let n = 0; n < e.effects.length; n++) e.effects[n].addBounds?.(t);
|
|
1536
|
-
a.addBounds(t, T.IDENTITY),
|
|
1535
|
+
a.addBounds(t, T.IDENTITY), F.return(t);
|
|
1537
1536
|
}
|
|
1538
|
-
r ||
|
|
1537
|
+
r || P.return(i);
|
|
1539
1538
|
}
|
|
1540
|
-
function
|
|
1539
|
+
function We(e, t) {
|
|
1541
1540
|
let n = e.parent;
|
|
1542
|
-
return n && (
|
|
1541
|
+
return n && (We(n, t), n.updateLocalTransform(), t.append(n.localTransform)), t;
|
|
1543
1542
|
}
|
|
1544
1543
|
//#endregion
|
|
1545
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1546
|
-
function
|
|
1544
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/multiplyHexColors.mjs
|
|
1545
|
+
function Ge(e, t) {
|
|
1547
1546
|
if (e === 16777215 || !t) return t;
|
|
1548
1547
|
if (t === 16777215 || !e) return e;
|
|
1549
1548
|
let n = e >> 16 & 255, r = e >> 8 & 255, i = e & 255, a = t >> 16 & 255, o = t >> 8 & 255, s = t & 255, c = n * a / 255 | 0, l = r * o / 255 | 0, u = i * s / 255 | 0;
|
|
1550
1549
|
return (c << 16) + (l << 8) + u;
|
|
1551
1550
|
}
|
|
1552
1551
|
//#endregion
|
|
1553
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1554
|
-
var
|
|
1555
|
-
function
|
|
1556
|
-
return e ===
|
|
1552
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/multiplyColors.mjs
|
|
1553
|
+
var Ke = 16777215;
|
|
1554
|
+
function qe(e, t) {
|
|
1555
|
+
return e === Ke ? t : t === Ke ? e : Ge(e, t);
|
|
1557
1556
|
}
|
|
1558
1557
|
//#endregion
|
|
1559
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1560
|
-
function
|
|
1558
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/container-mixins/getGlobalMixin.mjs
|
|
1559
|
+
function I(e) {
|
|
1561
1560
|
return ((e & 255) << 16) + (e & 65280) + (e >> 16 & 255);
|
|
1562
1561
|
}
|
|
1563
|
-
var
|
|
1562
|
+
var Je = {
|
|
1564
1563
|
getGlobalAlpha(e) {
|
|
1565
1564
|
if (e) return this.renderGroup ? this.renderGroup.worldAlpha : this.parentRenderGroup ? this.parentRenderGroup.worldAlpha * this.alpha : this.alpha;
|
|
1566
1565
|
let t = this.alpha, n = this.parent;
|
|
@@ -1570,56 +1569,56 @@ var Ye = {
|
|
|
1570
1569
|
getGlobalTransform(e = new T(), t) {
|
|
1571
1570
|
if (t) return e.copyFrom(this.worldTransform);
|
|
1572
1571
|
this.updateLocalTransform();
|
|
1573
|
-
let n =
|
|
1574
|
-
return e.appendFrom(this.localTransform, n),
|
|
1572
|
+
let n = We(this, P.get().identity());
|
|
1573
|
+
return e.appendFrom(this.localTransform, n), P.return(n), e;
|
|
1575
1574
|
},
|
|
1576
1575
|
getGlobalTint(e) {
|
|
1577
|
-
if (e) return this.renderGroup ?
|
|
1576
|
+
if (e) return this.renderGroup ? I(this.renderGroup.worldColor) : this.parentRenderGroup ? I(qe(this.localColor, this.parentRenderGroup.worldColor)) : this.tint;
|
|
1578
1577
|
let t = this.localColor, n = this.parent;
|
|
1579
|
-
for (; n;) t =
|
|
1580
|
-
return
|
|
1578
|
+
for (; n;) t = qe(t, n.localColor), n = n.parent;
|
|
1579
|
+
return I(t);
|
|
1581
1580
|
}
|
|
1582
1581
|
};
|
|
1583
1582
|
//#endregion
|
|
1584
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1585
|
-
function
|
|
1586
|
-
return t.clear(), n ||= T.IDENTITY,
|
|
1583
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/bounds/getLocalBounds.mjs
|
|
1584
|
+
function Ye(e, t, n) {
|
|
1585
|
+
return t.clear(), n ||= T.IDENTITY, Xe(e, t, n, e, !0), t.isValid || t.set(0, 0, 0, 0), t;
|
|
1587
1586
|
}
|
|
1588
|
-
function
|
|
1587
|
+
function Xe(e, t, n, r, i) {
|
|
1589
1588
|
let a;
|
|
1590
|
-
if (i) a =
|
|
1589
|
+
if (i) a = P.get(), a = n.copyTo(a);
|
|
1591
1590
|
else {
|
|
1592
1591
|
if (!e.visible || !e.measurable) return;
|
|
1593
1592
|
e.updateLocalTransform();
|
|
1594
1593
|
let t = e.localTransform;
|
|
1595
|
-
a =
|
|
1594
|
+
a = P.get(), a.appendFrom(t, n);
|
|
1596
1595
|
}
|
|
1597
1596
|
let o = t, s = !!e.effects.length;
|
|
1598
|
-
if (s && (t =
|
|
1597
|
+
if (s && (t = F.get().clear()), e.boundsArea) t.addRect(e.boundsArea, a);
|
|
1599
1598
|
else {
|
|
1600
1599
|
e.renderPipeId && (t.matrix = a, t.addBounds(e.bounds));
|
|
1601
1600
|
let n = e.children;
|
|
1602
|
-
for (let e = 0; e < n.length; e++)
|
|
1601
|
+
for (let e = 0; e < n.length; e++) Xe(n[e], t, a, r, !1);
|
|
1603
1602
|
}
|
|
1604
1603
|
if (s) {
|
|
1605
1604
|
for (let n = 0; n < e.effects.length; n++) e.effects[n].addLocalBounds?.(t, r);
|
|
1606
|
-
o.addBounds(t, T.IDENTITY),
|
|
1605
|
+
o.addBounds(t, T.IDENTITY), F.return(t);
|
|
1607
1606
|
}
|
|
1608
|
-
|
|
1607
|
+
P.return(a);
|
|
1609
1608
|
}
|
|
1610
1609
|
//#endregion
|
|
1611
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1612
|
-
function
|
|
1610
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/checkChildrenDidChange.mjs
|
|
1611
|
+
function Ze(e, t) {
|
|
1613
1612
|
let n = e.children;
|
|
1614
1613
|
for (let e = 0; e < n.length; e++) {
|
|
1615
1614
|
let r = n[e], i = r.uid, a = (r._didViewChangeTick & 65535) << 16 | r._didContainerChangeTick & 65535, o = t.index;
|
|
1616
|
-
(t.data[o] !== i || t.data[o + 1] !== a) && (t.data[t.index] = i, t.data[t.index + 1] = a, t.didChange = !0), t.index = o + 2, r.children.length &&
|
|
1615
|
+
(t.data[o] !== i || t.data[o + 1] !== a) && (t.data[t.index] = i, t.data[t.index + 1] = a, t.didChange = !0), t.index = o + 2, r.children.length && Ze(r, t);
|
|
1617
1616
|
}
|
|
1618
1617
|
return t.didChange;
|
|
1619
1618
|
}
|
|
1620
1619
|
//#endregion
|
|
1621
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1622
|
-
var
|
|
1620
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/container-mixins/measureMixin.mjs
|
|
1621
|
+
var Qe = new T(), $e = {
|
|
1623
1622
|
_localBoundsCacheId: -1,
|
|
1624
1623
|
_localBoundsCacheData: null,
|
|
1625
1624
|
_setWidth(e, t) {
|
|
@@ -1635,15 +1634,15 @@ var $e = new T(), et = {
|
|
|
1635
1634
|
data: [],
|
|
1636
1635
|
index: 1,
|
|
1637
1636
|
didChange: !1,
|
|
1638
|
-
localBounds: new
|
|
1637
|
+
localBounds: new N()
|
|
1639
1638
|
};
|
|
1640
1639
|
let e = this._localBoundsCacheData;
|
|
1641
|
-
return e.index = 1, e.didChange = !1, e.data[0] !== this._didViewChangeTick && (e.didChange = !0, e.data[0] = this._didViewChangeTick),
|
|
1640
|
+
return e.index = 1, e.didChange = !1, e.data[0] !== this._didViewChangeTick && (e.didChange = !0, e.data[0] = this._didViewChangeTick), Ze(this, e), e.didChange && Ye(this, e.localBounds, Qe), e.localBounds;
|
|
1642
1641
|
},
|
|
1643
1642
|
getBounds(e, t) {
|
|
1644
|
-
return
|
|
1643
|
+
return He(this, e, t || new N());
|
|
1645
1644
|
}
|
|
1646
|
-
},
|
|
1645
|
+
}, et = {
|
|
1647
1646
|
_onRender: null,
|
|
1648
1647
|
set onRender(e) {
|
|
1649
1648
|
let t = this.renderGroup || this.parentRenderGroup;
|
|
@@ -1656,7 +1655,7 @@ var $e = new T(), et = {
|
|
|
1656
1655
|
get onRender() {
|
|
1657
1656
|
return this._onRender;
|
|
1658
1657
|
}
|
|
1659
|
-
},
|
|
1658
|
+
}, tt = {
|
|
1660
1659
|
_zIndex: 0,
|
|
1661
1660
|
sortDirty: !1,
|
|
1662
1661
|
sortableChildren: !1,
|
|
@@ -1670,28 +1669,28 @@ var $e = new T(), et = {
|
|
|
1670
1669
|
this.parent && (this.parent.sortableChildren = !0, this.parent.sortDirty = !0), this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0);
|
|
1671
1670
|
},
|
|
1672
1671
|
sortChildren() {
|
|
1673
|
-
this.sortDirty && (this.sortDirty = !1, this.children.sort(
|
|
1672
|
+
this.sortDirty && (this.sortDirty = !1, this.children.sort(nt));
|
|
1674
1673
|
}
|
|
1675
1674
|
};
|
|
1676
|
-
function
|
|
1675
|
+
function nt(e, t) {
|
|
1677
1676
|
return e._zIndex - t._zIndex;
|
|
1678
1677
|
}
|
|
1679
1678
|
//#endregion
|
|
1680
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1681
|
-
var
|
|
1679
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/container-mixins/toLocalGlobalMixin.mjs
|
|
1680
|
+
var rt = {
|
|
1682
1681
|
getGlobalPosition(e = new w(), t = !1) {
|
|
1683
1682
|
return this.parent ? this.parent.toGlobal(this._position, e, t) : (e.x = this._position.x, e.y = this._position.y), e;
|
|
1684
1683
|
},
|
|
1685
1684
|
toGlobal(e, t, n = !1) {
|
|
1686
|
-
let r = this.getGlobalTransform(
|
|
1687
|
-
return t = r.apply(e, t),
|
|
1685
|
+
let r = this.getGlobalTransform(P.get(), n);
|
|
1686
|
+
return t = r.apply(e, t), P.return(r), t;
|
|
1688
1687
|
},
|
|
1689
1688
|
toLocal(e, t, n, r) {
|
|
1690
1689
|
t && (e = t.toGlobal(e, n, r));
|
|
1691
|
-
let i = this.getGlobalTransform(
|
|
1692
|
-
return n = i.applyInverse(e, n),
|
|
1690
|
+
let i = this.getGlobalTransform(P.get(), r);
|
|
1691
|
+
return n = i.applyInverse(e, n), P.return(i), n;
|
|
1693
1692
|
}
|
|
1694
|
-
},
|
|
1693
|
+
}, it = class {
|
|
1695
1694
|
constructor() {
|
|
1696
1695
|
this.uid = D("instructionSet"), this.instructions = [], this.instructionSize = 0, this.renderables = [], this.gcTick = 0;
|
|
1697
1696
|
}
|
|
@@ -1709,28 +1708,28 @@ var it = {
|
|
|
1709
1708
|
}
|
|
1710
1709
|
};
|
|
1711
1710
|
//#endregion
|
|
1712
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1713
|
-
function
|
|
1711
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/maths/misc/pow2.mjs
|
|
1712
|
+
function at(e) {
|
|
1714
1713
|
return e += +(e === 0), --e, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e + 1;
|
|
1715
1714
|
}
|
|
1716
|
-
function
|
|
1715
|
+
function ot(e) {
|
|
1717
1716
|
return !(e & e - 1) && !!e;
|
|
1718
1717
|
}
|
|
1719
1718
|
//#endregion
|
|
1720
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1721
|
-
function
|
|
1719
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/definedProps.mjs
|
|
1720
|
+
function st(e) {
|
|
1722
1721
|
let t = {};
|
|
1723
1722
|
for (let n in e) e[n] !== void 0 && (t[n] = e[n]);
|
|
1724
1723
|
return t;
|
|
1725
1724
|
}
|
|
1726
1725
|
//#endregion
|
|
1727
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
1728
|
-
var
|
|
1729
|
-
function
|
|
1730
|
-
let t =
|
|
1731
|
-
return t === void 0 && (
|
|
1726
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.mjs
|
|
1727
|
+
var ct = /* @__PURE__ */ Object.create(null);
|
|
1728
|
+
function lt(e) {
|
|
1729
|
+
let t = ct[e];
|
|
1730
|
+
return t === void 0 && (ct[e] = D("resource")), t;
|
|
1732
1731
|
}
|
|
1733
|
-
var
|
|
1732
|
+
var ut = class e extends o {
|
|
1734
1733
|
constructor(t = {}) {
|
|
1735
1734
|
super(), this._resourceType = "textureSampler", this._touched = 0, this._maxAnisotropy = 1, this.destroyed = !1, t = {
|
|
1736
1735
|
...e.defaultOptions,
|
|
@@ -1769,22 +1768,22 @@ var dt = class e extends o {
|
|
|
1769
1768
|
}
|
|
1770
1769
|
_generateResourceId() {
|
|
1771
1770
|
let e = `${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;
|
|
1772
|
-
return this._sharedResourceId =
|
|
1771
|
+
return this._sharedResourceId = lt(e), this._resourceId;
|
|
1773
1772
|
}
|
|
1774
1773
|
destroy() {
|
|
1775
1774
|
this.destroyed = !0, this.emit("destroy", this), this.emit("change", this), this.removeAllListeners();
|
|
1776
1775
|
}
|
|
1777
1776
|
};
|
|
1778
|
-
|
|
1777
|
+
ut.defaultOptions = {
|
|
1779
1778
|
addressMode: "clamp-to-edge",
|
|
1780
1779
|
scaleMode: "linear"
|
|
1781
1780
|
};
|
|
1782
|
-
var
|
|
1781
|
+
var dt = ut, ft = class e extends o {
|
|
1783
1782
|
constructor(t = {}) {
|
|
1784
|
-
super(), this.options = t, this._gpuData = /* @__PURE__ */ Object.create(null), this._gcLastUsed = -1, this.uid = D("textureSource"), this._resourceType = "textureSource", this._resourceId = D("resource"), this.uploadMethodId = "unknown", this._resolution = 1, this.pixelWidth = 1, this.pixelHeight = 1, this.width = 1, this.height = 1, this.sampleCount = 1, this.mipLevelCount = 1, this.autoGenerateMipmaps = !1, this.format = "rgba8unorm", this.dimension = "2d", this.viewDimension = "2d", this.arrayLayerCount = 1, this.antialias = !1, this.transient = !1, this._touched = 0, this._batchTick = -1, this._textureBindLocation = -1, t = {
|
|
1783
|
+
super(), this.options = t, this._gpuData = /* @__PURE__ */ Object.create(null), this._gcLastUsed = -1, this.uid = D("textureSource"), this._resourceType = "textureSource", this._resourceId = D("resource"), this.uploadMethodId = "unknown", this._resolution = 1, this.pixelWidth = 1, this.pixelHeight = 1, this.width = 1, this.height = 1, this.sampleCount = 1, this.mipLevelCount = 1, this.autoGenerateMipmaps = !1, this.format = "rgba8unorm", this.dimension = "2d", this.viewDimension = "2d", this.arrayLayerCount = 1, this._ownsStyle = !1, this.antialias = !1, this.transient = !1, this._touched = 0, this._batchTick = -1, this._textureBindLocation = -1, t = {
|
|
1785
1784
|
...e.defaultOptions,
|
|
1786
1785
|
...t
|
|
1787
|
-
}, this.label = t.label ?? "", this.resource = t.resource, this.autoGarbageCollect = t.autoGarbageCollect, this._resolution = t.resolution, this.pixelWidth = t.width
|
|
1786
|
+
}, this.label = t.label ?? "", this.resource = t.resource, this.autoGarbageCollect = t.autoGarbageCollect, this._resolution = t.resolution, t.width ? this.pixelWidth = t.width * this._resolution : this.pixelWidth = this.resource ? this.resourceWidth ?? 1 : 1, t.height ? this.pixelHeight = t.height * this._resolution : this.pixelHeight = this.resource ? this.resourceHeight ?? 1 : 1, this.width = this.pixelWidth / this._resolution, this.height = this.pixelHeight / this._resolution, this.format = t.format, this.dimension = t.dimensions, this.viewDimension = t.viewDimension ?? t.dimensions, this.arrayLayerCount = t.arrayLayerCount, this.mipLevelCount = t.mipLevelCount, this.autoGenerateMipmaps = t.autoGenerateMipmaps, this.sampleCount = t.sampleCount, this.antialias = t.antialias, this.transient = t.transient ?? !1, this.alphaMode = t.alphaMode, this.style = new dt(st(t)), this._ownsStyle = !0, this.destroyed = !1, this._refreshPOT();
|
|
1788
1787
|
}
|
|
1789
1788
|
get source() {
|
|
1790
1789
|
return this;
|
|
@@ -1793,7 +1792,7 @@ var ft = dt, pt = class e extends o {
|
|
|
1793
1792
|
return this._style;
|
|
1794
1793
|
}
|
|
1795
1794
|
set style(e) {
|
|
1796
|
-
this.style !== e && (this._style?.off("change", this._onStyleChange, this), this._style = e, this._style?.on("change", this._onStyleChange, this), this._onStyleChange());
|
|
1795
|
+
this.style !== e && (this._ownsStyle = !1, this._style?.off("change", this._onStyleChange, this), this._style = e, this._style?.on("change", this._onStyleChange, this), this._onStyleChange());
|
|
1797
1796
|
}
|
|
1798
1797
|
set maxAnisotropy(e) {
|
|
1799
1798
|
this._style.maxAnisotropy = e;
|
|
@@ -1854,7 +1853,7 @@ var ft = dt, pt = class e extends o {
|
|
|
1854
1853
|
this.emit("update", this);
|
|
1855
1854
|
}
|
|
1856
1855
|
destroy() {
|
|
1857
|
-
this.destroyed = !0, this.unload(), this.emit("destroy", this), this._style &&= (this._style.destroy(), null), this.uploadMethodId = null, this.resource = null, this.removeAllListeners();
|
|
1856
|
+
this.destroyed = !0, this.unload(), this.emit("destroy", this), this._style &&= (this._ownsStyle && this._style.destroy(), null), this.uploadMethodId = null, this.resource = null, this.removeAllListeners();
|
|
1858
1857
|
}
|
|
1859
1858
|
unload() {
|
|
1860
1859
|
this._resourceId = D("resource"), this.emit("change", this), this.emit("unload", this);
|
|
@@ -1896,13 +1895,13 @@ var ft = dt, pt = class e extends o {
|
|
|
1896
1895
|
return this._style.scaleMode;
|
|
1897
1896
|
}
|
|
1898
1897
|
_refreshPOT() {
|
|
1899
|
-
this.isPowerOfTwo =
|
|
1898
|
+
this.isPowerOfTwo = ot(this.pixelWidth) && ot(this.pixelHeight);
|
|
1900
1899
|
}
|
|
1901
1900
|
static test(e) {
|
|
1902
1901
|
throw Error("Unimplemented");
|
|
1903
1902
|
}
|
|
1904
1903
|
};
|
|
1905
|
-
|
|
1904
|
+
ft.defaultOptions = {
|
|
1906
1905
|
resolution: 1,
|
|
1907
1906
|
format: "bgra8unorm",
|
|
1908
1907
|
alphaMode: "premultiply-alpha-on-upload",
|
|
@@ -1915,7 +1914,7 @@ pt.defaultOptions = {
|
|
|
1915
1914
|
antialias: !1,
|
|
1916
1915
|
autoGarbageCollect: !1
|
|
1917
1916
|
};
|
|
1918
|
-
var
|
|
1917
|
+
var L = ft, R = [
|
|
1919
1918
|
1,
|
|
1920
1919
|
1,
|
|
1921
1920
|
0,
|
|
@@ -1932,7 +1931,7 @@ var I = pt, L = [
|
|
|
1932
1931
|
-1,
|
|
1933
1932
|
0,
|
|
1934
1933
|
1
|
|
1935
|
-
],
|
|
1934
|
+
], z = [
|
|
1936
1935
|
0,
|
|
1937
1936
|
1,
|
|
1938
1937
|
1,
|
|
@@ -1949,7 +1948,7 @@ var I = pt, L = [
|
|
|
1949
1948
|
-1,
|
|
1950
1949
|
-1,
|
|
1951
1950
|
-1
|
|
1952
|
-
],
|
|
1951
|
+
], B = [
|
|
1953
1952
|
0,
|
|
1954
1953
|
-1,
|
|
1955
1954
|
-1,
|
|
@@ -1966,7 +1965,7 @@ var I = pt, L = [
|
|
|
1966
1965
|
-1,
|
|
1967
1966
|
-1,
|
|
1968
1967
|
-1
|
|
1969
|
-
],
|
|
1968
|
+
], V = [
|
|
1970
1969
|
1,
|
|
1971
1970
|
1,
|
|
1972
1971
|
0,
|
|
@@ -1983,14 +1982,14 @@ var I = pt, L = [
|
|
|
1983
1982
|
1,
|
|
1984
1983
|
0,
|
|
1985
1984
|
-1
|
|
1986
|
-
],
|
|
1987
|
-
function
|
|
1985
|
+
], pt = [], mt = [], H = Math.sign;
|
|
1986
|
+
function ht() {
|
|
1988
1987
|
for (let e = 0; e < 16; e++) {
|
|
1989
1988
|
let t = [];
|
|
1990
|
-
|
|
1989
|
+
pt.push(t);
|
|
1991
1990
|
for (let n = 0; n < 16; n++) {
|
|
1992
|
-
let r =
|
|
1993
|
-
for (let e = 0; e < 16; e++) if (
|
|
1991
|
+
let r = H(R[e] * R[n] + B[e] * z[n]), i = H(z[e] * R[n] + V[e] * z[n]), a = H(R[e] * B[n] + B[e] * V[n]), o = H(z[e] * B[n] + V[e] * V[n]);
|
|
1992
|
+
for (let e = 0; e < 16; e++) if (R[e] === r && z[e] === i && B[e] === a && V[e] === o) {
|
|
1994
1993
|
t.push(e);
|
|
1995
1994
|
break;
|
|
1996
1995
|
}
|
|
@@ -1998,11 +1997,11 @@ function gt() {
|
|
|
1998
1997
|
}
|
|
1999
1998
|
for (let e = 0; e < 16; e++) {
|
|
2000
1999
|
let t = new T();
|
|
2001
|
-
t.set(
|
|
2000
|
+
t.set(R[e], z[e], B[e], V[e], 0, 0), mt.push(t);
|
|
2002
2001
|
}
|
|
2003
2002
|
}
|
|
2004
|
-
|
|
2005
|
-
var
|
|
2003
|
+
ht();
|
|
2004
|
+
var U = {
|
|
2006
2005
|
E: 0,
|
|
2007
2006
|
SE: 1,
|
|
2008
2007
|
S: 2,
|
|
@@ -2015,25 +2014,25 @@ var H = {
|
|
|
2015
2014
|
MAIN_DIAGONAL: 10,
|
|
2016
2015
|
MIRROR_HORIZONTAL: 12,
|
|
2017
2016
|
REVERSE_DIAGONAL: 14,
|
|
2018
|
-
uX: (e) =>
|
|
2019
|
-
uY: (e) =>
|
|
2020
|
-
vX: (e) =>
|
|
2021
|
-
vY: (e) =>
|
|
2017
|
+
uX: (e) => R[e],
|
|
2018
|
+
uY: (e) => z[e],
|
|
2019
|
+
vX: (e) => B[e],
|
|
2020
|
+
vY: (e) => V[e],
|
|
2022
2021
|
inv: (e) => e & 8 ? e & 15 : -e & 7,
|
|
2023
|
-
add: (e, t) =>
|
|
2024
|
-
sub: (e, t) =>
|
|
2022
|
+
add: (e, t) => pt[e][t],
|
|
2023
|
+
sub: (e, t) => pt[e][U.inv(t)],
|
|
2025
2024
|
rotate180: (e) => e ^ 4,
|
|
2026
2025
|
isVertical: (e) => (e & 3) == 2,
|
|
2027
|
-
byDirection: (e, t) => Math.abs(e) * 2 <= Math.abs(t) ? t >= 0 ?
|
|
2026
|
+
byDirection: (e, t) => Math.abs(e) * 2 <= Math.abs(t) ? t >= 0 ? U.S : U.N : Math.abs(t) * 2 <= Math.abs(e) ? e > 0 ? U.E : U.W : t > 0 ? e > 0 ? U.SE : U.SW : e > 0 ? U.NE : U.NW,
|
|
2028
2027
|
matrixAppendRotationInv: (e, t, n = 0, r = 0, i = 0, a = 0) => {
|
|
2029
|
-
let o =
|
|
2028
|
+
let o = mt[U.inv(t)], s = o.a, c = o.b, l = o.c, u = o.d, d = n - Math.min(0, s * i, l * a, s * i + l * a), f = r - Math.min(0, c * i, u * a, c * i + u * a), p = e.a, m = e.b, h = e.c, g = e.d;
|
|
2030
2029
|
e.a = s * p + c * h, e.b = s * m + c * g, e.c = l * p + u * h, e.d = l * m + u * g, e.tx = d * p + f * h + e.tx, e.ty = d * m + f * g + e.ty;
|
|
2031
2030
|
},
|
|
2032
2031
|
transformRectCoords: (e, t, n, r) => {
|
|
2033
2032
|
let { x: i, y: a, width: o, height: s } = e, { x: c, y: l, width: u, height: d } = t;
|
|
2034
|
-
return n ===
|
|
2033
|
+
return n === U.E ? (r.set(i + c, a + l, o, s), r) : n === U.S ? r.set(u - a - s + c, i + l, s, o) : n === U.W ? r.set(u - i - o + c, d - a - s + l, o, s) : n === U.N ? r.set(a + c, d - i - o + l, s, o) : r.set(i + c, a + l, o, s);
|
|
2035
2034
|
}
|
|
2036
|
-
},
|
|
2035
|
+
}, gt = () => {}, _t = class extends L {
|
|
2037
2036
|
constructor(e) {
|
|
2038
2037
|
let t = e.resource || new Float32Array(e.width * e.height * 4), n = e.format;
|
|
2039
2038
|
n ||= t instanceof Float32Array ? "rgba32float" : t instanceof Int32Array || t instanceof Uint32Array ? "rgba32uint" : t instanceof Int16Array || t instanceof Uint16Array ? "rgba16uint" : (t instanceof Int8Array, "bgra8unorm"), super({
|
|
@@ -2046,12 +2045,12 @@ var H = {
|
|
|
2046
2045
|
return e instanceof Int8Array || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int16Array || e instanceof Uint16Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Float32Array;
|
|
2047
2046
|
}
|
|
2048
2047
|
};
|
|
2049
|
-
|
|
2048
|
+
_t.extension = n.TextureSource;
|
|
2050
2049
|
//#endregion
|
|
2051
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2052
|
-
var
|
|
2050
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.mjs
|
|
2051
|
+
var vt = new T(), yt = class {
|
|
2053
2052
|
constructor(e, t) {
|
|
2054
|
-
this.mapCoord = new T(), this.uClampFrame =
|
|
2053
|
+
this.mapCoord = new T(), this.uClampFrame = new Float32Array(4), this.uClampOffset = new Float32Array(2), this._updateID = 0, this.clampOffset = 0, t === void 0 ? this.clampMargin = e.width < 10 ? 0 : .5 : this.clampMargin = t, this.isSimple = !1, this.texture = e;
|
|
2055
2054
|
}
|
|
2056
2055
|
get texture() {
|
|
2057
2056
|
return this._texture;
|
|
@@ -2059,6 +2058,9 @@ var yt = new T(), bt = class {
|
|
|
2059
2058
|
set texture(e) {
|
|
2060
2059
|
this._texture !== e && (this._texture?.removeListener("update", this.update, this), this._texture = e, this._texture.addListener("update", this.update, this)), this.update();
|
|
2061
2060
|
}
|
|
2061
|
+
destroy() {
|
|
2062
|
+
this._texture?.removeListener("update", this.update, this), this._texture = null;
|
|
2063
|
+
}
|
|
2062
2064
|
multiplyUvs(e, t) {
|
|
2063
2065
|
t === void 0 && (t = e);
|
|
2064
2066
|
let n = this.mapCoord;
|
|
@@ -2074,11 +2076,11 @@ var yt = new T(), bt = class {
|
|
|
2074
2076
|
let t = e.uvs;
|
|
2075
2077
|
this.mapCoord.set(t.x1 - t.x0, t.y1 - t.y0, t.x3 - t.x0, t.y3 - t.y0, t.x0, t.y0);
|
|
2076
2078
|
let n = e.orig, r = e.trim;
|
|
2077
|
-
r && (
|
|
2079
|
+
r && (vt.set(n.width / r.width, 0, 0, n.height / r.height, -r.x / r.width, -r.y / r.height), this.mapCoord.append(vt));
|
|
2078
2080
|
let i = e.source, a = this.uClampFrame, o = this.clampMargin / i._resolution, s = this.clampOffset / i._resolution;
|
|
2079
2081
|
return a[0] = (e.frame.x + o + s) / i.width, a[1] = (e.frame.y + o + s) / i.height, a[2] = (e.frame.x + e.frame.width - o + s) / i.width, a[3] = (e.frame.y + e.frame.height - o + s) / i.height, this.uClampOffset[0] = this.clampOffset / i.pixelWidth, this.uClampOffset[1] = this.clampOffset / i.pixelHeight, this.isSimple = e.frame.width === i.width && e.frame.height === i.height && e.rotate === 0, !0;
|
|
2080
2082
|
}
|
|
2081
|
-
},
|
|
2083
|
+
}, W = class extends o {
|
|
2082
2084
|
constructor({ source: e, label: t, frame: n, orig: r, trim: i, defaultAnchor: a, defaultBorders: o, rotate: s, dynamic: c } = {}) {
|
|
2083
2085
|
if (super(), this.uid = D("texture"), this.uvs = {
|
|
2084
2086
|
x0: 0,
|
|
@@ -2089,7 +2091,7 @@ var yt = new T(), bt = class {
|
|
|
2089
2091
|
y2: 0,
|
|
2090
2092
|
x3: 0,
|
|
2091
2093
|
y3: 0
|
|
2092
|
-
}, this.frame = new
|
|
2094
|
+
}, this.frame = new Re(), this.noFrame = !1, this.dynamic = !1, this.isTexture = !0, this.label = t, this.source = e?.source ?? new L(), this.noFrame = !n, n) this.frame.copyFrom(n);
|
|
2093
2095
|
else {
|
|
2094
2096
|
let { width: e, height: t } = this._source;
|
|
2095
2097
|
this.frame.width = e, this.frame.height = t;
|
|
@@ -2103,7 +2105,7 @@ var yt = new T(), bt = class {
|
|
|
2103
2105
|
return this._source;
|
|
2104
2106
|
}
|
|
2105
2107
|
get textureMatrix() {
|
|
2106
|
-
return this._textureMatrix ||= new
|
|
2108
|
+
return this._textureMatrix ||= new yt(this), this._textureMatrix;
|
|
2107
2109
|
}
|
|
2108
2110
|
get width() {
|
|
2109
2111
|
return this.orig.width;
|
|
@@ -2115,7 +2117,7 @@ var yt = new T(), bt = class {
|
|
|
2115
2117
|
let { uvs: e, frame: t } = this, { width: n, height: r } = this._source, i = t.x / n, a = t.y / r, o = t.width / n, s = t.height / r, c = this.rotate;
|
|
2116
2118
|
if (c) {
|
|
2117
2119
|
let t = o / 2, n = s / 2, r = i + t, l = a + n;
|
|
2118
|
-
c =
|
|
2120
|
+
c = U.add(c, U.NW), e.x0 = r + t * U.uX(c), e.y0 = l + n * U.uY(c), c = U.add(c, 2), e.x1 = r + t * U.uX(c), e.y1 = l + n * U.uY(c), c = U.add(c, 2), e.x2 = r + t * U.uX(c), e.y2 = l + n * U.uY(c), c = U.add(c, 2), e.x3 = r + t * U.uX(c), e.y3 = l + n * U.uY(c);
|
|
2119
2121
|
} else e.x0 = i, e.y0 = a, e.x1 = i + o, e.y1 = a, e.x2 = i + o, e.y2 = a + s, e.x3 = i, e.y3 = a + s;
|
|
2120
2122
|
}
|
|
2121
2123
|
destroy(e = !1) {
|
|
@@ -2128,11 +2130,11 @@ var yt = new T(), bt = class {
|
|
|
2128
2130
|
return A(O, "Texture.baseTexture is now Texture.source"), this._source;
|
|
2129
2131
|
}
|
|
2130
2132
|
};
|
|
2131
|
-
|
|
2133
|
+
W.EMPTY = new W({
|
|
2132
2134
|
label: "EMPTY",
|
|
2133
|
-
source: new
|
|
2134
|
-
}),
|
|
2135
|
-
source: new
|
|
2135
|
+
source: new L({ label: "EMPTY" })
|
|
2136
|
+
}), W.EMPTY.destroy = gt, W.WHITE = new W({
|
|
2137
|
+
source: new _t({
|
|
2136
2138
|
resource: new Uint8Array([
|
|
2137
2139
|
255,
|
|
2138
2140
|
255,
|
|
@@ -2145,16 +2147,16 @@ U.EMPTY = new U({
|
|
|
2145
2147
|
label: "WHITE"
|
|
2146
2148
|
}),
|
|
2147
2149
|
label: "WHITE"
|
|
2148
|
-
}),
|
|
2150
|
+
}), W.WHITE.destroy = gt;
|
|
2149
2151
|
//#endregion
|
|
2150
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2151
|
-
var
|
|
2152
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/texture/TexturePool.mjs
|
|
2153
|
+
var bt = 0, xt = new class {
|
|
2152
2154
|
constructor(e) {
|
|
2153
|
-
this._poolKeyHash = /* @__PURE__ */ Object.create(null), this._texturePool = {}, this.textureOptions = e || {}, this.enableFullScreen = !1, this.textureStyle = new
|
|
2155
|
+
this._poolKeyHash = /* @__PURE__ */ Object.create(null), this._texturePool = {}, this.textureOptions = e || {}, this.enableFullScreen = !1, this.textureStyle = new dt(this.textureOptions);
|
|
2154
2156
|
}
|
|
2155
2157
|
createTexture(e, t, n, r) {
|
|
2156
|
-
return new
|
|
2157
|
-
source: new
|
|
2158
|
+
return new W({
|
|
2159
|
+
source: new L({
|
|
2158
2160
|
...this.textureOptions,
|
|
2159
2161
|
width: e,
|
|
2160
2162
|
height: t,
|
|
@@ -2163,12 +2165,12 @@ var xt = 0, St = new class {
|
|
|
2163
2165
|
autoGarbageCollect: !1,
|
|
2164
2166
|
autoGenerateMipmaps: r
|
|
2165
2167
|
}),
|
|
2166
|
-
label: `texturePool_${
|
|
2168
|
+
label: `texturePool_${bt++}`
|
|
2167
2169
|
});
|
|
2168
2170
|
}
|
|
2169
2171
|
getOptimalTexture(e, t, n = 1, r, i = !1) {
|
|
2170
2172
|
let a = Math.ceil(e * n - 1e-6), o = Math.ceil(t * n - 1e-6);
|
|
2171
|
-
a =
|
|
2173
|
+
a = at(a), o = at(o);
|
|
2172
2174
|
let s = +!!r, c = +!!i, l = (a << 17) + (o << 2) + (c << 1) + s;
|
|
2173
2175
|
this._texturePool[l] || (this._texturePool[l] = []);
|
|
2174
2176
|
let u = this._texturePool[l].pop();
|
|
@@ -2190,15 +2192,15 @@ var xt = 0, St = new class {
|
|
|
2190
2192
|
this._texturePool = {};
|
|
2191
2193
|
}
|
|
2192
2194
|
}();
|
|
2193
|
-
|
|
2195
|
+
De.register(xt);
|
|
2194
2196
|
//#endregion
|
|
2195
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2196
|
-
var
|
|
2197
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/RenderGroup.mjs
|
|
2198
|
+
var St = class {
|
|
2197
2199
|
constructor() {
|
|
2198
2200
|
this.renderPipeId = "renderGroup", this.root = null, this.canBundle = !1, this.renderGroupParent = null, this.renderGroupChildren = [], this.worldTransform = new T(), this.worldColorAlpha = 4294967295, this.worldColor = 16777215, this.worldAlpha = 1, this.childrenToUpdate = /* @__PURE__ */ Object.create(null), this.updateTick = 0, this.gcTick = 0, this.childrenRenderablesToUpdate = {
|
|
2199
2201
|
list: [],
|
|
2200
2202
|
index: 0
|
|
2201
|
-
}, this.structureDidChange = !0, this.instructionSet = new
|
|
2203
|
+
}, this.structureDidChange = !0, this.instructionSet = new it(), this._onRenderContainers = [], this.textureNeedsUpdate = !0, this.isCachedAsTexture = !1, this._matrixDirty = 7;
|
|
2202
2204
|
}
|
|
2203
2205
|
init(e) {
|
|
2204
2206
|
this.root = e, e._onRender && this.addOnRender(e), e.didChange = !0;
|
|
@@ -2212,7 +2214,7 @@ var Ct = class {
|
|
|
2212
2214
|
this.textureOptions = e, this.isCachedAsTexture = !0, this.textureNeedsUpdate = !0;
|
|
2213
2215
|
}
|
|
2214
2216
|
disableCacheAsTexture() {
|
|
2215
|
-
this.isCachedAsTexture = !1, this.texture &&= (
|
|
2217
|
+
this.isCachedAsTexture = !1, this.texture &&= (xt.returnTexture(this.texture, !0), null);
|
|
2216
2218
|
}
|
|
2217
2219
|
updateCacheTexture() {
|
|
2218
2220
|
this.textureNeedsUpdate = !0;
|
|
@@ -2238,7 +2240,7 @@ var Ct = class {
|
|
|
2238
2240
|
t > -1 && this.renderGroupChildren.splice(t, 1), e.renderGroupParent = null;
|
|
2239
2241
|
}
|
|
2240
2242
|
addChild(e) {
|
|
2241
|
-
if (this.structureDidChange = !0, e.parentRenderGroup = this, e.updateTick = -1, e.
|
|
2243
|
+
if (this.structureDidChange = !0, e.parentRenderGroup = this, e.updateTick = -1, e.parent === this.root ? e.relativeRenderGroupDepth = 1 : e.relativeRenderGroupDepth = e.parent.relativeRenderGroupDepth + 1, e.didChange = !0, this.onChildUpdate(e), e.renderGroup) {
|
|
2242
2244
|
this.addRenderGroupChild(e.renderGroup);
|
|
2243
2245
|
return;
|
|
2244
2246
|
}
|
|
@@ -2274,10 +2276,11 @@ var Ct = class {
|
|
|
2274
2276
|
return this.root.localDisplayStatus === 7 && this.worldAlpha > 0;
|
|
2275
2277
|
}
|
|
2276
2278
|
addOnRender(e) {
|
|
2277
|
-
this._onRenderContainers.push(e);
|
|
2279
|
+
this._onRenderContainers.indexOf(e) === -1 && this._onRenderContainers.push(e);
|
|
2278
2280
|
}
|
|
2279
2281
|
removeOnRender(e) {
|
|
2280
|
-
this._onRenderContainers.
|
|
2282
|
+
let t = this._onRenderContainers.indexOf(e);
|
|
2283
|
+
t !== -1 && this._onRenderContainers.splice(t, 1);
|
|
2281
2284
|
}
|
|
2282
2285
|
runOnRender(e) {
|
|
2283
2286
|
for (let t = 0; t < this._onRenderContainers.length; t++) this._onRenderContainers[t]._onRender(e);
|
|
@@ -2316,15 +2319,15 @@ var Ct = class {
|
|
|
2316
2319
|
}
|
|
2317
2320
|
};
|
|
2318
2321
|
//#endregion
|
|
2319
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2320
|
-
function
|
|
2322
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/assignWithIgnore.mjs
|
|
2323
|
+
function Ct(e, t, n = {}) {
|
|
2321
2324
|
for (let r in t) !n[r] && t[r] !== void 0 && (e[r] = t[r]);
|
|
2322
2325
|
}
|
|
2323
2326
|
//#endregion
|
|
2324
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2325
|
-
var
|
|
2327
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/Container.mjs
|
|
2328
|
+
var wt = new E(null), G = new E(null), Tt = new E(null, 1, 1), K = new E(null), Et = class e extends o {
|
|
2326
2329
|
constructor(e = {}) {
|
|
2327
|
-
super(), this.uid = D("renderable"), this._updateFlags = 15, this.renderGroup = null, this.parentRenderGroup = null, this.parentRenderGroupIndex = 0, this.didChange = !1, this.didViewUpdate = !1, this.relativeRenderGroupDepth = 0, this.children = [], this.parent = null, this.includeInBuild = !0, this.measurable = !0, this.isSimple = !0, this.parentRenderLayer = null, this.updateTick = -1, this.localTransform = new T(), this.relativeGroupTransform = new T(), this.groupTransform = this.relativeGroupTransform, this.destroyed = !1, this._position = new E(this, 0, 0), this._scale =
|
|
2330
|
+
super(), this.uid = D("renderable"), this._updateFlags = 15, this.renderGroup = null, this.parentRenderGroup = null, this.parentRenderGroupIndex = 0, this.didChange = !1, this.didViewUpdate = !1, this.relativeRenderGroupDepth = 0, this.children = [], this.parent = null, this.includeInBuild = !0, this.measurable = !0, this.isSimple = !0, this.parentRenderLayer = null, this.updateTick = -1, this.localTransform = new T(), this.relativeGroupTransform = new T(), this.groupTransform = this.relativeGroupTransform, this.destroyed = !1, this._position = new E(this, 0, 0), this._scale = Tt, this._pivot = G, this._origin = K, this._skew = wt, this._cx = 1, this._sx = 0, this._cy = 0, this._sy = 1, this._rotation = 0, this.localColor = 16777215, this.localAlpha = 1, this.groupAlpha = 1, this.groupColor = 16777215, this.groupColorAlpha = 4294967295, this.localBlendMode = "inherit", this.groupBlendMode = "normal", this.localDisplayStatus = 7, this.globalDisplayStatus = 7, this._didContainerChangeTick = 0, this._didViewChangeTick = 0, this._didLocalTransformChangeId = -1, this.effects = [], Ct(this, e, {
|
|
2328
2331
|
children: !0,
|
|
2329
2332
|
parent: !0,
|
|
2330
2333
|
effects: !0
|
|
@@ -2367,12 +2370,12 @@ var Tt = new E(null), W = new E(null), Et = new E(null, 1, 1), G = new E(null),
|
|
|
2367
2370
|
enableRenderGroup() {
|
|
2368
2371
|
if (this.renderGroup) return;
|
|
2369
2372
|
let e = this.parentRenderGroup;
|
|
2370
|
-
e?.removeChild(this), this.renderGroup =
|
|
2373
|
+
e?.removeChild(this), this.renderGroup = M.get(St, this), this.groupTransform = T.IDENTITY, e?.addChild(this), this._updateIsSimple();
|
|
2371
2374
|
}
|
|
2372
2375
|
disableRenderGroup() {
|
|
2373
2376
|
if (!this.renderGroup) return;
|
|
2374
2377
|
let e = this.parentRenderGroup;
|
|
2375
|
-
e?.removeChild(this),
|
|
2378
|
+
e?.removeChild(this), M.return(this.renderGroup), this.renderGroup = null, this.groupTransform = this.relativeGroupTransform, e?.addChild(this), this._updateIsSimple();
|
|
2376
2379
|
}
|
|
2377
2380
|
_updateIsSimple() {
|
|
2378
2381
|
this.isSimple = !this.renderGroup && this.effects.length === 0;
|
|
@@ -2411,28 +2414,28 @@ var Tt = new E(null), W = new E(null), Et = new E(null, 1, 1), G = new E(null),
|
|
|
2411
2414
|
this.rotation = e * ve;
|
|
2412
2415
|
}
|
|
2413
2416
|
get pivot() {
|
|
2414
|
-
return this._pivot ===
|
|
2417
|
+
return this._pivot === G && (this._pivot = new E(this, 0, 0)), this._pivot;
|
|
2415
2418
|
}
|
|
2416
2419
|
set pivot(e) {
|
|
2417
|
-
this._pivot ===
|
|
2420
|
+
this._pivot === G && (this._pivot = new E(this, 0, 0), this._origin !== K && j("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")), typeof e == "number" ? this._pivot.set(e) : this._pivot.copyFrom(e);
|
|
2418
2421
|
}
|
|
2419
2422
|
get skew() {
|
|
2420
|
-
return this._skew ===
|
|
2423
|
+
return this._skew === wt && (this._skew = new E(this, 0, 0)), this._skew;
|
|
2421
2424
|
}
|
|
2422
2425
|
set skew(e) {
|
|
2423
|
-
this._skew ===
|
|
2426
|
+
this._skew === wt && (this._skew = new E(this, 0, 0)), this._skew.copyFrom(e);
|
|
2424
2427
|
}
|
|
2425
2428
|
get scale() {
|
|
2426
|
-
return this._scale ===
|
|
2429
|
+
return this._scale === Tt && (this._scale = new E(this, 1, 1)), this._scale;
|
|
2427
2430
|
}
|
|
2428
2431
|
set scale(e) {
|
|
2429
|
-
this._scale ===
|
|
2432
|
+
this._scale === Tt && (this._scale = new E(this, 0, 0)), typeof e == "string" && (e = parseFloat(e)), typeof e == "number" ? this._scale.set(e) : this._scale.copyFrom(e);
|
|
2430
2433
|
}
|
|
2431
2434
|
get origin() {
|
|
2432
|
-
return this._origin ===
|
|
2435
|
+
return this._origin === K && (this._origin = new E(this, 0, 0)), this._origin;
|
|
2433
2436
|
}
|
|
2434
2437
|
set origin(e) {
|
|
2435
|
-
this._origin ===
|
|
2438
|
+
this._origin === K && (this._origin = new E(this, 0, 0), this._pivot !== G && j("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")), typeof e == "number" ? this._origin.set(e) : this._origin.copyFrom(e);
|
|
2436
2439
|
}
|
|
2437
2440
|
get width() {
|
|
2438
2441
|
return Math.abs(this.scale.x * this.getLocalBounds().width);
|
|
@@ -2485,7 +2488,7 @@ var Tt = new E(null), W = new E(null), Et = new E(null, 1, 1), G = new E(null),
|
|
|
2485
2488
|
t !== this.localColor && (this.localColor = t, this._updateFlags |= 1, this._onUpdate());
|
|
2486
2489
|
}
|
|
2487
2490
|
get tint() {
|
|
2488
|
-
return
|
|
2491
|
+
return I(this.localColor);
|
|
2489
2492
|
}
|
|
2490
2493
|
set blendMode(e) {
|
|
2491
2494
|
this.localBlendMode !== e && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0), this._updateFlags |= 2, this.localBlendMode = e, this._onUpdate());
|
|
@@ -2525,10 +2528,10 @@ var Tt = new E(null), W = new E(null), Et = new E(null, 1, 1), G = new E(null),
|
|
|
2525
2528
|
this.renderGroup?.destroy(), this.renderGroup = null;
|
|
2526
2529
|
}
|
|
2527
2530
|
};
|
|
2528
|
-
a.mixin(
|
|
2531
|
+
a.mixin(Et, je, Ve, rt, et, $e, Fe, Ie, tt, he, ke, Je, Me);
|
|
2529
2532
|
//#endregion
|
|
2530
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2531
|
-
var
|
|
2533
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/ticker/const.mjs
|
|
2534
|
+
var q = /* @__PURE__ */ ((e) => (e[e.INTERACTION = 50] = "INTERACTION", e[e.HIGH = 25] = "HIGH", e[e.NORMAL = 0] = "NORMAL", e[e.LOW = -25] = "LOW", e[e.UTILITY = -50] = "UTILITY", e))(q || {}), Dt = class {
|
|
2532
2535
|
constructor(e, t = null, n = 0, r = !1) {
|
|
2533
2536
|
this.next = null, this.previous = null, this._destroyed = !1, this._fn = e, this._context = t, this.priority = n, this._once = r;
|
|
2534
2537
|
}
|
|
@@ -2548,9 +2551,9 @@ var K = /* @__PURE__ */ ((e) => (e[e.INTERACTION = 50] = "INTERACTION", e[e.HIGH
|
|
|
2548
2551
|
let t = this.next;
|
|
2549
2552
|
return this.next = e ? null : t, this.previous = null, t;
|
|
2550
2553
|
}
|
|
2551
|
-
},
|
|
2554
|
+
}, Ot = class e {
|
|
2552
2555
|
constructor() {
|
|
2553
|
-
this.autoStart = !1, this.deltaTime = 1, this.lastTime = -1, this.speed = 1, this.started = !1, this._requestId = null, this._maxElapsedMS = 100, this._minElapsedMS = 0, this._protected = !1, this._lastFrame = -1, this._head = new
|
|
2556
|
+
this.autoStart = !1, this.deltaTime = 1, this.lastTime = -1, this.speed = 1, this.started = !1, this._requestId = null, this._maxElapsedMS = 100, this._minElapsedMS = 0, this._protected = !1, this._lastFrame = -1, this._head = new Dt(null, null, Infinity), this.deltaMS = 1 / e.targetFPMS, this.elapsedMS = 1 / e.targetFPMS, this._tick = (e) => {
|
|
2554
2557
|
this._requestId = null, this.started && (this.update(e), this.started && this._requestId === null && this._head.next && (this._requestId = requestAnimationFrame(this._tick)));
|
|
2555
2558
|
};
|
|
2556
2559
|
}
|
|
@@ -2563,11 +2566,11 @@ var K = /* @__PURE__ */ ((e) => (e[e.INTERACTION = 50] = "INTERACTION", e[e.HIGH
|
|
|
2563
2566
|
_startIfPossible() {
|
|
2564
2567
|
this.started ? this._requestIfNeeded() : this.autoStart && this.start();
|
|
2565
2568
|
}
|
|
2566
|
-
add(e, t, n =
|
|
2567
|
-
return this._addListener(new
|
|
2569
|
+
add(e, t, n = q.NORMAL) {
|
|
2570
|
+
return this._addListener(new Dt(e, t, n));
|
|
2568
2571
|
}
|
|
2569
|
-
addOnce(e, t, n =
|
|
2570
|
-
return this._addListener(new
|
|
2572
|
+
addOnce(e, t, n = q.NORMAL) {
|
|
2573
|
+
return this._addListener(new Dt(e, t, n, !0));
|
|
2571
2574
|
}
|
|
2572
2575
|
_addListener(e) {
|
|
2573
2576
|
let t = this._head.next, n = this._head;
|
|
@@ -2655,10 +2658,10 @@ var K = /* @__PURE__ */ ((e) => (e[e.INTERACTION = 50] = "INTERACTION", e[e.HIGH
|
|
|
2655
2658
|
return e._system;
|
|
2656
2659
|
}
|
|
2657
2660
|
};
|
|
2658
|
-
|
|
2659
|
-
var
|
|
2661
|
+
Ot.targetFPMS = .06;
|
|
2662
|
+
var kt = Ot, At = class extends Et {
|
|
2660
2663
|
constructor(e) {
|
|
2661
|
-
super(e), this.canBundle = !0, this.allowChildren = !1, this._roundPixels = 0, this._lastUsed = -1, this._gpuData = /* @__PURE__ */ Object.create(null), this.autoGarbageCollect = !0, this._gcLastUsed = -1, this._bounds = new
|
|
2664
|
+
super(e), this.canBundle = !0, this.allowChildren = !1, this._roundPixels = 0, this._lastUsed = -1, this._gpuData = /* @__PURE__ */ Object.create(null), this.autoGarbageCollect = !0, this._gcLastUsed = -1, this._bounds = new N(0, 1, 0, 0), this._boundsDirty = !0, this.autoGarbageCollect = e.autoGarbageCollect ?? !0;
|
|
2662
2665
|
}
|
|
2663
2666
|
get bounds() {
|
|
2664
2667
|
return this._boundsDirty ? (this.updateBounds(), this._boundsDirty = !1, this._bounds) : this._bounds;
|
|
@@ -2696,7 +2699,7 @@ var At = kt, jt = class extends Dt {
|
|
|
2696
2699
|
for (let r = 0; r < o; r++) a[r].collectRenderables(e, t, n);
|
|
2697
2700
|
r.blendMode.popBlendMode(e);
|
|
2698
2701
|
}
|
|
2699
|
-
},
|
|
2702
|
+
}, jt = {
|
|
2700
2703
|
createCanvas: (e, t) => {
|
|
2701
2704
|
let n = document.createElement("canvas");
|
|
2702
2705
|
return n.width = e, n.height = t, n;
|
|
@@ -2709,17 +2712,17 @@ var At = kt, jt = class extends Dt {
|
|
|
2709
2712
|
getFontFaceSet: () => document.fonts,
|
|
2710
2713
|
fetch: (e, t) => fetch(e, t),
|
|
2711
2714
|
parseXML: (e) => new DOMParser().parseFromString(e, "text/xml")
|
|
2712
|
-
},
|
|
2715
|
+
}, Mt = {
|
|
2713
2716
|
get() {
|
|
2714
|
-
return
|
|
2717
|
+
return jt;
|
|
2715
2718
|
},
|
|
2716
2719
|
set(e) {
|
|
2717
|
-
|
|
2720
|
+
jt = e;
|
|
2718
2721
|
}
|
|
2719
2722
|
};
|
|
2720
2723
|
//#endregion
|
|
2721
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2722
|
-
function
|
|
2724
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/data/updateQuadBounds.mjs
|
|
2725
|
+
function Nt(e, t, n) {
|
|
2723
2726
|
let { width: r, height: i } = n.orig, a = n.trim;
|
|
2724
2727
|
if (a) {
|
|
2725
2728
|
let n = a.width, o = a.height;
|
|
@@ -2727,11 +2730,11 @@ function Pt(e, t, n) {
|
|
|
2727
2730
|
} else e.minX = -t._x * r, e.maxX = e.minX + r, e.minY = -t._y * i, e.maxY = e.minY + i;
|
|
2728
2731
|
}
|
|
2729
2732
|
//#endregion
|
|
2730
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2731
|
-
var
|
|
2732
|
-
constructor(e =
|
|
2733
|
-
e instanceof
|
|
2734
|
-
let { texture: t =
|
|
2733
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/sprite/Sprite.mjs
|
|
2734
|
+
var Pt = class e extends At {
|
|
2735
|
+
constructor(e = W.EMPTY) {
|
|
2736
|
+
e instanceof W && (e = { texture: e });
|
|
2737
|
+
let { texture: t = W.EMPTY, anchor: n, roundPixels: r, width: i, height: a, ...o } = e;
|
|
2735
2738
|
super({
|
|
2736
2739
|
label: "Sprite",
|
|
2737
2740
|
...o
|
|
@@ -2745,10 +2748,10 @@ var Ft = class e extends jt {
|
|
|
2745
2748
|
} }), n ? this.anchor = n : t.defaultAnchor && (this.anchor = t.defaultAnchor), this.texture = t, this.allowChildren = !1, this.roundPixels = r ?? !1, i !== void 0 && (this.width = i), a !== void 0 && (this.height = a);
|
|
2746
2749
|
}
|
|
2747
2750
|
static from(t, n = !1) {
|
|
2748
|
-
return t instanceof
|
|
2751
|
+
return t instanceof W ? new e(t) : new e(W.from(t, n));
|
|
2749
2752
|
}
|
|
2750
2753
|
set texture(e) {
|
|
2751
|
-
e ||=
|
|
2754
|
+
e ||= W.EMPTY;
|
|
2752
2755
|
let t = this._texture;
|
|
2753
2756
|
t !== e && (t && t.dynamic && t.off("update", this.onViewUpdate, this), e.dynamic && e.on("update", this.onViewUpdate, this), this._texture = e, this._width && this._setWidth(this._width, this._texture.orig.width), this._height && this._setHeight(this._height, this._texture.orig.height), this.onViewUpdate());
|
|
2754
2757
|
}
|
|
@@ -2756,7 +2759,7 @@ var Ft = class e extends jt {
|
|
|
2756
2759
|
return this._texture;
|
|
2757
2760
|
}
|
|
2758
2761
|
get visualBounds() {
|
|
2759
|
-
return
|
|
2762
|
+
return Nt(this._visualBounds, this._anchor, this._texture), this._visualBounds;
|
|
2760
2763
|
}
|
|
2761
2764
|
get sourceBounds() {
|
|
2762
2765
|
return A("8.6.1", "Sprite.sourceBounds is deprecated, use visualBounds instead."), this.visualBounds;
|
|
@@ -2796,9 +2799,9 @@ var Ft = class e extends jt {
|
|
|
2796
2799
|
setSize(e, t) {
|
|
2797
2800
|
typeof e == "object" ? (t = e.height ?? e.width, e = e.width) : t ??= e, e !== void 0 && this._setWidth(e, this._texture.orig.width), t !== void 0 && this._setHeight(t, this._texture.orig.height);
|
|
2798
2801
|
}
|
|
2799
|
-
},
|
|
2802
|
+
}, Ft = class extends L {
|
|
2800
2803
|
constructor(e) {
|
|
2801
|
-
e.resource ||=
|
|
2804
|
+
e.resource ||= Mt.get().createCanvas(), e.width || (e.width = e.resource.width, e.autoDensity || (e.width /= e.resolution)), e.height || (e.height = e.resource.height, e.autoDensity || (e.height /= e.resolution)), super(e), this.uploadMethodId = "image", this.autoDensity = e.autoDensity, this.resizeCanvas(), this.transparent = !!e.transparent;
|
|
2802
2805
|
}
|
|
2803
2806
|
resizeCanvas() {
|
|
2804
2807
|
this.autoDensity && "style" in this.resource && (this.resource.style.width = `${this.width}px`, this.resource.style.height = `${this.height}px`), (this.resource.width !== this.pixelWidth || this.resource.height !== this.pixelHeight) && (this.resource.width = this.pixelWidth, this.resource.height = this.pixelHeight);
|
|
@@ -2814,34 +2817,34 @@ var Ft = class e extends jt {
|
|
|
2814
2817
|
return this._context2D ||= this.resource.getContext("2d");
|
|
2815
2818
|
}
|
|
2816
2819
|
};
|
|
2817
|
-
|
|
2820
|
+
Ft.extension = n.TextureSource;
|
|
2818
2821
|
//#endregion
|
|
2819
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2820
|
-
var
|
|
2821
|
-
function
|
|
2822
|
-
let n =
|
|
2823
|
-
return n === void 0 && (
|
|
2822
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/utils/createIdFromString.mjs
|
|
2823
|
+
var It = /* @__PURE__ */ Object.create(null), Lt = /* @__PURE__ */ Object.create(null);
|
|
2824
|
+
function J(e, t) {
|
|
2825
|
+
let n = Lt[e];
|
|
2826
|
+
return n === void 0 && (It[t] === void 0 && (It[t] = 1), Lt[e] = n = It[t]++), n;
|
|
2824
2827
|
}
|
|
2825
2828
|
//#endregion
|
|
2826
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2827
|
-
var
|
|
2828
|
-
function
|
|
2829
|
-
return (!
|
|
2829
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/getTestContext.mjs
|
|
2830
|
+
var Y;
|
|
2831
|
+
function Rt() {
|
|
2832
|
+
return (!Y || Y?.isContextLost()) && (Y = Mt.get().createCanvas().getContext("webgl", {})), Y;
|
|
2830
2833
|
}
|
|
2831
2834
|
//#endregion
|
|
2832
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2833
|
-
var
|
|
2834
|
-
function
|
|
2835
|
-
if (!
|
|
2836
|
-
|
|
2837
|
-
let e =
|
|
2838
|
-
e && e.getShaderPrecisionFormat && (
|
|
2839
|
-
}
|
|
2840
|
-
return
|
|
2835
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/getMaxFragmentPrecision.mjs
|
|
2836
|
+
var zt;
|
|
2837
|
+
function Bt() {
|
|
2838
|
+
if (!zt) {
|
|
2839
|
+
zt = "mediump";
|
|
2840
|
+
let e = Rt();
|
|
2841
|
+
e && e.getShaderPrecisionFormat && (zt = e.getShaderPrecisionFormat(e.FRAGMENT_SHADER, e.HIGH_FLOAT).precision ? "highp" : "mediump");
|
|
2842
|
+
}
|
|
2843
|
+
return zt;
|
|
2841
2844
|
}
|
|
2842
2845
|
//#endregion
|
|
2843
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2844
|
-
function
|
|
2846
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/preprocessors/addProgramDefines.mjs
|
|
2847
|
+
function Vt(e, t, n) {
|
|
2845
2848
|
return t ? e : n ? (e = e.replace("out vec4 finalColor;", ""), `
|
|
2846
2849
|
|
|
2847
2850
|
#ifdef GL_ES // This checks if it is WebGL1
|
|
@@ -2860,45 +2863,45 @@ function Ht(e, t, n) {
|
|
|
2860
2863
|
`;
|
|
2861
2864
|
}
|
|
2862
2865
|
//#endregion
|
|
2863
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2864
|
-
function
|
|
2866
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/preprocessors/ensurePrecision.mjs
|
|
2867
|
+
function Ht(e, t, n) {
|
|
2865
2868
|
let r = n ? t.maxSupportedFragmentPrecision : t.maxSupportedVertexPrecision;
|
|
2866
2869
|
if (e.substring(0, 9) !== "precision") {
|
|
2867
2870
|
let i = n ? t.requestedFragmentPrecision : t.requestedVertexPrecision;
|
|
2868
2871
|
return i === "highp" && r !== "highp" && (i = "mediump"), `precision ${i} float;
|
|
2869
2872
|
${e}`;
|
|
2870
|
-
}
|
|
2871
|
-
return
|
|
2873
|
+
} else if (r !== "highp" && e.substring(0, 15) === "precision highp") return e.replace("precision highp", "precision mediump");
|
|
2874
|
+
return e;
|
|
2872
2875
|
}
|
|
2873
2876
|
//#endregion
|
|
2874
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2875
|
-
function
|
|
2877
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/preprocessors/insertVersion.mjs
|
|
2878
|
+
function Ut(e, t) {
|
|
2876
2879
|
return t ? `#version 300 es
|
|
2877
2880
|
${e}` : e;
|
|
2878
2881
|
}
|
|
2879
2882
|
//#endregion
|
|
2880
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2881
|
-
var
|
|
2882
|
-
function
|
|
2883
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/preprocessors/setProgramName.mjs
|
|
2884
|
+
var Wt = {}, Gt = {};
|
|
2885
|
+
function Kt(e, { name: t = "pixi-program" }, n = !0) {
|
|
2883
2886
|
t = t.replace(/\s+/g, "-"), t += n ? "-fragment" : "-vertex";
|
|
2884
|
-
let r = n ?
|
|
2887
|
+
let r = n ? Wt : Gt;
|
|
2885
2888
|
return r[t] ? (r[t]++, t += `-${r[t]}`) : r[t] = 1, e.indexOf("#define SHADER_NAME") === -1 ? `${`#define SHADER_NAME ${t}`}
|
|
2886
2889
|
${e}` : e;
|
|
2887
2890
|
}
|
|
2888
2891
|
//#endregion
|
|
2889
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2890
|
-
function
|
|
2892
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/preprocessors/stripVersion.mjs
|
|
2893
|
+
function qt(e, t) {
|
|
2891
2894
|
return t ? e.replace("#version 300 es", "") : e;
|
|
2892
2895
|
}
|
|
2893
2896
|
//#endregion
|
|
2894
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
2895
|
-
var
|
|
2896
|
-
stripVersion:
|
|
2897
|
-
ensurePrecision:
|
|
2898
|
-
addProgramDefines:
|
|
2899
|
-
setProgramName:
|
|
2900
|
-
insertVersion:
|
|
2901
|
-
},
|
|
2897
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/GlProgram.mjs
|
|
2898
|
+
var Jt = {
|
|
2899
|
+
stripVersion: qt,
|
|
2900
|
+
ensurePrecision: Ht,
|
|
2901
|
+
addProgramDefines: Vt,
|
|
2902
|
+
setProgramName: Kt,
|
|
2903
|
+
insertVersion: Ut
|
|
2904
|
+
}, X = /* @__PURE__ */ Object.create(null), Yt = class e {
|
|
2902
2905
|
constructor(t) {
|
|
2903
2906
|
t = {
|
|
2904
2907
|
...e.defaultOptions,
|
|
@@ -2910,30 +2913,30 @@ var Yt = {
|
|
|
2910
2913
|
requestedFragmentPrecision: t.preferredFragmentPrecision,
|
|
2911
2914
|
requestedVertexPrecision: t.preferredVertexPrecision,
|
|
2912
2915
|
maxSupportedVertexPrecision: "highp",
|
|
2913
|
-
maxSupportedFragmentPrecision:
|
|
2916
|
+
maxSupportedFragmentPrecision: Bt()
|
|
2914
2917
|
},
|
|
2915
2918
|
setProgramName: { name: t.name },
|
|
2916
2919
|
addProgramDefines: n,
|
|
2917
2920
|
insertVersion: n
|
|
2918
2921
|
}, i = t.fragment, a = t.vertex;
|
|
2919
|
-
Object.keys(
|
|
2922
|
+
Object.keys(Jt).forEach((e) => {
|
|
2920
2923
|
let t = r[e];
|
|
2921
|
-
i =
|
|
2922
|
-
}), this.fragment = i, this.vertex = a, this.transformFeedbackVaryings = t.transformFeedbackVaryings, this._key =
|
|
2924
|
+
i = Jt[e](i, t, !0), a = Jt[e](a, t, !1);
|
|
2925
|
+
}), this.fragment = i, this.vertex = a, this.transformFeedbackVaryings = t.transformFeedbackVaryings, this._key = J(`${this.vertex}:${this.fragment}`, "gl-program");
|
|
2923
2926
|
}
|
|
2924
2927
|
destroy() {
|
|
2925
|
-
this.fragment = null, this.vertex = null, this._attributeData = null, this._uniformData = null, this._uniformBlockData = null, this.transformFeedbackVaryings = null,
|
|
2928
|
+
this.fragment = null, this.vertex = null, this._attributeData = null, this._uniformData = null, this._uniformBlockData = null, this.transformFeedbackVaryings = null, X[this._cacheKey] = null;
|
|
2926
2929
|
}
|
|
2927
2930
|
static from(t) {
|
|
2928
2931
|
let n = `${t.vertex}:${t.fragment}`;
|
|
2929
|
-
return
|
|
2932
|
+
return X[n] || (X[n] = new e(t), X[n]._cacheKey = n), X[n];
|
|
2930
2933
|
}
|
|
2931
2934
|
};
|
|
2932
|
-
|
|
2935
|
+
Yt.defaultOptions = {
|
|
2933
2936
|
preferredVertexPrecision: "highp",
|
|
2934
2937
|
preferredFragmentPrecision: "mediump"
|
|
2935
2938
|
};
|
|
2936
|
-
var
|
|
2939
|
+
var Xt = Yt, Zt = {
|
|
2937
2940
|
uint8x2: {
|
|
2938
2941
|
size: 2,
|
|
2939
2942
|
stride: 2,
|
|
@@ -3085,12 +3088,12 @@ var Zt = Xt, Qt = {
|
|
|
3085
3088
|
normalised: !1
|
|
3086
3089
|
}
|
|
3087
3090
|
};
|
|
3088
|
-
function
|
|
3089
|
-
return
|
|
3091
|
+
function Qt(e) {
|
|
3092
|
+
return Zt[e] ?? Zt.float32;
|
|
3090
3093
|
}
|
|
3091
3094
|
//#endregion
|
|
3092
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
3093
|
-
var
|
|
3095
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/extractAttributesFromGpuProgram.mjs
|
|
3096
|
+
var $t = {
|
|
3094
3097
|
f32: "float32",
|
|
3095
3098
|
"vec2<f32>": "float32x2",
|
|
3096
3099
|
"vec3<f32>": "float32x3",
|
|
@@ -3116,50 +3119,53 @@ var en = {
|
|
|
3116
3119
|
"vec2<bool>": "uint32x2",
|
|
3117
3120
|
"vec3<bool>": "uint32x3",
|
|
3118
3121
|
"vec4<bool>": "uint32x4"
|
|
3119
|
-
},
|
|
3120
|
-
function
|
|
3122
|
+
}, en = /@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;
|
|
3123
|
+
function tn(e, t) {
|
|
3121
3124
|
let n;
|
|
3122
|
-
for (; (n =
|
|
3123
|
-
let e =
|
|
3125
|
+
for (; (n = en.exec(e)) !== null;) {
|
|
3126
|
+
let e = $t[n[3]] ?? "float32";
|
|
3124
3127
|
t[n[2]] = {
|
|
3125
3128
|
location: parseInt(n[1], 10),
|
|
3126
3129
|
format: e,
|
|
3127
|
-
stride:
|
|
3130
|
+
stride: Qt(e).stride,
|
|
3128
3131
|
offset: 0,
|
|
3129
3132
|
instance: !1,
|
|
3130
3133
|
start: 0
|
|
3131
3134
|
};
|
|
3132
3135
|
}
|
|
3133
|
-
|
|
3136
|
+
en.lastIndex = 0;
|
|
3134
3137
|
}
|
|
3135
|
-
function
|
|
3138
|
+
function nn(e) {
|
|
3136
3139
|
return e.replace(/\/\/.*$/gm, "").replace(/\/\*[\s\S]*?\*\//g, "");
|
|
3137
3140
|
}
|
|
3138
|
-
function
|
|
3139
|
-
let n = {}, r =
|
|
3141
|
+
function rn({ source: e, entryPoint: t }) {
|
|
3142
|
+
let n = {}, r = nn(e), i = r.indexOf(`fn ${t}(`);
|
|
3140
3143
|
if (i === -1) return n;
|
|
3141
3144
|
let a = r.indexOf("->", i);
|
|
3142
3145
|
if (a === -1) return n;
|
|
3143
3146
|
let o = r.substring(i, a);
|
|
3144
|
-
if (
|
|
3147
|
+
if (tn(o, n), Object.keys(n).length === 0) {
|
|
3145
3148
|
let e = o.match(/\(\s*\w+\s*:\s*(\w+)/);
|
|
3146
3149
|
if (e) {
|
|
3147
3150
|
let t = e[1], i = RegExp(`struct\\s+${t}\\s*\\{([^}]+)\\}`, "s"), a = r.match(i);
|
|
3148
|
-
a &&
|
|
3151
|
+
a && tn(a[1], n);
|
|
3149
3152
|
}
|
|
3150
3153
|
}
|
|
3151
3154
|
return n;
|
|
3152
3155
|
}
|
|
3153
3156
|
//#endregion
|
|
3154
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
3155
|
-
function
|
|
3156
|
-
let t = /(^|[^/])@(group|binding)\(\d+\)[^;]+;/g, n = /@group\((\d+)\)/, r = /@binding\((\d+)\)/, i = /var(<[^>]+>)? (\w+)/, a = /:\s*([\w<>]+)/, o = /struct\s+(\w+)\s*{([^}]+)}/g, s = /(\w+)\s*:\s*([\w\<\>]+)/g, c = /struct\s+(\w+)/, l = e.match(t)?.map((e) =>
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3157
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/extractStructAndGroups.mjs
|
|
3158
|
+
function an(e) {
|
|
3159
|
+
let t = /(^|[^/])@(group|binding)\(\d+\)[^;]+;/g, n = /@group\((\d+)\)/, r = /@binding\((\d+)\)/, i = /var(<[^>]+>)? (\w+)/, a = /:\s*([\w<>]+)/, o = /struct\s+(\w+)\s*{([^}]+)}/g, s = /(\w+)\s*:\s*([\w\<\>]+)/g, c = /struct\s+(\w+)/, l = e.match(t)?.map((e) => {
|
|
3160
|
+
let t = e.match(i), o = t?.[1] ?? "", s;
|
|
3161
|
+
return o === "<uniform>" ? s = "uniform" : o.startsWith("<storage") && (s = "storage"), {
|
|
3162
|
+
group: parseInt(e.match(n)[1], 10),
|
|
3163
|
+
binding: parseInt(e.match(r)[1], 10),
|
|
3164
|
+
name: t[2],
|
|
3165
|
+
accessMode: s,
|
|
3166
|
+
type: e.match(a)[1]
|
|
3167
|
+
};
|
|
3168
|
+
});
|
|
3163
3169
|
return l ? {
|
|
3164
3170
|
groups: l,
|
|
3165
3171
|
structs: e.match(o)?.map((e) => {
|
|
@@ -3178,33 +3184,57 @@ function on(e) {
|
|
|
3178
3184
|
};
|
|
3179
3185
|
}
|
|
3180
3186
|
//#endregion
|
|
3181
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
3182
|
-
var
|
|
3187
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/shader/const.mjs
|
|
3188
|
+
var Z = /* @__PURE__ */ ((e) => (e[e.VERTEX = 1] = "VERTEX", e[e.FRAGMENT = 2] = "FRAGMENT", e[e.COMPUTE = 4] = "COMPUTE", e))(Z || {});
|
|
3183
3189
|
//#endregion
|
|
3184
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
3185
|
-
function
|
|
3190
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/generateGpuLayoutGroups.mjs
|
|
3191
|
+
function on({ groups: e }) {
|
|
3186
3192
|
let t = [];
|
|
3187
3193
|
for (let n = 0; n < e.length; n++) {
|
|
3188
3194
|
let r = e[n];
|
|
3189
|
-
t[r.group] || (t[r.group] = []), r.
|
|
3195
|
+
t[r.group] || (t[r.group] = []), r.accessMode === "uniform" ? t[r.group].push({
|
|
3190
3196
|
binding: r.binding,
|
|
3191
|
-
visibility:
|
|
3197
|
+
visibility: Z.VERTEX | Z.FRAGMENT,
|
|
3192
3198
|
buffer: { type: "uniform" }
|
|
3199
|
+
}) : r.accessMode === "storage" ? t[r.group].push({
|
|
3200
|
+
binding: r.binding,
|
|
3201
|
+
visibility: Z.VERTEX | Z.FRAGMENT,
|
|
3202
|
+
buffer: { type: "read-only-storage" }
|
|
3193
3203
|
}) : r.type === "sampler" ? t[r.group].push({
|
|
3194
3204
|
binding: r.binding,
|
|
3195
|
-
visibility:
|
|
3205
|
+
visibility: Z.VERTEX | Z.FRAGMENT,
|
|
3196
3206
|
sampler: { type: "filtering" }
|
|
3207
|
+
}) : r.type === "sampler_comparison" ? t[r.group].push({
|
|
3208
|
+
binding: r.binding,
|
|
3209
|
+
visibility: Z.VERTEX | Z.FRAGMENT,
|
|
3210
|
+
sampler: { type: "comparison" }
|
|
3197
3211
|
}) : r.type === "texture_2d" || r.type.startsWith("texture_2d<") ? t[r.group].push({
|
|
3198
3212
|
binding: r.binding,
|
|
3199
|
-
visibility:
|
|
3213
|
+
visibility: Z.VERTEX | Z.FRAGMENT,
|
|
3200
3214
|
texture: {
|
|
3201
3215
|
sampleType: "float",
|
|
3202
3216
|
viewDimension: "2d",
|
|
3203
3217
|
multisampled: !1
|
|
3204
3218
|
}
|
|
3219
|
+
}) : r.type === "texture_depth_2d" ? t[r.group].push({
|
|
3220
|
+
binding: r.binding,
|
|
3221
|
+
visibility: Z.VERTEX | Z.FRAGMENT,
|
|
3222
|
+
texture: {
|
|
3223
|
+
sampleType: "depth",
|
|
3224
|
+
viewDimension: "2d",
|
|
3225
|
+
multisampled: !1
|
|
3226
|
+
}
|
|
3227
|
+
}) : r.type === "texture_depth_2d_array" ? t[r.group].push({
|
|
3228
|
+
binding: r.binding,
|
|
3229
|
+
visibility: Z.VERTEX | Z.FRAGMENT,
|
|
3230
|
+
texture: {
|
|
3231
|
+
sampleType: "depth",
|
|
3232
|
+
viewDimension: "2d-array",
|
|
3233
|
+
multisampled: !1
|
|
3234
|
+
}
|
|
3205
3235
|
}) : r.type === "texture_2d_array" || r.type.startsWith("texture_2d_array<") ? t[r.group].push({
|
|
3206
3236
|
binding: r.binding,
|
|
3207
|
-
visibility:
|
|
3237
|
+
visibility: Z.VERTEX | Z.FRAGMENT,
|
|
3208
3238
|
texture: {
|
|
3209
3239
|
sampleType: "float",
|
|
3210
3240
|
viewDimension: "2d-array",
|
|
@@ -3212,7 +3242,7 @@ function sn({ groups: e }) {
|
|
|
3212
3242
|
}
|
|
3213
3243
|
}) : (r.type === "texture_cube" || r.type.startsWith("texture_cube<")) && t[r.group].push({
|
|
3214
3244
|
binding: r.binding,
|
|
3215
|
-
visibility:
|
|
3245
|
+
visibility: Z.VERTEX | Z.FRAGMENT,
|
|
3216
3246
|
texture: {
|
|
3217
3247
|
sampleType: "float",
|
|
3218
3248
|
viewDimension: "cube",
|
|
@@ -3224,8 +3254,8 @@ function sn({ groups: e }) {
|
|
|
3224
3254
|
return t;
|
|
3225
3255
|
}
|
|
3226
3256
|
//#endregion
|
|
3227
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
3228
|
-
function
|
|
3257
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/generateLayoutHash.mjs
|
|
3258
|
+
function sn({ groups: e }) {
|
|
3229
3259
|
let t = [];
|
|
3230
3260
|
for (let n = 0; n < e.length; n++) {
|
|
3231
3261
|
let r = e[n];
|
|
@@ -3234,47 +3264,47 @@ function cn({ groups: e }) {
|
|
|
3234
3264
|
return t;
|
|
3235
3265
|
}
|
|
3236
3266
|
//#endregion
|
|
3237
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
3238
|
-
function
|
|
3267
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/removeStructAndGroupDuplicates.mjs
|
|
3268
|
+
function cn(e, t) {
|
|
3239
3269
|
let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
3240
3270
|
return {
|
|
3241
|
-
structs: [...e.structs, ...t.structs].filter((e) =>
|
|
3271
|
+
structs: [...e.structs, ...t.structs].filter((e) => n.has(e.name) ? !1 : (n.add(e.name), !0)),
|
|
3242
3272
|
groups: [...e.groups, ...t.groups].filter((e) => {
|
|
3243
3273
|
let t = `${e.name}-${e.binding}`;
|
|
3244
|
-
return
|
|
3274
|
+
return r.has(t) ? !1 : (r.add(t), !0);
|
|
3245
3275
|
})
|
|
3246
3276
|
};
|
|
3247
3277
|
}
|
|
3248
3278
|
//#endregion
|
|
3249
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
3250
|
-
var
|
|
3279
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/GpuProgram.mjs
|
|
3280
|
+
var Q = /* @__PURE__ */ Object.create(null), ln = class e {
|
|
3251
3281
|
constructor(e) {
|
|
3252
3282
|
this._layoutKey = 0, this._attributeLocationsKey = 0;
|
|
3253
3283
|
let { fragment: t, vertex: n, layout: r, gpuLayout: i, name: a } = e;
|
|
3254
3284
|
if (this.name = a, this.fragment = t, this.vertex = n, t.source === n.source) {
|
|
3255
|
-
let e =
|
|
3285
|
+
let e = an(t.source);
|
|
3256
3286
|
this.structsAndGroups = e;
|
|
3257
3287
|
} else {
|
|
3258
|
-
let e =
|
|
3259
|
-
this.structsAndGroups =
|
|
3288
|
+
let e = an(n.source), r = an(t.source);
|
|
3289
|
+
this.structsAndGroups = cn(e, r);
|
|
3260
3290
|
}
|
|
3261
|
-
this.layout = r ??
|
|
3291
|
+
this.layout = r ?? sn(this.structsAndGroups), this.gpuLayout = i ?? on(this.structsAndGroups), this.autoAssignGlobalUniforms = this.layout[0]?.globalUniforms !== void 0, this.autoAssignLocalUniforms = this.layout[1]?.localUniforms !== void 0, this._generateProgramKey();
|
|
3262
3292
|
}
|
|
3263
3293
|
_generateProgramKey() {
|
|
3264
3294
|
let { vertex: e, fragment: t } = this, n = e.source + t.source + e.entryPoint + t.entryPoint;
|
|
3265
|
-
this._layoutKey =
|
|
3295
|
+
this._layoutKey = J(n, "program");
|
|
3266
3296
|
}
|
|
3267
3297
|
get attributeData() {
|
|
3268
|
-
return this._attributeData ??=
|
|
3298
|
+
return this._attributeData ??= rn(this.vertex), this._attributeData;
|
|
3269
3299
|
}
|
|
3270
3300
|
destroy() {
|
|
3271
|
-
this.gpuLayout = null, this.layout = null, this.structsAndGroups = null, this.fragment = null, this.vertex = null,
|
|
3301
|
+
this.gpuLayout = null, this.layout = null, this.structsAndGroups = null, this.fragment = null, this.vertex = null, Q[this._cacheKey] = null;
|
|
3272
3302
|
}
|
|
3273
3303
|
static from(t) {
|
|
3274
3304
|
let n = `${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;
|
|
3275
|
-
return
|
|
3305
|
+
return Q[n] || (Q[n] = new e(t), Q[n]._cacheKey = n), Q[n];
|
|
3276
3306
|
}
|
|
3277
|
-
},
|
|
3307
|
+
}, un = class {
|
|
3278
3308
|
constructor(e) {
|
|
3279
3309
|
this.resources = /* @__PURE__ */ Object.create(null), this._dirty = !0;
|
|
3280
3310
|
let t = 0;
|
|
@@ -3282,25 +3312,29 @@ var Z = /* @__PURE__ */ Object.create(null), un = class e {
|
|
|
3282
3312
|
let r = e[n];
|
|
3283
3313
|
this.setResource(r, t++);
|
|
3284
3314
|
}
|
|
3285
|
-
this._updateKey();
|
|
3286
3315
|
}
|
|
3287
|
-
|
|
3288
|
-
if (
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3316
|
+
get _key() {
|
|
3317
|
+
if (this._dirty) {
|
|
3318
|
+
this._dirty = !1;
|
|
3319
|
+
let e = [], t = 0;
|
|
3320
|
+
for (let n in this.resources) e[t++] = this.resources[n] ? this.resources[n]._resourceId : -1;
|
|
3321
|
+
this._keyValue = e.join("|");
|
|
3322
|
+
}
|
|
3323
|
+
return this._keyValue;
|
|
3293
3324
|
}
|
|
3294
3325
|
setResource(e, t) {
|
|
3295
3326
|
let n = this.resources[t];
|
|
3296
|
-
e !== n && (n
|
|
3327
|
+
e !== n && (n && n.off?.("change", this.onResourceChange, this), e.on?.("change", this.onResourceChange, this), this.resources[t] = e, this._dirty = !0);
|
|
3297
3328
|
}
|
|
3298
3329
|
getResource(e) {
|
|
3299
3330
|
return this.resources[e];
|
|
3300
3331
|
}
|
|
3301
3332
|
_touch(e, t) {
|
|
3302
3333
|
let n = this.resources;
|
|
3303
|
-
for (let r in n)
|
|
3334
|
+
for (let r in n) {
|
|
3335
|
+
let i = n[r];
|
|
3336
|
+
i && (i._gcLastUsed = e, i._touched = t);
|
|
3337
|
+
}
|
|
3304
3338
|
}
|
|
3305
3339
|
destroy() {
|
|
3306
3340
|
let e = this.resources;
|
|
@@ -3308,11 +3342,25 @@ var Z = /* @__PURE__ */ Object.create(null), un = class e {
|
|
|
3308
3342
|
this.resources = null;
|
|
3309
3343
|
}
|
|
3310
3344
|
onResourceChange(e) {
|
|
3311
|
-
this._dirty = !0, e.destroyed
|
|
3345
|
+
if (this._dirty = !0, e.destroyed) {
|
|
3346
|
+
let t = this.resources;
|
|
3347
|
+
for (let n in t) t[n] === e && (t[n] = null);
|
|
3348
|
+
j(`[BindGroup] a '${e._resourceType}' was destroyed while still bound to a shader. Remove it from the shader before destroying it.`);
|
|
3349
|
+
}
|
|
3312
3350
|
}
|
|
3313
|
-
},
|
|
3351
|
+
}, dn = /* @__PURE__ */ ((e) => (e[e.WEBGL = 1] = "WEBGL", e[e.WEBGPU = 2] = "WEBGPU", e[e.CANVAS = 4] = "CANVAS", e[e.BOTH = 3] = "BOTH", e))(dn || {}), fn = class e {
|
|
3352
|
+
constructor(e) {
|
|
3353
|
+
this.data = { ...e };
|
|
3354
|
+
let t = Object.keys(e).sort().map((t) => `${t}:${e[t]}`).join("|");
|
|
3355
|
+
this.id = J(t, "shader-overrides");
|
|
3356
|
+
}
|
|
3357
|
+
static from(t) {
|
|
3358
|
+
return t instanceof e ? t : new e(t);
|
|
3359
|
+
}
|
|
3360
|
+
}, pn = [
|
|
3314
3361
|
"f32",
|
|
3315
3362
|
"i32",
|
|
3363
|
+
"u32",
|
|
3316
3364
|
"vec2<f32>",
|
|
3317
3365
|
"vec3<f32>",
|
|
3318
3366
|
"vec4<f32>",
|
|
@@ -3327,10 +3375,13 @@ var Z = /* @__PURE__ */ Object.create(null), un = class e {
|
|
|
3327
3375
|
"mat3x4<f32>",
|
|
3328
3376
|
"vec2<i32>",
|
|
3329
3377
|
"vec3<i32>",
|
|
3330
|
-
"vec4<i32>"
|
|
3378
|
+
"vec4<i32>",
|
|
3379
|
+
"vec2<u32>",
|
|
3380
|
+
"vec3<u32>",
|
|
3381
|
+
"vec4<u32>"
|
|
3331
3382
|
], mn = pn.reduce((e, t) => (e[t] = !0, e), {});
|
|
3332
3383
|
//#endregion
|
|
3333
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
3384
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/shader/utils/getDefaultUniformValue.mjs
|
|
3334
3385
|
function hn(e, t) {
|
|
3335
3386
|
switch (e) {
|
|
3336
3387
|
case "f32": return 0;
|
|
@@ -3376,10 +3427,10 @@ function hn(e, t) {
|
|
|
3376
3427
|
return null;
|
|
3377
3428
|
}
|
|
3378
3429
|
//#endregion
|
|
3379
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
3380
|
-
var gn = class e {
|
|
3430
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/shader/UniformGroup.mjs
|
|
3431
|
+
var gn = class e extends o {
|
|
3381
3432
|
constructor(t, n) {
|
|
3382
|
-
this._touched = 0, this.uid = D("uniform"), this._resourceType = "uniformGroup", this._resourceId = D("resource"), this.isUniformGroup = !0, this._dirtyId = 0, this.destroyed = !1, n = {
|
|
3433
|
+
super(), this._touched = 0, this.uid = D("uniform"), this._resourceType = "uniformGroup", this._resourceId = D("resource"), this.isUniformGroup = !0, this._dirtyId = 0, this.destroyed = !1, n = {
|
|
3383
3434
|
...e.defaultOptions,
|
|
3384
3435
|
...n
|
|
3385
3436
|
}, this.uniformStructures = t;
|
|
@@ -3396,7 +3447,22 @@ var gn = class e {
|
|
|
3396
3447
|
}
|
|
3397
3448
|
n.value ??= hn(n.type, n.size), r[e] = n.value;
|
|
3398
3449
|
}
|
|
3399
|
-
this.uniforms = r, this._dirtyId = 1, this.ubo = n.ubo, this.isStatic = n.isStatic, this._signature =
|
|
3450
|
+
this.uniforms = r, this._dirtyId = 1, this.ubo = n.ubo, this.isStatic = n.isStatic, this._signature = J(Object.keys(r).map((e) => `${e}-${t[e].type}`).join("-"), "uniform-group");
|
|
3451
|
+
}
|
|
3452
|
+
get buffer() {
|
|
3453
|
+
return this._buffer;
|
|
3454
|
+
}
|
|
3455
|
+
set buffer(e) {
|
|
3456
|
+
this._buffer !== e && (this._buffer?.off("change", this.onBufferChange, this), this._buffer = e, e?.on("change", this.onBufferChange, this));
|
|
3457
|
+
}
|
|
3458
|
+
get _gcLastUsed() {
|
|
3459
|
+
return this._buffer?._gcLastUsed ?? -1;
|
|
3460
|
+
}
|
|
3461
|
+
set _gcLastUsed(e) {
|
|
3462
|
+
this._buffer && (this._buffer._gcLastUsed = e);
|
|
3463
|
+
}
|
|
3464
|
+
onBufferChange() {
|
|
3465
|
+
this._resourceId = D("resource"), this.emit("change", this);
|
|
3400
3466
|
}
|
|
3401
3467
|
update() {
|
|
3402
3468
|
this._dirtyId++;
|
|
@@ -3409,46 +3475,46 @@ gn.defaultOptions = {
|
|
|
3409
3475
|
var _n = gn, vn = class e extends o {
|
|
3410
3476
|
constructor(e) {
|
|
3411
3477
|
super(), this.uid = D("shader"), this._uniformBindMap = /* @__PURE__ */ Object.create(null), this._ownedBindGroups = [], this._destroyed = !1;
|
|
3412
|
-
let { gpuProgram: t, glProgram: n, groups: r, resources: i, compatibleRenderers: a, groupMap: o } = e;
|
|
3413
|
-
this.gpuProgram = t, this.glProgram = n, a === void 0 && (a = 0, t && (a |=
|
|
3414
|
-
let
|
|
3415
|
-
if (
|
|
3416
|
-
if (!t && r && !o) throw Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");
|
|
3417
|
-
if (!t && r && o) for (let e in o) for (let t in o[e]) {
|
|
3478
|
+
let { gpuProgram: t, glProgram: n, groups: r, resources: i, compatibleRenderers: a, groupMap: o, overrides: s } = e;
|
|
3479
|
+
this._overrides = s ? fn.from(s) : null, this.gpuProgram = t, this.glProgram = n, a === void 0 && (a = 0, t && (a |= dn.WEBGPU), n && (a |= dn.WEBGL)), this.compatibleRenderers = a;
|
|
3480
|
+
let c = {};
|
|
3481
|
+
if (o) for (let e in o) for (let t in o[e]) {
|
|
3418
3482
|
let n = o[e][t];
|
|
3419
|
-
|
|
3483
|
+
c[n] = {
|
|
3420
3484
|
group: e,
|
|
3421
3485
|
binding: t,
|
|
3422
3486
|
name: n
|
|
3423
3487
|
};
|
|
3424
3488
|
}
|
|
3425
|
-
|
|
3489
|
+
if (!i && !r && (i = {}), i && r) throw Error("[Shader] Cannot have both resources and groups");
|
|
3490
|
+
if (!t && r && !o) throw Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");
|
|
3491
|
+
if (t && r && !o) {
|
|
3426
3492
|
let e = t.structsAndGroups.groups;
|
|
3427
3493
|
o = {}, e.forEach((e) => {
|
|
3428
|
-
o[e.group] = o[e.group] || {}, o[e.group][e.binding] = e.name,
|
|
3494
|
+
o[e.group] = o[e.group] || {}, o[e.group][e.binding] = e.name, c[e.name] = e;
|
|
3429
3495
|
});
|
|
3430
3496
|
} else if (i) {
|
|
3431
|
-
r = {}, o
|
|
3432
|
-
o[e.group] = o[e.group] || {}, o[e.group][e.binding] = e.name,
|
|
3497
|
+
r = {}, o ||= {}, t && t.structsAndGroups.groups.forEach((e) => {
|
|
3498
|
+
o[e.group] = o[e.group] || {}, o[e.group][e.binding] = e.name, c[e.name] = e;
|
|
3433
3499
|
});
|
|
3434
3500
|
let e = 0;
|
|
3435
|
-
for (let
|
|
3501
|
+
for (let a in i) c[a] || (t && !n && j(`[Shader] the resource '${a}' matches no binding in the WGSL source \u2014 is the name correct?`), r[99] || (r[99] = new un(), this._ownedBindGroups.push(r[99])), c[a] = {
|
|
3436
3502
|
group: 99,
|
|
3437
3503
|
binding: e,
|
|
3438
|
-
name:
|
|
3439
|
-
}, o[99] = o[99] || {}, o[99][e] =
|
|
3504
|
+
name: a
|
|
3505
|
+
}, o[99] = o[99] || {}, o[99][e] = a, e++);
|
|
3440
3506
|
for (let e in i) {
|
|
3441
3507
|
let t = e, n = i[e];
|
|
3442
3508
|
!n.source && !n._resourceType && (n = new _n(n));
|
|
3443
|
-
let a =
|
|
3444
|
-
a && (r[a.group] || (r[a.group] = new
|
|
3509
|
+
let a = c[t];
|
|
3510
|
+
a && (r[a.group] || (r[a.group] = new un(), this._ownedBindGroups.push(r[a.group])), r[a.group].setResource(n, a.binding));
|
|
3445
3511
|
}
|
|
3446
3512
|
}
|
|
3447
|
-
this.groups = r, this._uniformBindMap = o, this.resources = this._buildResourceAccessor(r,
|
|
3513
|
+
this.groups = r, this._uniformBindMap = o, this.resources = this._buildResourceAccessor(r, c);
|
|
3448
3514
|
}
|
|
3449
3515
|
addResource(e, t, n) {
|
|
3450
3516
|
var r, i;
|
|
3451
|
-
(r = this._uniformBindMap)[t] || (r[t] = {}), (i = this._uniformBindMap[t])[n] || (i[n] = e), this.groups[t] || (this.groups[t] = new
|
|
3517
|
+
(r = this._uniformBindMap)[t] || (r[t] = {}), (i = this._uniformBindMap[t])[n] || (i[n] = e), this.groups[t] || (this.groups[t] = new un(), this._ownedBindGroups.push(this.groups[t]));
|
|
3452
3518
|
}
|
|
3453
3519
|
_buildResourceAccessor(e, t) {
|
|
3454
3520
|
let n = {};
|
|
@@ -3468,11 +3534,11 @@ var _n = gn, vn = class e extends o {
|
|
|
3468
3534
|
destroy(e = !1) {
|
|
3469
3535
|
this._destroyed || (this._destroyed = !0, this.emit("destroy", this), e && (this.gpuProgram?.destroy(), this.glProgram?.destroy()), this.gpuProgram = null, this.glProgram = null, this.removeAllListeners(), this._uniformBindMap = null, this._ownedBindGroups.forEach((e) => {
|
|
3470
3536
|
e.destroy();
|
|
3471
|
-
}), this._ownedBindGroups = null, this.resources = null, this.groups = null);
|
|
3537
|
+
}), this._ownedBindGroups = null, this.resources = null, this.groups = null, this._overrides = null);
|
|
3472
3538
|
}
|
|
3473
3539
|
static from(t) {
|
|
3474
3540
|
let { gpu: n, gl: r, ...i } = t, a, o;
|
|
3475
|
-
return n && (a =
|
|
3541
|
+
return n && (a = ln.from(n)), r && (o = Xt.from(r)), new e({
|
|
3476
3542
|
gpuProgram: a,
|
|
3477
3543
|
glProgram: o,
|
|
3478
3544
|
...i
|
|
@@ -3490,21 +3556,28 @@ var _n = gn, vn = class e extends o {
|
|
|
3490
3556
|
"screen-npm": 8,
|
|
3491
3557
|
min: 9,
|
|
3492
3558
|
max: 10
|
|
3493
|
-
}, bn =
|
|
3559
|
+
}, bn = {
|
|
3560
|
+
BLEND: 0,
|
|
3561
|
+
OFFSET: 1,
|
|
3562
|
+
CULLING: 2,
|
|
3563
|
+
DEPTH_TEST: 3,
|
|
3564
|
+
WINDING: 4,
|
|
3565
|
+
DEPTH_MASK: 5
|
|
3566
|
+
}, { BLEND: xn, OFFSET: Sn, CULLING: Cn, DEPTH_TEST: wn, WINDING: Tn, DEPTH_MASK: En } = bn, Dn = class e {
|
|
3494
3567
|
constructor() {
|
|
3495
3568
|
this.data = 0, this.blendMode = "normal", this.polygonOffset = 0, this.blend = !0, this.depthMask = !0;
|
|
3496
3569
|
}
|
|
3497
3570
|
get blend() {
|
|
3498
|
-
return !!(this.data & 1);
|
|
3571
|
+
return !!(this.data & 1 << xn);
|
|
3499
3572
|
}
|
|
3500
3573
|
set blend(e) {
|
|
3501
|
-
!!(this.data & 1) !== e && (this.data ^= 1);
|
|
3574
|
+
!!(this.data & 1 << xn) !== e && (this.data ^= 1 << xn);
|
|
3502
3575
|
}
|
|
3503
3576
|
get offsets() {
|
|
3504
|
-
return !!(this.data &
|
|
3577
|
+
return !!(this.data & 1 << Sn);
|
|
3505
3578
|
}
|
|
3506
3579
|
set offsets(e) {
|
|
3507
|
-
!!(this.data &
|
|
3580
|
+
!!(this.data & 1 << Sn) !== e && (this.data ^= 1 << Sn);
|
|
3508
3581
|
}
|
|
3509
3582
|
set cullMode(e) {
|
|
3510
3583
|
if (e === "none") {
|
|
@@ -3517,28 +3590,28 @@ var _n = gn, vn = class e extends o {
|
|
|
3517
3590
|
return this.culling ? this.clockwiseFrontFace ? "front" : "back" : "none";
|
|
3518
3591
|
}
|
|
3519
3592
|
get culling() {
|
|
3520
|
-
return !!(this.data &
|
|
3593
|
+
return !!(this.data & 1 << Cn);
|
|
3521
3594
|
}
|
|
3522
3595
|
set culling(e) {
|
|
3523
|
-
!!(this.data &
|
|
3596
|
+
!!(this.data & 1 << Cn) !== e && (this.data ^= 1 << Cn);
|
|
3524
3597
|
}
|
|
3525
3598
|
get depthTest() {
|
|
3526
|
-
return !!(this.data &
|
|
3599
|
+
return !!(this.data & 1 << wn);
|
|
3527
3600
|
}
|
|
3528
3601
|
set depthTest(e) {
|
|
3529
|
-
!!(this.data &
|
|
3602
|
+
!!(this.data & 1 << wn) !== e && (this.data ^= 1 << wn);
|
|
3530
3603
|
}
|
|
3531
3604
|
get depthMask() {
|
|
3532
|
-
return !!(this.data &
|
|
3605
|
+
return !!(this.data & 1 << En);
|
|
3533
3606
|
}
|
|
3534
3607
|
set depthMask(e) {
|
|
3535
|
-
!!(this.data &
|
|
3608
|
+
!!(this.data & 1 << En) !== e && (this.data ^= 1 << En);
|
|
3536
3609
|
}
|
|
3537
3610
|
get clockwiseFrontFace() {
|
|
3538
|
-
return !!(this.data &
|
|
3611
|
+
return !!(this.data & 1 << Tn);
|
|
3539
3612
|
}
|
|
3540
3613
|
set clockwiseFrontFace(e) {
|
|
3541
|
-
!!(this.data &
|
|
3614
|
+
!!(this.data & 1 << Tn) !== e && (this.data ^= 1 << Tn);
|
|
3542
3615
|
}
|
|
3543
3616
|
get blendMode() {
|
|
3544
3617
|
return this._blendMode;
|
|
@@ -3557,16 +3630,16 @@ var _n = gn, vn = class e extends o {
|
|
|
3557
3630
|
}
|
|
3558
3631
|
static for2d() {
|
|
3559
3632
|
let t = new e();
|
|
3560
|
-
return t.depthTest = !1, t.blend = !0, t;
|
|
3633
|
+
return t.depthTest = !1, t.depthMask = !1, t.blend = !0, t;
|
|
3561
3634
|
}
|
|
3562
3635
|
};
|
|
3563
|
-
|
|
3564
|
-
var
|
|
3636
|
+
Dn.default2d = Dn.for2d();
|
|
3637
|
+
var On = Dn, kn = class e extends vn {
|
|
3565
3638
|
constructor(t) {
|
|
3566
3639
|
t = {
|
|
3567
3640
|
...e.defaultOptions,
|
|
3568
3641
|
...t
|
|
3569
|
-
}, super(t), this.enabled = !0, this._state =
|
|
3642
|
+
}, super(t), this.enabled = !0, this._state = On.for2d(), this.blendMode = t.blendMode, this.padding = t.padding, typeof t.antialias == "boolean" ? this.antialias = t.antialias ? "on" : "off" : this.antialias = t.antialias, this.resolution = t.resolution, this.blendRequired = t.blendRequired, this.clipToViewport = t.clipToViewport, this.addResource("uTexture", 0, 1), t.blendRequired && this.addResource("uBackTexture", 0, 3);
|
|
3570
3643
|
}
|
|
3571
3644
|
apply(e, t, n, r) {
|
|
3572
3645
|
e.applyFilter(this, t, n, r);
|
|
@@ -3579,14 +3652,14 @@ var xn = bn, Sn = class e extends vn {
|
|
|
3579
3652
|
}
|
|
3580
3653
|
static from(t) {
|
|
3581
3654
|
let { gpu: n, gl: r, ...i } = t, a, o;
|
|
3582
|
-
return n && (a =
|
|
3655
|
+
return n && (a = ln.from(n)), r && (o = Xt.from(r)), new e({
|
|
3583
3656
|
gpuProgram: a,
|
|
3584
3657
|
glProgram: o,
|
|
3585
3658
|
...i
|
|
3586
3659
|
});
|
|
3587
3660
|
}
|
|
3588
3661
|
};
|
|
3589
|
-
|
|
3662
|
+
kn.defaultOptions = {
|
|
3590
3663
|
blendMode: "normal",
|
|
3591
3664
|
resolution: 1,
|
|
3592
3665
|
padding: 0,
|
|
@@ -3594,10 +3667,10 @@ Sn.defaultOptions = {
|
|
|
3594
3667
|
blendRequired: !1,
|
|
3595
3668
|
clipToViewport: !0
|
|
3596
3669
|
};
|
|
3597
|
-
var
|
|
3670
|
+
var An = kn, $ = /* @__PURE__ */ ((e) => (e[e.MAP_READ = 1] = "MAP_READ", e[e.MAP_WRITE = 2] = "MAP_WRITE", e[e.COPY_SRC = 4] = "COPY_SRC", e[e.COPY_DST = 8] = "COPY_DST", e[e.INDEX = 16] = "INDEX", e[e.VERTEX = 32] = "VERTEX", e[e.UNIFORM = 64] = "UNIFORM", e[e.STORAGE = 128] = "STORAGE", e[e.INDIRECT = 256] = "INDIRECT", e[e.QUERY_RESOLVE = 512] = "QUERY_RESOLVE", e[e.STATIC = 1024] = "STATIC", e))($ || {}), jn = class extends o {
|
|
3598
3671
|
constructor(e) {
|
|
3599
3672
|
let { data: t, size: n } = e, { usage: r, label: i, shrinkToFit: a } = e;
|
|
3600
|
-
super(), this._gpuData = /* @__PURE__ */ Object.create(null), this._gcLastUsed = -1, this.autoGarbageCollect = !0, this.uid = D("buffer"), this._resourceType = "buffer", this._resourceId = D("resource"), this._touched = 0, this._updateID = 1, this._dataInt32 = null, this.shrinkToFit = !0, this.destroyed = !1, t instanceof Array && (t = new Float32Array(t)), this._data = t, n ??= t?.byteLength;
|
|
3673
|
+
super(), this._gpuData = /* @__PURE__ */ Object.create(null), this._gcLastUsed = -1, this.autoGarbageCollect = !0, this.uid = D("buffer"), this._resourceType = "buffer", this._resourceId = D("resource"), this._touched = 0, this._updateID = 1, this._updateOffset = 0, this._dataInt32 = null, this.shrinkToFit = !0, this.destroyed = !1, t instanceof Array && (t = new Float32Array(t)), this._data = t, n ??= t?.byteLength;
|
|
3601
3674
|
let o = !!t;
|
|
3602
3675
|
this.descriptor = {
|
|
3603
3676
|
size: n,
|
|
@@ -3616,13 +3689,13 @@ var Cn = Sn, Q = /* @__PURE__ */ ((e) => (e[e.MAP_READ = 1] = "MAP_READ", e[e.MA
|
|
|
3616
3689
|
return this._dataInt32 ||= new Int32Array(this.data.buffer), this._dataInt32;
|
|
3617
3690
|
}
|
|
3618
3691
|
get static() {
|
|
3619
|
-
return !!(this.descriptor.usage &
|
|
3692
|
+
return !!(this.descriptor.usage & $.STATIC);
|
|
3620
3693
|
}
|
|
3621
3694
|
set static(e) {
|
|
3622
|
-
e ? this.descriptor.usage |=
|
|
3695
|
+
e ? this.descriptor.usage |= $.STATIC : this.descriptor.usage &= ~$.STATIC;
|
|
3623
3696
|
}
|
|
3624
3697
|
setDataWithSize(e, t, n) {
|
|
3625
|
-
if (this._updateID++, this._updateSize = t * e.BYTES_PER_ELEMENT, this._data === e) {
|
|
3698
|
+
if (this._updateID++, this._updateSize = t * e.BYTES_PER_ELEMENT, this._updateOffset = 0, this._data === e) {
|
|
3626
3699
|
n && this.emit("update", this);
|
|
3627
3700
|
return;
|
|
3628
3701
|
}
|
|
@@ -3633,24 +3706,24 @@ var Cn = Sn, Q = /* @__PURE__ */ ((e) => (e[e.MAP_READ = 1] = "MAP_READ", e[e.MA
|
|
|
3633
3706
|
}
|
|
3634
3707
|
n && this.emit("update", this);
|
|
3635
3708
|
}
|
|
3636
|
-
update(e) {
|
|
3637
|
-
this._updateSize = e ?? this._updateSize, this._updateID++, this.emit("update", this);
|
|
3709
|
+
update(e, t) {
|
|
3710
|
+
this._updateSize = e ?? this._updateSize, this._updateOffset = t || 0, this._updateID++, this.emit("update", this);
|
|
3638
3711
|
}
|
|
3639
3712
|
unload() {
|
|
3640
3713
|
this.emit("unload", this);
|
|
3641
3714
|
for (let e in this._gpuData) this._gpuData[e]?.destroy();
|
|
3642
|
-
this._gpuData = /* @__PURE__ */ Object.create(null);
|
|
3715
|
+
this._gpuData = /* @__PURE__ */ Object.create(null), this.destroyed || (this._resourceId = D("resource"), this.emit("change", this));
|
|
3643
3716
|
}
|
|
3644
3717
|
destroy() {
|
|
3645
3718
|
this.destroyed = !0, this.unload(), this.emit("destroy", this), this.emit("change", this), this._data = null, this.descriptor = null, this.removeAllListeners();
|
|
3646
3719
|
}
|
|
3647
3720
|
};
|
|
3648
3721
|
//#endregion
|
|
3649
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
3650
|
-
function
|
|
3651
|
-
if (!(e instanceof
|
|
3652
|
-
let n = t ?
|
|
3653
|
-
e instanceof Array && (t ? (e = new Uint32Array(e), n =
|
|
3722
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/geometry/utils/ensureIsBuffer.mjs
|
|
3723
|
+
function Mn(e, t) {
|
|
3724
|
+
if (!(e instanceof jn)) {
|
|
3725
|
+
let n = t ? $.INDEX : $.VERTEX;
|
|
3726
|
+
e instanceof Array && (t ? (e = new Uint32Array(e), n = $.INDEX | $.COPY_DST) : (e = new Float32Array(e), n = $.VERTEX | $.COPY_DST)), e = new jn({
|
|
3654
3727
|
data: e,
|
|
3655
3728
|
label: t ? "index-mesh-buffer" : "vertex-mesh-buffer",
|
|
3656
3729
|
usage: n
|
|
@@ -3659,8 +3732,8 @@ function wn(e, t) {
|
|
|
3659
3732
|
return e;
|
|
3660
3733
|
}
|
|
3661
3734
|
//#endregion
|
|
3662
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
3663
|
-
function
|
|
3735
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/geometry/utils/getGeometryBounds.mjs
|
|
3736
|
+
function Nn(e, t, n) {
|
|
3664
3737
|
let r = e.getAttribute(t);
|
|
3665
3738
|
if (!r) return n.minX = 0, n.minY = 0, n.maxX = 0, n.maxY = 0, n;
|
|
3666
3739
|
let i = r.buffer.data, a = Infinity, o = Infinity, s = -Infinity, c = -Infinity, l = i.BYTES_PER_ELEMENT, u = (r.offset || 0) / l, d = (r.stride || 8) / l;
|
|
@@ -3671,19 +3744,19 @@ function Tn(e, t, n) {
|
|
|
3671
3744
|
return n.minX = a, n.minY = o, n.maxX = s, n.maxY = c, n;
|
|
3672
3745
|
}
|
|
3673
3746
|
//#endregion
|
|
3674
|
-
//#region node_modules/.pnpm/pixi.js@8.
|
|
3675
|
-
function
|
|
3676
|
-
return (e instanceof
|
|
3747
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/geometry/Geometry.mjs
|
|
3748
|
+
function Pn(e) {
|
|
3749
|
+
return (e instanceof jn || Array.isArray(e) || e.BYTES_PER_ELEMENT) && (e = { buffer: e }), e.buffer = Mn(e.buffer, !1), e;
|
|
3677
3750
|
}
|
|
3678
|
-
var
|
|
3751
|
+
var Fn = class extends o {
|
|
3679
3752
|
constructor(e = {}) {
|
|
3680
|
-
super(), this._gpuData = /* @__PURE__ */ Object.create(null), this.autoGarbageCollect = !0, this._gcLastUsed = -1, this.uid = D("geometry"), this._layoutKey = 0, this.instanceCount = 1, this._bounds = new
|
|
3753
|
+
super(), this._gpuData = /* @__PURE__ */ Object.create(null), this.autoGarbageCollect = !0, this._gcLastUsed = -1, this.uid = D("geometry"), this._layoutKey = 0, this.instanceCount = 1, this._bounds = new N(), this._boundsDirty = !0, this._vertexCount = 0, this._vertexCountDirty = !0;
|
|
3681
3754
|
let { attributes: t, indexBuffer: n, topology: r } = e;
|
|
3682
3755
|
if (this.buffers = [], this.attributes = {}, t) for (let e in t) this.addAttribute(e, t[e]);
|
|
3683
3756
|
this.instanceCount = e.instanceCount ?? 1, n && this.addIndex(n), this.topology = r || "triangle-list";
|
|
3684
3757
|
}
|
|
3685
3758
|
onBufferUpdate() {
|
|
3686
|
-
this._boundsDirty = !0, this.emit("update", this);
|
|
3759
|
+
this._boundsDirty = !0, this._vertexCountDirty = !0, this.emit("update", this);
|
|
3687
3760
|
}
|
|
3688
3761
|
getAttribute(e) {
|
|
3689
3762
|
return this.attributes[e];
|
|
@@ -3694,22 +3767,30 @@ var Dn = class extends o {
|
|
|
3694
3767
|
getBuffer(e) {
|
|
3695
3768
|
return this.getAttribute(e).buffer;
|
|
3696
3769
|
}
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3770
|
+
get vertexCount() {
|
|
3771
|
+
if (!this._vertexCountDirty) return this._vertexCount;
|
|
3772
|
+
this._vertexCountDirty = !1;
|
|
3773
|
+
let e = this.attributes;
|
|
3774
|
+
for (let t in e) {
|
|
3775
|
+
let n = e[t];
|
|
3776
|
+
if (n.instance) continue;
|
|
3777
|
+
let r = n.buffer;
|
|
3778
|
+
return this._vertexCount = r.data.length / (n.stride / 4 || n.size), this._vertexCount;
|
|
3701
3779
|
}
|
|
3702
|
-
return 0;
|
|
3780
|
+
return this._vertexCount = 0, 0;
|
|
3781
|
+
}
|
|
3782
|
+
getSize() {
|
|
3783
|
+
return A("8.20.0", "Geometry.getSize is deprecated, please use Geometry.vertexCount instead."), this.vertexCount;
|
|
3703
3784
|
}
|
|
3704
3785
|
addAttribute(e, t) {
|
|
3705
|
-
let n =
|
|
3706
|
-
this.buffers.indexOf(n.buffer) === -1 && (this.buffers.push(n.buffer), n.buffer.on("update", this.onBufferUpdate, this), n.buffer.on("change", this.onBufferUpdate, this)), this.attributes[e] = n;
|
|
3786
|
+
let n = Pn(t);
|
|
3787
|
+
this.buffers.indexOf(n.buffer) === -1 && (this.buffers.push(n.buffer), n.buffer.on("update", this.onBufferUpdate, this), n.buffer.on("change", this.onBufferUpdate, this)), this.attributes[e] = n, this._vertexCountDirty = !0;
|
|
3707
3788
|
}
|
|
3708
3789
|
addIndex(e) {
|
|
3709
|
-
this.indexBuffer =
|
|
3790
|
+
this.indexBuffer = Mn(e, !0), this.buffers.push(this.indexBuffer);
|
|
3710
3791
|
}
|
|
3711
3792
|
get bounds() {
|
|
3712
|
-
return this._boundsDirty ? (this._boundsDirty = !1,
|
|
3793
|
+
return this._boundsDirty ? (this._boundsDirty = !1, Nn(this, "aPosition", this._bounds)) : this._bounds;
|
|
3713
3794
|
}
|
|
3714
3795
|
unload() {
|
|
3715
3796
|
this.emit("unload", this);
|
|
@@ -3717,8 +3798,8 @@ var Dn = class extends o {
|
|
|
3717
3798
|
this._gpuData = /* @__PURE__ */ Object.create(null);
|
|
3718
3799
|
}
|
|
3719
3800
|
destroy(e = !1) {
|
|
3720
|
-
this.emit("destroy", this), this.removeAllListeners(), e && this.buffers.forEach((e) => e.destroy()), this.unload(), this.
|
|
3801
|
+
this.emit("destroy", this), this.removeAllListeners(), e && this.buffers.forEach((e) => e.destroy()), this.unload(), this.attributes = null, this.buffers = null, this.indexBuffer = null, this._bounds = null;
|
|
3721
3802
|
}
|
|
3722
3803
|
};
|
|
3723
3804
|
//#endregion
|
|
3724
|
-
export {
|
|
3805
|
+
export { E as $, L as A, F as B, Et as C, yt as D, W as E, Ye as F, Ae as G, N as H, I, j as J, M as K, qe as L, st as M, at as N, _t as O, it as P, D as Q, Ge as R, q as S, xt as T, Re as U, P as V, Ne as W, O as X, A as Y, we as Z, Ft as _, bn as a, n as at, At as b, _n as c, un as d, T as et, ln as f, J as g, Rt as h, An as i, o as it, dt as j, U as k, fn as l, Xt as m, jn as n, ve as nt, On as o, a as ot, Qt as p, De as q, $ as r, me as rt, vn as s, Fn as t, w as tt, dn as u, Pt as v, St as w, kt as x, Mt as y, He as z };
|