excalibur 0.32.0-alpha.1575 → 0.32.0-alpha.1577
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/CHANGELOG.md +1 -0
- package/build/dist/EntityComponentSystem/Entity.d.ts +1 -1
- package/build/dist/excalibur.development.js +28 -10
- package/build/dist/excalibur.js +28 -10
- package/build/dist/excalibur.min.development.js +21 -21
- package/build/dist/excalibur.min.js +21 -21
- package/build/esm/excalibur.development.js +28 -10
- package/build/esm/excalibur.js +28 -10
- package/build/esm/excalibur.min.development.js +136 -128
- package/build/esm/excalibur.min.js +136 -128
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! excalibur - 0.32.0-alpha.
|
|
1
|
+
/*! excalibur - 0.32.0-alpha.1577+cbacdb4 - 2025-11-29
|
|
2
2
|
https://github.com/excaliburjs/Excalibur
|
|
3
3
|
Copyright (c) 2025 Excalibur.js <https://github.com/excaliburjs/Excalibur/graphs/contributors>
|
|
4
4
|
Licensed BSD-2-Clause
|
|
@@ -740,7 +740,7 @@ let x = ln;
|
|
|
740
740
|
function w(r, t) {
|
|
741
741
|
return new x(r, t);
|
|
742
742
|
}
|
|
743
|
-
class
|
|
743
|
+
class zs extends x {
|
|
744
744
|
constructor(t) {
|
|
745
745
|
super(0, 0), this._getX = t.getX, this._getY = t.getY, this._setX = t.setX, this._setY = t.setY;
|
|
746
746
|
}
|
|
@@ -842,8 +842,8 @@ class Tt {
|
|
|
842
842
|
const i = e || new x(0, 0), s = t, n = s.x * this.data[0] + s.y * this.data[4] + this.data[12], o = s.x * this.data[1] + s.y * this.data[5] + this.data[13];
|
|
843
843
|
return i.x = n, i.y = o, i;
|
|
844
844
|
} else {
|
|
845
|
-
const i = e || new Tt(), s = t, n = this.data[0], o = this.data[1], a = this.data[2], h = this.data[3], l = this.data[4], c = this.data[5], d = this.data[6], u = this.data[7], _ = this.data[8], p = this.data[9], g = this.data[10], v = this.data[11], m = this.data[12], f = this.data[13], b = this.data[14], C = this.data[15], S = s.data[0], E = s.data[1], y = s.data[2], k = s.data[3], L = s.data[4], O = s.data[5], Q = s.data[6], st = s.data[7], X = s.data[8],
|
|
846
|
-
i.data[0] = n * S + l * E + _ * y + m * k, i.data[1] = o * S + c * E + p * y + f * k, i.data[2] = a * S + d * E + g * y + b * k, i.data[3] = h * S + u * E + v * y + C * k, i.data[4] = n * L + l * O + _ * Q + m * st, i.data[5] = o * L + c * O + p * Q + f * st, i.data[6] = a * L + d * O + g * Q + b * st, i.data[7] = h * L + u * O + v * Q + C * st, i.data[8] = n * X + l *
|
|
845
|
+
const i = e || new Tt(), s = t, n = this.data[0], o = this.data[1], a = this.data[2], h = this.data[3], l = this.data[4], c = this.data[5], d = this.data[6], u = this.data[7], _ = this.data[8], p = this.data[9], g = this.data[10], v = this.data[11], m = this.data[12], f = this.data[13], b = this.data[14], C = this.data[15], S = s.data[0], E = s.data[1], y = s.data[2], k = s.data[3], L = s.data[4], O = s.data[5], Q = s.data[6], st = s.data[7], X = s.data[8], U = s.data[9], ot = s.data[10], ct = s.data[11], A = s.data[12], oe = s.data[13], ae = s.data[14], he = s.data[15];
|
|
846
|
+
i.data[0] = n * S + l * E + _ * y + m * k, i.data[1] = o * S + c * E + p * y + f * k, i.data[2] = a * S + d * E + g * y + b * k, i.data[3] = h * S + u * E + v * y + C * k, i.data[4] = n * L + l * O + _ * Q + m * st, i.data[5] = o * L + c * O + p * Q + f * st, i.data[6] = a * L + d * O + g * Q + b * st, i.data[7] = h * L + u * O + v * Q + C * st, i.data[8] = n * X + l * U + _ * ot + m * ct, i.data[9] = o * X + c * U + p * ot + f * ct, i.data[10] = a * X + d * U + g * ot + b * ct, i.data[11] = h * X + u * U + v * ot + C * ct, i.data[12] = n * A + l * oe + _ * ae + m * he, i.data[13] = o * A + c * oe + p * ae + f * he, i.data[14] = a * A + d * oe + g * ae + b * he, i.data[15] = h * A + u * oe + v * ae + C * he;
|
|
847
847
|
const Le = this.getScale();
|
|
848
848
|
return i._scaleSignX = q(Le.x) * q(i._scaleSignX), i._scaleSignY = q(Le.y) * q(i._scaleSignY), i;
|
|
849
849
|
}
|
|
@@ -1161,7 +1161,7 @@ class re {
|
|
|
1161
1161
|
constructor() {
|
|
1162
1162
|
this._parent = null, this._children = [], this._pos = new ie(w(0, 0), () => {
|
|
1163
1163
|
this.flagDirty();
|
|
1164
|
-
}), this._globalPos = new
|
|
1164
|
+
}), this._globalPos = new zs({
|
|
1165
1165
|
getX: () => this.matrix.data[4],
|
|
1166
1166
|
getY: () => this.matrix.data[5],
|
|
1167
1167
|
setX: (t) => {
|
|
@@ -1182,7 +1182,7 @@ class re {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
}), this._rotation = 0, this._scale = new ie(w(1, 1), () => {
|
|
1184
1184
|
this.flagDirty();
|
|
1185
|
-
}), this._globalScale = new
|
|
1185
|
+
}), this._globalScale = new zs({
|
|
1186
1186
|
getX: () => this.parent ? this.matrix.getScaleX() : this.scale.x,
|
|
1187
1187
|
getY: () => this.parent ? this.matrix.getScaleY() : this.scale.y,
|
|
1188
1188
|
setX: (t) => {
|
|
@@ -1736,9 +1736,9 @@ class dn {
|
|
|
1736
1736
|
return [];
|
|
1737
1737
|
let a;
|
|
1738
1738
|
i ? a = "directed" in i ? i.directed : !1 : a = !1;
|
|
1739
|
-
const h = new
|
|
1739
|
+
const h = new Us(t, e, i);
|
|
1740
1740
|
if (this._edges.add(h), t.registerNewEdge(h), e.registerNewEdge(h), (s = this.adjacencyList.get(t.id)) == null || s.add(e.id), !a) {
|
|
1741
|
-
const l = new
|
|
1741
|
+
const l = new Us(e, t, i);
|
|
1742
1742
|
return (n = this.adjacencyList.get(e.id)) == null || n.add(t.id), this._edges.add(l), e.registerNewEdge(l), t.registerNewEdge(l), h.linkWithPartner(l), l.linkWithPartner(h), [h, l];
|
|
1743
1743
|
}
|
|
1744
1744
|
return [h];
|
|
@@ -2004,7 +2004,7 @@ class dn {
|
|
|
2004
2004
|
return Math.sqrt((s.x - i.x) ** 2 + (s.y - i.y) ** 2);
|
|
2005
2005
|
}
|
|
2006
2006
|
}
|
|
2007
|
-
class
|
|
2007
|
+
class Us {
|
|
2008
2008
|
// Reference to the opposite direction edge
|
|
2009
2009
|
constructor(t, e, i) {
|
|
2010
2010
|
this._id = hs.generateUUID(), this._weight = 0, this._partnerEdge = null, this._source = t, this._target = e, i && i.weight ? this._weight = i.weight : i && i.useEuclidean ? this._weight = t.pos.distance(e.pos) : this._weight = 0;
|
|
@@ -3267,12 +3267,12 @@ class Ln extends B {
|
|
|
3267
3267
|
super(), this.context = t, this.self = e, this.target = e;
|
|
3268
3268
|
}
|
|
3269
3269
|
}
|
|
3270
|
-
class
|
|
3270
|
+
class zn extends B {
|
|
3271
3271
|
constructor(t) {
|
|
3272
3272
|
super(), this.self = t, this.target = t;
|
|
3273
3273
|
}
|
|
3274
3274
|
}
|
|
3275
|
-
class
|
|
3275
|
+
class Un extends B {
|
|
3276
3276
|
constructor(t) {
|
|
3277
3277
|
super(), this.self = t, this.target = t;
|
|
3278
3278
|
}
|
|
@@ -3321,10 +3321,10 @@ const El = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3321
3321
|
ContactStartEvent: qi,
|
|
3322
3322
|
DeactivateEvent: Ln,
|
|
3323
3323
|
EnterTriggerEvent: Hn,
|
|
3324
|
-
EnterViewPortEvent:
|
|
3324
|
+
EnterViewPortEvent: Un,
|
|
3325
3325
|
EventTypes: mn,
|
|
3326
3326
|
ExitTriggerEvent: On,
|
|
3327
|
-
ExitViewPortEvent:
|
|
3327
|
+
ExitViewPortEvent: zn,
|
|
3328
3328
|
GameEvent: B,
|
|
3329
3329
|
GameStartEvent: bn,
|
|
3330
3330
|
GameStopEvent: yn,
|
|
@@ -3360,7 +3360,7 @@ function qn(r) {
|
|
|
3360
3360
|
r[i] < t && (t = r[i], e = i);
|
|
3361
3361
|
return e;
|
|
3362
3362
|
}
|
|
3363
|
-
function
|
|
3363
|
+
function ze(r) {
|
|
3364
3364
|
if (r && r.getBoundingClientRect) {
|
|
3365
3365
|
const t = r.getBoundingClientRect();
|
|
3366
3366
|
return w(t.x + window.scrollX, t.y + window.scrollY);
|
|
@@ -3731,7 +3731,7 @@ const Dl = {
|
|
|
3731
3731
|
!this.isAdded && this.isActive && (this.onAdd(t), this.events.emit("add", new Vn(t, this)), this._isAdded = !0);
|
|
3732
3732
|
}
|
|
3733
3733
|
/**
|
|
3734
|
-
* Removes Actor, meant to be called by the Scene when Actor is
|
|
3734
|
+
* Removes Actor, meant to be called by the Scene when Actor is removed.
|
|
3735
3735
|
*
|
|
3736
3736
|
* It is not recommended that internal excalibur methods be overridden, do so at your own risk.
|
|
3737
3737
|
* @internal
|
|
@@ -3864,22 +3864,22 @@ class go {
|
|
|
3864
3864
|
}
|
|
3865
3865
|
}
|
|
3866
3866
|
removeEntity(t, e = !0) {
|
|
3867
|
-
var i, s;
|
|
3868
|
-
let
|
|
3869
|
-
t instanceof Rt ?
|
|
3870
|
-
const
|
|
3871
|
-
if (
|
|
3872
|
-
this._entitiesToRemove.push(
|
|
3867
|
+
var i, s, n, o;
|
|
3868
|
+
let a = 0;
|
|
3869
|
+
t instanceof Rt ? a = t.id : a = t;
|
|
3870
|
+
const h = this._entityIndex[a];
|
|
3871
|
+
if (h && h.isActive && (h.isActive = !1), h && e) {
|
|
3872
|
+
this._entitiesToRemove.push(h);
|
|
3873
3873
|
return;
|
|
3874
3874
|
}
|
|
3875
|
-
if (delete this._entityIndex[
|
|
3876
|
-
|
|
3877
|
-
|
|
3875
|
+
if (delete this._entityIndex[a], h) {
|
|
3876
|
+
h.scene = null, Be(h, this.entities), this._world.queryManager.removeEntity(h), h.children.forEach((d) => {
|
|
3877
|
+
d.scene = null, this.removeEntity(d, e);
|
|
3878
3878
|
});
|
|
3879
|
-
const
|
|
3880
|
-
|
|
3881
|
-
const
|
|
3882
|
-
|
|
3879
|
+
const l = this._childAddedHandlerMap.get(h);
|
|
3880
|
+
l && (h.childrenAdded$.unsubscribe(l), this._childAddedHandlerMap.delete(h));
|
|
3881
|
+
const c = this._childRemovedHandlerMap.get(h);
|
|
3882
|
+
c && (h.childrenRemoved$.unsubscribe(c), this._childRemovedHandlerMap.delete(h)), h._remove((s = (i = this._world) == null ? void 0 : i.scene) == null ? void 0 : s.engine), (o = (n = this._world) == null ? void 0 : n.scene) != null && o.engine && this._world.scene.engine.stats.currFrame.actors.killed++;
|
|
3883
3883
|
}
|
|
3884
3884
|
}
|
|
3885
3885
|
processEntityRemovals() {
|
|
@@ -3904,7 +3904,7 @@ class go {
|
|
|
3904
3904
|
this.removeEntity(this.entities[t]);
|
|
3905
3905
|
}
|
|
3906
3906
|
}
|
|
3907
|
-
class
|
|
3907
|
+
class zt {
|
|
3908
3908
|
constructor(t) {
|
|
3909
3909
|
this._entities = [], this.entitiesSet = /* @__PURE__ */ new Set(), this.entityAdded$ = new xt(), this.entityRemoved$ = new xt(), this.filter = {
|
|
3910
3910
|
components: {
|
|
@@ -3919,7 +3919,7 @@ class Ut {
|
|
|
3919
3919
|
}
|
|
3920
3920
|
}, this._dirty = !1;
|
|
3921
3921
|
var e, i, s, n, o, a, h, l, c, d, u, _;
|
|
3922
|
-
Array.isArray(t) && (t = { components: { all: t } }), this.filter.components.all = new Set((i = (e = t.components) == null ? void 0 : e.all) != null ? i : []), this.filter.components.any = new Set((n = (s = t.components) == null ? void 0 : s.any) != null ? n : []), this.filter.components.not = new Set((a = (o = t.components) == null ? void 0 : o.not) != null ? a : []), this.filter.tags.all = new Set((l = (h = t.tags) == null ? void 0 : h.all) != null ? l : []), this.filter.tags.any = new Set((d = (c = t.tags) == null ? void 0 : c.any) != null ? d : []), this.filter.tags.not = new Set((_ = (u = t.tags) == null ? void 0 : u.not) != null ? _ : []), this.id =
|
|
3922
|
+
Array.isArray(t) && (t = { components: { all: t } }), this.filter.components.all = new Set((i = (e = t.components) == null ? void 0 : e.all) != null ? i : []), this.filter.components.any = new Set((n = (s = t.components) == null ? void 0 : s.any) != null ? n : []), this.filter.components.not = new Set((a = (o = t.components) == null ? void 0 : o.not) != null ? a : []), this.filter.tags.all = new Set((l = (h = t.tags) == null ? void 0 : h.all) != null ? l : []), this.filter.tags.any = new Set((d = (c = t.tags) == null ? void 0 : c.any) != null ? d : []), this.filter.tags.not = new Set((_ = (u = t.tags) == null ? void 0 : u.not) != null ? _ : []), this.id = zt.createId(t);
|
|
3923
3923
|
}
|
|
3924
3924
|
get entities() {
|
|
3925
3925
|
return this._dirty && (this._entities = Array.from(this.entitiesSet), this._dirty = !1), this._entities;
|
|
@@ -3927,7 +3927,7 @@ class Ut {
|
|
|
3927
3927
|
static createId(t) {
|
|
3928
3928
|
var e, i, s, n, o, a, h, l, c, d, u, _;
|
|
3929
3929
|
Array.isArray(t) && (t = { components: { all: t } });
|
|
3930
|
-
const p = (e = t.components) != null && e.any ? `any_${
|
|
3930
|
+
const p = (e = t.components) != null && e.any ? `any_${zt.hashComponents(new Set((i = t.components) == null ? void 0 : i.any))}` : "", g = (s = t.components) != null && s.all ? `all_${zt.hashComponents(new Set((n = t.components) == null ? void 0 : n.all))}` : "", v = (o = t.components) != null && o.not ? `not_${zt.hashComponents(new Set((a = t.components) == null ? void 0 : a.not))}` : "", m = (h = t.tags) != null && h.any ? `any_${zt.hashTags(new Set((l = t.tags) == null ? void 0 : l.any))}` : "", f = (c = t.tags) != null && c.all ? `all_${zt.hashTags(new Set((d = t.tags) == null ? void 0 : d.all))}` : "", b = (u = t.tags) != null && u.not ? `not_${zt.hashTags(new Set((_ = t.tags) == null ? void 0 : _.not))}` : "";
|
|
3931
3931
|
return [p, g, v, m, f, b].filter(Boolean).join("-");
|
|
3932
3932
|
}
|
|
3933
3933
|
static hashTags(t) {
|
|
@@ -4042,10 +4042,10 @@ class po {
|
|
|
4042
4042
|
};
|
|
4043
4043
|
}
|
|
4044
4044
|
createQuery(t) {
|
|
4045
|
-
const e =
|
|
4045
|
+
const e = zt.createId(t);
|
|
4046
4046
|
if (this._queries.has(e))
|
|
4047
4047
|
return this._queries.get(e);
|
|
4048
|
-
const i = new
|
|
4048
|
+
const i = new zt(t);
|
|
4049
4049
|
this._queries.set(i.id, i);
|
|
4050
4050
|
for (const s of [...i.filter.components.all, ...i.filter.components.any, ...i.filter.components.not]) {
|
|
4051
4051
|
const n = this._componentToQueriesIndex.get(s);
|
|
@@ -5179,7 +5179,7 @@ class lt extends Ai {
|
|
|
5179
5179
|
return t.offset = this.offset.clone(), t;
|
|
5180
5180
|
}
|
|
5181
5181
|
}
|
|
5182
|
-
function
|
|
5182
|
+
function zi(r, t) {
|
|
5183
5183
|
const i = r.dir(), s = t.dir(), n = i.dot(i), o = s.dot(s);
|
|
5184
5184
|
if (n < 1e-9 && o < 1e-9)
|
|
5185
5185
|
return new K(r.begin, t.begin);
|
|
@@ -5203,14 +5203,14 @@ const Yt = {
|
|
|
5203
5203
|
let s = Number.MAX_VALUE, n = null;
|
|
5204
5204
|
for (let o = 0; o < e.length; o++)
|
|
5205
5205
|
for (let a = 0; a < i.length; a++) {
|
|
5206
|
-
const h =
|
|
5206
|
+
const h = zi(e[o], i[a]), l = h.getLength();
|
|
5207
5207
|
l < s && (s = l, n = h);
|
|
5208
5208
|
}
|
|
5209
5209
|
return n;
|
|
5210
5210
|
},
|
|
5211
5211
|
PolygonEdgeClosestLine(r, t) {
|
|
5212
5212
|
const i = t.worldPos.sub(r.worldPos), s = new Ce(r.worldPos, i), n = r.rayCast(s).point.add(s.dir.scale(0.1)), o = r.getClosestFace(n), a = t.asLine();
|
|
5213
|
-
return
|
|
5213
|
+
return zi(o.face, a);
|
|
5214
5214
|
},
|
|
5215
5215
|
PolygonCircleClosestLine(r, t) {
|
|
5216
5216
|
const e = t.worldPos, i = e.sub(r.worldPos), s = new Ce(r.worldPos, i.normalize()), n = r.rayCast(s).point.add(s.dir.scale(0.1)), o = r.getClosestFace(n), a = o.face.begin, h = o.face.getEdge();
|
|
@@ -5232,7 +5232,7 @@ const Yt = {
|
|
|
5232
5232
|
},
|
|
5233
5233
|
EdgeEdgeClosestLine(r, t) {
|
|
5234
5234
|
const e = r.asLine(), i = t.asLine();
|
|
5235
|
-
return
|
|
5235
|
+
return zi(e, i);
|
|
5236
5236
|
}
|
|
5237
5237
|
};
|
|
5238
5238
|
class _t extends Ai {
|
|
@@ -5337,11 +5337,11 @@ class _t extends Ai {
|
|
|
5337
5337
|
*/
|
|
5338
5338
|
collide(t) {
|
|
5339
5339
|
if (t instanceof _t)
|
|
5340
|
-
return
|
|
5340
|
+
return Ut.CollideCircleCircle(this, t);
|
|
5341
5341
|
if (t instanceof dt)
|
|
5342
|
-
return
|
|
5342
|
+
return Ut.CollideCirclePolygon(this, t);
|
|
5343
5343
|
if (t instanceof At)
|
|
5344
|
-
return
|
|
5344
|
+
return Ut.CollideCircleEdge(this, t);
|
|
5345
5345
|
throw new Error(`Circle could not collide with unknown CollisionShape ${typeof t}`);
|
|
5346
5346
|
}
|
|
5347
5347
|
/**
|
|
@@ -5546,7 +5546,7 @@ xe._SCRATCH_NORMAL = w(0, 0);
|
|
|
5546
5546
|
xe._SCRATCH_MATRIX = Z.identity();
|
|
5547
5547
|
let We = xe;
|
|
5548
5548
|
We.SeparationPool.disableWarnings = !0;
|
|
5549
|
-
const bo = x.Zero, yo = x.Zero, Co = Z.identity(),
|
|
5549
|
+
const bo = x.Zero, yo = x.Zero, Co = Z.identity(), Ut = {
|
|
5550
5550
|
CollideCircleCircle(r, t) {
|
|
5551
5551
|
const e = r.worldPos, i = t.worldPos, s = r.radius + t.radius, n = e.distance(i);
|
|
5552
5552
|
if (n > s)
|
|
@@ -5810,11 +5810,11 @@ class At extends Ai {
|
|
|
5810
5810
|
*/
|
|
5811
5811
|
collide(t) {
|
|
5812
5812
|
if (t instanceof _t)
|
|
5813
|
-
return
|
|
5813
|
+
return Ut.CollideCircleEdge(t, this);
|
|
5814
5814
|
if (t instanceof dt)
|
|
5815
|
-
return
|
|
5815
|
+
return Ut.CollidePolygonEdge(t, this);
|
|
5816
5816
|
if (t instanceof At)
|
|
5817
|
-
return
|
|
5817
|
+
return Ut.CollideEdgeEdge();
|
|
5818
5818
|
throw new Error(`Edge could not collide with unknown CollisionShape ${typeof t}`);
|
|
5819
5819
|
}
|
|
5820
5820
|
/**
|
|
@@ -6162,11 +6162,11 @@ class dt extends Ai {
|
|
|
6162
6162
|
*/
|
|
6163
6163
|
collide(t) {
|
|
6164
6164
|
if (t instanceof _t)
|
|
6165
|
-
return
|
|
6165
|
+
return Ut.CollideCirclePolygon(t, this);
|
|
6166
6166
|
if (t instanceof dt)
|
|
6167
|
-
return
|
|
6167
|
+
return Ut.CollidePolygonPolygon(this, t);
|
|
6168
6168
|
if (t instanceof At)
|
|
6169
|
-
return
|
|
6169
|
+
return Ut.CollidePolygonEdge(this, t);
|
|
6170
6170
|
throw new Error(`Polygon could not collide with unknown CollisionShape ${typeof t}`);
|
|
6171
6171
|
}
|
|
6172
6172
|
/**
|
|
@@ -7330,7 +7330,7 @@ ii.filtering = wt.Blended;
|
|
|
7330
7330
|
ii.wrapping = { x: gt.Clamp, y: gt.Clamp };
|
|
7331
7331
|
ii._MAX_TEXTURE_SIZE = 4096;
|
|
7332
7332
|
let Ve = ii;
|
|
7333
|
-
const
|
|
7333
|
+
const z = {
|
|
7334
7334
|
Filtering: "filtering",
|
|
7335
7335
|
WrappingX: "wrapping-x",
|
|
7336
7336
|
WrappingY: "wrapping-y"
|
|
@@ -7374,7 +7374,7 @@ class $t {
|
|
|
7374
7374
|
*/
|
|
7375
7375
|
static fromHtmlImageElement(t, e) {
|
|
7376
7376
|
const i = new $t("");
|
|
7377
|
-
if (i._src = "image-element", i.data = t, i.data.setAttribute("data-original-src", "image-element"), e != null && e.filtering ? i.data.setAttribute(
|
|
7377
|
+
if (i._src = "image-element", i.data = t, i.data.setAttribute("data-original-src", "image-element"), e != null && e.filtering ? i.data.setAttribute(z.Filtering, e == null ? void 0 : e.filtering) : i.data.setAttribute(z.Filtering, wt.Blended), e != null && e.wrapping) {
|
|
7378
7378
|
let s;
|
|
7379
7379
|
typeof e.wrapping == "string" ? s = {
|
|
7380
7380
|
x: e.wrapping,
|
|
@@ -7382,14 +7382,14 @@ class $t {
|
|
|
7382
7382
|
} : s = {
|
|
7383
7383
|
x: e.wrapping.x,
|
|
7384
7384
|
y: e.wrapping.y
|
|
7385
|
-
}, i.data.setAttribute(
|
|
7385
|
+
}, i.data.setAttribute(z.WrappingX, s.x), i.data.setAttribute(z.WrappingY, s.y);
|
|
7386
7386
|
} else
|
|
7387
|
-
i.data.setAttribute(
|
|
7387
|
+
i.data.setAttribute(z.WrappingX, gt.Clamp), i.data.setAttribute(z.WrappingY, gt.Clamp);
|
|
7388
7388
|
return Ve.checkImageSizeSupportedAndLog(t), i._readyFuture.resolve(t), i;
|
|
7389
7389
|
}
|
|
7390
7390
|
static fromHtmlCanvasElement(t, e) {
|
|
7391
7391
|
const i = new $t("");
|
|
7392
|
-
if (i._src = "canvas-element-blob", i.data.setAttribute("data-original-src", "canvas-element-blob"), e != null && e.filtering ? i.data.setAttribute(
|
|
7392
|
+
if (i._src = "canvas-element-blob", i.data.setAttribute("data-original-src", "canvas-element-blob"), e != null && e.filtering ? i.data.setAttribute(z.Filtering, e == null ? void 0 : e.filtering) : i.data.setAttribute(z.Filtering, wt.Blended), e != null && e.wrapping) {
|
|
7393
7393
|
let s;
|
|
7394
7394
|
typeof e.wrapping == "string" ? s = {
|
|
7395
7395
|
x: e.wrapping,
|
|
@@ -7397,9 +7397,9 @@ class $t {
|
|
|
7397
7397
|
} : s = {
|
|
7398
7398
|
x: e.wrapping.x,
|
|
7399
7399
|
y: e.wrapping.y
|
|
7400
|
-
}, i.data.setAttribute(
|
|
7400
|
+
}, i.data.setAttribute(z.WrappingX, s.x), i.data.setAttribute(z.WrappingY, s.y);
|
|
7401
7401
|
} else
|
|
7402
|
-
i.data.setAttribute(
|
|
7402
|
+
i.data.setAttribute(z.WrappingX, gt.Clamp), i.data.setAttribute(z.WrappingY, gt.Clamp);
|
|
7403
7403
|
return Ve.checkImageSizeSupportedAndLog(t), t.toBlob((s) => {
|
|
7404
7404
|
const n = URL.createObjectURL(s);
|
|
7405
7405
|
i.image.onload = () => {
|
|
@@ -7441,7 +7441,7 @@ class $t {
|
|
|
7441
7441
|
} catch (n) {
|
|
7442
7442
|
throw `Error loading ImageSource from path '${this.path}' with error [${n.message}]`;
|
|
7443
7443
|
}
|
|
7444
|
-
return this.data.setAttribute(
|
|
7444
|
+
return this.data.setAttribute(z.Filtering, this.filtering), this.data.setAttribute(z.WrappingX, (e = (t = this.wrapping) == null ? void 0 : t.x) != null ? e : gt.Clamp), this.data.setAttribute(z.WrappingY, (s = (i = this.wrapping) == null ? void 0 : i.y) != null ? s : gt.Clamp), this._readyFuture.resolve(this.data), this.data;
|
|
7445
7445
|
}
|
|
7446
7446
|
/**
|
|
7447
7447
|
* Build a sprite from this ImageSource
|
|
@@ -8070,7 +8070,7 @@ ke._TEXT_USAGE = /* @__PURE__ */ new Map();
|
|
|
8070
8070
|
ke._TEXT_CACHE = /* @__PURE__ */ new Map();
|
|
8071
8071
|
ke._MEASURE_CACHE = /* @__PURE__ */ new Map();
|
|
8072
8072
|
let ts = ke;
|
|
8073
|
-
function
|
|
8073
|
+
function zo(r, t, e, i) {
|
|
8074
8074
|
if (r.parent !== t.parent) {
|
|
8075
8075
|
const c = r.clone(), d = r.globalPos.clone(), u = r.globalScale.clone(), _ = r.globalRotation;
|
|
8076
8076
|
c.parent = t.parent, c.globalPos = d, c.globalScale = u, c.globalRotation = _, r = c;
|
|
@@ -8160,7 +8160,7 @@ class pr extends Ft {
|
|
|
8160
8160
|
let a = n.get();
|
|
8161
8161
|
if (o && this._engine.fixedUpdateTimestep && o.__oldTransformCaptured && o.enableFixedUpdateInterpolate) {
|
|
8162
8162
|
const h = this._engine.currentFrameLagMs / this._engine.fixedUpdateTimestep;
|
|
8163
|
-
a =
|
|
8163
|
+
a = zo(o.oldTransform, n.get(), h, this._targetInterpolationTransform);
|
|
8164
8164
|
}
|
|
8165
8165
|
this._graphicsContext.z = n.globalZ, this._graphicsContext.translate(a.pos.x, a.pos.y), this._graphicsContext.scale(a.scale.x, a.scale.y), this._graphicsContext.rotate(a.rotation);
|
|
8166
8166
|
}
|
|
@@ -8195,7 +8195,7 @@ class mr extends Ft {
|
|
|
8195
8195
|
o = this._camera.pos.scale(h);
|
|
8196
8196
|
}
|
|
8197
8197
|
const a = this._isOffscreen(t, e, o);
|
|
8198
|
-
a && !n.hasTag("ex.offscreen") && (n.events.emit("exitviewport", new
|
|
8198
|
+
a && !n.hasTag("ex.offscreen") && (n.events.emit("exitviewport", new zn(n)), n.addTag("ex.offscreen")), !a && n.hasTag("ex.offscreen") && (n.events.emit("enterviewport", new Un(n)), n.removeTag("ex.offscreen"));
|
|
8199
8199
|
}
|
|
8200
8200
|
}
|
|
8201
8201
|
_isOffscreen(t, e, i) {
|
|
@@ -8306,7 +8306,7 @@ class ms extends Ke {
|
|
|
8306
8306
|
(e = this._options) != null && e.draw && ((i = this._options) == null || i.draw(t)), this._options.cache || this.flagDirty();
|
|
8307
8307
|
}
|
|
8308
8308
|
}
|
|
8309
|
-
var
|
|
8309
|
+
var Uo = /* @__PURE__ */ ((r) => (r.Stretch = "stretch", r.Tile = "tile", r.TileFit = "tile-fit", r))(Uo || {});
|
|
8310
8310
|
class vr extends nt {
|
|
8311
8311
|
constructor(t) {
|
|
8312
8312
|
super(t), this._logger = I.getInstance(), this._config = t, this._imgSource = t.source, this._canvasA = document.createElement("canvas"), this._canvasB = document.createElement("canvas"), this._canvasC = document.createElement("canvas"), this._canvasD = document.createElement("canvas"), this._canvasE = document.createElement("canvas"), this._canvasF = document.createElement("canvas"), this._canvasG = document.createElement("canvas"), this._canvasH = document.createElement("canvas"), this._canvasI = document.createElement("canvas"), this._initialize(), this._imgSource.ready.then(() => {
|
|
@@ -9168,7 +9168,7 @@ function Vo(r, t) {
|
|
|
9168
9168
|
throw new Error(`Unknown uniform type: ${t}`);
|
|
9169
9169
|
}
|
|
9170
9170
|
}
|
|
9171
|
-
const Sr = class
|
|
9171
|
+
const Sr = class Ue {
|
|
9172
9172
|
/**
|
|
9173
9173
|
* Create a shader program in excalibur
|
|
9174
9174
|
* @param options specify shader vertex and fragment source
|
|
@@ -9204,14 +9204,14 @@ const Sr = class ze {
|
|
|
9204
9204
|
* Binds the shader program
|
|
9205
9205
|
*/
|
|
9206
9206
|
use() {
|
|
9207
|
-
this._gl.useProgram(this.program),
|
|
9207
|
+
this._gl.useProgram(this.program), Ue._ACTIVE_SHADER_INSTANCE = this, this._dirtyUniforms && (this._setUniforms(), this._dirtyUniforms = !1), this._setImages();
|
|
9208
9208
|
}
|
|
9209
9209
|
unuse() {
|
|
9210
9210
|
const t = this._gl;
|
|
9211
|
-
|
|
9211
|
+
Ue._ACTIVE_SHADER_INSTANCE = null, t.useProgram(null);
|
|
9212
9212
|
}
|
|
9213
9213
|
isCurrentlyBound() {
|
|
9214
|
-
return
|
|
9214
|
+
return Ue._ACTIVE_SHADER_INSTANCE === this;
|
|
9215
9215
|
}
|
|
9216
9216
|
_setUniforms() {
|
|
9217
9217
|
const t = this._gl, e = Object.entries(this.uniforms);
|
|
@@ -9245,7 +9245,7 @@ const Sr = class ze {
|
|
|
9245
9245
|
}
|
|
9246
9246
|
}
|
|
9247
9247
|
_loadImageSource(t) {
|
|
9248
|
-
const e = t.image, i = e.getAttribute(
|
|
9248
|
+
const e = t.image, i = e.getAttribute(z.Filtering), s = i ? ti(i) : void 0, n = Ot(e.getAttribute(z.WrappingX)), o = Ot(e.getAttribute(z.WrappingY)), a = e.getAttribute("forceUpload") === "true", h = this._textureLoader.load(
|
|
9249
9249
|
e,
|
|
9250
9250
|
{
|
|
9251
9251
|
filtering: s,
|
|
@@ -9283,7 +9283,7 @@ const Sr = class ze {
|
|
|
9283
9283
|
const n = this.getUniformDefinitions();
|
|
9284
9284
|
for (const o of n)
|
|
9285
9285
|
this._uniforms[o.name] = o;
|
|
9286
|
-
return this._compiled = !0, this._onPostCompile && this._onPostCompile(this), t.useProgram(this.program),
|
|
9286
|
+
return this._compiled = !0, this._onPostCompile && this._onPostCompile(this), t.useProgram(this.program), Ue._ACTIVE_SHADER_INSTANCE = this, this._dirtyUniforms && (this._setUniforms(), this._dirtyUniforms = !1), this._setImages(!0), this.unuse(), this.program;
|
|
9287
9287
|
}
|
|
9288
9288
|
/**
|
|
9289
9289
|
* Get's the uniform definitons
|
|
@@ -9786,7 +9786,7 @@ class Xo {
|
|
|
9786
9786
|
}), this._shader.compile(), this._shader.use(), this._shader.setUniformMatrix("u_matrix", this._context.ortho);
|
|
9787
9787
|
}
|
|
9788
9788
|
_getTexture(t) {
|
|
9789
|
-
const e = t.getAttribute(
|
|
9789
|
+
const e = t.getAttribute(z.Filtering), i = e ? ti(e) : void 0, s = Ot(t.getAttribute(z.WrappingX)), n = Ot(t.getAttribute(z.WrappingY)), o = t.getAttribute("forceUpload") === "true", a = this._context.textureLoader.load(
|
|
9790
9790
|
t,
|
|
9791
9791
|
{
|
|
9792
9792
|
filtering: i,
|
|
@@ -10751,7 +10751,7 @@ class ca {
|
|
|
10751
10751
|
_addImageAsTexture(t) {
|
|
10752
10752
|
if (this._images.has(t))
|
|
10753
10753
|
return;
|
|
10754
|
-
const e = t.getAttribute(
|
|
10754
|
+
const e = t.getAttribute(z.Filtering), i = e ? ti(e) : void 0, s = Ot(t.getAttribute(z.WrappingX)), n = Ot(t.getAttribute(z.WrappingY)), o = t.getAttribute("forceUpload") === "true", a = this._context.textureLoader.load(
|
|
10755
10755
|
t,
|
|
10756
10756
|
{
|
|
10757
10757
|
filtering: i,
|
|
@@ -10792,8 +10792,8 @@ class ca {
|
|
|
10792
10792
|
this._view[0] = 0, this._view[1] = 0, this._view[2] = (c = s != null ? s : p) != null ? c : 0, this._view[3] = (d = n != null ? n : g) != null ? d : 0, this._dest[0] = e != null ? e : 1, this._dest[1] = i != null ? i : 1, o !== void 0 && a !== void 0 && h !== void 0 && l !== void 0 && (this._view[0] = e != null ? e : 1, this._view[1] = i != null ? i : 1, this._view[2] = (u = s != null ? s : p) != null ? u : 0, this._view[3] = (_ = n != null ? n : g) != null ? _ : 0, this._dest[0] = o, this._dest[1] = a, v = h, m = l), e = this._view[0], i = this._view[1];
|
|
10793
10793
|
const f = this._view[2], b = this._view[3], C = this._context.getTransform(), S = this._context.opacity, E = this._context.snapToPixel;
|
|
10794
10794
|
this._quad[0] = this._dest[0], this._quad[1] = this._dest[1], this._quad[2] = this._dest[0] + v, this._quad[3] = this._dest[1], this._quad[4] = this._dest[0], this._quad[5] = this._dest[1] + m, this._quad[6] = this._dest[0] + v, this._quad[7] = this._dest[1] + m, C.multiplyQuadInPlace(this._quad), E && (this._quad[0] = ~~(this._quad[0] + q(this._quad[0]) * M), this._quad[1] = ~~(this._quad[1] + q(this._quad[1]) * M), this._quad[2] = ~~(this._quad[2] + q(this._quad[2]) * M), this._quad[3] = ~~(this._quad[3] + q(this._quad[3]) * M), this._quad[4] = ~~(this._quad[4] + q(this._quad[4]) * M), this._quad[5] = ~~(this._quad[5] + q(this._quad[5]) * M), this._quad[6] = ~~(this._quad[6] + q(this._quad[6]) * M), this._quad[7] = ~~(this._quad[7] + q(this._quad[7]) * M));
|
|
10795
|
-
const y = this._context.tint || this._defaultTint, k = this._getTextureIdForImage(t), L = p || v, O = g || m, Q = (e + this.uvPadding) / L, st = (i + this.uvPadding) / O, X = (e + f - this.uvPadding) / L,
|
|
10796
|
-
A[this._vertexIndex++] = this._quad[0], A[this._vertexIndex++] = this._quad[1], A[this._vertexIndex++] = S, A[this._vertexIndex++] = ot, A[this._vertexIndex++] = ct, A[this._vertexIndex++] = Q, A[this._vertexIndex++] = st, A[this._vertexIndex++] = k, A[this._vertexIndex++] = y.r / 255, A[this._vertexIndex++] = y.g / 255, A[this._vertexIndex++] = y.b / 255, A[this._vertexIndex++] = y.a, A[this._vertexIndex++] = this._quad[4], A[this._vertexIndex++] = this._quad[5], A[this._vertexIndex++] = S, A[this._vertexIndex++] = ot, A[this._vertexIndex++] = ct, A[this._vertexIndex++] = Q, A[this._vertexIndex++] =
|
|
10795
|
+
const y = this._context.tint || this._defaultTint, k = this._getTextureIdForImage(t), L = p || v, O = g || m, Q = (e + this.uvPadding) / L, st = (i + this.uvPadding) / O, X = (e + f - this.uvPadding) / L, U = (i + b - this.uvPadding) / O, ot = p, ct = g, A = this._layout.vertexBuffer.bufferData;
|
|
10796
|
+
A[this._vertexIndex++] = this._quad[0], A[this._vertexIndex++] = this._quad[1], A[this._vertexIndex++] = S, A[this._vertexIndex++] = ot, A[this._vertexIndex++] = ct, A[this._vertexIndex++] = Q, A[this._vertexIndex++] = st, A[this._vertexIndex++] = k, A[this._vertexIndex++] = y.r / 255, A[this._vertexIndex++] = y.g / 255, A[this._vertexIndex++] = y.b / 255, A[this._vertexIndex++] = y.a, A[this._vertexIndex++] = this._quad[4], A[this._vertexIndex++] = this._quad[5], A[this._vertexIndex++] = S, A[this._vertexIndex++] = ot, A[this._vertexIndex++] = ct, A[this._vertexIndex++] = Q, A[this._vertexIndex++] = U, A[this._vertexIndex++] = k, A[this._vertexIndex++] = y.r / 255, A[this._vertexIndex++] = y.g / 255, A[this._vertexIndex++] = y.b / 255, A[this._vertexIndex++] = y.a, A[this._vertexIndex++] = this._quad[2], A[this._vertexIndex++] = this._quad[3], A[this._vertexIndex++] = S, A[this._vertexIndex++] = ot, A[this._vertexIndex++] = ct, A[this._vertexIndex++] = X, A[this._vertexIndex++] = st, A[this._vertexIndex++] = k, A[this._vertexIndex++] = y.r / 255, A[this._vertexIndex++] = y.g / 255, A[this._vertexIndex++] = y.b / 255, A[this._vertexIndex++] = y.a, A[this._vertexIndex++] = this._quad[6], A[this._vertexIndex++] = this._quad[7], A[this._vertexIndex++] = S, A[this._vertexIndex++] = ot, A[this._vertexIndex++] = ct, A[this._vertexIndex++] = X, A[this._vertexIndex++] = U, A[this._vertexIndex++] = k, A[this._vertexIndex++] = y.r / 255, A[this._vertexIndex++] = y.g / 255, A[this._vertexIndex++] = y.b / 255, A[this._vertexIndex++] = y.a;
|
|
10797
10797
|
}
|
|
10798
10798
|
hasPendingDraws() {
|
|
10799
10799
|
return this._imageCount !== 0;
|
|
@@ -11176,13 +11176,13 @@ class Ns {
|
|
|
11176
11176
|
const m = this._context.getTransform(), f = this._context.opacity, b = v.getShader(), C = this._layout.vertexBuffer.bufferData;
|
|
11177
11177
|
let S = 0, E = (t == null ? void 0 : t.width) || s || 0, y = (t == null ? void 0 : t.height) || n || 0, k = [0, 0, (c = s != null ? s : t == null ? void 0 : t.width) != null ? c : 0, (d = n != null ? n : t == null ? void 0 : t.height) != null ? d : 0], L = [e != null ? e : 1, i != null ? i : 1];
|
|
11178
11178
|
o !== void 0 && a !== void 0 && h !== void 0 && l !== void 0 && (k = [e != null ? e : 1, i != null ? i : 1, (u = s != null ? s : t == null ? void 0 : t.width) != null ? u : 0, (_ = n != null ? n : t == null ? void 0 : t.height) != null ? _ : 0], L = [o, a], E = h, y = l), e = k[0], i = k[1];
|
|
11179
|
-
const O = k[2], Q = k[3], st = w(L[0], L[1]), X = w(L[0] + E, L[1]),
|
|
11180
|
-
C[S++] = st.x, C[S++] = st.y, C[S++] = oe, C[S++] = ae, C[S++] = Fs, C[S++] = Ds, C[S++] =
|
|
11179
|
+
const O = k[2], Q = k[3], st = w(L[0], L[1]), X = w(L[0] + E, L[1]), U = w(L[0], L[1] + y), ot = w(L[0] + E, L[1] + y), ct = t.width || E, A = t.height || y, oe = e / ct, ae = i / A, he = (e + O - 0.01) / ct, Le = (i + Q - 0.01) / A, Bi = m.getPosition(), Ms = Bi.add(ot), Fs = Bi.x / this._context.width, Ds = Bi.y / this._context.height, Bs = Ms.x / this._context.width, ks = Ms.y / this._context.height;
|
|
11180
|
+
C[S++] = st.x, C[S++] = st.y, C[S++] = oe, C[S++] = ae, C[S++] = Fs, C[S++] = Ds, C[S++] = U.x, C[S++] = U.y, C[S++] = oe, C[S++] = Le, C[S++] = Fs, C[S++] = ks, C[S++] = X.x, C[S++] = X.y, C[S++] = he, C[S++] = ae, C[S++] = Bs, C[S++] = Ds, C[S++] = ot.x, C[S++] = ot.y, C[S++] = he, C[S++] = Le, C[S++] = Bs, C[S++] = ks;
|
|
11181
11181
|
let Ls = this._addImageAsTexture(t);
|
|
11182
11182
|
v.use(), this._layout.shader = b, this._layout.use(!0), b.trySetUniformFloat("u_time_ms", performance.now()), b.trySetUniformFloat("u_opacity", f), b.trySetUniformFloatVector("u_resolution", w(this._context.width, this._context.height)), b.trySetUniformFloatVector("u_graphic_resolution", w(ct, A)), b.trySetUniformFloatVector("u_size", w(O, Q)), b.trySetUniformMatrix("u_matrix", this._context.ortho), b.trySetUniformMatrix("u_transform", m.to4x4()), v.isOverridingGraphic && (p = v.images.u_graphic) != null && p.image && (Ls = this._addImageAsTexture(v.images.u_graphic.image)), g.activeTexture(g.TEXTURE0 + 0), g.bindTexture(g.TEXTURE_2D, Ls), b.trySetUniformInt("u_graphic", 0), v.isUsingScreenTexture && (g.activeTexture(g.TEXTURE0 + 1), g.bindTexture(g.TEXTURE_2D, this._context.materialScreenTexture), b.trySetUniformInt("u_screen_texture", 1)), this._quads.bind(), g.drawElements(g.TRIANGLES, 6, this._quads.bufferGlType, 0), j.DrawnImagesCount++, j.DrawCallCount++;
|
|
11183
11183
|
}
|
|
11184
11184
|
_addImageAsTexture(t) {
|
|
11185
|
-
const e = t.getAttribute(
|
|
11185
|
+
const e = t.getAttribute(z.Filtering), i = e ? ti(e) : void 0, s = Ot(t.getAttribute(z.WrappingX)), n = Ot(t.getAttribute(z.WrappingY)), o = t.getAttribute("forceUpload") === "true", a = this._context.textureLoader.load(
|
|
11186
11186
|
t,
|
|
11187
11187
|
{
|
|
11188
11188
|
filtering: i,
|
|
@@ -11395,7 +11395,7 @@ class wa {
|
|
|
11395
11395
|
_addImageAsTexture(t) {
|
|
11396
11396
|
if (this._images.has(t))
|
|
11397
11397
|
return;
|
|
11398
|
-
const e = t.getAttribute(
|
|
11398
|
+
const e = t.getAttribute(z.Filtering), i = e ? ti(e) : void 0, s = Ot(t.getAttribute(z.WrappingX)), n = Ot(t.getAttribute(z.WrappingY)), o = t.getAttribute("forceUpload") === "true", a = this._context.textureLoader.load(
|
|
11399
11399
|
t,
|
|
11400
11400
|
{
|
|
11401
11401
|
filtering: i,
|
|
@@ -11437,8 +11437,8 @@ class wa {
|
|
|
11437
11437
|
this._view[0] = 0, this._view[1] = 0, this._view[2] = (c = s != null ? s : p) != null ? c : 0, this._view[3] = (d = n != null ? n : g) != null ? d : 0, this._dest[0] = e != null ? e : 1, this._dest[1] = i != null ? i : 1, o !== void 0 && a !== void 0 && h !== void 0 && l !== void 0 && (this._view[0] = e != null ? e : 1, this._view[1] = i != null ? i : 1, this._view[2] = (u = s != null ? s : p) != null ? u : 0, this._view[3] = (_ = n != null ? n : g) != null ? _ : 0, this._dest[0] = o, this._dest[1] = a, v = h, m = l), e = this._view[0], i = this._view[1];
|
|
11438
11438
|
const f = this._view[2], b = this._view[3], C = this._context.getTransform(), S = this._context.opacity;
|
|
11439
11439
|
this._context.snapToPixel && (this._dest[0] = ~~(this._dest[0] + M), this._dest[1] = ~~(this._dest[1] + M));
|
|
11440
|
-
const y = this._context.tint || this._defaultTint, k = this._getTextureIdForImage(t), L = p || v, O = g || m, Q = (e + this.uvPadding) / L, st = (i + this.uvPadding) / O, X = (e + f - this.uvPadding) / L,
|
|
11441
|
-
A[this._vertexIndex++] = this._dest[0], A[this._vertexIndex++] = this._dest[1], A[this._vertexIndex++] = C.data[0], A[this._vertexIndex++] = C.data[1], A[this._vertexIndex++] = C.data[2], A[this._vertexIndex++] = C.data[3], A[this._vertexIndex++] = C.data[4], A[this._vertexIndex++] = C.data[5], A[this._vertexIndex++] = S, A[this._vertexIndex++] = v, A[this._vertexIndex++] = m, A[this._vertexIndex++] = ot, A[this._vertexIndex++] = ct, A[this._vertexIndex++] = k, A[this._vertexIndex++] = Q, A[this._vertexIndex++] = st, A[this._vertexIndex++] = X, A[this._vertexIndex++] =
|
|
11440
|
+
const y = this._context.tint || this._defaultTint, k = this._getTextureIdForImage(t), L = p || v, O = g || m, Q = (e + this.uvPadding) / L, st = (i + this.uvPadding) / O, X = (e + f - this.uvPadding) / L, U = (i + b - this.uvPadding) / O, ot = p, ct = g, A = this._transformData.bufferData;
|
|
11441
|
+
A[this._vertexIndex++] = this._dest[0], A[this._vertexIndex++] = this._dest[1], A[this._vertexIndex++] = C.data[0], A[this._vertexIndex++] = C.data[1], A[this._vertexIndex++] = C.data[2], A[this._vertexIndex++] = C.data[3], A[this._vertexIndex++] = C.data[4], A[this._vertexIndex++] = C.data[5], A[this._vertexIndex++] = S, A[this._vertexIndex++] = v, A[this._vertexIndex++] = m, A[this._vertexIndex++] = ot, A[this._vertexIndex++] = ct, A[this._vertexIndex++] = k, A[this._vertexIndex++] = Q, A[this._vertexIndex++] = st, A[this._vertexIndex++] = X, A[this._vertexIndex++] = U, A[this._vertexIndex++] = y.r / 255, A[this._vertexIndex++] = y.g / 255, A[this._vertexIndex++] = y.b / 255, A[this._vertexIndex++] = y.a;
|
|
11442
11442
|
}
|
|
11443
11443
|
hasPendingDraws() {
|
|
11444
11444
|
return this._imageCount !== 0;
|
|
@@ -12516,7 +12516,7 @@ class Vs {
|
|
|
12516
12516
|
this._started = !1, this._stopped = !1;
|
|
12517
12517
|
}
|
|
12518
12518
|
}
|
|
12519
|
-
function
|
|
12519
|
+
function Ul(r) {
|
|
12520
12520
|
return typeof r.angle == "number" && typeof r.duration == "number";
|
|
12521
12521
|
}
|
|
12522
12522
|
class Ra {
|
|
@@ -12693,10 +12693,10 @@ class La {
|
|
|
12693
12693
|
this._started = !1, this._stopped = !1;
|
|
12694
12694
|
}
|
|
12695
12695
|
}
|
|
12696
|
-
function
|
|
12696
|
+
function za(r) {
|
|
12697
12697
|
return typeof r.scaleOffset == "object" && typeof r.duration == "number";
|
|
12698
12698
|
}
|
|
12699
|
-
class
|
|
12699
|
+
class Ua {
|
|
12700
12700
|
constructor(t, e) {
|
|
12701
12701
|
if (this.entity = t, this.id = W(), this._started = !1, this._stopped = !1, this._endScale = w(1, 1), this._scaleOffset = w(0, 0), this._startScale = w(1, 1), this._scaleOffset = e.scaleOffset, this._tx = t.get(P), this._motion = t.get(H), !this._tx)
|
|
12702
12702
|
throw new Error(`Entity ${t.name} has no TransformComponent, can only ScaleBy on Entities with TransformComponents.`);
|
|
@@ -12895,7 +12895,7 @@ class qs {
|
|
|
12895
12895
|
this._started = !1, this._stopped = !1;
|
|
12896
12896
|
}
|
|
12897
12897
|
}
|
|
12898
|
-
class
|
|
12898
|
+
class Ui {
|
|
12899
12899
|
constructor(t, e, i, s) {
|
|
12900
12900
|
this.id = W(), this._started = !1, this._stopped = !1, this._speedWasSpecified = !1, this._tolerance = 1, this._tx = t.get(P), this._motion = t.get(H), this._meetTx = e.get(P), this._meetMotion = e.get(H), this._current = new x(this._tx.pos.x, this._tx.pos.y), this._end = new x(this._meetTx.pos.x, this._meetTx.pos.y), this._speed = i || 0, i !== void 0 && (this._speedWasSpecified = !0), s !== void 0 && (this._tolerance = s);
|
|
12901
12901
|
}
|
|
@@ -13072,8 +13072,8 @@ class Fi {
|
|
|
13072
13072
|
return Ba(t) ? (this._queue.add(new ka(this._entity, t)), this) : (t instanceof x && e instanceof x && (n = t.x, o = t.y, a = e.x, h = e.y), typeof t == "number" && typeof e == "number" && (n = t, o = e, a = i, h = s), this._queue.add(new La(this._entity, n, o, a, h)), this);
|
|
13073
13073
|
}
|
|
13074
13074
|
scaleBy(t, e, i) {
|
|
13075
|
-
if (
|
|
13076
|
-
return this._queue.add(new
|
|
13075
|
+
if (za(t))
|
|
13076
|
+
return this._queue.add(new Ua(this._entity, t)), this;
|
|
13077
13077
|
let s = 1, n = 1;
|
|
13078
13078
|
return t instanceof x && (s = t.x, n = t.y, i = e), typeof t == "number" && typeof e == "number" && (s = t, n = e), this._queue.add(new Ha(this._entity, s, n, i)), this;
|
|
13079
13079
|
}
|
|
@@ -13186,7 +13186,7 @@ class Fi {
|
|
|
13186
13186
|
* @param tolerance The tolerance in pixels to meet, if not specified it will be 1 pixel
|
|
13187
13187
|
*/
|
|
13188
13188
|
meet(t, e, i) {
|
|
13189
|
-
return e === void 0 && i === void 0 ? this._queue.add(new
|
|
13189
|
+
return e === void 0 && i === void 0 ? this._queue.add(new Ui(this._entity, t)) : i === void 0 ? this._queue.add(new Ui(this._entity, t, e)) : this._queue.add(new Ui(this._entity, t, e, i)), this;
|
|
13190
13190
|
}
|
|
13191
13191
|
/**
|
|
13192
13192
|
* Returns a promise that resolves when the current action queue up to now
|
|
@@ -14594,28 +14594,28 @@ class Xs {
|
|
|
14594
14594
|
if (Q) {
|
|
14595
14595
|
const st = [];
|
|
14596
14596
|
for (let X = 0; X < Q.proxies.length; X++) {
|
|
14597
|
-
const
|
|
14598
|
-
if (!y.has(
|
|
14599
|
-
if (y.add(
|
|
14600
|
-
if (e != null && e.ignoreCollisionGroupAll &&
|
|
14597
|
+
const U = Q.proxies[X];
|
|
14598
|
+
if (!y.has(U.collider.id.value)) {
|
|
14599
|
+
if (y.add(U.collider.id.value), U.body) {
|
|
14600
|
+
if (e != null && e.ignoreCollisionGroupAll && U.body.group === Ee.All)
|
|
14601
14601
|
continue;
|
|
14602
|
-
const ct = (l &
|
|
14603
|
-
if (
|
|
14602
|
+
const ct = (l & U.body.group.category) !== 0;
|
|
14603
|
+
if (U.body.group && !ct)
|
|
14604
14604
|
continue;
|
|
14605
14605
|
}
|
|
14606
|
-
const ot =
|
|
14606
|
+
const ot = U.collider.rayCast(t, a);
|
|
14607
14607
|
ot && st.push(ot);
|
|
14608
14608
|
}
|
|
14609
14609
|
}
|
|
14610
|
-
st.sort((X,
|
|
14610
|
+
st.sort((X, U) => X.distance - U.distance);
|
|
14611
14611
|
for (let X = 0; X < st.length; X++) {
|
|
14612
|
-
const
|
|
14612
|
+
const U = st[X];
|
|
14613
14613
|
if (e != null && e.filter) {
|
|
14614
|
-
if (e.filter(
|
|
14614
|
+
if (e.filter(U) && (o.push(U), !c)) {
|
|
14615
14615
|
k = !0;
|
|
14616
14616
|
break;
|
|
14617
14617
|
}
|
|
14618
|
-
} else if (o.push(
|
|
14618
|
+
} else if (o.push(U), !c) {
|
|
14619
14619
|
k = !0;
|
|
14620
14620
|
break;
|
|
14621
14621
|
}
|
|
@@ -15019,8 +15019,8 @@ class $s {
|
|
|
15019
15019
|
for (let m = 0; m < l.points.length; m++) {
|
|
15020
15020
|
const f = l.points[m], b = l.normal, C = l.tangent, S = f.sub(p.center), E = f.sub(v.center), y = S.cross(b), k = E.cross(b), L = _.inverseMass + g.inverseMass + _.inverseInertia * y * y + g.inverseInertia * k * k, O = S.cross(C), Q = E.cross(C), st = _.inverseMass + g.inverseMass + _.inverseInertia * O * O + g.inverseInertia * Q * Q;
|
|
15021
15021
|
d[u] && ((n = (s = d[u]) == null ? void 0 : s.point) == null ? void 0 : n.squareDistance(f)) < 4 ? (d[u].point = f, d[u].local = l.localPoints[u]) : d[u] = new ja(f, l.localPoints[u], l), d[u].aToContact = S, d[u].bToContact = E, d[u].normalMass = 1 / L, d[u].tangentMass = 1 / st;
|
|
15022
|
-
const X = _.bounciness > g.bounciness ? _.bounciness : g.bounciness,
|
|
15023
|
-
d[u].originalVelocityAndRestitution = 0,
|
|
15022
|
+
const X = _.bounciness > g.bounciness ? _.bounciness : g.bounciness, U = l.normal.dot(d[u].getRelativeVelocity());
|
|
15023
|
+
d[u].originalVelocityAndRestitution = 0, U < -0.1 && (d[u].originalVelocityAndRestitution = -X * U), u++;
|
|
15024
15024
|
}
|
|
15025
15025
|
this.idToContactConstraint.set(l.id, d);
|
|
15026
15026
|
}
|
|
@@ -15097,7 +15097,7 @@ class $s {
|
|
|
15097
15097
|
continue;
|
|
15098
15098
|
const h = (e = this.idToContactConstraint.get(n.id)) != null ? e : [];
|
|
15099
15099
|
for (const l of h) {
|
|
15100
|
-
const c = n.normal, d =
|
|
15100
|
+
const c = n.normal, d = Ut.FindContactSeparation(n, l.local), u = this.config.steeringFactor, _ = -5, p = this.config.slop, g = D(u * (d + p), _, 0), v = c.scale(-g * l.normalMass);
|
|
15101
15101
|
if (o.collisionType === R.Active) {
|
|
15102
15102
|
const m = v.negate().scale(o.inverseMass);
|
|
15103
15103
|
o.limitDegreeOfFreedom.includes(le.X) && (m.x = 0), o.limitDegreeOfFreedom.includes(le.Y) && (m.y = 0), o.globalPos = o.globalPos.add(m), o.limitDegreeOfFreedom.includes(le.Rotation) || (o.rotation -= l.aToContact.cross(v) * o.inverseInertia);
|
|
@@ -15564,7 +15564,7 @@ class js {
|
|
|
15564
15564
|
*/
|
|
15565
15565
|
pageToScreenCoordinates(t) {
|
|
15566
15566
|
let e = t.x, i = t.y;
|
|
15567
|
-
this._isFullscreen || (e -=
|
|
15567
|
+
this._isFullscreen || (e -= ze(this._canvas).x, i -= ze(this._canvas).y);
|
|
15568
15568
|
const s = this._viewportToPixels(this.viewport);
|
|
15569
15569
|
if (this._isFullscreen)
|
|
15570
15570
|
if (window.innerWidth / this.aspectRatio < window.innerHeight) {
|
|
@@ -15595,7 +15595,7 @@ class js {
|
|
|
15595
15595
|
const n = window.innerHeight * this.aspectRatio, o = (window.innerWidth - n) / 2;
|
|
15596
15596
|
e = e / s.width * n + o, i = i / s.height * window.innerHeight;
|
|
15597
15597
|
}
|
|
15598
|
-
return this._isFullscreen || (e +=
|
|
15598
|
+
return this._isFullscreen || (e += ze(this._canvas).x, i += ze(this._canvas).y), new x(e, i);
|
|
15599
15599
|
}
|
|
15600
15600
|
/**
|
|
15601
15601
|
* Takes a coordinate in Excalibur screen space, and translates it to Excalibur world space.
|
|
@@ -16532,15 +16532,21 @@ class wi {
|
|
|
16532
16532
|
this.events.off(t, e);
|
|
16533
16533
|
}
|
|
16534
16534
|
}
|
|
16535
|
-
const nh = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdQAAAB2CAYAAABxhGI9AAAACXBIWXMAAAsSAAALEgHS3X78AAAKnUlEQVR42u3dP2wjSx0H8N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XfsXgcqXzr6+9261M3moOoa7E6nvTZTfy7iNsmfb7kjfgXGsvxe0vihsEts9HTquPpt1q1vtahu2TqAiUAEEKj0zhwoARqgAu/OnX/442WH+9xc/Wvr58re/Tr7f41/+ZsRqhAoACFQAEKgAcHjMoQJskJsz/eqrr5Z+vvr7v5fmQFevAl5lztQIFQAQqAAgUAHgIJlDBdhgdQ41N2eKESoAIFABQKACwFEwhwoARqgAIFABQKACAAIVAAQqAAhUABCoAIBABQCBCgACFQAEKgAgUAFAoAKAQAUAgQoACFQAEKgAIFABQKACAAIVAAQqAAhUABCoAIBABQCBCgACFQAQqAAgUAFAoAKAQAUAlvwPcFDns1DsH4sAAAAASUVORK5CYII=", rh = 'button#excalibur-play{display:
|
|
16535
|
+
const nh = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdQAAAB2CAYAAABxhGI9AAAACXBIWXMAAAsSAAALEgHS3X78AAAKnUlEQVR42u3dP2wjSx0H8N8hJIonIRmJjsq0SBR+BQ1dcqKhe0lD77SvSwpKkJKGPulpktfRIMUdEqKIqV57rpAokM4dbSiyq7ONPTP7x39ifz7SFbnEnp3xer47O7uzH15fXwMA6OYHmgAABCoACFQAEKgAgEAFAIEKAAIVAAQqACBQAUCgAoBABQCBCgAIVAAQqAAgUAFAoAIAAhUABCoACFQAEKgAgECFLbmOiNeFf2PbAyz68Pr6qhUgbRwR92v+/zwiJrYHMEKFMmcN///UtgcQqFBk1PD/97U9Qx8VCFSgu4EmAIEKAAIVAAQqACBQ4Z25jojP8eX+0WtNAgIVaOY+Im5j+eKh24h41jQgUIEyZ7F5NaPU7wCBCiwYd/w9cOB+qAlgJ3KLLow0EV198803RWvJfvfddx+0lhEqHKu5JgAjVCBvlhmFzjQRXUekHz9+TP79y8uLRjNChXfvoePvAYEKxNtj1e42/O5JoIJABcrdRMRVLM+X3kTEpaaB988cKuzWg9EobTWdMx0Oly8uN4dqhAoARqgnaN3arHfqu7OyH8ItKLVB/P+CEfMTHyGPY3npx1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3Dct6jvssb67KvuUNJ3frw92bhr8/STSF0JdRPMLpUCgnsgo9S76PZ246ZFk1wWvK5m3vVoYvW1Sz7nN91jfXbQ1ZQc7TW6HeaoOalypG/8/p/rP1aNAc6ZHzSnfdqPUPhdy2PQw6Nz9gSVhuhiqueUHR3uu7y7K3rdDX4u46ZrPbUa0IFBZ0seKQ3XQTRt2vm3W/a2DbNKys++rvm3ep6+y1x2UdP3bWU9lzra47U1GmlctX/sQ23t+aOlByLTh/4NAPaCRxtcdO5HLSJ/6vNtCwGx67VPmPbvWd1q9frKHtp4kAqRJ2HR9j762JfX3bZ//elPtj13PPDx1+D5tqk/Xi6NO8SHz7MmH19dXrdBNfVFP6T2PT1UHNit87/t4m5+aRH+nQBdvqyhZDKJLfZs8h7XPsqdV2ZOV+tanKB8aln0dyxdAXbV4j4gvt4oMOrbP6vbU73NW7TMlbdTnPrWpfqXfh9HKZ9vke7KuTeZRNtXRSe6+1FV//ce/ln5eXfsXgcqXzr6+9261M3moOoa7E6nvTZTfy7iNsmfb7kjfgXGsvxe0vihsEts9HTquPpt1q1vtahu2TqAiUAEEKj0zhwoARqgAu/OnX/442WH+9xc/Wvr58re/Tr7f41/+ZsRqhAoACFQAEKgAcHjMoQJskJsz/eqrr5Z+vvr7v5fmQFevAl5lztQIFQAQqAAgUAHgIJlDBdhgdQ41N2eKESoAIFABQKACwFEwhwoARqgAIFABQKACAAIVAAQqAAhUABCoAIBABQCBCgACFQAEKgAgUAFAoAKAQAUAgQoACFQAEKgAIFABQKACAAIVAAQqAAhUABCoAIBABQCBCgACFQAQqAAgUAFAoAKAQAUAlvwPcFDns1DsH4sAAAAASUVORK5CYII=", rh = 'button#excalibur-play{display:none}button#excalibur-play{box-sizing:border-box;display:flex;gap:.25rem;justify-content:center;position:relative;z-index:999;border-radius:6px;border:none;padding:1rem;margin:0;text-decoration:none;background:#00b233;color:#fff;font-family:sans-serif;font-size:2rem;white-space:nowrap;line-height:1;cursor:pointer;text-align:center;transition:background .25s ease-in-out,transform .15s ease;-webkit-appearance:none;-moz-appearance:none;-webkit-animation:excalibur-button-fadein .2s;-moz-animation:excalibur-button-fadein .2s;-ms-animation:excalibur-button-fadein .2s;-o-animation:excalibur-button-fadein .2s;animation:excalibur-button-fadein .2s}span#excalibur-play-icon{content:"";display:inline-block;position:relative;width:2rem;height:2rem}span#excalibur-play-icon:after{box-sizing:border-box;position:absolute;content:"";border:.5rem solid;border-color:transparent transparent transparent white;left:calc(50% - .1rem);top:calc(30% - .1rem);width:0;height:0}span#excalibur-play-icon:before{box-sizing:border-box;left:50%;top:50%;transform:translate(-50%,-50%);position:absolute;content:"";border:3px solid;border-radius:1rem;width:2rem;height:2rem}button#excalibur-play:focus{outline:1px solid #fff;outline-offset:-4px}button#excalibur-play:active{transform:scale(.99)}@keyframes excalibur-button-fadein{0%{opacity:0}to{opacity:1}}@-moz-keyframes excalibur-button-fadein{0%{opacity:0}to{opacity:1}}@-webkit-keyframes excalibur-button-fadein{0%{opacity:0}to{opacity:1}}@-ms-keyframes excalibur-button-fadein{0%{opacity:0}to{opacity:1}}@-o-keyframes excalibur-button-fadein{0%{opacity:0}to{opacity:1}}', zr = class Ur extends wi {
|
|
16536
16536
|
constructor(t) {
|
|
16537
16537
|
const e = Array.isArray(t) ? {
|
|
16538
16538
|
loadables: t
|
|
16539
16539
|
} : t;
|
|
16540
16540
|
super(e), this._logger = I.getInstance(), this._originalOptions = { loadables: [] }, this.events = new $(), this._playButtonShown = !1, this.logo = nh, this.logoWidth = 468, this.logoHeight = 118, this.loadingBarColor = T.White, this.backgroundColor = "#176BAA", this._imageLoaded = new yt(), this.suppressPlayButton = !1, this._playButtonStyles = rh, this.playButtonText = "Play game", this.startButtonFactory = () => {
|
|
16541
16541
|
let i = document.getElementById("excalibur-play");
|
|
16542
|
-
|
|
16543
|
-
|
|
16542
|
+
if (i || (i = document.createElement("button")), i.id = "excalibur-play", i.style.display = "none", i) {
|
|
16543
|
+
const s = document.createElement("span");
|
|
16544
|
+
s.id = "excalibur-play-icon", i.appendChild(s);
|
|
16545
|
+
const n = document.createElement("span");
|
|
16546
|
+
n.id = "excalibur-play-text", n.textContent = this.playButtonText, i.appendChild(n);
|
|
16547
|
+
}
|
|
16548
|
+
return i;
|
|
16549
|
+
}, this._originalOptions = { ...Ur._DEFAULT_LOADER_OPTIONS, ...e };
|
|
16544
16550
|
}
|
|
16545
16551
|
get _image() {
|
|
16546
16552
|
return this._imageElement || (this._imageElement = new Image(), this._imageElement.onload = () => this._imageLoaded.resolve(), this._imageElement.src = this.logo), this._imageElement;
|
|
@@ -16574,7 +16580,7 @@ const nh = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdQAAAB2CAYAAABxhGI9AA
|
|
|
16574
16580
|
} catch (n) {
|
|
16575
16581
|
}
|
|
16576
16582
|
};
|
|
16577
|
-
return (e = this.engine) != null && e.browser && this.engine.browser.window.on("resize", i), this._playButtonShown = !0, this._playButton.style.display = "
|
|
16583
|
+
return (e = this.engine) != null && e.browser && this.engine.browser.window.on("resize", i), this._playButtonShown = !0, this._playButton.style.display = "flex", document.body.addEventListener("keyup", (n) => {
|
|
16578
16584
|
n.key === "Enter" && this._playButton.click();
|
|
16579
16585
|
}), this._positionPlayButton(), await new Promise((n) => {
|
|
16580
16586
|
const o = (a) => {
|
|
@@ -16616,9 +16622,11 @@ const nh = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdQAAAB2CAYAAABxhGI9AA
|
|
|
16616
16622
|
_positionPlayButton() {
|
|
16617
16623
|
if (this.engine) {
|
|
16618
16624
|
const { x: t, y: e, width: i, height: s } = this.engine.canvas.getBoundingClientRect();
|
|
16619
|
-
if (this._playButtonRootElement) {
|
|
16620
|
-
const n = this.
|
|
16621
|
-
|
|
16625
|
+
if (this._playButtonRootElement && this._playButtonElement) {
|
|
16626
|
+
const n = this._playButtonElement.querySelector("#excalibur-play-text");
|
|
16627
|
+
i < 450 ? n.style.display = "none" : n.style.display = "inline-block";
|
|
16628
|
+
const o = this._playButton.clientWidth, a = this._playButton.clientHeight;
|
|
16629
|
+
this.playButtonPosition ? (this._playButtonRootElement.style.left = `${this.playButtonPosition.x}px`, this._playButtonRootElement.style.top = `${this.playButtonPosition.y}px`) : (this._playButtonRootElement.style.left = `${t + i / 2 - o / 2}px`, this._playButtonRootElement.style.top = `${e + s / 2 - a / 2 + 100}px`), i < 450 && (this._playButtonRootElement.style.left = `${t + i / 2 - o / 2}px`, this._playButtonRootElement.style.top = `${e + s / 2 - a / 2 + 25}px`);
|
|
16622
16630
|
}
|
|
16623
16631
|
}
|
|
16624
16632
|
}
|
|
@@ -16629,7 +16637,7 @@ const nh = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdQAAAB2CAYAAABxhGI9AA
|
|
|
16629
16637
|
*/
|
|
16630
16638
|
onDraw(t) {
|
|
16631
16639
|
const e = this.engine.canvasHeight / this.engine.pixelRatio, i = this.engine.canvasWidth / this.engine.pixelRatio;
|
|
16632
|
-
|
|
16640
|
+
t.fillStyle = this.backgroundColor, t.fillRect(0, 0, i, e);
|
|
16633
16641
|
let s = e / 2;
|
|
16634
16642
|
const n = Math.min(this.logoWidth, i * 0.75);
|
|
16635
16643
|
let o = i / 2 - n / 2;
|
|
@@ -16654,12 +16662,12 @@ const nh = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdQAAAB2CAYAAABxhGI9AA
|
|
|
16654
16662
|
), this.engine.screen.antialiasing = h;
|
|
16655
16663
|
}
|
|
16656
16664
|
};
|
|
16657
|
-
|
|
16665
|
+
zr._DEFAULT_LOADER_OPTIONS = {
|
|
16658
16666
|
loadables: [],
|
|
16659
16667
|
fullscreenAfterLoad: !1,
|
|
16660
16668
|
fullscreenContainer: void 0
|
|
16661
16669
|
};
|
|
16662
|
-
let rs =
|
|
16670
|
+
let rs = zr;
|
|
16663
16671
|
const Js = {
|
|
16664
16672
|
webgl: "WebGL",
|
|
16665
16673
|
webaudio: "WebAudio",
|
|
@@ -20425,7 +20433,7 @@ const sn = {
|
|
|
20425
20433
|
// fontCollectInterval: 60_000,
|
|
20426
20434
|
// textMeasurementCollectInterval: 60_000,
|
|
20427
20435
|
};
|
|
20428
|
-
class
|
|
20436
|
+
class zh {
|
|
20429
20437
|
constructor(t) {
|
|
20430
20438
|
this.options = t, this._running = !1, this._collectionMap = /* @__PURE__ */ new Map(), this._collectors = /* @__PURE__ */ new Map(), this.collectStaleResources = (e) => {
|
|
20431
20439
|
if (this._running) {
|
|
@@ -20594,7 +20602,7 @@ O|===|* >________________>
|
|
|
20594
20602
|
), this.garbageCollectorConfig = null) : this.garbageCollectorConfig = {
|
|
20595
20603
|
...sn,
|
|
20596
20604
|
...t.garbageCollection
|
|
20597
|
-
}, this._garbageCollector = new
|
|
20605
|
+
}, this._garbageCollector = new zh({ getTimestamp: Date.now }), this.canvasElementId = t.canvasElementId, t.canvasElementId) {
|
|
20598
20606
|
if (this._logger.debug("Using Canvas element specified: " + t.canvasElementId), document.getElementById(t.canvasElementId) === null)
|
|
20599
20607
|
throw new Error("Cannot find existing element in the DOM, please ensure element is created prior to engine creation.");
|
|
20600
20608
|
this.canvas = document.getElementById(t.canvasElementId), this._hasCreatedCanvas = !1;
|
|
@@ -21613,7 +21621,7 @@ function uc(r) {
|
|
|
21613
21621
|
function _c(r) {
|
|
21614
21622
|
return !!r.onPostDraw;
|
|
21615
21623
|
}
|
|
21616
|
-
class
|
|
21624
|
+
class Uh {
|
|
21617
21625
|
constructor(t, e) {
|
|
21618
21626
|
this.soundManager = e;
|
|
21619
21627
|
}
|
|
@@ -21660,7 +21668,7 @@ class fc {
|
|
|
21660
21668
|
constructor(t) {
|
|
21661
21669
|
this._channelToConfig = /* @__PURE__ */ new Map(), this._nameToConfig = /* @__PURE__ */ new Map(), this._mix = /* @__PURE__ */ new Map(), this._muted = /* @__PURE__ */ new Set(), this._all = /* @__PURE__ */ new Set(), this._defaultVolume = 1;
|
|
21662
21670
|
var e;
|
|
21663
|
-
if (this._defaultVolume = (e = t.volume) != null ? e : 1, this.channel = new
|
|
21671
|
+
if (this._defaultVolume = (e = t.volume) != null ? e : 1, this.channel = new Uh(t, this), t.sounds)
|
|
21664
21672
|
for (const [i, s] of Object.entries(t.sounds))
|
|
21665
21673
|
this.track(i, s);
|
|
21666
21674
|
}
|
|
@@ -22391,7 +22399,7 @@ const wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
22391
22399
|
delay: pi,
|
|
22392
22400
|
fail: Yn,
|
|
22393
22401
|
getMinIndex: qn,
|
|
22394
|
-
getPosition:
|
|
22402
|
+
getPosition: ze,
|
|
22395
22403
|
isLegacyEasing: Fe,
|
|
22396
22404
|
isObject: li,
|
|
22397
22405
|
mergeDeep: mi,
|
|
@@ -22470,7 +22478,7 @@ class Cc {
|
|
|
22470
22478
|
}
|
|
22471
22479
|
}
|
|
22472
22480
|
}
|
|
22473
|
-
const an = "0.32.0-alpha.
|
|
22481
|
+
const an = "0.32.0-alpha.1577+cbacdb4";
|
|
22474
22482
|
hn();
|
|
22475
22483
|
export {
|
|
22476
22484
|
Wn as ActionCompleteEvent,
|
|
@@ -22505,7 +22513,7 @@ export {
|
|
|
22505
22513
|
vh as Camera,
|
|
22506
22514
|
Yl as CameraEvents,
|
|
22507
22515
|
ms as Canvas,
|
|
22508
|
-
|
|
22516
|
+
Uh as ChannelCollection,
|
|
22509
22517
|
ps as Circle,
|
|
22510
22518
|
_t as CircleCollider,
|
|
22511
22519
|
jr as Clock,
|
|
@@ -22516,7 +22524,7 @@ export {
|
|
|
22516
22524
|
gi as CollisionEndEvent,
|
|
22517
22525
|
Ee as CollisionGroup,
|
|
22518
22526
|
Li as CollisionGroupManager,
|
|
22519
|
-
|
|
22527
|
+
Ut as CollisionJumpTable,
|
|
22520
22528
|
$i as CollisionPostSolveEvent,
|
|
22521
22529
|
Yi as CollisionPreSolveEvent,
|
|
22522
22530
|
fi as CollisionStartEvent,
|
|
@@ -22561,14 +22569,14 @@ export {
|
|
|
22561
22569
|
Na as EaseBy,
|
|
22562
22570
|
Oa as EaseTo,
|
|
22563
22571
|
It as EasingFunctions,
|
|
22564
|
-
|
|
22572
|
+
Us as Edge,
|
|
22565
22573
|
At as EdgeCollider,
|
|
22566
22574
|
ph as ElasticToActorStrategy,
|
|
22567
22575
|
Ae as EmitterType,
|
|
22568
22576
|
Ni as Engine,
|
|
22569
22577
|
Ql as EngineEvents,
|
|
22570
22578
|
Hn as EnterTriggerEvent,
|
|
22571
|
-
|
|
22579
|
+
Un as EnterViewPortEvent,
|
|
22572
22580
|
Rt as Entity,
|
|
22573
22581
|
Dl as EntityEvents,
|
|
22574
22582
|
go as EntityManager,
|
|
@@ -22579,7 +22587,7 @@ export {
|
|
|
22579
22587
|
is as ExcaliburGraphicsContext2DCanvas,
|
|
22580
22588
|
jt as ExcaliburGraphicsContextWebGL,
|
|
22581
22589
|
On as ExitTriggerEvent,
|
|
22582
|
-
|
|
22590
|
+
zn as ExitViewPortEvent,
|
|
22583
22591
|
Va as Fade,
|
|
22584
22592
|
mc as FadeInOut,
|
|
22585
22593
|
Ne as Flags,
|
|
@@ -22602,7 +22610,7 @@ export {
|
|
|
22602
22610
|
In as GamepadConnectEvent,
|
|
22603
22611
|
Rn as GamepadDisconnectEvent,
|
|
22604
22612
|
Ps as Gamepads,
|
|
22605
|
-
|
|
22613
|
+
zh as GarbageCollector,
|
|
22606
22614
|
gc as Gif,
|
|
22607
22615
|
Nh as GifParser,
|
|
22608
22616
|
Ye as GlobalCoordinates,
|
|
@@ -22620,7 +22628,7 @@ export {
|
|
|
22620
22628
|
ir as HorizontalFirst,
|
|
22621
22629
|
wt as ImageFiltering,
|
|
22622
22630
|
$t as ImageSource,
|
|
22623
|
-
|
|
22631
|
+
z as ImageSourceAttributeConstants,
|
|
22624
22632
|
gt as ImageWrapping,
|
|
22625
22633
|
Je as InitializeEvent,
|
|
22626
22634
|
Zr as InputHost,
|
|
@@ -22647,7 +22655,7 @@ export {
|
|
|
22647
22655
|
Tt as Matrix,
|
|
22648
22656
|
ro as MatrixLocations,
|
|
22649
22657
|
kr as MediaEvent,
|
|
22650
|
-
|
|
22658
|
+
Ui as Meet,
|
|
22651
22659
|
H as MotionComponent,
|
|
22652
22660
|
ys as MotionSystem,
|
|
22653
22661
|
Ws as MoveBy,
|
|
@@ -22658,7 +22666,7 @@ export {
|
|
|
22658
22666
|
be as NativeSoundEvent,
|
|
22659
22667
|
eh as NativeSoundProcessedEvent,
|
|
22660
22668
|
vr as NineSlice,
|
|
22661
|
-
|
|
22669
|
+
Uo as NineSliceStretch,
|
|
22662
22670
|
Vi as Node,
|
|
22663
22671
|
sr as None,
|
|
22664
22672
|
xt as Observable,
|
|
@@ -22702,7 +22710,7 @@ export {
|
|
|
22702
22710
|
Ci as Projection,
|
|
22703
22711
|
si as QuadIndexBuffer,
|
|
22704
22712
|
He as QuadTree,
|
|
22705
|
-
|
|
22713
|
+
zt as Query,
|
|
22706
22714
|
po as QueryManager,
|
|
22707
22715
|
mh as RadiusAroundActorStrategy,
|
|
22708
22716
|
ge as Random,
|
|
@@ -22724,7 +22732,7 @@ export {
|
|
|
22724
22732
|
Ra as RotateToWithOptions,
|
|
22725
22733
|
J as RotationType,
|
|
22726
22734
|
Ha as ScaleBy,
|
|
22727
|
-
|
|
22735
|
+
Ua as ScaleByWithOptions,
|
|
22728
22736
|
La as ScaleTo,
|
|
22729
22737
|
ka as ScaleToWithOptions,
|
|
22730
22738
|
Et as Scene,
|
|
@@ -22782,7 +22790,7 @@ export {
|
|
|
22782
22790
|
Wo as UniformBuffer,
|
|
22783
22791
|
wc as Util,
|
|
22784
22792
|
x as Vector,
|
|
22785
|
-
|
|
22793
|
+
zs as VectorView,
|
|
22786
22794
|
Nt as VertexBuffer,
|
|
22787
22795
|
Kt as VertexLayout,
|
|
22788
22796
|
er as VerticalFirst,
|
|
@@ -22855,8 +22863,8 @@ export {
|
|
|
22855
22863
|
Ea as isMoveToOptions,
|
|
22856
22864
|
Fl as isRemovedComponent,
|
|
22857
22865
|
Hl as isRotateByOptions,
|
|
22858
|
-
|
|
22859
|
-
|
|
22866
|
+
Ul as isRotateToOptions,
|
|
22867
|
+
za as isScaleByOptions,
|
|
22860
22868
|
Ba as isScaleToOptions,
|
|
22861
22869
|
Gt as isSceneConstructor,
|
|
22862
22870
|
ah as isScreenElement,
|