excalibur 0.32.0-alpha.1592 → 0.32.0-alpha.1594

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /*! excalibur - 0.32.0-alpha.1592+3ba41a7 - 2025-12-6
1
+ /*! excalibur - 0.32.0-alpha.1594+9ed7cab - 2025-12-8
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
@@ -118,7 +118,7 @@ class yt {
118
118
  this._isCompleted || (this._isCompleted = !0, this._rejecter(t));
119
119
  }
120
120
  }
121
- class Z {
121
+ class X {
122
122
  constructor() {
123
123
  this._paused = !1, this._empty = !0, this._listeners = {}, this._listenersOnce = {}, this._pipes = [];
124
124
  }
@@ -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], z = 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 * z + _ * ot + m * ct, i.data[9] = o * X + c * z + p * ot + f * ct, i.data[10] = a * X + d * z + g * ot + b * ct, i.data[11] = h * X + u * z + 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;
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], $ = s.data[8], z = 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 * $ + l * z + _ * ot + m * ct, i.data[9] = o * $ + c * z + p * ot + f * ct, i.data[10] = a * $ + d * z + g * ot + b * ct, i.data[11] = h * $ + u * z + 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
  }
@@ -3433,7 +3433,7 @@ const Dl = {
3433
3433
  Kill: "kill"
3434
3434
  }, Zn = class Qi {
3435
3435
  constructor(t, e) {
3436
- this.id = Qi._ID++, this.name = `Entity#${this.id}`, this.events = new Z(), this._tags = /* @__PURE__ */ new Set(), this.componentAdded$ = new xt(), this.componentRemoved$ = new xt(), this.tagAdded$ = new xt(), this.tagRemoved$ = new xt(), this.components = /* @__PURE__ */ new Map(), this.componentValues = [], this._componentsToRemove = [], this.scene = null, this.isActive = !0, this._parent = null, this.childrenAdded$ = new xt(), this.childrenRemoved$ = new xt(), this._children = [], this._isInitialized = !1, this._isAdded = !1;
3436
+ this.id = Qi._ID++, this.name = `Entity#${this.id}`, this.events = new X(), this._tags = /* @__PURE__ */ new Set(), this.componentAdded$ = new xt(), this.componentRemoved$ = new xt(), this.tagAdded$ = new xt(), this.tagRemoved$ = new xt(), this.components = /* @__PURE__ */ new Map(), this.componentValues = [], this._componentsToRemove = [], this.scene = null, this.isActive = !0, this._parent = null, this.childrenAdded$ = new xt(), this.childrenRemoved$ = new xt(), this._children = [], this._isInitialized = !1, this._isAdded = !1;
3437
3437
  let i, s;
3438
3438
  if (Array.isArray(t))
3439
3439
  i = t, s = e;
@@ -4929,7 +4929,7 @@ class Ji {
4929
4929
  }
4930
4930
  const Kn = class tr {
4931
4931
  constructor() {
4932
- this.id = Pe("collider", tr._ID++), this.composite = null, this.events = new Z(), this.offset = x.Zero;
4932
+ this.id = Pe("collider", tr._ID++), this.composite = null, this.events = new X(), this.offset = x.Zero;
4933
4933
  }
4934
4934
  /**
4935
4935
  * Returns a boolean indicating whether this body collided with
@@ -6507,7 +6507,7 @@ const Bl = {
6507
6507
  }, ar = class Ki extends nt {
6508
6508
  constructor(t) {
6509
6509
  var e, i, s;
6510
- super(t), this.events = new Z(), this.frames = [], this.strategy = "loop", this.frameDuration = 100, this._idempotencyToken = -1, this._firstTick = !0, this._currentFrame = 0, this._timeLeftInFrame = 0, this._pingPongDirection = 1, this._done = !1, this._playing = !0, this._speed = 1, this._wasResetDuringFrameCalc = !1, this._reversed = !1, this.frames = t.frames, this.speed = (e = t.speed) != null ? e : this.speed, this.strategy = (i = t.strategy) != null ? i : this.strategy, this.frameDuration = t.totalDuration ? t.totalDuration / this.frames.length : (s = t.frameDuration) != null ? s : this.frameDuration, this.data = t.data ? new Map(Object.entries(t.data)) : /* @__PURE__ */ new Map(), t.reverse && this.reverse(), this.goToFrame(0);
6510
+ super(t), this.events = new X(), this.frames = [], this.strategy = "loop", this.frameDuration = 100, this._idempotencyToken = -1, this._firstTick = !0, this._currentFrame = 0, this._timeLeftInFrame = 0, this._pingPongDirection = 1, this._done = !1, this._playing = !0, this._speed = 1, this._wasResetDuringFrameCalc = !1, this._reversed = !1, this.frames = t.frames, this.speed = (e = t.speed) != null ? e : this.speed, this.strategy = (i = t.strategy) != null ? i : this.strategy, this.frameDuration = t.totalDuration ? t.totalDuration / this.frames.length : (s = t.frameDuration) != null ? s : this.frameDuration, this.data = t.data ? new Map(Object.entries(t.data)) : /* @__PURE__ */ new Map(), t.reverse && this.reverse(), this.goToFrame(0);
6511
6511
  }
6512
6512
  clone() {
6513
6513
  const t = this.constructor;
@@ -7096,7 +7096,7 @@ class Ei {
7096
7096
  * @param bustCache Whether or not to cache-bust requests
7097
7097
  */
7098
7098
  constructor(t, e, i = !1) {
7099
- this.path = t, this.responseType = e, this.bustCache = i, this.data = null, this.logger = I.getInstance(), this.events = new Z();
7099
+ this.path = t, this.responseType = e, this.bustCache = i, this.data = null, this.logger = I.getInstance(), this.events = new X();
7100
7100
  }
7101
7101
  /**
7102
7102
  * Returns true if the Resource is completely loaded and is ready
@@ -8815,8 +8815,8 @@ const Ho = {
8815
8815
  Fi.DrawCallCount = 0;
8816
8816
  Fi.DrawnImagesCount = 0;
8817
8817
  Fi.RendererSwaps = 0;
8818
- let Y = Fi;
8819
- const $ = 1e-4;
8818
+ let Z = Fi;
8819
+ const Y = 1e-4;
8820
8820
  class No {
8821
8821
  constructor(t) {
8822
8822
  this._ex = t, this._debugText = new fr();
@@ -8830,26 +8830,26 @@ class No {
8830
8830
  */
8831
8831
  drawRect(t, e, i, s) {
8832
8832
  this._ex.__ctx.save(), this._ex.__ctx.strokeStyle = "red", this._ex.__ctx.strokeRect(
8833
- this._ex.snapToPixel ? ~~(t + $) : t,
8834
- this._ex.snapToPixel ? ~~(e + $) : e,
8835
- this._ex.snapToPixel ? ~~(i + $) : i,
8836
- this._ex.snapToPixel ? ~~(s + $) : s
8833
+ this._ex.snapToPixel ? ~~(t + Y) : t,
8834
+ this._ex.snapToPixel ? ~~(e + Y) : e,
8835
+ this._ex.snapToPixel ? ~~(i + Y) : i,
8836
+ this._ex.snapToPixel ? ~~(s + Y) : s
8837
8837
  ), this._ex.__ctx.restore();
8838
8838
  }
8839
8839
  drawLine(t, e, i = { color: T.Black }) {
8840
8840
  var s, n;
8841
8841
  this._ex.__ctx.save(), this._ex.__ctx.beginPath(), this._ex.__ctx.strokeStyle = (n = (s = i.color) == null ? void 0 : s.toString()) != null ? n : "", this._ex.__ctx.moveTo(
8842
- this._ex.snapToPixel ? ~~(t.x + $) : t.x,
8843
- this._ex.snapToPixel ? ~~(t.y + $) : t.y
8842
+ this._ex.snapToPixel ? ~~(t.x + Y) : t.x,
8843
+ this._ex.snapToPixel ? ~~(t.y + Y) : t.y
8844
8844
  ), this._ex.__ctx.lineTo(
8845
- this._ex.snapToPixel ? ~~(e.x + $) : e.x,
8846
- this._ex.snapToPixel ? ~~(e.y + $) : e.y
8845
+ this._ex.snapToPixel ? ~~(e.x + Y) : e.x,
8846
+ this._ex.snapToPixel ? ~~(e.y + Y) : e.y
8847
8847
  ), this._ex.__ctx.lineWidth = 2, this._ex.__ctx.stroke(), this._ex.__ctx.closePath(), this._ex.__ctx.restore();
8848
8848
  }
8849
8849
  drawPoint(t, e = { color: T.Black, size: 5 }) {
8850
8850
  this._ex.__ctx.save(), this._ex.__ctx.beginPath(), this._ex.__ctx.fillStyle = e.color.toString(), this._ex.__ctx.arc(
8851
- this._ex.snapToPixel ? ~~(t.x + $) : t.x,
8852
- this._ex.snapToPixel ? ~~(t.y + $) : t.y,
8851
+ this._ex.snapToPixel ? ~~(t.x + Y) : t.x,
8852
+ this._ex.snapToPixel ? ~~(t.y + Y) : t.y,
8853
8853
  e.size,
8854
8854
  0,
8855
8855
  Math.PI * 2
@@ -8857,8 +8857,8 @@ class No {
8857
8857
  }
8858
8858
  drawCircle(t, e, i, s, n) {
8859
8859
  this._ex.__ctx.save(), this._ex.__ctx.beginPath(), s && (this._ex.__ctx.strokeStyle = s.toString()), n && (this._ex.__ctx.lineWidth = n), this._ex.__ctx.fillStyle = i.toString(), this._ex.__ctx.arc(
8860
- this._ex.snapToPixel ? ~~(t.x + $) : t.x,
8861
- this._ex.snapToPixel ? ~~(t.y + $) : t.y,
8860
+ this._ex.snapToPixel ? ~~(t.x + Y) : t.x,
8861
+ this._ex.snapToPixel ? ~~(t.y + Y) : t.y,
8862
8862
  e,
8863
8863
  0,
8864
8864
  Math.PI * 2
@@ -8916,26 +8916,26 @@ class ss {
8916
8916
  return;
8917
8917
  this.__ctx.globalAlpha = this.opacity;
8918
8918
  const c = [t, e, i, s, n, o, a, h, l].filter((d) => d !== void 0).map((d) => typeof d == "number" && this.snapToPixel ? ~~d : d);
8919
- this.__ctx.drawImage.apply(this.__ctx, c), Y.DrawCallCount++, Y.DrawnImagesCount = 1;
8919
+ this.__ctx.drawImage.apply(this.__ctx, c), Z.DrawCallCount++, Z.DrawnImagesCount = 1;
8920
8920
  }
8921
8921
  drawLine(t, e, i, s = 1) {
8922
8922
  this.__ctx.save(), this.__ctx.beginPath(), this.__ctx.strokeStyle = i.toString(), this.__ctx.moveTo(
8923
- this.snapToPixel ? ~~(t.x + $) : t.x,
8924
- this.snapToPixel ? ~~(t.y + $) : t.y
8925
- ), this.__ctx.lineTo(this.snapToPixel ? ~~(e.x + $) : e.x, this.snapToPixel ? ~~(e.y + $) : e.y), this.__ctx.lineWidth = s, this.__ctx.stroke(), this.__ctx.closePath(), this.__ctx.restore();
8923
+ this.snapToPixel ? ~~(t.x + Y) : t.x,
8924
+ this.snapToPixel ? ~~(t.y + Y) : t.y
8925
+ ), this.__ctx.lineTo(this.snapToPixel ? ~~(e.x + Y) : e.x, this.snapToPixel ? ~~(e.y + Y) : e.y), this.__ctx.lineWidth = s, this.__ctx.stroke(), this.__ctx.closePath(), this.__ctx.restore();
8926
8926
  }
8927
8927
  drawRectangle(t, e, i, s) {
8928
8928
  this.__ctx.save(), this.__ctx.fillStyle = s.toString(), this.__ctx.fillRect(
8929
- this.snapToPixel ? ~~(t.x + $) : t.x,
8930
- this.snapToPixel ? ~~(t.y + $) : t.y,
8931
- this.snapToPixel ? ~~(e + $) : e,
8932
- this.snapToPixel ? ~~(i + $) : i
8929
+ this.snapToPixel ? ~~(t.x + Y) : t.x,
8930
+ this.snapToPixel ? ~~(t.y + Y) : t.y,
8931
+ this.snapToPixel ? ~~(e + Y) : e,
8932
+ this.snapToPixel ? ~~(i + Y) : i
8933
8933
  ), this.__ctx.restore();
8934
8934
  }
8935
8935
  drawCircle(t, e, i, s, n) {
8936
8936
  this.__ctx.save(), this.__ctx.beginPath(), s && (this.__ctx.strokeStyle = s.toString()), n && (this.__ctx.lineWidth = n), this.__ctx.fillStyle = i.toString(), this.__ctx.arc(
8937
- this.snapToPixel ? ~~(t.x + $) : t.x,
8938
- this.snapToPixel ? ~~(t.y + $) : t.y,
8937
+ this.snapToPixel ? ~~(t.x + Y) : t.x,
8938
+ this.snapToPixel ? ~~(t.y + Y) : t.y,
8939
8939
  e,
8940
8940
  0,
8941
8941
  Math.PI * 2
@@ -8959,7 +8959,7 @@ class ss {
8959
8959
  * @param y
8960
8960
  */
8961
8961
  translate(t, e) {
8962
- this.__ctx.translate(this.snapToPixel ? ~~(t + $) : t, this.snapToPixel ? ~~(e + $) : e);
8962
+ this.__ctx.translate(this.snapToPixel ? ~~(t + Y) : t, this.snapToPixel ? ~~(e + Y) : e);
8963
8963
  }
8964
8964
  /**
8965
8965
  * Rotate the context about the current origin
@@ -9004,7 +9004,7 @@ class ss {
9004
9004
  return null;
9005
9005
  }
9006
9006
  clear() {
9007
- this.__ctx.clearRect(0, 0, this.width, this.height), this.__ctx.fillStyle = this.backgroundColor.toString(), this.__ctx.fillRect(0, 0, this.width, this.height), Y.clear();
9007
+ this.__ctx.clearRect(0, 0, this.width, this.height), this.__ctx.fillStyle = this.backgroundColor.toString(), this.__ctx.fillRect(0, 0, this.width, this.height), Z.clear();
9008
9008
  }
9009
9009
  /**
9010
9010
  * Flushes the batched draw calls to the screen
@@ -10389,7 +10389,7 @@ class Jo {
10389
10389
  if (this._lineCount === 0)
10390
10390
  return;
10391
10391
  const t = this._gl;
10392
- this._shader.use(), this._layout.use(!0), this._shader.setUniformMatrix("u_matrix", this._context.ortho), this._shader.setUniformBoolean("u_dashed", this._currentlyDashed), t.drawArrays(t.TRIANGLES, 0, this._lineCount * 6), Y.DrawnImagesCount += this._lineCount, Y.DrawCallCount++, this._vertexIndex = 0, this._lineCount = 0, this._lengthSoFar = 0;
10392
+ this._shader.use(), this._layout.use(!0), this._shader.setUniformMatrix("u_matrix", this._context.ortho), this._shader.setUniformBoolean("u_dashed", this._currentlyDashed), t.drawArrays(t.TRIANGLES, 0, this._lineCount * 6), Z.DrawnImagesCount += this._lineCount, Z.DrawCallCount++, this._vertexIndex = 0, this._lineCount = 0, this._lengthSoFar = 0;
10393
10393
  }
10394
10394
  }
10395
10395
  const Ko = `#version 300 es
@@ -10467,7 +10467,7 @@ class ea {
10467
10467
  if (this._pointCount === 0)
10468
10468
  return;
10469
10469
  const t = this._gl;
10470
- this._shader.use(), this._layout.use(!0), this._shader.setUniformMatrix("u_matrix", this._context.ortho), t.drawArrays(t.POINTS, 0, this._pointCount), Y.DrawnImagesCount += this._pointCount, Y.DrawCallCount++, this._pointCount = 0, this._vertexIndex = 0;
10470
+ this._shader.use(), this._layout.use(!0), this._shader.setUniformMatrix("u_matrix", this._context.ortho), t.drawArrays(t.POINTS, 0, this._pointCount), Z.DrawnImagesCount += this._pointCount, Z.DrawCallCount++, this._pointCount = 0, this._vertexIndex = 0;
10471
10471
  }
10472
10472
  }
10473
10473
  const ia = `#version 300 es
@@ -10616,7 +10616,7 @@ class na {
10616
10616
  if (this._circleCount === 0)
10617
10617
  return;
10618
10618
  const t = this._gl;
10619
- this._shader.use(), this._layout.use(!0), this._shader.setUniformMatrix("u_matrix", this._context.ortho), this._quads.bind(), t.drawElements(t.TRIANGLES, this._circleCount * 6, this._quads.bufferGlType, 0), Y.DrawnImagesCount += this._circleCount, Y.DrawCallCount++, this._circleCount = 0, this._vertexIndex = 0;
10619
+ this._shader.use(), this._layout.use(!0), this._shader.setUniformMatrix("u_matrix", this._context.ortho), this._quads.bind(), t.drawElements(t.TRIANGLES, this._circleCount * 6, this._quads.bufferGlType, 0), Z.DrawnImagesCount += this._circleCount, Z.DrawCallCount++, this._circleCount = 0, this._vertexIndex = 0;
10620
10620
  }
10621
10621
  }
10622
10622
  const ra = `#version 300 es
@@ -10880,8 +10880,8 @@ class ca {
10880
10880
  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];
10881
10881
  const f = this._view[2], b = this._view[3], C = this._context.getTransform(), S = this._context.opacity, E = this._context.snapToPixel;
10882
10882
  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));
10883
- 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, z = (i + b - this.uvPadding) / O, ot = p, ct = g, A = this._layout.vertexBuffer.bufferData;
10884
- 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++] = z, 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++] = z, 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;
10883
+ 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, $ = (e + f - this.uvPadding) / L, z = (i + b - this.uvPadding) / O, ot = p, ct = g, A = this._layout.vertexBuffer.bufferData;
10884
+ 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++] = z, 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++] = $, 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++] = $, A[this._vertexIndex++] = z, 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;
10885
10885
  }
10886
10886
  hasPendingDraws() {
10887
10887
  return this._imageCount !== 0;
@@ -10890,7 +10890,7 @@ class ca {
10890
10890
  if (this._imageCount === 0)
10891
10891
  return;
10892
10892
  const t = this._gl;
10893
- this._shader.use(), this._layout.use(!0, 48 * this._imageCount), this._shader.setUniformMatrix("u_matrix", this._context.ortho), this._shader.setUniformBoolean("u_pixelart", this.pixelArtSampler), this._bindTextures(t), this._quads.bind(), t.drawElements(t.TRIANGLES, this._imageCount * 6, this._quads.bufferGlType, 0), Y.DrawnImagesCount += this._imageCount, Y.DrawCallCount++, this._imageCount = 0, this._vertexIndex = 0, this._textures.length = 0, this._textureIndex = 0, this._textureToIndex.clear(), this._images.clear(), this._imageToWidth.clear(), this._imageToHeight.clear();
10893
+ this._shader.use(), this._layout.use(!0, 48 * this._imageCount), this._shader.setUniformMatrix("u_matrix", this._context.ortho), this._shader.setUniformBoolean("u_pixelart", this.pixelArtSampler), this._bindTextures(t), this._quads.bind(), t.drawElements(t.TRIANGLES, this._imageCount * 6, this._quads.bufferGlType, 0), Z.DrawnImagesCount += this._imageCount, Z.DrawCallCount++, this._imageCount = 0, this._vertexIndex = 0, this._textures.length = 0, this._textureIndex = 0, this._textureToIndex.clear(), this._images.clear(), this._imageToWidth.clear(), this._imageToHeight.clear();
10894
10894
  }
10895
10895
  }
10896
10896
  const da = `#version 300 es
@@ -11079,7 +11079,7 @@ class _a {
11079
11079
  if (this._rectangleCount === 0)
11080
11080
  return;
11081
11081
  const t = this._gl;
11082
- this._shader.use(), this._layout.use(!0), this._shader.setUniformMatrix("u_matrix", this._context.ortho), this._quads.bind(), t.drawElements(t.TRIANGLES, this._rectangleCount * 6, this._quads.bufferGlType, 0), Y.DrawnImagesCount += this._rectangleCount, Y.DrawCallCount++, this._rectangleCount = 0, this._vertexIndex = 0;
11082
+ this._shader.use(), this._layout.use(!0), this._shader.setUniformMatrix("u_matrix", this._context.ortho), this._quads.bind(), t.drawElements(t.TRIANGLES, this._rectangleCount * 6, this._quads.bufferGlType, 0), Z.DrawnImagesCount += this._rectangleCount, Z.DrawCallCount++, this._rectangleCount = 0, this._vertexIndex = 0;
11083
11083
  }
11084
11084
  }
11085
11085
  const fa = `#version 300 es
@@ -11219,7 +11219,7 @@ class pa {
11219
11219
  if (this._circleCount === 0)
11220
11220
  return;
11221
11221
  const t = this._gl;
11222
- this._shader.use(), this._layout.use(!0), this._shader.setUniformMatrix("u_matrix", this._context.ortho), this._quads.bind(), t.drawElements(t.TRIANGLES, this._circleCount * 6, this._quads.bufferGlType, 0), Y.DrawnImagesCount += this._circleCount, Y.DrawCallCount++, this._circleCount = 0, this._vertexIndex = 0;
11222
+ this._shader.use(), this._layout.use(!0), this._shader.setUniformMatrix("u_matrix", this._context.ortho), this._quads.bind(), t.drawElements(t.TRIANGLES, this._circleCount * 6, this._quads.bufferGlType, 0), Z.DrawnImagesCount += this._circleCount, Z.DrawCallCount++, this._circleCount = 0, this._vertexIndex = 0;
11223
11223
  }
11224
11224
  }
11225
11225
  class ma {
@@ -11264,10 +11264,10 @@ class Ns {
11264
11264
  const m = this._context.getTransform(), f = this._context.opacity, b = v.getShader(), C = this._layout.vertexBuffer.bufferData;
11265
11265
  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];
11266
11266
  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];
11267
- const O = k[2], Q = k[3], st = w(L[0], L[1]), X = w(L[0] + E, L[1]), z = 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, Li = m.getPosition(), Ms = Li.add(ot), Fs = Li.x / this._context.width, Ds = Li.y / this._context.height, Bs = Ms.x / this._context.width, ks = Ms.y / this._context.height;
11268
- C[S++] = st.x, C[S++] = st.y, C[S++] = oe, C[S++] = ae, C[S++] = Fs, C[S++] = Ds, C[S++] = z.x, C[S++] = z.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;
11267
+ const O = k[2], Q = k[3], st = w(L[0], L[1]), $ = w(L[0] + E, L[1]), z = 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, Li = m.getPosition(), Ms = Li.add(ot), Fs = Li.x / this._context.width, Ds = Li.y / this._context.height, Bs = Ms.x / this._context.width, ks = Ms.y / this._context.height;
11268
+ C[S++] = st.x, C[S++] = st.y, C[S++] = oe, C[S++] = ae, C[S++] = Fs, C[S++] = Ds, C[S++] = z.x, C[S++] = z.y, C[S++] = oe, C[S++] = Le, C[S++] = Fs, C[S++] = ks, C[S++] = $.x, C[S++] = $.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;
11269
11269
  let Ls = this._addImageAsTexture(t);
11270
- 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), Y.DrawnImagesCount++, Y.DrawCallCount++;
11270
+ 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), Z.DrawnImagesCount++, Z.DrawCallCount++;
11271
11271
  }
11272
11272
  _addImageAsTexture(t) {
11273
11273
  const e = t.getAttribute(U.Filtering), i = e ? ti(e) : void 0, s = Nt(t.getAttribute(U.WrappingX)), n = Nt(t.getAttribute(U.WrappingY)), o = t.getAttribute("forceUpload") === "true", a = this._context.textureLoader.load(
@@ -11525,8 +11525,8 @@ class wa {
11525
11525
  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];
11526
11526
  const f = this._view[2], b = this._view[3], C = this._context.getTransform(), S = this._context.opacity;
11527
11527
  this._context.snapToPixel && (this._dest[0] = ~~(this._dest[0] + M), this._dest[1] = ~~(this._dest[1] + M));
11528
- 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, z = (i + b - this.uvPadding) / O, ot = p, ct = g, A = this._transformData.bufferData;
11529
- 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++] = z, A[this._vertexIndex++] = y.r / 255, A[this._vertexIndex++] = y.g / 255, A[this._vertexIndex++] = y.b / 255, A[this._vertexIndex++] = y.a;
11528
+ 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, $ = (e + f - this.uvPadding) / L, z = (i + b - this.uvPadding) / O, ot = p, ct = g, A = this._transformData.bufferData;
11529
+ 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++] = $, A[this._vertexIndex++] = z, A[this._vertexIndex++] = y.r / 255, A[this._vertexIndex++] = y.g / 255, A[this._vertexIndex++] = y.b / 255, A[this._vertexIndex++] = y.a;
11530
11530
  }
11531
11531
  hasPendingDraws() {
11532
11532
  return this._imageCount !== 0;
@@ -11535,7 +11535,7 @@ class wa {
11535
11535
  if (this._imageCount === 0)
11536
11536
  return;
11537
11537
  const t = this._gl;
11538
- this._shader.use(), this._bindData(t), this._shader.setUniformMatrix("u_matrix", this._context.ortho), this._shader.setUniformBoolean("u_pixelart", this.pixelArtSampler), this._bindTextures(t), t.drawArraysInstanced(t.TRIANGLES, 0, 6, this._imageCount), Y.DrawnImagesCount += this._imageCount, Y.DrawCallCount++, t.bindVertexArray(null), this._imageCount = 0, this._vertexIndex = 0, this._textures.length = 0, this._textureIndex = 0, this._textureToIndex.clear(), this._images.clear(), this._imageToWidth.clear(), this._imageToHeight.clear();
11538
+ this._shader.use(), this._bindData(t), this._shader.setUniformMatrix("u_matrix", this._context.ortho), this._shader.setUniformBoolean("u_pixelart", this.pixelArtSampler), this._bindTextures(t), t.drawArraysInstanced(t.TRIANGLES, 0, 6, this._imageCount), Z.DrawnImagesCount += this._imageCount, Z.DrawCallCount++, t.bindVertexArray(null), this._imageCount = 0, this._vertexIndex = 0, this._textures.length = 0, this._textureIndex = 0, this._textureToIndex.clear(), this._images.clear(), this._imageToWidth.clear(), this._imageToHeight.clear();
11539
11539
  }
11540
11540
  }
11541
11541
  const M = 1e-4;
@@ -11902,7 +11902,7 @@ If you want to do custom drawing, use Actor.graphics, or any onPreDraw or onPost
11902
11902
  if (this._drawCalls.length && this._drawCallIndex) {
11903
11903
  let o = this._drawCalls[0].renderer, a = this.get(o);
11904
11904
  for (let h = 0; h < this._drawCallIndex; h++)
11905
- this._transform.current = this._drawCalls[h].transform, this._state.current = this._drawCalls[h].state, this._drawCalls[h].renderer !== o && (a.flush(), o = this._drawCalls[h].renderer, a = this.get(o), Y.RendererSwaps++), a instanceof Ns && ((t = this.material) != null && t.isUsingScreenTexture) && (e.copyToTexture(this.materialScreenTexture), e.use()), a.draw(...this._drawCalls[h].args);
11905
+ this._transform.current = this._drawCalls[h].transform, this._state.current = this._drawCalls[h].state, this._drawCalls[h].renderer !== o && (a.flush(), o = this._drawCalls[h].renderer, a = this.get(o), Z.RendererSwaps++), a instanceof Ns && ((t = this.material) != null && t.isUsingScreenTexture) && (e.copyToTexture(this.materialScreenTexture), e.use()), a.draw(...this._drawCalls[h].args);
11906
11906
  a.hasPendingDraws() && a.flush();
11907
11907
  }
11908
11908
  this._transform.current = s, this._state.current = n, this._drawCallPool.done(), this._drawCallIndex = 0, this._imageToHeight.clear(), this._imageToWidth.clear();
@@ -13536,7 +13536,7 @@ const Nl = {
13536
13536
  * @param config
13537
13537
  */
13538
13538
  constructor(t) {
13539
- super(), this.events = new Z(), this._anchor = Pt(x.Half, (O) => this._handleAnchorChange(O)), this._offset = Pt(x.Zero, (O) => this._handleOffsetChange(O)), this.logger = I.getInstance(), this._draggable = !1, this._dragging = !1, this._pointerDragStartHandler = () => {
13539
+ super(), this.events = new X(), this._anchor = Pt(x.Half, (O) => this._handleAnchorChange(O)), this._offset = Pt(x.Zero, (O) => this._handleOffsetChange(O)), this.logger = I.getInstance(), this._draggable = !1, this._dragging = !1, this._pointerDragStartHandler = () => {
13540
13540
  this._dragging = !0;
13541
13541
  }, this._pointerDragEndHandler = () => {
13542
13542
  this._dragging = !1;
@@ -14063,7 +14063,7 @@ Rr.defaults = {
14063
14063
  let Dt = Rr;
14064
14064
  class it extends kt {
14065
14065
  constructor(t) {
14066
- super(), this.events = new Z(), this.$colliderAdded = new xt(), this.$colliderRemoved = new xt(), this._collidersToRemove = [], this.set(t);
14066
+ super(), this.events = new X(), this.$colliderAdded = new xt(), this.$colliderRemoved = new xt(), this._collidersToRemove = [], this.set(t);
14067
14067
  }
14068
14068
  /**
14069
14069
  * Get the current collider geometry
@@ -14216,7 +14216,7 @@ var le = /* @__PURE__ */ ((r) => (r.Rotation = "rotation", r.X = "x", r.Y = "y",
14216
14216
  const bs = class di extends kt {
14217
14217
  constructor(t) {
14218
14218
  var e, i, s;
14219
- super(), this.dependencies = [P, H], this.id = Pe("body", di._ID++), this.events = new Z(), this.oldTransform = new re(), this.__oldTransformCaptured = !1, this.enableFixedUpdateInterpolate = !0, this.collisionType = R.PreventCollision, this.group = Ee.All, this._sleeping = !1, this.bounciness = 0.2, this.friction = 0.99, this.useGravity = !0, this.limitDegreeOfFreedom = [], this._oldGlobalPos = x.Zero, this.oldVel = new x(0, 0), this.oldAcc = x.Zero, this._impulseScratch = w(0, 0), this._distanceFromCenterScratch = w(0, 0), t ? (this.collisionType = (e = t.type) != null ? e : this.collisionType, this.group = (i = t.group) != null ? i : this.group, this.useGravity = (s = t.useGravity) != null ? s : this.useGravity, this._bodyConfig = {
14219
+ super(), this.dependencies = [P, H], this.id = Pe("body", di._ID++), this.events = new X(), this.oldTransform = new re(), this.__oldTransformCaptured = !1, this.enableFixedUpdateInterpolate = !0, this.collisionType = R.PreventCollision, this.group = Ee.All, this._sleeping = !1, this.bounciness = 0.2, this.friction = 0.99, this.useGravity = !0, this.limitDegreeOfFreedom = [], this._oldGlobalPos = x.Zero, this.oldVel = new x(0, 0), this.oldAcc = x.Zero, this._impulseScratch = w(0, 0), this._distanceFromCenterScratch = w(0, 0), t ? (this.collisionType = (e = t.type) != null ? e : this.collisionType, this.group = (i = t.group) != null ? i : this.group, this.useGravity = (s = t.useGravity) != null ? s : this.useGravity, this._bodyConfig = {
14220
14220
  ...ne().bodies,
14221
14221
  ...t.config
14222
14222
  }) : this._bodyConfig = {
@@ -14681,8 +14681,8 @@ class Xs {
14681
14681
  const O = $t.calculateHashKey(b, C), Q = this.hashGrid.sparseHashGrid.get(O);
14682
14682
  if (Q) {
14683
14683
  const st = [];
14684
- for (let X = 0; X < Q.proxies.length; X++) {
14685
- const z = Q.proxies[X];
14684
+ for (let $ = 0; $ < Q.proxies.length; $++) {
14685
+ const z = Q.proxies[$];
14686
14686
  if (!y.has(z.collider.id.value)) {
14687
14687
  if (y.add(z.collider.id.value), z.body) {
14688
14688
  if (e != null && e.ignoreCollisionGroupAll && z.body.group === Ee.All)
@@ -14695,9 +14695,9 @@ class Xs {
14695
14695
  ot && st.push(ot);
14696
14696
  }
14697
14697
  }
14698
- st.sort((X, z) => X.distance - z.distance);
14699
- for (let X = 0; X < st.length; X++) {
14700
- const z = st[X];
14698
+ st.sort(($, z) => $.distance - z.distance);
14699
+ for (let $ = 0; $ < st.length; $++) {
14700
+ const z = st[$];
14701
14701
  if (e != null && e.filter) {
14702
14702
  if (e.filter(z) && (o.push(z), !c)) {
14703
14703
  k = !0;
@@ -15107,8 +15107,8 @@ class Ys {
15107
15107
  for (let m = 0; m < l.points.length; m++) {
15108
15108
  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;
15109
15109
  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;
15110
- const X = _.bounciness > g.bounciness ? _.bounciness : g.bounciness, z = l.normal.dot(d[u].getRelativeVelocity());
15111
- d[u].originalVelocityAndRestitution = 0, z < -0.1 && (d[u].originalVelocityAndRestitution = -X * z), u++;
15110
+ const $ = _.bounciness > g.bounciness ? _.bounciness : g.bounciness, z = l.normal.dot(d[u].getRelativeVelocity());
15111
+ d[u].originalVelocityAndRestitution = 0, z < -0.1 && (d[u].originalVelocityAndRestitution = -$ * z), u++;
15112
15112
  }
15113
15113
  this.idToContactConstraint.set(l.id, d);
15114
15114
  }
@@ -15429,7 +15429,7 @@ const Wl = {
15429
15429
  };
15430
15430
  class js {
15431
15431
  constructor(t) {
15432
- this.events = new Z(), this._antialiasing = !0, this._canvasImageRendering = "auto", this._resolutionStack = [], this._viewportStack = [], this._pixelRatioOverride = null, this._isFullscreen = !1, this._isDisposed = !1, this._logger = I.getInstance(), this._fullscreenChangeHandler = () => {
15432
+ this.events = new X(), this._antialiasing = !0, this._canvasImageRendering = "auto", this._resolutionStack = [], this._viewportStack = [], this._pixelRatioOverride = null, this._isFullscreen = !1, this._isDisposed = !1, this._logger = I.getInstance(), this._fullscreenChangeHandler = () => {
15433
15433
  this._isDisposed || (this._isFullscreen = !this._isFullscreen, this._logger.debug("Fullscreen Change", this._isFullscreen), this.events.emit("fullscreen", {
15434
15434
  fullscreen: this.isFullscreen
15435
15435
  }));
@@ -16253,7 +16253,7 @@ function sh(r) {
16253
16253
  }
16254
16254
  class Lr {
16255
16255
  constructor(...t) {
16256
- this.events = new Z(), this.logger = I.getInstance(), this._loop = !1, this._volume = 1, this._isStopped = !1, this._tracks = [], this._wasPlayingOnHidden = !1, this._playbackRate = 1, this._audioContext = wi.create();
16256
+ this.events = new X(), this.logger = I.getInstance(), this._loop = !1, this._volume = 1, this._isStopped = !1, this._tracks = [], this._wasPlayingOnHidden = !1, this._playbackRate = 1, this._audioContext = wi.create();
16257
16257
  let e;
16258
16258
  sh(t) ? e = t[0] : e = {
16259
16259
  paths: t
@@ -16489,7 +16489,7 @@ class bi {
16489
16489
  * @param options Optionally provide the list of resources you want to load at constructor time
16490
16490
  */
16491
16491
  constructor(t) {
16492
- this.events = new Z(), this.canvas = new xs({
16492
+ this.events = new X(), this.canvas = new xs({
16493
16493
  filtering: wt.Blended,
16494
16494
  smoothing: !0,
16495
16495
  cache: !1,
@@ -16625,7 +16625,7 @@ const nh = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdQAAAB2CAYAAABxhGI9AA
16625
16625
  const e = Array.isArray(t) ? {
16626
16626
  loadables: t
16627
16627
  } : t;
16628
- super(e), this._logger = I.getInstance(), this._originalOptions = { loadables: [] }, this.events = new Z(), 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 = () => {
16628
+ super(e), this._logger = I.getInstance(), this._originalOptions = { loadables: [] }, this.events = new X(), 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 = () => {
16629
16629
  let i = document.getElementById("excalibur-play");
16630
16630
  if (i || (i = document.createElement("button")), i.id = "excalibur-play", i.style.display = "none", i) {
16631
16631
  const s = document.createElement("span");
@@ -16878,21 +16878,30 @@ class Hr extends Dt {
16878
16878
  return super.contains(s.x, s.y);
16879
16879
  }
16880
16880
  }
16881
- const Or = class Nr {
16881
+ const ql = {
16882
+ Start: "start",
16883
+ Stop: "stop",
16884
+ Pause: "pause",
16885
+ Resume: "resume",
16886
+ Cancel: "cancel",
16887
+ Action: "action",
16888
+ Complete: "complete"
16889
+ }, Or = class Nr {
16882
16890
  constructor(t) {
16883
- this._logger = I.getInstance(), this.id = 0, this._elapsedTime = 0, this._totalTimeAlive = 0, this._running = !1, this._numberOfTicks = 0, this.interval = 10, this.repeats = !1, this.maxNumberOfRepeats = -1, this.randomRange = [0, 0], this._baseInterval = 10, this._generateRandomInterval = () => this._baseInterval + this.random.integer(this.randomRange[0], this.randomRange[1]), this._complete = !1, this.scene = null;
16884
- var e;
16885
- const i = (e = t.action) != null ? e : t.fcn, s = t.interval, n = t.repeats, o = t.numberOfRepeats, a = t.randomRange, h = t.random;
16886
- if (o && o >= 0 && (this.maxNumberOfRepeats = o, !n))
16891
+ this._logger = I.getInstance(), this.id = 0, this.events = new X(), this._elapsedTime = 0, this._totalTimeAlive = 0, this._running = !1, this._numberOfTicks = 0, this.interval = 10, this.repeats = !1, this.maxNumberOfRepeats = -1, this.randomRange = [0, 0], this._baseInterval = 10, this._generateRandomInterval = () => this._baseInterval + this.random.integer(this.randomRange[0], this.randomRange[1]), this._onComplete = () => {
16892
+ }, this._complete = !1, this.scene = null;
16893
+ var e, i;
16894
+ const s = (e = t.action) != null ? e : t.fcn, n = t.interval, o = t.repeats, a = t.numberOfRepeats, h = t.randomRange, l = t.random;
16895
+ if (this._onComplete = (i = t.onComplete) != null ? i : this._onComplete, a && a >= 0 && (this.maxNumberOfRepeats = a, !o))
16887
16896
  throw new Error("repeats must be set to true if numberOfRepeats is set");
16888
- if (this.id = Nr._MAX_ID++, this._callbacks = [], this._baseInterval = this.interval = s, a) {
16889
- if (a[0] > a[1])
16897
+ if (this.id = Nr._MAX_ID++, this._callbacks = [], this._baseInterval = this.interval = n, h) {
16898
+ if (h[0] > h[1])
16890
16899
  throw new Error("min value must be lower than max value for range");
16891
- this.random = h != null ? h : new ge(), this.randomRange = a, this.interval = this._generateRandomInterval(), this.on(() => {
16900
+ this.random = l != null ? l : new ge(), this.randomRange = h, this.interval = this._generateRandomInterval(), this.on(() => {
16892
16901
  this.interval = this._generateRandomInterval();
16893
16902
  });
16894
16903
  }
16895
- this.repeats = n || this.repeats, i && this.on(i);
16904
+ this.repeats = o || this.repeats, s && this.on(s);
16896
16905
  }
16897
16906
  get complete() {
16898
16907
  return this._complete;
@@ -16917,9 +16926,9 @@ const Or = class Nr {
16917
16926
  * @param elapsed Number of elapsed milliseconds since the last update.
16918
16927
  */
16919
16928
  update(t) {
16920
- this._running && (this._totalTimeAlive += t, this._elapsedTime += t, this.maxNumberOfRepeats > -1 && this._numberOfTicks >= this.maxNumberOfRepeats && (this._complete = !0, this._running = !1, this._elapsedTime = 0), !this.complete && this._elapsedTime >= this.interval && (this._callbacks.forEach((e) => {
16929
+ this._running && (this._totalTimeAlive += t, this._elapsedTime += t, this.maxNumberOfRepeats > -1 && this._numberOfTicks >= this.maxNumberOfRepeats && (this._complete = !0, this._running = !1, this._elapsedTime = 0, this._onComplete(), this.events.emit("complete")), !this.complete && this._elapsedTime >= this.interval && (this._callbacks.forEach((e) => {
16921
16930
  e.call(this);
16922
- }), this._numberOfTicks++, this.repeats ? this._elapsedTime = 0 : (this._complete = !0, this._running = !1, this._elapsedTime = 0)));
16931
+ }), this._numberOfTicks++, this.events.emit("action"), this.repeats ? this._elapsedTime = 0 : (this._complete = !0, this._running = !1, this._elapsedTime = 0, this._onComplete(), this.events.emit("complete"))));
16923
16932
  }
16924
16933
  /**
16925
16934
  * Resets the timer so that it can be reused, and optionally reconfigure the timers interval.
@@ -16958,31 +16967,31 @@ const Or = class Nr {
16958
16967
  * Pauses the timer, time will no longer increment towards the next call
16959
16968
  */
16960
16969
  pause() {
16961
- return this._running = !1, this;
16970
+ return this._running = !1, this.events.emit("pause"), this;
16962
16971
  }
16963
16972
  /**
16964
16973
  * Resumes the timer, time will now increment towards the next call.
16965
16974
  */
16966
16975
  resume() {
16967
- return this._running = !0, this;
16976
+ return this._running = !0, this.events.emit("resume"), this;
16968
16977
  }
16969
16978
  /**
16970
16979
  * Starts the timer, if the timer was complete it will restart the timer and reset the elapsed time counter
16971
16980
  */
16972
16981
  start() {
16973
- return this.scene || this._logger.warn("Cannot start a timer not part of a scene, timer wont start until added"), this._running = !0, this.complete && (this._complete = !1, this._elapsedTime = 0, this._numberOfTicks = 0), this;
16982
+ return this.scene || this._logger.warn("Cannot start a timer not part of a scene, timer wont start until added"), this._running = !0, this.complete ? (this._complete = !1, this._elapsedTime = 0, this._numberOfTicks = 0) : this.events.emit("start"), this;
16974
16983
  }
16975
16984
  /**
16976
16985
  * Stops the timer and resets the elapsed time counter towards the next action invocation
16977
16986
  */
16978
16987
  stop() {
16979
- return this._running = !1, this._elapsedTime = 0, this._numberOfTicks = 0, this;
16988
+ return this._running = !1, this._elapsedTime = 0, this._numberOfTicks = 0, this.events.emit("stop"), this;
16980
16989
  }
16981
16990
  /**
16982
16991
  * Cancels the timer, preventing any further executions.
16983
16992
  */
16984
16993
  cancel() {
16985
- this.pause(), this.scene && this.scene.cancelTimer(this);
16994
+ this.pause(), this.scene && (this.scene.cancelTimer(this), this.events.emit("cancel"));
16986
16995
  }
16987
16996
  };
16988
16997
  Or._MAX_ID = 0;
@@ -17150,7 +17159,7 @@ class Ss {
17150
17159
  i.active && e.active() && this._objectCurrentlyUnderPointer(e, 0) && e.events.emit("pointerwheel", i);
17151
17160
  }
17152
17161
  }
17153
- const ql = {
17162
+ const Xl = {
17154
17163
  PreUpdate: "preupdate",
17155
17164
  PostUpdate: "postupdate",
17156
17165
  PreDraw: "predraw",
@@ -17166,7 +17175,7 @@ class lh extends Rt {
17166
17175
  */
17167
17176
  constructor(t) {
17168
17177
  var e, i, s;
17169
- super([], t.name), this.events = new Z(), this._token = 0, this.logger = I.getInstance(), this.tiles = [], this._rows = [], this._cols = [], this.renderFromTopOfGraphic = !1, this.meshingLookBehind = 10, this._collidersDirty = !0, this._oldRotation = 0, this._originalOffsets = /* @__PURE__ */ new WeakMap(), this.meshingLookBehind = (e = t.meshingLookBehind) != null ? e : this.meshingLookBehind, this.addComponent(new P()), this.addComponent(new H()), this.addComponent(
17178
+ super([], t.name), this.events = new X(), this._token = 0, this.logger = I.getInstance(), this.tiles = [], this._rows = [], this._cols = [], this.renderFromTopOfGraphic = !1, this.meshingLookBehind = 10, this._collidersDirty = !0, this._oldRotation = 0, this._originalOffsets = /* @__PURE__ */ new WeakMap(), this.meshingLookBehind = (e = t.meshingLookBehind) != null ? e : this.meshingLookBehind, this.addComponent(new P()), this.addComponent(new H()), this.addComponent(
17170
17179
  new N({
17171
17180
  type: R.Fixed
17172
17181
  })
@@ -17476,7 +17485,7 @@ class lh extends Rt {
17476
17485
  }
17477
17486
  class ch {
17478
17487
  constructor(t) {
17479
- this._posDirty = !1, this.events = new Z(), this._solid = !1, this._graphics = [], this._offsets = [], this._colliders = [], this.data = /* @__PURE__ */ new Map();
17488
+ this._posDirty = !1, this.events = new X(), this._solid = !1, this._graphics = [], this._offsets = [], this._colliders = [], this.data = /* @__PURE__ */ new Map();
17480
17489
  var e, i;
17481
17490
  this.x = t.x, this.y = t.y, this.map = t.map, this._width = t.map.tileWidth * this.map.scale.x, this._height = t.map.tileHeight * this.map.scale.y, this.solid = (e = t.solid) != null ? e : this.solid, this._graphics = (i = t.graphics) != null ? i : [], this._recalculate();
17482
17491
  }
@@ -17634,7 +17643,7 @@ class dh extends Rt {
17634
17643
  onPostDraw: (u, _) => this.draw(u, _)
17635
17644
  }),
17636
17645
  new yi(s)
17637
- ]), this.solid = !1, this.events = new Z(), this._tileBounds = new F(), this._graphics = [], this._colliders = [], this.data = /* @__PURE__ */ new Map(), this.x = t, this.y = e, this.map = s, this._transform = this.get(P), this._isometricEntityComponent = this.get(yi);
17646
+ ]), this.solid = !1, this.events = new X(), this._tileBounds = new F(), this._graphics = [], this._colliders = [], this.data = /* @__PURE__ */ new Map(), this.x = t, this.y = e, this.map = s, this._transform = this.get(P), this._isometricEntityComponent = this.get(yi);
17638
17647
  const n = this.map.tileWidth / 2, o = this.map.tileHeight / 2, a = (this.x - this.y) * n, h = (this.x + this.y) * o;
17639
17648
  this._transform.pos = w(a, h), this._isometricEntityComponent.elevation = s.elevation, this._gfx = this.get(tt), this._gfx.isVisible = !1;
17640
17649
  const l = this.map.tileWidth, c = this.map.tileHeight, d = w(0, this.map.renderFromTopOfGraphic ? c : 0);
@@ -17722,7 +17731,7 @@ class dh extends Rt {
17722
17731
  t.restore();
17723
17732
  }
17724
17733
  }
17725
- class Xl extends Rt {
17734
+ class $l extends Rt {
17726
17735
  constructor(t) {
17727
17736
  super(
17728
17737
  [
@@ -18003,14 +18012,14 @@ class xh {
18003
18012
  };
18004
18013
  }
18005
18014
  }
18006
- const $l = {
18015
+ const Yl = {
18007
18016
  Initialize: "initialize",
18008
18017
  PreUpdate: "preupdate",
18009
18018
  PostUpdate: "postupdate"
18010
18019
  };
18011
18020
  class vh {
18012
18021
  constructor() {
18013
- this.events = new Z(), this.transform = j.identity(), this.inverse = j.identity(), this._cameraStrategies = [], this.strategy = new uh(this), this._z = 1, this.dz = 0, this.az = 0, this.rotation = 0, this._angularVelocity = 0, this._posChanged = !1, this._pos = new ie(x.Zero, () => {
18022
+ this.events = new X(), this.transform = j.identity(), this.inverse = j.identity(), this._cameraStrategies = [], this.strategy = new uh(this), this._z = 1, this.dz = 0, this.az = 0, this.rotation = 0, this._angularVelocity = 0, this._posChanged = !1, this._pos = new ie(x.Zero, () => {
18014
18023
  this._posChanged = !0;
18015
18024
  }), this.drawPos = this.pos.clone(), this._oldPos = this.pos.clone(), this.vel = x.Zero, this.acc = x.Zero, this._cameraMoving = !1, this._currentLerpTime = 0, this._lerpDuration = 1e3, this._lerpStart = null, this._lerpEnd = null, this._isShaking = !1, this._shakeMagnitudeX = 0, this._shakeMagnitudeY = 0, this._shakeDuration = 0, this._elapsedShakeTime = 0, this._xShake = 0, this._yShake = 0, this._isZooming = !1, this._zoomStart = 1, this._zoomEnd = 1, this._currentZoomTime = 0, this._zoomDuration = 0, this._legacyZoomEasing = It.EaseInOutCubic, this._useLegacyZoom = !1, this._zoomEasing = Hs, this._legacyEasing = It.EaseInOutCubic, this._useLegacyEasing = !1, this._easing = Hs, this._halfWidth = 0, this._halfHeight = 0, this._viewport = null, this._isInitialized = !1, this._snapPos = w(0, 0);
18016
18025
  }
@@ -18319,7 +18328,7 @@ class vh {
18319
18328
  return !this._isShaking || this._elapsedShakeTime >= this._shakeDuration;
18320
18329
  }
18321
18330
  }
18322
- const Yl = {
18331
+ const Zl = {
18323
18332
  ExitTrigger: "exit",
18324
18333
  EnterTrigger: "enter"
18325
18334
  };
@@ -18329,7 +18338,7 @@ class wh extends Dt {
18329
18338
  */
18330
18339
  constructor(t) {
18331
18340
  var e, i, s, n;
18332
- super({ ...t }), this.events = new Z(), this.filter = (e = t.filter) != null ? e : () => !0, this.repeat = (i = t.repeat) != null ? i : -1, this.action = (s = t.action) != null ? s : () => {
18341
+ super({ ...t }), this.events = new X(), this.filter = (e = t.filter) != null ? e : () => !0, this.repeat = (i = t.repeat) != null ? i : -1, this.action = (s = t.action) != null ? s : () => {
18333
18342
  }, this.target = t.target, this.graphics.isVisible = (n = t.visible) != null ? n : !1, this.body.collisionType = R.Passive, this.events.on("collisionstart", ({ other: o }) => {
18334
18343
  this._matchesTarget(o.owner) && (this.events.emit("enter", new Hn(this, o.owner)), this._dispatchAction(o.owner), this.repeat === 0 && this.kill());
18335
18344
  }), this.events.on("collisionend", ({ other: o }) => {
@@ -18518,7 +18527,7 @@ class Gr extends Ft {
18518
18527
  Gr.priority = Jt.Higher;
18519
18528
  class Ps {
18520
18529
  constructor() {
18521
- this.events = new Z(), this.enabled = !1, this.supported = !!navigator.getGamepads, this._gamePadTimeStamps = [0, 0, 0, 0], this._oldPads = [], this._pads = [], this._initSuccess = !1, this._navigator = navigator, this._minimumConfiguration = null, this._enabled = !0;
18530
+ this.events = new X(), this.enabled = !1, this.supported = !!navigator.getGamepads, this._gamePadTimeStamps = [0, 0, 0, 0], this._oldPads = [], this._pads = [], this._initSuccess = !1, this._navigator = navigator, this._minimumConfiguration = null, this._enabled = !0;
18522
18531
  }
18523
18532
  init() {
18524
18533
  this.supported && (this._initSuccess || (this._oldPads = this._clonePads(this._navigator.getGamepads()), this._oldPads.length && this._oldPads[0] && (this._initSuccess = !0)));
@@ -18656,7 +18665,7 @@ class Ps {
18656
18665
  Ps.MinAxisMoveThreshold = 0.05;
18657
18666
  class Wi {
18658
18667
  constructor() {
18659
- this.events = new Z(), this.connected = !1, this._axes = new Array(4), this._buttons = new Array(16), this._buttonsUp = new Array(16), this._buttonsDown = new Array(16);
18668
+ this.events = new X(), this.connected = !1, this._axes = new Array(4), this._buttons = new Array(16), this._buttonsUp = new Array(16), this._buttonsDown = new Array(16);
18660
18669
  for (let t = 0; t < this._buttons.length; t++)
18661
18670
  this._buttons[t] = 0;
18662
18671
  for (let t = 0; t < this._axes.length; t++)
@@ -18798,7 +18807,7 @@ class ri extends B {
18798
18807
  }
18799
18808
  class Th {
18800
18809
  constructor() {
18801
- this.events = new Z(), this._enabled = !0, this._keys = [], this._keysUp = [], this._keysDown = [], this._releaseAllKeys = (t) => {
18810
+ this.events = new X(), this._enabled = !0, this._keys = [], this._keysUp = [], this._keysDown = [], this._releaseAllKeys = (t) => {
18802
18811
  for (const e of this._keys) {
18803
18812
  const i = new ri(e, t.key, t);
18804
18813
  this.events.emit("up", i), this.events.emit("release", i);
@@ -18936,7 +18945,7 @@ class Sh {
18936
18945
  }
18937
18946
  class tn {
18938
18947
  constructor() {
18939
- this.events = new Z(), this.lastPagePos = x.Zero, this.lastScreenPos = x.Zero, this.lastWorldPos = x.Zero, this._onPointerMove = (t) => {
18948
+ this.events = new X(), this.lastPagePos = x.Zero, this.lastScreenPos = x.Zero, this.lastWorldPos = x.Zero, this._onPointerMove = (t) => {
18940
18949
  this.lastPagePos = new x(t.pagePos.x, t.pagePos.y), this.lastScreenPos = new x(t.screenPos.x, t.screenPos.y), this.lastWorldPos = new x(t.worldPos.x, t.worldPos.y);
18941
18950
  }, this._onPointerDown = (t) => {
18942
18951
  this.lastPagePos = new x(t.pagePos.x, t.pagePos.y), this.lastScreenPos = new x(t.screenPos.x, t.screenPos.y), this.lastWorldPos = new x(t.worldPos.x, t.worldPos.y);
@@ -18973,7 +18982,7 @@ function Ph(r) {
18973
18982
  }
18974
18983
  class Es {
18975
18984
  constructor(t, e) {
18976
- this.target = t, this.engine = e, this.events = new Z(), this.primary = new tn(), this._activeNativePointerIdsToNormalized = /* @__PURE__ */ new Map(), this.lastFramePointerCoords = /* @__PURE__ */ new Map(), this.currentFramePointerCoords = /* @__PURE__ */ new Map(), this.currentFramePointerDown = /* @__PURE__ */ new Map(), this.lastFramePointerDown = /* @__PURE__ */ new Map(), this.currentFrameDown = [], this.currentFrameUp = [], this.currentFrameMove = [], this.currentFrameCancel = [], this.currentFrameWheel = [], this._enabled = !0, this._pointers = [this.primary], this._boundHandle = this._handle.bind(this), this._boundWheel = this._handleWheel.bind(this);
18985
+ this.target = t, this.engine = e, this.events = new X(), this.primary = new tn(), this._activeNativePointerIdsToNormalized = /* @__PURE__ */ new Map(), this.lastFramePointerCoords = /* @__PURE__ */ new Map(), this.currentFramePointerCoords = /* @__PURE__ */ new Map(), this.currentFramePointerDown = /* @__PURE__ */ new Map(), this.lastFramePointerDown = /* @__PURE__ */ new Map(), this.currentFrameDown = [], this.currentFrameUp = [], this.currentFrameMove = [], this.currentFrameCancel = [], this.currentFrameWheel = [], this._enabled = !0, this._pointers = [this.primary], this._boundHandle = this._handle.bind(this), this._boundWheel = this._handleWheel.bind(this);
18977
18986
  }
18978
18987
  toggleEnabled(t) {
18979
18988
  this._enabled = t;
@@ -19261,9 +19270,9 @@ class Zr {
19261
19270
  this.keyboard.clear(), this.pointers.clear();
19262
19271
  }
19263
19272
  }
19264
- class Zl {
19273
+ class jl {
19265
19274
  }
19266
- const jl = {
19275
+ const Ql = {
19267
19276
  Initialize: "initialize",
19268
19277
  Activate: "activate",
19269
19278
  Deactivate: "deactivate",
@@ -19283,7 +19292,7 @@ function qt(r) {
19283
19292
  }
19284
19293
  class Et {
19285
19294
  constructor() {
19286
- this._logger = I.getInstance(), this.events = new Z(), this.camera = new vh(), this.world = new vo(this), this.physics = new Qa(ne()), this._isInitialized = !1, this._timers = [], this._cancelQueue = [], this.world.add(Gr), this.world.add(new ys(this.world, this.physics)), this.world.add(new Cs(this.world, this.physics)), this.world.add(As), this.world.add(Wr), this.world.add(mr), this.world.add(pr), this.world.add(Vr);
19295
+ this._logger = I.getInstance(), this.events = new X(), this.camera = new vh(), this.world = new vo(this), this.physics = new Qa(ne()), this._isInitialized = !1, this._timers = [], this._cancelQueue = [], this.world.add(Gr), this.world.add(new ys(this.world, this.physics)), this.world.add(new Cs(this.world, this.physics)), this.world.add(As), this.world.add(Wr), this.world.add(mr), this.world.add(pr), this.world.add(Vr);
19287
19296
  }
19288
19297
  /**
19289
19298
  * The actors in the current scene
@@ -20233,7 +20242,7 @@ const kh = {
20233
20242
  };
20234
20243
  class Lh {
20235
20244
  constructor(t, e) {
20236
- this._engine = t, this.events = new Z(), this._logger = I.getInstance(), this._initialized = !1, this.scenes = {}, this._sceneToInstance = /* @__PURE__ */ new Map(), this._sceneToLoader = /* @__PURE__ */ new Map(), this._sceneToTransition = /* @__PURE__ */ new Map(), this._loadedScenes = /* @__PURE__ */ new Set(), this._isTransitioning = !1, this.rootScene = this.currentScene = new Et(), this.add("root", this.rootScene), this.currentScene = this.rootScene, this.currentSceneName = "root";
20245
+ this._engine = t, this.events = new X(), this._logger = I.getInstance(), this._initialized = !1, this.scenes = {}, this._sceneToInstance = /* @__PURE__ */ new Map(), this._sceneToLoader = /* @__PURE__ */ new Map(), this._sceneToTransition = /* @__PURE__ */ new Map(), this._loadedScenes = /* @__PURE__ */ new Set(), this._isTransitioning = !1, this.rootScene = this.currentScene = new Et(), this.add("root", this.rootScene), this.currentScene = this.rootScene, this.currentSceneName = "root";
20237
20246
  for (const i in e) {
20238
20247
  const s = e[i];
20239
20248
  this.add(i, s), i === "root" && (this.rootScene = this.getSceneInstance("root"), this.currentScene = this.rootScene);
@@ -20589,7 +20598,7 @@ class Uh {
20589
20598
  }
20590
20599
  }
20591
20600
  hn();
20592
- const Ql = {
20601
+ const Jl = {
20593
20602
  FallbackGraphicsContext: "fallbackgraphicscontext",
20594
20603
  Initialize: "initialize",
20595
20604
  Visible: "visible",
@@ -20631,7 +20640,7 @@ const ki = class ee {
20631
20640
  * ```
20632
20641
  */
20633
20642
  constructor(t) {
20634
- this.scope = (S) => ee.Context.scope(this, S), this.version = an, this.events = new Z(), this.maxFps = Number.POSITIVE_INFINITY, this._inputEnabled = !0, this._suppressPlayButton = !1, this.pauseAudioWhenHidden = !0, this._isDebug = !1, this.enableCanvasTransparency = !0, this.onFatalException = (S) => {
20643
+ this.scope = (S) => ee.Context.scope(this, S), this.version = an, this.events = new X(), this.maxFps = Number.POSITIVE_INFINITY, this._inputEnabled = !0, this._suppressPlayButton = !1, this.pauseAudioWhenHidden = !0, this._isDebug = !1, this.enableCanvasTransparency = !0, this.onFatalException = (S) => {
20635
20644
  I.getInstance().fatal(S, S.stack);
20636
20645
  }, this._toaster = new Bh(), this._timescale = 1, this._isInitialized = !1, this._hasCreatedCanvas = !1, this._originalOptions = {}, this._handleWebGLContextLost = (S) => {
20637
20646
  var E;
@@ -21227,7 +21236,7 @@ Read more about this issue at https://excaliburjs.com/docs/performance`
21227
21236
  const e = t * this.timescale;
21228
21237
  this.currentFrameElapsedMs = e;
21229
21238
  const i = this.stats.prevFrame.id + 1;
21230
- this.stats.currFrame.reset(), this.stats.currFrame.id = i, this.stats.currFrame.elapsedMs = e, this.stats.currFrame.fps = this.clock.fpsSampler.fps, Y.clear();
21239
+ this.stats.currFrame.reset(), this.stats.currFrame.id = i, this.stats.currFrame.elapsedMs = e, this.stats.currFrame.fps = this.clock.fpsSampler.fps, Z.clear();
21231
21240
  const s = this.clock.now(), n = this.fixedUpdateTimestep;
21232
21241
  if (this.fixedUpdateTimestep)
21233
21242
  for (this._lagMs += e; this._lagMs >= n; )
@@ -21237,7 +21246,7 @@ Read more about this issue at https://excaliburjs.com/docs/performance`
21237
21246
  const o = this.clock.now();
21238
21247
  this.currentFrameLagMs = this._lagMs, this._draw(e);
21239
21248
  const a = this.clock.now();
21240
- this.stats.currFrame.duration.update = o - s, this.stats.currFrame.duration.draw = a - o, this.stats.currFrame.graphics.drawnImages = Y.DrawnImagesCount, this.stats.currFrame.graphics.drawCalls = Y.DrawCallCount, this.stats.currFrame.graphics.rendererSwaps = Y.RendererSwaps, this.emit("postframe", new En(this, this.stats.currFrame)), this.stats.prevFrame.reset(this.stats.currFrame), this._monitorPerformanceThresholdAndTriggerFallback();
21249
+ this.stats.currFrame.duration.update = o - s, this.stats.currFrame.duration.draw = a - o, this.stats.currFrame.graphics.drawnImages = Z.DrawnImagesCount, this.stats.currFrame.graphics.drawCalls = Z.DrawCallCount, this.stats.currFrame.graphics.rendererSwaps = Z.RendererSwaps, this.emit("postframe", new En(this, this.stats.currFrame)), this.stats.prevFrame.reset(this.stats.currFrame), this._monitorPerformanceThresholdAndTriggerFallback();
21241
21250
  });
21242
21251
  }
21243
21252
  /**
@@ -21326,7 +21335,7 @@ ki._DEFAULT_ENGINE_OPTIONS = {
21326
21335
  // Excalibur blue
21327
21336
  };
21328
21337
  let Vi = ki;
21329
- class Jl extends Dt {
21338
+ class Kl extends Dt {
21330
21339
  /**
21331
21340
  * Build a new label
21332
21341
  * @param options
@@ -21391,7 +21400,7 @@ class Jl extends Dt {
21391
21400
  }
21392
21401
  }
21393
21402
  var Ae = /* @__PURE__ */ ((r) => (r.Circle = "circle", r.Rectangle = "rectangle", r))(Ae || {});
21394
- class Kl extends Dt {
21403
+ class tc extends Dt {
21395
21404
  /**
21396
21405
  * @param config particle emitter options bag
21397
21406
  */
@@ -21588,7 +21597,7 @@ class as {
21588
21597
  }
21589
21598
  }
21590
21599
  as.GPU_MAX_PARTICLES = 1e5;
21591
- class tc extends Dt {
21600
+ class ec extends Dt {
21592
21601
  constructor(t) {
21593
21602
  super({ name: "GpuParticleEmitter", width: t.width, height: t.height }), this.particle = {
21594
21603
  /**
@@ -21656,7 +21665,7 @@ class to {
21656
21665
  return new to(t, this._sequenceBuilder);
21657
21666
  }
21658
21667
  }
21659
- class ec {
21668
+ class ic {
21660
21669
  constructor(t) {
21661
21670
  this.id = W(), this._actions = t;
21662
21671
  }
@@ -21674,40 +21683,40 @@ class ec {
21674
21683
  this._actions.forEach((t) => t.stop());
21675
21684
  }
21676
21685
  }
21677
- function ic(r) {
21678
- return !!r._initialize;
21679
- }
21680
21686
  function sc(r) {
21681
- return !!r.onAdd;
21687
+ return !!r._initialize;
21682
21688
  }
21683
21689
  function nc(r) {
21684
- return !!r.onRemove;
21690
+ return !!r.onAdd;
21685
21691
  }
21686
21692
  function rc(r) {
21687
- return !!r.onInitialize;
21693
+ return !!r.onRemove;
21688
21694
  }
21689
21695
  function oc(r) {
21690
- return !!r._preupdate;
21696
+ return !!r.onInitialize;
21691
21697
  }
21692
21698
  function ac(r) {
21693
- return !!r.onPreUpdate;
21699
+ return !!r._preupdate;
21694
21700
  }
21695
21701
  function hc(r) {
21696
- return !!r.onPostUpdate;
21702
+ return !!r.onPreUpdate;
21697
21703
  }
21698
21704
  function lc(r) {
21699
21705
  return !!r.onPostUpdate;
21700
21706
  }
21701
21707
  function cc(r) {
21702
- return !!r.onAdd;
21708
+ return !!r.onPostUpdate;
21703
21709
  }
21704
21710
  function dc(r) {
21705
- return !!r.onRemove;
21711
+ return !!r.onAdd;
21706
21712
  }
21707
21713
  function uc(r) {
21708
- return !!r.onPreDraw;
21714
+ return !!r.onRemove;
21709
21715
  }
21710
21716
  function _c(r) {
21717
+ return !!r.onPreDraw;
21718
+ }
21719
+ function fc(r) {
21711
21720
  return !!r.onPostDraw;
21712
21721
  }
21713
21722
  class zh {
@@ -21753,7 +21762,7 @@ class zh {
21753
21762
  this.soundManager._isMuted(e[i]) ? (e[i].play(), this.soundManager._muted.delete(e[i])) : (this.soundManager._muted.add(e[i]), e[i].pause());
21754
21763
  }
21755
21764
  }
21756
- class fc {
21765
+ class gc {
21757
21766
  constructor(t) {
21758
21767
  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;
21759
21768
  var e;
@@ -21908,7 +21917,7 @@ class fc {
21908
21917
  }
21909
21918
  }
21910
21919
  }
21911
- class gc {
21920
+ class pc {
21912
21921
  /**
21913
21922
  * @param path Path to the image resource
21914
21923
  * @param bustCache Optionally load texture with cache busting
@@ -22185,7 +22194,7 @@ class Nh {
22185
22194
  }, this._st = t, this._handler = {}, this._currentFrameCanvas = document.createElement("canvas"), this._currentFrameContext = this._currentFrameCanvas.getContext("2d"), this.parseHeader(), this.parseBlocks();
22186
22195
  }
22187
22196
  }
22188
- class pc {
22197
+ class mc {
22189
22198
  constructor(t, e, { bustCache: i, ...s } = {}) {
22190
22199
  this.path = t, this.family = e, this._isLoaded = !1, this._resource = new Ei(t, "blob", i), this._options = s;
22191
22200
  }
@@ -22383,7 +22392,7 @@ class Rs extends Rt {
22383
22392
  this.isInitialized && (this.started || (this.started = !0, this.onStart(this.progress)), this.onUpdate(this.progress), this.complete && !this._completeFuture.isCompleted && (this.onEnd(this.progress), this._completeFuture.resolve()));
22384
22393
  }
22385
22394
  }
22386
- class mc extends Rs {
22395
+ class xc extends Rs {
22387
22396
  constructor(t) {
22388
22397
  var e, i;
22389
22398
  super({
@@ -22411,7 +22420,7 @@ class mc extends Rs {
22411
22420
  this.graphics.opacity = t;
22412
22421
  }
22413
22422
  }
22414
- class xc extends Rs {
22423
+ class vc extends Rs {
22415
22424
  constructor(t) {
22416
22425
  super({ direction: "in", ...t }), this.name = `CrossFade#${this.id}`;
22417
22426
  }
@@ -22434,7 +22443,7 @@ class xc extends Rs {
22434
22443
  this.graphics.opacity = t;
22435
22444
  }
22436
22445
  }
22437
- class vc extends Rs {
22446
+ class wc extends Rs {
22438
22447
  constructor(t) {
22439
22448
  var e;
22440
22449
  super({ direction: "in", ...t }), this._easing = It.Linear, this._start = x.Zero, this._end = x.Zero, this.name = `Slide#${this.id}`, this.slideDirection = t.slideDirection, this.transform.coordPlane = ht.Screen, this.graphics.forceOnScreen = !0, this._easing = (e = t.easingFunction) != null ? e : this._easing;
@@ -22474,7 +22483,7 @@ class vc extends Rs {
22474
22483
  this.transform.pos.x = at(this._start.x, this._end.x, e), this.transform.pos.y = at(this._start.y, this._end.y, e), this._camera.pos.x = at(this._startCameraPosition.x, this._destinationCameraPosition.x, e), this._camera.pos.y = at(this._startCameraPosition.y, this._destinationCameraPosition.y, e);
22475
22484
  }
22476
22485
  }
22477
- const wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22486
+ const bc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22478
22487
  __proto__: null,
22479
22488
  ConsoleAppender: pn,
22480
22489
  DrawUtil: Ro,
@@ -22494,14 +22503,14 @@ const wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22494
22503
  mergeDeep: xi,
22495
22504
  omit: Yn,
22496
22505
  removeItemFromArray: Be
22497
- }, Symbol.toStringTag, { value: "Module" })), Gh = 5, De = {}, bc = () => {
22506
+ }, Symbol.toStringTag, { value: "Module" })), Gh = 5, De = {}, yc = () => {
22498
22507
  for (const r in De)
22499
22508
  De[r] = 0;
22500
22509
  }, hi = (r, t) => {
22501
22510
  const e = Ne.isEnabled("suppress-obsolete-message");
22502
22511
  De[r] < Gh && !e && (I.getInstance().warn(r), console.trace && t.showStackTrace && console.trace()), De[r]++;
22503
22512
  };
22504
- function yc(r) {
22513
+ function Cc(r) {
22505
22514
  return r = {
22506
22515
  message: "This feature will be removed in future versions of Excalibur.",
22507
22516
  alternateMethod: null,
@@ -22545,7 +22554,7 @@ class qh {
22545
22554
  this._queue.shift().resolve(t);
22546
22555
  }
22547
22556
  }
22548
- class Cc {
22557
+ class Tc {
22549
22558
  constructor(t) {
22550
22559
  this._count = t, this._waitQueue = new qh();
22551
22560
  }
@@ -22567,7 +22576,7 @@ class Cc {
22567
22576
  }
22568
22577
  }
22569
22578
  }
22570
- const an = "0.32.0-alpha.1592+3ba41a7";
22579
+ const an = "0.32.0-alpha.1594+9ed7cab";
22571
22580
  hn();
22572
22581
  export {
22573
22582
  Wn as ActionCompleteEvent,
@@ -22600,7 +22609,7 @@ export {
22600
22609
  Rh as BrowserEvents,
22601
22610
  qr as Buttons,
22602
22611
  vh as Camera,
22603
- $l as CameraEvents,
22612
+ Yl as CameraEvents,
22604
22613
  xs as Canvas,
22605
22614
  zh as ChannelCollection,
22606
22615
  ms as Circle,
@@ -22631,7 +22640,7 @@ export {
22631
22640
  _e as ContactSolveBias,
22632
22641
  $i as ContactStartEvent,
22633
22642
  ht as CoordPlane,
22634
- xc as CrossFade,
22643
+ vc as CrossFade,
22635
22644
  Ya as CurveBy,
22636
22645
  $a as CurveTo,
22637
22646
  Ln as DeactivateEvent,
@@ -22663,13 +22672,13 @@ export {
22663
22672
  ph as ElasticToActorStrategy,
22664
22673
  Ae as EmitterType,
22665
22674
  Vi as Engine,
22666
- Ql as EngineEvents,
22675
+ Jl as EngineEvents,
22667
22676
  Hn as EnterTriggerEvent,
22668
22677
  zn as EnterViewPortEvent,
22669
22678
  Rt as Entity,
22670
22679
  Dl as EntityEvents,
22671
22680
  go as EntityManager,
22672
- Z as EventEmitter,
22681
+ X as EventEmitter,
22673
22682
  mn as EventTypes,
22674
22683
  El as Events,
22675
22684
  Br as ExResponse,
@@ -22678,13 +22687,13 @@ export {
22678
22687
  On as ExitTriggerEvent,
22679
22688
  Un as ExitViewPortEvent,
22680
22689
  Va as Fade,
22681
- mc as FadeInOut,
22690
+ xc as FadeInOut,
22682
22691
  Ne as Flags,
22683
22692
  Xa as Flash,
22684
22693
  qs as Follow,
22685
22694
  Me as Font,
22686
22695
  is as FontCache,
22687
- pc as FontSource,
22696
+ mc as FontSource,
22688
22697
  dr as FontStyle,
22689
22698
  hr as FontUnit,
22690
22699
  Mh as FpsSampler,
@@ -22700,10 +22709,10 @@ export {
22700
22709
  Rn as GamepadDisconnectEvent,
22701
22710
  Ps as Gamepads,
22702
22711
  Uh as GarbageCollector,
22703
- gc as Gif,
22712
+ pc as Gif,
22704
22713
  Nh as GifParser,
22705
22714
  $e as GlobalCoordinates,
22706
- tc as GpuParticleEmitter,
22715
+ ec as GpuParticleEmitter,
22707
22716
  as as GpuParticleRenderer,
22708
22717
  dn as Graph,
22709
22718
  nt as Graphic,
@@ -22724,13 +22733,13 @@ export {
22724
22733
  yh as InputMapper,
22725
22734
  yi as IsometricEntityComponent,
22726
22735
  Wr as IsometricEntitySystem,
22727
- Xl as IsometricMap,
22736
+ $l as IsometricMap,
22728
22737
  dh as IsometricTile,
22729
22738
  ri as KeyEvent,
22730
22739
  Th as Keyboard,
22731
22740
  Ch as Keys,
22732
22741
  xn as KillEvent,
22733
- Jl as Label,
22742
+ Kl as Label,
22734
22743
  xh as LimitCameraBoundsStrategy,
22735
22744
  gr as Line,
22736
22745
  K as LineSegment,
@@ -22762,9 +22771,9 @@ export {
22762
22771
  mr as OffscreenSystem,
22763
22772
  vt as Pair,
22764
22773
  ps as ParallaxComponent,
22765
- ec as ParallelActions,
22774
+ ic as ParallelActions,
22766
22775
  ws as Particle,
22767
- Kl as ParticleEmitter,
22776
+ tc as ParticleEmitter,
22768
22777
  Xo as ParticleRenderer,
22769
22778
  Zt as ParticleTransform,
22770
22779
  Is as PhysicsStats,
@@ -22793,7 +22802,7 @@ export {
22793
22802
  je as PreDrawEvent,
22794
22803
  Pn as PreFrameEvent,
22795
22804
  vn as PreKillEvent,
22796
- Zl as PreLoadEvent,
22805
+ jl as PreLoadEvent,
22797
22806
  Cn as PreTransformDrawEvent,
22798
22807
  pe as PreUpdateEvent,
22799
22808
  Ti as Projection,
@@ -22825,24 +22834,24 @@ export {
22825
22834
  La as ScaleTo,
22826
22835
  ka as ScaleToWithOptions,
22827
22836
  Et as Scene,
22828
- jl as SceneEvents,
22837
+ Ql as SceneEvents,
22829
22838
  js as Screen,
22830
22839
  co as ScreenAppender,
22831
22840
  Hr as ScreenElement,
22832
22841
  Wl as ScreenEvents,
22833
22842
  $o as ScreenShader,
22834
22843
  Oe as ScrollPreventionMode,
22835
- Cc as Semaphore,
22844
+ Tc as Semaphore,
22836
22845
  We as SeparatingAxis,
22837
22846
  wo as SeparationInfo,
22838
22847
  Lt as Shader,
22839
22848
  ft as Shape,
22840
22849
  G as Side,
22841
- vc as Slide,
22850
+ wc as Slide,
22842
22851
  ds as SolverStrategy,
22843
22852
  Lr as Sound,
22844
22853
  Vl as SoundEvents,
22845
- fc as SoundManager,
22854
+ gc as SoundManager,
22846
22855
  Fr as SparseHashGrid,
22847
22856
  Xs as SparseHashGridCollisionProcessor,
22848
22857
  vi as SpatialPartitionStrategy,
@@ -22864,20 +22873,21 @@ export {
22864
22873
  Ve as TextureLoader,
22865
22874
  ch as Tile,
22866
22875
  lh as TileMap,
22867
- ql as TileMapEvents,
22876
+ Xl as TileMapEvents,
22868
22877
  wr as TiledAnimation,
22869
22878
  Ii as TiledSprite,
22870
22879
  Ni as Timer,
22880
+ ql as TimerEvents,
22871
22881
  Bh as Toaster,
22872
22882
  re as Transform,
22873
22883
  P as TransformComponent,
22874
22884
  Rs as Transition,
22875
22885
  Os as TreeNode,
22876
22886
  wh as Trigger,
22877
- Yl as TriggerEvents,
22887
+ Zl as TriggerEvents,
22878
22888
  rt as TwoPI,
22879
22889
  Wo as UniformBuffer,
22880
- wc as Util,
22890
+ bc as Util,
22881
22891
  x as Vector,
22882
22892
  Us as VectorView,
22883
22893
  Wt as VertexBuffer,
@@ -22929,18 +22939,18 @@ export {
22929
22939
  ne as getDefaultPhysicsConfig,
22930
22940
  Vo as glTypeToUniformTypeName,
22931
22941
  Ir as hasGraphicsTick,
22932
- cc as hasOnAdd,
22933
- rc as hasOnInitialize,
22934
- lc as hasOnPostUpdate,
22935
- ac as hasOnPreUpdate,
22936
- dc as hasOnRemove,
22937
- _c as hasPostDraw,
22938
- uc as hasPreDraw,
22939
- sc as has_add,
22940
- ic as has_initialize,
22941
- hc as has_postupdate,
22942
- oc as has_preupdate,
22943
- nc as has_remove,
22942
+ dc as hasOnAdd,
22943
+ oc as hasOnInitialize,
22944
+ cc as hasOnPostUpdate,
22945
+ hc as hasOnPreUpdate,
22946
+ uc as hasOnRemove,
22947
+ fc as hasPostDraw,
22948
+ _c as hasPreDraw,
22949
+ nc as has_add,
22950
+ sc as has_initialize,
22951
+ lc as has_postupdate,
22952
+ ac as has_preupdate,
22953
+ rc as has_remove,
22944
22954
  oo as inverseLerp,
22945
22955
  ao as inverseLerpVector,
22946
22956
  Ol as isActor,
@@ -22964,7 +22974,7 @@ export {
22964
22974
  cs as linear,
22965
22975
  Gh as maxMessages,
22966
22976
  W as nextActionId,
22967
- yc as obsolete,
22977
+ Cc as obsolete,
22968
22978
  ti as parseImageFiltering,
22969
22979
  Nt as parseImageWrapping,
22970
22980
  M as pixelSnapEpsilon,
@@ -22973,7 +22983,7 @@ export {
22973
22983
  Yh as range,
22974
22984
  Qt as remap,
22975
22985
  jh as remapVector,
22976
- bc as resetObsoleteCounter,
22986
+ yc as resetObsoleteCounter,
22977
22987
  q as sign,
22978
22988
  Jh as smootherstep,
22979
22989
  Qh as smoothstep,