@energy8platform/shell 0.6.0 → 0.6.1
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 +9 -2
- package/dist/html.cjs.js.map +1 -1
- package/dist/html.d.ts +8 -3
- package/dist/html.esm.js +9 -2
- package/dist/html.esm.js.map +1 -1
- package/dist/index.cjs.js +9 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.esm.js +9 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/pixi.cjs.js +16 -2
- package/dist/pixi.cjs.js.map +1 -1
- package/dist/pixi.d.ts +8 -3
- package/dist/pixi.esm.js +16 -2
- package/dist/pixi.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/core/ShellController.ts +8 -1
- package/src/core/version.ts +1 -1
- package/src/ui/pixi/PixiRenderer.ts +6 -0
package/dist/pixi.cjs.js
CHANGED
|
@@ -1449,7 +1449,7 @@ class KeyboardController {
|
|
|
1449
1449
|
|
|
1450
1450
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1451
1451
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1452
|
-
const PACKAGE_VERSION = '0.6.
|
|
1452
|
+
const PACKAGE_VERSION = '0.6.1';
|
|
1453
1453
|
|
|
1454
1454
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1455
1455
|
function resolveConfig(config) {
|
|
@@ -1727,10 +1727,17 @@ class ShellController extends EventEmitter {
|
|
|
1727
1727
|
this.prevBalance = n;
|
|
1728
1728
|
this.money('balance', from, n);
|
|
1729
1729
|
}
|
|
1730
|
-
|
|
1730
|
+
/** Set the WIN readout. Counts up/down from the previous value by default. Pass
|
|
1731
|
+
* `{ animate: false }` to SNAP instantly (renderBar cancels any in-flight count-up) — used by the
|
|
1732
|
+
* host to clear WIN to 0 at spin start, where an animated count-DOWN would look wrong. */
|
|
1733
|
+
setWin(n, opts) {
|
|
1731
1734
|
const from = this.prevWin;
|
|
1732
1735
|
this.state.win = n;
|
|
1733
1736
|
this.prevWin = n;
|
|
1737
|
+
if (opts?.animate === false) {
|
|
1738
|
+
this.renderer.renderBar(); // instant repaint from state; cancels running money anims
|
|
1739
|
+
return;
|
|
1740
|
+
}
|
|
1734
1741
|
this.money('win', from, n);
|
|
1735
1742
|
}
|
|
1736
1743
|
setBet(n) {
|
|
@@ -5926,6 +5933,13 @@ class PixiRenderer {
|
|
|
5926
5933
|
// make sure the stage delivers global pointer moves (drag, sliders)
|
|
5927
5934
|
this.app.stage.eventMode = 'static';
|
|
5928
5935
|
this.app.renderer.on('resize', this.onResize);
|
|
5936
|
+
// Seed the layout from the CURRENT screen size. The renderer was resized to the container during
|
|
5937
|
+
// boot (ViewportManager.refresh) BEFORE this shell mounted and subscribed above, so that initial
|
|
5938
|
+
// 'resize' event is already gone and won't fire again on a stationary device. Without this seed
|
|
5939
|
+
// the controller's layout stays at its 'wide' DEFAULT — a portrait mobile would show the DESKTOP
|
|
5940
|
+
// bar. (The HTML renderer gets this for free: its ResizeObserver fires immediately on observe.)
|
|
5941
|
+
if (this.screenW > 0)
|
|
5942
|
+
this.host.notifyResize(this.screenW, this.screenH);
|
|
5929
5943
|
whenFontReady(() => {
|
|
5930
5944
|
if (!this.destroyed)
|
|
5931
5945
|
this.renderBar();
|