@combos-fun/plugin-development-tool 0.1.1 → 0.1.2

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 CHANGED
@@ -4,8 +4,6 @@ Scene / tagged object tap development tool: canvas overlay (2D + 3D) and parent
4
4
 
5
5
  Keywords: `devtool`, `inspector`, `selection`, `outline`, `editor`, `debug`.
6
6
 
7
- Game `GameObject` nodes are tagged at build time by the repo-local `vite-plugin-development-target` Vite plugin (not on npm). Add that plugin to the **game** Vite config.
8
-
9
7
  ## Documentation
10
8
 
11
9
  - Per-package agent / developer notes: [`agent-skill.md`](./agent-skill.md)
package/agent-skill.md CHANGED
@@ -2,16 +2,14 @@
2
2
 
3
3
  **Shared editor iframe picker** (2D and 3D). Outline, markers, and pick hit-testing are drawn on a transparent HTML canvas overlay with the Canvas 2D API. It does **not** depend on `plugin-renderer`, `plugin-renderer-event`, `plugin-renderer-graphics`, or any `plugin-renderer-3d*` package.
4
4
 
5
- Game authors do **not** mount Targets or write `payload.source`. `@combos-fun/vite-plugin-development-target` rewrites `new GameObject(...)`.
5
+ Game authors do **not** mount Targets, call `attachDevelopmentTarget`, or write `payload.source`.
6
6
 
7
7
  ## When to read
8
8
 
9
- Read when integrating the Combos editor iframe, pick mode, Scene Edit messages, marker overlays, or the host Vite plugin.
9
+ Read when integrating the Combos editor iframe, pick mode, Scene Edit messages, or marker overlays.
10
10
 
11
11
  ## Public API
12
12
 
13
- `attachDevelopmentTarget(go, { file, anchor })` is the runtime helper the Vite plugin inserts. It is idempotent.
14
-
15
13
  `CombosDevelopmentToolSystem` accepts:
16
14
 
17
15
  - `postMessageOrigin`: outbound parent `targetOrigin`, default `'*'`.
@@ -45,18 +43,7 @@ new Game({
45
43
  });
46
44
  ```
47
45
 
48
- In the **game** Vite config (host / Creator), not in game source:
49
-
50
- ```ts
51
- import { defineConfig } from 'vite';
52
- import { combosDevelopmentTargetPlugin } from '@combos-fun/vite-plugin-development-target';
53
-
54
- export default defineConfig({
55
- plugins: [combosDevelopmentTargetPlugin()],
56
- });
57
- ```
58
-
59
- Do not add `CombosDevelopmentToolTarget` from game code. Opt out of a construct with `// combos-no-target`.
46
+ Do not add `CombosDevelopmentToolTarget` from game code.
60
47
 
61
48
  ## Runtime behaviour
62
49
 
@@ -64,7 +51,7 @@ The System starts disabled. In pick mode it shows a full-canvas overlay (`pointe
64
51
 
65
52
  2D bounds come from `Transform2D` size plus `GameObject` hierarchy (position, origin, anchor, scale, rotation). Set `Transform2D.size` when the visual does not match a zero size. 3D bounds project `Transform3D` world position through the active `Renderer3DSystem` camera; a mesh bounding box is used when the Three object is available, otherwise a screen-space pad around the projected point.
66
53
 
67
- The marker overlay is independent of pick mode and mute. It currently draws a 28×28 canvas badge only for `Sound`; the owner still needs a Target for selection and persistence (the Vite plugin attaches that Target).
54
+ The marker overlay is independent of pick mode and mute. It currently draws a 28×28 canvas badge only for `Sound`; the owner still needs a Target for selection and persistence.
68
55
 
69
56
  ## postMessage protocol
70
57
 
@@ -86,7 +73,7 @@ Inbound messages are origin-checked. `allowedMessageOrigins: ['localhost']` adds
86
73
 
87
74
  ## Scene Edit fields
88
75
 
89
- Snapshots expose described schema-backed `fieldDescriptors`, not raw fields. For authoritative `@Field` metadata rules, read `@combos-fun/inspector-decorator`. Persist lookup uses `payload.source.file` + `payload.source.anchor` injected by the Vite plugin.
76
+ Snapshots expose described schema-backed `fieldDescriptors`, not raw fields. For authoritative `@Field` metadata rules, read `@combos-fun/inspector-decorator`. Persist lookup uses `payload.source.file` + `payload.source.anchor`.
90
77
 
91
78
  ## Common pitfalls
92
79
 
@@ -96,10 +83,9 @@ Snapshots expose described schema-backed `fieldDescriptors`, not raw fields. For
96
83
  - A covering overlay is still selected when it is the only hit under the pointer.
97
84
  - Parent messages require an iframe (`window.parent !== window`) and an allowed origin.
98
85
  - Structural replacement needs `refresh`; ordinary Target add/remove does not.
99
- - Persistence fails if the game build did not run `combosDevelopmentTargetPlugin`.
100
86
  - Markers are visual only and do not create a Target.
101
87
  - Creator-managed game code must not call `setEnabled` / `requestSceneRescan` or emit `combos-development-tool:*` control messages.
102
88
 
103
89
  ## Verification
104
90
 
105
- Run `pnpm --filter @combos-fun/plugin-development-tool run test` and `pnpm --filter @combos-fun/plugin-development-tool run build`. The host Vite plugin is the repo-local `vite-plugin-development-target` package (not published to npm).
91
+ Run `pnpm --filter @combos-fun/plugin-development-tool run test` and `pnpm --filter @combos-fun/plugin-development-tool run build`.
@@ -1733,7 +1733,7 @@ var CombosDevelopmentToolSystem = CombosDevelopmentToolSystem$1;
1733
1733
  /** Auto-generated by scripts/build-package.mjs — do not edit. */
1734
1734
  Object.assign(CombosDevelopmentToolSystem, {
1735
1735
  packageName: "@combos-fun/plugin-development-tool",
1736
- packageVersion: "0.1.1",
1736
+ packageVersion: "0.1.2",
1737
1737
  });
1738
1738
 
1739
1739
  function isInternalEditorGo(go) {
@@ -1751,8 +1751,7 @@ function sourceIsComplete(raw) {
1751
1751
  * Marks `go` for editor pick / persist. Idempotent: existing Targets keep a
1752
1752
  * complete `payload.source`; missing identity is filled from `source`.
1753
1753
  *
1754
- * Inserted by `@combos-fun/vite-plugin-development-target`. Game code should
1755
- * not call this by hand.
1754
+ * Host tooling inserts this. Game code should not call this by hand.
1756
1755
  */
1757
1756
  function attachDevelopmentTarget(go, source) {
1758
1757
  if (!go || go.destroyed || isInternalEditorGo(go) || isSceneLike(go)) {