@caperjs/core 0.7.2 → 0.7.3
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/cli/native.mjs +21 -4
- package/cli/native.test.mjs +35 -3
- package/extras/llms.txt +10 -1
- package/lib/caper.mjs +86 -86
- package/lib/caper.mjs.map +1 -1
- package/lib/{const-Cj14a5U2.js → const-BClauBNo.js} +103 -95
- package/lib/{const-Cj14a5U2.js.map → const-BClauBNo.js.map} +1 -1
- package/lib/ui/UICanvas.d.ts +10 -2
- package/lib/ui/UICanvas.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ui/UICanvas.test.ts +23 -1
- package/src/ui/UICanvas.ts +22 -3
- package/src/version.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ft as e, Gt as t, S as n, X as r, bt as i, ct as a, ft as o, g as s, h as c, ht as l, kt as u, m as d, p as f, pt as p, q as m, r as h, vt as ee, xt as te, yt as ne } from "./registries-DmNGVLAi.js";
|
|
2
2
|
import { t as g } from "./padding-1kHDpGlQ.js";
|
|
3
|
-
import { AnimatedSprite as re, Assets as _, BitmapText as v, Graphics as y, HTMLText as ie, ParticleContainer as
|
|
3
|
+
import { AnimatedSprite as re, Assets as _, BitmapText as v, Graphics as y, HTMLText as ie, ParticleContainer as ae, Sprite as b, Text as x, Texture as oe, TilingSprite as se } from "pixi.js";
|
|
4
4
|
import { gsap as S } from "gsap";
|
|
5
5
|
//#region src/utils/debug.ts
|
|
6
6
|
var C = {
|
|
@@ -50,24 +50,24 @@ function ce() {
|
|
|
50
50
|
}
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region src/utils/number.ts
|
|
53
|
-
function
|
|
53
|
+
function A(e, t = 0) {
|
|
54
54
|
return e.toString().padStart(t, "0");
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/display/ParticleContainer.ts
|
|
58
|
-
var
|
|
58
|
+
var j = [
|
|
59
59
|
"autoResize",
|
|
60
60
|
"autoUpdate",
|
|
61
61
|
"priority"
|
|
62
|
-
],
|
|
62
|
+
], le = {
|
|
63
63
|
autoResize: !0,
|
|
64
64
|
autoUpdate: !0,
|
|
65
65
|
priority: 0
|
|
66
|
-
},
|
|
66
|
+
}, ue = class extends c(n(ae)) {
|
|
67
67
|
constructor(t = {}) {
|
|
68
68
|
super(t);
|
|
69
69
|
let { autoResize: n, autoUpdate: r, priority: i } = {
|
|
70
|
-
...
|
|
70
|
+
...le,
|
|
71
71
|
...t
|
|
72
72
|
};
|
|
73
73
|
e(this), this._initLifecycle({
|
|
@@ -78,24 +78,24 @@ var A = [
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
update(e) {
|
|
81
|
-
|
|
81
|
+
ae.prototype.update.call(this);
|
|
82
82
|
}
|
|
83
|
-
},
|
|
83
|
+
}, de = class extends y {
|
|
84
84
|
constructor(e) {
|
|
85
85
|
super(typeof e == "string" ? _.get(e) : e);
|
|
86
86
|
let t = this.getLocalBounds();
|
|
87
87
|
this.pivot.set((t.x + t.width) / 2, (t.y + t.height) / 2);
|
|
88
88
|
}
|
|
89
|
-
},
|
|
90
|
-
function
|
|
89
|
+
}, M;
|
|
90
|
+
function N(e, t) {
|
|
91
91
|
for (let n in e) try {
|
|
92
92
|
t[n] = e[n];
|
|
93
93
|
} catch (e) {
|
|
94
94
|
u.warn(`Error setting property ${n}`, e);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
if (!
|
|
97
|
+
function P() {
|
|
98
|
+
if (!M) {
|
|
99
99
|
let e = new y();
|
|
100
100
|
e.rect(0, 0, 100, 100), e.fill({ color: 16711680 }), e.stroke({
|
|
101
101
|
color: 16777215,
|
|
@@ -105,14 +105,14 @@ function N() {
|
|
|
105
105
|
color: 16777215,
|
|
106
106
|
width: 2,
|
|
107
107
|
alignment: .5
|
|
108
|
-
}),
|
|
108
|
+
}), M = h.getInstance().renderer.generateTexture(e), e.destroy();
|
|
109
109
|
}
|
|
110
|
-
return
|
|
110
|
+
return M;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function F(e) {
|
|
113
113
|
let t, n = e?.asset, r = n, i = e?.sheet;
|
|
114
114
|
if (n instanceof oe) t = n;
|
|
115
|
-
else if (!i || i?.length === 0) _.cache.has(r) ? t = _.get(r) : _.get(r) ? t = _.get(r).texture : (u.error("Asset \"" + n + "\" not loaded into Pixi cache"), t =
|
|
115
|
+
else if (!i || i?.length === 0) _.cache.has(r) ? t = _.get(r) : _.get(r) ? t = _.get(r).texture : (u.error("Asset \"" + n + "\" not loaded into Pixi cache"), t = P());
|
|
116
116
|
else if (_.get(i)) {
|
|
117
117
|
let e = _.get(i), a = e.textures;
|
|
118
118
|
if (a !== void 0) if (a.hasOwnProperty(r)) t = a[r];
|
|
@@ -121,17 +121,17 @@ function P(e) {
|
|
|
121
121
|
t = n.textures[r];
|
|
122
122
|
break;
|
|
123
123
|
}
|
|
124
|
-
t === void 0 && (u.error("Asset \"" + n + "\" not found inside spritesheet \"" + n + "' or any of its linked sheets"), t =
|
|
125
|
-
} else u.error("Asset \"" + n + "\" not found inside spritesheet \"" + i + "'"), t =
|
|
126
|
-
else u.error("Spritesheet \"" + i + "\" loaded but textures arent?!"), t =
|
|
127
|
-
} else return u.error("Spritesheet \"" + i + "\" not loaded into Pixi cache"),
|
|
128
|
-
return t || new
|
|
124
|
+
t === void 0 && (u.error("Asset \"" + n + "\" not found inside spritesheet \"" + n + "' or any of its linked sheets"), t = P());
|
|
125
|
+
} else u.error("Asset \"" + n + "\" not found inside spritesheet \"" + i + "'"), t = P();
|
|
126
|
+
else u.error("Spritesheet \"" + i + "\" loaded but textures arent?!"), t = P();
|
|
127
|
+
} else return u.error("Spritesheet \"" + i + "\" not loaded into Pixi cache"), P();
|
|
128
|
+
return t || new b().texture;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function I(e, t) {
|
|
131
131
|
let n = a(e.position, !1, e.x, e.y);
|
|
132
132
|
t.x = n.x, t.y = n.y;
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function L(e, t) {
|
|
135
135
|
if (!e) return;
|
|
136
136
|
if (e.scale === void 0) {
|
|
137
137
|
if (e.scaleX === void 0 && e.scaleY === void 0) return;
|
|
@@ -140,13 +140,13 @@ function I(e, t) {
|
|
|
140
140
|
let n = a(e.scale, !1, e.scaleX, e.scaleY);
|
|
141
141
|
t.scale.set(n.x, n.y);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function R(e, t) {
|
|
144
144
|
if (e !== void 0) {
|
|
145
145
|
let n = a(e);
|
|
146
146
|
t.anchor.set(n.x, n.y);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function z(e, t) {
|
|
150
150
|
if (e !== void 0) {
|
|
151
151
|
let n = a(e);
|
|
152
152
|
t.pivot.set(n.x, n.y);
|
|
@@ -154,7 +154,7 @@ function R(e, t) {
|
|
|
154
154
|
}
|
|
155
155
|
//#endregion
|
|
156
156
|
//#region src/display/AnimatedSprite.ts
|
|
157
|
-
var
|
|
157
|
+
var B = class t extends re {
|
|
158
158
|
constructor(n) {
|
|
159
159
|
let r = n?.animations ?? {}, i = n?.animation ?? Object.keys(r)[0], a = r[i], o = n?.sheet, s = n?.texturePrefix || "", c = n?.zeroPad, l = n?.startIndex ?? 0;
|
|
160
160
|
super(t.generateTexturesFromProps(i, a, s, o, c, l), n?.autoUpdate !== !1), this.config = n, this.onAnimationChange = new m(), this.onAnimationStart = new m(), this.onAnimationStop = new m(), this.onAnimationLoop = new m(), this.onAnimationComplete = new m(), this.onAnimationFrameChange = new m(), this.defaultTexturePrefix = "", this._paused = !1, this._isReversed = !1, e(this), this.defaultSheet = o, this.defaultTexturePrefix = s, this.defaultZeroPad = c, this._generateAnimations(), this.currentAnimation = this.defaultAnimation = i, this.autoPlay = n?.autoPlay ?? !0, this.loop = n?.loop ?? !0, this.updateAnchor = n?.updateAnchor ?? !1, this.animationSpeed = this.defaultAnimationSpeed = n?.animationSpeed ?? 1, this.on("added", this._added);
|
|
@@ -178,11 +178,11 @@ var z = class t extends re {
|
|
|
178
178
|
let o = [], s = "", c = t?.sheet ?? r;
|
|
179
179
|
if (t?.numFrames > 1) {
|
|
180
180
|
let r = t?.startIndex ?? a ?? 0;
|
|
181
|
-
for (let a = r; a < r + t?.numFrames; a++) s = `${n}${t?.texturePrefix ?? e}${
|
|
181
|
+
for (let a = r; a < r + t?.numFrames; a++) s = `${n}${t?.texturePrefix ?? e}${A(a, t?.zeroPad ?? i)}`, o.push(F({
|
|
182
182
|
asset: s,
|
|
183
183
|
sheet: c
|
|
184
184
|
}));
|
|
185
|
-
} else s = `${n}${t?.texturePrefix ?? e}`, o.push(
|
|
185
|
+
} else s = `${n}${t?.texturePrefix ?? e}`, o.push(F({
|
|
186
186
|
asset: s,
|
|
187
187
|
sheet: c
|
|
188
188
|
}));
|
|
@@ -234,7 +234,7 @@ var z = class t extends re {
|
|
|
234
234
|
this.onAnimationFrameChange.emit();
|
|
235
235
|
}, this.autoPlay && this.play();
|
|
236
236
|
}
|
|
237
|
-
},
|
|
237
|
+
}, fe = c(n(s())), V = class extends fe {
|
|
238
238
|
get animationNames() {
|
|
239
239
|
return this.spine.state.data.skeletonData.animations.map((e) => e.name);
|
|
240
240
|
}
|
|
@@ -302,7 +302,7 @@ var z = class t extends re {
|
|
|
302
302
|
};
|
|
303
303
|
//#endregion
|
|
304
304
|
//#region src/mixins/focus.ts
|
|
305
|
-
function
|
|
305
|
+
function H(e) {
|
|
306
306
|
return class extends e {
|
|
307
307
|
constructor(...e) {
|
|
308
308
|
super(...e), this.isFocused = !1, this.isKeyDown = !1, this.focusEnabled = !0, this.tabIndex = 0, this.accessible = !1, this.accessibleType = "button", this.accessibleTitle = "Focusable", this.accessibleHint = "Press enter to focus", this.accessiblePointerEvents = "auto", this.accessibleChildren = !0, this.onFocus = new m(), this.onFocusIn = new m(), this.onFocusOut = new m(), this.onBlur = new m(), this._eventsDisabled = !1, this.eventMode = "static", this.on("mouseover", this._onMouseOver), this.on("mousedown", this._onMouseDown), this.on("click", this._handleClick), this.on("tap", this._handleClick);
|
|
@@ -347,10 +347,10 @@ function V(e) {
|
|
|
347
347
|
}
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
|
|
350
|
+
H.INITTED = !1;
|
|
351
351
|
//#endregion
|
|
352
352
|
//#region src/mixins/interaction.ts
|
|
353
|
-
function
|
|
353
|
+
function pe(e) {
|
|
354
354
|
return class extends e {
|
|
355
355
|
constructor(...e) {
|
|
356
356
|
super(...e), this._signals = /* @__PURE__ */ new Map(), this._emitSignal = this._emitSignal.bind(this), this.eventMode = "static";
|
|
@@ -384,7 +384,7 @@ var U = [
|
|
|
384
384
|
"enabled",
|
|
385
385
|
"layout",
|
|
386
386
|
"textLabel"
|
|
387
|
-
], me =
|
|
387
|
+
], me = H(pe(n(s()))), W = class extends me {
|
|
388
388
|
get textLabel() {
|
|
389
389
|
return this._textLabel;
|
|
390
390
|
}
|
|
@@ -810,7 +810,7 @@ var _e = [
|
|
|
810
810
|
warning: 15844367,
|
|
811
811
|
error: 15158332
|
|
812
812
|
}
|
|
813
|
-
},
|
|
813
|
+
}, ve = class extends n(f) {
|
|
814
814
|
set toaster(e) {
|
|
815
815
|
this._toaster = e;
|
|
816
816
|
}
|
|
@@ -916,7 +916,7 @@ var _e = [
|
|
|
916
916
|
destroy() {
|
|
917
917
|
this.isHiding = !0, this.closeTimeout &&= (clearTimeout(this.closeTimeout), void 0), S.killTweensOf(this), this.timeline &&= (this.timeline.kill(), void 0), !this.destroyed && !this.isHiding && this.onToastClosed.emit(), super.destroy({ children: !0 });
|
|
918
918
|
}
|
|
919
|
-
},
|
|
919
|
+
}, ye = {
|
|
920
920
|
position: "bottom right",
|
|
921
921
|
maxToasts: 5,
|
|
922
922
|
spacing: 10,
|
|
@@ -926,7 +926,7 @@ var _e = [
|
|
|
926
926
|
},
|
|
927
927
|
stackDirection: "up",
|
|
928
928
|
animationSpeed: 1
|
|
929
|
-
},
|
|
929
|
+
}, be = class extends n(f) {
|
|
930
930
|
get size() {
|
|
931
931
|
return this.toasts.length;
|
|
932
932
|
}
|
|
@@ -953,7 +953,7 @@ var _e = [
|
|
|
953
953
|
}
|
|
954
954
|
constructor(e = {}, t = {}) {
|
|
955
955
|
super({ autoResize: !0 }), this.onToastAdded = new m(), this.onToastRemoved = new m(), this.onAllToastsRemoved = new m(), this.toasts = [], this.config = {
|
|
956
|
-
...
|
|
956
|
+
...ye,
|
|
957
957
|
...e
|
|
958
958
|
}, this.defaultToastConfig = { ...t }, this.initialize(), this.resize();
|
|
959
959
|
}
|
|
@@ -985,7 +985,7 @@ var _e = [
|
|
|
985
985
|
...e.closeButton ?? {}
|
|
986
986
|
} : K.closeButton
|
|
987
987
|
});
|
|
988
|
-
let n = new (e.class ??
|
|
988
|
+
let n = new (e.class ?? ve)(e);
|
|
989
989
|
return n.toaster = this, this.container.addChild(n), this.toasts.push(n), this.positionToast(n, this.toasts.length - 1, !1), n.onToastClosed.connectOnce(() => this.removeToast(n)), this.positionToasts(), this.onToastAdded.emit(n), n.show();
|
|
990
990
|
}
|
|
991
991
|
async hideAll() {
|
|
@@ -1053,20 +1053,20 @@ var _e = [
|
|
|
1053
1053
|
S.killTweensOf(e);
|
|
1054
1054
|
}), this.hideAll(), this.toasts = [], super.destroy({ children: !0 });
|
|
1055
1055
|
}
|
|
1056
|
-
},
|
|
1056
|
+
}, q = [
|
|
1057
1057
|
"debug",
|
|
1058
1058
|
"padding",
|
|
1059
1059
|
"size",
|
|
1060
1060
|
"useAppSize",
|
|
1061
1061
|
"useSafeArea",
|
|
1062
1062
|
"layout"
|
|
1063
|
-
],
|
|
1063
|
+
], xe = {
|
|
1064
1064
|
top: 0,
|
|
1065
1065
|
right: 0,
|
|
1066
1066
|
bottom: 0,
|
|
1067
1067
|
left: 0
|
|
1068
1068
|
};
|
|
1069
|
-
function
|
|
1069
|
+
function Se(e, t) {
|
|
1070
1070
|
return {
|
|
1071
1071
|
top: e.top + t.top,
|
|
1072
1072
|
right: e.right + t.right,
|
|
@@ -1074,11 +1074,19 @@ function xe(e, t) {
|
|
|
1074
1074
|
left: e.left + t.left
|
|
1075
1075
|
};
|
|
1076
1076
|
}
|
|
1077
|
-
|
|
1077
|
+
function Ce(e, t) {
|
|
1078
|
+
return t === !0 ? { ...e } : t === !1 ? { ...xe } : {
|
|
1079
|
+
top: t.top === !1 ? 0 : e.top,
|
|
1080
|
+
right: t.right === !1 ? 0 : e.right,
|
|
1081
|
+
bottom: t.bottom === !1 ? 0 : e.bottom,
|
|
1082
|
+
left: t.left === !1 ? 0 : e.left
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
var we = {
|
|
1078
1086
|
flexGrow: 0,
|
|
1079
1087
|
flexShrink: 0,
|
|
1080
1088
|
autoLayoutChildren: !0
|
|
1081
|
-
},
|
|
1089
|
+
}, Te = n(s()), J = class t extends Te {
|
|
1082
1090
|
constructor(t) {
|
|
1083
1091
|
if (super(), this.settingsMap = /* @__PURE__ */ new Map(), this._childMap = /* @__PURE__ */ new Map(), this._debugGraphics = null, this._debugLabel = null, this._regionLabels = [], this._disableAddChildError = !1, this._bindings = [], this._canvasChildren = [], this.removeChildren = (e, t) => super.removeChildren(e, t), this.removeChildAt = (e) => super.removeChildAt(e), this.addChildAt = (e, t) => {
|
|
1084
1092
|
throw Error("UICanvas: Do not call addChildAt() directly. Use addElement(child, { align }) instead.\nExample: uiCanvas.addElement(myChild, { align: 'top right' })");
|
|
@@ -1096,9 +1104,9 @@ var Se = {
|
|
|
1096
1104
|
useSafeArea: t.useSafeArea ?? !0,
|
|
1097
1105
|
autoLayoutChildren: t.autoLayoutChildren ?? !0
|
|
1098
1106
|
}, t.layout ? typeof t.layout == "boolean" ? this.config.layout = t.layout : this.config.layout = {
|
|
1099
|
-
...
|
|
1107
|
+
...we,
|
|
1100
1108
|
...t.layout
|
|
1101
|
-
} : this.config.layout = { ...
|
|
1109
|
+
} : this.config.layout = { ...we }, this.config.useAppSize && (this.config.size = this.app.size), this.layout = {
|
|
1102
1110
|
width: this.config.size.width,
|
|
1103
1111
|
height: this.config.size.height,
|
|
1104
1112
|
flexDirection: "column",
|
|
@@ -1229,7 +1237,7 @@ var Se = {
|
|
|
1229
1237
|
this.config.padding = g(e), this._applyPadding(), this._updateLayout();
|
|
1230
1238
|
}
|
|
1231
1239
|
_applyPadding() {
|
|
1232
|
-
let e =
|
|
1240
|
+
let e = Se(this.config.padding, Ce(this.app.safeArea, this.config.useSafeArea));
|
|
1233
1241
|
this.layout = {
|
|
1234
1242
|
paddingLeft: e.left,
|
|
1235
1243
|
paddingTop: e.top,
|
|
@@ -1410,42 +1418,42 @@ var Se = {
|
|
|
1410
1418
|
});
|
|
1411
1419
|
}
|
|
1412
1420
|
}, Y = null;
|
|
1413
|
-
function
|
|
1421
|
+
function Ee() {
|
|
1414
1422
|
if (Y) return Y;
|
|
1415
1423
|
Y = /* @__PURE__ */ new Map();
|
|
1416
1424
|
let e = globalThis.Caper?.get?.("entityList") ?? [];
|
|
1417
1425
|
for (let t of e) t.active !== !1 && typeof t.module == "function" && t.module.prototype && Y.set(t.id, t.module);
|
|
1418
1426
|
return Y;
|
|
1419
1427
|
}
|
|
1420
|
-
function
|
|
1421
|
-
return
|
|
1428
|
+
function De(e) {
|
|
1429
|
+
return Ee().get(e);
|
|
1422
1430
|
}
|
|
1423
|
-
function
|
|
1424
|
-
return [...
|
|
1431
|
+
function Oe() {
|
|
1432
|
+
return [...Ee().keys()];
|
|
1425
1433
|
}
|
|
1426
1434
|
//#endregion
|
|
1427
1435
|
//#region src/mixins/factory/ui-registry.ts
|
|
1428
1436
|
var X = null;
|
|
1429
|
-
function
|
|
1437
|
+
function ke() {
|
|
1430
1438
|
if (X) return X;
|
|
1431
1439
|
X = /* @__PURE__ */ new Map();
|
|
1432
1440
|
let e = globalThis.Caper?.get?.("uiList") ?? [];
|
|
1433
1441
|
for (let t of e) t.active !== !1 && typeof t.module == "function" && t.module.prototype && X.set(t.id, t.module);
|
|
1434
1442
|
return X;
|
|
1435
1443
|
}
|
|
1436
|
-
function
|
|
1437
|
-
return
|
|
1444
|
+
function Ae(e) {
|
|
1445
|
+
return ke().get(e);
|
|
1438
1446
|
}
|
|
1439
|
-
function
|
|
1440
|
-
return [...
|
|
1447
|
+
function je() {
|
|
1448
|
+
return [...ke().keys()];
|
|
1441
1449
|
}
|
|
1442
1450
|
//#endregion
|
|
1443
1451
|
//#region src/mixins/factory/schema.ts
|
|
1444
|
-
var
|
|
1452
|
+
var Me = [
|
|
1445
1453
|
"position",
|
|
1446
1454
|
"scale",
|
|
1447
1455
|
"pivot"
|
|
1448
|
-
],
|
|
1456
|
+
], Ne = [
|
|
1449
1457
|
"position",
|
|
1450
1458
|
"x",
|
|
1451
1459
|
"y",
|
|
@@ -1456,25 +1464,25 @@ var je = [
|
|
|
1456
1464
|
"anchor"
|
|
1457
1465
|
];
|
|
1458
1466
|
function Z(e) {
|
|
1459
|
-
let t = e.applies ??
|
|
1467
|
+
let t = e.applies ?? Me, n = t.includes("position"), r = t.includes("scale"), i = t.includes("pivot"), a = t.includes("anchor"), s = [...Ne, ...e.exclude ?? []];
|
|
1460
1468
|
return (t) => {
|
|
1461
1469
|
let c = e.build(t);
|
|
1462
1470
|
if (t == null) return c;
|
|
1463
1471
|
let l = t;
|
|
1464
|
-
return n &&
|
|
1472
|
+
return n && I({
|
|
1465
1473
|
position: l.position,
|
|
1466
1474
|
x: l.x,
|
|
1467
1475
|
y: l.y
|
|
1468
|
-
}, c), r &&
|
|
1476
|
+
}, c), r && L({
|
|
1469
1477
|
scale: l.scale,
|
|
1470
1478
|
scaleX: l.scaleX,
|
|
1471
1479
|
scaleY: l.scaleY
|
|
1472
|
-
}, c), i &&
|
|
1480
|
+
}, c), i && z(l.pivot, c), a && R(l.anchor, c), N(o(s, l), c), c;
|
|
1473
1481
|
};
|
|
1474
1482
|
}
|
|
1475
1483
|
//#endregion
|
|
1476
1484
|
//#region src/mixins/factory/const.ts
|
|
1477
|
-
var
|
|
1485
|
+
var Pe = /* @__PURE__ */ t({ defaultFactoryMethods: () => $ }), Q = [
|
|
1478
1486
|
"text",
|
|
1479
1487
|
"roundPixels",
|
|
1480
1488
|
"resolution",
|
|
@@ -1485,15 +1493,15 @@ var Ne = /* @__PURE__ */ t({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1485
1493
|
existing: (e, t) => {
|
|
1486
1494
|
if (!t) return e;
|
|
1487
1495
|
let { position: n, x: r, y: i, pivot: a, scale: o, scaleX: s, scaleY: c, ...l } = t;
|
|
1488
|
-
return
|
|
1496
|
+
return I({
|
|
1489
1497
|
position: n,
|
|
1490
1498
|
x: r,
|
|
1491
1499
|
y: i
|
|
1492
|
-
}, e),
|
|
1500
|
+
}, e), L({
|
|
1493
1501
|
scale: o,
|
|
1494
1502
|
scaleX: s,
|
|
1495
1503
|
scaleY: c
|
|
1496
|
-
}, e),
|
|
1504
|
+
}, e), z(a, e), N(l, e), e;
|
|
1497
1505
|
},
|
|
1498
1506
|
container: Z({
|
|
1499
1507
|
build: (e) => new f(e ? p(e, d) : void 0),
|
|
@@ -1505,17 +1513,17 @@ var Ne = /* @__PURE__ */ t({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1505
1513
|
exclude: d
|
|
1506
1514
|
}),
|
|
1507
1515
|
particleContainer: Z({
|
|
1508
|
-
build: (e) => new
|
|
1516
|
+
build: (e) => new ue(e ? p(e, j) : void 0),
|
|
1509
1517
|
applies: [
|
|
1510
1518
|
"position",
|
|
1511
1519
|
"scale",
|
|
1512
1520
|
"pivot"
|
|
1513
1521
|
],
|
|
1514
|
-
exclude:
|
|
1522
|
+
exclude: j
|
|
1515
1523
|
}),
|
|
1516
|
-
texture:
|
|
1524
|
+
texture: F,
|
|
1517
1525
|
sprite: Z({
|
|
1518
|
-
build: (e) => new
|
|
1526
|
+
build: (e) => new b(e ? F(e) : void 0),
|
|
1519
1527
|
applies: [
|
|
1520
1528
|
"position",
|
|
1521
1529
|
"scale",
|
|
@@ -1525,7 +1533,7 @@ var Ne = /* @__PURE__ */ t({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1525
1533
|
exclude: ["asset", "sheet"]
|
|
1526
1534
|
}),
|
|
1527
1535
|
tilingSprite: Z({
|
|
1528
|
-
build: (e) => new se(e ?
|
|
1536
|
+
build: (e) => new se(e ? F(e) : void 0),
|
|
1529
1537
|
applies: [
|
|
1530
1538
|
"position",
|
|
1531
1539
|
"scale",
|
|
@@ -1535,7 +1543,7 @@ var Ne = /* @__PURE__ */ t({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1535
1543
|
exclude: ["asset", "sheet"]
|
|
1536
1544
|
}),
|
|
1537
1545
|
animatedSprite: Z({
|
|
1538
|
-
build: (e) => new
|
|
1546
|
+
build: (e) => new B(e),
|
|
1539
1547
|
applies: [
|
|
1540
1548
|
"position",
|
|
1541
1549
|
"scale",
|
|
@@ -1564,16 +1572,16 @@ var Ne = /* @__PURE__ */ t({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1564
1572
|
]
|
|
1565
1573
|
}),
|
|
1566
1574
|
svg(e) {
|
|
1567
|
-
let t = new
|
|
1568
|
-
return delete l.ctx,
|
|
1575
|
+
let t = new de(e.ctx), { position: n, x: r, y: i, pivot: a, scale: o, scaleX: s, scaleY: c, ...l } = e;
|
|
1576
|
+
return delete l.ctx, I({
|
|
1569
1577
|
position: n,
|
|
1570
1578
|
x: r,
|
|
1571
1579
|
y: i
|
|
1572
|
-
}, t),
|
|
1580
|
+
}, t), L({
|
|
1573
1581
|
scale: o,
|
|
1574
1582
|
scaleX: s,
|
|
1575
1583
|
scaleY: c
|
|
1576
|
-
}, t),
|
|
1584
|
+
}, t), z(a, t), N(l, t), t;
|
|
1577
1585
|
},
|
|
1578
1586
|
text: Z({
|
|
1579
1587
|
build: (e) => new x(e ? {
|
|
@@ -1641,13 +1649,13 @@ var Ne = /* @__PURE__ */ t({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1641
1649
|
exclude: _e
|
|
1642
1650
|
}),
|
|
1643
1651
|
uiCanvas: Z({
|
|
1644
|
-
build: (e) => new
|
|
1652
|
+
build: (e) => new J(e ? p(e, q) : {}),
|
|
1645
1653
|
applies: [
|
|
1646
1654
|
"position",
|
|
1647
1655
|
"scale",
|
|
1648
1656
|
"pivot"
|
|
1649
1657
|
],
|
|
1650
|
-
exclude:
|
|
1658
|
+
exclude: q
|
|
1651
1659
|
}),
|
|
1652
1660
|
spine: Z({
|
|
1653
1661
|
build: (e) => {
|
|
@@ -1677,65 +1685,65 @@ var Ne = /* @__PURE__ */ t({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1677
1685
|
]
|
|
1678
1686
|
}),
|
|
1679
1687
|
spineAnimation: (e) => {
|
|
1680
|
-
let t = new
|
|
1688
|
+
let t = new V(e);
|
|
1681
1689
|
if (!e) return t;
|
|
1682
1690
|
let { position: n, x: r, y: i, anchor: a, pivot: o, scale: s, scaleX: c, scaleY: l, ...u } = e;
|
|
1683
|
-
return
|
|
1691
|
+
return I({
|
|
1684
1692
|
position: n,
|
|
1685
1693
|
x: r,
|
|
1686
1694
|
y: i
|
|
1687
|
-
}, t),
|
|
1695
|
+
}, t), L({
|
|
1688
1696
|
scale: s,
|
|
1689
1697
|
scaleX: c,
|
|
1690
1698
|
scaleY: l
|
|
1691
|
-
}, t),
|
|
1699
|
+
}, t), R(a, t), z(o, t), N(u, t), t;
|
|
1692
1700
|
},
|
|
1693
|
-
toaster: (e, t = {}) => new
|
|
1701
|
+
toaster: (e, t = {}) => new be(e, t),
|
|
1694
1702
|
entity: (e, t) => {
|
|
1695
|
-
let n =
|
|
1703
|
+
let n = De(e);
|
|
1696
1704
|
if (!n) {
|
|
1697
|
-
let t =
|
|
1705
|
+
let t = Oe();
|
|
1698
1706
|
throw Error(`[caper] Unknown entity id '${String(e)}'. Known: ${t.length > 0 ? t.map((e) => `'${e}'`).join(", ") : "(none — discovery may have failed)"}`);
|
|
1699
1707
|
}
|
|
1700
1708
|
let r = new n(t);
|
|
1701
1709
|
if (t) {
|
|
1702
1710
|
let { position: e, x: n, y: i, pivot: a, scale: o, scaleX: s, scaleY: c, alpha: l, visible: u } = t;
|
|
1703
|
-
|
|
1711
|
+
I({
|
|
1704
1712
|
position: e,
|
|
1705
1713
|
x: n,
|
|
1706
1714
|
y: i
|
|
1707
|
-
}, r),
|
|
1715
|
+
}, r), L({
|
|
1708
1716
|
scale: o,
|
|
1709
1717
|
scaleX: s,
|
|
1710
1718
|
scaleY: c
|
|
1711
|
-
}, r),
|
|
1719
|
+
}, r), z(a, r), l !== void 0 && (r.alpha = l), u !== void 0 && (r.visible = u);
|
|
1712
1720
|
}
|
|
1713
1721
|
return r;
|
|
1714
1722
|
},
|
|
1715
1723
|
ui: (e, t) => {
|
|
1716
|
-
let n =
|
|
1724
|
+
let n = Ae(e);
|
|
1717
1725
|
if (!n) {
|
|
1718
|
-
let t =
|
|
1726
|
+
let t = je();
|
|
1719
1727
|
throw Error(`[caper] Unknown ui id '${String(e)}'. Known: ${t.length > 0 ? t.map((e) => `'${e}'`).join(", ") : "(none — discovery may have failed)"}`);
|
|
1720
1728
|
}
|
|
1721
1729
|
let r = new n(t);
|
|
1722
1730
|
if (t) {
|
|
1723
1731
|
let { position: e, x: n, y: i, pivot: a, scale: o, scaleX: s, scaleY: c, alpha: l, visible: u } = t;
|
|
1724
|
-
|
|
1732
|
+
I({
|
|
1725
1733
|
position: e,
|
|
1726
1734
|
x: n,
|
|
1727
1735
|
y: i
|
|
1728
|
-
}, r),
|
|
1736
|
+
}, r), L({
|
|
1729
1737
|
scale: o,
|
|
1730
1738
|
scaleX: s,
|
|
1731
1739
|
scaleY: c
|
|
1732
|
-
}, r),
|
|
1740
|
+
}, r), z(a, r), l !== void 0 && (r.alpha = l), u !== void 0 && (r.visible = u);
|
|
1733
1741
|
}
|
|
1734
1742
|
return r;
|
|
1735
1743
|
}
|
|
1736
1744
|
};
|
|
1737
1745
|
r($);
|
|
1738
1746
|
//#endregion
|
|
1739
|
-
export {
|
|
1747
|
+
export { j as A, z as C, N as D, F as E, E as F, ce as I, O as L, w as M, C as N, de as O, T as P, k as R, R as S, L as T, pe as _, J as a, B as b, Ce as c, K as d, G as f, U as g, W as h, Oe as i, A as j, ue as k, be as l, ge as m, $ as n, q as o, _e as p, je as r, Se as s, Pe as t, ve as u, H as v, I as w, P as x, V as y };
|
|
1740
1748
|
|
|
1741
|
-
//# sourceMappingURL=const-
|
|
1749
|
+
//# sourceMappingURL=const-BClauBNo.js.map
|