@caperjs/core 0.6.0 → 0.7.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/build/index.d.mts +6 -0
- package/build/index.mjs +7 -0
- package/build/plugins/solid.mjs +30 -0
- package/cli/doctor.mjs +128 -0
- package/cli/doctor.test.mjs +154 -0
- package/extras/llms.txt +192 -4
- package/extras/skills/caper/SKILL.md +51 -3
- package/lib/{CaptionsPlugin-CDbGZrN9.js → CaptionsPlugin-Boj-gm3A.js} +5 -5
- package/lib/{CaptionsPlugin-CDbGZrN9.js.map → CaptionsPlugin-Boj-gm3A.js.map} +1 -1
- package/lib/{DataAdapter-BTlNzWqg.js → DataAdapter-Cra9dJ6W.js} +9 -9
- package/lib/{DataAdapter-BTlNzWqg.js.map → DataAdapter-Cra9dJ6W.js.map} +1 -1
- package/lib/{DebugRenderer-eSVpon4c.js → DebugRenderer-19S58S4h.js} +4 -4
- package/lib/{DebugRenderer-eSVpon4c.js.map → DebugRenderer-19S58S4h.js.map} +1 -1
- package/lib/{DevToolsPlugin-Ci6r9j-m.js → DevToolsPlugin-BTSkRsdS.js} +3 -3
- package/lib/{DevToolsPlugin-Ci6r9j-m.js.map → DevToolsPlugin-BTSkRsdS.js.map} +1 -1
- package/lib/{GSAPPlugin-C8zo-fyt.js → GSAPPlugin-BcL7vjyw.js} +5 -5
- package/lib/{GSAPPlugin-C8zo-fyt.js.map → GSAPPlugin-BcL7vjyw.js.map} +1 -1
- package/lib/{LayoutPlugin-Cs2lcXKb.js → LayoutPlugin-BDhSngz_.js} +26 -26
- package/lib/{LayoutPlugin-Cs2lcXKb.js.map → LayoutPlugin-BDhSngz_.js.map} +1 -1
- package/lib/ScreenDebugPlugin-C6pxs_3O.js +103 -0
- package/lib/ScreenDebugPlugin-C6pxs_3O.js.map +1 -0
- package/lib/{SpinePlugin-CLgSXBQm.js → SpinePlugin-CrQhaK6r.js} +2 -2
- package/lib/{SpinePlugin-CLgSXBQm.js.map → SpinePlugin-CrQhaK6r.js.map} +1 -1
- package/lib/{StatsPlugin-D_90U3BG.js → StatsPlugin-Cu625dmk.js} +2 -2
- package/lib/{StatsPlugin-D_90U3BG.js.map → StatsPlugin-Cu625dmk.js.map} +1 -1
- package/lib/{VoiceOverPlugin-CAE1dtOw.js → VoiceOverPlugin-D4rfHFyJ.js} +5 -5
- package/lib/{VoiceOverPlugin-CAE1dtOw.js.map → VoiceOverPlugin-D4rfHFyJ.js.map} +1 -1
- package/lib/caper.mjs +98 -97
- package/lib/caper.mjs.map +1 -1
- package/lib/{const-BTDpIdRO.js → const-BQ2iMCtc.js} +180 -180
- package/lib/{const-BTDpIdRO.js.map → const-BQ2iMCtc.js.map} +1 -1
- package/lib/core/Application.d.ts.map +1 -1
- package/lib/plugins/ScreenDebugPlugin.d.ts +22 -0
- package/lib/plugins/ScreenDebugPlugin.d.ts.map +1 -0
- package/lib/plugins/ScreenDebugPlugin.test.d.ts +2 -0
- package/lib/plugins/ScreenDebugPlugin.test.d.ts.map +1 -0
- package/lib/plugins/index.d.ts +2 -0
- package/lib/plugins/index.d.ts.map +1 -1
- package/lib/plugins/screenDebugFlag.d.ts +2 -0
- package/lib/plugins/screenDebugFlag.d.ts.map +1 -0
- package/lib/plugins/screenDebugFlag.test.d.ts +2 -0
- package/lib/plugins/screenDebugFlag.test.d.ts.map +1 -0
- package/lib/{registries-nN_hU44y.js → registries-BmDw_GV1.js} +244 -228
- package/lib/registries-BmDw_GV1.js.map +1 -0
- package/package.json +3 -3
- package/src/core/Application.ts +8 -0
- package/src/plugins/ScreenDebugPlugin.test.ts +61 -0
- package/src/plugins/ScreenDebugPlugin.ts +174 -0
- package/src/plugins/index.ts +2 -0
- package/src/plugins/screenDebugFlag.test.ts +45 -0
- package/src/plugins/screenDebugFlag.ts +26 -0
- package/src/version.ts +2 -2
- package/lib/registries-nN_hU44y.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { AnimatedSprite as
|
|
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-BmDw_GV1.js";
|
|
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 b, Sprite as ae, 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 = {
|
|
@@ -17,7 +17,7 @@ var C = {
|
|
|
17
17
|
crosshair: .5
|
|
18
18
|
};
|
|
19
19
|
function T(e) {
|
|
20
|
-
let t = new
|
|
20
|
+
let t = new y();
|
|
21
21
|
return t.eventMode = "none", t.interactiveChildren = !1, t.layout = !1, t.label = e ?? "DebugGraphics", t;
|
|
22
22
|
}
|
|
23
23
|
function E(e, t = C.bounds) {
|
|
@@ -50,53 +50,53 @@ function ce() {
|
|
|
50
50
|
}
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region src/utils/number.ts
|
|
53
|
-
function
|
|
53
|
+
function le(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 A = [
|
|
59
59
|
"autoResize",
|
|
60
60
|
"autoUpdate",
|
|
61
61
|
"priority"
|
|
62
|
-
],
|
|
62
|
+
], ue = {
|
|
63
63
|
autoResize: !0,
|
|
64
64
|
autoUpdate: !0,
|
|
65
65
|
priority: 0
|
|
66
|
-
},
|
|
67
|
-
constructor(
|
|
68
|
-
super(
|
|
69
|
-
let { autoResize:
|
|
70
|
-
...
|
|
71
|
-
...
|
|
66
|
+
}, de = class extends c(n(b)) {
|
|
67
|
+
constructor(t = {}) {
|
|
68
|
+
super(t);
|
|
69
|
+
let { autoResize: n, autoUpdate: r, priority: i } = {
|
|
70
|
+
...ue,
|
|
71
|
+
...t
|
|
72
72
|
};
|
|
73
|
-
|
|
74
|
-
autoResize:
|
|
73
|
+
e(this), this._initLifecycle({
|
|
74
|
+
autoResize: n,
|
|
75
75
|
autoUpdate: r,
|
|
76
76
|
resizePriority: i,
|
|
77
77
|
updatePriority: i
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
update(e) {
|
|
81
|
-
|
|
81
|
+
b.prototype.update.call(this);
|
|
82
82
|
}
|
|
83
|
-
},
|
|
83
|
+
}, fe = class extends y {
|
|
84
84
|
constructor(e) {
|
|
85
|
-
super(typeof e == "string" ?
|
|
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
|
|
91
|
-
for (let
|
|
92
|
-
n
|
|
89
|
+
}, j;
|
|
90
|
+
function M(e, t) {
|
|
91
|
+
for (let n in e) try {
|
|
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 (!
|
|
99
|
-
let e = new
|
|
97
|
+
function N() {
|
|
98
|
+
if (!j) {
|
|
99
|
+
let e = new y();
|
|
100
100
|
e.rect(0, 0, 100, 100), e.fill({ color: 16711680 }), e.stroke({
|
|
101
101
|
color: 16777215,
|
|
102
102
|
width: 1,
|
|
@@ -105,59 +105,59 @@ function P() {
|
|
|
105
105
|
color: 16777215,
|
|
106
106
|
width: 2,
|
|
107
107
|
alignment: .5
|
|
108
|
-
}),
|
|
108
|
+
}), j = h.getInstance().renderer.generateTexture(e), e.destroy();
|
|
109
109
|
}
|
|
110
|
-
return
|
|
110
|
+
return j;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
let
|
|
114
|
-
if (
|
|
115
|
-
else if (!
|
|
116
|
-
else if (
|
|
117
|
-
let e =
|
|
118
|
-
if (
|
|
112
|
+
function P(e) {
|
|
113
|
+
let t, n = e?.asset, r = n, i = e?.sheet;
|
|
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 = N());
|
|
116
|
+
else if (_.get(i)) {
|
|
117
|
+
let e = _.get(i), a = e.textures;
|
|
118
|
+
if (a !== void 0) if (a.hasOwnProperty(r)) t = a[r];
|
|
119
119
|
else if (e.linkedSheets !== void 0 && e.linkedSheets.length > 0) {
|
|
120
|
-
for (let
|
|
121
|
-
|
|
120
|
+
for (let n of e.linkedSheets) if (n.textures !== void 0 && n.textures.hasOwnProperty(r)) {
|
|
121
|
+
t = n.textures[r];
|
|
122
122
|
break;
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
} else
|
|
126
|
-
else
|
|
127
|
-
} else return
|
|
128
|
-
return
|
|
124
|
+
t === void 0 && (u.error("Asset \"" + n + "\" not found inside spritesheet \"" + n + "' or any of its linked sheets"), t = N());
|
|
125
|
+
} else u.error("Asset \"" + n + "\" not found inside spritesheet \"" + i + "'"), t = N();
|
|
126
|
+
else u.error("Spritesheet \"" + i + "\" loaded but textures arent?!"), t = N();
|
|
127
|
+
} else return u.error("Spritesheet \"" + i + "\" not loaded into Pixi cache"), N();
|
|
128
|
+
return t || new ae().texture;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
let n =
|
|
130
|
+
function F(e, t) {
|
|
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 I(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;
|
|
138
138
|
e.scaleX === void 0 && (e.scaleX = 1), e.scaleY === void 0 && (e.scaleY = 1);
|
|
139
139
|
}
|
|
140
|
-
let n =
|
|
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 L(e, t) {
|
|
144
144
|
if (e !== void 0) {
|
|
145
|
-
let n =
|
|
145
|
+
let n = a(e);
|
|
146
146
|
t.anchor.set(n.x, n.y);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function R(e, t) {
|
|
150
150
|
if (e !== void 0) {
|
|
151
|
-
let n =
|
|
151
|
+
let n = a(e);
|
|
152
152
|
t.pivot.set(n.x, n.y);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
//#endregion
|
|
156
156
|
//#region src/display/AnimatedSprite.ts
|
|
157
|
-
var
|
|
158
|
-
constructor(
|
|
159
|
-
let
|
|
160
|
-
super(t.generateTexturesFromProps(a, o, c,
|
|
157
|
+
var z = class t extends re {
|
|
158
|
+
constructor(n) {
|
|
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
|
+
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);
|
|
161
161
|
}
|
|
162
162
|
get paused() {
|
|
163
163
|
return this._paused;
|
|
@@ -178,11 +178,11 @@ var B = class t extends ne {
|
|
|
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}${le(a, t?.zeroPad ?? i)}`, o.push(P({
|
|
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(P({
|
|
186
186
|
asset: s,
|
|
187
187
|
sheet: c
|
|
188
188
|
}));
|
|
@@ -204,11 +204,11 @@ var B = class t extends ne {
|
|
|
204
204
|
super.stop(), this.onAnimationStop?.emit();
|
|
205
205
|
}
|
|
206
206
|
nextAnimation() {
|
|
207
|
-
let e =
|
|
207
|
+
let e = i(this._animations, this.currentAnimation) ?? ee(this._animations);
|
|
208
208
|
e && this.setAnimation(e[0]);
|
|
209
209
|
}
|
|
210
210
|
previousAnimation() {
|
|
211
|
-
let e =
|
|
211
|
+
let e = te(this._animations, this.currentAnimation) ?? ne(this._animations);
|
|
212
212
|
e && this.setAnimation(e[0]);
|
|
213
213
|
}
|
|
214
214
|
update(e) {
|
|
@@ -234,7 +234,7 @@ var B = class t extends ne {
|
|
|
234
234
|
this.onAnimationFrameChange.emit();
|
|
235
235
|
}, this.autoPlay && this.play();
|
|
236
236
|
}
|
|
237
|
-
},
|
|
237
|
+
}, pe = c(n(s())), B = class extends pe {
|
|
238
238
|
get animationNames() {
|
|
239
239
|
return this.spine.state.data.skeletonData.animations.map((e) => e.name);
|
|
240
240
|
}
|
|
@@ -245,16 +245,16 @@ var B = class t extends ne {
|
|
|
245
245
|
return this.currentEntry ? this.currentEntry.trackTime : -1;
|
|
246
246
|
}
|
|
247
247
|
constructor(t) {
|
|
248
|
-
super(), this.onAnimationComplete = new
|
|
249
|
-
let
|
|
250
|
-
if (typeof
|
|
251
|
-
let e =
|
|
252
|
-
e !== ".json" && e !== ".skel" ? e = ".json" :
|
|
253
|
-
skeleton:
|
|
254
|
-
atlas:
|
|
248
|
+
super(), this.onAnimationComplete = new m(), this.onAnimationStart = new m(), this.onAnimationInterrupt = new m(), this.onAnimationDispose = new m(), this.onAnimationEnd = new m(), this.onAnimationEvent = new m(), this.onPaused = new m(), this.onResumed = new m(), e(this), this._initLifecycle();
|
|
249
|
+
let n = t?.data, r = "";
|
|
250
|
+
if (typeof n == "string") {
|
|
251
|
+
let e = n.slice(-5);
|
|
252
|
+
e !== ".json" && e !== ".skel" ? e = ".json" : n = n.substring(0, n.length - 5), r = {
|
|
253
|
+
skeleton: n + e,
|
|
254
|
+
atlas: n + ".atlas"
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
|
-
this.spine = window.Spine.from(
|
|
257
|
+
this.spine = window.Spine.from(r), this.add.existing(this.spine), t && (t.autoUpdate !== void 0 && (this.spine.autoUpdate = t.autoUpdate), t.animationName && this.setAnimation(t.animationName, t.loop, t.trackIndex ?? 0)), this.addSignalConnection(this.app.actions("toggle_pause").connect(this.togglePause)), t?.paused && this.pause(), this._stateListener = {
|
|
258
258
|
start: this._handleAnimationStart,
|
|
259
259
|
interrupt: this._handleAnimationInterrupt,
|
|
260
260
|
dispose: this._handleAnimationDispose,
|
|
@@ -302,13 +302,13 @@ var B = class t extends ne {
|
|
|
302
302
|
};
|
|
303
303
|
//#endregion
|
|
304
304
|
//#region src/mixins/focus.ts
|
|
305
|
-
function
|
|
306
|
-
return class extends
|
|
307
|
-
constructor(...
|
|
308
|
-
super(...
|
|
305
|
+
function V(e) {
|
|
306
|
+
return class extends e {
|
|
307
|
+
constructor(...e) {
|
|
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);
|
|
309
309
|
}
|
|
310
310
|
get app() {
|
|
311
|
-
return
|
|
311
|
+
return h.getInstance();
|
|
312
312
|
}
|
|
313
313
|
destroy(e) {
|
|
314
314
|
this.off("mouseover", this._onMouseOver), this.off("mousedown", this._onMouseDown), this.off("click", this._handleClick), this.off("tap", this._handleClick), super.destroy(e);
|
|
@@ -347,20 +347,20 @@ function H(t) {
|
|
|
347
347
|
}
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
|
|
350
|
+
V.INITTED = !1;
|
|
351
351
|
//#endregion
|
|
352
352
|
//#region src/mixins/interaction.ts
|
|
353
|
-
function
|
|
354
|
-
return class extends
|
|
353
|
+
function H(e) {
|
|
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";
|
|
357
357
|
}
|
|
358
|
-
onInteraction(
|
|
359
|
-
if (!this._signals.has(
|
|
360
|
-
let
|
|
361
|
-
this._signals.set(
|
|
358
|
+
onInteraction(e) {
|
|
359
|
+
if (!this._signals.has(e)) {
|
|
360
|
+
let t = new m();
|
|
361
|
+
this._signals.set(e, t), this.on(e, this._emitSignal);
|
|
362
362
|
}
|
|
363
|
-
return this._signals.get(
|
|
363
|
+
return this._signals.get(e);
|
|
364
364
|
}
|
|
365
365
|
destroy(e) {
|
|
366
366
|
for (let e of this._signals.keys()) this.off(e, this._emitSignal);
|
|
@@ -384,12 +384,12 @@ var U = [
|
|
|
384
384
|
"enabled",
|
|
385
385
|
"layout",
|
|
386
386
|
"textLabel"
|
|
387
|
-
], me = H(
|
|
387
|
+
], me = V(H(n(s()))), W = class extends me {
|
|
388
388
|
get textLabel() {
|
|
389
389
|
return this._textLabel;
|
|
390
390
|
}
|
|
391
391
|
constructor(t) {
|
|
392
|
-
super(), this.onDown = new
|
|
392
|
+
super(), this.onDown = new m(), this.onUp = new m(), this.onUpOutside = new m(), this.onOut = new m(), this.onOver = new m(), this.onClick = new m(), this.onEnabled = new m(), this.onDisabled = new m(), this.onKeyboardEvent = new m(), this.onDestroy = new m(), this._isDownCallbacks = /* @__PURE__ */ new Map(), this._isDownListenerAdded = !1, e(this), this.config = Object.assign({
|
|
393
393
|
id: "button",
|
|
394
394
|
textures: { default: "" },
|
|
395
395
|
sheet: void 0,
|
|
@@ -414,7 +414,7 @@ var U = [
|
|
|
414
414
|
window.removeEventListener("pointerup", this.handlePointerUpOutside), this.off("pointerupoutside", this.handlePointerUpOutside), this.isDown = !1, this._pointerId = void 0;
|
|
415
415
|
}
|
|
416
416
|
addLabel(e) {
|
|
417
|
-
if (e instanceof x || e instanceof
|
|
417
|
+
if (e instanceof x || e instanceof ie || e instanceof v) e.anchor.set(.5, .5), this._textLabel = this.add.existing(e), this._textLabel.layout = !1;
|
|
418
418
|
else switch (e.anchor = .5, e.type) {
|
|
419
419
|
case "bitmap":
|
|
420
420
|
this._textLabel = this.add.bitmapText({
|
|
@@ -444,7 +444,7 @@ var U = [
|
|
|
444
444
|
return this._enabled;
|
|
445
445
|
}
|
|
446
446
|
get app() {
|
|
447
|
-
return
|
|
447
|
+
return h.getInstance();
|
|
448
448
|
}
|
|
449
449
|
destroy(e) {
|
|
450
450
|
this.onDestroy.emit(), this._resetPressState(), this._isDownListenerAdded &&= (this.app.ticker.remove(this._handleIsDownCallbacks), !1), super.destroy(e);
|
|
@@ -516,9 +516,9 @@ var U = [
|
|
|
516
516
|
e();
|
|
517
517
|
});
|
|
518
518
|
}
|
|
519
|
-
}, he =
|
|
519
|
+
}, he = n(s());
|
|
520
520
|
function ge(e) {
|
|
521
|
-
return e instanceof x || e instanceof
|
|
521
|
+
return e instanceof x || e instanceof v;
|
|
522
522
|
}
|
|
523
523
|
var _e = [
|
|
524
524
|
"bindTo",
|
|
@@ -527,8 +527,8 @@ var _e = [
|
|
|
527
527
|
"debug"
|
|
528
528
|
], G = class extends he {
|
|
529
529
|
constructor(t = {}) {
|
|
530
|
-
if (super(), this.onLayoutComplete = new
|
|
531
|
-
|
|
530
|
+
if (super(), this.onLayoutComplete = new m(), this._debugGraphics = null, this._debugLabel = null, !this.app.config.useLayout) throw Error("You must set useLayout to true in your app config to use FlexContainer");
|
|
531
|
+
e(this), this.config = {
|
|
532
532
|
autoLayoutChildren: !0,
|
|
533
533
|
...t
|
|
534
534
|
}, this.layout = this.createLayout(t), this.on("added", this.handleAdded), this.on("childAdded", this.handleChildAdded), this.on("childRemoved", this.handleChildRemoved), this.config.bindToAppSize && this.app.onResize.connect(this.handleResize), this.config.bindTo && "on" in this.config.bindTo && this.config.bindTo.on("layout", this.handleBindToResize);
|
|
@@ -545,10 +545,10 @@ var _e = [
|
|
|
545
545
|
this.app.ticker.addOnce(this.updateLayout);
|
|
546
546
|
}
|
|
547
547
|
handleChildAdded(e) {
|
|
548
|
-
this.config.autoLayoutChildren && (e.layout ? ge(e) && !e.layout?.style?.isLeaf && (e.layout = { isLeaf: !0 }) : e.layout = { isLeaf: !0 }),
|
|
548
|
+
this.config.autoLayoutChildren && (e.layout ? ge(e) && !e.layout?.style?.isLeaf && (e.layout = { isLeaf: !0 }) : e.layout = { isLeaf: !0 }), f.childAdded(e), e.on("layout", this._updateLayout), this._updateLayout();
|
|
549
549
|
}
|
|
550
550
|
handleChildRemoved(e) {
|
|
551
|
-
e.off("layout", this._updateLayout),
|
|
551
|
+
e.off("layout", this._updateLayout), f.childRemoved(e), this._updateLayout();
|
|
552
552
|
}
|
|
553
553
|
handleResize() {
|
|
554
554
|
this.config.bindToAppSize && (this.layout = {
|
|
@@ -566,7 +566,7 @@ var _e = [
|
|
|
566
566
|
this.destroyed || !this.layout || !this.app?.renderer.layout || (this.app.renderer.layout.update(this), this.onLayoutComplete.emit(), this.config.debug && this.drawDebug());
|
|
567
567
|
}
|
|
568
568
|
get app() {
|
|
569
|
-
return
|
|
569
|
+
return h.getInstance();
|
|
570
570
|
}
|
|
571
571
|
configure(e) {
|
|
572
572
|
this.layout = e, this._updateLayout();
|
|
@@ -808,7 +808,7 @@ var _e = [
|
|
|
808
808
|
warning: 15844367,
|
|
809
809
|
error: 15158332
|
|
810
810
|
}
|
|
811
|
-
},
|
|
811
|
+
}, q = class extends n(f) {
|
|
812
812
|
set toaster(e) {
|
|
813
813
|
this._toaster = e;
|
|
814
814
|
}
|
|
@@ -818,10 +818,10 @@ var _e = [
|
|
|
818
818
|
set text(e) {
|
|
819
819
|
this.textDisplay.text = e, this.alignText();
|
|
820
820
|
}
|
|
821
|
-
constructor(
|
|
822
|
-
super(), this.onToastClosed = new
|
|
821
|
+
constructor(e = {}) {
|
|
822
|
+
super(), this.onToastClosed = new m(), this.isHiding = !1, this.config = {
|
|
823
823
|
...K,
|
|
824
|
-
...
|
|
824
|
+
...e
|
|
825
825
|
}, this.initialize();
|
|
826
826
|
}
|
|
827
827
|
initialize() {
|
|
@@ -832,7 +832,7 @@ var _e = [
|
|
|
832
832
|
color: this.config.backgroundColor,
|
|
833
833
|
alpha: this.config.backgroundAlpha
|
|
834
834
|
}), this.config.type) {
|
|
835
|
-
let e = new
|
|
835
|
+
let e = new y().roundRect(0, 0, this.config.width, this.config.height, this.config.cornerRadius).fill({ color: 16777215 }), t = this.view.add.graphics().rect(0, 0, this.config.colorBarWidth, this.config.height).fill({ color: this.config.textColors[this.config.type] });
|
|
836
836
|
t.mask = e, this.view.addChild(e), this.view.addChild(t);
|
|
837
837
|
}
|
|
838
838
|
this.config.closeButton?.show && this.addCloseButton();
|
|
@@ -914,7 +914,7 @@ var _e = [
|
|
|
914
914
|
destroy() {
|
|
915
915
|
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 });
|
|
916
916
|
}
|
|
917
|
-
},
|
|
917
|
+
}, ve = {
|
|
918
918
|
position: "bottom right",
|
|
919
919
|
maxToasts: 5,
|
|
920
920
|
spacing: 10,
|
|
@@ -924,7 +924,7 @@ var _e = [
|
|
|
924
924
|
},
|
|
925
925
|
stackDirection: "up",
|
|
926
926
|
animationSpeed: 1
|
|
927
|
-
},
|
|
927
|
+
}, ye = class extends n(f) {
|
|
928
928
|
get size() {
|
|
929
929
|
return this.toasts.length;
|
|
930
930
|
}
|
|
@@ -949,11 +949,11 @@ var _e = [
|
|
|
949
949
|
get toastConfig() {
|
|
950
950
|
return this.defaultToastConfig ?? {};
|
|
951
951
|
}
|
|
952
|
-
constructor(
|
|
953
|
-
super({ autoResize: !0 }), this.onToastAdded = new
|
|
954
|
-
...
|
|
955
|
-
...
|
|
956
|
-
}, this.defaultToastConfig = { ...
|
|
952
|
+
constructor(e = {}, t = {}) {
|
|
953
|
+
super({ autoResize: !0 }), this.onToastAdded = new m(), this.onToastRemoved = new m(), this.onAllToastsRemoved = new m(), this.toasts = [], this.config = {
|
|
954
|
+
...ve,
|
|
955
|
+
...e
|
|
956
|
+
}, this.defaultToastConfig = { ...t }, this.initialize(), this.resize();
|
|
957
957
|
}
|
|
958
958
|
initialize() {
|
|
959
959
|
this.container = this.add.container();
|
|
@@ -983,7 +983,7 @@ var _e = [
|
|
|
983
983
|
...e.closeButton ?? {}
|
|
984
984
|
} : K.closeButton
|
|
985
985
|
});
|
|
986
|
-
let n = new (e.class ??
|
|
986
|
+
let n = new (e.class ?? q)(e);
|
|
987
987
|
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();
|
|
988
988
|
}
|
|
989
989
|
async hideAll() {
|
|
@@ -1051,20 +1051,20 @@ var _e = [
|
|
|
1051
1051
|
S.killTweensOf(e);
|
|
1052
1052
|
}), this.hideAll(), this.toasts = [], super.destroy({ children: !0 });
|
|
1053
1053
|
}
|
|
1054
|
-
},
|
|
1054
|
+
}, J = [
|
|
1055
1055
|
"debug",
|
|
1056
1056
|
"padding",
|
|
1057
1057
|
"size",
|
|
1058
1058
|
"useAppSize",
|
|
1059
1059
|
"useSafeArea",
|
|
1060
1060
|
"layout"
|
|
1061
|
-
],
|
|
1061
|
+
], be = {
|
|
1062
1062
|
top: 0,
|
|
1063
1063
|
right: 0,
|
|
1064
1064
|
bottom: 0,
|
|
1065
1065
|
left: 0
|
|
1066
1066
|
};
|
|
1067
|
-
function
|
|
1067
|
+
function xe(e, t) {
|
|
1068
1068
|
return {
|
|
1069
1069
|
top: e.top + t.top,
|
|
1070
1070
|
right: e.right + t.right,
|
|
@@ -1072,31 +1072,31 @@ function Se(e, t) {
|
|
|
1072
1072
|
left: e.left + t.left
|
|
1073
1073
|
};
|
|
1074
1074
|
}
|
|
1075
|
-
var
|
|
1075
|
+
var Se = {
|
|
1076
1076
|
flexGrow: 0,
|
|
1077
1077
|
flexShrink: 0,
|
|
1078
1078
|
autoLayoutChildren: !0
|
|
1079
|
-
},
|
|
1080
|
-
constructor(
|
|
1079
|
+
}, Ce = n(s()), we = class t extends Ce {
|
|
1080
|
+
constructor(t) {
|
|
1081
1081
|
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) => {
|
|
1082
1082
|
throw Error("UICanvas: Do not call addChildAt() directly. Use addElement(child, { align }) instead.\nExample: uiCanvas.addElement(myChild, { align: 'top right' })");
|
|
1083
1083
|
}, this.setChildIndex = (e, t) => {
|
|
1084
1084
|
throw Error("UICanvas: Do not call setChildIndex() directly. Use reorderElement(child, index), bringToFront(child), or sendToBack(child) instead.\nExample: uiCanvas.reorderElement(myChild, 0)");
|
|
1085
1085
|
}, this.getChildIndex = (e) => super.getChildIndex(e), this.getChildAt = (e) => super.getChildAt(e), !this.app.config.useLayout) throw Error("You must set useLayout to true in your app config to use UICanvas");
|
|
1086
|
-
|
|
1087
|
-
debug:
|
|
1088
|
-
padding:
|
|
1089
|
-
size:
|
|
1086
|
+
e(this), this._positionContainers = /* @__PURE__ */ new Map(), this.config = {
|
|
1087
|
+
debug: t.debug === !0,
|
|
1088
|
+
padding: g(t?.padding ?? 0),
|
|
1089
|
+
size: t.size === void 0 ? {
|
|
1090
1090
|
width: 0,
|
|
1091
1091
|
height: 0
|
|
1092
|
-
} :
|
|
1093
|
-
useAppSize:
|
|
1094
|
-
useSafeArea:
|
|
1095
|
-
autoLayoutChildren:
|
|
1096
|
-
},
|
|
1097
|
-
...
|
|
1098
|
-
...
|
|
1099
|
-
} : this.config.layout = { ...
|
|
1092
|
+
} : l(t.size),
|
|
1093
|
+
useAppSize: t.useAppSize === !0,
|
|
1094
|
+
useSafeArea: t.useSafeArea ?? !0,
|
|
1095
|
+
autoLayoutChildren: t.autoLayoutChildren ?? !0
|
|
1096
|
+
}, t.layout ? typeof t.layout == "boolean" ? this.config.layout = t.layout : this.config.layout = {
|
|
1097
|
+
...Se,
|
|
1098
|
+
...t.layout
|
|
1099
|
+
} : this.config.layout = { ...Se }, this.config.useAppSize && (this.config.size = this.app.size), this.layout = {
|
|
1100
1100
|
width: this.config.size.width,
|
|
1101
1101
|
height: this.config.size.height,
|
|
1102
1102
|
flexDirection: "column",
|
|
@@ -1201,7 +1201,7 @@ var Ce = {
|
|
|
1201
1201
|
return this._canvasChildren;
|
|
1202
1202
|
}
|
|
1203
1203
|
get app() {
|
|
1204
|
-
return
|
|
1204
|
+
return h.getInstance();
|
|
1205
1205
|
}
|
|
1206
1206
|
destroy() {
|
|
1207
1207
|
this._disableAddChildError = !0, this.config.debug && k(`UICanvas:${this.uid}`), this._debugGraphics &&= (this._debugGraphics.destroy(), null), this._debugLabel &&= (this._debugLabel.destroy(), null);
|
|
@@ -1218,16 +1218,16 @@ var Ce = {
|
|
|
1218
1218
|
this.config.size = e === void 0 ? {
|
|
1219
1219
|
width: 0,
|
|
1220
1220
|
height: 0
|
|
1221
|
-
} :
|
|
1221
|
+
} : l(e), this.layout = {
|
|
1222
1222
|
width: this.config.size.width,
|
|
1223
1223
|
height: this.config.size.height
|
|
1224
1224
|
}, this.updateLayout();
|
|
1225
1225
|
}
|
|
1226
1226
|
set padding(e) {
|
|
1227
|
-
this.config.padding =
|
|
1227
|
+
this.config.padding = g(e), this._applyPadding(), this._updateLayout();
|
|
1228
1228
|
}
|
|
1229
1229
|
_applyPadding() {
|
|
1230
|
-
let e =
|
|
1230
|
+
let e = xe(this.config.padding, this.config.useSafeArea ? this.app.safeArea : be);
|
|
1231
1231
|
this.layout = {
|
|
1232
1232
|
paddingLeft: e.left,
|
|
1233
1233
|
paddingTop: e.top,
|
|
@@ -1289,17 +1289,17 @@ var Ce = {
|
|
|
1289
1289
|
height: t.height
|
|
1290
1290
|
};
|
|
1291
1291
|
}
|
|
1292
|
-
addElement(
|
|
1293
|
-
let
|
|
1294
|
-
return
|
|
1295
|
-
align:
|
|
1296
|
-
padding:
|
|
1292
|
+
addElement(e, n) {
|
|
1293
|
+
let r = n?.align ?? "top left", i = this._positionContainers.get(r);
|
|
1294
|
+
return i ? (t.isFlexContainer(e) && this.addSignalConnection(e.onLayoutComplete.connect(this._updateLayout)), this.settingsMap.set(e, {
|
|
1295
|
+
align: r,
|
|
1296
|
+
padding: n?.padding ? g(n.padding) : {
|
|
1297
1297
|
top: 0,
|
|
1298
1298
|
left: 0,
|
|
1299
1299
|
bottom: 0,
|
|
1300
1300
|
right: 0
|
|
1301
1301
|
}
|
|
1302
|
-
}), this._childMap.set(
|
|
1302
|
+
}), this._childMap.set(e, i), this._canvasChildren = Array.from(this._childMap.keys()), i.add.existing(e), this._childAdded(e), e) : (u.error(`UICanvas:: Invalid position "${r}" for element`), e);
|
|
1303
1303
|
}
|
|
1304
1304
|
removeElement(e) {
|
|
1305
1305
|
let t = this._childMap.get(e);
|
|
@@ -1320,10 +1320,10 @@ var Ce = {
|
|
|
1320
1320
|
return this.reorderElement(e, 0);
|
|
1321
1321
|
}
|
|
1322
1322
|
_childAdded(e) {
|
|
1323
|
-
this.config.autoLayoutChildren && (e.layout ||= !0, e.layout?.style?.width || (e.layout = { width: "auto" }), e.layout?.style?.height || (e.layout = { height: "auto" })), e.on("layout", this._updateLayout),
|
|
1323
|
+
this.config.autoLayoutChildren && (e.layout ||= !0, e.layout?.style?.width || (e.layout = { width: "auto" }), e.layout?.style?.height || (e.layout = { height: "auto" })), e.on("layout", this._updateLayout), f.childAdded(e), this._updateLayout();
|
|
1324
1324
|
}
|
|
1325
1325
|
_childRemoved(e) {
|
|
1326
|
-
this.settingsMap.delete(e), this._childMap.delete(e), this._canvasChildren = Array.from(this._childMap.keys()),
|
|
1326
|
+
this.settingsMap.delete(e), this._childMap.delete(e), this._canvasChildren = Array.from(this._childMap.keys()), f.childRemoved(e);
|
|
1327
1327
|
}
|
|
1328
1328
|
_added() {
|
|
1329
1329
|
this._updateLayout();
|
|
@@ -1454,25 +1454,25 @@ var je = [
|
|
|
1454
1454
|
"anchor"
|
|
1455
1455
|
];
|
|
1456
1456
|
function Z(e) {
|
|
1457
|
-
let t = e.applies ?? je, n = t.includes("position"), r = t.includes("scale"), i = t.includes("pivot"), a = t.includes("anchor"),
|
|
1457
|
+
let t = e.applies ?? je, n = t.includes("position"), r = t.includes("scale"), i = t.includes("pivot"), a = t.includes("anchor"), s = [...Me, ...e.exclude ?? []];
|
|
1458
1458
|
return (t) => {
|
|
1459
1459
|
let c = e.build(t);
|
|
1460
1460
|
if (t == null) return c;
|
|
1461
1461
|
let l = t;
|
|
1462
|
-
return n &&
|
|
1462
|
+
return n && F({
|
|
1463
1463
|
position: l.position,
|
|
1464
1464
|
x: l.x,
|
|
1465
1465
|
y: l.y
|
|
1466
|
-
}, c), r &&
|
|
1466
|
+
}, c), r && I({
|
|
1467
1467
|
scale: l.scale,
|
|
1468
1468
|
scaleX: l.scaleX,
|
|
1469
1469
|
scaleY: l.scaleY
|
|
1470
|
-
}, c), i &&
|
|
1470
|
+
}, c), i && R(l.pivot, c), a && L(l.anchor, c), M(o(s, l), c), c;
|
|
1471
1471
|
};
|
|
1472
1472
|
}
|
|
1473
1473
|
//#endregion
|
|
1474
1474
|
//#region src/mixins/factory/const.ts
|
|
1475
|
-
var Ne = /* @__PURE__ */
|
|
1475
|
+
var Ne = /* @__PURE__ */ t({ defaultFactoryMethods: () => $ }), Q = [
|
|
1476
1476
|
"text",
|
|
1477
1477
|
"roundPixels",
|
|
1478
1478
|
"resolution",
|
|
@@ -1483,37 +1483,37 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1483
1483
|
existing: (e, t) => {
|
|
1484
1484
|
if (!t) return e;
|
|
1485
1485
|
let { position: n, x: r, y: i, pivot: a, scale: o, scaleX: s, scaleY: c, ...l } = t;
|
|
1486
|
-
return
|
|
1486
|
+
return F({
|
|
1487
1487
|
position: n,
|
|
1488
1488
|
x: r,
|
|
1489
1489
|
y: i
|
|
1490
|
-
}, e),
|
|
1490
|
+
}, e), I({
|
|
1491
1491
|
scale: o,
|
|
1492
1492
|
scaleX: s,
|
|
1493
1493
|
scaleY: c
|
|
1494
|
-
}, e),
|
|
1494
|
+
}, e), R(a, e), M(l, e), e;
|
|
1495
1495
|
},
|
|
1496
1496
|
container: Z({
|
|
1497
|
-
build: (e) => new
|
|
1497
|
+
build: (e) => new f(e ? p(e, d) : void 0),
|
|
1498
1498
|
applies: [
|
|
1499
1499
|
"position",
|
|
1500
1500
|
"scale",
|
|
1501
1501
|
"pivot"
|
|
1502
1502
|
],
|
|
1503
|
-
exclude:
|
|
1503
|
+
exclude: d
|
|
1504
1504
|
}),
|
|
1505
1505
|
particleContainer: Z({
|
|
1506
|
-
build: (e) => new
|
|
1506
|
+
build: (e) => new de(e ? p(e, A) : void 0),
|
|
1507
1507
|
applies: [
|
|
1508
1508
|
"position",
|
|
1509
1509
|
"scale",
|
|
1510
1510
|
"pivot"
|
|
1511
1511
|
],
|
|
1512
|
-
exclude:
|
|
1512
|
+
exclude: A
|
|
1513
1513
|
}),
|
|
1514
|
-
texture:
|
|
1514
|
+
texture: P,
|
|
1515
1515
|
sprite: Z({
|
|
1516
|
-
build: (e) => new ae(e ?
|
|
1516
|
+
build: (e) => new ae(e ? P(e) : void 0),
|
|
1517
1517
|
applies: [
|
|
1518
1518
|
"position",
|
|
1519
1519
|
"scale",
|
|
@@ -1523,7 +1523,7 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1523
1523
|
exclude: ["asset", "sheet"]
|
|
1524
1524
|
}),
|
|
1525
1525
|
tilingSprite: Z({
|
|
1526
|
-
build: (e) => new se(e ?
|
|
1526
|
+
build: (e) => new se(e ? P(e) : void 0),
|
|
1527
1527
|
applies: [
|
|
1528
1528
|
"position",
|
|
1529
1529
|
"scale",
|
|
@@ -1533,7 +1533,7 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1533
1533
|
exclude: ["asset", "sheet"]
|
|
1534
1534
|
}),
|
|
1535
1535
|
animatedSprite: Z({
|
|
1536
|
-
build: (e) => new
|
|
1536
|
+
build: (e) => new z(e),
|
|
1537
1537
|
applies: [
|
|
1538
1538
|
"position",
|
|
1539
1539
|
"scale",
|
|
@@ -1554,7 +1554,7 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1554
1554
|
]
|
|
1555
1555
|
}),
|
|
1556
1556
|
graphics: Z({
|
|
1557
|
-
build: (e) => new
|
|
1557
|
+
build: (e) => new y(),
|
|
1558
1558
|
applies: [
|
|
1559
1559
|
"position",
|
|
1560
1560
|
"scale",
|
|
@@ -1562,16 +1562,16 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1562
1562
|
]
|
|
1563
1563
|
}),
|
|
1564
1564
|
svg(e) {
|
|
1565
|
-
let t = new
|
|
1566
|
-
return delete l.ctx,
|
|
1565
|
+
let t = new fe(e.ctx), { position: n, x: r, y: i, pivot: a, scale: o, scaleX: s, scaleY: c, ...l } = e;
|
|
1566
|
+
return delete l.ctx, F({
|
|
1567
1567
|
position: n,
|
|
1568
1568
|
x: r,
|
|
1569
1569
|
y: i
|
|
1570
|
-
}, t),
|
|
1570
|
+
}, t), I({
|
|
1571
1571
|
scale: o,
|
|
1572
1572
|
scaleX: s,
|
|
1573
1573
|
scaleY: c
|
|
1574
|
-
}, t),
|
|
1574
|
+
}, t), R(a, t), M(l, t), t;
|
|
1575
1575
|
},
|
|
1576
1576
|
text: Z({
|
|
1577
1577
|
build: (e) => new x(e ? {
|
|
@@ -1579,8 +1579,8 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1579
1579
|
roundPixels: e.roundPixels,
|
|
1580
1580
|
resolution: e.resolution,
|
|
1581
1581
|
style: e.style,
|
|
1582
|
-
anchor: e.anchor ?
|
|
1583
|
-
pivot: e.pivot ?
|
|
1582
|
+
anchor: e.anchor ? a(e.anchor, !0) : void 0,
|
|
1583
|
+
pivot: e.pivot ? a(e.pivot, !0) : void 0
|
|
1584
1584
|
} : {}),
|
|
1585
1585
|
applies: [
|
|
1586
1586
|
"position",
|
|
@@ -1590,13 +1590,13 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1590
1590
|
exclude: [...Q]
|
|
1591
1591
|
}),
|
|
1592
1592
|
htmlText: Z({
|
|
1593
|
-
build: (e) => new
|
|
1593
|
+
build: (e) => new ie(e ? {
|
|
1594
1594
|
text: e.text,
|
|
1595
1595
|
roundPixels: e.roundPixels,
|
|
1596
1596
|
resolution: e.resolution,
|
|
1597
1597
|
style: e.style,
|
|
1598
|
-
anchor: e.anchor ?
|
|
1599
|
-
pivot: e.pivot ?
|
|
1598
|
+
anchor: e.anchor ? a(e.anchor, !0) : void 0,
|
|
1599
|
+
pivot: e.pivot ? a(e.pivot, !0) : void 0
|
|
1600
1600
|
} : {}),
|
|
1601
1601
|
applies: [
|
|
1602
1602
|
"position",
|
|
@@ -1606,12 +1606,12 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1606
1606
|
exclude: [...Q]
|
|
1607
1607
|
}),
|
|
1608
1608
|
bitmapText: Z({
|
|
1609
|
-
build: (e) => new
|
|
1609
|
+
build: (e) => new v(e ? {
|
|
1610
1610
|
text: e.text,
|
|
1611
1611
|
roundPixels: e.roundPixels,
|
|
1612
1612
|
style: e.style,
|
|
1613
|
-
anchor: e.anchor ?
|
|
1614
|
-
pivot: e.pivot ?
|
|
1613
|
+
anchor: e.anchor ? a(e.anchor, !0) : void 0,
|
|
1614
|
+
pivot: e.pivot ? a(e.pivot, !0) : void 0
|
|
1615
1615
|
} : {}),
|
|
1616
1616
|
applies: [
|
|
1617
1617
|
"position",
|
|
@@ -1621,7 +1621,7 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1621
1621
|
exclude: [...Q]
|
|
1622
1622
|
}),
|
|
1623
1623
|
button: Z({
|
|
1624
|
-
build: (e) => new W(e ?
|
|
1624
|
+
build: (e) => new W(e ? p(e, U) : void 0),
|
|
1625
1625
|
applies: [
|
|
1626
1626
|
"position",
|
|
1627
1627
|
"scale",
|
|
@@ -1639,13 +1639,13 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1639
1639
|
exclude: _e
|
|
1640
1640
|
}),
|
|
1641
1641
|
uiCanvas: Z({
|
|
1642
|
-
build: (e) => new
|
|
1642
|
+
build: (e) => new we(e ? p(e, J) : {}),
|
|
1643
1643
|
applies: [
|
|
1644
1644
|
"position",
|
|
1645
1645
|
"scale",
|
|
1646
1646
|
"pivot"
|
|
1647
1647
|
],
|
|
1648
|
-
exclude:
|
|
1648
|
+
exclude: J
|
|
1649
1649
|
}),
|
|
1650
1650
|
spine: Z({
|
|
1651
1651
|
build: (e) => {
|
|
@@ -1675,20 +1675,20 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1675
1675
|
]
|
|
1676
1676
|
}),
|
|
1677
1677
|
spineAnimation: (e) => {
|
|
1678
|
-
let t = new
|
|
1678
|
+
let t = new B(e);
|
|
1679
1679
|
if (!e) return t;
|
|
1680
1680
|
let { position: n, x: r, y: i, anchor: a, pivot: o, scale: s, scaleX: c, scaleY: l, ...u } = e;
|
|
1681
|
-
return
|
|
1681
|
+
return F({
|
|
1682
1682
|
position: n,
|
|
1683
1683
|
x: r,
|
|
1684
1684
|
y: i
|
|
1685
|
-
}, t),
|
|
1685
|
+
}, t), I({
|
|
1686
1686
|
scale: s,
|
|
1687
1687
|
scaleX: c,
|
|
1688
1688
|
scaleY: l
|
|
1689
|
-
}, t),
|
|
1689
|
+
}, t), L(a, t), R(o, t), M(u, t), t;
|
|
1690
1690
|
},
|
|
1691
|
-
toaster: (e, t = {}) => new
|
|
1691
|
+
toaster: (e, t = {}) => new ye(e, t),
|
|
1692
1692
|
entity: (e, t) => {
|
|
1693
1693
|
let n = Ee(e);
|
|
1694
1694
|
if (!n) {
|
|
@@ -1698,15 +1698,15 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1698
1698
|
let r = new n(t);
|
|
1699
1699
|
if (t) {
|
|
1700
1700
|
let { position: e, x: n, y: i, pivot: a, scale: o, scaleX: s, scaleY: c, alpha: l, visible: u } = t;
|
|
1701
|
-
|
|
1701
|
+
F({
|
|
1702
1702
|
position: e,
|
|
1703
1703
|
x: n,
|
|
1704
1704
|
y: i
|
|
1705
|
-
}, r),
|
|
1705
|
+
}, r), I({
|
|
1706
1706
|
scale: o,
|
|
1707
1707
|
scaleX: s,
|
|
1708
1708
|
scaleY: c
|
|
1709
|
-
}, r),
|
|
1709
|
+
}, r), R(a, r), l !== void 0 && (r.alpha = l), u !== void 0 && (r.visible = u);
|
|
1710
1710
|
}
|
|
1711
1711
|
return r;
|
|
1712
1712
|
},
|
|
@@ -1719,21 +1719,21 @@ var Ne = /* @__PURE__ */ r({ defaultFactoryMethods: () => $ }), Q = [
|
|
|
1719
1719
|
let r = new n(t);
|
|
1720
1720
|
if (t) {
|
|
1721
1721
|
let { position: e, x: n, y: i, pivot: a, scale: o, scaleX: s, scaleY: c, alpha: l, visible: u } = t;
|
|
1722
|
-
|
|
1722
|
+
F({
|
|
1723
1723
|
position: e,
|
|
1724
1724
|
x: n,
|
|
1725
1725
|
y: i
|
|
1726
|
-
}, r),
|
|
1726
|
+
}, r), I({
|
|
1727
1727
|
scale: o,
|
|
1728
1728
|
scaleX: s,
|
|
1729
1729
|
scaleY: c
|
|
1730
|
-
}, r),
|
|
1730
|
+
}, r), R(a, r), l !== void 0 && (r.alpha = l), u !== void 0 && (r.visible = u);
|
|
1731
1731
|
}
|
|
1732
1732
|
return r;
|
|
1733
1733
|
}
|
|
1734
1734
|
};
|
|
1735
|
-
|
|
1735
|
+
r($);
|
|
1736
1736
|
//#endregion
|
|
1737
|
-
export { A,
|
|
1737
|
+
export { le as A, F as C, fe as D, M as E, ce as F, O as I, k as L, C as M, T as N, de as O, E as P, R as S, P as T, V as _, we as a, N as b, ye as c, G as d, _e as f, H as g, U as h, De as i, w as j, A as k, q as l, W as m, $ as n, J as o, ge as p, Ae as r, xe as s, Ne as t, K as u, B as v, I as w, L as x, z as y };
|
|
1738
1738
|
|
|
1739
|
-
//# sourceMappingURL=const-
|
|
1739
|
+
//# sourceMappingURL=const-BQ2iMCtc.js.map
|