@energy8platform/shell 0.6.0 → 0.6.2
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 +34 -3
- package/dist/pixi.cjs.js.map +1 -1
- package/dist/pixi.d.ts +8 -3
- package/dist/pixi.esm.js +34 -3
- 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/src/ui/pixi/components/GameInfo.ts +18 -1
package/dist/html.d.ts
CHANGED
|
@@ -511,7 +511,7 @@ declare class ShellController extends EventEmitter<ShellEvents> implements Shell
|
|
|
511
511
|
tokens: ShellTokens;
|
|
512
512
|
layout: ShellLayoutMode;
|
|
513
513
|
soundOn: boolean;
|
|
514
|
-
readonly engineVersion = "0.6.
|
|
514
|
+
readonly engineVersion = "0.6.2";
|
|
515
515
|
readonly actions: ShellActions;
|
|
516
516
|
private renderer;
|
|
517
517
|
private i18n;
|
|
@@ -553,7 +553,12 @@ declare class ShellController extends EventEmitter<ShellEvents> implements Shell
|
|
|
553
553
|
deactivateFeature(): void;
|
|
554
554
|
private money;
|
|
555
555
|
setBalance(n: number): void;
|
|
556
|
-
|
|
556
|
+
/** Set the WIN readout. Counts up/down from the previous value by default. Pass
|
|
557
|
+
* `{ animate: false }` to SNAP instantly (renderBar cancels any in-flight count-up) — used by the
|
|
558
|
+
* host to clear WIN to 0 at spin start, where an animated count-DOWN would look wrong. */
|
|
559
|
+
setWin(n: number, opts?: {
|
|
560
|
+
animate?: boolean;
|
|
561
|
+
}): void;
|
|
557
562
|
setBet(n: number): void;
|
|
558
563
|
setMode(mode: ShellMode): void;
|
|
559
564
|
setBusy(busy: boolean): void;
|
|
@@ -588,7 +593,7 @@ interface I18n {
|
|
|
588
593
|
declare function createI18n(opts: I18nOptions): I18n;
|
|
589
594
|
|
|
590
595
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
591
|
-
declare const PACKAGE_VERSION = "0.6.
|
|
596
|
+
declare const PACKAGE_VERSION = "0.6.2";
|
|
592
597
|
|
|
593
598
|
/** A shell: the renderer-agnostic controller plus the surface facade (safeArea/barHeight/setVisible)
|
|
594
599
|
* an embedding host reads. `createShell`, `createGameShell` and `createPixiShell` all return this. */
|
package/dist/html.esm.js
CHANGED
|
@@ -1446,7 +1446,7 @@ class KeyboardController {
|
|
|
1446
1446
|
|
|
1447
1447
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1448
1448
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1449
|
-
const PACKAGE_VERSION = '0.6.
|
|
1449
|
+
const PACKAGE_VERSION = '0.6.2';
|
|
1450
1450
|
|
|
1451
1451
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1452
1452
|
function resolveConfig(config) {
|
|
@@ -1724,10 +1724,17 @@ class ShellController extends EventEmitter {
|
|
|
1724
1724
|
this.prevBalance = n;
|
|
1725
1725
|
this.money('balance', from, n);
|
|
1726
1726
|
}
|
|
1727
|
-
|
|
1727
|
+
/** Set the WIN readout. Counts up/down from the previous value by default. Pass
|
|
1728
|
+
* `{ animate: false }` to SNAP instantly (renderBar cancels any in-flight count-up) — used by the
|
|
1729
|
+
* host to clear WIN to 0 at spin start, where an animated count-DOWN would look wrong. */
|
|
1730
|
+
setWin(n, opts) {
|
|
1728
1731
|
const from = this.prevWin;
|
|
1729
1732
|
this.state.win = n;
|
|
1730
1733
|
this.prevWin = n;
|
|
1734
|
+
if (opts?.animate === false) {
|
|
1735
|
+
this.renderer.renderBar(); // instant repaint from state; cancels running money anims
|
|
1736
|
+
return;
|
|
1737
|
+
}
|
|
1731
1738
|
this.money('win', from, n);
|
|
1732
1739
|
}
|
|
1733
1740
|
setBet(n) {
|