@energy8platform/game-engine 0.3.0 → 0.4.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/README.md +139 -44
- package/dist/core.cjs.js +1 -0
- package/dist/core.cjs.js.map +1 -1
- package/dist/core.esm.js +1 -0
- package/dist/core.esm.js.map +1 -1
- package/dist/index.cjs.js +317 -789
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +61 -129
- package/dist/index.esm.js +304 -790
- package/dist/index.esm.js.map +1 -1
- package/dist/ui.cjs.js +637 -1106
- package/dist/ui.cjs.js.map +1 -1
- package/dist/ui.d.ts +60 -128
- package/dist/ui.esm.js +620 -1107
- package/dist/ui.esm.js.map +1 -1
- package/dist/vite.cjs.js +23 -3
- package/dist/vite.cjs.js.map +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.esm.js +23 -3
- package/dist/vite.esm.js.map +1 -1
- package/package.json +17 -2
- package/src/core/GameApplication.ts +1 -0
- package/src/index.ts +16 -0
- package/src/ui/BalanceDisplay.ts +0 -3
- package/src/ui/Button.ts +71 -130
- package/src/ui/Layout.ts +102 -180
- package/src/ui/Modal.ts +6 -5
- package/src/ui/Panel.ts +52 -55
- package/src/ui/ProgressBar.ts +52 -57
- package/src/ui/ScrollContainer.ts +58 -489
- package/src/ui/Toast.ts +19 -13
- package/src/ui/index.ts +13 -0
- package/src/vite/index.ts +23 -3
package/src/ui/index.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// ─── @pixi/layout setup (must be imported before creating containers) ────
|
|
2
|
+
import '@pixi/layout';
|
|
3
|
+
|
|
4
|
+
// ─── Engine UI Components ─────────────────────────────────
|
|
1
5
|
export { Button } from './Button';
|
|
2
6
|
export type { ButtonConfig, ButtonState } from './Button';
|
|
3
7
|
export { ProgressBar } from './ProgressBar';
|
|
@@ -18,3 +22,12 @@ export { Layout } from './Layout';
|
|
|
18
22
|
export type { LayoutConfig, LayoutDirection, LayoutAlignment, LayoutAnchor } from './Layout';
|
|
19
23
|
export { ScrollContainer } from './ScrollContainer';
|
|
20
24
|
export type { ScrollContainerConfig, ScrollDirection } from './ScrollContainer';
|
|
25
|
+
|
|
26
|
+
// ─── Re-exports from @pixi/ui for direct use ─────────────
|
|
27
|
+
export { FancyButton, ScrollBox, ButtonContainer } from '@pixi/ui';
|
|
28
|
+
export type { ButtonOptions, ScrollBoxOptions, ProgressBarOptions } from '@pixi/ui';
|
|
29
|
+
|
|
30
|
+
// ─── Re-exports from @pixi/layout for direct use ─────────
|
|
31
|
+
export { LayoutContainer } from '@pixi/layout/components';
|
|
32
|
+
export { Layout as PixiLayout } from '@pixi/layout';
|
|
33
|
+
export type { LayoutStyles, LayoutOptions } from '@pixi/layout';
|
package/src/vite/index.ts
CHANGED
|
@@ -87,7 +87,7 @@ await import('${entrySrc}');
|
|
|
87
87
|
* Define a Vite configuration tailored for Energy8 casino games.
|
|
88
88
|
*
|
|
89
89
|
* Merges sensible defaults for iGaming projects:
|
|
90
|
-
* - Build target:
|
|
90
|
+
* - Build target: ESNext (required for yoga-layout WASM top-level await)
|
|
91
91
|
* - Asset inlining threshold: 8KB
|
|
92
92
|
* - Source maps for dev, none for prod
|
|
93
93
|
* - Optional DevBridge auto-injection in dev mode
|
|
@@ -122,7 +122,7 @@ export function defineGameConfig(config: GameConfig = {}): UserConfig {
|
|
|
122
122
|
],
|
|
123
123
|
|
|
124
124
|
build: {
|
|
125
|
-
target: '
|
|
125
|
+
target: 'esnext',
|
|
126
126
|
assetsInlineLimit: 8192,
|
|
127
127
|
sourcemap: false,
|
|
128
128
|
rollupOptions: {
|
|
@@ -142,11 +142,31 @@ export function defineGameConfig(config: GameConfig = {}): UserConfig {
|
|
|
142
142
|
},
|
|
143
143
|
|
|
144
144
|
resolve: {
|
|
145
|
+
dedupe: [
|
|
146
|
+
'pixi.js',
|
|
147
|
+
'@pixi/layout',
|
|
148
|
+
'@pixi/layout/components',
|
|
149
|
+
'@pixi/ui',
|
|
150
|
+
'yoga-layout',
|
|
151
|
+
'yoga-layout/load',
|
|
152
|
+
],
|
|
145
153
|
...userVite.resolve,
|
|
146
154
|
},
|
|
147
155
|
|
|
148
156
|
optimizeDeps: {
|
|
149
|
-
include: [
|
|
157
|
+
include: [
|
|
158
|
+
'pixi.js',
|
|
159
|
+
'@pixi/layout',
|
|
160
|
+
'@pixi/layout/components',
|
|
161
|
+
'@pixi/ui',
|
|
162
|
+
'yoga-layout/load',
|
|
163
|
+
],
|
|
164
|
+
exclude: [
|
|
165
|
+
'yoga-layout',
|
|
166
|
+
],
|
|
167
|
+
esbuildOptions: {
|
|
168
|
+
target: 'esnext',
|
|
169
|
+
},
|
|
150
170
|
...userVite.optimizeDeps,
|
|
151
171
|
},
|
|
152
172
|
};
|