@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 CHANGED
@@ -1448,7 +1448,7 @@ class KeyboardController {
1448
1448
 
1449
1449
  // AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
1450
1450
  /** The @energy8platform/shell package version, stamped into the game-info footer. */
1451
- const PACKAGE_VERSION = '0.6.0';
1451
+ const PACKAGE_VERSION = '0.6.2';
1452
1452
 
1453
1453
  /** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
1454
1454
  function resolveConfig(config) {
@@ -1726,10 +1726,17 @@ class ShellController extends EventEmitter {
1726
1726
  this.prevBalance = n;
1727
1727
  this.money('balance', from, n);
1728
1728
  }
1729
- setWin(n) {
1729
+ /** Set the WIN readout. Counts up/down from the previous value by default. Pass
1730
+ * `{ animate: false }` to SNAP instantly (renderBar cancels any in-flight count-up) — used by the
1731
+ * host to clear WIN to 0 at spin start, where an animated count-DOWN would look wrong. */
1732
+ setWin(n, opts) {
1730
1733
  const from = this.prevWin;
1731
1734
  this.state.win = n;
1732
1735
  this.prevWin = n;
1736
+ if (opts?.animate === false) {
1737
+ this.renderer.renderBar(); // instant repaint from state; cancels running money anims
1738
+ return;
1739
+ }
1733
1740
  this.money('win', from, n);
1734
1741
  }
1735
1742
  setBet(n) {