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.
@@ -1,4 +1,4 @@
1
- /*! excalibur - 0.32.0-alpha.1575+b861d89 - 2025-11-28
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
@@ -5243,7 +5243,7 @@ const _Entity = class _Entity2 {
5243
5243
  }
5244
5244
  }
5245
5245
  /**
5246
- * Removes Actor, meant to be called by the Scene when Actor is added.
5246
+ * Removes Actor, meant to be called by the Scene when Actor is removed.
5247
5247
  *
5248
5248
  * It is not recommended that internal excalibur methods be overridden, do so at your own risk.
5249
5249
  * @internal
@@ -5410,7 +5410,7 @@ class EntityManager {
5410
5410
  }
5411
5411
  }
5412
5412
  removeEntity(idOrEntity, deferred = true) {
5413
- var _a, _b;
5413
+ var _a, _b, _c, _d;
5414
5414
  let id = 0;
5415
5415
  if (idOrEntity instanceof Entity) {
5416
5416
  id = idOrEntity.id;
@@ -5444,7 +5444,8 @@ class EntityManager {
5444
5444
  entity.childrenRemoved$.unsubscribe(childRemovedHandler);
5445
5445
  this._childRemovedHandlerMap.delete(entity);
5446
5446
  }
5447
- if ((_b = (_a = this._world) == null ? void 0 : _a.scene) == null ? void 0 : _b.engine) {
5447
+ entity._remove((_b = (_a = this._world) == null ? void 0 : _a.scene) == null ? void 0 : _b.engine);
5448
+ if ((_d = (_c = this._world) == null ? void 0 : _c.scene) == null ? void 0 : _d.engine) {
5448
5449
  this._world.scene.engine.stats.currFrame.actors.killed++;
5449
5450
  }
5450
5451
  }
@@ -24249,7 +24250,7 @@ class DefaultLoader {
24249
24250
  }
24250
24251
  }
24251
24252
  const logoImg = "data:image/png;base64,iVBORw0KGgoAAAANS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dAXbV4j4gvt4oMOrbP6vbU73NW7TMlbdTnPrWpfqXfh9HKZ9vke7KuTeZRNtXRSe6+1FV//ce/ln5eXfsXgcqXzr6+9261M3moOoa7E6nvTZTfy7iNsmfb7kjfgXGsvxe0vihsEts9HTquPpt1q1vtahu2TqAiUAEEKj0zhwoARqgAu/OnX/442WH+9xc/Wvr58re/Tr7f41/+ZsRqhAoACFQAEKgAcHjMoQJskJsz/eqrr5Z+vvr7v5fmQFevAl5lztQIFQAQqAAgUAHgIJlDBdhgdQ41N2eKESoAIFABQKACwFEwhwoARqgAIFABQKACAAIVAAQqAAhUABCoAIBABQCBCgACFQAEKgAgUAFAoAKAQAUAgQoACFQAEKgAIFABQKACAAIVAAQqAAhUABCoAIBABQCBCgACFQAQqAAgUAFAoAKAQAUAlvwPcFDns1DsH4sAAAAASUVORK5CYII=";
24252
- const loaderCss = "/* Buttons styles start */\n\nbutton#excalibur-play {\n display: inline-block;\n position: relative;\n z-index: 999;\n border-radius: 6px;\n border: none;\n /*border: 3px solid;\n border-color: white;\n box-shadow: 0 0 10px #ccc;*/\n padding: 1rem 1.5rem 1rem 4rem;\n margin: 0;\n text-decoration: none;\n background: #00b233;\n color: #ffffff;\n font-family: sans-serif;\n font-size: 2rem;\n white-space: nowrap;\n line-height: 1;\n cursor: pointer;\n text-align: center;\n transition:\n background 250ms ease-in-out,\n transform 150ms ease;\n -webkit-appearance: none;\n -moz-appearance: none;\n\n -webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */\n -moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */\n -ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */\n -o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */\n animation: excalibur-button-fadein 200ms;\n}\n\n/*\nbutton#excalibur-play {\n display: none;\n}*/\n\nbutton#excalibur-play:after {\n position: absolute;\n content: '';\n border: 8px solid;\n border-color: transparent transparent transparent white;\n left: 35px;\n top: 24px;\n width: 0;\n height: 0;\n}\n\nbutton#excalibur-play:before {\n position: absolute;\n content: '';\n border: 3px solid;\n left: 19px;\n top: 14px;\n border-radius: 20px;\n width: 30px;\n height: 30px;\n}\n\nbutton#excalibur-play:hover,\nbutton#excalibur-play:focus {\n background: #00982c;\n}\n\nbutton#excalibur-play:focus {\n outline: 1px solid #fff;\n outline-offset: -4px;\n}\n\nbutton#excalibur-play:active {\n transform: scale(0.99);\n}\n\n@keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Firefox < 16 */\n@-moz-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Internet Explorer */\n@-ms-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Opera < 12.1 */\n@-o-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n";
24253
+ const loaderCss = "/* Buttons styles start */\nbutton#excalibur-play {\n display: none;\n}\n\nbutton#excalibur-play {\n box-sizing: border-box;\n display: flex;\n gap: 0.25rem;\n white-space: nowrap;\n justify-content: center;\n position: relative;\n z-index: 999;\n border-radius: 6px;\n border: none;\n padding: 1rem;\n margin: 0;\n text-decoration: none;\n background: #00b233;\n color: #ffffff;\n font-family: sans-serif;\n font-size: 2rem;\n white-space: nowrap;\n line-height: 1;\n cursor: pointer;\n text-align: center;\n transition:\n background 250ms ease-in-out,\n transform 150ms ease;\n -webkit-appearance: none;\n -moz-appearance: none;\n\n -webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */\n -moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */\n -ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */\n -o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */\n animation: excalibur-button-fadein 200ms;\n}\n\nspan#excalibur-play-icon {\n content: '';\n display: inline-block;\n position: relative;\n width: 2rem;\n height: 2rem;\n}\n\nspan#excalibur-play-icon:after {\n box-sizing: border-box;\n position: absolute;\n content: '';\n border: 0.5rem solid;\n border-color: transparent transparent transparent white;\n left: calc(50% - 0.1rem);\n top: calc(30% - 0.1rem);\n width: 0;\n height: 0;\n}\n\nspan#excalibur-play-icon:before {\n box-sizing: border-box;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n position: absolute;\n content: '';\n border: 3px solid;\n border-radius: 1rem;\n width: 2rem;\n height: 2rem;\n}\n\nbutton#excalibur-play:focus {\n outline: 1px solid #fff;\n outline-offset: -4px;\n}\n\nbutton#excalibur-play:active {\n transform: scale(0.99);\n}\n\n@keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Firefox < 16 */\n@-moz-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Internet Explorer */\n@-ms-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Opera < 12.1 */\n@-o-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n";
24253
24254
  const _Loader = class _Loader2 extends DefaultLoader {
24254
24255
  constructor(loadablesOrOptions) {
24255
24256
  const options = Array.isArray(loadablesOrOptions) ? {
@@ -24275,8 +24276,16 @@ const _Loader = class _Loader2 extends DefaultLoader {
24275
24276
  buttonElement = document.createElement("button");
24276
24277
  }
24277
24278
  buttonElement.id = "excalibur-play";
24278
- buttonElement.textContent = this.playButtonText;
24279
24279
  buttonElement.style.display = "none";
24280
+ if (buttonElement) {
24281
+ const span = document.createElement("span");
24282
+ span.id = "excalibur-play-icon";
24283
+ buttonElement.appendChild(span);
24284
+ const text = document.createElement("span");
24285
+ text.id = "excalibur-play-text";
24286
+ text.textContent = this.playButtonText;
24287
+ buttonElement.appendChild(text);
24288
+ }
24280
24289
  return buttonElement;
24281
24290
  };
24282
24291
  this._originalOptions = { ..._Loader2._DEFAULT_LOADER_OPTIONS, ...options };
@@ -24346,7 +24355,7 @@ const _Loader = class _Loader2 extends DefaultLoader {
24346
24355
  this.engine.browser.window.on("resize", resizeHandler);
24347
24356
  }
24348
24357
  this._playButtonShown = true;
24349
- this._playButton.style.display = "block";
24358
+ this._playButton.style.display = "flex";
24350
24359
  document.body.addEventListener("keyup", (evt) => {
24351
24360
  if (evt.key === "Enter") {
24352
24361
  this._playButton.click();
@@ -24425,7 +24434,13 @@ const _Loader = class _Loader2 extends DefaultLoader {
24425
24434
  _positionPlayButton() {
24426
24435
  if (this.engine) {
24427
24436
  const { x: left, y: top, width: screenWidth, height: screenHeight } = this.engine.canvas.getBoundingClientRect();
24428
- if (this._playButtonRootElement) {
24437
+ if (this._playButtonRootElement && this._playButtonElement) {
24438
+ const text = this._playButtonElement.querySelector("#excalibur-play-text");
24439
+ if (screenWidth < 450) {
24440
+ text.style.display = "none";
24441
+ } else {
24442
+ text.style.display = "inline-block";
24443
+ }
24429
24444
  const buttonWidth = this._playButton.clientWidth;
24430
24445
  const buttonHeight = this._playButton.clientHeight;
24431
24446
  if (this.playButtonPosition) {
@@ -24435,6 +24450,10 @@ const _Loader = class _Loader2 extends DefaultLoader {
24435
24450
  this._playButtonRootElement.style.left = `${left + screenWidth / 2 - buttonWidth / 2}px`;
24436
24451
  this._playButtonRootElement.style.top = `${top + screenHeight / 2 - buttonHeight / 2 + 100}px`;
24437
24452
  }
24453
+ if (screenWidth < 450) {
24454
+ this._playButtonRootElement.style.left = `${left + screenWidth / 2 - buttonWidth / 2}px`;
24455
+ this._playButtonRootElement.style.top = `${top + screenHeight / 2 - buttonHeight / 2 + 25}px`;
24456
+ }
24438
24457
  }
24439
24458
  }
24440
24459
  }
@@ -24446,7 +24465,6 @@ const _Loader = class _Loader2 extends DefaultLoader {
24446
24465
  onDraw(ctx) {
24447
24466
  const canvasHeight = this.engine.canvasHeight / this.engine.pixelRatio;
24448
24467
  const canvasWidth = this.engine.canvasWidth / this.engine.pixelRatio;
24449
- this._positionPlayButton();
24450
24468
  ctx.fillStyle = this.backgroundColor;
24451
24469
  ctx.fillRect(0, 0, canvasWidth, canvasHeight);
24452
24470
  let logoY = canvasHeight / 2;
@@ -33437,7 +33455,7 @@ class Semaphore {
33437
33455
  this._count += count;
33438
33456
  }
33439
33457
  }
33440
- const EX_VERSION = "0.32.0-alpha.1575+b861d89";
33458
+ const EX_VERSION = "0.32.0-alpha.1577+cbacdb4";
33441
33459
  polyfill();
33442
33460
  export {
33443
33461
  ActionCompleteEvent,
@@ -1,4 +1,4 @@
1
- /*! excalibur - 0.32.0-alpha.1575+b861d89 - 2025-11-28
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
@@ -5243,7 +5243,7 @@ const _Entity = class _Entity2 {
5243
5243
  }
5244
5244
  }
5245
5245
  /**
5246
- * Removes Actor, meant to be called by the Scene when Actor is added.
5246
+ * Removes Actor, meant to be called by the Scene when Actor is removed.
5247
5247
  *
5248
5248
  * It is not recommended that internal excalibur methods be overridden, do so at your own risk.
5249
5249
  * @internal
@@ -5410,7 +5410,7 @@ class EntityManager {
5410
5410
  }
5411
5411
  }
5412
5412
  removeEntity(idOrEntity, deferred = true) {
5413
- var _a, _b;
5413
+ var _a, _b, _c, _d;
5414
5414
  let id = 0;
5415
5415
  if (idOrEntity instanceof Entity) {
5416
5416
  id = idOrEntity.id;
@@ -5444,7 +5444,8 @@ class EntityManager {
5444
5444
  entity.childrenRemoved$.unsubscribe(childRemovedHandler);
5445
5445
  this._childRemovedHandlerMap.delete(entity);
5446
5446
  }
5447
- if ((_b = (_a = this._world) == null ? void 0 : _a.scene) == null ? void 0 : _b.engine) {
5447
+ entity._remove((_b = (_a = this._world) == null ? void 0 : _a.scene) == null ? void 0 : _b.engine);
5448
+ if ((_d = (_c = this._world) == null ? void 0 : _c.scene) == null ? void 0 : _d.engine) {
5448
5449
  this._world.scene.engine.stats.currFrame.actors.killed++;
5449
5450
  }
5450
5451
  }
@@ -24249,7 +24250,7 @@ class DefaultLoader {
24249
24250
  }
24250
24251
  }
24251
24252
  const logoImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdQAAAB2CAYAAABxhGI9AAAACXBIWXMAAAsSAAALEgHS3X78AAAKnUlEQVR42u3dP2wjSx0H8N8hJIonIRmJjsq0SBR+BQ1dcqKhe0lD77SvSwpKkJKGPulpktfRIMUdEqKIqV57rpAokM4dbSiyq7ONPTP7x39ifz7SFbnEnp3xer47O7uzH15fXwMA6OYHmgAABCoACFQAEKgAgEAFAIEKAAIVAAQqACBQAUCgAoBABQCBCgAIVAAQqAAgUAFAoAIAAhUABCoACFQAEKgAgECFLbmOiNeFf2PbAyz68Pr6qhUgbRwR92v+/zwiJrYHMEKFMmcN///UtgcQqFBk1PD/97U9Qx8VCFSgu4EmAIEKAAIVAAQqACBQ4Z25jojP8eX+0WtNAgIVaOY+Im5j+eKh24h41jQgUIEyZ7F5NaPU7wCBCiwYd/w9cOB+qAlgJ3KLLow0EV198803RWvJfvfddx+0lhEqHKu5JgAjVCBvlhmFzjQRXUekHz9+TP79y8uLRjNChXfvoePvAYEKxNtj1e42/O5JoIJABcrdRMRVLM+X3kTEpaaB988cKuzWg9EobTWdMx0Oly8uN4dqhAoARqgnaN3arHfqu7OyH8ItKLVB/P+CEfMTHyGPY3npx1m8zWGDEeoBfUk/xdti57dr/r1Wv2+6EPow3tZ5rRdS72s1neuF97xvWd+XTH0/V+UMtt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vVoYvW1Sz7nN91jfXbQ1ZQc7TW6HeaoOalypG/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=";
24252
- const loaderCss = "/* Buttons styles start */\n\nbutton#excalibur-play {\n display: inline-block;\n position: relative;\n z-index: 999;\n border-radius: 6px;\n border: none;\n /*border: 3px solid;\n border-color: white;\n box-shadow: 0 0 10px #ccc;*/\n padding: 1rem 1.5rem 1rem 4rem;\n margin: 0;\n text-decoration: none;\n background: #00b233;\n color: #ffffff;\n font-family: sans-serif;\n font-size: 2rem;\n white-space: nowrap;\n line-height: 1;\n cursor: pointer;\n text-align: center;\n transition:\n background 250ms ease-in-out,\n transform 150ms ease;\n -webkit-appearance: none;\n -moz-appearance: none;\n\n -webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */\n -moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */\n -ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */\n -o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */\n animation: excalibur-button-fadein 200ms;\n}\n\n/*\nbutton#excalibur-play {\n display: none;\n}*/\n\nbutton#excalibur-play:after {\n position: absolute;\n content: '';\n border: 8px solid;\n border-color: transparent transparent transparent white;\n left: 35px;\n top: 24px;\n width: 0;\n height: 0;\n}\n\nbutton#excalibur-play:before {\n position: absolute;\n content: '';\n border: 3px solid;\n left: 19px;\n top: 14px;\n border-radius: 20px;\n width: 30px;\n height: 30px;\n}\n\nbutton#excalibur-play:hover,\nbutton#excalibur-play:focus {\n background: #00982c;\n}\n\nbutton#excalibur-play:focus {\n outline: 1px solid #fff;\n outline-offset: -4px;\n}\n\nbutton#excalibur-play:active {\n transform: scale(0.99);\n}\n\n@keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Firefox < 16 */\n@-moz-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Internet Explorer */\n@-ms-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Opera < 12.1 */\n@-o-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n";
24253
+ const loaderCss = "/* Buttons styles start */\nbutton#excalibur-play {\n display: none;\n}\n\nbutton#excalibur-play {\n box-sizing: border-box;\n display: flex;\n gap: 0.25rem;\n white-space: nowrap;\n justify-content: center;\n position: relative;\n z-index: 999;\n border-radius: 6px;\n border: none;\n padding: 1rem;\n margin: 0;\n text-decoration: none;\n background: #00b233;\n color: #ffffff;\n font-family: sans-serif;\n font-size: 2rem;\n white-space: nowrap;\n line-height: 1;\n cursor: pointer;\n text-align: center;\n transition:\n background 250ms ease-in-out,\n transform 150ms ease;\n -webkit-appearance: none;\n -moz-appearance: none;\n\n -webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */\n -moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */\n -ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */\n -o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */\n animation: excalibur-button-fadein 200ms;\n}\n\nspan#excalibur-play-icon {\n content: '';\n display: inline-block;\n position: relative;\n width: 2rem;\n height: 2rem;\n}\n\nspan#excalibur-play-icon:after {\n box-sizing: border-box;\n position: absolute;\n content: '';\n border: 0.5rem solid;\n border-color: transparent transparent transparent white;\n left: calc(50% - 0.1rem);\n top: calc(30% - 0.1rem);\n width: 0;\n height: 0;\n}\n\nspan#excalibur-play-icon:before {\n box-sizing: border-box;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n position: absolute;\n content: '';\n border: 3px solid;\n border-radius: 1rem;\n width: 2rem;\n height: 2rem;\n}\n\nbutton#excalibur-play:focus {\n outline: 1px solid #fff;\n outline-offset: -4px;\n}\n\nbutton#excalibur-play:active {\n transform: scale(0.99);\n}\n\n@keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Firefox < 16 */\n@-moz-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Internet Explorer */\n@-ms-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Opera < 12.1 */\n@-o-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n";
24253
24254
  const _Loader = class _Loader2 extends DefaultLoader {
24254
24255
  constructor(loadablesOrOptions) {
24255
24256
  const options = Array.isArray(loadablesOrOptions) ? {
@@ -24275,8 +24276,16 @@ const _Loader = class _Loader2 extends DefaultLoader {
24275
24276
  buttonElement = document.createElement("button");
24276
24277
  }
24277
24278
  buttonElement.id = "excalibur-play";
24278
- buttonElement.textContent = this.playButtonText;
24279
24279
  buttonElement.style.display = "none";
24280
+ if (buttonElement) {
24281
+ const span = document.createElement("span");
24282
+ span.id = "excalibur-play-icon";
24283
+ buttonElement.appendChild(span);
24284
+ const text = document.createElement("span");
24285
+ text.id = "excalibur-play-text";
24286
+ text.textContent = this.playButtonText;
24287
+ buttonElement.appendChild(text);
24288
+ }
24280
24289
  return buttonElement;
24281
24290
  };
24282
24291
  this._originalOptions = { ..._Loader2._DEFAULT_LOADER_OPTIONS, ...options };
@@ -24346,7 +24355,7 @@ const _Loader = class _Loader2 extends DefaultLoader {
24346
24355
  this.engine.browser.window.on("resize", resizeHandler);
24347
24356
  }
24348
24357
  this._playButtonShown = true;
24349
- this._playButton.style.display = "block";
24358
+ this._playButton.style.display = "flex";
24350
24359
  document.body.addEventListener("keyup", (evt) => {
24351
24360
  if (evt.key === "Enter") {
24352
24361
  this._playButton.click();
@@ -24425,7 +24434,13 @@ const _Loader = class _Loader2 extends DefaultLoader {
24425
24434
  _positionPlayButton() {
24426
24435
  if (this.engine) {
24427
24436
  const { x: left, y: top, width: screenWidth, height: screenHeight } = this.engine.canvas.getBoundingClientRect();
24428
- if (this._playButtonRootElement) {
24437
+ if (this._playButtonRootElement && this._playButtonElement) {
24438
+ const text = this._playButtonElement.querySelector("#excalibur-play-text");
24439
+ if (screenWidth < 450) {
24440
+ text.style.display = "none";
24441
+ } else {
24442
+ text.style.display = "inline-block";
24443
+ }
24429
24444
  const buttonWidth = this._playButton.clientWidth;
24430
24445
  const buttonHeight = this._playButton.clientHeight;
24431
24446
  if (this.playButtonPosition) {
@@ -24435,6 +24450,10 @@ const _Loader = class _Loader2 extends DefaultLoader {
24435
24450
  this._playButtonRootElement.style.left = `${left + screenWidth / 2 - buttonWidth / 2}px`;
24436
24451
  this._playButtonRootElement.style.top = `${top + screenHeight / 2 - buttonHeight / 2 + 100}px`;
24437
24452
  }
24453
+ if (screenWidth < 450) {
24454
+ this._playButtonRootElement.style.left = `${left + screenWidth / 2 - buttonWidth / 2}px`;
24455
+ this._playButtonRootElement.style.top = `${top + screenHeight / 2 - buttonHeight / 2 + 25}px`;
24456
+ }
24438
24457
  }
24439
24458
  }
24440
24459
  }
@@ -24446,7 +24465,6 @@ const _Loader = class _Loader2 extends DefaultLoader {
24446
24465
  onDraw(ctx) {
24447
24466
  const canvasHeight = this.engine.canvasHeight / this.engine.pixelRatio;
24448
24467
  const canvasWidth = this.engine.canvasWidth / this.engine.pixelRatio;
24449
- this._positionPlayButton();
24450
24468
  ctx.fillStyle = this.backgroundColor;
24451
24469
  ctx.fillRect(0, 0, canvasWidth, canvasHeight);
24452
24470
  let logoY = canvasHeight / 2;
@@ -33437,7 +33455,7 @@ class Semaphore {
33437
33455
  this._count += count;
33438
33456
  }
33439
33457
  }
33440
- const EX_VERSION = "0.32.0-alpha.1575+b861d89";
33458
+ const EX_VERSION = "0.32.0-alpha.1577+cbacdb4";
33441
33459
  polyfill();
33442
33460
  export {
33443
33461
  ActionCompleteEvent,