@combos-fun/plugin-development-tool 0.0.15 → 0.0.17
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/plugin-development-tool.cjs.js +42 -23
- package/dist/plugin-development-tool.cjs.js.map +1 -1
- package/dist/plugin-development-tool.cjs.prod.js +1 -1
- package/dist/plugin-development-tool.d.ts +4 -0
- package/dist/plugin-development-tool.esm.js +42 -23
- package/dist/plugin-development-tool.esm.js.map +1 -1
- package/package.json +5 -5
|
@@ -272,6 +272,7 @@ function applyPropertyWithHooks(go, componentName, path, value) {
|
|
|
272
272
|
const OUTLINE_GO_NAME = '__combosDevelopmentToolOutline';
|
|
273
273
|
/**
|
|
274
274
|
* **Defaults:** `scope: 'scene'`, **off** at start (no tap hijack until enabled).
|
|
275
|
+
* While enabled, game `Event` `tap` listeners are removed and restored on disable.
|
|
275
276
|
* Turn on/off via:
|
|
276
277
|
* - `window.dispatchEvent(new CustomEvent(COMBOS_DEVELOPMENT_TOOL_SET, { detail: { enabled: true } }))`
|
|
277
278
|
* - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)
|
|
@@ -289,6 +290,8 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
|
|
|
289
290
|
this.selected = null;
|
|
290
291
|
this.tapHandlers = new Map();
|
|
291
292
|
this.tapOwners = new Map();
|
|
293
|
+
/** Game `tap` listeners removed while enabled; restored on disable. */
|
|
294
|
+
this.savedTapListeners = new Map();
|
|
292
295
|
/** We added `Event` for hit-testing; remove on teardown when disabling / releaseTap. */
|
|
293
296
|
this.injectedEvents = new Set();
|
|
294
297
|
this.needsSceneRescan = false;
|
|
@@ -443,7 +446,7 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
|
|
|
443
446
|
}
|
|
444
447
|
}
|
|
445
448
|
attachSceneTree() {
|
|
446
|
-
this.detachAllTaps();
|
|
449
|
+
this.detachAllTaps(false);
|
|
447
450
|
const list = [];
|
|
448
451
|
for (const tr of this.game.scene.transform.children) {
|
|
449
452
|
this.collectGameObjects(tr.gameObject, list);
|
|
@@ -462,9 +465,9 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
|
|
|
462
465
|
this.collectGameObjects(tr.gameObject, out);
|
|
463
466
|
}
|
|
464
467
|
}
|
|
465
|
-
detachAllTaps() {
|
|
468
|
+
detachAllTaps(restore = true) {
|
|
466
469
|
for (const go of [...this.tapOwners.values()]) {
|
|
467
|
-
this.releaseTap(go);
|
|
470
|
+
this.releaseTap(go, restore);
|
|
468
471
|
}
|
|
469
472
|
}
|
|
470
473
|
ensureTap(go) {
|
|
@@ -475,23 +478,19 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
|
|
|
475
478
|
}
|
|
476
479
|
if (this.tapHandlers.has(go.id))
|
|
477
480
|
return;
|
|
478
|
-
|
|
481
|
+
if (!this.savedTapListeners.has(go.id)) {
|
|
482
|
+
const existing = ev.listeners('tap');
|
|
483
|
+
this.savedTapListeners.set(go.id, [...existing]);
|
|
484
|
+
}
|
|
485
|
+
ev.removeAllListeners('tap');
|
|
486
|
+
const handler = payload => this.onSelect(go, payload);
|
|
479
487
|
this.tapHandlers.set(go.id, handler);
|
|
480
488
|
this.tapOwners.set(go.id, go);
|
|
481
489
|
ev.on('tap', handler);
|
|
482
490
|
}
|
|
483
491
|
createInjectedEvent(go) {
|
|
484
|
-
const
|
|
485
|
-
if (width > 0 && height > 0) {
|
|
486
|
-
return new pluginRendererEvent.Event({
|
|
487
|
-
hitArea: {
|
|
488
|
-
type: pluginRendererEvent.HIT_AREA_TYPE.Rect,
|
|
489
|
-
style: { x: 0, y: 0, width, height },
|
|
490
|
-
},
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
const bounds = this.resolveContainerLocalBounds(go);
|
|
494
|
-
if (bounds) {
|
|
492
|
+
const bounds = this.resolvePickBounds(go);
|
|
493
|
+
if (bounds.width > 0 && bounds.height > 0) {
|
|
495
494
|
return new pluginRendererEvent.Event({
|
|
496
495
|
hitArea: {
|
|
497
496
|
type: pluginRendererEvent.HIT_AREA_TYPE.Rect,
|
|
@@ -508,6 +507,14 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
|
|
|
508
507
|
return new pluginRendererEvent.Event();
|
|
509
508
|
}
|
|
510
509
|
resolvePickBounds(go) {
|
|
510
|
+
// Graphics draws in arbitrary local coordinates (often centered at 0,0).
|
|
511
|
+
// transform.size is a layout box from (0,0) and must not override Pixi bounds.
|
|
512
|
+
if (this.shouldPreferRenderedBounds(go)) {
|
|
513
|
+
const fromGraphics = this.resolveContainerLocalBounds(go);
|
|
514
|
+
if (fromGraphics) {
|
|
515
|
+
return fromGraphics;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
511
518
|
const { width, height } = go.transform.size;
|
|
512
519
|
if (width > 0 && height > 0) {
|
|
513
520
|
return { x: 0, y: 0, width, height };
|
|
@@ -518,6 +525,9 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
|
|
|
518
525
|
}
|
|
519
526
|
return { x: 0, y: 0, width: 1, height: 1 };
|
|
520
527
|
}
|
|
528
|
+
shouldPreferRenderedBounds(go) {
|
|
529
|
+
return go.getComponent(pluginRendererGraphics.Graphics) != null;
|
|
530
|
+
}
|
|
521
531
|
resolveContainerLocalBounds(go) {
|
|
522
532
|
const container = this.getRendererContainer(go);
|
|
523
533
|
if (!container)
|
|
@@ -549,7 +559,7 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
|
|
|
549
559
|
return null;
|
|
550
560
|
}
|
|
551
561
|
}
|
|
552
|
-
releaseTap(go) {
|
|
562
|
+
releaseTap(go, restore = true) {
|
|
553
563
|
const handler = this.tapHandlers.get(go.id);
|
|
554
564
|
if (!handler)
|
|
555
565
|
return;
|
|
@@ -557,14 +567,23 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
|
|
|
557
567
|
ev?.off('tap', handler);
|
|
558
568
|
this.tapHandlers.delete(go.id);
|
|
559
569
|
this.tapOwners.delete(go.id);
|
|
560
|
-
if (
|
|
561
|
-
|
|
562
|
-
|
|
570
|
+
if (restore) {
|
|
571
|
+
const saved = this.savedTapListeners.get(go.id);
|
|
572
|
+
if (saved && saved.length > 0 && ev) {
|
|
573
|
+
for (const fn of saved) {
|
|
574
|
+
ev.on('tap', fn);
|
|
575
|
+
}
|
|
563
576
|
}
|
|
564
|
-
|
|
565
|
-
|
|
577
|
+
this.savedTapListeners.delete(go.id);
|
|
578
|
+
if (this.injectedEvents.has(go.id)) {
|
|
579
|
+
try {
|
|
580
|
+
go.removeComponent(pluginRendererEvent.Event);
|
|
581
|
+
}
|
|
582
|
+
catch {
|
|
583
|
+
/* ignore */
|
|
584
|
+
}
|
|
585
|
+
this.injectedEvents.delete(go.id);
|
|
566
586
|
}
|
|
567
|
-
this.injectedEvents.delete(go.id);
|
|
568
587
|
}
|
|
569
588
|
}
|
|
570
589
|
ensureOutline() {
|
|
@@ -695,7 +714,7 @@ var CombosDevelopmentToolSystem = CombosDevelopmentToolSystem$1;
|
|
|
695
714
|
/** Auto-generated by scripts/build-package.mjs — do not edit. */
|
|
696
715
|
Object.assign(CombosDevelopmentToolSystem, {
|
|
697
716
|
packageName: "@combos-fun/plugin-development-tool",
|
|
698
|
-
packageVersion: "0.0.
|
|
717
|
+
packageVersion: "0.0.17",
|
|
699
718
|
});
|
|
700
719
|
|
|
701
720
|
exports.COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY = COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-development-tool.cjs.js","sources":["../lib/constants.ts","../lib/CombosDevelopmentToolTarget.ts","../lib/sceneEditTypes.ts","../lib/sceneEditSerialize.ts","../lib/sceneEditApplyHooks.ts","../lib/CombosDevelopmentToolSystem.ts","../lib/__combosPackageMeta.gen.ts"],"sourcesContent":["/** Toggle development-tool selection / parent postMessage. Payload: `{ enabled: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET = 'combos-development-tool:set' as const;\n\n/** Re-scan the scene tree (only when `CombosDevelopmentToolSystem` uses `scope: 'scene'`). */\nexport const COMBOS_DEVELOPMENT_TOOL_REFRESH = 'combos-development-tool:refresh' as const;\n\n/** Emitted to `window.parent` when an object is selected while the tool is on. */\nexport const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED =\n 'combos-development-tool:gameobject-selected' as const;\n\n/** Parent → iframe: apply a value to a component field (live preview). */\nexport const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY =\n 'combos-development-tool:apply-property' as const;\n\n/** iframe → parent: game scene bootstrap finished; parent may enable pick mode. */\nexport const COMBOS_DEVELOPMENT_TOOL_READY = 'combos-development-tool:ready' as const;\n","import { Component, ComponentParams } from '@combos-fun/engine';\n\nexport interface CombosDevelopmentToolTargetParams extends ComponentParams {\n /** Extra JSON-serializable fields included in postMessage to parent. */\n payload?: Record<string, unknown>;\n}\n\n/**\n * Optional marker when using `CombosDevelopmentToolSystem` with `scope: 'tagged'`, or to attach\n * extra `payload` on specific objects while using `scope: 'scene'` (serialization reads it if present).\n */\nexport default class CombosDevelopmentToolTarget extends Component<CombosDevelopmentToolTargetParams> {\n static componentName = 'CombosDevelopmentToolTarget';\n\n payload: Record<string, unknown> = {};\n\n init(params?: CombosDevelopmentToolTargetParams) {\n this.payload = params?.payload ? { ...params.payload } : {};\n }\n}\n","/** Optional bootstrap anchor stored on {@link CombosDevelopmentToolTarget}.payload.source */\nexport interface SceneSourceAnchor {\n /** Project-relative path, e.g. `src/index.ts` */\n file: string;\n /** Variable name in bootstrap (`const poster = …`) or stable key; defaults to gameObject name */\n anchor?: string;\n}\n\nexport interface SceneEditPropertyRef {\n gameObjectId: number;\n gameObjectName: string;\n componentName: string;\n path: string[];\n}\n\nexport interface SceneEditComponentSnapshot {\n componentName: string;\n fields: Record<string, unknown>;\n}\n\nexport interface SceneEditGameObjectSnapshot {\n id: number;\n name: string;\n components: SceneEditComponentSnapshot[];\n source?: SceneSourceAnchor;\n}\n\nexport function isSceneSourceAnchor(v: unknown): v is SceneSourceAnchor {\n return (\n !!v &&\n typeof v === 'object' &&\n typeof (v as SceneSourceAnchor).file === 'string'\n );\n}\n","import { Component, GameObject } from '@combos-fun/engine';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport {\n isSceneSourceAnchor,\n type SceneEditComponentSnapshot,\n type SceneEditGameObjectSnapshot,\n type SceneSourceAnchor,\n} from './sceneEditTypes';\n\nconst SKIP_KEYS = new Set([\n 'gameObject',\n 'name',\n 'started',\n '__componentDefaultParams',\n 'destroyed',\n 'inScene',\n 'worldTransform',\n 'children',\n '_parent',\n]);\n\nconst COMPONENT_SKIP_KEYS: Record<string, ReadonlySet<string>> = {\n Physics: new Set([\n 'body',\n 'Body',\n 'PhysicsEngine',\n 'World',\n 'Constraint',\n 'mouseConstraint',\n 'bodyParams',\n ]),\n Event: new Set(['hitArea']),\n};\n\nfunction cloneJsonSafe(value: unknown, depth = 0): unknown {\n if (value === null || value === undefined) return value;\n if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean') {\n return value;\n }\n if (depth > 6) return undefined;\n if (Array.isArray(value)) {\n return value.map(item => cloneJsonSafe(item, depth + 1));\n }\n if (typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value as Record<string, unknown>)) {\n if (typeof v === 'function') continue;\n const cloned = cloneJsonSafe(v, depth + 1);\n if (cloned !== undefined) out[k] = cloned;\n }\n return out;\n }\n return undefined;\n}\n\nfunction serializeComponent(comp: Component): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n const componentSkips = COMPONENT_SKIP_KEYS[comp.name];\n for (const key of Object.keys(comp)) {\n if (SKIP_KEYS.has(key) || key.startsWith('_')) continue;\n if (componentSkips?.has(key)) continue;\n const value = (comp as Record<string, unknown>)[key];\n if (typeof value === 'function') continue;\n const cloned = cloneJsonSafe(value);\n if (cloned !== undefined) out[key] = cloned;\n }\n return out;\n}\n\nexport function readSourceAnchor(go: GameObject): SceneSourceAnchor | undefined {\n const tag = go.getComponent(CombosDevelopmentToolTarget);\n const raw = tag?.payload?.source;\n if (!isSceneSourceAnchor(raw)) return undefined;\n return {\n file: raw.file,\n anchor: raw.anchor ?? go.name,\n };\n}\n\nexport function buildGameObjectSnapshot(go: GameObject): SceneEditGameObjectSnapshot {\n const components: SceneEditComponentSnapshot[] = go.components\n .filter(c => c.name !== 'CombosDevelopmentToolTarget')\n .map(c => ({\n componentName: c.name,\n fields: serializeComponent(c),\n }));\n\n return {\n id: go.id,\n name: go.name,\n components,\n source: readSourceAnchor(go),\n };\n}\n\nexport function applyPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return false;\n\n let target: Record<string, unknown> = comp as unknown as Record<string, unknown>;\n for (let i = 0; i < path.length - 1; i++) {\n const key = path[i];\n if (target[key] === undefined || target[key] === null) {\n target[key] = {};\n }\n target = target[key] as Record<string, unknown>;\n }\n\n target[path[path.length - 1]] = value;\n return true;\n}\n\nexport function readPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n): unknown {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return undefined;\n\n let target: unknown = comp;\n for (const key of path) {\n if (target === null || target === undefined || typeof target !== 'object') {\n return undefined;\n }\n target = (target as Record<string, unknown>)[key];\n }\n return target;\n}\n","import type { Component, GameObject } from '@combos-fun/engine';\nimport { applyPropertyValue } from './sceneEditSerialize';\n\ntype SceneEditApplyHook = (\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n) => boolean;\n\nconst TRANSFORM_VECTOR_KEYS = new Set([\n 'position',\n 'size',\n 'origin',\n 'anchor',\n 'scale',\n 'skew',\n]);\n\ntype PhysicsLike = {\n body?: { position: { x: number; y: number }; angle?: number };\n bodyParams?: { stopRotation?: boolean };\n Body?: { setPosition: (body: unknown, pos: { x: number; y: number }) => void; setAngle?: (body: unknown, angle: number) => void };\n};\n\ntype MoverLike = {\n originX: number;\n originY: number;\n};\n\nfunction asNumber(value: unknown): number | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '') {\n const next = Number(value);\n return Number.isFinite(next) ? next : undefined;\n }\n return undefined;\n}\n\nfunction syncPhysicsBodyFromTransform(go: GameObject): void {\n const physics = go.getComponent('Physics') as PhysicsLike | undefined;\n if (!physics?.body) {\n return;\n }\n\n const { x, y } = go.transform.position;\n if (physics.Body?.setPosition) {\n physics.Body.setPosition(physics.body, { x, y });\n return;\n }\n\n physics.body.position.x = x;\n physics.body.position.y = y;\n}\n\nfunction syncMoverOriginFromTransform(go: GameObject): void {\n const mover = go.getComponent('PlatformerMover') as MoverLike | undefined;\n if (!mover) {\n return;\n }\n mover.originX = go.transform.position.x;\n mover.originY = go.transform.position.y;\n}\n\nfunction applyTransformProperty(\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const transform = go.transform ?? comp;\n const transformRecord = transform as unknown as Record<string, unknown>;\n\n if (path.length === 1 && path[0] === 'rotation') {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n transform.rotation = next;\n return true;\n }\n\n if (path.length === 2 && TRANSFORM_VECTOR_KEYS.has(path[0])) {\n const groupKey = path[0];\n const leafKey = path[1];\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n\n const group = transformRecord[groupKey];\n if (!group || typeof group !== 'object') {\n return false;\n }\n\n (group as Record<string, unknown>)[leafKey] = next;\n\n if (groupKey === 'position') {\n syncPhysicsBodyFromTransform(go);\n syncMoverOriginFromTransform(go);\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction applyTextProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const textComp = comp as Component & { text?: string; style?: Record<string, unknown> };\n\n if (path.length === 1 && path[0] === 'text') {\n textComp.text = String(value ?? '');\n return true;\n }\n\n if (path.length === 2 && path[0] === 'style') {\n const styleKey = path[1];\n const nextStyle = { ...(textComp.style ?? {}), [styleKey]: value };\n textComp.style = nextStyle;\n return true;\n }\n\n return false;\n}\n\nfunction applySoundProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const soundComp = comp as Component & { volume?: number };\n\n if (\n (path.length === 1 && path[0] === 'volume') ||\n (path.length === 2 && path[0] === 'config' && path[1] === 'volume')\n ) {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n soundComp.volume = next;\n return true;\n }\n\n return false;\n}\n\nconst APPLY_HOOKS: Record<string, SceneEditApplyHook> = {\n Transform: applyTransformProperty,\n Text: applyTextProperty,\n Sound: applySoundProperty,\n};\n\nexport function applyPropertyWithHooks(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) {\n return false;\n }\n\n const hook = APPLY_HOOKS[componentName];\n if (hook?.(go, comp, path, value)) {\n return true;\n }\n\n return applyPropertyValue(go, componentName, path, value);\n}\n","import {\n ComponentChanged,\n GameObject,\n OBSERVER_TYPE,\n System,\n UpdateParams,\n decorators,\n} from '@combos-fun/engine';\nimport { RendererSystem } from '@combos-fun/plugin-renderer';\nimport { Graphics } from '@combos-fun/plugin-renderer-graphics';\nimport { Event, HIT_AREA_TYPE } from '@combos-fun/plugin-renderer-event';\nimport {\n COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY,\n COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n COMBOS_DEVELOPMENT_TOOL_REFRESH,\n COMBOS_DEVELOPMENT_TOOL_SET,\n} from './constants';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport { applyPropertyWithHooks } from './sceneEditApplyHooks';\nimport { buildGameObjectSnapshot, readSourceAnchor } from './sceneEditSerialize';\n\nimport type { SceneSourceAnchor } from './sceneEditTypes';\n\ntype TapEventPayload = {\n data?: {\n position?: { x: number; y: number };\n };\n};\n\ntype ApplyPropertyPayload = {\n gameObjectId?: number;\n source?: SceneSourceAnchor;\n componentName?: string;\n path?: string[];\n value?: unknown;\n};\n\nexport type CombosDevelopmentToolSelectScope = 'tagged' | 'scene';\n\nexport interface CombosDevelopmentToolSystemParams {\n /** postMessage `targetOrigin` when notifying parent (default `'*'`). */\n postMessageOrigin?: string;\n /**\n * - `tagged`: only `GameObject`s with {@link CombosDevelopmentToolTarget} participate (optional `payload`).\n * - `scene`: all objects under `game.scene` (except the outline helper) get tap → outline + postMessage; no marker component required (default).\n */\n scope?: CombosDevelopmentToolSelectScope;\n}\n\nconst OUTLINE_GO_NAME = '__combosDevelopmentToolOutline';\n\ntype SetPayload = { enabled?: boolean };\n\ntype PickBounds = { x: number; y: number; width: number; height: number };\n\n/**\n * **Defaults:** `scope: 'scene'`, **off** at start (no tap hijack until enabled).\n * Turn on/off via:\n * - `window.dispatchEvent(new CustomEvent(COMBOS_DEVELOPMENT_TOOL_SET, { detail: { enabled: true } }))`\n * - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)\n * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`\n *\n * With `scope: 'scene'`, while enabled: `game.emit(COMBOS_DEVELOPMENT_TOOL_REFRESH)`, `window` event `combos-development-tool:refresh`, or `postMessage({ type: 'combos-development-tool:refresh' })` to re-bind after adding/removing objects.\n */\n@decorators.componentObserver({\n CombosDevelopmentToolTarget: [],\n})\nexport default class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSystemParams> {\n static systemName = 'CombosDevelopmentToolSystem';\n\n private postMessageOrigin = '*';\n private scope: CombosDevelopmentToolSelectScope = 'scene';\n private enabled = false;\n private outlineGo: GameObject | null = null;\n private selected: GameObject | null = null;\n private readonly tapHandlers = new Map<number, (payload?: TapEventPayload) => void>();\n private readonly tapOwners = new Map<number, GameObject>();\n /** We added `Event` for hit-testing; remove on teardown when disabling / releaseTap. */\n private readonly injectedEvents = new Set<number>();\n private needsSceneRescan = false;\n private needsTaggedRescan = false;\n\n private readonly onWindowSet = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetPayload>).detail;\n if (d && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n }\n };\n\n private readonly onWindowMessage = (e: MessageEvent) => {\n const d = e.data;\n if (!d || typeof d !== 'object') return;\n if (d.type === COMBOS_DEVELOPMENT_TOOL_SET && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_REFRESH) {\n this.requestSceneRescan();\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY) {\n this.handleApplyProperty(d as ApplyPropertyPayload);\n }\n };\n\n private readonly onGameSet = (payload: SetPayload) => {\n if (payload && typeof payload.enabled === 'boolean') {\n this.setEnabled(payload.enabled);\n }\n };\n\n private readonly onGameRefresh = () => {\n this.requestSceneRescan();\n };\n\n private readonly onWindowRefresh = () => {\n this.requestSceneRescan();\n };\n\n init(params?: CombosDevelopmentToolSystemParams) {\n this.postMessageOrigin = params?.postMessageOrigin ?? '*';\n this.scope = params?.scope ?? 'scene';\n\n if (typeof window !== 'undefined') {\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.addEventListener('message', this.onWindowMessage);\n }\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n\n if (this.enabled && this.scope === 'scene') {\n this.needsSceneRescan = true;\n } else if (this.enabled && this.scope === 'tagged') {\n this.needsTaggedRescan = true;\n }\n }\n\n onDestroy() {\n if (typeof window !== 'undefined') {\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.removeEventListener('message', this.onWindowMessage);\n }\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n this.detachAllTaps();\n this.clearSelection();\n }\n\n /** Programmatic toggle (same effect as events). */\n setEnabled(on: boolean) {\n if (this.enabled === on) return;\n this.enabled = on;\n if (!on) {\n this.clearSelection();\n this.detachAllTaps();\n } else if (this.scope === 'scene') {\n this.needsSceneRescan = true;\n } else {\n this.needsTaggedRescan = true;\n }\n }\n\n get isEnabled(): boolean {\n return this.enabled;\n }\n\n update(e: UpdateParams) {\n if (this.enabled && this.needsSceneRescan && this.scope === 'scene') {\n this.needsSceneRescan = false;\n this.attachSceneTree();\n }\n\n if (this.enabled && this.needsTaggedRescan && this.scope === 'tagged') {\n this.needsTaggedRescan = false;\n this.attachTaggedObjects();\n }\n\n for (const go of [...this.tapOwners.values()]) {\n if (go.destroyed) {\n this.releaseTap(go);\n }\n }\n\n if (!this.enabled || !this.selected || !this.outlineGo) return;\n\n const gfxComp = this.outlineGo.getComponent(Graphics);\n if (!gfxComp?.graphics) return;\n\n const bounds = this.resolvePickBounds(this.selected);\n const g = gfxComp.graphics;\n g.clear();\n const t = typeof performance !== 'undefined' ? performance.now() : e.time;\n const pulse = 0.35 + 0.65 * (0.5 + 0.5 * Math.sin(t * 0.012));\n g.rect(bounds.x, bounds.y, bounds.width, bounds.height);\n g.stroke({ width: 4, color: 0x55ffaa, alpha: pulse });\n }\n\n componentChanged(changed: ComponentChanged) {\n if (this.scope === 'scene') return;\n\n const { type, gameObject, componentName } = changed;\n if (!gameObject || componentName !== 'CombosDevelopmentToolTarget') return;\n\n if (type === OBSERVER_TYPE.ADD) {\n this.ensureTap(gameObject);\n } else if (type === OBSERVER_TYPE.REMOVE) {\n this.releaseTap(gameObject);\n if (this.selected === gameObject) {\n this.clearSelection();\n }\n }\n }\n\n /** Re-bind scene taps when `scope === 'scene'` (e.g. after dynamic spawn). */\n requestSceneRescan() {\n if (!this.enabled) return;\n if (this.scope === 'scene') {\n this.needsSceneRescan = true;\n } else {\n this.needsTaggedRescan = true;\n }\n }\n\n private attachTaggedObjects() {\n const list: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, list);\n }\n for (const go of list) {\n if (go.name === OUTLINE_GO_NAME) continue;\n if (go === this.outlineGo) continue;\n if (!go.getComponent(CombosDevelopmentToolTarget)) continue;\n this.ensureTap(go);\n }\n }\n\n private attachSceneTree() {\n this.detachAllTaps();\n const list: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, list);\n }\n for (const go of list) {\n if (go.name === OUTLINE_GO_NAME) continue;\n if (go === this.outlineGo) continue;\n this.ensureTap(go);\n }\n }\n\n private collectGameObjects(go: GameObject, out: GameObject[]) {\n out.push(go);\n for (const tr of go.transform.children) {\n this.collectGameObjects(tr.gameObject, out);\n }\n }\n\n private detachAllTaps() {\n for (const go of [...this.tapOwners.values()]) {\n this.releaseTap(go);\n }\n }\n\n private ensureTap(go: GameObject) {\n let ev = go.getComponent(Event);\n if (!ev) {\n ev = go.addComponent(this.createInjectedEvent(go));\n this.injectedEvents.add(go.id);\n }\n\n if (this.tapHandlers.has(go.id)) return;\n\n const handler = (payload?: TapEventPayload) => this.onSelect(go, payload);\n this.tapHandlers.set(go.id, handler);\n this.tapOwners.set(go.id, go);\n ev.on('tap', handler);\n }\n\n private createInjectedEvent(go: GameObject): Event {\n const { width, height } = go.transform.size;\n if (width > 0 && height > 0) {\n return new Event({\n hitArea: {\n type: HIT_AREA_TYPE.Rect,\n style: { x: 0, y: 0, width, height },\n },\n });\n }\n\n const bounds = this.resolveContainerLocalBounds(go);\n if (bounds) {\n return new Event({\n hitArea: {\n type: HIT_AREA_TYPE.Rect,\n style: {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n },\n },\n });\n }\n\n // Let Pixi use natural rendered bounds instead of forcing a 1×1 hit area.\n return new Event();\n }\n\n private resolvePickBounds(go: GameObject): PickBounds {\n const { width, height } = go.transform.size;\n if (width > 0 && height > 0) {\n return { x: 0, y: 0, width, height };\n }\n\n const fromContainer = this.resolveContainerLocalBounds(go);\n if (fromContainer) {\n return fromContainer;\n }\n\n return { x: 0, y: 0, width: 1, height: 1 };\n }\n\n private resolveContainerLocalBounds(go: GameObject): PickBounds | null {\n const container = this.getRendererContainer(go);\n if (!container) return null;\n\n try {\n const bounds = container.getLocalBounds();\n if (bounds.width > 0 && bounds.height > 0) {\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n }\n } catch {\n /* ignore */\n }\n\n return null;\n }\n\n private getRendererContainer(go: GameObject) {\n const rendererSystem = this.game.getSystem(RendererSystem) as RendererSystem | undefined;\n if (!rendererSystem?.containerManager) return null;\n\n try {\n return rendererSystem.containerManager.getContainer(go.id);\n } catch {\n return null;\n }\n }\n\n private releaseTap(go: GameObject) {\n const handler = this.tapHandlers.get(go.id);\n if (!handler) return;\n const ev = go.getComponent(Event);\n ev?.off('tap', handler);\n this.tapHandlers.delete(go.id);\n this.tapOwners.delete(go.id);\n if (this.injectedEvents.has(go.id)) {\n try {\n go.removeComponent(Event);\n } catch {\n /* ignore */\n }\n this.injectedEvents.delete(go.id);\n }\n }\n\n private ensureOutline() {\n if (this.outlineGo) return;\n const go = new GameObject(OUTLINE_GO_NAME, {\n size: { width: 1, height: 1 },\n position: { x: 0, y: 0 },\n origin: { x: 0, y: 0 },\n });\n go.addComponent(new Graphics());\n this.outlineGo = go;\n }\n\n private onSelect(go: GameObject, tap?: TapEventPayload) {\n if (!this.enabled) return;\n\n this.ensureOutline();\n if (!this.outlineGo) return;\n\n this.selected = go;\n\n if (this.outlineGo.parent) {\n this.outlineGo.remove();\n }\n go.addChild(this.outlineGo);\n\n const snapshot = buildGameObjectSnapshot(go);\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: tap?.data?.position ?? null,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n }\n\n private findGameObjectById(id: number): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n return stack.find(go => go.id === id) ?? null;\n }\n\n private findGameObjectBySource(source: SceneSourceAnchor): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n\n const wantFile = source.file.trim();\n const wantAnchor = (source.anchor ?? '').trim();\n if (!wantAnchor) {\n return null;\n }\n\n for (const go of stack) {\n const anchor = readSourceAnchor(go);\n if (!anchor || anchor.file !== wantFile) {\n continue;\n }\n const resolvedAnchor = anchor.anchor ?? go.name;\n if (resolvedAnchor === wantAnchor) {\n return go;\n }\n }\n\n return null;\n }\n\n private resolveApplyTarget(payload: ApplyPropertyPayload): GameObject | null {\n if (typeof payload.gameObjectId === 'number') {\n const byId = this.findGameObjectById(payload.gameObjectId);\n if (byId) {\n return byId;\n }\n }\n\n const file = payload.source?.file?.trim();\n const anchor = payload.source?.anchor?.trim();\n if (!file || !anchor) {\n return null;\n }\n\n return this.findGameObjectBySource({ file, anchor });\n }\n\n private handleApplyProperty(payload: ApplyPropertyPayload) {\n const componentName = payload.componentName;\n const path = payload.path;\n const hasId = typeof payload.gameObjectId === 'number';\n const hasSource =\n Boolean(payload.source?.file?.trim()) && Boolean(payload.source?.anchor?.trim());\n\n if (\n (!hasId && !hasSource) ||\n typeof componentName !== 'string' ||\n !Array.isArray(path) ||\n path.length === 0\n ) {\n return;\n }\n\n const go = this.resolveApplyTarget(payload);\n if (!go) return;\n\n const applied = applyPropertyWithHooks(go, componentName, path, payload.value);\n if (!applied) return;\n\n if (this.selected?.id === go.id) {\n this.postSnapshotUpdate(go);\n }\n }\n\n private postSnapshotUpdate(go: GameObject) {\n const snapshot = buildGameObjectSnapshot(go);\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(\n {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: null,\n source: 'property-applied',\n },\n this.postMessageOrigin,\n );\n }\n }\n\n private clearSelection() {\n this.selected = null;\n if (this.outlineGo?.parent) {\n this.outlineGo.remove();\n }\n const gfx = this.outlineGo?.getComponent(Graphics);\n if (gfx?.graphics) {\n gfx.graphics.clear();\n }\n }\n}\n","/** Auto-generated by scripts/build-package.mjs — do not edit. */\n\nimport CombosDevelopmentToolSystem from './CombosDevelopmentToolSystem';\n\nObject.assign(CombosDevelopmentToolSystem, {\n packageName: \"@combos-fun/plugin-development-tool\",\n packageVersion: \"0.0.15\",\n});\n"],"names":["Component","CombosDevelopmentToolSystem","System","Graphics","OBSERVER_TYPE","Event","HIT_AREA_TYPE","RendererSystem","GameObject","__decorate","decorators"],"mappings":";;;;;;;;AAAA;AACO,MAAM,2BAA2B,GAAG;AAE3C;AACO,MAAM,+BAA+B,GAAG;AAE/C;AACO,MAAM,2CAA2C,GACtD;AAEF;AACO,MAAM,sCAAsC,GACjD;AAEF;AACO,MAAM,6BAA6B,GAAG;;ACR7C;;;AAGG;AACW,MAAO,2BAA4B,SAAQA,gBAA4C,CAAA;AAArG,IAAA,WAAA,GAAA;;QAGE,IAAA,CAAA,OAAO,GAA4B,EAAE;IAKvC;aAPS,IAAA,CAAA,aAAa,GAAG,6BAAH,CAAiC;AAIrD,IAAA,IAAI,CAAC,MAA0C,EAAA;AAC7C,QAAA,IAAI,CA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;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin-development-tool.cjs.js","sources":["../lib/constants.ts","../lib/CombosDevelopmentToolTarget.ts","../lib/sceneEditTypes.ts","../lib/sceneEditSerialize.ts","../lib/sceneEditApplyHooks.ts","../lib/CombosDevelopmentToolSystem.ts","../lib/__combosPackageMeta.gen.ts"],"sourcesContent":["/** Toggle development-tool selection / parent postMessage. Payload: `{ enabled: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET = 'combos-development-tool:set' as const;\n\n/** Re-scan the scene tree (only when `CombosDevelopmentToolSystem` uses `scope: 'scene'`). */\nexport const COMBOS_DEVELOPMENT_TOOL_REFRESH = 'combos-development-tool:refresh' as const;\n\n/** Emitted to `window.parent` when an object is selected while the tool is on. */\nexport const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED =\n 'combos-development-tool:gameobject-selected' as const;\n\n/** Parent → iframe: apply a value to a component field (live preview). */\nexport const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY =\n 'combos-development-tool:apply-property' as const;\n\n/** iframe → parent: game scene bootstrap finished; parent may enable pick mode. */\nexport const COMBOS_DEVELOPMENT_TOOL_READY = 'combos-development-tool:ready' as const;\n","import { Component, ComponentParams } from '@combos-fun/engine';\n\nexport interface CombosDevelopmentToolTargetParams extends ComponentParams {\n /** Extra JSON-serializable fields included in postMessage to parent. */\n payload?: Record<string, unknown>;\n}\n\n/**\n * Optional marker when using `CombosDevelopmentToolSystem` with `scope: 'tagged'`, or to attach\n * extra `payload` on specific objects while using `scope: 'scene'` (serialization reads it if present).\n */\nexport default class CombosDevelopmentToolTarget extends Component<CombosDevelopmentToolTargetParams> {\n static componentName = 'CombosDevelopmentToolTarget';\n\n payload: Record<string, unknown> = {};\n\n init(params?: CombosDevelopmentToolTargetParams) {\n this.payload = params?.payload ? { ...params.payload } : {};\n }\n}\n","/** Optional bootstrap anchor stored on {@link CombosDevelopmentToolTarget}.payload.source */\nexport interface SceneSourceAnchor {\n /** Project-relative path, e.g. `src/index.ts` */\n file: string;\n /** Variable name in bootstrap (`const poster = …`) or stable key; defaults to gameObject name */\n anchor?: string;\n}\n\nexport interface SceneEditPropertyRef {\n gameObjectId: number;\n gameObjectName: string;\n componentName: string;\n path: string[];\n}\n\nexport interface SceneEditComponentSnapshot {\n componentName: string;\n fields: Record<string, unknown>;\n}\n\nexport interface SceneEditGameObjectSnapshot {\n id: number;\n name: string;\n components: SceneEditComponentSnapshot[];\n source?: SceneSourceAnchor;\n}\n\nexport function isSceneSourceAnchor(v: unknown): v is SceneSourceAnchor {\n return (\n !!v &&\n typeof v === 'object' &&\n typeof (v as SceneSourceAnchor).file === 'string'\n );\n}\n","import { Component, GameObject } from '@combos-fun/engine';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport {\n isSceneSourceAnchor,\n type SceneEditComponentSnapshot,\n type SceneEditGameObjectSnapshot,\n type SceneSourceAnchor,\n} from './sceneEditTypes';\n\nconst SKIP_KEYS = new Set([\n 'gameObject',\n 'name',\n 'started',\n '__componentDefaultParams',\n 'destroyed',\n 'inScene',\n 'worldTransform',\n 'children',\n '_parent',\n]);\n\nconst COMPONENT_SKIP_KEYS: Record<string, ReadonlySet<string>> = {\n Physics: new Set([\n 'body',\n 'Body',\n 'PhysicsEngine',\n 'World',\n 'Constraint',\n 'mouseConstraint',\n 'bodyParams',\n ]),\n Event: new Set(['hitArea']),\n};\n\nfunction cloneJsonSafe(value: unknown, depth = 0): unknown {\n if (value === null || value === undefined) return value;\n if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean') {\n return value;\n }\n if (depth > 6) return undefined;\n if (Array.isArray(value)) {\n return value.map(item => cloneJsonSafe(item, depth + 1));\n }\n if (typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value as Record<string, unknown>)) {\n if (typeof v === 'function') continue;\n const cloned = cloneJsonSafe(v, depth + 1);\n if (cloned !== undefined) out[k] = cloned;\n }\n return out;\n }\n return undefined;\n}\n\nfunction serializeComponent(comp: Component): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n const componentSkips = COMPONENT_SKIP_KEYS[comp.name];\n for (const key of Object.keys(comp)) {\n if (SKIP_KEYS.has(key) || key.startsWith('_')) continue;\n if (componentSkips?.has(key)) continue;\n const value = (comp as Record<string, unknown>)[key];\n if (typeof value === 'function') continue;\n const cloned = cloneJsonSafe(value);\n if (cloned !== undefined) out[key] = cloned;\n }\n return out;\n}\n\nexport function readSourceAnchor(go: GameObject): SceneSourceAnchor | undefined {\n const tag = go.getComponent(CombosDevelopmentToolTarget);\n const raw = tag?.payload?.source;\n if (!isSceneSourceAnchor(raw)) return undefined;\n return {\n file: raw.file,\n anchor: raw.anchor ?? go.name,\n };\n}\n\nexport function buildGameObjectSnapshot(go: GameObject): SceneEditGameObjectSnapshot {\n const components: SceneEditComponentSnapshot[] = go.components\n .filter(c => c.name !== 'CombosDevelopmentToolTarget')\n .map(c => ({\n componentName: c.name,\n fields: serializeComponent(c),\n }));\n\n return {\n id: go.id,\n name: go.name,\n components,\n source: readSourceAnchor(go),\n };\n}\n\nexport function applyPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return false;\n\n let target: Record<string, unknown> = comp as unknown as Record<string, unknown>;\n for (let i = 0; i < path.length - 1; i++) {\n const key = path[i];\n if (target[key] === undefined || target[key] === null) {\n target[key] = {};\n }\n target = target[key] as Record<string, unknown>;\n }\n\n target[path[path.length - 1]] = value;\n return true;\n}\n\nexport function readPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n): unknown {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return undefined;\n\n let target: unknown = comp;\n for (const key of path) {\n if (target === null || target === undefined || typeof target !== 'object') {\n return undefined;\n }\n target = (target as Record<string, unknown>)[key];\n }\n return target;\n}\n","import type { Component, GameObject } from '@combos-fun/engine';\nimport { applyPropertyValue } from './sceneEditSerialize';\n\ntype SceneEditApplyHook = (\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n) => boolean;\n\nconst TRANSFORM_VECTOR_KEYS = new Set([\n 'position',\n 'size',\n 'origin',\n 'anchor',\n 'scale',\n 'skew',\n]);\n\ntype PhysicsLike = {\n body?: { position: { x: number; y: number }; angle?: number };\n bodyParams?: { stopRotation?: boolean };\n Body?: { setPosition: (body: unknown, pos: { x: number; y: number }) => void; setAngle?: (body: unknown, angle: number) => void };\n};\n\ntype MoverLike = {\n originX: number;\n originY: number;\n};\n\nfunction asNumber(value: unknown): number | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '') {\n const next = Number(value);\n return Number.isFinite(next) ? next : undefined;\n }\n return undefined;\n}\n\nfunction syncPhysicsBodyFromTransform(go: GameObject): void {\n const physics = go.getComponent('Physics') as PhysicsLike | undefined;\n if (!physics?.body) {\n return;\n }\n\n const { x, y } = go.transform.position;\n if (physics.Body?.setPosition) {\n physics.Body.setPosition(physics.body, { x, y });\n return;\n }\n\n physics.body.position.x = x;\n physics.body.position.y = y;\n}\n\nfunction syncMoverOriginFromTransform(go: GameObject): void {\n const mover = go.getComponent('PlatformerMover') as MoverLike | undefined;\n if (!mover) {\n return;\n }\n mover.originX = go.transform.position.x;\n mover.originY = go.transform.position.y;\n}\n\nfunction applyTransformProperty(\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const transform = go.transform ?? comp;\n const transformRecord = transform as unknown as Record<string, unknown>;\n\n if (path.length === 1 && path[0] === 'rotation') {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n transform.rotation = next;\n return true;\n }\n\n if (path.length === 2 && TRANSFORM_VECTOR_KEYS.has(path[0])) {\n const groupKey = path[0];\n const leafKey = path[1];\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n\n const group = transformRecord[groupKey];\n if (!group || typeof group !== 'object') {\n return false;\n }\n\n (group as Record<string, unknown>)[leafKey] = next;\n\n if (groupKey === 'position') {\n syncPhysicsBodyFromTransform(go);\n syncMoverOriginFromTransform(go);\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction applyTextProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const textComp = comp as Component & { text?: string; style?: Record<string, unknown> };\n\n if (path.length === 1 && path[0] === 'text') {\n textComp.text = String(value ?? '');\n return true;\n }\n\n if (path.length === 2 && path[0] === 'style') {\n const styleKey = path[1];\n const nextStyle = { ...(textComp.style ?? {}), [styleKey]: value };\n textComp.style = nextStyle;\n return true;\n }\n\n return false;\n}\n\nfunction applySoundProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const soundComp = comp as Component & { volume?: number };\n\n if (\n (path.length === 1 && path[0] === 'volume') ||\n (path.length === 2 && path[0] === 'config' && path[1] === 'volume')\n ) {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n soundComp.volume = next;\n return true;\n }\n\n return false;\n}\n\nconst APPLY_HOOKS: Record<string, SceneEditApplyHook> = {\n Transform: applyTransformProperty,\n Text: applyTextProperty,\n Sound: applySoundProperty,\n};\n\nexport function applyPropertyWithHooks(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) {\n return false;\n }\n\n const hook = APPLY_HOOKS[componentName];\n if (hook?.(go, comp, path, value)) {\n return true;\n }\n\n return applyPropertyValue(go, componentName, path, value);\n}\n","import {\n ComponentChanged,\n GameObject,\n OBSERVER_TYPE,\n System,\n UpdateParams,\n decorators,\n} from '@combos-fun/engine';\nimport { RendererSystem } from '@combos-fun/plugin-renderer';\nimport { Graphics } from '@combos-fun/plugin-renderer-graphics';\nimport { Event, HIT_AREA_TYPE } from '@combos-fun/plugin-renderer-event';\nimport {\n COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY,\n COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n COMBOS_DEVELOPMENT_TOOL_REFRESH,\n COMBOS_DEVELOPMENT_TOOL_SET,\n} from './constants';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport { applyPropertyWithHooks } from './sceneEditApplyHooks';\nimport { buildGameObjectSnapshot, readSourceAnchor } from './sceneEditSerialize';\n\nimport type { SceneSourceAnchor } from './sceneEditTypes';\n\ntype TapEventPayload = {\n data?: {\n position?: { x: number; y: number };\n };\n};\n\ntype TapListener = (payload?: TapEventPayload) => void;\n\ntype ApplyPropertyPayload = {\n gameObjectId?: number;\n source?: SceneSourceAnchor;\n componentName?: string;\n path?: string[];\n value?: unknown;\n};\n\nexport type CombosDevelopmentToolSelectScope = 'tagged' | 'scene';\n\nexport interface CombosDevelopmentToolSystemParams {\n /** postMessage `targetOrigin` when notifying parent (default `'*'`). */\n postMessageOrigin?: string;\n /**\n * - `tagged`: only `GameObject`s with {@link CombosDevelopmentToolTarget} participate (optional `payload`).\n * - `scene`: all objects under `game.scene` (except the outline helper) get tap → outline + postMessage; no marker component required (default).\n */\n scope?: CombosDevelopmentToolSelectScope;\n}\n\nconst OUTLINE_GO_NAME = '__combosDevelopmentToolOutline';\n\ntype SetPayload = { enabled?: boolean };\n\ntype PickBounds = { x: number; y: number; width: number; height: number };\n\n/**\n * **Defaults:** `scope: 'scene'`, **off** at start (no tap hijack until enabled).\n * While enabled, game `Event` `tap` listeners are removed and restored on disable.\n * Turn on/off via:\n * - `window.dispatchEvent(new CustomEvent(COMBOS_DEVELOPMENT_TOOL_SET, { detail: { enabled: true } }))`\n * - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)\n * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`\n *\n * With `scope: 'scene'`, while enabled: `game.emit(COMBOS_DEVELOPMENT_TOOL_REFRESH)`, `window` event `combos-development-tool:refresh`, or `postMessage({ type: 'combos-development-tool:refresh' })` to re-bind after adding/removing objects.\n */\n@decorators.componentObserver({\n CombosDevelopmentToolTarget: [],\n})\nexport default class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSystemParams> {\n static systemName = 'CombosDevelopmentToolSystem';\n\n private postMessageOrigin = '*';\n private scope: CombosDevelopmentToolSelectScope = 'scene';\n private enabled = false;\n private outlineGo: GameObject | null = null;\n private selected: GameObject | null = null;\n private readonly tapHandlers = new Map<number, TapListener>();\n private readonly tapOwners = new Map<number, GameObject>();\n /** Game `tap` listeners removed while enabled; restored on disable. */\n private readonly savedTapListeners = new Map<number, TapListener[]>();\n /** We added `Event` for hit-testing; remove on teardown when disabling / releaseTap. */\n private readonly injectedEvents = new Set<number>();\n private needsSceneRescan = false;\n private needsTaggedRescan = false;\n\n private readonly onWindowSet = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetPayload>).detail;\n if (d && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n }\n };\n\n private readonly onWindowMessage = (e: MessageEvent) => {\n const d = e.data;\n if (!d || typeof d !== 'object') return;\n if (d.type === COMBOS_DEVELOPMENT_TOOL_SET && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_REFRESH) {\n this.requestSceneRescan();\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY) {\n this.handleApplyProperty(d as ApplyPropertyPayload);\n }\n };\n\n private readonly onGameSet = (payload: SetPayload) => {\n if (payload && typeof payload.enabled === 'boolean') {\n this.setEnabled(payload.enabled);\n }\n };\n\n private readonly onGameRefresh = () => {\n this.requestSceneRescan();\n };\n\n private readonly onWindowRefresh = () => {\n this.requestSceneRescan();\n };\n\n init(params?: CombosDevelopmentToolSystemParams) {\n this.postMessageOrigin = params?.postMessageOrigin ?? '*';\n this.scope = params?.scope ?? 'scene';\n\n if (typeof window !== 'undefined') {\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.addEventListener('message', this.onWindowMessage);\n }\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n\n if (this.enabled && this.scope === 'scene') {\n this.needsSceneRescan = true;\n } else if (this.enabled && this.scope === 'tagged') {\n this.needsTaggedRescan = true;\n }\n }\n\n onDestroy() {\n if (typeof window !== 'undefined') {\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.removeEventListener('message', this.onWindowMessage);\n }\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n this.detachAllTaps();\n this.clearSelection();\n }\n\n /** Programmatic toggle (same effect as events). */\n setEnabled(on: boolean) {\n if (this.enabled === on) return;\n this.enabled = on;\n if (!on) {\n this.clearSelection();\n this.detachAllTaps();\n } else if (this.scope === 'scene') {\n this.needsSceneRescan = true;\n } else {\n this.needsTaggedRescan = true;\n }\n }\n\n get isEnabled(): boolean {\n return this.enabled;\n }\n\n update(e: UpdateParams) {\n if (this.enabled && this.needsSceneRescan && this.scope === 'scene') {\n this.needsSceneRescan = false;\n this.attachSceneTree();\n }\n\n if (this.enabled && this.needsTaggedRescan && this.scope === 'tagged') {\n this.needsTaggedRescan = false;\n this.attachTaggedObjects();\n }\n\n for (const go of [...this.tapOwners.values()]) {\n if (go.destroyed) {\n this.releaseTap(go);\n }\n }\n\n if (!this.enabled || !this.selected || !this.outlineGo) return;\n\n const gfxComp = this.outlineGo.getComponent(Graphics);\n if (!gfxComp?.graphics) return;\n\n const bounds = this.resolvePickBounds(this.selected);\n const g = gfxComp.graphics;\n g.clear();\n const t = typeof performance !== 'undefined' ? performance.now() : e.time;\n const pulse = 0.35 + 0.65 * (0.5 + 0.5 * Math.sin(t * 0.012));\n g.rect(bounds.x, bounds.y, bounds.width, bounds.height);\n g.stroke({ width: 4, color: 0x55ffaa, alpha: pulse });\n }\n\n componentChanged(changed: ComponentChanged) {\n if (this.scope === 'scene') return;\n\n const { type, gameObject, componentName } = changed;\n if (!gameObject || componentName !== 'CombosDevelopmentToolTarget') return;\n\n if (type === OBSERVER_TYPE.ADD) {\n this.ensureTap(gameObject);\n } else if (type === OBSERVER_TYPE.REMOVE) {\n this.releaseTap(gameObject);\n if (this.selected === gameObject) {\n this.clearSelection();\n }\n }\n }\n\n /** Re-bind scene taps when `scope === 'scene'` (e.g. after dynamic spawn). */\n requestSceneRescan() {\n if (!this.enabled) return;\n if (this.scope === 'scene') {\n this.needsSceneRescan = true;\n } else {\n this.needsTaggedRescan = true;\n }\n }\n\n private attachTaggedObjects() {\n const list: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, list);\n }\n for (const go of list) {\n if (go.name === OUTLINE_GO_NAME) continue;\n if (go === this.outlineGo) continue;\n if (!go.getComponent(CombosDevelopmentToolTarget)) continue;\n this.ensureTap(go);\n }\n }\n\n private attachSceneTree() {\n this.detachAllTaps(false);\n const list: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, list);\n }\n for (const go of list) {\n if (go.name === OUTLINE_GO_NAME) continue;\n if (go === this.outlineGo) continue;\n this.ensureTap(go);\n }\n }\n\n private collectGameObjects(go: GameObject, out: GameObject[]) {\n out.push(go);\n for (const tr of go.transform.children) {\n this.collectGameObjects(tr.gameObject, out);\n }\n }\n\n private detachAllTaps(restore = true) {\n for (const go of [...this.tapOwners.values()]) {\n this.releaseTap(go, restore);\n }\n }\n\n private ensureTap(go: GameObject) {\n let ev = go.getComponent(Event);\n if (!ev) {\n ev = go.addComponent(this.createInjectedEvent(go));\n this.injectedEvents.add(go.id);\n }\n\n if (this.tapHandlers.has(go.id)) return;\n\n if (!this.savedTapListeners.has(go.id)) {\n const existing = ev.listeners('tap') as TapListener[];\n this.savedTapListeners.set(go.id, [...existing]);\n }\n\n ev.removeAllListeners('tap');\n\n const handler: TapListener = payload => this.onSelect(go, payload);\n this.tapHandlers.set(go.id, handler);\n this.tapOwners.set(go.id, go);\n ev.on('tap', handler);\n }\n\n private createInjectedEvent(go: GameObject): Event {\n const bounds = this.resolvePickBounds(go);\n if (bounds.width > 0 && bounds.height > 0) {\n return new Event({\n hitArea: {\n type: HIT_AREA_TYPE.Rect,\n style: {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n },\n },\n });\n }\n\n // Let Pixi use natural rendered bounds instead of forcing a 1×1 hit area.\n return new Event();\n }\n\n private resolvePickBounds(go: GameObject): PickBounds {\n // Graphics draws in arbitrary local coordinates (often centered at 0,0).\n // transform.size is a layout box from (0,0) and must not override Pixi bounds.\n if (this.shouldPreferRenderedBounds(go)) {\n const fromGraphics = this.resolveContainerLocalBounds(go);\n if (fromGraphics) {\n return fromGraphics;\n }\n }\n\n const { width, height } = go.transform.size;\n if (width > 0 && height > 0) {\n return { x: 0, y: 0, width, height };\n }\n\n const fromContainer = this.resolveContainerLocalBounds(go);\n if (fromContainer) {\n return fromContainer;\n }\n\n return { x: 0, y: 0, width: 1, height: 1 };\n }\n\n private shouldPreferRenderedBounds(go: GameObject): boolean {\n return go.getComponent(Graphics) != null;\n }\n\n private resolveContainerLocalBounds(go: GameObject): PickBounds | null {\n const container = this.getRendererContainer(go);\n if (!container) return null;\n\n try {\n const bounds = container.getLocalBounds();\n if (bounds.width > 0 && bounds.height > 0) {\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n }\n } catch {\n /* ignore */\n }\n\n return null;\n }\n\n private getRendererContainer(go: GameObject) {\n const rendererSystem = this.game.getSystem(RendererSystem) as RendererSystem | undefined;\n if (!rendererSystem?.containerManager) return null;\n\n try {\n return rendererSystem.containerManager.getContainer(go.id);\n } catch {\n return null;\n }\n }\n\n private releaseTap(go: GameObject, restore = true) {\n const handler = this.tapHandlers.get(go.id);\n if (!handler) return;\n\n const ev = go.getComponent(Event);\n ev?.off('tap', handler);\n this.tapHandlers.delete(go.id);\n this.tapOwners.delete(go.id);\n\n if (restore) {\n const saved = this.savedTapListeners.get(go.id);\n if (saved && saved.length > 0 && ev) {\n for (const fn of saved) {\n ev.on('tap', fn);\n }\n }\n this.savedTapListeners.delete(go.id);\n\n if (this.injectedEvents.has(go.id)) {\n try {\n go.removeComponent(Event);\n } catch {\n /* ignore */\n }\n this.injectedEvents.delete(go.id);\n }\n }\n }\n\n private ensureOutline() {\n if (this.outlineGo) return;\n const go = new GameObject(OUTLINE_GO_NAME, {\n size: { width: 1, height: 1 },\n position: { x: 0, y: 0 },\n origin: { x: 0, y: 0 },\n });\n go.addComponent(new Graphics());\n this.outlineGo = go;\n }\n\n private onSelect(go: GameObject, tap?: TapEventPayload) {\n if (!this.enabled) return;\n\n this.ensureOutline();\n if (!this.outlineGo) return;\n\n this.selected = go;\n\n if (this.outlineGo.parent) {\n this.outlineGo.remove();\n }\n go.addChild(this.outlineGo);\n\n const snapshot = buildGameObjectSnapshot(go);\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: tap?.data?.position ?? null,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n }\n\n private findGameObjectById(id: number): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n return stack.find(go => go.id === id) ?? null;\n }\n\n private findGameObjectBySource(source: SceneSourceAnchor): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n\n const wantFile = source.file.trim();\n const wantAnchor = (source.anchor ?? '').trim();\n if (!wantAnchor) {\n return null;\n }\n\n for (const go of stack) {\n const anchor = readSourceAnchor(go);\n if (!anchor || anchor.file !== wantFile) {\n continue;\n }\n const resolvedAnchor = anchor.anchor ?? go.name;\n if (resolvedAnchor === wantAnchor) {\n return go;\n }\n }\n\n return null;\n }\n\n private resolveApplyTarget(payload: ApplyPropertyPayload): GameObject | null {\n if (typeof payload.gameObjectId === 'number') {\n const byId = this.findGameObjectById(payload.gameObjectId);\n if (byId) {\n return byId;\n }\n }\n\n const file = payload.source?.file?.trim();\n const anchor = payload.source?.anchor?.trim();\n if (!file || !anchor) {\n return null;\n }\n\n return this.findGameObjectBySource({ file, anchor });\n }\n\n private handleApplyProperty(payload: ApplyPropertyPayload) {\n const componentName = payload.componentName;\n const path = payload.path;\n const hasId = typeof payload.gameObjectId === 'number';\n const hasSource =\n Boolean(payload.source?.file?.trim()) && Boolean(payload.source?.anchor?.trim());\n\n if (\n (!hasId && !hasSource) ||\n typeof componentName !== 'string' ||\n !Array.isArray(path) ||\n path.length === 0\n ) {\n return;\n }\n\n const go = this.resolveApplyTarget(payload);\n if (!go) return;\n\n const applied = applyPropertyWithHooks(go, componentName, path, payload.value);\n if (!applied) return;\n\n if (this.selected?.id === go.id) {\n this.postSnapshotUpdate(go);\n }\n }\n\n private postSnapshotUpdate(go: GameObject) {\n const snapshot = buildGameObjectSnapshot(go);\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(\n {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: null,\n source: 'property-applied',\n },\n this.postMessageOrigin,\n );\n }\n }\n\n private clearSelection() {\n this.selected = null;\n if (this.outlineGo?.parent) {\n this.outlineGo.remove();\n }\n const gfx = this.outlineGo?.getComponent(Graphics);\n if (gfx?.graphics) {\n gfx.graphics.clear();\n }\n }\n}\n","/** Auto-generated by scripts/build-package.mjs — do not edit. */\n\nimport CombosDevelopmentToolSystem from './CombosDevelopmentToolSystem';\n\nObject.assign(CombosDevelopmentToolSystem, {\n packageName: \"@combos-fun/plugin-development-tool\",\n packageVersion: \"0.0.17\",\n});\n"],"names":["Component","CombosDevelopmentToolSystem","System","Graphics","OBSERVER_TYPE","Event","HIT_AREA_TYPE","RendererSystem","GameObject","__decorate","decorators"],"mappings":";;;;;;;;AAAA;AACO,MAAM,2BAA2B,GAAG;AAE3C;AACO,MAAM,+BAA+B,GAAG;AAE/C;AACO,MAAM,2CAA2C,GACtD;AAEF;AACO,MAAM,sCAAsC,GACjD;AAEF;AACO,MAAM,6BAA6B,GAAG;;ACR7C;;;AAGG;AACW,MAAO,2BAA4B,SAAQA,gBAA4C,CAAA;AAArG,IAAA,WAAA,GAAA;;QAGE,IAAA,CAAA,OAAO,GAA4B,EAAE;IAKvC;aAPS,IAAA,CAAA,aAAa,GAAG,6BAAH,CAAiC;AAIrD,IAAA,IAAI,CAAC,MAA0C,EAAA;AAC7C,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,EAAE,OAAO,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE;IAC7D;;;ACSI,SAAU,mBAAmB,CAAC,CAAU,EAAA;IAC5C,QACE,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,QAAQ;AACrB,QAAA,OAAQ,CAAuB,CAAC,IAAI,KAAK,QAAQ;AAErD;;ACxBA,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACxB,YAAY;IACZ,MAAM;IACN,SAAS;IACT,0BAA0B;IAC1B,WAAW;IACX,SAAS;IACT,gBAAgB;IAChB,UAAU;IACV,SAAS;AACV,CAAA,CAAC;AAEF,MAAM,mBAAmB,GAAwC;IAC/D,OAAO,EAAE,IAAI,GAAG,CAAC;QACf,MAAM;QACN,MAAM;QACN,eAAe;QACf,OAAO;QACP,YAAY;QACZ,iBAAiB;QACjB,YAAY;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,CAAA;IAH/CC,iBAAU,CAAC,iBAAiB,CAAC;AAC5B,QAAA,2BAA2B,EAAE,EAAE;KAChC;AACoB,CAAA,EAAAT,6BAA2B,CA+c/C;kCA/coBA,6BAA2B;;ACtEhD;AAIA,MAAM,CAAC,MAAM,CAAC,2BAA2B,EAAE;AACzC,IAAA,WAAW,EAAE,qCAAqC;AAClD,IAAA,cAAc,EAAE,QAAQ;AACzB,CAAA,CAAC;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("tslib"),t=require("@combos-fun/engine"),n=require("@combos-fun/plugin-renderer"),o=require("@combos-fun/plugin-renderer-graphics"),s=require("@combos-fun/plugin-renderer-event");const i="combos-development-tool:set",r="combos-development-tool:refresh",a="combos-development-tool:gameobject-selected",c="combos-development-tool:apply-property";class h extends t.Component{constructor(){super(...arguments),this.payload={}}static{this.componentName="CombosDevelopmentToolTarget"}init(e){this.payload=e?.payload?{...e.payload}:{}}}const l=new Set(["gameObject","name","started","__componentDefaultParams","destroyed","inScene","worldTransform","children","_parent"]),d={Physics:new Set(["body","Body","PhysicsEngine","World","Constraint","mouseConstraint","bodyParams"]),Event:new Set(["hitArea"])};function p(e,t=0){if(null==e)return e;if("number"==typeof e||"string"==typeof e||"boolean"==typeof e)return e;if(!(t>6)){if(Array.isArray(e))return e.map(e=>p(e,t+1));if("object"==typeof e){const n={};for(const[o,s]of Object.entries(e)){if("function"==typeof s)continue;const e=p(s,t+1);void 0!==e&&(n[o]=e)}return n}}}function u(e){const t={},n=d[e.name];for(const o of Object.keys(e)){if(l.has(o)||o.startsWith("_"))continue;if(n?.has(o))continue;const s=e[o];if("function"==typeof s)continue;const i=p(s);void 0!==i&&(t[o]=i)}return t}function f(e){const t=e.getComponent(h),n=t?.payload?.source;var o;if((o=n)&&"object"==typeof o&&"string"==typeof o.file)return{file:n.file,anchor:n.anchor??e.name}}function m(e){const t=e.components.filter(e=>"CombosDevelopmentToolTarget"!==e.name).map(e=>({componentName:e.name,fields:u(e)}));return{id:e.id,name:e.name,components:t,source:f(e)}}function g(e,t,n,o){const s=e.getComponent(t);if(!s||!n.length)return!1;let i=s;for(let e=0;e<n.length-1;e++){const t=n[e];void 0!==i[t]&&null!==i[t]||(i[t]={}),i=i[t]}return i[n[n.length-1]]=o,!0}const y=new Set(["position","size","origin","anchor","scale","skew"]);function b(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e&&""!==e.trim()){const t=Number(e);return Number.isFinite(t)?t:void 0}}const w={Transform:function(e,t,n,o){const s=e.transform??t,i=s;if(1===n.length&&"rotation"===n[0]){const e=b(o);return void 0!==e&&(s.rotation=e,!0)}if(2===n.length&&y.has(n[0])){const t=n[0],s=n[1],r=b(o);if(void 0===r)return!1;const a=i[t];return!(!a||"object"!=typeof a)&&(a[s]=r,"position"===t&&(function(e){const t=e.getComponent("Physics");if(!t?.body)return;const{x:n,y:o}=e.transform.position;t.Body?.setPosition?t.Body.setPosition(t.body,{x:n,y:o}):(t.body.position.x=n,t.body.position.y=o)}(e),function(e){const t=e.getComponent("PlatformerMover");t&&(t.originX=e.transform.position.x,t.originY=e.transform.position.y)}(e)),!0)}return!1},Text:function(e,t,n,o){const s=t;if(1===n.length&&"text"===n[0])return s.text=String(o??""),!0;if(2===n.length&&"style"===n[0]){const e=n[1],t={...s.style??{},[e]:o};return s.style=t,!0}return!1},Sound:function(e,t,n,o){const s=t;if(1===n.length&&"volume"===n[0]||2===n.length&&"config"===n[0]&&"volume"===n[1]){const e=b(o);return void 0!==e&&(s.volume=e,!0)}return!1}};function O(e,t,n,o){const s=e.getComponent(t);if(!s||!n.length)return!1;const i=w[t];return!!i?.(e,s,n,o)||g(e,t,n,o)}const v="__combosDevelopmentToolOutline";let E=class extends t.System{constructor(){super(...arguments),this.postMessageOrigin="*",this.scope="scene",this.enabled=!1,this.outlineGo=null,this.selected=null,this.tapHandlers=new Map,this.tapOwners=new Map,this.injectedEvents=new Set,this.needsSceneRescan=!1,this.needsTaggedRescan=!1,this.onWindowSet=e=>{const t=e.detail;t&&"boolean"==typeof t.enabled&&this.setEnabled(t.enabled)},this.onWindowMessage=e=>{const t=e.data;t&&"object"==typeof t&&(t.type===i&&"boolean"==typeof t.enabled?this.setEnabled(t.enabled):t.type===r?this.requestSceneRescan():t.type===c&&this.handleApplyProperty(t))},this.onGameSet=e=>{e&&"boolean"==typeof e.enabled&&this.setEnabled(e.enabled)},this.onGameRefresh=()=>{this.requestSceneRescan()},this.onWindowRefresh=()=>{this.requestSceneRescan()}}static{this.systemName="CombosDevelopmentToolSystem"}init(e){this.postMessageOrigin=e?.postMessageOrigin??"*",this.scope=e?.scope??"scene","undefined"!=typeof window&&(window.addEventListener(i,this.onWindowSet),window.addEventListener(r,this.onWindowRefresh),window.addEventListener("message",this.onWindowMessage)),this.game.on(i,this.onGameSet),this.game.on(r,this.onGameRefresh),this.enabled&&"scene"===this.scope?this.needsSceneRescan=!0:this.enabled&&"tagged"===this.scope&&(this.needsTaggedRescan=!0)}onDestroy(){"undefined"!=typeof window&&(window.removeEventListener(i,this.onWindowSet),window.removeEventListener(r,this.onWindowRefresh),window.removeEventListener("message",this.onWindowMessage)),this.game.off(i,this.onGameSet),this.game.off(r,this.onGameRefresh),this.detachAllTaps(),this.clearSelection()}setEnabled(e){this.enabled!==e&&(this.enabled=e,e?"scene"===this.scope?this.needsSceneRescan=!0:this.needsTaggedRescan=!0:(this.clearSelection(),this.detachAllTaps()))}get isEnabled(){return this.enabled}update(e){this.enabled&&this.needsSceneRescan&&"scene"===this.scope&&(this.needsSceneRescan=!1,this.attachSceneTree()),this.enabled&&this.needsTaggedRescan&&"tagged"===this.scope&&(this.needsTaggedRescan=!1,this.attachTaggedObjects());for(const e of[...this.tapOwners.values()])e.destroyed&&this.releaseTap(e);if(!this.enabled||!this.selected||!this.outlineGo)return;const t=this.outlineGo.getComponent(o.Graphics);if(!t?.graphics)return;const n=this.resolvePickBounds(this.selected),s=t.graphics;s.clear();const i="undefined"!=typeof performance?performance.now():e.time,r=.35+.65*(.5+.5*Math.sin(.012*i));s.rect(n.x,n.y,n.width,n.height),s.stroke({width:4,color:5636010,alpha:r})}componentChanged(e){if("scene"===this.scope)return;const{type:n,gameObject:o,componentName:s}=e;o&&"CombosDevelopmentToolTarget"===s&&(n===t.OBSERVER_TYPE.ADD?this.ensureTap(o):n===t.OBSERVER_TYPE.REMOVE&&(this.releaseTap(o),this.selected===o&&this.clearSelection()))}requestSceneRescan(){this.enabled&&("scene"===this.scope?this.needsSceneRescan=!0:this.needsTaggedRescan=!0)}attachTaggedObjects(){const e=[];for(const t of this.game.scene.transform.children)this.collectGameObjects(t.gameObject,e);for(const t of e)t.name!==v&&t!==this.outlineGo&&t.getComponent(h)&&this.ensureTap(t)}attachSceneTree(){this.detachAllTaps();const e=[];for(const t of this.game.scene.transform.children)this.collectGameObjects(t.gameObject,e);for(const t of e)t.name!==v&&t!==this.outlineGo&&this.ensureTap(t)}collectGameObjects(e,t){t.push(e);for(const n of e.transform.children)this.collectGameObjects(n.gameObject,t)}detachAllTaps(){for(const e of[...this.tapOwners.values()])this.releaseTap(e)}ensureTap(e){let t=e.getComponent(s.Event);if(t||(t=e.addComponent(this.createInjectedEvent(e)),this.injectedEvents.add(e.id)),this.tapHandlers.has(e.id))return;const n=t=>this.onSelect(e,t);this.tapHandlers.set(e.id,n),this.tapOwners.set(e.id,e),t.on("tap",n)}createInjectedEvent(e){const{width:t,height:n}=e.transform.size;if(t>0&&n>0)return new s.Event({hitArea:{type:s.HIT_AREA_TYPE.Rect,style:{x:0,y:0,width:t,height:n}}});const o=this.resolveContainerLocalBounds(e);return o?new s.Event({hitArea:{type:s.HIT_AREA_TYPE.Rect,style:{x:o.x,y:o.y,width:o.width,height:o.height}}}):new s.Event}resolvePickBounds(e){const{width:t,height:n}=e.transform.size;if(t>0&&n>0)return{x:0,y:0,width:t,height:n};const o=this.resolveContainerLocalBounds(e);return o||{x:0,y:0,width:1,height:1}}resolveContainerLocalBounds(e){const t=this.getRendererContainer(e);if(!t)return null;try{const e=t.getLocalBounds();if(e.width>0&&e.height>0)return{x:e.x,y:e.y,width:e.width,height:e.height}}catch{}return null}getRendererContainer(e){const t=this.game.getSystem(n.RendererSystem);if(!t?.containerManager)return null;try{return t.containerManager.getContainer(e.id)}catch{return null}}releaseTap(e){const t=this.tapHandlers.get(e.id);if(!t)return;const n=e.getComponent(s.Event);if(n?.off("tap",t),this.tapHandlers.delete(e.id),this.tapOwners.delete(e.id),this.injectedEvents.has(e.id)){try{e.removeComponent(s.Event)}catch{}this.injectedEvents.delete(e.id)}}ensureOutline(){if(this.outlineGo)return;const e=new t.GameObject(v,{size:{width:1,height:1},position:{x:0,y:0},origin:{x:0,y:0}});e.addComponent(new o.Graphics),this.outlineGo=e}onSelect(e,t){if(!this.enabled)return;if(this.ensureOutline(),!this.outlineGo)return;this.selected=e,this.outlineGo.parent&&this.outlineGo.remove(),e.addChild(this.outlineGo);const n=m(e),o={type:a,snapshot:n,pointer:t?.data?.position??null};"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage(o,this.postMessageOrigin)}findGameObjectById(e){const t=[];for(const e of this.game.scene.transform.children)this.collectGameObjects(e.gameObject,t);return t.find(t=>t.id===e)??null}findGameObjectBySource(e){const t=[];for(const e of this.game.scene.transform.children)this.collectGameObjects(e.gameObject,t);const n=e.file.trim(),o=(e.anchor??"").trim();if(!o)return null;for(const e of t){const t=f(e);if(!t||t.file!==n)continue;if((t.anchor??e.name)===o)return e}return null}resolveApplyTarget(e){if("number"==typeof e.gameObjectId){const t=this.findGameObjectById(e.gameObjectId);if(t)return t}const t=e.source?.file?.trim(),n=e.source?.anchor?.trim();return t&&n?this.findGameObjectBySource({file:t,anchor:n}):null}handleApplyProperty(e){const t=e.componentName,n=e.path,o="number"==typeof e.gameObjectId,s=Boolean(e.source?.file?.trim())&&Boolean(e.source?.anchor?.trim());if(!o&&!s||"string"!=typeof t||!Array.isArray(n)||0===n.length)return;const i=this.resolveApplyTarget(e);if(!i)return;O(i,t,n,e.value)&&this.selected?.id===i.id&&this.postSnapshotUpdate(i)}postSnapshotUpdate(e){const t=m(e);"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage({type:a,snapshot:t,pointer:null,source:"property-applied"},this.postMessageOrigin)}clearSelection(){this.selected=null,this.outlineGo?.parent&&this.outlineGo.remove();const e=this.outlineGo?.getComponent(o.Graphics);e?.graphics&&e.graphics.clear()}};E=e.__decorate([t.decorators.componentObserver({CombosDevelopmentToolTarget:[]})],E);var T=E;Object.assign(T,{packageName:"@combos-fun/plugin-development-tool",packageVersion:"0.0.15"}),exports.COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY=c,exports.COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED=a,exports.COMBOS_DEVELOPMENT_TOOL_READY="combos-development-tool:ready",exports.COMBOS_DEVELOPMENT_TOOL_REFRESH=r,exports.COMBOS_DEVELOPMENT_TOOL_SET=i,exports.CombosDevelopmentToolSystem=T,exports.CombosDevelopmentToolTarget=h,exports.applyPropertyValue=g,exports.applyPropertyWithHooks=O,exports.buildGameObjectSnapshot=m,exports.readPropertyValue=function(e,t,n){const o=e.getComponent(t);if(!o||!n.length)return;let s=o;for(const e of n){if(null==s||"object"!=typeof s)return;s=s[e]}return s},exports.readSourceAnchor=f;
|
|
1
|
+
"use strict";var e=require("tslib"),t=require("@combos-fun/engine"),n=require("@combos-fun/plugin-renderer"),o=require("@combos-fun/plugin-renderer-graphics"),s=require("@combos-fun/plugin-renderer-event");const i="combos-development-tool:set",r="combos-development-tool:refresh",a="combos-development-tool:gameobject-selected",c="combos-development-tool:apply-property";class h extends t.Component{constructor(){super(...arguments),this.payload={}}static{this.componentName="CombosDevelopmentToolTarget"}init(e){this.payload=e?.payload?{...e.payload}:{}}}const l=new Set(["gameObject","name","started","__componentDefaultParams","destroyed","inScene","worldTransform","children","_parent"]),d={Physics:new Set(["body","Body","PhysicsEngine","World","Constraint","mouseConstraint","bodyParams"]),Event:new Set(["hitArea"])};function p(e,t=0){if(null==e)return e;if("number"==typeof e||"string"==typeof e||"boolean"==typeof e)return e;if(!(t>6)){if(Array.isArray(e))return e.map(e=>p(e,t+1));if("object"==typeof e){const n={};for(const[o,s]of Object.entries(e)){if("function"==typeof s)continue;const e=p(s,t+1);void 0!==e&&(n[o]=e)}return n}}}function u(e){const t={},n=d[e.name];for(const o of Object.keys(e)){if(l.has(o)||o.startsWith("_"))continue;if(n?.has(o))continue;const s=e[o];if("function"==typeof s)continue;const i=p(s);void 0!==i&&(t[o]=i)}return t}function f(e){const t=e.getComponent(h),n=t?.payload?.source;var o;if((o=n)&&"object"==typeof o&&"string"==typeof o.file)return{file:n.file,anchor:n.anchor??e.name}}function m(e){const t=e.components.filter(e=>"CombosDevelopmentToolTarget"!==e.name).map(e=>({componentName:e.name,fields:u(e)}));return{id:e.id,name:e.name,components:t,source:f(e)}}function g(e,t,n,o){const s=e.getComponent(t);if(!s||!n.length)return!1;let i=s;for(let e=0;e<n.length-1;e++){const t=n[e];void 0!==i[t]&&null!==i[t]||(i[t]={}),i=i[t]}return i[n[n.length-1]]=o,!0}const y=new Set(["position","size","origin","anchor","scale","skew"]);function b(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e&&""!==e.trim()){const t=Number(e);return Number.isFinite(t)?t:void 0}}const w={Transform:function(e,t,n,o){const s=e.transform??t,i=s;if(1===n.length&&"rotation"===n[0]){const e=b(o);return void 0!==e&&(s.rotation=e,!0)}if(2===n.length&&y.has(n[0])){const t=n[0],s=n[1],r=b(o);if(void 0===r)return!1;const a=i[t];return!(!a||"object"!=typeof a)&&(a[s]=r,"position"===t&&(function(e){const t=e.getComponent("Physics");if(!t?.body)return;const{x:n,y:o}=e.transform.position;t.Body?.setPosition?t.Body.setPosition(t.body,{x:n,y:o}):(t.body.position.x=n,t.body.position.y=o)}(e),function(e){const t=e.getComponent("PlatformerMover");t&&(t.originX=e.transform.position.x,t.originY=e.transform.position.y)}(e)),!0)}return!1},Text:function(e,t,n,o){const s=t;if(1===n.length&&"text"===n[0])return s.text=String(o??""),!0;if(2===n.length&&"style"===n[0]){const e=n[1],t={...s.style??{},[e]:o};return s.style=t,!0}return!1},Sound:function(e,t,n,o){const s=t;if(1===n.length&&"volume"===n[0]||2===n.length&&"config"===n[0]&&"volume"===n[1]){const e=b(o);return void 0!==e&&(s.volume=e,!0)}return!1}};function v(e,t,n,o){const s=e.getComponent(t);if(!s||!n.length)return!1;const i=w[t];return!!i?.(e,s,n,o)||g(e,t,n,o)}const O="__combosDevelopmentToolOutline";let T=class extends t.System{constructor(){super(...arguments),this.postMessageOrigin="*",this.scope="scene",this.enabled=!1,this.outlineGo=null,this.selected=null,this.tapHandlers=new Map,this.tapOwners=new Map,this.savedTapListeners=new Map,this.injectedEvents=new Set,this.needsSceneRescan=!1,this.needsTaggedRescan=!1,this.onWindowSet=e=>{const t=e.detail;t&&"boolean"==typeof t.enabled&&this.setEnabled(t.enabled)},this.onWindowMessage=e=>{const t=e.data;t&&"object"==typeof t&&(t.type===i&&"boolean"==typeof t.enabled?this.setEnabled(t.enabled):t.type===r?this.requestSceneRescan():t.type===c&&this.handleApplyProperty(t))},this.onGameSet=e=>{e&&"boolean"==typeof e.enabled&&this.setEnabled(e.enabled)},this.onGameRefresh=()=>{this.requestSceneRescan()},this.onWindowRefresh=()=>{this.requestSceneRescan()}}static{this.systemName="CombosDevelopmentToolSystem"}init(e){this.postMessageOrigin=e?.postMessageOrigin??"*",this.scope=e?.scope??"scene","undefined"!=typeof window&&(window.addEventListener(i,this.onWindowSet),window.addEventListener(r,this.onWindowRefresh),window.addEventListener("message",this.onWindowMessage)),this.game.on(i,this.onGameSet),this.game.on(r,this.onGameRefresh),this.enabled&&"scene"===this.scope?this.needsSceneRescan=!0:this.enabled&&"tagged"===this.scope&&(this.needsTaggedRescan=!0)}onDestroy(){"undefined"!=typeof window&&(window.removeEventListener(i,this.onWindowSet),window.removeEventListener(r,this.onWindowRefresh),window.removeEventListener("message",this.onWindowMessage)),this.game.off(i,this.onGameSet),this.game.off(r,this.onGameRefresh),this.detachAllTaps(),this.clearSelection()}setEnabled(e){this.enabled!==e&&(this.enabled=e,e?"scene"===this.scope?this.needsSceneRescan=!0:this.needsTaggedRescan=!0:(this.clearSelection(),this.detachAllTaps()))}get isEnabled(){return this.enabled}update(e){this.enabled&&this.needsSceneRescan&&"scene"===this.scope&&(this.needsSceneRescan=!1,this.attachSceneTree()),this.enabled&&this.needsTaggedRescan&&"tagged"===this.scope&&(this.needsTaggedRescan=!1,this.attachTaggedObjects());for(const e of[...this.tapOwners.values()])e.destroyed&&this.releaseTap(e);if(!this.enabled||!this.selected||!this.outlineGo)return;const t=this.outlineGo.getComponent(o.Graphics);if(!t?.graphics)return;const n=this.resolvePickBounds(this.selected),s=t.graphics;s.clear();const i="undefined"!=typeof performance?performance.now():e.time,r=.35+.65*(.5+.5*Math.sin(.012*i));s.rect(n.x,n.y,n.width,n.height),s.stroke({width:4,color:5636010,alpha:r})}componentChanged(e){if("scene"===this.scope)return;const{type:n,gameObject:o,componentName:s}=e;o&&"CombosDevelopmentToolTarget"===s&&(n===t.OBSERVER_TYPE.ADD?this.ensureTap(o):n===t.OBSERVER_TYPE.REMOVE&&(this.releaseTap(o),this.selected===o&&this.clearSelection()))}requestSceneRescan(){this.enabled&&("scene"===this.scope?this.needsSceneRescan=!0:this.needsTaggedRescan=!0)}attachTaggedObjects(){const e=[];for(const t of this.game.scene.transform.children)this.collectGameObjects(t.gameObject,e);for(const t of e)t.name!==O&&t!==this.outlineGo&&t.getComponent(h)&&this.ensureTap(t)}attachSceneTree(){this.detachAllTaps(!1);const e=[];for(const t of this.game.scene.transform.children)this.collectGameObjects(t.gameObject,e);for(const t of e)t.name!==O&&t!==this.outlineGo&&this.ensureTap(t)}collectGameObjects(e,t){t.push(e);for(const n of e.transform.children)this.collectGameObjects(n.gameObject,t)}detachAllTaps(e=!0){for(const t of[...this.tapOwners.values()])this.releaseTap(t,e)}ensureTap(e){let t=e.getComponent(s.Event);if(t||(t=e.addComponent(this.createInjectedEvent(e)),this.injectedEvents.add(e.id)),this.tapHandlers.has(e.id))return;if(!this.savedTapListeners.has(e.id)){const n=t.listeners("tap");this.savedTapListeners.set(e.id,[...n])}t.removeAllListeners("tap");const n=t=>this.onSelect(e,t);this.tapHandlers.set(e.id,n),this.tapOwners.set(e.id,e),t.on("tap",n)}createInjectedEvent(e){const t=this.resolvePickBounds(e);return t.width>0&&t.height>0?new s.Event({hitArea:{type:s.HIT_AREA_TYPE.Rect,style:{x:t.x,y:t.y,width:t.width,height:t.height}}}):new s.Event}resolvePickBounds(e){if(this.shouldPreferRenderedBounds(e)){const t=this.resolveContainerLocalBounds(e);if(t)return t}const{width:t,height:n}=e.transform.size;if(t>0&&n>0)return{x:0,y:0,width:t,height:n};const o=this.resolveContainerLocalBounds(e);return o||{x:0,y:0,width:1,height:1}}shouldPreferRenderedBounds(e){return null!=e.getComponent(o.Graphics)}resolveContainerLocalBounds(e){const t=this.getRendererContainer(e);if(!t)return null;try{const e=t.getLocalBounds();if(e.width>0&&e.height>0)return{x:e.x,y:e.y,width:e.width,height:e.height}}catch{}return null}getRendererContainer(e){const t=this.game.getSystem(n.RendererSystem);if(!t?.containerManager)return null;try{return t.containerManager.getContainer(e.id)}catch{return null}}releaseTap(e,t=!0){const n=this.tapHandlers.get(e.id);if(!n)return;const o=e.getComponent(s.Event);if(o?.off("tap",n),this.tapHandlers.delete(e.id),this.tapOwners.delete(e.id),t){const t=this.savedTapListeners.get(e.id);if(t&&t.length>0&&o)for(const e of t)o.on("tap",e);if(this.savedTapListeners.delete(e.id),this.injectedEvents.has(e.id)){try{e.removeComponent(s.Event)}catch{}this.injectedEvents.delete(e.id)}}}ensureOutline(){if(this.outlineGo)return;const e=new t.GameObject(O,{size:{width:1,height:1},position:{x:0,y:0},origin:{x:0,y:0}});e.addComponent(new o.Graphics),this.outlineGo=e}onSelect(e,t){if(!this.enabled)return;if(this.ensureOutline(),!this.outlineGo)return;this.selected=e,this.outlineGo.parent&&this.outlineGo.remove(),e.addChild(this.outlineGo);const n=m(e),o={type:a,snapshot:n,pointer:t?.data?.position??null};"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage(o,this.postMessageOrigin)}findGameObjectById(e){const t=[];for(const e of this.game.scene.transform.children)this.collectGameObjects(e.gameObject,t);return t.find(t=>t.id===e)??null}findGameObjectBySource(e){const t=[];for(const e of this.game.scene.transform.children)this.collectGameObjects(e.gameObject,t);const n=e.file.trim(),o=(e.anchor??"").trim();if(!o)return null;for(const e of t){const t=f(e);if(!t||t.file!==n)continue;if((t.anchor??e.name)===o)return e}return null}resolveApplyTarget(e){if("number"==typeof e.gameObjectId){const t=this.findGameObjectById(e.gameObjectId);if(t)return t}const t=e.source?.file?.trim(),n=e.source?.anchor?.trim();return t&&n?this.findGameObjectBySource({file:t,anchor:n}):null}handleApplyProperty(e){const t=e.componentName,n=e.path,o="number"==typeof e.gameObjectId,s=Boolean(e.source?.file?.trim())&&Boolean(e.source?.anchor?.trim());if(!o&&!s||"string"!=typeof t||!Array.isArray(n)||0===n.length)return;const i=this.resolveApplyTarget(e);if(!i)return;v(i,t,n,e.value)&&this.selected?.id===i.id&&this.postSnapshotUpdate(i)}postSnapshotUpdate(e){const t=m(e);"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage({type:a,snapshot:t,pointer:null,source:"property-applied"},this.postMessageOrigin)}clearSelection(){this.selected=null,this.outlineGo?.parent&&this.outlineGo.remove();const e=this.outlineGo?.getComponent(o.Graphics);e?.graphics&&e.graphics.clear()}};T=e.__decorate([t.decorators.componentObserver({CombosDevelopmentToolTarget:[]})],T);var E=T;Object.assign(E,{packageName:"@combos-fun/plugin-development-tool",packageVersion:"0.0.17"}),exports.COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY=c,exports.COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED=a,exports.COMBOS_DEVELOPMENT_TOOL_READY="combos-development-tool:ready",exports.COMBOS_DEVELOPMENT_TOOL_REFRESH=r,exports.COMBOS_DEVELOPMENT_TOOL_SET=i,exports.CombosDevelopmentToolSystem=E,exports.CombosDevelopmentToolTarget=h,exports.applyPropertyValue=g,exports.applyPropertyWithHooks=v,exports.buildGameObjectSnapshot=m,exports.readPropertyValue=function(e,t,n){const o=e.getComponent(t);if(!o||!n.length)return;let s=o;for(const e of n){if(null==s||"object"!=typeof s)return;s=s[e]}return s},exports.readSourceAnchor=f;
|
|
@@ -37,6 +37,7 @@ interface CombosDevelopmentToolSystemParams {
|
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* **Defaults:** `scope: 'scene'`, **off** at start (no tap hijack until enabled).
|
|
40
|
+
* While enabled, game `Event` `tap` listeners are removed and restored on disable.
|
|
40
41
|
* Turn on/off via:
|
|
41
42
|
* - `window.dispatchEvent(new CustomEvent(COMBOS_DEVELOPMENT_TOOL_SET, { detail: { enabled: true } }))`
|
|
42
43
|
* - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)
|
|
@@ -53,6 +54,8 @@ declare class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSy
|
|
|
53
54
|
private selected;
|
|
54
55
|
private readonly tapHandlers;
|
|
55
56
|
private readonly tapOwners;
|
|
57
|
+
/** Game `tap` listeners removed while enabled; restored on disable. */
|
|
58
|
+
private readonly savedTapListeners;
|
|
56
59
|
/** We added `Event` for hit-testing; remove on teardown when disabling / releaseTap. */
|
|
57
60
|
private readonly injectedEvents;
|
|
58
61
|
private needsSceneRescan;
|
|
@@ -78,6 +81,7 @@ declare class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSy
|
|
|
78
81
|
private ensureTap;
|
|
79
82
|
private createInjectedEvent;
|
|
80
83
|
private resolvePickBounds;
|
|
84
|
+
private shouldPreferRenderedBounds;
|
|
81
85
|
private resolveContainerLocalBounds;
|
|
82
86
|
private getRendererContainer;
|
|
83
87
|
private releaseTap;
|
|
@@ -270,6 +270,7 @@ function applyPropertyWithHooks(go, componentName, path, value) {
|
|
|
270
270
|
const OUTLINE_GO_NAME = '__combosDevelopmentToolOutline';
|
|
271
271
|
/**
|
|
272
272
|
* **Defaults:** `scope: 'scene'`, **off** at start (no tap hijack until enabled).
|
|
273
|
+
* While enabled, game `Event` `tap` listeners are removed and restored on disable.
|
|
273
274
|
* Turn on/off via:
|
|
274
275
|
* - `window.dispatchEvent(new CustomEvent(COMBOS_DEVELOPMENT_TOOL_SET, { detail: { enabled: true } }))`
|
|
275
276
|
* - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)
|
|
@@ -287,6 +288,8 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
287
288
|
this.selected = null;
|
|
288
289
|
this.tapHandlers = new Map();
|
|
289
290
|
this.tapOwners = new Map();
|
|
291
|
+
/** Game `tap` listeners removed while enabled; restored on disable. */
|
|
292
|
+
this.savedTapListeners = new Map();
|
|
290
293
|
/** We added `Event` for hit-testing; remove on teardown when disabling / releaseTap. */
|
|
291
294
|
this.injectedEvents = new Set();
|
|
292
295
|
this.needsSceneRescan = false;
|
|
@@ -441,7 +444,7 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
441
444
|
}
|
|
442
445
|
}
|
|
443
446
|
attachSceneTree() {
|
|
444
|
-
this.detachAllTaps();
|
|
447
|
+
this.detachAllTaps(false);
|
|
445
448
|
const list = [];
|
|
446
449
|
for (const tr of this.game.scene.transform.children) {
|
|
447
450
|
this.collectGameObjects(tr.gameObject, list);
|
|
@@ -460,9 +463,9 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
460
463
|
this.collectGameObjects(tr.gameObject, out);
|
|
461
464
|
}
|
|
462
465
|
}
|
|
463
|
-
detachAllTaps() {
|
|
466
|
+
detachAllTaps(restore = true) {
|
|
464
467
|
for (const go of [...this.tapOwners.values()]) {
|
|
465
|
-
this.releaseTap(go);
|
|
468
|
+
this.releaseTap(go, restore);
|
|
466
469
|
}
|
|
467
470
|
}
|
|
468
471
|
ensureTap(go) {
|
|
@@ -473,23 +476,19 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
473
476
|
}
|
|
474
477
|
if (this.tapHandlers.has(go.id))
|
|
475
478
|
return;
|
|
476
|
-
|
|
479
|
+
if (!this.savedTapListeners.has(go.id)) {
|
|
480
|
+
const existing = ev.listeners('tap');
|
|
481
|
+
this.savedTapListeners.set(go.id, [...existing]);
|
|
482
|
+
}
|
|
483
|
+
ev.removeAllListeners('tap');
|
|
484
|
+
const handler = payload => this.onSelect(go, payload);
|
|
477
485
|
this.tapHandlers.set(go.id, handler);
|
|
478
486
|
this.tapOwners.set(go.id, go);
|
|
479
487
|
ev.on('tap', handler);
|
|
480
488
|
}
|
|
481
489
|
createInjectedEvent(go) {
|
|
482
|
-
const
|
|
483
|
-
if (width > 0 && height > 0) {
|
|
484
|
-
return new Event({
|
|
485
|
-
hitArea: {
|
|
486
|
-
type: HIT_AREA_TYPE.Rect,
|
|
487
|
-
style: { x: 0, y: 0, width, height },
|
|
488
|
-
},
|
|
489
|
-
});
|
|
490
|
-
}
|
|
491
|
-
const bounds = this.resolveContainerLocalBounds(go);
|
|
492
|
-
if (bounds) {
|
|
490
|
+
const bounds = this.resolvePickBounds(go);
|
|
491
|
+
if (bounds.width > 0 && bounds.height > 0) {
|
|
493
492
|
return new Event({
|
|
494
493
|
hitArea: {
|
|
495
494
|
type: HIT_AREA_TYPE.Rect,
|
|
@@ -506,6 +505,14 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
506
505
|
return new Event();
|
|
507
506
|
}
|
|
508
507
|
resolvePickBounds(go) {
|
|
508
|
+
// Graphics draws in arbitrary local coordinates (often centered at 0,0).
|
|
509
|
+
// transform.size is a layout box from (0,0) and must not override Pixi bounds.
|
|
510
|
+
if (this.shouldPreferRenderedBounds(go)) {
|
|
511
|
+
const fromGraphics = this.resolveContainerLocalBounds(go);
|
|
512
|
+
if (fromGraphics) {
|
|
513
|
+
return fromGraphics;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
509
516
|
const { width, height } = go.transform.size;
|
|
510
517
|
if (width > 0 && height > 0) {
|
|
511
518
|
return { x: 0, y: 0, width, height };
|
|
@@ -516,6 +523,9 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
516
523
|
}
|
|
517
524
|
return { x: 0, y: 0, width: 1, height: 1 };
|
|
518
525
|
}
|
|
526
|
+
shouldPreferRenderedBounds(go) {
|
|
527
|
+
return go.getComponent(Graphics) != null;
|
|
528
|
+
}
|
|
519
529
|
resolveContainerLocalBounds(go) {
|
|
520
530
|
const container = this.getRendererContainer(go);
|
|
521
531
|
if (!container)
|
|
@@ -547,7 +557,7 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
547
557
|
return null;
|
|
548
558
|
}
|
|
549
559
|
}
|
|
550
|
-
releaseTap(go) {
|
|
560
|
+
releaseTap(go, restore = true) {
|
|
551
561
|
const handler = this.tapHandlers.get(go.id);
|
|
552
562
|
if (!handler)
|
|
553
563
|
return;
|
|
@@ -555,14 +565,23 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
555
565
|
ev?.off('tap', handler);
|
|
556
566
|
this.tapHandlers.delete(go.id);
|
|
557
567
|
this.tapOwners.delete(go.id);
|
|
558
|
-
if (
|
|
559
|
-
|
|
560
|
-
|
|
568
|
+
if (restore) {
|
|
569
|
+
const saved = this.savedTapListeners.get(go.id);
|
|
570
|
+
if (saved && saved.length > 0 && ev) {
|
|
571
|
+
for (const fn of saved) {
|
|
572
|
+
ev.on('tap', fn);
|
|
573
|
+
}
|
|
561
574
|
}
|
|
562
|
-
|
|
563
|
-
|
|
575
|
+
this.savedTapListeners.delete(go.id);
|
|
576
|
+
if (this.injectedEvents.has(go.id)) {
|
|
577
|
+
try {
|
|
578
|
+
go.removeComponent(Event);
|
|
579
|
+
}
|
|
580
|
+
catch {
|
|
581
|
+
/* ignore */
|
|
582
|
+
}
|
|
583
|
+
this.injectedEvents.delete(go.id);
|
|
564
584
|
}
|
|
565
|
-
this.injectedEvents.delete(go.id);
|
|
566
585
|
}
|
|
567
586
|
}
|
|
568
587
|
ensureOutline() {
|
|
@@ -693,7 +712,7 @@ var CombosDevelopmentToolSystem$1 = CombosDevelopmentToolSystem;
|
|
|
693
712
|
/** Auto-generated by scripts/build-package.mjs — do not edit. */
|
|
694
713
|
Object.assign(CombosDevelopmentToolSystem$1, {
|
|
695
714
|
packageName: "@combos-fun/plugin-development-tool",
|
|
696
|
-
packageVersion: "0.0.
|
|
715
|
+
packageVersion: "0.0.17",
|
|
697
716
|
});
|
|
698
717
|
|
|
699
718
|
export { COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY, COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED, COMBOS_DEVELOPMENT_TOOL_READY, COMBOS_DEVELOPMENT_TOOL_REFRESH, COMBOS_DEVELOPMENT_TOOL_SET, CombosDevelopmentToolSystem$1 as CombosDevelopmentToolSystem, CombosDevelopmentToolTarget, applyPropertyValue, applyPropertyWithHooks, buildGameObjectSnapshot, readPropertyValue, readSourceAnchor };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-development-tool.esm.js","sources":["../lib/constants.ts","../lib/CombosDevelopmentToolTarget.ts","../lib/sceneEditTypes.ts","../lib/sceneEditSerialize.ts","../lib/sceneEditApplyHooks.ts","../lib/CombosDevelopmentToolSystem.ts","../lib/__combosPackageMeta.gen.ts"],"sourcesContent":["/** Toggle development-tool selection / parent postMessage. Payload: `{ enabled: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET = 'combos-development-tool:set' as const;\n\n/** Re-scan the scene tree (only when `CombosDevelopmentToolSystem` uses `scope: 'scene'`). */\nexport const COMBOS_DEVELOPMENT_TOOL_REFRESH = 'combos-development-tool:refresh' as const;\n\n/** Emitted to `window.parent` when an object is selected while the tool is on. */\nexport const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED =\n 'combos-development-tool:gameobject-selected' as const;\n\n/** Parent → iframe: apply a value to a component field (live preview). */\nexport const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY =\n 'combos-development-tool:apply-property' as const;\n\n/** iframe → parent: game scene bootstrap finished; parent may enable pick mode. */\nexport const COMBOS_DEVELOPMENT_TOOL_READY = 'combos-development-tool:ready' as const;\n","import { Component, ComponentParams } from '@combos-fun/engine';\n\nexport interface CombosDevelopmentToolTargetParams extends ComponentParams {\n /** Extra JSON-serializable fields included in postMessage to parent. */\n payload?: Record<string, unknown>;\n}\n\n/**\n * Optional marker when using `CombosDevelopmentToolSystem` with `scope: 'tagged'`, or to attach\n * extra `payload` on specific objects while using `scope: 'scene'` (serialization reads it if present).\n */\nexport default class CombosDevelopmentToolTarget extends Component<CombosDevelopmentToolTargetParams> {\n static componentName = 'CombosDevelopmentToolTarget';\n\n payload: Record<string, unknown> = {};\n\n init(params?: CombosDevelopmentToolTargetParams) {\n this.payload = params?.payload ? { ...params.payload } : {};\n }\n}\n","/** Optional bootstrap anchor stored on {@link CombosDevelopmentToolTarget}.payload.source */\nexport interface SceneSourceAnchor {\n /** Project-relative path, e.g. `src/index.ts` */\n file: string;\n /** Variable name in bootstrap (`const poster = …`) or stable key; defaults to gameObject name */\n anchor?: string;\n}\n\nexport interface SceneEditPropertyRef {\n gameObjectId: number;\n gameObjectName: string;\n componentName: string;\n path: string[];\n}\n\nexport interface SceneEditComponentSnapshot {\n componentName: string;\n fields: Record<string, unknown>;\n}\n\nexport interface SceneEditGameObjectSnapshot {\n id: number;\n name: string;\n components: SceneEditComponentSnapshot[];\n source?: SceneSourceAnchor;\n}\n\nexport function isSceneSourceAnchor(v: unknown): v is SceneSourceAnchor {\n return (\n !!v &&\n typeof v === 'object' &&\n typeof (v as SceneSourceAnchor).file === 'string'\n );\n}\n","import { Component, GameObject } from '@combos-fun/engine';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport {\n isSceneSourceAnchor,\n type SceneEditComponentSnapshot,\n type SceneEditGameObjectSnapshot,\n type SceneSourceAnchor,\n} from './sceneEditTypes';\n\nconst SKIP_KEYS = new Set([\n 'gameObject',\n 'name',\n 'started',\n '__componentDefaultParams',\n 'destroyed',\n 'inScene',\n 'worldTransform',\n 'children',\n '_parent',\n]);\n\nconst COMPONENT_SKIP_KEYS: Record<string, ReadonlySet<string>> = {\n Physics: new Set([\n 'body',\n 'Body',\n 'PhysicsEngine',\n 'World',\n 'Constraint',\n 'mouseConstraint',\n 'bodyParams',\n ]),\n Event: new Set(['hitArea']),\n};\n\nfunction cloneJsonSafe(value: unknown, depth = 0): unknown {\n if (value === null || value === undefined) return value;\n if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean') {\n return value;\n }\n if (depth > 6) return undefined;\n if (Array.isArray(value)) {\n return value.map(item => cloneJsonSafe(item, depth + 1));\n }\n if (typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value as Record<string, unknown>)) {\n if (typeof v === 'function') continue;\n const cloned = cloneJsonSafe(v, depth + 1);\n if (cloned !== undefined) out[k] = cloned;\n }\n return out;\n }\n return undefined;\n}\n\nfunction serializeComponent(comp: Component): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n const componentSkips = COMPONENT_SKIP_KEYS[comp.name];\n for (const key of Object.keys(comp)) {\n if (SKIP_KEYS.has(key) || key.startsWith('_')) continue;\n if (componentSkips?.has(key)) continue;\n const value = (comp as Record<string, unknown>)[key];\n if (typeof value === 'function') continue;\n const cloned = cloneJsonSafe(value);\n if (cloned !== undefined) out[key] = cloned;\n }\n return out;\n}\n\nexport function readSourceAnchor(go: GameObject): SceneSourceAnchor | undefined {\n const tag = go.getComponent(CombosDevelopmentToolTarget);\n const raw = tag?.payload?.source;\n if (!isSceneSourceAnchor(raw)) return undefined;\n return {\n file: raw.file,\n anchor: raw.anchor ?? go.name,\n };\n}\n\nexport function buildGameObjectSnapshot(go: GameObject): SceneEditGameObjectSnapshot {\n const components: SceneEditComponentSnapshot[] = go.components\n .filter(c => c.name !== 'CombosDevelopmentToolTarget')\n .map(c => ({\n componentName: c.name,\n fields: serializeComponent(c),\n }));\n\n return {\n id: go.id,\n name: go.name,\n components,\n source: readSourceAnchor(go),\n };\n}\n\nexport function applyPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return false;\n\n let target: Record<string, unknown> = comp as unknown as Record<string, unknown>;\n for (let i = 0; i < path.length - 1; i++) {\n const key = path[i];\n if (target[key] === undefined || target[key] === null) {\n target[key] = {};\n }\n target = target[key] as Record<string, unknown>;\n }\n\n target[path[path.length - 1]] = value;\n return true;\n}\n\nexport function readPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n): unknown {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return undefined;\n\n let target: unknown = comp;\n for (const key of path) {\n if (target === null || target === undefined || typeof target !== 'object') {\n return undefined;\n }\n target = (target as Record<string, unknown>)[key];\n }\n return target;\n}\n","import type { Component, GameObject } from '@combos-fun/engine';\nimport { applyPropertyValue } from './sceneEditSerialize';\n\ntype SceneEditApplyHook = (\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n) => boolean;\n\nconst TRANSFORM_VECTOR_KEYS = new Set([\n 'position',\n 'size',\n 'origin',\n 'anchor',\n 'scale',\n 'skew',\n]);\n\ntype PhysicsLike = {\n body?: { position: { x: number; y: number }; angle?: number };\n bodyParams?: { stopRotation?: boolean };\n Body?: { setPosition: (body: unknown, pos: { x: number; y: number }) => void; setAngle?: (body: unknown, angle: number) => void };\n};\n\ntype MoverLike = {\n originX: number;\n originY: number;\n};\n\nfunction asNumber(value: unknown): number | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '') {\n const next = Number(value);\n return Number.isFinite(next) ? next : undefined;\n }\n return undefined;\n}\n\nfunction syncPhysicsBodyFromTransform(go: GameObject): void {\n const physics = go.getComponent('Physics') as PhysicsLike | undefined;\n if (!physics?.body) {\n return;\n }\n\n const { x, y } = go.transform.position;\n if (physics.Body?.setPosition) {\n physics.Body.setPosition(physics.body, { x, y });\n return;\n }\n\n physics.body.position.x = x;\n physics.body.position.y = y;\n}\n\nfunction syncMoverOriginFromTransform(go: GameObject): void {\n const mover = go.getComponent('PlatformerMover') as MoverLike | undefined;\n if (!mover) {\n return;\n }\n mover.originX = go.transform.position.x;\n mover.originY = go.transform.position.y;\n}\n\nfunction applyTransformProperty(\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const transform = go.transform ?? comp;\n const transformRecord = transform as unknown as Record<string, unknown>;\n\n if (path.length === 1 && path[0] === 'rotation') {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n transform.rotation = next;\n return true;\n }\n\n if (path.length === 2 && TRANSFORM_VECTOR_KEYS.has(path[0])) {\n const groupKey = path[0];\n const leafKey = path[1];\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n\n const group = transformRecord[groupKey];\n if (!group || typeof group !== 'object') {\n return false;\n }\n\n (group as Record<string, unknown>)[leafKey] = next;\n\n if (groupKey === 'position') {\n syncPhysicsBodyFromTransform(go);\n syncMoverOriginFromTransform(go);\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction applyTextProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const textComp = comp as Component & { text?: string; style?: Record<string, unknown> };\n\n if (path.length === 1 && path[0] === 'text') {\n textComp.text = String(value ?? '');\n return true;\n }\n\n if (path.length === 2 && path[0] === 'style') {\n const styleKey = path[1];\n const nextStyle = { ...(textComp.style ?? {}), [styleKey]: value };\n textComp.style = nextStyle;\n return true;\n }\n\n return false;\n}\n\nfunction applySoundProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const soundComp = comp as Component & { volume?: number };\n\n if (\n (path.length === 1 && path[0] === 'volume') ||\n (path.length === 2 && path[0] === 'config' && path[1] === 'volume')\n ) {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n soundComp.volume = next;\n return true;\n }\n\n return false;\n}\n\nconst APPLY_HOOKS: Record<string, SceneEditApplyHook> = {\n Transform: applyTransformProperty,\n Text: applyTextProperty,\n Sound: applySoundProperty,\n};\n\nexport function applyPropertyWithHooks(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) {\n return false;\n }\n\n const hook = APPLY_HOOKS[componentName];\n if (hook?.(go, comp, path, value)) {\n return true;\n }\n\n return applyPropertyValue(go, componentName, path, value);\n}\n","import {\n ComponentChanged,\n GameObject,\n OBSERVER_TYPE,\n System,\n UpdateParams,\n decorators,\n} from '@combos-fun/engine';\nimport { RendererSystem } from '@combos-fun/plugin-renderer';\nimport { Graphics } from '@combos-fun/plugin-renderer-graphics';\nimport { Event, HIT_AREA_TYPE } from '@combos-fun/plugin-renderer-event';\nimport {\n COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY,\n COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n COMBOS_DEVELOPMENT_TOOL_REFRESH,\n COMBOS_DEVELOPMENT_TOOL_SET,\n} from './constants';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport { applyPropertyWithHooks } from './sceneEditApplyHooks';\nimport { buildGameObjectSnapshot, readSourceAnchor } from './sceneEditSerialize';\n\nimport type { SceneSourceAnchor } from './sceneEditTypes';\n\ntype TapEventPayload = {\n data?: {\n position?: { x: number; y: number };\n };\n};\n\ntype ApplyPropertyPayload = {\n gameObjectId?: number;\n source?: SceneSourceAnchor;\n componentName?: string;\n path?: string[];\n value?: unknown;\n};\n\nexport type CombosDevelopmentToolSelectScope = 'tagged' | 'scene';\n\nexport interface CombosDevelopmentToolSystemParams {\n /** postMessage `targetOrigin` when notifying parent (default `'*'`). */\n postMessageOrigin?: string;\n /**\n * - `tagged`: only `GameObject`s with {@link CombosDevelopmentToolTarget} participate (optional `payload`).\n * - `scene`: all objects under `game.scene` (except the outline helper) get tap → outline + postMessage; no marker component required (default).\n */\n scope?: CombosDevelopmentToolSelectScope;\n}\n\nconst OUTLINE_GO_NAME = '__combosDevelopmentToolOutline';\n\ntype SetPayload = { enabled?: boolean };\n\ntype PickBounds = { x: number; y: number; width: number; height: number };\n\n/**\n * **Defaults:** `scope: 'scene'`, **off** at start (no tap hijack until enabled).\n * Turn on/off via:\n * - `window.dispatchEvent(new CustomEvent(COMBOS_DEVELOPMENT_TOOL_SET, { detail: { enabled: true } }))`\n * - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)\n * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`\n *\n * With `scope: 'scene'`, while enabled: `game.emit(COMBOS_DEVELOPMENT_TOOL_REFRESH)`, `window` event `combos-development-tool:refresh`, or `postMessage({ type: 'combos-development-tool:refresh' })` to re-bind after adding/removing objects.\n */\n@decorators.componentObserver({\n CombosDevelopmentToolTarget: [],\n})\nexport default class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSystemParams> {\n static systemName = 'CombosDevelopmentToolSystem';\n\n private postMessageOrigin = '*';\n private scope: CombosDevelopmentToolSelectScope = 'scene';\n private enabled = false;\n private outlineGo: GameObject | null = null;\n private selected: GameObject | null = null;\n private readonly tapHandlers = new Map<number, (payload?: TapEventPayload) => void>();\n private readonly tapOwners = new Map<number, GameObject>();\n /** We added `Event` for hit-testing; remove on teardown when disabling / releaseTap. */\n private readonly injectedEvents = new Set<number>();\n private needsSceneRescan = false;\n private needsTaggedRescan = false;\n\n private readonly onWindowSet = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetPayload>).detail;\n if (d && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n }\n };\n\n private readonly onWindowMessage = (e: MessageEvent) => {\n const d = e.data;\n if (!d || typeof d !== 'object') return;\n if (d.type === COMBOS_DEVELOPMENT_TOOL_SET && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_REFRESH) {\n this.requestSceneRescan();\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY) {\n this.handleApplyProperty(d as ApplyPropertyPayload);\n }\n };\n\n private readonly onGameSet = (payload: SetPayload) => {\n if (payload && typeof payload.enabled === 'boolean') {\n this.setEnabled(payload.enabled);\n }\n };\n\n private readonly onGameRefresh = () => {\n this.requestSceneRescan();\n };\n\n private readonly onWindowRefresh = () => {\n this.requestSceneRescan();\n };\n\n init(params?: CombosDevelopmentToolSystemParams) {\n this.postMessageOrigin = params?.postMessageOrigin ?? '*';\n this.scope = params?.scope ?? 'scene';\n\n if (typeof window !== 'undefined') {\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.addEventListener('message', this.onWindowMessage);\n }\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n\n if (this.enabled && this.scope === 'scene') {\n this.needsSceneRescan = true;\n } else if (this.enabled && this.scope === 'tagged') {\n this.needsTaggedRescan = true;\n }\n }\n\n onDestroy() {\n if (typeof window !== 'undefined') {\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.removeEventListener('message', this.onWindowMessage);\n }\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n this.detachAllTaps();\n this.clearSelection();\n }\n\n /** Programmatic toggle (same effect as events). */\n setEnabled(on: boolean) {\n if (this.enabled === on) return;\n this.enabled = on;\n if (!on) {\n this.clearSelection();\n this.detachAllTaps();\n } else if (this.scope === 'scene') {\n this.needsSceneRescan = true;\n } else {\n this.needsTaggedRescan = true;\n }\n }\n\n get isEnabled(): boolean {\n return this.enabled;\n }\n\n update(e: UpdateParams) {\n if (this.enabled && this.needsSceneRescan && this.scope === 'scene') {\n this.needsSceneRescan = false;\n this.attachSceneTree();\n }\n\n if (this.enabled && this.needsTaggedRescan && this.scope === 'tagged') {\n this.needsTaggedRescan = false;\n this.attachTaggedObjects();\n }\n\n for (const go of [...this.tapOwners.values()]) {\n if (go.destroyed) {\n this.releaseTap(go);\n }\n }\n\n if (!this.enabled || !this.selected || !this.outlineGo) return;\n\n const gfxComp = this.outlineGo.getComponent(Graphics);\n if (!gfxComp?.graphics) return;\n\n const bounds = this.resolvePickBounds(this.selected);\n const g = gfxComp.graphics;\n g.clear();\n const t = typeof performance !== 'undefined' ? performance.now() : e.time;\n const pulse = 0.35 + 0.65 * (0.5 + 0.5 * Math.sin(t * 0.012));\n g.rect(bounds.x, bounds.y, bounds.width, bounds.height);\n g.stroke({ width: 4, color: 0x55ffaa, alpha: pulse });\n }\n\n componentChanged(changed: ComponentChanged) {\n if (this.scope === 'scene') return;\n\n const { type, gameObject, componentName } = changed;\n if (!gameObject || componentName !== 'CombosDevelopmentToolTarget') return;\n\n if (type === OBSERVER_TYPE.ADD) {\n this.ensureTap(gameObject);\n } else if (type === OBSERVER_TYPE.REMOVE) {\n this.releaseTap(gameObject);\n if (this.selected === gameObject) {\n this.clearSelection();\n }\n }\n }\n\n /** Re-bind scene taps when `scope === 'scene'` (e.g. after dynamic spawn). */\n requestSceneRescan() {\n if (!this.enabled) return;\n if (this.scope === 'scene') {\n this.needsSceneRescan = true;\n } else {\n this.needsTaggedRescan = true;\n }\n }\n\n private attachTaggedObjects() {\n const list: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, list);\n }\n for (const go of list) {\n if (go.name === OUTLINE_GO_NAME) continue;\n if (go === this.outlineGo) continue;\n if (!go.getComponent(CombosDevelopmentToolTarget)) continue;\n this.ensureTap(go);\n }\n }\n\n private attachSceneTree() {\n this.detachAllTaps();\n const list: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, list);\n }\n for (const go of list) {\n if (go.name === OUTLINE_GO_NAME) continue;\n if (go === this.outlineGo) continue;\n this.ensureTap(go);\n }\n }\n\n private collectGameObjects(go: GameObject, out: GameObject[]) {\n out.push(go);\n for (const tr of go.transform.children) {\n this.collectGameObjects(tr.gameObject, out);\n }\n }\n\n private detachAllTaps() {\n for (const go of [...this.tapOwners.values()]) {\n this.releaseTap(go);\n }\n }\n\n private ensureTap(go: GameObject) {\n let ev = go.getComponent(Event);\n if (!ev) {\n ev = go.addComponent(this.createInjectedEvent(go));\n this.injectedEvents.add(go.id);\n }\n\n if (this.tapHandlers.has(go.id)) return;\n\n const handler = (payload?: TapEventPayload) => this.onSelect(go, payload);\n this.tapHandlers.set(go.id, handler);\n this.tapOwners.set(go.id, go);\n ev.on('tap', handler);\n }\n\n private createInjectedEvent(go: GameObject): Event {\n const { width, height } = go.transform.size;\n if (width > 0 && height > 0) {\n return new Event({\n hitArea: {\n type: HIT_AREA_TYPE.Rect,\n style: { x: 0, y: 0, width, height },\n },\n });\n }\n\n const bounds = this.resolveContainerLocalBounds(go);\n if (bounds) {\n return new Event({\n hitArea: {\n type: HIT_AREA_TYPE.Rect,\n style: {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n },\n },\n });\n }\n\n // Let Pixi use natural rendered bounds instead of forcing a 1×1 hit area.\n return new Event();\n }\n\n private resolvePickBounds(go: GameObject): PickBounds {\n const { width, height } = go.transform.size;\n if (width > 0 && height > 0) {\n return { x: 0, y: 0, width, height };\n }\n\n const fromContainer = this.resolveContainerLocalBounds(go);\n if (fromContainer) {\n return fromContainer;\n }\n\n return { x: 0, y: 0, width: 1, height: 1 };\n }\n\n private resolveContainerLocalBounds(go: GameObject): PickBounds | null {\n const container = this.getRendererContainer(go);\n if (!container) return null;\n\n try {\n const bounds = container.getLocalBounds();\n if (bounds.width > 0 && bounds.height > 0) {\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n }\n } catch {\n /* ignore */\n }\n\n return null;\n }\n\n private getRendererContainer(go: GameObject) {\n const rendererSystem = this.game.getSystem(RendererSystem) as RendererSystem | undefined;\n if (!rendererSystem?.containerManager) return null;\n\n try {\n return rendererSystem.containerManager.getContainer(go.id);\n } catch {\n return null;\n }\n }\n\n private releaseTap(go: GameObject) {\n const handler = this.tapHandlers.get(go.id);\n if (!handler) return;\n const ev = go.getComponent(Event);\n ev?.off('tap', handler);\n this.tapHandlers.delete(go.id);\n this.tapOwners.delete(go.id);\n if (this.injectedEvents.has(go.id)) {\n try {\n go.removeComponent(Event);\n } catch {\n /* ignore */\n }\n this.injectedEvents.delete(go.id);\n }\n }\n\n private ensureOutline() {\n if (this.outlineGo) return;\n const go = new GameObject(OUTLINE_GO_NAME, {\n size: { width: 1, height: 1 },\n position: { x: 0, y: 0 },\n origin: { x: 0, y: 0 },\n });\n go.addComponent(new Graphics());\n this.outlineGo = go;\n }\n\n private onSelect(go: GameObject, tap?: TapEventPayload) {\n if (!this.enabled) return;\n\n this.ensureOutline();\n if (!this.outlineGo) return;\n\n this.selected = go;\n\n if (this.outlineGo.parent) {\n this.outlineGo.remove();\n }\n go.addChild(this.outlineGo);\n\n const snapshot = buildGameObjectSnapshot(go);\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: tap?.data?.position ?? null,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n }\n\n private findGameObjectById(id: number): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n return stack.find(go => go.id === id) ?? null;\n }\n\n private findGameObjectBySource(source: SceneSourceAnchor): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n\n const wantFile = source.file.trim();\n const wantAnchor = (source.anchor ?? '').trim();\n if (!wantAnchor) {\n return null;\n }\n\n for (const go of stack) {\n const anchor = readSourceAnchor(go);\n if (!anchor || anchor.file !== wantFile) {\n continue;\n }\n const resolvedAnchor = anchor.anchor ?? go.name;\n if (resolvedAnchor === wantAnchor) {\n return go;\n }\n }\n\n return null;\n }\n\n private resolveApplyTarget(payload: ApplyPropertyPayload): GameObject | null {\n if (typeof payload.gameObjectId === 'number') {\n const byId = this.findGameObjectById(payload.gameObjectId);\n if (byId) {\n return byId;\n }\n }\n\n const file = payload.source?.file?.trim();\n const anchor = payload.source?.anchor?.trim();\n if (!file || !anchor) {\n return null;\n }\n\n return this.findGameObjectBySource({ file, anchor });\n }\n\n private handleApplyProperty(payload: ApplyPropertyPayload) {\n const componentName = payload.componentName;\n const path = payload.path;\n const hasId = typeof payload.gameObjectId === 'number';\n const hasSource =\n Boolean(payload.source?.file?.trim()) && Boolean(payload.source?.anchor?.trim());\n\n if (\n (!hasId && !hasSource) ||\n typeof componentName !== 'string' ||\n !Array.isArray(path) ||\n path.length === 0\n ) {\n return;\n }\n\n const go = this.resolveApplyTarget(payload);\n if (!go) return;\n\n const applied = applyPropertyWithHooks(go, componentName, path, payload.value);\n if (!applied) return;\n\n if (this.selected?.id === go.id) {\n this.postSnapshotUpdate(go);\n }\n }\n\n private postSnapshotUpdate(go: GameObject) {\n const snapshot = buildGameObjectSnapshot(go);\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(\n {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: null,\n source: 'property-applied',\n },\n this.postMessageOrigin,\n );\n }\n }\n\n private clearSelection() {\n this.selected = null;\n if (this.outlineGo?.parent) {\n this.outlineGo.remove();\n }\n const gfx = this.outlineGo?.getComponent(Graphics);\n if (gfx?.graphics) {\n gfx.graphics.clear();\n }\n }\n}\n","/** Auto-generated by scripts/build-package.mjs — do not edit. */\n\nimport CombosDevelopmentToolSystem from './CombosDevelopmentToolSystem';\n\nObject.assign(CombosDevelopmentToolSystem, {\n packageName: \"@combos-fun/plugin-development-tool\",\n packageVersion: \"0.0.15\",\n});\n"],"names":["CombosDevelopmentToolSystem"],"mappings":";;;;;;AAAA;AACO,MAAM,2BAA2B,GAAG;AAE3C;AACO,MAAM,+BAA+B,GAAG;AAE/C;AACO,MAAM,2CAA2C,GACtD;AAEF;AACO,MAAM,sCAAsC,GACjD;AAEF;AACO,MAAM,6BAA6B,GAAG;;ACR7C;;;AAGG;AACW,MAAO,2BAA4B,SAAQ,SAA4C,CAAA;AAArG,IAAA,WAAA,GAAA;;QAGE,IAAA,CAAA,OAAO,GAA4B,EAAE;IAKvC;aAPS,IAAA,CAAA,aAAa,GAAG,6BAAH,CAAiC;AAIrD,IAAA,IAAI,CAAC,MAA0C,EAAA;AAC7C,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,EAAE,OAAO,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE;IAC7D;;;ACSI,SAAU,mBAAmB,CAAC,CAAU,EAAA;IAC5C,QACE,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,QAAQ;AACrB,QAAA,OAAQ,CAAuB,CAAC,IAAI,KAAK,QAAQ;AAEr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AO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,EAAE;AAC9E,YAAA,MAAM,CAAC,MAAM,CAAC,WAAW,CACvB;AACE,gBAAA,IAAI,EAAE,2CAA2C;gBACjD,QAAQ;AACR,gBAAA,OAAO,EAAE,IAAI;AACb,gBAAA,MAAM,EAAE,kBAAkB;AAC3B,aAAA,EACD,IAAI,CAAC,iBAAiB,CACvB;QACH;IACF;IAEQ,cAAc,GAAA;AACpB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;AACpB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE;AAC1B,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;QACzB;QACA,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,QAAQ,CAAC;AAClD,QAAA,IAAI,GAAG,EAAE,QAAQ,EAAE;AACjB,YAAA,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE;QACtB;IACF;;AAtbmB,2BAA2B,GAAA,UAAA,CAAA;IAH/C,UAAU,CAAC,iBAAiB,CAAC;AAC5B,QAAA,2BAA2B,EAAE,EAAE;KAChC;AACoB,CAAA,EAAA,2BAA2B,CAub/C;oCAvboB,2BAA2B;;ACnEhD;AAIA,MAAM,CAAC,MAAM,CAACA,6BAA2B,EAAE;AACzC,IAAA,WAAW,EAAE,qCAAqC;AAClD,IAAA,cAAc,EAAE,QAAQ;AACzB,CAAA,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin-development-tool.esm.js","sources":["../lib/constants.ts","../lib/CombosDevelopmentToolTarget.ts","../lib/sceneEditTypes.ts","../lib/sceneEditSerialize.ts","../lib/sceneEditApplyHooks.ts","../lib/CombosDevelopmentToolSystem.ts","../lib/__combosPackageMeta.gen.ts"],"sourcesContent":["/** Toggle development-tool selection / parent postMessage. Payload: `{ enabled: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET = 'combos-development-tool:set' as const;\n\n/** Re-scan the scene tree (only when `CombosDevelopmentToolSystem` uses `scope: 'scene'`). */\nexport const COMBOS_DEVELOPMENT_TOOL_REFRESH = 'combos-development-tool:refresh' as const;\n\n/** Emitted to `window.parent` when an object is selected while the tool is on. */\nexport const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED =\n 'combos-development-tool:gameobject-selected' as const;\n\n/** Parent → iframe: apply a value to a component field (live preview). */\nexport const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY =\n 'combos-development-tool:apply-property' as const;\n\n/** iframe → parent: game scene bootstrap finished; parent may enable pick mode. */\nexport const COMBOS_DEVELOPMENT_TOOL_READY = 'combos-development-tool:ready' as const;\n","import { Component, ComponentParams } from '@combos-fun/engine';\n\nexport interface CombosDevelopmentToolTargetParams extends ComponentParams {\n /** Extra JSON-serializable fields included in postMessage to parent. */\n payload?: Record<string, unknown>;\n}\n\n/**\n * Optional marker when using `CombosDevelopmentToolSystem` with `scope: 'tagged'`, or to attach\n * extra `payload` on specific objects while using `scope: 'scene'` (serialization reads it if present).\n */\nexport default class CombosDevelopmentToolTarget extends Component<CombosDevelopmentToolTargetParams> {\n static componentName = 'CombosDevelopmentToolTarget';\n\n payload: Record<string, unknown> = {};\n\n init(params?: CombosDevelopmentToolTargetParams) {\n this.payload = params?.payload ? { ...params.payload } : {};\n }\n}\n","/** Optional bootstrap anchor stored on {@link CombosDevelopmentToolTarget}.payload.source */\nexport interface SceneSourceAnchor {\n /** Project-relative path, e.g. `src/index.ts` */\n file: string;\n /** Variable name in bootstrap (`const poster = …`) or stable key; defaults to gameObject name */\n anchor?: string;\n}\n\nexport interface SceneEditPropertyRef {\n gameObjectId: number;\n gameObjectName: string;\n componentName: string;\n path: string[];\n}\n\nexport interface SceneEditComponentSnapshot {\n componentName: string;\n fields: Record<string, unknown>;\n}\n\nexport interface SceneEditGameObjectSnapshot {\n id: number;\n name: string;\n components: SceneEditComponentSnapshot[];\n source?: SceneSourceAnchor;\n}\n\nexport function isSceneSourceAnchor(v: unknown): v is SceneSourceAnchor {\n return (\n !!v &&\n typeof v === 'object' &&\n typeof (v as SceneSourceAnchor).file === 'string'\n );\n}\n","import { Component, GameObject } from '@combos-fun/engine';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport {\n isSceneSourceAnchor,\n type SceneEditComponentSnapshot,\n type SceneEditGameObjectSnapshot,\n type SceneSourceAnchor,\n} from './sceneEditTypes';\n\nconst SKIP_KEYS = new Set([\n 'gameObject',\n 'name',\n 'started',\n '__componentDefaultParams',\n 'destroyed',\n 'inScene',\n 'worldTransform',\n 'children',\n '_parent',\n]);\n\nconst COMPONENT_SKIP_KEYS: Record<string, ReadonlySet<string>> = {\n Physics: new Set([\n 'body',\n 'Body',\n 'PhysicsEngine',\n 'World',\n 'Constraint',\n 'mouseConstraint',\n 'bodyParams',\n ]),\n Event: new Set(['hitArea']),\n};\n\nfunction cloneJsonSafe(value: unknown, depth = 0): unknown {\n if (value === null || value === undefined) return value;\n if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean') {\n return value;\n }\n if (depth > 6) return undefined;\n if (Array.isArray(value)) {\n return value.map(item => cloneJsonSafe(item, depth + 1));\n }\n if (typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value as Record<string, unknown>)) {\n if (typeof v === 'function') continue;\n const cloned = cloneJsonSafe(v, depth + 1);\n if (cloned !== undefined) out[k] = cloned;\n }\n return out;\n }\n return undefined;\n}\n\nfunction serializeComponent(comp: Component): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n const componentSkips = COMPONENT_SKIP_KEYS[comp.name];\n for (const key of Object.keys(comp)) {\n if (SKIP_KEYS.has(key) || key.startsWith('_')) continue;\n if (componentSkips?.has(key)) continue;\n const value = (comp as Record<string, unknown>)[key];\n if (typeof value === 'function') continue;\n const cloned = cloneJsonSafe(value);\n if (cloned !== undefined) out[key] = cloned;\n }\n return out;\n}\n\nexport function readSourceAnchor(go: GameObject): SceneSourceAnchor | undefined {\n const tag = go.getComponent(CombosDevelopmentToolTarget);\n const raw = tag?.payload?.source;\n if (!isSceneSourceAnchor(raw)) return undefined;\n return {\n file: raw.file,\n anchor: raw.anchor ?? go.name,\n };\n}\n\nexport function buildGameObjectSnapshot(go: GameObject): SceneEditGameObjectSnapshot {\n const components: SceneEditComponentSnapshot[] = go.components\n .filter(c => c.name !== 'CombosDevelopmentToolTarget')\n .map(c => ({\n componentName: c.name,\n fields: serializeComponent(c),\n }));\n\n return {\n id: go.id,\n name: go.name,\n components,\n source: readSourceAnchor(go),\n };\n}\n\nexport function applyPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return false;\n\n let target: Record<string, unknown> = comp as unknown as Record<string, unknown>;\n for (let i = 0; i < path.length - 1; i++) {\n const key = path[i];\n if (target[key] === undefined || target[key] === null) {\n target[key] = {};\n }\n target = target[key] as Record<string, unknown>;\n }\n\n target[path[path.length - 1]] = value;\n return true;\n}\n\nexport function readPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n): unknown {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return undefined;\n\n let target: unknown = comp;\n for (const key of path) {\n if (target === null || target === undefined || typeof target !== 'object') {\n return undefined;\n }\n target = (target as Record<string, unknown>)[key];\n }\n return target;\n}\n","import type { Component, GameObject } from '@combos-fun/engine';\nimport { applyPropertyValue } from './sceneEditSerialize';\n\ntype SceneEditApplyHook = (\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n) => boolean;\n\nconst TRANSFORM_VECTOR_KEYS = new Set([\n 'position',\n 'size',\n 'origin',\n 'anchor',\n 'scale',\n 'skew',\n]);\n\ntype PhysicsLike = {\n body?: { position: { x: number; y: number }; angle?: number };\n bodyParams?: { stopRotation?: boolean };\n Body?: { setPosition: (body: unknown, pos: { x: number; y: number }) => void; setAngle?: (body: unknown, angle: number) => void };\n};\n\ntype MoverLike = {\n originX: number;\n originY: number;\n};\n\nfunction asNumber(value: unknown): number | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '') {\n const next = Number(value);\n return Number.isFinite(next) ? next : undefined;\n }\n return undefined;\n}\n\nfunction syncPhysicsBodyFromTransform(go: GameObject): void {\n const physics = go.getComponent('Physics') as PhysicsLike | undefined;\n if (!physics?.body) {\n return;\n }\n\n const { x, y } = go.transform.position;\n if (physics.Body?.setPosition) {\n physics.Body.setPosition(physics.body, { x, y });\n return;\n }\n\n physics.body.position.x = x;\n physics.body.position.y = y;\n}\n\nfunction syncMoverOriginFromTransform(go: GameObject): void {\n const mover = go.getComponent('PlatformerMover') as MoverLike | undefined;\n if (!mover) {\n return;\n }\n mover.originX = go.transform.position.x;\n mover.originY = go.transform.position.y;\n}\n\nfunction applyTransformProperty(\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const transform = go.transform ?? comp;\n const transformRecord = transform as unknown as Record<string, unknown>;\n\n if (path.length === 1 && path[0] === 'rotation') {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n transform.rotation = next;\n return true;\n }\n\n if (path.length === 2 && TRANSFORM_VECTOR_KEYS.has(path[0])) {\n const groupKey = path[0];\n const leafKey = path[1];\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n\n const group = transformRecord[groupKey];\n if (!group || typeof group !== 'object') {\n return false;\n }\n\n (group as Record<string, unknown>)[leafKey] = next;\n\n if (groupKey === 'position') {\n syncPhysicsBodyFromTransform(go);\n syncMoverOriginFromTransform(go);\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction applyTextProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const textComp = comp as Component & { text?: string; style?: Record<string, unknown> };\n\n if (path.length === 1 && path[0] === 'text') {\n textComp.text = String(value ?? '');\n return true;\n }\n\n if (path.length === 2 && path[0] === 'style') {\n const styleKey = path[1];\n const nextStyle = { ...(textComp.style ?? {}), [styleKey]: value };\n textComp.style = nextStyle;\n return true;\n }\n\n return false;\n}\n\nfunction applySoundProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const soundComp = comp as Component & { volume?: number };\n\n if (\n (path.length === 1 && path[0] === 'volume') ||\n (path.length === 2 && path[0] === 'config' && path[1] === 'volume')\n ) {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n soundComp.volume = next;\n return true;\n }\n\n return false;\n}\n\nconst APPLY_HOOKS: Record<string, SceneEditApplyHook> = {\n Transform: applyTransformProperty,\n Text: applyTextProperty,\n Sound: applySoundProperty,\n};\n\nexport function applyPropertyWithHooks(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) {\n return false;\n }\n\n const hook = APPLY_HOOKS[componentName];\n if (hook?.(go, comp, path, value)) {\n return true;\n }\n\n return applyPropertyValue(go, componentName, path, value);\n}\n","import {\n ComponentChanged,\n GameObject,\n OBSERVER_TYPE,\n System,\n UpdateParams,\n decorators,\n} from '@combos-fun/engine';\nimport { RendererSystem } from '@combos-fun/plugin-renderer';\nimport { Graphics } from '@combos-fun/plugin-renderer-graphics';\nimport { Event, HIT_AREA_TYPE } from '@combos-fun/plugin-renderer-event';\nimport {\n COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY,\n COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n COMBOS_DEVELOPMENT_TOOL_REFRESH,\n COMBOS_DEVELOPMENT_TOOL_SET,\n} from './constants';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport { applyPropertyWithHooks } from './sceneEditApplyHooks';\nimport { buildGameObjectSnapshot, readSourceAnchor } from './sceneEditSerialize';\n\nimport type { SceneSourceAnchor } from './sceneEditTypes';\n\ntype TapEventPayload = {\n data?: {\n position?: { x: number; y: number };\n };\n};\n\ntype TapListener = (payload?: TapEventPayload) => void;\n\ntype ApplyPropertyPayload = {\n gameObjectId?: number;\n source?: SceneSourceAnchor;\n componentName?: string;\n path?: string[];\n value?: unknown;\n};\n\nexport type CombosDevelopmentToolSelectScope = 'tagged' | 'scene';\n\nexport interface CombosDevelopmentToolSystemParams {\n /** postMessage `targetOrigin` when notifying parent (default `'*'`). */\n postMessageOrigin?: string;\n /**\n * - `tagged`: only `GameObject`s with {@link CombosDevelopmentToolTarget} participate (optional `payload`).\n * - `scene`: all objects under `game.scene` (except the outline helper) get tap → outline + postMessage; no marker component required (default).\n */\n scope?: CombosDevelopmentToolSelectScope;\n}\n\nconst OUTLINE_GO_NAME = '__combosDevelopmentToolOutline';\n\ntype SetPayload = { enabled?: boolean };\n\ntype PickBounds = { x: number; y: number; width: number; height: number };\n\n/**\n * **Defaults:** `scope: 'scene'`, **off** at start (no tap hijack until enabled).\n * While enabled, game `Event` `tap` listeners are removed and restored on disable.\n * Turn on/off via:\n * - `window.dispatchEvent(new CustomEvent(COMBOS_DEVELOPMENT_TOOL_SET, { detail: { enabled: true } }))`\n * - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)\n * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`\n *\n * With `scope: 'scene'`, while enabled: `game.emit(COMBOS_DEVELOPMENT_TOOL_REFRESH)`, `window` event `combos-development-tool:refresh`, or `postMessage({ type: 'combos-development-tool:refresh' })` to re-bind after adding/removing objects.\n */\n@decorators.componentObserver({\n CombosDevelopmentToolTarget: [],\n})\nexport default class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSystemParams> {\n static systemName = 'CombosDevelopmentToolSystem';\n\n private postMessageOrigin = '*';\n private scope: CombosDevelopmentToolSelectScope = 'scene';\n private enabled = false;\n private outlineGo: GameObject | null = null;\n private selected: GameObject | null = null;\n private readonly tapHandlers = new Map<number, TapListener>();\n private readonly tapOwners = new Map<number, GameObject>();\n /** Game `tap` listeners removed while enabled; restored on disable. */\n private readonly savedTapListeners = new Map<number, TapListener[]>();\n /** We added `Event` for hit-testing; remove on teardown when disabling / releaseTap. */\n private readonly injectedEvents = new Set<number>();\n private needsSceneRescan = false;\n private needsTaggedRescan = false;\n\n private readonly onWindowSet = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetPayload>).detail;\n if (d && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n }\n };\n\n private readonly onWindowMessage = (e: MessageEvent) => {\n const d = e.data;\n if (!d || typeof d !== 'object') return;\n if (d.type === COMBOS_DEVELOPMENT_TOOL_SET && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_REFRESH) {\n this.requestSceneRescan();\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY) {\n this.handleApplyProperty(d as ApplyPropertyPayload);\n }\n };\n\n private readonly onGameSet = (payload: SetPayload) => {\n if (payload && typeof payload.enabled === 'boolean') {\n this.setEnabled(payload.enabled);\n }\n };\n\n private readonly onGameRefresh = () => {\n this.requestSceneRescan();\n };\n\n private readonly onWindowRefresh = () => {\n this.requestSceneRescan();\n };\n\n init(params?: CombosDevelopmentToolSystemParams) {\n this.postMessageOrigin = params?.postMessageOrigin ?? '*';\n this.scope = params?.scope ?? 'scene';\n\n if (typeof window !== 'undefined') {\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.addEventListener('message', this.onWindowMessage);\n }\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n\n if (this.enabled && this.scope === 'scene') {\n this.needsSceneRescan = true;\n } else if (this.enabled && this.scope === 'tagged') {\n this.needsTaggedRescan = true;\n }\n }\n\n onDestroy() {\n if (typeof window !== 'undefined') {\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.removeEventListener('message', this.onWindowMessage);\n }\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n this.detachAllTaps();\n this.clearSelection();\n }\n\n /** Programmatic toggle (same effect as events). */\n setEnabled(on: boolean) {\n if (this.enabled === on) return;\n this.enabled = on;\n if (!on) {\n this.clearSelection();\n this.detachAllTaps();\n } else if (this.scope === 'scene') {\n this.needsSceneRescan = true;\n } else {\n this.needsTaggedRescan = true;\n }\n }\n\n get isEnabled(): boolean {\n return this.enabled;\n }\n\n update(e: UpdateParams) {\n if (this.enabled && this.needsSceneRescan && this.scope === 'scene') {\n this.needsSceneRescan = false;\n this.attachSceneTree();\n }\n\n if (this.enabled && this.needsTaggedRescan && this.scope === 'tagged') {\n this.needsTaggedRescan = false;\n this.attachTaggedObjects();\n }\n\n for (const go of [...this.tapOwners.values()]) {\n if (go.destroyed) {\n this.releaseTap(go);\n }\n }\n\n if (!this.enabled || !this.selected || !this.outlineGo) return;\n\n const gfxComp = this.outlineGo.getComponent(Graphics);\n if (!gfxComp?.graphics) return;\n\n const bounds = this.resolvePickBounds(this.selected);\n const g = gfxComp.graphics;\n g.clear();\n const t = typeof performance !== 'undefined' ? performance.now() : e.time;\n const pulse = 0.35 + 0.65 * (0.5 + 0.5 * Math.sin(t * 0.012));\n g.rect(bounds.x, bounds.y, bounds.width, bounds.height);\n g.stroke({ width: 4, color: 0x55ffaa, alpha: pulse });\n }\n\n componentChanged(changed: ComponentChanged) {\n if (this.scope === 'scene') return;\n\n const { type, gameObject, componentName } = changed;\n if (!gameObject || componentName !== 'CombosDevelopmentToolTarget') return;\n\n if (type === OBSERVER_TYPE.ADD) {\n this.ensureTap(gameObject);\n } else if (type === OBSERVER_TYPE.REMOVE) {\n this.releaseTap(gameObject);\n if (this.selected === gameObject) {\n this.clearSelection();\n }\n }\n }\n\n /** Re-bind scene taps when `scope === 'scene'` (e.g. after dynamic spawn). */\n requestSceneRescan() {\n if (!this.enabled) return;\n if (this.scope === 'scene') {\n this.needsSceneRescan = true;\n } else {\n this.needsTaggedRescan = true;\n }\n }\n\n private attachTaggedObjects() {\n const list: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, list);\n }\n for (const go of list) {\n if (go.name === OUTLINE_GO_NAME) continue;\n if (go === this.outlineGo) continue;\n if (!go.getComponent(CombosDevelopmentToolTarget)) continue;\n this.ensureTap(go);\n }\n }\n\n private attachSceneTree() {\n this.detachAllTaps(false);\n const list: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, list);\n }\n for (const go of list) {\n if (go.name === OUTLINE_GO_NAME) continue;\n if (go === this.outlineGo) continue;\n this.ensureTap(go);\n }\n }\n\n private collectGameObjects(go: GameObject, out: GameObject[]) {\n out.push(go);\n for (const tr of go.transform.children) {\n this.collectGameObjects(tr.gameObject, out);\n }\n }\n\n private detachAllTaps(restore = true) {\n for (const go of [...this.tapOwners.values()]) {\n this.releaseTap(go, restore);\n }\n }\n\n private ensureTap(go: GameObject) {\n let ev = go.getComponent(Event);\n if (!ev) {\n ev = go.addComponent(this.createInjectedEvent(go));\n this.injectedEvents.add(go.id);\n }\n\n if (this.tapHandlers.has(go.id)) return;\n\n if (!this.savedTapListeners.has(go.id)) {\n const existing = ev.listeners('tap') as TapListener[];\n this.savedTapListeners.set(go.id, [...existing]);\n }\n\n ev.removeAllListeners('tap');\n\n const handler: TapListener = payload => this.onSelect(go, payload);\n this.tapHandlers.set(go.id, handler);\n this.tapOwners.set(go.id, go);\n ev.on('tap', handler);\n }\n\n private createInjectedEvent(go: GameObject): Event {\n const bounds = this.resolvePickBounds(go);\n if (bounds.width > 0 && bounds.height > 0) {\n return new Event({\n hitArea: {\n type: HIT_AREA_TYPE.Rect,\n style: {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n },\n },\n });\n }\n\n // Let Pixi use natural rendered bounds instead of forcing a 1×1 hit area.\n return new Event();\n }\n\n private resolvePickBounds(go: GameObject): PickBounds {\n // Graphics draws in arbitrary local coordinates (often centered at 0,0).\n // transform.size is a layout box from (0,0) and must not override Pixi bounds.\n if (this.shouldPreferRenderedBounds(go)) {\n const fromGraphics = this.resolveContainerLocalBounds(go);\n if (fromGraphics) {\n return fromGraphics;\n }\n }\n\n const { width, height } = go.transform.size;\n if (width > 0 && height > 0) {\n return { x: 0, y: 0, width, height };\n }\n\n const fromContainer = this.resolveContainerLocalBounds(go);\n if (fromContainer) {\n return fromContainer;\n }\n\n return { x: 0, y: 0, width: 1, height: 1 };\n }\n\n private shouldPreferRenderedBounds(go: GameObject): boolean {\n return go.getComponent(Graphics) != null;\n }\n\n private resolveContainerLocalBounds(go: GameObject): PickBounds | null {\n const container = this.getRendererContainer(go);\n if (!container) return null;\n\n try {\n const bounds = container.getLocalBounds();\n if (bounds.width > 0 && bounds.height > 0) {\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n }\n } catch {\n /* ignore */\n }\n\n return null;\n }\n\n private getRendererContainer(go: GameObject) {\n const rendererSystem = this.game.getSystem(RendererSystem) as RendererSystem | undefined;\n if (!rendererSystem?.containerManager) return null;\n\n try {\n return rendererSystem.containerManager.getContainer(go.id);\n } catch {\n return null;\n }\n }\n\n private releaseTap(go: GameObject, restore = true) {\n const handler = this.tapHandlers.get(go.id);\n if (!handler) return;\n\n const ev = go.getComponent(Event);\n ev?.off('tap', handler);\n this.tapHandlers.delete(go.id);\n this.tapOwners.delete(go.id);\n\n if (restore) {\n const saved = this.savedTapListeners.get(go.id);\n if (saved && saved.length > 0 && ev) {\n for (const fn of saved) {\n ev.on('tap', fn);\n }\n }\n this.savedTapListeners.delete(go.id);\n\n if (this.injectedEvents.has(go.id)) {\n try {\n go.removeComponent(Event);\n } catch {\n /* ignore */\n }\n this.injectedEvents.delete(go.id);\n }\n }\n }\n\n private ensureOutline() {\n if (this.outlineGo) return;\n const go = new GameObject(OUTLINE_GO_NAME, {\n size: { width: 1, height: 1 },\n position: { x: 0, y: 0 },\n origin: { x: 0, y: 0 },\n });\n go.addComponent(new Graphics());\n this.outlineGo = go;\n }\n\n private onSelect(go: GameObject, tap?: TapEventPayload) {\n if (!this.enabled) return;\n\n this.ensureOutline();\n if (!this.outlineGo) return;\n\n this.selected = go;\n\n if (this.outlineGo.parent) {\n this.outlineGo.remove();\n }\n go.addChild(this.outlineGo);\n\n const snapshot = buildGameObjectSnapshot(go);\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: tap?.data?.position ?? null,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n }\n\n private findGameObjectById(id: number): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n return stack.find(go => go.id === id) ?? null;\n }\n\n private findGameObjectBySource(source: SceneSourceAnchor): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n\n const wantFile = source.file.trim();\n const wantAnchor = (source.anchor ?? '').trim();\n if (!wantAnchor) {\n return null;\n }\n\n for (const go of stack) {\n const anchor = readSourceAnchor(go);\n if (!anchor || anchor.file !== wantFile) {\n continue;\n }\n const resolvedAnchor = anchor.anchor ?? go.name;\n if (resolvedAnchor === wantAnchor) {\n return go;\n }\n }\n\n return null;\n }\n\n private resolveApplyTarget(payload: ApplyPropertyPayload): GameObject | null {\n if (typeof payload.gameObjectId === 'number') {\n const byId = this.findGameObjectById(payload.gameObjectId);\n if (byId) {\n return byId;\n }\n }\n\n const file = payload.source?.file?.trim();\n const anchor = payload.source?.anchor?.trim();\n if (!file || !anchor) {\n return null;\n }\n\n return this.findGameObjectBySource({ file, anchor });\n }\n\n private handleApplyProperty(payload: ApplyPropertyPayload) {\n const componentName = payload.componentName;\n const path = payload.path;\n const hasId = typeof payload.gameObjectId === 'number';\n const hasSource =\n Boolean(payload.source?.file?.trim()) && Boolean(payload.source?.anchor?.trim());\n\n if (\n (!hasId && !hasSource) ||\n typeof componentName !== 'string' ||\n !Array.isArray(path) ||\n path.length === 0\n ) {\n return;\n }\n\n const go = this.resolveApplyTarget(payload);\n if (!go) return;\n\n const applied = applyPropertyWithHooks(go, componentName, path, payload.value);\n if (!applied) return;\n\n if (this.selected?.id === go.id) {\n this.postSnapshotUpdate(go);\n }\n }\n\n private postSnapshotUpdate(go: GameObject) {\n const snapshot = buildGameObjectSnapshot(go);\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(\n {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: null,\n source: 'property-applied',\n },\n this.postMessageOrigin,\n );\n }\n }\n\n private clearSelection() {\n this.selected = null;\n if (this.outlineGo?.parent) {\n this.outlineGo.remove();\n }\n const gfx = this.outlineGo?.getComponent(Graphics);\n if (gfx?.graphics) {\n gfx.graphics.clear();\n }\n }\n}\n","/** Auto-generated by scripts/build-package.mjs — do not edit. */\n\nimport CombosDevelopmentToolSystem from './CombosDevelopmentToolSystem';\n\nObject.assign(CombosDevelopmentToolSystem, {\n packageName: \"@combos-fun/plugin-development-tool\",\n packageVersion: \"0.0.17\",\n});\n"],"names":["CombosDevelopmentToolSystem"],"mappings":";;;;;;AAAA;AACO,MAAM,2BAA2B,GAAG;AAE3C;AACO,MAAM,+BAA+B,GAAG;AAE/C;AACO,MAAM,2CAA2C,GACtD;AAEF;AAC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0.0.17",
|
|
4
4
|
"description": "only useful for combos.fun preview page, no need to understand and modify",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-development-tool.esm.js",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
],
|
|
37
37
|
"author": "sun668 <q947692259@gmail.com>",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@combos-fun/plugin-renderer
|
|
40
|
-
"@combos-fun/engine": "0.0.
|
|
41
|
-
"@combos-fun/plugin-renderer-
|
|
42
|
-
"@combos-fun/plugin-renderer": "0.0.
|
|
39
|
+
"@combos-fun/plugin-renderer": "0.0.17",
|
|
40
|
+
"@combos-fun/engine": "0.0.17",
|
|
41
|
+
"@combos-fun/plugin-renderer-event": "0.0.17",
|
|
42
|
+
"@combos-fun/plugin-renderer-graphics": "0.0.17"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "node ../../scripts/build-package.mjs"
|