@combos-fun/plugin-development-tool 0.0.6 → 0.0.8
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 +27 -0
- package/agent-skill.md +55 -0
- package/combos-plugin.json +21 -0
- package/package.json +19 -5
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# @combos-fun/plugin-development-tool
|
|
2
|
+
|
|
3
|
+
Scene / tagged object tap development tool: outline overlay and parent postMessage
|
|
4
|
+
|
|
5
|
+
Keywords: `devtool`, `inspector`, `selection`, `outline`, `editor`, `debug`.
|
|
6
|
+
|
|
7
|
+
## Documentation
|
|
8
|
+
|
|
9
|
+
- Per-package agent / developer notes: [`agent-skill.md`](./agent-skill.md)
|
|
10
|
+
- Machine-readable manifest: [`combos-plugin.json`](./combos-plugin.json)
|
|
11
|
+
(validated against `schemas/combos-plugin.schema.json` in the repo
|
|
12
|
+
root)
|
|
13
|
+
- Entry skill (single source of truth for AI agents working with this
|
|
14
|
+
monorepo): `skills/combos-engine-development/SKILL.md`
|
|
15
|
+
|
|
16
|
+
When consumed from npm, the manifest and agent notes are exposed as
|
|
17
|
+
stable subpaths:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import manifest from '@combos-fun/plugin-development-tool/plugin-manifest';
|
|
21
|
+
// or fetch the markdown directly:
|
|
22
|
+
// require.resolve('@combos-fun/plugin-development-tool/agent-skill')
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## License
|
|
26
|
+
|
|
27
|
+
Internal workspace package, part of the Combos Fun engine monorepo.
|
package/agent-skill.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# `@combos-fun/plugin-development-tool` — Agent notes
|
|
2
|
+
|
|
3
|
+
In-canvas debugging / inspection plugin. Adds a `CombosDevelopmentToolTarget` Component that, when tapped, draws an outline overlay around the GameObject and posts a parent-frame message identifying the selected node. Used by the Combos Fun editor / inspector to wire up two-way selection between the editor tree and the running game.
|
|
4
|
+
|
|
5
|
+
## When to read
|
|
6
|
+
|
|
7
|
+
Read whenever building tooling, integrating with the Combos editor, or debugging which GameObject is being tapped at runtime.
|
|
8
|
+
|
|
9
|
+
## Public API
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import {
|
|
13
|
+
CombosDevelopmentToolSystem,
|
|
14
|
+
CombosDevelopmentToolTarget,
|
|
15
|
+
COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,
|
|
16
|
+
COMBOS_DEVELOPMENT_TOOL_REFRESH,
|
|
17
|
+
COMBOS_DEVELOPMENT_TOOL_SET,
|
|
18
|
+
type CombosDevelopmentToolTargetParams,
|
|
19
|
+
type CombosDevelopmentToolSystemParams,
|
|
20
|
+
type CombosDevelopmentToolSelectScope,
|
|
21
|
+
} from '@combos-fun/plugin-development-tool';
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
- `CombosDevelopmentToolTarget` — Component to attach to any GameObject
|
|
25
|
+
that should be selectable in editor mode.
|
|
26
|
+
- `CombosDevelopmentToolSystem` — System that listens to taps, draws the
|
|
27
|
+
outline, and posts `COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED`
|
|
28
|
+
messages to the parent window.
|
|
29
|
+
|
|
30
|
+
## Required setup
|
|
31
|
+
|
|
32
|
+
This plugin depends on `@combos-fun/plugin-renderer-event` (for taps) and `@combos-fun/plugin-renderer-graphics` (for the outline). Register all of them after `RendererSystem`:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
new Game({
|
|
36
|
+
systems: [
|
|
37
|
+
new RendererSystem({ canvas, width, height }),
|
|
38
|
+
new EventSystem(),
|
|
39
|
+
new GraphicsSystem(),
|
|
40
|
+
new CombosDevelopmentToolSystem({ /* options */ }),
|
|
41
|
+
],
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Common pitfalls
|
|
46
|
+
|
|
47
|
+
| Symptom | Fix |
|
|
48
|
+
|---------|-----|
|
|
49
|
+
| Selection box never appears | Ensure both `EventSystem` and `GraphicsSystem` are registered |
|
|
50
|
+
| Parent frame never receives messages | The page must be in an iframe / embedded context; `window.parent !== window` |
|
|
51
|
+
| Selection stuck on stale node | Listen for `COMBOS_DEVELOPMENT_TOOL_REFRESH` to clear |
|
|
52
|
+
|
|
53
|
+
## Verification
|
|
54
|
+
|
|
55
|
+
`pnpm --filter @combos-fun/plugin-development-tool run build`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@combos-fun/plugin-development-tool",
|
|
3
|
+
"pluginId": "development-tool",
|
|
4
|
+
"category": "devtool",
|
|
5
|
+
"dimension": "2d",
|
|
6
|
+
"isCore": false,
|
|
7
|
+
"keywords": ["devtool", "inspector", "selection", "outline", "editor", "debug"],
|
|
8
|
+
"agentSkill": "./agent-skill.md",
|
|
9
|
+
"requires": [
|
|
10
|
+
"@combos-fun/engine",
|
|
11
|
+
"@combos-fun/plugin-renderer-event",
|
|
12
|
+
"@combos-fun/plugin-renderer-graphics"
|
|
13
|
+
],
|
|
14
|
+
"exports": [
|
|
15
|
+
"CombosDevelopmentToolSystem",
|
|
16
|
+
"CombosDevelopmentToolTarget",
|
|
17
|
+
"COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED",
|
|
18
|
+
"COMBOS_DEVELOPMENT_TOOL_REFRESH",
|
|
19
|
+
"COMBOS_DEVELOPMENT_TOOL_SET"
|
|
20
|
+
]
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@combos-fun/plugin-development-tool",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Scene / tagged object tap development tool: outline overlay and parent postMessage",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-development-tool.esm.js",
|
|
@@ -8,8 +8,22 @@
|
|
|
8
8
|
"unpkg": "dist/CombosFun.plugin.developmentTool.min.js",
|
|
9
9
|
"files": [
|
|
10
10
|
"index.js",
|
|
11
|
-
"dist"
|
|
11
|
+
"dist",
|
|
12
|
+
"agent-skill.md",
|
|
13
|
+
"combos-plugin.json"
|
|
12
14
|
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./dist/plugin-development-tool.esm.js",
|
|
18
|
+
"require": "./index.js",
|
|
19
|
+
"types": "./dist/plugin-development-tool.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./plugin-manifest": "./combos-plugin.json",
|
|
22
|
+
"./agent-skill": "./agent-skill.md"
|
|
23
|
+
},
|
|
24
|
+
"combos": {
|
|
25
|
+
"pluginManifest": "./combos-plugin.json"
|
|
26
|
+
},
|
|
13
27
|
"types": "dist/plugin-development-tool.d.ts",
|
|
14
28
|
"keywords": [
|
|
15
29
|
"combos-fun",
|
|
@@ -18,9 +32,9 @@
|
|
|
18
32
|
],
|
|
19
33
|
"author": "sun668 <q947692259@gmail.com>",
|
|
20
34
|
"dependencies": {
|
|
21
|
-
"@combos-fun/
|
|
22
|
-
"@combos-fun/
|
|
23
|
-
"@combos-fun/plugin-renderer-graphics": "0.0.
|
|
35
|
+
"@combos-fun/plugin-renderer-event": "0.0.8",
|
|
36
|
+
"@combos-fun/engine": "0.0.8",
|
|
37
|
+
"@combos-fun/plugin-renderer-graphics": "0.0.8"
|
|
24
38
|
},
|
|
25
39
|
"scripts": {
|
|
26
40
|
"build": "node ../../scripts/build-package.mjs"
|