excalibur 0.32.0-alpha.1589 → 0.32.0-alpha.1591

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 CHANGED
@@ -74,6 +74,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
74
74
 
75
75
  ### Fixed
76
76
 
77
+ - Fixed issue where setting the width/height of a ScreenElement was incorrectly scaled when supplied with a scale in the ctor
77
78
  - Fixed issue where onRemove would sometimes not be called
78
79
  - Fixed issue where pointer containment WAS NOT being uses on collision shape geometry, only their bounds
79
80
  - Fixed issue where overriding built in uniforms and graphics no longer worked as v0.30.x
@@ -123,6 +123,7 @@ export interface PhysicsStatistics {
123
123
  export interface GraphicsStatistics {
124
124
  drawCalls: number;
125
125
  drawnImages: number;
126
+ rendererSwaps: number;
126
127
  }
127
128
  /**
128
129
  * Debug statistics and flags for Excalibur. If polling these values, it would be
@@ -1,5 +1,6 @@
1
1
  export declare class GraphicsDiagnostics {
2
2
  static DrawCallCount: number;
3
3
  static DrawnImagesCount: number;
4
+ static RendererSwaps: number;
4
5
  static clear(): void;
5
6
  }
@@ -1,4 +1,4 @@
1
- /*! excalibur - 0.32.0-alpha.1589+bc6ab76 - 2025-12-2
1
+ /*! excalibur - 0.32.0-alpha.1591+851fc99 - 2025-12-6
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
@@ -12724,10 +12724,12 @@ Read https://excaliburjs.com/docs/imagesource for more information.`
12724
12724
  static clear() {
12725
12725
  _GraphicsDiagnostics2.DrawCallCount = 0;
12726
12726
  _GraphicsDiagnostics2.DrawnImagesCount = 0;
12727
+ _GraphicsDiagnostics2.RendererSwaps = 0;
12727
12728
  }
12728
12729
  };
12729
12730
  _GraphicsDiagnostics.DrawCallCount = 0;
12730
12731
  _GraphicsDiagnostics.DrawnImagesCount = 0;
12732
+ _GraphicsDiagnostics.RendererSwaps = 0;
12731
12733
  let GraphicsDiagnostics = _GraphicsDiagnostics;
12732
12734
  const pixelSnapEpsilon$1 = 1e-4;
12733
12735
  class ExcaliburGraphicsContext2DCanvasDebug {
@@ -16923,6 +16925,7 @@ If you want to do custom drawing, use Actor.graphics, or any onPreDraw or onPost
16923
16925
  currentRenderer.flush();
16924
16926
  currentRendererName = this._drawCalls[i].renderer;
16925
16927
  currentRenderer = this.get(currentRendererName);
16928
+ GraphicsDiagnostics.RendererSwaps++;
16926
16929
  }
16927
16930
  if (currentRenderer instanceof MaterialRenderer && ((_a = this.material) == null ? void 0 : _a.isUsingScreenTexture)) {
16928
16931
  currentTarget.copyToTexture(this.materialScreenTexture);
@@ -24688,7 +24691,7 @@ If you want to do custom drawing, use Actor.graphics, or any onPreDraw or onPost
24688
24691
  this.pointer.useGraphicsBounds = true;
24689
24692
  this.pointer.useColliderShape = false;
24690
24693
  if (!(config == null ? void 0 : config.collider) && (config == null ? void 0 : config.width) > 0 && (config == null ? void 0 : config.height) > 0) {
24691
- this.collider.useBoxCollider(this.width, this.height, this.anchor);
24694
+ this.collider.useBoxCollider(config.width, config.height, this.anchor);
24692
24695
  }
24693
24696
  }
24694
24697
  _initialize(engine) {
@@ -29296,7 +29299,8 @@ If you want to do custom drawing, use Actor.graphics, or any onPreDraw or onPost
29296
29299
  this._physicsStats = new PhysicsStats();
29297
29300
  this._graphicsStats = {
29298
29301
  drawCalls: 0,
29299
- drawnImages: 0
29302
+ drawnImages: 0,
29303
+ rendererSwaps: 0
29300
29304
  };
29301
29305
  }
29302
29306
  /**
@@ -29316,12 +29320,13 @@ If you want to do custom drawing, use Actor.graphics, or any onPreDraw or onPost
29316
29320
  this._physicsStats.reset(otherStats.physics);
29317
29321
  this.graphics.drawCalls = otherStats.graphics.drawCalls;
29318
29322
  this.graphics.drawnImages = otherStats.graphics.drawnImages;
29323
+ this.graphics.rendererSwaps = otherStats.graphics.rendererSwaps;
29319
29324
  } else {
29320
29325
  this.id = this.elapsedMs = this.fps = 0;
29321
29326
  this.actors.alive = this.actors.killed = this.actors.ui = 0;
29322
29327
  this.duration.update = this.duration.draw = 0;
29323
29328
  this._physicsStats.reset();
29324
- this.graphics.drawnImages = this.graphics.drawCalls = 0;
29329
+ this.graphics.drawnImages = this.graphics.drawCalls = this.graphics.rendererSwaps = 0;
29325
29330
  }
29326
29331
  }
29327
29332
  /**
@@ -31331,6 +31336,7 @@ Read more about this issue at https://excaliburjs.com/docs/performance`
31331
31336
  this.stats.currFrame.duration.draw = afterDraw - afterUpdate;
31332
31337
  this.stats.currFrame.graphics.drawnImages = GraphicsDiagnostics.DrawnImagesCount;
31333
31338
  this.stats.currFrame.graphics.drawCalls = GraphicsDiagnostics.DrawCallCount;
31339
+ this.stats.currFrame.graphics.rendererSwaps = GraphicsDiagnostics.RendererSwaps;
31334
31340
  this.emit("postframe", new PostFrameEvent(this, this.stats.currFrame));
31335
31341
  this.stats.prevFrame.reset(this.stats.currFrame);
31336
31342
  this._monitorPerformanceThresholdAndTriggerFallback();
@@ -33466,7 +33472,7 @@ Read more about this issue at https://excaliburjs.com/docs/performance`
33466
33472
  this._count += count;
33467
33473
  }
33468
33474
  }
33469
- const EX_VERSION = "0.32.0-alpha.1589+bc6ab76";
33475
+ const EX_VERSION = "0.32.0-alpha.1591+851fc99";
33470
33476
  polyfill();
33471
33477
  exports2.ActionCompleteEvent = ActionCompleteEvent;
33472
33478
  exports2.ActionContext = ActionContext;
@@ -1,4 +1,4 @@
1
- /*! excalibur - 0.32.0-alpha.1589+bc6ab76 - 2025-12-2
1
+ /*! excalibur - 0.32.0-alpha.1591+851fc99 - 2025-12-6
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
@@ -12724,10 +12724,12 @@ Read https://excaliburjs.com/docs/imagesource for more information.`
12724
12724
  static clear() {
12725
12725
  _GraphicsDiagnostics2.DrawCallCount = 0;
12726
12726
  _GraphicsDiagnostics2.DrawnImagesCount = 0;
12727
+ _GraphicsDiagnostics2.RendererSwaps = 0;
12727
12728
  }
12728
12729
  };
12729
12730
  _GraphicsDiagnostics.DrawCallCount = 0;
12730
12731
  _GraphicsDiagnostics.DrawnImagesCount = 0;
12732
+ _GraphicsDiagnostics.RendererSwaps = 0;
12731
12733
  let GraphicsDiagnostics = _GraphicsDiagnostics;
12732
12734
  const pixelSnapEpsilon$1 = 1e-4;
12733
12735
  class ExcaliburGraphicsContext2DCanvasDebug {
@@ -16923,6 +16925,7 @@ If you want to do custom drawing, use Actor.graphics, or any onPreDraw or onPost
16923
16925
  currentRenderer.flush();
16924
16926
  currentRendererName = this._drawCalls[i].renderer;
16925
16927
  currentRenderer = this.get(currentRendererName);
16928
+ GraphicsDiagnostics.RendererSwaps++;
16926
16929
  }
16927
16930
  if (currentRenderer instanceof MaterialRenderer && ((_a = this.material) == null ? void 0 : _a.isUsingScreenTexture)) {
16928
16931
  currentTarget.copyToTexture(this.materialScreenTexture);
@@ -24688,7 +24691,7 @@ If you want to do custom drawing, use Actor.graphics, or any onPreDraw or onPost
24688
24691
  this.pointer.useGraphicsBounds = true;
24689
24692
  this.pointer.useColliderShape = false;
24690
24693
  if (!(config == null ? void 0 : config.collider) && (config == null ? void 0 : config.width) > 0 && (config == null ? void 0 : config.height) > 0) {
24691
- this.collider.useBoxCollider(this.width, this.height, this.anchor);
24694
+ this.collider.useBoxCollider(config.width, config.height, this.anchor);
24692
24695
  }
24693
24696
  }
24694
24697
  _initialize(engine) {
@@ -29296,7 +29299,8 @@ If you want to do custom drawing, use Actor.graphics, or any onPreDraw or onPost
29296
29299
  this._physicsStats = new PhysicsStats();
29297
29300
  this._graphicsStats = {
29298
29301
  drawCalls: 0,
29299
- drawnImages: 0
29302
+ drawnImages: 0,
29303
+ rendererSwaps: 0
29300
29304
  };
29301
29305
  }
29302
29306
  /**
@@ -29316,12 +29320,13 @@ If you want to do custom drawing, use Actor.graphics, or any onPreDraw or onPost
29316
29320
  this._physicsStats.reset(otherStats.physics);
29317
29321
  this.graphics.drawCalls = otherStats.graphics.drawCalls;
29318
29322
  this.graphics.drawnImages = otherStats.graphics.drawnImages;
29323
+ this.graphics.rendererSwaps = otherStats.graphics.rendererSwaps;
29319
29324
  } else {
29320
29325
  this.id = this.elapsedMs = this.fps = 0;
29321
29326
  this.actors.alive = this.actors.killed = this.actors.ui = 0;
29322
29327
  this.duration.update = this.duration.draw = 0;
29323
29328
  this._physicsStats.reset();
29324
- this.graphics.drawnImages = this.graphics.drawCalls = 0;
29329
+ this.graphics.drawnImages = this.graphics.drawCalls = this.graphics.rendererSwaps = 0;
29325
29330
  }
29326
29331
  }
29327
29332
  /**
@@ -31331,6 +31336,7 @@ Read more about this issue at https://excaliburjs.com/docs/performance`
31331
31336
  this.stats.currFrame.duration.draw = afterDraw - afterUpdate;
31332
31337
  this.stats.currFrame.graphics.drawnImages = GraphicsDiagnostics.DrawnImagesCount;
31333
31338
  this.stats.currFrame.graphics.drawCalls = GraphicsDiagnostics.DrawCallCount;
31339
+ this.stats.currFrame.graphics.rendererSwaps = GraphicsDiagnostics.RendererSwaps;
31334
31340
  this.emit("postframe", new PostFrameEvent(this, this.stats.currFrame));
31335
31341
  this.stats.prevFrame.reset(this.stats.currFrame);
31336
31342
  this._monitorPerformanceThresholdAndTriggerFallback();
@@ -33466,7 +33472,7 @@ Read more about this issue at https://excaliburjs.com/docs/performance`
33466
33472
  this._count += count;
33467
33473
  }
33468
33474
  }
33469
- const EX_VERSION = "0.32.0-alpha.1589+bc6ab76";
33475
+ const EX_VERSION = "0.32.0-alpha.1591+851fc99";
33470
33476
  polyfill();
33471
33477
  exports2.ActionCompleteEvent = ActionCompleteEvent;
33472
33478
  exports2.ActionContext = ActionContext;