@energy8platform/game-engine 0.16.0 → 0.18.0
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/core.cjs.js +62 -1
- package/dist/core.cjs.js.map +1 -1
- package/dist/core.d.ts +33 -2
- package/dist/core.esm.js +63 -3
- package/dist/core.esm.js.map +1 -1
- package/dist/debug.d.ts +1 -1
- package/dist/game-spec.cjs.js +13 -0
- package/dist/game-spec.cjs.js.map +1 -0
- package/dist/game-spec.d.ts +1 -0
- package/dist/game-spec.esm.js +2 -0
- package/dist/game-spec.esm.js.map +1 -0
- package/dist/host.cjs.js +3346 -0
- package/dist/host.cjs.js.map +1 -0
- package/dist/host.d.ts +915 -0
- package/dist/host.esm.js +3337 -0
- package/dist/host.esm.js.map +1 -0
- package/dist/index.cjs.js +13 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.esm.js +13 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.d.ts +6 -1
- package/dist/react.esm.js.map +1 -1
- package/dist/shell.cjs.js +19 -0
- package/dist/shell.cjs.js.map +1 -0
- package/dist/shell.d.ts +1 -0
- package/dist/shell.esm.js +2 -0
- package/dist/shell.esm.js.map +1 -0
- package/dist/slot.cjs.js +998 -0
- package/dist/slot.cjs.js.map +1 -0
- package/dist/slot.d.ts +333 -0
- package/dist/slot.esm.js +985 -0
- package/dist/slot.esm.js.map +1 -0
- package/package.json +26 -1
- package/src/core/GameApplication.ts +16 -1
- package/src/core/index.ts +2 -0
- package/src/debug/index.ts +1 -1
- package/src/game-spec/index.ts +1 -0
- package/src/host/autoplay.ts +78 -0
- package/src/host/balanceGate.ts +46 -0
- package/src/host/buildConfig.ts +28 -0
- package/src/host/createSlotGame.ts +423 -0
- package/src/host/fatalError.ts +104 -0
- package/src/host/freeSpinsCounter.ts +44 -0
- package/src/host/index.ts +18 -0
- package/src/host/playError.ts +64 -0
- package/src/host/preboot.ts +25 -0
- package/src/host/replay.ts +9 -0
- package/src/host/runRound.ts +63 -0
- package/src/host/sceneController.ts +31 -0
- package/src/host/sceneStart.ts +25 -0
- package/src/host/shellConfig.ts +379 -0
- package/src/host/slotPlay.ts +62 -0
- package/src/host/types.ts +71 -0
- package/src/index.ts +1 -1
- package/src/loading/index.ts +2 -0
- package/src/scenes/IntroScene.ts +66 -0
- package/src/shell/index.ts +20 -0
- package/src/slot/anim/CascadeController.ts +102 -0
- package/src/slot/anim/ReelSpinController.ts +81 -0
- package/src/slot/anim/easing-map.ts +14 -0
- package/src/slot/freeSpins/FreeSpinsSession.ts +40 -0
- package/src/slot/grid/AnimatedSymbol.ts +68 -0
- package/src/slot/grid/ReelGrid.ts +92 -0
- package/src/slot/grid/SymbolCell.ts +127 -0
- package/src/slot/grid/SymbolView.ts +13 -0
- package/src/slot/index.ts +21 -0
- package/src/slot/multiplier/MultiplierAccumulator.ts +29 -0
- package/src/slot/overlay/BigWinOverlay.ts +89 -0
- package/src/slot/overlay/CountUpDisplay.ts +56 -0
- package/src/slot/overlay/tiers.ts +29 -0
- package/src/types.ts +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as _energy8platform_platform_core_shell from '@energy8platform/platform-core/shell';
|
|
1
2
|
import { Container, ApplicationOptions, Application, Texture, AnimatedSprite, Spritesheet, TextStyle, ColorSource } from 'pixi.js';
|
|
2
3
|
import { CasinoGameSDK, InitData, GameConfigData, SessionData } from '@energy8platform/game-sdk';
|
|
3
4
|
export { AnywhereWinData, BalanceData, BridgeDestroyedError, BridgeNotReadyError, GameConfigData, InitData, PaylineData, PlayParams, PlayResultData, SDKError, SessionData, SymbolData, TimeoutError, WinLineData } from '@energy8platform/game-sdk';
|
|
4
5
|
import { LoadingScreenConfig, AssetManifest, PlatformSession } from '@energy8platform/platform-core';
|
|
5
6
|
export { AssetBundle, AssetEntry, AssetManifest, LoadingScreenConfig } from '@energy8platform/platform-core';
|
|
6
|
-
export { DevBridge, DevBridgeConfig } from '@energy8platform/platform-core/dev-bridge';
|
|
7
|
+
export { DevBridge, DevBridgeConfig, ReplayConfig, ReplayLaunch } from '@energy8platform/platform-core/dev-bridge';
|
|
7
8
|
export { ActionDefinition, GameDefinition, LuaEngineConfig, LuaPlayResult, TransitionRule } from '@energy8platform/platform-core/lua';
|
|
8
9
|
|
|
9
10
|
declare enum ScaleMode {
|
|
@@ -60,6 +61,8 @@ interface GameApplicationConfig {
|
|
|
60
61
|
pixi?: Partial<ApplicationOptions>;
|
|
61
62
|
/** Enable debug overlay (FPS, draw calls) */
|
|
62
63
|
debug?: boolean;
|
|
64
|
+
/** When set, GameApplication mounts the branded game shell after the SDK handshake. */
|
|
65
|
+
shell?: _energy8platform_platform_core_shell.ShellConfig | false;
|
|
63
66
|
}
|
|
64
67
|
interface SceneConstructor {
|
|
65
68
|
new (): IScene;
|
|
@@ -697,6 +700,8 @@ declare class GameApplication extends EventEmitter<GameEngineEvents> {
|
|
|
697
700
|
initData: InitData | null;
|
|
698
701
|
/** Platform session (SDK + optional DevBridge). null until start() runs. */
|
|
699
702
|
platformSession: PlatformSession | null;
|
|
703
|
+
/** Branded game shell (only when config.shell is set). */
|
|
704
|
+
shell?: _energy8platform_platform_core_shell.GameShell;
|
|
700
705
|
/** Configuration */
|
|
701
706
|
readonly config: GameApplicationConfig;
|
|
702
707
|
private _running;
|
|
@@ -723,7 +728,7 @@ declare class GameApplication extends EventEmitter<GameEngineEvents> {
|
|
|
723
728
|
/**
|
|
724
729
|
* Destroy the engine and free all resources.
|
|
725
730
|
*/
|
|
726
|
-
destroy(): void
|
|
731
|
+
destroy(): Promise<void>;
|
|
727
732
|
private resolveContainer;
|
|
728
733
|
private initPixi;
|
|
729
734
|
private initSDK;
|
package/dist/index.esm.js
CHANGED
|
@@ -1911,6 +1911,8 @@ class GameApplication extends EventEmitter {
|
|
|
1911
1911
|
initData = null;
|
|
1912
1912
|
/** Platform session (SDK + optional DevBridge). null until start() runs. */
|
|
1913
1913
|
platformSession = null;
|
|
1914
|
+
/** Branded game shell (only when config.shell is set). */
|
|
1915
|
+
shell;
|
|
1914
1916
|
/** Configuration */
|
|
1915
1917
|
config;
|
|
1916
1918
|
// ─── Private state ──────────────────────────────────────
|
|
@@ -1972,6 +1974,11 @@ class GameApplication extends EventEmitter {
|
|
|
1972
1974
|
await this.initPixi();
|
|
1973
1975
|
// 4. Initialize SDK (if enabled)
|
|
1974
1976
|
await this.initSDK();
|
|
1977
|
+
// 4b. Mount the branded game shell after the SDK handshake (optional)
|
|
1978
|
+
if (this.config.shell) {
|
|
1979
|
+
const { createGameShell } = await import('@energy8platform/platform-core/shell');
|
|
1980
|
+
this.shell = createGameShell(this.config.shell);
|
|
1981
|
+
}
|
|
1975
1982
|
// 5. Merge design dimensions from SDK config
|
|
1976
1983
|
this.applySDKConfig();
|
|
1977
1984
|
// 6. Initialize sub-systems
|
|
@@ -1995,11 +2002,16 @@ class GameApplication extends EventEmitter {
|
|
|
1995
2002
|
/**
|
|
1996
2003
|
* Destroy the engine and free all resources.
|
|
1997
2004
|
*/
|
|
1998
|
-
destroy() {
|
|
2005
|
+
async destroy() {
|
|
1999
2006
|
if (this._destroyed)
|
|
2000
2007
|
return;
|
|
2001
2008
|
this._destroyed = true;
|
|
2002
2009
|
this._running = false;
|
|
2010
|
+
if (this.shell) {
|
|
2011
|
+
const { removeGameShell } = await import('@energy8platform/platform-core/shell');
|
|
2012
|
+
await removeGameShell();
|
|
2013
|
+
this.shell = undefined;
|
|
2014
|
+
}
|
|
2003
2015
|
this.scenes?.destroy();
|
|
2004
2016
|
this.input?.destroy();
|
|
2005
2017
|
this.audio?.destroy();
|