@energy8platform/game-engine 0.24.0 → 0.26.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/devtools.cjs.js +593 -0
- package/dist/devtools.cjs.js.map +1 -0
- package/dist/devtools.d.ts +430 -0
- package/dist/devtools.esm.js +580 -0
- package/dist/devtools.esm.js.map +1 -0
- package/dist/harness.cjs.js +34 -0
- package/dist/harness.cjs.js.map +1 -0
- package/dist/harness.d.ts +34 -0
- package/dist/harness.esm.js +31 -0
- package/dist/harness.esm.js.map +1 -0
- package/dist/reel-panel-client.cjs.js +622 -0
- package/dist/reel-panel-client.cjs.js.map +1 -0
- package/dist/reel-panel-client.d.ts +5 -0
- package/dist/reel-panel-client.esm.js +620 -0
- package/dist/reel-panel-client.esm.js.map +1 -0
- package/package.json +16 -1
- package/src/harness/index.ts +43 -0
- package/src/slot/devtools/configDiff.ts +41 -0
- package/src/slot/devtools/controlPanel.ts +151 -0
- package/src/slot/devtools/fieldSchema.ts +211 -0
- package/src/slot/devtools/index.ts +31 -0
- package/src/slot/devtools/panelClient.ts +126 -0
- package/src/slot/devtools/protocol.ts +29 -0
- package/src/slot/devtools/reelDevBridge.ts +80 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { HarnessPlugin } from '@energy8platform/harness';
|
|
2
|
+
|
|
3
|
+
/** Stable section identifiers — used to toggle whole sections on/off from the plugin. */
|
|
4
|
+
type SectionKey = 'geometry' | 'motion' | 'anticipation' | 'cascade' | 'win' | 'features';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* `@energy8platform/game-engine/harness` — node-only entry.
|
|
8
|
+
*
|
|
9
|
+
* Contributes the reel-config **panel** to `@energy8platform/harness`: a docked
|
|
10
|
+
* right sidebar that tunes a running game's ReelSystem live. Pair it with
|
|
11
|
+
* `mountReelDevBridge` (from `@energy8platform/game-engine/devtools`) in the game.
|
|
12
|
+
*
|
|
13
|
+
* Usage in a game's vite.config:
|
|
14
|
+
* import { createHarness } from '@energy8platform/harness';
|
|
15
|
+
* import { reelDevtoolsPlugin } from '@energy8platform/game-engine/harness';
|
|
16
|
+
* createHarness({ plugins: [ reelDevtoolsPlugin({ sections: { geometry: false } }) ] });
|
|
17
|
+
*
|
|
18
|
+
* Node-only: resolves the built, self-contained panel-client ESM the harness serves.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
interface ReelDevtoolsPluginOptions {
|
|
22
|
+
/** Sidebar header / tab label. Default 'Reels'. */
|
|
23
|
+
title?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Toggle whole sections of the reel panel. A missing key is shown; set a key to
|
|
26
|
+
* `false` to hide (and lock) that section — e.g. `{ geometry: false }` to disable
|
|
27
|
+
* live geometry editing. Sections: geometry · motion · anticipation · cascade · win · features.
|
|
28
|
+
*/
|
|
29
|
+
sections?: Partial<Record<SectionKey, boolean>>;
|
|
30
|
+
}
|
|
31
|
+
declare function reelDevtoolsPlugin(opts?: ReelDevtoolsPluginOptions): HarnessPlugin;
|
|
32
|
+
|
|
33
|
+
export { reelDevtoolsPlugin };
|
|
34
|
+
export type { ReelDevtoolsPluginOptions };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `@energy8platform/game-engine/harness` — node-only entry.
|
|
5
|
+
*
|
|
6
|
+
* Contributes the reel-config **panel** to `@energy8platform/harness`: a docked
|
|
7
|
+
* right sidebar that tunes a running game's ReelSystem live. Pair it with
|
|
8
|
+
* `mountReelDevBridge` (from `@energy8platform/game-engine/devtools`) in the game.
|
|
9
|
+
*
|
|
10
|
+
* Usage in a game's vite.config:
|
|
11
|
+
* import { createHarness } from '@energy8platform/harness';
|
|
12
|
+
* import { reelDevtoolsPlugin } from '@energy8platform/game-engine/harness';
|
|
13
|
+
* createHarness({ plugins: [ reelDevtoolsPlugin({ sections: { geometry: false } }) ] });
|
|
14
|
+
*
|
|
15
|
+
* Node-only: resolves the built, self-contained panel-client ESM the harness serves.
|
|
16
|
+
*/
|
|
17
|
+
function reelDevtoolsPlugin(opts = {}) {
|
|
18
|
+
// The self-contained panel client sits next to this module in dist/.
|
|
19
|
+
const clientEntry = fileURLToPath(new URL('./reel-panel-client.esm.js', import.meta.url));
|
|
20
|
+
const panel = {
|
|
21
|
+
id: 'reels',
|
|
22
|
+
title: opts.title ?? 'Reels',
|
|
23
|
+
placement: 'sidebar',
|
|
24
|
+
clientEntry,
|
|
25
|
+
config: opts.sections ? { sections: opts.sections } : undefined,
|
|
26
|
+
};
|
|
27
|
+
return { panel };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { reelDevtoolsPlugin };
|
|
31
|
+
//# sourceMappingURL=harness.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness.esm.js","sources":["../src/harness/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;AAaG;AAkBG,SAAU,kBAAkB,CAAC,IAAA,GAAkC,EAAE,EAAA;;AAErE,IAAA,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,4BAA4B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzF,IAAA,MAAM,KAAK,GAAiB;AAC1B,QAAA,EAAE,EAAE,OAAO;AACX,QAAA,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO;AAC5B,QAAA,SAAS,EAAE,SAAS;QACpB,WAAW;AACX,QAAA,MAAM,EAAE,IAAI,CAAC,QAAQ,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,SAAS;KAChE;IACD,OAAO,EAAE,KAAK,EAAE;AAClB;;;;"}
|