@combos-fun/engine 0.0.46 → 0.0.48
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/agent-skill.md +1 -1
- package/dist/engine.cjs.js +1 -1
- package/dist/engine.cjs.js.map +1 -1
- package/dist/engine.cjs.prod.js +1 -1
- package/dist/engine.d.ts +1 -1
- package/dist/engine.esm.js +1 -1
- package/dist/engine.esm.js.map +1 -1
- package/package.json +2 -2
- package/plugin-authoring.md +4 -0
- package/references/public-api.md +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@combos-fun/engine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.48",
|
|
4
4
|
"description": "ECS microkernel",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/engine.esm.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"lodash-es": "^4.17.21",
|
|
46
46
|
"resource-loader": "^4.0.0-rc4",
|
|
47
47
|
"sprite-timeline": "^1.10.2",
|
|
48
|
-
"@combos-fun/inspector-decorator": "0.0.
|
|
48
|
+
"@combos-fun/inspector-decorator": "0.0.48"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"tsx": "^4.20.3"
|
package/plugin-authoring.md
CHANGED
|
@@ -150,6 +150,10 @@ class MyRenderer3D extends Renderer3D {
|
|
|
150
150
|
|
|
151
151
|
**Async loading pattern** (3D only): use the inherited `increaseAsyncId(id)` before async work and `validateAsyncId(id, asyncId)` after each `await` to cancel stale operations when the component is removed mid-load.
|
|
152
152
|
|
|
153
|
+
## Host `postMessage` type names
|
|
154
|
+
|
|
155
|
+
Only `@combos-fun/engine` may invent `combos-game:*` types (`plugin-init-success`, `ready`, `set-playing`, `state-changed`). Every other plugin’s iframe / parent / `window` / `game.emit` host command uses the `combos-development-tool:` prefix — including features implemented outside `plugin-development-tool` (for example mute in `plugin-sound`). Do not add `combos-sound:*`, `combos-<plugin>:*`, or a new prefix.
|
|
156
|
+
|
|
153
157
|
## `combos-plugin.json` (manifest)
|
|
154
158
|
|
|
155
159
|
Validate against `schemas/combos-plugin.schema.json`. Required fields: `name`, `pluginId`, `category`, `dimension`, `agentSkill`. For non-core packages, `category` ∈ {`rendering`, `physics`, `audio`, `input`, `ui`, `a11y`, `animation`, `devtool`, `other`} and `dimension` ∈ {`2d`, `3d`, `shared`}.
|
package/references/public-api.md
CHANGED
|
@@ -61,7 +61,7 @@ Core `Game` speaks a `postMessage` protocol with the embedding page so a host AP
|
|
|
61
61
|
|
|
62
62
|
Recommended flow: create the game with `autoStart:false`, wait for `combos-game:ready`, keep the game held at frame 0 (host shows a cover/loading overlay), then post `{ type: 'combos-game:set-playing', playing: true }` when the user taps play. `game.setPlaying(playing)` is the programmatic equivalent. Helpers: `postParentGameReady`, `postParentGameState`, `parseSetPlayingMessage`.
|
|
63
63
|
|
|
64
|
-
>
|
|
64
|
+
> Host type prefix: **only** this engine package uses `combos-game:*`. Every plugin host message (mute, pick, scene edit, …) uses `combos-development-tool:*`, even when the handler lives in another plugin such as `@combos-fun/plugin-sound`. Play/pause stays here; mute is `plugin-sound` listening to `combos-development-tool:set-muted` / posting `combos-development-tool:state-changed`.
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
### `Game` methods
|