@energy8platform/shell 0.11.3 → 0.11.5
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/dist/html.cjs.js +2 -2
- package/dist/html.d.ts +3 -3
- package/dist/html.esm.js +2 -2
- package/dist/index.cjs.js +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +2 -2
- package/dist/pixi.cjs.js +55 -18
- package/dist/pixi.cjs.js.map +1 -1
- package/dist/pixi.d.ts +7 -3
- package/dist/pixi.esm.js +55 -18
- package/dist/pixi.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/core/locales.ts +1 -1
- package/src/core/version.ts +1 -1
- package/src/ui/pixi/PixiRenderer.ts +52 -15
package/dist/pixi.d.ts
CHANGED
|
@@ -643,7 +643,7 @@ declare class ShellController extends EventEmitter<ShellEvents> implements Shell
|
|
|
643
643
|
tokens: ShellTokens;
|
|
644
644
|
layout: ShellLayoutMode;
|
|
645
645
|
soundOn: boolean;
|
|
646
|
-
readonly engineVersion = "0.11.
|
|
646
|
+
readonly engineVersion = "0.11.5";
|
|
647
647
|
readonly actions: ShellActions;
|
|
648
648
|
private renderer;
|
|
649
649
|
private i18n;
|
|
@@ -795,14 +795,14 @@ declare function createI18n(opts: I18nOptions): I18n;
|
|
|
795
795
|
* supported, the disclaimer is translated and displayed in each language").
|
|
796
796
|
*
|
|
797
797
|
* Brand-free by construction. Stake's own template ends with a seventh line — "TM and © {year}
|
|
798
|
-
*
|
|
798
|
+
* Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
|
|
799
799
|
* `INIT.config.disclaimerLines`, which outrank this default, and renders verbatim (see the host's
|
|
800
800
|
* `isBrandLine`). Every other platform gets the same mandated wording without someone else's mark.
|
|
801
801
|
*/
|
|
802
802
|
declare const DISCLAIMER_LINES: readonly string[];
|
|
803
803
|
|
|
804
804
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
805
|
-
declare const PACKAGE_VERSION = "0.11.
|
|
805
|
+
declare const PACKAGE_VERSION = "0.11.5";
|
|
806
806
|
|
|
807
807
|
/**
|
|
808
808
|
* What a scrollable region should ADVERTISE about itself.
|
|
@@ -906,6 +906,10 @@ declare class PixiRenderer implements ShellRenderer {
|
|
|
906
906
|
private bar?;
|
|
907
907
|
private currentLayer;
|
|
908
908
|
private backdrop?;
|
|
909
|
+
/** Whether `currentLayer` asked for a frosted backdrop. Light-dismiss layers (the menu popover)
|
|
910
|
+
* pass `{ backdrop: false }`, and that answer has to survive past the open: a resize re-snapshots
|
|
911
|
+
* the backdrop, and without this it re-snapshotted for layers that never wanted one. */
|
|
912
|
+
private layerBackdrop;
|
|
909
913
|
private moneyAnims;
|
|
910
914
|
private destroyed;
|
|
911
915
|
constructor(opts: PixiRendererOptions);
|
package/dist/pixi.esm.js
CHANGED
|
@@ -1329,7 +1329,7 @@ const D = {
|
|
|
1329
1329
|
* supported, the disclaimer is translated and displayed in each language").
|
|
1330
1330
|
*
|
|
1331
1331
|
* Brand-free by construction. Stake's own template ends with a seventh line — "TM and © {year}
|
|
1332
|
-
*
|
|
1332
|
+
* Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
|
|
1333
1333
|
* `INIT.config.disclaimerLines`, which outrank this default, and renders verbatim (see the host's
|
|
1334
1334
|
* `isBrandLine`). Every other platform gets the same mandated wording without someone else's mark.
|
|
1335
1335
|
*/
|
|
@@ -1753,7 +1753,7 @@ function keyboardCapable(win = typeof window === 'undefined' ? undefined : windo
|
|
|
1753
1753
|
|
|
1754
1754
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1755
1755
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1756
|
-
const PACKAGE_VERSION = '0.11.
|
|
1756
|
+
const PACKAGE_VERSION = '0.11.5';
|
|
1757
1757
|
|
|
1758
1758
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1759
1759
|
function resolveConfig(config) {
|
|
@@ -7212,6 +7212,10 @@ class PixiRenderer {
|
|
|
7212
7212
|
bar;
|
|
7213
7213
|
currentLayer = null;
|
|
7214
7214
|
backdrop;
|
|
7215
|
+
/** Whether `currentLayer` asked for a frosted backdrop. Light-dismiss layers (the menu popover)
|
|
7216
|
+
* pass `{ backdrop: false }`, and that answer has to survive past the open: a resize re-snapshots
|
|
7217
|
+
* the backdrop, and without this it re-snapshotted for layers that never wanted one. */
|
|
7218
|
+
layerBackdrop = false;
|
|
7215
7219
|
moneyAnims = [];
|
|
7216
7220
|
destroyed = false;
|
|
7217
7221
|
constructor(opts) {
|
|
@@ -7369,7 +7373,8 @@ class PixiRenderer {
|
|
|
7369
7373
|
this.clearLayer();
|
|
7370
7374
|
// Light-dismiss layers (the menu popover) opt out with `{ backdrop: false }` — no frosted
|
|
7371
7375
|
// snapshot, the game stays visible behind them. Every other caller is unaffected (defaults on).
|
|
7372
|
-
|
|
7376
|
+
this.layerBackdrop = opts?.backdrop !== false;
|
|
7377
|
+
if (this.layerBackdrop)
|
|
7373
7378
|
this.makeBackdrop(); // frosted snapshot (the DOM's backdrop-filter:blur)
|
|
7374
7379
|
this.currentLayer = node;
|
|
7375
7380
|
this.modalLayer.addChild(node);
|
|
@@ -7392,6 +7397,7 @@ class PixiRenderer {
|
|
|
7392
7397
|
this.currentLayer.destroy({ children: true });
|
|
7393
7398
|
this.currentLayer = null;
|
|
7394
7399
|
}
|
|
7400
|
+
this.layerBackdrop = false;
|
|
7395
7401
|
this.removeBackdrop();
|
|
7396
7402
|
}
|
|
7397
7403
|
fitModals() {
|
|
@@ -7415,7 +7421,10 @@ class PixiRenderer {
|
|
|
7415
7421
|
// reads as more frost, never sharp game.
|
|
7416
7422
|
node.addChild(new Graphics().rect(0, 0, w, h).fill(0x0c111c));
|
|
7417
7423
|
this.modalLayer.addChild(node);
|
|
7418
|
-
this.backdrop = {
|
|
7424
|
+
this.backdrop = {
|
|
7425
|
+
node,
|
|
7426
|
+
texture: RenderTexture.create({ width: w, height: h, resolution: 0.25 }),
|
|
7427
|
+
};
|
|
7419
7428
|
try {
|
|
7420
7429
|
// Heavy downscale (¼ res) is the blur-STRENGTH lever (each texel covers more screen), far cheaper
|
|
7421
7430
|
// than a full-res large-radius blur and smooth over fine detail. Effective on-screen blur ≈
|
|
@@ -7473,9 +7482,15 @@ class PixiRenderer {
|
|
|
7473
7482
|
this.host.notifyResize(this.screenW, this.screenH);
|
|
7474
7483
|
if (this.currentLayer) {
|
|
7475
7484
|
this.currentLayer.resize?.(this.screenW, this.screenH);
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7485
|
+
// Only for a layer that ASKED for the frost. A rotation with the bar menu open used to slap a
|
|
7486
|
+
// backdrop under a light-dismiss popover that had opted out of one — and since modalLayer
|
|
7487
|
+
// draws above barLayer, that frozen blurred snapshot covered the game AND the bar until the
|
|
7488
|
+
// menu was closed. That is the "UI is not adopted on rotation while the menu is open" remark.
|
|
7489
|
+
if (this.layerBackdrop) {
|
|
7490
|
+
this.makeBackdrop(); // re-snapshot at the new size
|
|
7491
|
+
if (this.backdrop)
|
|
7492
|
+
this.modalLayer.setChildIndex(this.backdrop.node, 0); // keep it below the layer
|
|
7493
|
+
}
|
|
7479
7494
|
}
|
|
7480
7495
|
};
|
|
7481
7496
|
// ── PixiComponentContext factory ──────────────────────────────────────────────
|
|
@@ -7487,13 +7502,27 @@ class PixiRenderer {
|
|
|
7487
7502
|
const self = this;
|
|
7488
7503
|
const ctx = {
|
|
7489
7504
|
// — core ShellHost (forwarded) —
|
|
7490
|
-
get state() {
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
get
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
get
|
|
7505
|
+
get state() {
|
|
7506
|
+
return host.state;
|
|
7507
|
+
},
|
|
7508
|
+
get config() {
|
|
7509
|
+
return host.config;
|
|
7510
|
+
},
|
|
7511
|
+
get tokens() {
|
|
7512
|
+
return host.tokens;
|
|
7513
|
+
},
|
|
7514
|
+
get layout() {
|
|
7515
|
+
return host.layout;
|
|
7516
|
+
},
|
|
7517
|
+
get soundOn() {
|
|
7518
|
+
return host.soundOn;
|
|
7519
|
+
},
|
|
7520
|
+
get menu() {
|
|
7521
|
+
return host.menu;
|
|
7522
|
+
},
|
|
7523
|
+
get actions() {
|
|
7524
|
+
return host.actions;
|
|
7525
|
+
},
|
|
7497
7526
|
openReplay: (opts) => host.openReplay(opts),
|
|
7498
7527
|
t: (s) => host.t(s),
|
|
7499
7528
|
formatCurrency: (n, win) => host.formatCurrency(n, win),
|
|
@@ -7506,10 +7535,18 @@ class PixiRenderer {
|
|
|
7506
7535
|
setMenuValue: (id, v) => host.setMenuValue(id, v),
|
|
7507
7536
|
setMenuRefresh: (fn) => host.setMenuRefresh(fn),
|
|
7508
7537
|
// — Pixi-specific surface —
|
|
7509
|
-
get ticker() {
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
get
|
|
7538
|
+
get ticker() {
|
|
7539
|
+
return self.app.ticker;
|
|
7540
|
+
},
|
|
7541
|
+
get canvas() {
|
|
7542
|
+
return self.app.canvas;
|
|
7543
|
+
},
|
|
7544
|
+
get screenW() {
|
|
7545
|
+
return self.app.screen.width;
|
|
7546
|
+
},
|
|
7547
|
+
get screenH() {
|
|
7548
|
+
return self.app.screen.height;
|
|
7549
|
+
},
|
|
7513
7550
|
render: () => self.renderBar(),
|
|
7514
7551
|
pushLayer: (node, opts) => self.pushLayer(node, opts),
|
|
7515
7552
|
// Route component-initiated closes through the controller (not straight to self.closeLayer) so
|