@craft_eco/craft-mcp 0.1.22 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -7
- package/bin/craft-mcp.mjs +10 -2
- package/dist-server/game-workflow/bundle-files.mjs +43 -0
- package/dist-server/game-workflow/engines.mjs +13 -6
- package/dist-server/game-workflow/project-bundles.mjs +90 -0
- package/dist-server/game-workflow/project-context.mjs +91 -0
- package/dist-server/game-workflow/projects.mjs +16 -4
- package/dist-server/integrations/config.mjs +71 -0
- package/dist-server/integrations/files.mjs +54 -0
- package/dist-server/integrations/hosts.mjs +30 -0
- package/dist-server/integrations/install.mjs +86 -0
- package/dist-server/integrations/runtime.mjs +71 -0
- package/dist-server/mcp/server.mjs +13 -9
- package/dist-server/preview/preview-launcher.mjs +9 -2
- package/dist-server/preview/preview-start.mjs +2 -2
- package/package.json +10 -1
- package/resources/craft-create/SKILL.md +14 -0
- package/resources/craft-game-maker/SKILL.md +77 -71
- package/resources/craft-game-maker/js.md +10 -10
- package/resources/craft-game-maker/js3d.md +13 -13
- package/resources/game_visual_qa.mjs +1149 -1149
- package/resources/js/bundle.json +93 -0
- package/resources/js/context/AGENTS.md +15 -102
- package/resources/js/context/knowledge/AigcWiring.md +5 -196
- package/resources/js/context/knowledge/AssetUrl.md +5 -20
- package/resources/js/context/knowledge/Layout.md +7 -0
- package/resources/js/context/knowledge/Lifecycle.md +6 -27
- package/resources/js/context/skills/aigc-generate/SKILL.md +6 -141
- package/resources/js/context/skills/asset-search/SKILL.md +5 -62
- package/resources/js/context/skills/asset-search/references/resource-config.md +9 -0
- package/resources/js/context/skills/export-config/SKILL.md +7 -19
- package/resources/js/context/skills/export-config/scripts/export-config.mjs +3 -45
- package/resources/js/context/skills/index.json +30 -0
- package/resources/js/context/skills/visual-qa/SKILL.md +6 -28
- package/resources/js/project/README.md +4 -96
- package/resources/js/project/package.json +1 -2
- package/resources/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +1 -37
- package/resources/js/project/scripts/config-export.mjs +10 -34
- package/resources/js3d/bundle.json +104 -0
- package/resources/js3d/context/AGENTS.md +16 -85
- package/resources/js3d/context/knowledge/AigcWiring.md +9 -0
- package/resources/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/js3d/context/knowledge/CodingGuide/Pitfalls.md +9 -67
- package/resources/js3d/context/knowledge/Layout.md +7 -0
- package/resources/js3d/context/knowledge/Runtime.md +5 -30
- package/resources/js3d/context/skills/aigc-integration/SKILL.md +6 -164
- package/resources/js3d/context/skills/asset-search/SKILL.md +5 -171
- package/resources/js3d/context/skills/asset-search/references/resource-config.md +6 -94
- package/resources/js3d/context/skills/asset-usage-audit/SKILL.md +6 -82
- package/resources/js3d/context/skills/export-config/SKILL.md +7 -11
- package/resources/js3d/context/skills/export-config/scripts/export-config.mjs +3 -55
- package/resources/js3d/context/skills/index.json +42 -0
- package/resources/js3d/context/skills/performance-audit/SKILL.md +8 -153
- package/resources/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/js3d/project/README.md +4 -103
- package/resources/js3d/project/package.json +1 -2
- package/resources/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-scene-assets.mjs +3 -28
- package/resources/js3d/project/scripts/config-export.mjs +12 -34
- package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts +8 -0
- package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/build-failure.js +39 -0
- package/vendor/agent-cli/dist/src/artifacts/build-failure.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts +5 -0
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js +45 -0
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js +71 -6
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts +2 -0
- package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/prepare.js +7 -2
- package/vendor/agent-cli/dist/src/artifacts/prepare.js.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts +2 -0
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js +27 -16
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts +14 -0
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js +119 -0
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/static.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/static.js +20 -6
- package/vendor/agent-cli/dist/src/artifacts/static.js.map +1 -1
- package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/cli/process-protocol.js +24 -2
- package/vendor/agent-cli/dist/src/cli/process-protocol.js.map +1 -1
- package/vendor/agent-cli/dist/src/cli/process-steering.d.ts +21 -0
- package/vendor/agent-cli/dist/src/cli/process-steering.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/process-steering.js +66 -0
- package/vendor/agent-cli/dist/src/cli/process-steering.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.js +1 -1
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.js.map +1 -1
- package/vendor/agent-cli/dist/src/index.d.ts +4 -1
- package/vendor/agent-cli/dist/src/index.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/index.js +3 -0
- package/vendor/agent-cli/dist/src/index.js.map +1 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +31 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +19 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/client.d.ts +10 -0
- package/vendor/agent-cli/dist/src/session/client.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/client.js +16 -5
- package/vendor/agent-cli/dist/src/session/client.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/link-session.d.ts +3 -0
- package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/link-session.js +17 -1
- package/vendor/agent-cli/dist/src/session/link-session.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/process-observability.d.ts +3 -0
- package/vendor/agent-cli/dist/src/session/process-observability.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/process-observability.js +11 -0
- package/vendor/agent-cli/dist/src/session/process-observability.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/process-request.d.ts +3 -2
- package/vendor/agent-cli/dist/src/session/process-request.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/process-request.js +27 -9
- package/vendor/agent-cli/dist/src/session/process-request.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +2 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/run-start-body.js +9 -3
- package/vendor/agent-cli/dist/src/session/run-start-body.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/run-steer.d.ts +42 -0
- package/vendor/agent-cli/dist/src/session/run-steer.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-steer.js +205 -0
- package/vendor/agent-cli/dist/src/session/run-steer.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/types.d.ts +10 -0
- package/vendor/agent-cli/dist/src/shared/types.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts +21 -0
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.js +102 -0
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/tools/context-program.js +3 -0
- package/vendor/agent-cli/dist/src/tools/context-program.js.map +1 -1
- package/resources/js/context/.role/AGENTS_DESIGN.md +0 -9
- package/resources/js/context/agents/aigc-asset.md +0 -168
- package/resources/js/context/knowledge/AigcEnabled.md +0 -49
- package/resources/js/context/knowledge/FrontendComponents.md +0 -17
- package/resources/js/context/knowledge/MobileAdaptation.md +0 -73
- package/resources/js/context/knowledge/MobileAdapted.md +0 -36
- package/resources/js/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
- package/resources/js/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -115
- package/resources/js/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -392
- package/resources/js/context/knowledge/PlatformServices.md +0 -190
- package/resources/js/context/knowledge/ProjectDisplayConfig.md +0 -35
- package/resources/js/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
- package/resources/js/context/knowledge/Ui.md +0 -11
- package/resources/js/context/knowledge/UiEditorCompat.md +0 -21
- package/resources/js/context/rules/MultiplayerCapability.md +0 -23
- package/resources/js/context/rules/MultiplayerRoomEntryUX.md +0 -63
- package/resources/js/context/rules/PlatformBoundaryModules.md +0 -44
- package/resources/js/context/rules/preview_ready.md +0 -8
- package/resources/js/context/skills/aigc-generate/knowledge/audio.md +0 -39
- package/resources/js/context/skills/aigc-generate/knowledge/batch-replace.md +0 -26
- package/resources/js/context/skills/aigc-generate/knowledge/character2d.md +0 -132
- package/resources/js/context/skills/aigc-generate/knowledge/non-stepwise-aigc.md +0 -53
- package/resources/js/context/skills/aigc-generate/knowledge/texture-prop.md +0 -52
- package/resources/js/context/skills/aigc-generate/knowledge/texture-scene.md +0 -191
- package/resources/js/context/skills/aigc-generate/knowledge/texture-ui.md +0 -55
- package/resources/js/context/skills/asset-search/scripts/asset_display.mjs +0 -62
- package/resources/js/context/skills/asset-search/scripts/config.json +0 -5
- package/resources/js/context/skills/asset-search/scripts/provided_assets.mjs +0 -125
- package/resources/js/context/skills/asset-search/scripts/search.mjs +0 -760
- package/resources/js/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -657
- package/resources/js/context/skills/asset-search/strategies/anim2d.md +0 -42
- package/resources/js/context/skills/asset-search/strategies/audio.md +0 -34
- package/resources/js/context/skills/asset-search/strategies/effect2d.md +0 -31
- package/resources/js/context/skills/asset-search/strategies/texture-prop.md +0 -22
- package/resources/js/context/skills/asset-search/strategies/ui-common.md +0 -40
- package/resources/js/context/skills/asset-search/strategies/ui-style.md +0 -28
- package/resources/js/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
- package/resources/js/context/skills/lightgame-runtime-adapt/SKILL.md +0 -93
- package/resources/js/context/skills/lightgame-runtime-adapt/project/game-runtime.json +0 -7
- package/resources/js/context/skills/lightgame-runtime-adapt/project/package.json +0 -22
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +0 -5
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +0 -208
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +0 -37
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +0 -227
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +0 -31
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +0 -272
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.d.mts +0 -79
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.mjs +0 -29
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/release.json +0 -22
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/cli.mjs +0 -16
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.d.mts +0 -4
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.mjs +0 -50
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +0 -3
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.mjs +0 -72
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.d.mts +0 -24
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.mjs +0 -2
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.d.mts +0 -10
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.mjs +0 -1
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/config-export.mjs +0 -37
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/refresh-runtime.mjs +0 -50
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/cli.mjs +0 -20
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.d.mts +0 -19
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.mjs +0 -1
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/installed.json +0 -6
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.d.mts +0 -6
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.mjs +0 -77
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.d.mts +0 -2
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.mjs +0 -34
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/ui-stage.ts +0 -156
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/viewport.ts +0 -249
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/main.ts +0 -87
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/platform.ts +0 -2
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/screenUi.ts +0 -185
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/style.css +0 -294
- package/resources/js/context/skills/lightgame-runtime-adapt/project/tsconfig.json +0 -20
- package/resources/js/context/skills/lightgame-runtime-adapt/project/vite.config.ts +0 -5
- package/resources/js/context/skills/lightgame-runtime-adapt/scripts/install-template.mjs +0 -159
- package/resources/js/context/skills/mobile-adaptation/SKILL.md +0 -277
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -50
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -862
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -135
- package/resources/js/context/skills/mobile-adaptation/references/input-config.md +0 -342
- package/resources/js/context/skills/mobile-adaptation/references/verification.md +0 -140
- package/resources/js/context/skills/mobile-adaptation/references/web-audio.md +0 -11
- package/resources/js/context/skills/mobile-compat-qa/SKILL.md +0 -53
- package/resources/js/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
- package/resources/js/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
- package/resources/js/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
- package/resources/js/context/skills/optimization-suggestions/SKILL.md +0 -89
- package/resources/js/context/skills/platform-services/SKILL.md +0 -101
- package/resources/js/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
- package/resources/js/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
- package/resources/js/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
- package/resources/js/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
- package/resources/js/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
- package/resources/js/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
- package/resources/js/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
- package/resources/js/context/skills/platform-services/assets/modules/log.ts +0 -35
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
- package/resources/js/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
- package/resources/js/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
- package/resources/js/context/skills/platform-services/assets/modules/save.d.mts +0 -49
- package/resources/js/context/skills/platform-services/assets/modules/save.mjs +0 -1
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
- package/resources/js/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
- package/resources/js/context/skills/platform-services/references/api_reference.md +0 -18
- package/resources/js/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
- package/resources/js/context/skills/platform-services/scripts/install.mjs +0 -148
- package/resources/js/context/skills/resolution-adaptation/SKILL.md +0 -47
- package/resources/js/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
- package/resources/js/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -249
- package/resources/js/context/skills/resolution-adaptation/assets/example/main.ts +0 -98
- package/resources/js/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -200
- package/resources/js/context/skills/resolution-adaptation/references/audit.md +0 -31
- package/resources/js/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
- package/resources/js/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
- package/resources/js/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
- package/resources/js/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
- package/resources/js/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
- package/resources/js/context/skills/resolution-adaptation/references/world-resize.md +0 -55
- package/resources/js/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
- package/resources/js/context/skills/scene-editor-compat/SKILL.md +0 -94
- package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.assets.json +0 -13
- package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.scene-editor.json +0 -6
- package/resources/js/context/skills/scene-editor-compat/assets/example/src/game/sceneAdapter.ts +0 -25
- package/resources/js/context/skills/scene-editor-compat/assets/example/src/scenes/main.scene.json +0 -18
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/release.json +0 -7
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.d.mts +0 -42
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.mjs +0 -144
- package/resources/js/context/skills/scene-editor-compat/docs/contract.md +0 -330
- package/resources/js/context/skills/scene-editor-compat/docs/resource-sync.md +0 -64
- package/resources/js/context/skills/scene-editor-compat/docs/runtime-state.md +0 -28
- package/resources/js/context/skills/scene-editor-compat/docs/terrain-contract.md +0 -47
- package/resources/js/context/skills/scene-editor-compat/docs/visual-contract.md +0 -64
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.assets.json +0 -38
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.scene-editor.json +0 -9
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneAdapter.ts +0 -59
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneBlockers.ts +0 -30
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneFileAssets.ts +0 -66
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/Main.Scene.ts +0 -20
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/SceneTypes.ts +0 -26
- package/resources/js/context/skills/scene-editor-compat/references/contract.md +0 -73
- package/resources/js/context/skills/scene-editor-compat/scripts/apply_scene_marker.py +0 -162
- package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_contract.py +0 -853
- package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_resource_urls.py +0 -173
- package/resources/js/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -427
- package/resources/js/context/skills/scene-editor-compat/version.json +0 -1
- package/resources/js/context/skills/ui-editor-compat/SKILL.md +0 -48
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -74
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
- package/resources/js/context/skills/ui-editor-compat/references/contract.md +0 -132
- package/resources/js/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
- package/resources/js/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
- package/resources/js/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
- package/resources/js/context/skills/version-update/SKILL.md +0 -192
- package/resources/js/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
- package/resources/js/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
- package/resources/js/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
- package/resources/js/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
- package/resources/js/context/version/version.json +0 -1
- package/resources/js/project/SPEC/assist/.gitkeep +0 -0
- package/resources/js/project/SPEC/guide/.gitkeep +0 -0
- package/resources/js/project/SPEC/plan/.gitkeep +0 -0
- package/resources/js/project/SPEC/readme.md +0 -6
- package/resources/js/project/SPEC/res/.gitkeep +0 -0
- package/resources/js/project/SPEC/task-item/.gitkeep +0 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
- package/resources/js/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
- package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -29
- package/resources/js/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
- package/resources/js/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/release.json +0 -37
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -8
- package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
- package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
- package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
- package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
- package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
- package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
- package/resources/js/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
- package/resources/js/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
- package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
- package/resources/js/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
- package/resources/js/project/scripts/refresh-runtime.mjs +0 -50
- package/resources/js/project/vendor/core-manager-js/package.json +0 -33
- package/resources/js/project/vendor/core-manager-js/src/.versions.json +0 -42
- package/resources/js/project/vendor/core-manager-js/src/CoreManagerPlugin.ts +0 -41
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AssetRef.ts +0 -93
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcFirstImageFile.ts +0 -203
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcTextureLoader.ts +0 -106
- package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.test.ts +0 -25
- package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.ts +0 -21
- package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.test.ts +0 -65
- package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.ts +0 -340
- package/resources/js/project/vendor/core-manager-js/src/configManager/FeatureConfig.ts +0 -87
- package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.d.mts +0 -92
- package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.mjs +0 -271
- package/resources/js/project/vendor/core-manager-js/src/index.ts +0 -31
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputConfig.ts +0 -81
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.test.ts +0 -43
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.ts +0 -32
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.test.ts +0 -141
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.ts +0 -20
- package/resources/js/project/vendor/core-manager-js/src/inputManager/KeyboardProvider.ts +0 -183
- package/resources/js/project/vendor/core-manager-js/src/inputManager/TouchProvider.ts +0 -304
- package/resources/js/project/vendor/core-manager-js/src/inputManager/VirtualJoystick.ts +0 -351
- package/resources/js/project/vendor/core-manager-js/src/inputManager/_internal/InputManagerImpl.ts +0 -180
- package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64 +0 -13
- package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64.d.ts +0 -14
- package/resources/js/project/vendor/core-manager-js/src/inputManager/input_config.example.json +0 -68
- package/resources/js/project/vendor/core-manager-js/src/logManager/DebugConsole.ts +0 -433
- package/resources/js/project/vendor/core-manager-js/src/logManager/LogCapture.ts +0 -118
- package/resources/js/project/vendor/core-manager-js/src/logManager/LogManager.ts +0 -444
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCapture.ts +0 -485
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.test.ts +0 -66
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.ts +0 -149
- package/resources/js/project/vendor/core-manager-js/src/logManager/icons.b64 +0 -9
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/AssetUrlResolver.ts +0 -29
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.test.ts +0 -88
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.ts +0 -122
- package/resources/js/project/vendor/core-manager-js/src/runtime.ts +0 -24
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterEntity.ts +0 -318
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.test.ts +0 -151
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.ts +0 -235
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.test.ts +0 -98
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.ts +0 -94
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectEntity.ts +0 -209
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.test.ts +0 -106
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.ts +0 -341
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.test.ts +0 -68
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.ts +0 -236
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.test.ts +0 -22
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.ts +0 -29
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteEntity.test.ts +0 -197
- package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiContracts.ts +0 -9
- package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiKit.ts +0 -555
- package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.test.ts +0 -112
- package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.ts +0 -178
- package/resources/js/project/vendor/core-manager-js/src/uiManager/ui-base.css +0 -246
- package/resources/js/project/vendor/core-manager-js/src/videoManager/VideoManager.ts +0 -139
- package/resources/js/project/vendor/core-manager-js/tsconfig.json +0 -15
- package/resources/js/project/vendor/run.sh +0 -4
- package/resources/js/project/version/craft_feature_version.json +0 -42
- package/resources/js/project/version/project_feature_version.json +0 -11
- package/resources/js3d/context/.role/AGENTS_DESIGN.md +0 -9
- package/resources/js3d/context/knowledge/3D/PoseInterpolationKnowledge.md +0 -75
- package/resources/js3d/context/knowledge/CodingGuide/SceneEditableGuide.md +0 -42
- package/resources/js3d/context/knowledge/FrontendComponents.md +0 -19
- package/resources/js3d/context/knowledge/MobileAdaptation.md +0 -73
- package/resources/js3d/context/knowledge/MobileAdapted.md +0 -36
- package/resources/js3d/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
- package/resources/js3d/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -117
- package/resources/js3d/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -430
- package/resources/js3d/context/knowledge/PlatformServices.md +0 -190
- package/resources/js3d/context/knowledge/ProjectDisplayConfig.md +0 -35
- package/resources/js3d/context/knowledge/SceneEditorCompat.md +0 -35
- package/resources/js3d/context/knowledge/StepByStep.md +0 -21
- package/resources/js3d/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
- package/resources/js3d/context/knowledge/UiEditorCompat.md +0 -21
- package/resources/js3d/context/rules/MultiplayerCapability.md +0 -27
- package/resources/js3d/context/rules/MultiplayerRoomEntryUX.md +0 -63
- package/resources/js3d/context/rules/PlatformBoundaryModules.md +0 -44
- package/resources/js3d/context/rules/preview_ready.md +0 -8
- package/resources/js3d/context/skills/aigc-integration/assets/sprite-sheet-player.mjs +0 -70
- package/resources/js3d/context/skills/aigc-integration/callback.md +0 -77
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/README.md +0 -23
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/audio-aigc-knowledge.md +0 -38
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/character2d-aigc-knowledge.md +0 -72
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/staticmesh-aigc-knowledge.md +0 -33
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-prop-aigc-knowledge.md +0 -36
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-scene-aigc-knowledge.md +0 -37
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-ui-aigc-knowledge.md +0 -35
- package/resources/js3d/context/skills/asset-search/references/sprite-sheets.md +0 -58
- package/resources/js3d/context/skills/asset-search/scripts/asset_display.mjs +0 -62
- package/resources/js3d/context/skills/asset-search/scripts/config.json +0 -235
- package/resources/js3d/context/skills/asset-search/scripts/manifest_pipeline.mjs +0 -905
- package/resources/js3d/context/skills/asset-search/scripts/preflight.mjs +0 -79
- package/resources/js3d/context/skills/asset-search/scripts/provided_assets.mjs +0 -74
- package/resources/js3d/context/skills/asset-search/scripts/search.mjs +0 -637
- package/resources/js3d/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -667
- package/resources/js3d/context/skills/asset-search/strategies/anim2d.md +0 -42
- package/resources/js3d/context/skills/asset-search/strategies/effect2d.md +0 -31
- package/resources/js3d/context/skills/asset-usage-audit/references/case-tidewater-zoo.md +0 -89
- package/resources/js3d/context/skills/asset-usage-audit/references/optimization-playbook.md +0 -143
- package/resources/js3d/context/skills/asset-usage-audit/references/usage-model.md +0 -90
- package/resources/js3d/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
- package/resources/js3d/context/skills/game-art-style/SKILL.md +0 -60
- package/resources/js3d/context/skills/game-art-style/assets/previews/cartoon.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/comic.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/cozy.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/cyber.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/horror.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/lowpoly.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/paper.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/voxel.png +0 -0
- package/resources/js3d/context/skills/game-art-style/references/art-parameters-lite.md +0 -38
- package/resources/js3d/context/skills/game-art-style/references/construction.md +0 -111
- package/resources/js3d/context/skills/game-art-style/references/materials-textures.md +0 -105
- package/resources/js3d/context/skills/game-art-style/references/sources.md +0 -25
- package/resources/js3d/context/skills/game-art-style/references/styles/cartoon.md +0 -175
- package/resources/js3d/context/skills/game-art-style/references/styles/comic.md +0 -168
- package/resources/js3d/context/skills/game-art-style/references/styles/cozy.md +0 -191
- package/resources/js3d/context/skills/game-art-style/references/styles/cyber.md +0 -165
- package/resources/js3d/context/skills/game-art-style/references/styles/horror.md +0 -173
- package/resources/js3d/context/skills/game-art-style/references/styles/lowpoly.md +0 -185
- package/resources/js3d/context/skills/game-art-style/references/styles/paper.md +0 -181
- package/resources/js3d/context/skills/game-art-style/references/styles/voxel.md +0 -189
- package/resources/js3d/context/skills/game-art-style/references/user-style-document.md +0 -88
- package/resources/js3d/context/skills/mobile-adaptation/SKILL.md +0 -301
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -104
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -933
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -257
- package/resources/js3d/context/skills/mobile-adaptation/references/input-config.md +0 -342
- package/resources/js3d/context/skills/mobile-adaptation/references/verification.md +0 -140
- package/resources/js3d/context/skills/mobile-adaptation/references/web-audio.md +0 -11
- package/resources/js3d/context/skills/mobile-compat-qa/SKILL.md +0 -53
- package/resources/js3d/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
- package/resources/js3d/context/skills/mobile-compat-qa/references/web-form-input.md +0 -10
- package/resources/js3d/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
- package/resources/js3d/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
- package/resources/js3d/context/skills/optimization-suggestions/SKILL.md +0 -74
- package/resources/js3d/context/skills/performance-audit/references/case-notes.md +0 -93
- package/resources/js3d/context/skills/performance-audit/references/rules.md +0 -183
- package/resources/js3d/context/skills/platform-services/SKILL.md +0 -101
- package/resources/js3d/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
- package/resources/js3d/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
- package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
- package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
- package/resources/js3d/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
- package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
- package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
- package/resources/js3d/context/skills/platform-services/assets/modules/log.ts +0 -35
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
- package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
- package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
- package/resources/js3d/context/skills/platform-services/assets/modules/save.d.mts +0 -49
- package/resources/js3d/context/skills/platform-services/assets/modules/save.mjs +0 -1
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
- package/resources/js3d/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
- package/resources/js3d/context/skills/platform-services/references/api_reference.md +0 -18
- package/resources/js3d/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
- package/resources/js3d/context/skills/platform-services/scripts/install.mjs +0 -148
- package/resources/js3d/context/skills/resolution-adaptation/SKILL.md +0 -46
- package/resources/js3d/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
- package/resources/js3d/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -239
- package/resources/js3d/context/skills/resolution-adaptation/assets/example/main.ts +0 -129
- package/resources/js3d/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -188
- package/resources/js3d/context/skills/resolution-adaptation/references/audit.md +0 -31
- package/resources/js3d/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
- package/resources/js3d/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
- package/resources/js3d/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
- package/resources/js3d/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
- package/resources/js3d/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
- package/resources/js3d/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
- package/resources/js3d/context/skills/scene-editor-compat/SKILL.md +0 -599
- package/resources/js3d/context/skills/scene-editor-compat/references/bundle-contract.md +0 -141
- package/resources/js3d/context/skills/scene-editor-compat/references/editor-integration.md +0 -92
- package/resources/js3d/context/skills/scene-editor-compat/references/scene-data-format.md +0 -125
- package/resources/js3d/context/skills/scene-editor-compat/references/slots-rules.md +0 -113
- package/resources/js3d/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -1187
- package/resources/js3d/context/skills/threejs-game-quality/SKILL.md +0 -53
- package/resources/js3d/context/skills/threejs-game-quality/agents/openai.yaml +0 -4
- package/resources/js3d/context/skills/threejs-game-quality/references/01-build.md +0 -94
- package/resources/js3d/context/skills/threejs-game-quality/references/02-avoid.md +0 -50
- package/resources/js3d/context/skills/threejs-game-quality/references/03-detect.md +0 -105
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-by-genre.md +0 -147
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-distance.md +0 -79
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-sources.md +0 -56
- package/resources/js3d/context/skills/threejs-game-quality/references/character-motion-face.md +0 -51
- package/resources/js3d/context/skills/threejs-game-quality/references/parameter-contract.md +0 -55
- package/resources/js3d/context/skills/threejs-game-quality/references/refine-existing.md +0 -78
- package/resources/js3d/context/skills/threejs-game-quality/references/rendering-stability.md +0 -84
- package/resources/js3d/context/skills/threejs-game-quality/references/runtime-tools.md +0 -120
- package/resources/js3d/context/skills/threejs-game-quality/scripts/package.json +0 -4
- package/resources/js3d/context/skills/threejs-game-quality/scripts/runtime-audit.js +0 -238
- package/resources/js3d/context/skills/ui-editor-compat/SKILL.md +0 -59
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -61
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
- package/resources/js3d/context/skills/ui-editor-compat/references/contract.md +0 -110
- package/resources/js3d/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
- package/resources/js3d/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
- package/resources/js3d/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
- package/resources/js3d/context/skills/version-update/SKILL.md +0 -191
- package/resources/js3d/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
- package/resources/js3d/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
- package/resources/js3d/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
- package/resources/js3d/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
- package/resources/js3d/context/version/version.json +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -30
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/release.json +0 -39
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -7
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.d.mts +0 -26
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.mjs +0 -351
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
- package/resources/js3d/project/scripts/refresh-runtime.mjs +0 -50
- package/resources/js3d/project/vendor/core-manager-three/package.json +0 -12
- package/resources/js3d/project/vendor/core-manager-three/src/index.ts +0 -2
- package/resources/js3d/project/vendor/run.sh +0 -4
- package/resources/js3d/project/version/craft_feature_version.json +0 -42
- package/resources/js3d/project/version/project_feature_version.json +0 -11
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts +0 -7
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js +0 -145
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js.map +0 -1
- /package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
- /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
- /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export interface Rect { x: number; y: number; width: number; height: number }
|
|
2
|
-
export interface SceneLayer {
|
|
3
|
-
id: string; name: string; group: 'appearance' | 'objects' | 'logic';
|
|
4
|
-
kind: 'terrain' | 'object' | 'collision' | 'trigger' | 'marker';
|
|
5
|
-
order: number; visible: boolean; locked: boolean; ySort?: boolean;
|
|
6
|
-
[extension: string]: unknown;
|
|
7
|
-
}
|
|
8
|
-
export interface SceneItem extends Rect {
|
|
9
|
-
id: string; label: string; kind: string; layerId: string; assetId?: string;
|
|
10
|
-
zIndex?: number; blocksMovement?: boolean; terrain?: string; color?: string;
|
|
11
|
-
properties?: Record<string, unknown>; [extension: string]: unknown;
|
|
12
|
-
}
|
|
13
|
-
export interface SceneDocument {
|
|
14
|
-
schemaVersion: 2; id: string; name: string; width: number; height: number;
|
|
15
|
-
cellSize: number; baseTerrain: string; layers: SceneLayer[];
|
|
16
|
-
objects: SceneItem[]; regions: SceneItem[]; updatedAt?: string; [extension: string]: unknown;
|
|
17
|
-
}
|
|
18
|
-
export interface SceneAsset {
|
|
19
|
-
id: string; kind: string; name?: string; path?: string; capabilities?: string[]; roles?: string[];
|
|
20
|
-
source?: { module?: string; url?: string; [extension: string]: unknown };
|
|
21
|
-
preview?: { url?: string; color?: string; icon?: string; [extension: string]: unknown };
|
|
22
|
-
placement?: { runtimeKind?: string; width?: number; height?: number; blocksMovement?: boolean; properties?: Record<string, unknown> };
|
|
23
|
-
editorSchema?: Record<string, { type: 'boolean' | 'number' | 'string' | 'enum'; label?: string; options?: string[]; min?: number; max?: number; step?: number }>;
|
|
24
|
-
[extension: string]: unknown;
|
|
25
|
-
}
|
|
26
|
-
export interface AssetRegistry { schemaVersion: 1; assets: SceneAsset[]; [extension: string]: unknown }
|
|
27
|
-
export interface RuntimeItem extends SceneItem {
|
|
28
|
-
collection: 'objects' | 'regions'; asset?: SceneAsset; runtimeKind: string; imageUrl: string;
|
|
29
|
-
properties: Record<string, unknown>; blocksMovement: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface RuntimeScene {
|
|
32
|
-
id: string; name: string; width: number; height: number; cellSize: number; baseTerrain: string;
|
|
33
|
-
layers: SceneLayer[]; items: RuntimeItem[]; objects: RuntimeItem[]; regions: RuntimeItem[];
|
|
34
|
-
blockers: RuntimeItem[]; spawns: RuntimeItem[]; triggers: RuntimeItem[];
|
|
35
|
-
}
|
|
36
|
-
export function scenePath(value: unknown): string;
|
|
37
|
-
export function isSceneAsset(asset: unknown): boolean;
|
|
38
|
-
export function assetImageUrl(asset: SceneAsset): string;
|
|
39
|
-
export function validateScene(scene: unknown, registry: unknown): { ok: boolean; errors: string[] };
|
|
40
|
-
/** Accepts unknown so imported JSON is validated without type assertions. */
|
|
41
|
-
export function compileScene(document: unknown, registry: unknown): RuntimeScene;
|
|
42
|
-
export function overlaps(a: Rect, b: Rect): boolean;
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/** JS2D scene document adapter. Pure data: no renderer, listeners, or game loop. */
|
|
2
|
-
const record = value => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
3
|
-
const text = value => typeof value === 'string' && value.length > 0;
|
|
4
|
-
const own = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
|
|
5
|
-
|
|
6
|
-
export function scenePath(value) {
|
|
7
|
-
if (!text(value) || /[\\?#:\x00]/.test(value) || value.startsWith('/') || value.split('/').some(p => !p || p === '.' || p === '..')) {
|
|
8
|
-
throw new Error(`Invalid project path: ${String(value)}`);
|
|
9
|
-
}
|
|
10
|
-
return value;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function isSceneAsset(asset) {
|
|
14
|
-
if (!record(asset)) return false;
|
|
15
|
-
const caps = Array.isArray(asset.capabilities) ? asset.capabilities : [];
|
|
16
|
-
return ['file', 'procedural', 'prefab', 'terrain', 'component'].includes(asset.kind)
|
|
17
|
-
&& (caps.length ? caps.includes('scene-placeable') || caps.includes('terrain-paintable') : Array.isArray(asset.roles) && asset.roles.includes('scene'))
|
|
18
|
-
&& !(asset.kind === 'file' && asset.path && !/\.(png|jpe?g|webp|gif|svg|avif)$/i.test(asset.path));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** Match Web's explicit image URL priority; runtime-box is never an asset base. */
|
|
22
|
-
export function assetImageUrl(asset) {
|
|
23
|
-
return [asset.preview?.url, asset.source?.url].find(value => typeof value === 'string' && /^https?:\/\//i.test(value)) || '';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function validateScene(scene, registry) {
|
|
27
|
-
const errors = [];
|
|
28
|
-
const fail = message => errors.push(message);
|
|
29
|
-
if (!record(registry) || registry.schemaVersion !== 1 || !Array.isArray(registry.assets)) {
|
|
30
|
-
fail('Asset registry requires schemaVersion 1 and assets[]');
|
|
31
|
-
}
|
|
32
|
-
const assets = new Map();
|
|
33
|
-
const registered = new Set();
|
|
34
|
-
for (const asset of Array.isArray(registry?.assets) ? registry.assets : []) {
|
|
35
|
-
if (!record(asset) || !text(asset.id) || registered.has(asset.id)) { fail('Asset IDs must be nonempty and unique'); continue; }
|
|
36
|
-
registered.add(asset.id);
|
|
37
|
-
if (!isSceneAsset(asset)) continue;
|
|
38
|
-
assets.set(asset.id, asset);
|
|
39
|
-
try {
|
|
40
|
-
if (asset.path) scenePath(asset.path);
|
|
41
|
-
if (asset.kind !== 'file') scenePath(asset.source?.module);
|
|
42
|
-
} catch (error) { fail(`${asset.id}: ${error.message}`); }
|
|
43
|
-
if (asset.placement !== undefined && !record(asset.placement)) fail(`${asset.id}: placement must be an object`);
|
|
44
|
-
if (asset.placement?.properties !== undefined && !record(asset.placement.properties)) fail(`${asset.id}: placement.properties must be an object`);
|
|
45
|
-
if (asset.editorSchema !== undefined && !record(asset.editorSchema)) fail(`${asset.id}: editorSchema must be an object`);
|
|
46
|
-
for (const [key, field] of Object.entries(record(asset.editorSchema) ? asset.editorSchema : {})) {
|
|
47
|
-
if (!record(field) || !['boolean', 'number', 'string', 'enum'].includes(field.type)
|
|
48
|
-
|| (field.type === 'enum' && (!Array.isArray(field.options) || !field.options.every(v => typeof v === 'string')))) fail(`${asset.id}.${key}: unsupported editorSchema field`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (!record(scene) || scene.schemaVersion !== 2 || !Array.isArray(scene.layers) || !Array.isArray(scene.objects) || !Array.isArray(scene.regions)) {
|
|
52
|
-
return { ok: false, errors: [...errors, 'Scene adapter requires schemaVersion 2 with layers[], objects[], regions[]'] };
|
|
53
|
-
}
|
|
54
|
-
if (!text(scene.id) || !text(scene.name) || !text(scene.baseTerrain)) fail('Scene id, name and baseTerrain are required');
|
|
55
|
-
if (![scene.width, scene.height].every(v => Number.isInteger(v) && v >= 4 && v <= 256)
|
|
56
|
-
|| !Number.isFinite(scene.cellSize) || scene.cellSize <= 0
|
|
57
|
-
|| !Number.isFinite(scene.width * scene.cellSize) || !Number.isFinite(scene.height * scene.cellSize)) fail('Map dimensions must be 4–256 cells with a finite positive cellSize');
|
|
58
|
-
const layers = new Set();
|
|
59
|
-
for (const layer of scene.layers) {
|
|
60
|
-
if (!record(layer) || !text(layer.id) || layers.has(layer.id)) { fail('Layer IDs must be nonempty and unique'); continue; }
|
|
61
|
-
layers.add(layer.id);
|
|
62
|
-
if (!text(layer.name) || !['appearance', 'objects', 'logic'].includes(layer.group)
|
|
63
|
-
|| !['terrain', 'object', 'collision', 'trigger', 'marker'].includes(layer.kind)
|
|
64
|
-
|| !Number.isFinite(layer.order) || typeof layer.visible !== 'boolean' || typeof layer.locked !== 'boolean'
|
|
65
|
-
|| (layer.ySort !== undefined && typeof layer.ySort !== 'boolean')) fail(`${layer.id}: invalid layer`);
|
|
66
|
-
}
|
|
67
|
-
const ids = new Set();
|
|
68
|
-
for (const [collection, items] of [['objects', scene.objects], ['regions', scene.regions]]) {
|
|
69
|
-
for (const item of items) {
|
|
70
|
-
if (!record(item)) { fail(`${collection}: item must be an object`); continue; }
|
|
71
|
-
if (!text(item.id) || ids.has(item.id)) fail('Scene item IDs must be nonempty and unique across objects and regions');
|
|
72
|
-
ids.add(item.id);
|
|
73
|
-
if (!text(item.kind) || !text(item.label) || (collection === 'regions' && !['terrain', 'collision', 'trigger'].includes(item.kind))) fail(`${item.id}: invalid kind or label`);
|
|
74
|
-
if (![item.x, item.y, item.width, item.height].every(Number.isInteger) || item.width < 1 || item.height < 1
|
|
75
|
-
|| item.x < 0 || item.y < 0 || item.x + item.width > scene.width || item.y + item.height > scene.height) fail(`${item.id}: geometry must use integer cells within the map`);
|
|
76
|
-
if (!layers.has(item.layerId)) fail(`${item.id}: missing layer ${item.layerId}`);
|
|
77
|
-
if (item.zIndex !== undefined && !Number.isFinite(item.zIndex)) fail(`${item.id}: zIndex must be finite`);
|
|
78
|
-
if (item.blocksMovement !== undefined && typeof item.blocksMovement !== 'boolean') fail(`${item.id}: blocksMovement must be boolean`);
|
|
79
|
-
if (item.properties !== undefined && !record(item.properties)) fail(`${item.id}: properties must be an object`);
|
|
80
|
-
const asset = assets.get(item.assetId);
|
|
81
|
-
if (item.assetId !== undefined && (!text(item.assetId) || !asset)) fail(`${item.id}: missing placeable asset ${item.assetId}`);
|
|
82
|
-
if (asset?.kind === 'file' && !assetImageUrl(asset)) fail(`${item.id}: image asset ${asset.id} needs an explicit HTTP(S) preview.url/source.url for Web`);
|
|
83
|
-
if (asset) {
|
|
84
|
-
const properties = { ...asset.placement?.properties, ...item.properties };
|
|
85
|
-
for (const [key, field] of Object.entries(record(asset.editorSchema) ? asset.editorSchema : {})) {
|
|
86
|
-
if (!record(field) || !own(properties, key)) continue;
|
|
87
|
-
const value = properties[key];
|
|
88
|
-
if (field.type === 'enum' ? !field.options?.includes(value)
|
|
89
|
-
: typeof value !== field.type || (field.type === 'number' && (!Number.isFinite(value)
|
|
90
|
-
|| (Number.isFinite(field.min) && value < field.min) || (Number.isFinite(field.max) && value > field.max)))) fail(`${item.id}.${key}: property does not match editorSchema`);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return { ok: errors.length === 0, errors };
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/** Create a detached pixel-space snapshot. Business code owns spawning/rendering/physics. */
|
|
99
|
-
export function compileScene(document, registry) {
|
|
100
|
-
const result = validateScene(document, registry);
|
|
101
|
-
if (!result.ok) throw new Error(result.errors.join('\n'));
|
|
102
|
-
const scene = structuredClone(document);
|
|
103
|
-
const assets = new Map(structuredClone(registry.assets).filter(isSceneAsset).map(asset => [asset.id, asset]));
|
|
104
|
-
const layers = [...scene.layers].sort((a, b) => a.order - b.order);
|
|
105
|
-
const layerOrder = new Map(layers.map((layer, index) => [layer.id, index]));
|
|
106
|
-
const convert = (item, collection) => {
|
|
107
|
-
const asset = assets.get(item.assetId);
|
|
108
|
-
return {
|
|
109
|
-
...item, collection, asset,
|
|
110
|
-
runtimeKind: asset?.placement?.runtimeKind || item.kind,
|
|
111
|
-
imageUrl: asset ? assetImageUrl(asset) : '',
|
|
112
|
-
properties: { ...asset?.placement?.properties, ...item.properties },
|
|
113
|
-
// Explicit false must override defaults. Layer visibility/locking is editor-only.
|
|
114
|
-
blocksMovement: item.blocksMovement ?? (collection === 'regions' && item.kind === 'collision' ? true : asset?.placement?.blocksMovement === true),
|
|
115
|
-
x: item.x * scene.cellSize, y: item.y * scene.cellSize,
|
|
116
|
-
width: item.width * scene.cellSize, height: item.height * scene.cellSize,
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
const objects = scene.objects.map(item => convert(item, 'objects'));
|
|
120
|
-
const regions = scene.regions.map(item => convert(item, 'regions'));
|
|
121
|
-
const items = [...regions, ...objects].sort((a, b) => {
|
|
122
|
-
const order = layerOrder.get(a.layerId) - layerOrder.get(b.layerId);
|
|
123
|
-
if (order) return order;
|
|
124
|
-
// Web draws regions before objects within each layer; ySort precedes object zIndex.
|
|
125
|
-
if (a.collection !== b.collection) return a.collection === 'regions' ? -1 : 1;
|
|
126
|
-
if (a.collection === 'objects' && layers[layerOrder.get(a.layerId)].ySort) {
|
|
127
|
-
const y = (a.y + a.height) - (b.y + b.height);
|
|
128
|
-
if (y) return y;
|
|
129
|
-
}
|
|
130
|
-
return (a.zIndex ?? 0) - (b.zIndex ?? 0);
|
|
131
|
-
});
|
|
132
|
-
return {
|
|
133
|
-
id: scene.id, name: scene.name, width: scene.width * scene.cellSize, height: scene.height * scene.cellSize,
|
|
134
|
-
cellSize: scene.cellSize, baseTerrain: scene.baseTerrain, layers, items, objects, regions,
|
|
135
|
-
blockers: items.filter(item => item.blocksMovement),
|
|
136
|
-
spawns: objects.filter(item => ['spawn', 'playerSpawn'].includes(item.kind) || ['spawn', 'playerSpawn'].includes(item.properties.role)),
|
|
137
|
-
triggers: regions.filter(item => item.kind === 'trigger'),
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/** Pixel-space AABB query; touching edges do not overlap. No movement/physics is applied. */
|
|
142
|
-
export function overlaps(a, b) {
|
|
143
|
-
return a.x < b.x + b.width && a.x + a.width > b.x && a.y < b.y + b.height && a.y + a.height > b.y;
|
|
144
|
-
}
|
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
# 项目场景契约 v1
|
|
2
|
-
|
|
3
|
-
视觉扩展见 [visual-contract.md](visual-contract.md):支持 source.schema / preview.schema 槽关联及资源/实例 visual。此处 schemaVersion 不变,Skill 版本见 ../version.json,需配套编辑器 0.3.0;游戏消费者必须同步实现 visual 才算闭环。
|
|
4
|
-
|
|
5
|
-
与 [platformer-ts](../examples/platformer-ts/) 示例、[check_scene_contract.py](../scripts/check_scene_contract.py) 同版本。缺资料不凭印象发明字段。
|
|
6
|
-
|
|
7
|
-
玩法用 Phaser 3.90 消费本契约:`this.load.image` 入队、`this.add.image(x, y, key)` 摆图、Arcade 按 `listSceneBlockers` 建静态碰撞。检查与标记用本包 Python 脚本;编辑器读声明和场景文件。
|
|
8
|
-
|
|
9
|
-
编辑器按字段过滤:**缺字段会静默跳过,不会报解析失败**。每次保存只回写**当前**场景路径;加过平台资源时还可以带 `localcraft.assets.json`。不会一次覆盖其它场景。编辑器不在界面新建/删除场景。
|
|
10
|
-
|
|
11
|
-
路径一律项目根相对路径:禁止绝对路径、`..`、`./` 前缀、反斜杠、查询参数、协议。
|
|
12
|
-
|
|
13
|
-
## 文件清单
|
|
14
|
-
|
|
15
|
-
| 文件 | 格式 | 谁写 | 编辑器 |
|
|
16
|
-
|---|---|---|---|
|
|
17
|
-
| `localcraft.scene-editor.json` | JSON | Agent | 读 |
|
|
18
|
-
| `localcraft.assets.json` | JSON | Agent;宿主可接收编辑器新增资源提交 | 读;新增资源时可随保存提交,不能假设同时更新资源面板 |
|
|
19
|
-
| `scene.path` / `scenes[].path` 指向的 `.Scene.ts` 或 `.json` | TS / JSON | Agent;编辑器保存时只改**当前**这份 | 读/写当前场景数据 |
|
|
20
|
-
| 场景旁的 `SceneTypes.ts` | TS | Agent | 不读 |
|
|
21
|
-
| `runtimeConsumers` 里的 `.ts` | TS | Agent | 不读 |
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## 1. `localcraft.scene-editor.json`
|
|
26
|
-
|
|
27
|
-
项目根。`schemaVersion` 必须是 `1`。多场景靠本文件声明,**不是**按文件名猜。所有场景共用 `assetRegistry`。
|
|
28
|
-
|
|
29
|
-
不写 `scenes` 时按单场景,只看 `scene`:
|
|
30
|
-
|
|
31
|
-
```json
|
|
32
|
-
{
|
|
33
|
-
"schemaVersion": 1,
|
|
34
|
-
"scene": { "id": "main", "label": "主场景", "path": "src/scenes/Main.Scene.ts" },
|
|
35
|
-
"assetRegistry": "localcraft.assets.json",
|
|
36
|
-
"runtimeConsumers": ["src/game/sceneAdapter.ts", "src/game/sceneFileAssets.ts", "src/game/sceneBlockers.ts"]
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
多个可编辑场景时写 `scenes`(1–64 条)。旧字段 `scene` 仍是默认打开的那一个,**必须和 `scenes` 里某条的 id + path 完全一致**:
|
|
41
|
-
|
|
42
|
-
```json
|
|
43
|
-
{
|
|
44
|
-
"schemaVersion": 1,
|
|
45
|
-
"scene": {
|
|
46
|
-
"id": "battle",
|
|
47
|
-
"label": "战斗",
|
|
48
|
-
"path": "src/scenes/Battle.Scene.ts"
|
|
49
|
-
},
|
|
50
|
-
"scenes": [
|
|
51
|
-
{ "id": "battle", "label": "战斗", "path": "src/scenes/Battle.Scene.ts" },
|
|
52
|
-
{ "id": "start", "label": "开始背景", "path": "src/scenes/Start.Scene.ts" }
|
|
53
|
-
],
|
|
54
|
-
"assetRegistry": "localcraft.assets.json",
|
|
55
|
-
"runtimeConsumers": ["src/game/sceneAdapter.ts"]
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
| 字段 | 必填 | 说明 |
|
|
60
|
-
|---|---|---|
|
|
61
|
-
| `schemaVersion` | 是 | 固定 `1` |
|
|
62
|
-
| `scene.id` | 是 | 默认打开的场景 id;有 `scenes` 时必须等于其中某条的 `id` |
|
|
63
|
-
| `scene.label` | 建议 | 人读名称。这里可以用 `label` |
|
|
64
|
-
| `scene.path` | 是 | `.Scene.ts` 或 `.json`,不要写死 `Main.Scene.ts`。有 `scenes` 时必须等于其中某条的 `path` |
|
|
65
|
-
| `scenes` | 否 | 1–64 条 `{id,label,path}`。`id` 不能空;**id 和 path 各自唯一**(path 大小写不敏感) |
|
|
66
|
-
| `assetRegistry` | 是 | 资产表路径,通常 `localcraft.assets.json`,所有场景共用 |
|
|
67
|
-
| `runtimeConsumers` | 是 | 非空字符串数组。合起来必须静态 import **每一个**已声明 `path`。至少一个还必须静态 import 资产表,并实现 `listSceneFileObjects` / `enqueueSceneFileImages`(资产表还没有 `kind=file` 也要先写好)。至少一个还必须实现 `listSceneBlockers`(场景还没有 `blocksMovement: true` 也要先写好) |
|
|
68
|
-
|
|
69
|
-
编辑器**不会**在界面里新建/删除场景。要进左侧列表必须:文件已存在 + 写进声明 + 运行时静态 import。少一个声明的场景文件,宿主快照会打不开。
|
|
70
|
-
|
|
71
|
-
`scenes[]` 条目还可选 `constraints`:
|
|
72
|
-
|
|
73
|
-
```json
|
|
74
|
-
{
|
|
75
|
-
"id": "battle",
|
|
76
|
-
"label": "战斗",
|
|
77
|
-
"path": "src/scenes/Battle.Scene.ts",
|
|
78
|
-
"constraints": {
|
|
79
|
-
"requiredObjects": [{ "id": "player-spawn", "kind": "spawn", "assetId": "spawn" }],
|
|
80
|
-
"uniqueObjectKinds": ["spawn"],
|
|
81
|
-
"allowedObjectKinds": ["spawn", "platform", "resource"]
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
JSON 场景仍输出 JSON,TS 场景仍输出 TS,不自动创建第二份源。
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## 2. `localcraft.assets.json`
|
|
91
|
-
|
|
92
|
-
`assetRegistry` 声明的项目根相对路径,通常是 `localcraft.assets.json`。`schemaVersion` 必须是 `1`。这是编辑器资源库的来源;宿主可随编辑器新增资源保存更新该文件,但不能据此认为 `configs/assets.json`、资源面板和业务代码已同步。已适配项目后续换图 / 加资源按 `${CRAFT_CONTEXT_DIR}/skills/scene-editor-compat/docs/resource-sync.md` 维护。
|
|
93
|
-
|
|
94
|
-
```json
|
|
95
|
-
{
|
|
96
|
-
"schemaVersion": 1,
|
|
97
|
-
"assets": [
|
|
98
|
-
{
|
|
99
|
-
"id": "obstacle-rock",
|
|
100
|
-
"name": "石墩",
|
|
101
|
-
"kind": "procedural",
|
|
102
|
-
"capabilities": ["scene-placeable"],
|
|
103
|
-
"source": { "module": "src/scenes/snakeGame/SnakeGameScene.ts" },
|
|
104
|
-
"placement": { "runtimeKind": "obstacle", "width": 1, "height": 1 }
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"id": "platform:12",
|
|
108
|
-
"name": "草丛",
|
|
109
|
-
"kind": "file",
|
|
110
|
-
"capabilities": ["scene-placeable"],
|
|
111
|
-
"source": {
|
|
112
|
-
"type": "preset",
|
|
113
|
-
"url": "https://file.craft.qq.com/Game/grass.png",
|
|
114
|
-
"platformResourceId": "12"
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### 每条 `assets[]` 必填(要进资源库时)
|
|
122
|
-
|
|
123
|
-
| 字段 | 允许值 | 缺了会怎样 |
|
|
124
|
-
|---|---|---|
|
|
125
|
-
| `id` | 非空字符串,全局唯一 | 场景无法引用 |
|
|
126
|
-
| `name` | 显示名 | 编辑器读 `name`,没有则用 `id`。**不读 `label`** |
|
|
127
|
-
| `kind` | `file` \| `procedural` \| `prefab` \| `terrain` \| `component` | **直接跳过该条,资源库没有 `#id`,属性栏仍可能显示物件** |
|
|
128
|
-
| `capabilities` | 数组,至少含下面之一 | 不进对应库 |
|
|
129
|
-
| `source` | 按 `kind` 见下表 | 契约检查失败 |
|
|
130
|
-
|
|
131
|
-
`capabilities`:
|
|
132
|
-
|
|
133
|
-
- `scene-placeable` → 场景物件库
|
|
134
|
-
- `terrain-paintable` → 地形库
|
|
135
|
-
|
|
136
|
-
没有这两项的条目(UI / 音频 / 普通数据)不会仅因出现在本文件而进入编辑器。
|
|
137
|
-
|
|
138
|
-
### `kind` 怎么选
|
|
139
|
-
|
|
140
|
-
| `kind` | 何时用 | `source` | 运行时怎么用 |
|
|
141
|
-
|---|---|---|---|
|
|
142
|
-
| `procedural` | 在某个 `.ts` 里画,没有独立图片 | `{ "module": "src/..." }`,路径必须真实存在 | 在该模块里按 `assetId` 画 |
|
|
143
|
-
| `file` | 独立图片 | `{ "url": "<图片地址>" }`,还可有 `type`、`platformResourceId` | **必须** `this.load.image(key, resolveAssetUrl(source.url))` 加载该 URL,再按格 `add.image` 摆进场景。禁止忽略 `url` 改成程序绘制 |
|
|
144
|
-
| `prefab` | 预制体 | 按项目已有声明 | 按已有接法 |
|
|
145
|
-
| `terrain` | 地形笔刷 | 按项目已有声明 | 按已有接法 |
|
|
146
|
-
| `component` | 出生点等逻辑对象 | `{ "module": "src/..." }` | 在该模块里按 `assetId` 处理 |
|
|
147
|
-
|
|
148
|
-
`kind=file` 的 `source` **不写 `module`**。没有槽绑定时从 `source.url` 加载;有 `source.schema` 时使用项目对应槽位的实际生效值,并保持 `source.url` 后备一致。交给项目 `resolveAssetUrl`,不要手拼 CDN 或另存 URL 常量表。资产表还没有 file 时,仍按 [sceneFileAssets.ts](../examples/platformer-ts/src/game/sceneFileAssets.ts) 预接空列表接口。
|
|
149
|
-
|
|
150
|
-
### 不要写在资产表里
|
|
151
|
-
|
|
152
|
-
| 错误字段 | 原因 |
|
|
153
|
-
|---|---|
|
|
154
|
-
| `label` | 资产表显示名是 `name`。`label` 是场景 **物件** 字段 |
|
|
155
|
-
| `assetId` | 资产表主键是 `id`。`assetId` 是场景 **物件** 用来引用这个 `id` 的字段 |
|
|
156
|
-
| 资产顶层 `blocksMovement` | 实际开关在场景物件/区域顶层;新实例默认值可写 `placement.blocksMovement` |
|
|
157
|
-
|
|
158
|
-
### 可选
|
|
159
|
-
|
|
160
|
-
`category`、`preview`(`color` / `icon`)、`placement`(`runtimeKind`、默认 `width` / `height`)、`editorSchema`(`boolean` / `number` / `string` / `enum`,生成属性控件)。
|
|
161
|
-
|
|
162
|
-
`placement` 给新实例的默认格尺寸、`runtimeKind`、`blocksMovement` 与 `properties`;运行时以场景实例为准。可绘制地形的 `runtimeKind` 必须是具体类型,不能是泛称 `terrain/resource`。详见 [terrain-contract.md](terrain-contract.md),含历史数据迁移、地形渲染、默认属性及行为验收。
|
|
163
|
-
|
|
164
|
-
完整形态见 [platformer-ts/localcraft.assets.json](../examples/platformer-ts/localcraft.assets.json)。
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## 3. 场景文件(每个声明的 `path`)
|
|
169
|
-
|
|
170
|
-
每个 path 各自一份文档:`id` / `name` / `width` / `height` / `cellSize` / `layers` / `objects` / `regions` 不要共用一个 `Build`。`id` 等于该条声明的 `id`。物件 `assetId` 指向**共享**注册表。
|
|
171
|
-
|
|
172
|
-
推荐 `*.Scene.ts`(后缀大小写不敏感);现有 `.json` 同样支持。类型从项目自有文件 `import type`,不依赖编辑器包。
|
|
173
|
-
|
|
174
|
-
### 3.1 TS:`export function Build(): SceneDocument`
|
|
175
|
-
|
|
176
|
-
```ts
|
|
177
|
-
import type { SceneDocument } from './SceneTypes';
|
|
178
|
-
|
|
179
|
-
export function Build(): SceneDocument {
|
|
180
|
-
return {
|
|
181
|
-
schemaVersion: 2, id: 'main', name: '主场景',
|
|
182
|
-
width: 24, height: 14, cellSize: 32, baseTerrain: 'sky',
|
|
183
|
-
layers: [
|
|
184
|
-
{ id: 'objects', name: '场景物件', group: 'objects', kind: 'object', order: 10, visible: true, locked: false }
|
|
185
|
-
],
|
|
186
|
-
regions: [],
|
|
187
|
-
objects: [
|
|
188
|
-
{
|
|
189
|
-
id: 'rock-1', label: '石墩', kind: 'obstacle',
|
|
190
|
-
assetId: 'obstacle-rock', layerId: 'objects',
|
|
191
|
-
x: 3, y: 8, width: 1, height: 1
|
|
192
|
-
}
|
|
193
|
-
],
|
|
194
|
-
updatedAt: '2026-09-09T00:00:00.000Z'
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
编辑器不运行 TS,只静态解析 `Build` 的返回字面量。保存时替换这个返回对象,保留对象外的 `import type`、函数签名和注释。
|
|
200
|
-
|
|
201
|
-
**Build 形态:**
|
|
202
|
-
|
|
203
|
-
- 唯一导出;同步;无参数;非生成器;函数体只有一条 `return { ... }`
|
|
204
|
-
- 只允许静态字面量:对象、数组、字符串、有限数字、布尔、`null`、正负数字、注释、尾逗号,以及 `as` / `satisfies`
|
|
205
|
-
- 允许 `import type`、interface / type 声明
|
|
206
|
-
- 禁止:值导入、变量引用、函数调用、展开、计算属性、方法、模板字符串、`undefined`、执行语句
|
|
207
|
-
- 禁止:重复属性、危险原型属性、数组空位;文件上限 5MB
|
|
208
|
-
- TS 语法解析不代替 `tsc`;类型是否存在由项目构建验证
|
|
209
|
-
|
|
210
|
-
### 3.2 场景文档字段(TS 返回对象 / JSON 根对象相同)
|
|
211
|
-
|
|
212
|
-
`schemaVersion` 必须是 `2`。地图宽高 4~256 格。无法识别的扩展字段会保留。
|
|
213
|
-
|
|
214
|
-
| 字段 | 必填 | 说明 |
|
|
215
|
-
|---|---|---|
|
|
216
|
-
| `schemaVersion` | 是 | 固定 `2` |
|
|
217
|
-
| `id` | 是 | 与该条声明的 `id` 一致 |
|
|
218
|
-
| `name` | 是 | 场景显示名 |
|
|
219
|
-
| `width` / `height` | 是 | 格数,4~256 |
|
|
220
|
-
| `cellSize` | 是 | 每格像素 |
|
|
221
|
-
| `baseTerrain` | 是 | 底图地形 id |
|
|
222
|
-
| `layers` | 是 | 图层数组 |
|
|
223
|
-
| `regions` | 是 | 可空数组 |
|
|
224
|
-
| `objects` | 是 | 物件数组 |
|
|
225
|
-
| `updatedAt` | 是 | ISO 时间字符串 |
|
|
226
|
-
| `projectId` | 否 | |
|
|
227
|
-
|
|
228
|
-
**`layers[]`:**
|
|
229
|
-
|
|
230
|
-
| 字段 | 必填 | 允许值 |
|
|
231
|
-
|---|---|---|
|
|
232
|
-
| `id` / `name` | 是 | 字符串 |
|
|
233
|
-
| `group` | 是 | `appearance` \| `objects` \| `logic` |
|
|
234
|
-
| `kind` | 是 | `terrain` \| `object` \| `collision` \| `trigger` \| `marker` |
|
|
235
|
-
| `order` | 是 | 数字 |
|
|
236
|
-
| `visible` / `locked` | 是 | 布尔 |
|
|
237
|
-
| `ySort` | 否 | 布尔 |
|
|
238
|
-
|
|
239
|
-
图层 `kind` 不是资产表 `kind`,不要写成 `procedural`。
|
|
240
|
-
|
|
241
|
-
**`objects[]`:**
|
|
242
|
-
|
|
243
|
-
| 字段 | 必填 | 说明 |
|
|
244
|
-
|---|---|---|
|
|
245
|
-
| `id` | 是 | 物件实例 id |
|
|
246
|
-
| `label` | 是 | 物件显示名。这里用 `label`,不要改成 `name` |
|
|
247
|
-
| `kind` | 是 | 玩法分类(如 `spawn` / `platform` / `obstacle`),**不是**资产表的 `file\|procedural\|...` |
|
|
248
|
-
| `assetId` | 是 | 等于资产表某条的 `id`。出生点等逻辑对象也必须能解析 |
|
|
249
|
-
| `layerId` | 是 | 等于某图层 `id` |
|
|
250
|
-
| `x` / `y` / `width` / `height` | 是 | 整数格坐标 / 格尺寸,禁止小数(`1` 可以,`1.5` / `1.0` 都不行) |
|
|
251
|
-
| `blocksMovement` | 否 | 布尔。运行时阻挡的**唯一**开关:`true` 才挡,未写或 `false` 都不挡 |
|
|
252
|
-
| `zIndex` / `properties` | 否 | |
|
|
253
|
-
|
|
254
|
-
所有 `assetId` 必须在资产表存在,且该条已声明 `scene-placeable` 或 `terrain-paintable`。`regions[]` 若有条目,`x` / `y` / `width` / `height` 同样必须是整数;区域要挡人时也必须顶层写 `blocksMovement: true`。
|
|
255
|
-
|
|
256
|
-
### 3.3 JSON 场景
|
|
257
|
-
|
|
258
|
-
根对象就是上面这份文档,没有 `Build` 函数。已有 JSON 不要改成 TS,已有 TS 不要改成 JSON。
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
## 4. `SceneTypes.ts`
|
|
263
|
-
|
|
264
|
-
给项目 `tsc` 用,编辑器不读。字段名必须与第 3 节场景对象一致:物件用 `label` + `assetId`,文档用 `name`。
|
|
265
|
-
|
|
266
|
-
```ts
|
|
267
|
-
export interface SceneItem {
|
|
268
|
-
id: string; label: string; kind: string; layerId: string;
|
|
269
|
-
x: number; y: number; width: number; height: number;
|
|
270
|
-
assetId?: string; blocksMovement?: boolean; zIndex?: number;
|
|
271
|
-
properties?: Record<string, unknown>;
|
|
272
|
-
}
|
|
273
|
-
export interface SceneDocument {
|
|
274
|
-
schemaVersion: 2; id: string; name: string; projectId?: string;
|
|
275
|
-
width: number; height: number; cellSize: number; baseTerrain: string; updatedAt: string;
|
|
276
|
-
layers: Array<{
|
|
277
|
-
id: string; name: string; group: 'appearance' | 'objects' | 'logic';
|
|
278
|
-
kind: 'terrain' | 'object' | 'collision' | 'trigger' | 'marker';
|
|
279
|
-
order: number; visible: boolean; locked: boolean; ySort?: boolean;
|
|
280
|
-
}>;
|
|
281
|
-
objects: SceneItem[];
|
|
282
|
-
regions: Array<SceneItem & { kind: 'terrain' | 'collision' | 'trigger'; terrain?: string; color?: string }>;
|
|
283
|
-
}
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
## 5. `runtimeConsumers` 里的 `.ts`
|
|
289
|
-
|
|
290
|
-
编辑器不读这些文件。必须满足:
|
|
291
|
-
|
|
292
|
-
1. 文件存在
|
|
293
|
-
2. **非** `import type` 的静态 `import { Build } from '...'`(或等价值导入)覆盖**每一个**已声明 `path`(多场景可用 `import { Build as buildBattle }`)。只写注释或动态 `import()` 不算
|
|
294
|
-
3. 启动链路按当前玩法调用对应 `Build()`(JSON 则消费对应数据)
|
|
295
|
-
4. 至少一个 consumer 静态 import 资产表,并提供 `listSceneFileObjects` / `enqueueSceneFileImages`。资产表还没有 `kind=file` 也必须先写好——编辑器稍后加 file 条目时不会再跑适配 skill
|
|
296
|
-
5. 至少一个 consumer 提供 `listSceneBlockers`:只收顶层 `blocksMovement === true` 的物件/区域。场景里一条都没有也必须先写好——编辑器稍后勾选阻挡不会再跑适配 skill
|
|
297
|
-
|
|
298
|
-
```ts
|
|
299
|
-
import { Build as buildMain } from '../scenes/Main.Scene';
|
|
300
|
-
import { Build as buildStart } from '../scenes/Start.Scene';
|
|
301
|
-
import registry from '../../localcraft.assets.json';
|
|
302
|
-
import { listSceneFileObjects, enqueueSceneFileImages } from './sceneFileAssets';
|
|
303
|
-
import { listSceneBlockers } from './sceneBlockers';
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
单场景可继续 `import { Build } from '../scenes/Main.Scene'`。JSON 场景则 `import battle from './scenes/battle.scene.json'`。
|
|
307
|
-
|
|
308
|
-
完整 join / 入队见 [sceneFileAssets.ts](../examples/platformer-ts/src/game/sceneFileAssets.ts)。加载界面:
|
|
309
|
-
|
|
310
|
-
```ts
|
|
311
|
-
enqueueSceneFileImages(this.load, (k) => this.textures.exists(k), resolveAssetUrl);
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
开战按 `listSceneFileObjects()` 的物件格尺寸 × `cellSize` 和合并后的 `visual` 渲染,不用资产表 `placement` 覆盖实例。`setDisplaySize(width,height)` 仅适用于 stretch;contain/cover/tile 按 [视觉契约](visual-contract.md) 实现。示例中的 file 列表是最低接线,不代表已有游戏自动支持全部视觉规则。
|
|
315
|
-
|
|
316
|
-
阻挡见 [sceneBlockers.ts](../examples/platformer-ts/src/game/sceneBlockers.ts)。开战用项目已有物理按矩形建静态碰撞,例如:
|
|
317
|
-
|
|
318
|
-
```ts
|
|
319
|
-
for (const b of listSceneBlockers()) {
|
|
320
|
-
const zone = this.add.zone(b.x, b.y, b.width, b.height).setOrigin(0, 0);
|
|
321
|
-
this.physics.add.existing(zone, true);
|
|
322
|
-
this.physics.add.collider(player, zone);
|
|
323
|
-
}
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
禁止用 `kind === 'obstacle'`、硬编码墙表另算一份初始碰撞。上述静态体示例只覆盖不会变化的阻挡;可移动、可清除、可开关等实例须接入项目已有状态系统,按实例更新碰撞与缓存,见 [runtime-state.md](runtime-state.md)。
|
|
327
|
-
|
|
328
|
-
支持项目相对路径、`@/`、TS 无扩展名 import。注释、普通字符串、动态 `import()` 不算接入证据。
|
|
329
|
-
|
|
330
|
-
宽高、图层顺序、`assetId`、位置、尺寸、属性必须从返回数据建世界,不能另写一份位置表。`runtimeConsumers` 合起来必须静态 import **每一个**已声明场景 path。至少一个 consumer **必须静态 import 资产表**并实现读 `source.url` 的接口;**当前没有 `kind=file` 条目也要提前写**,列表为空时入队 0 张图即可。禁止等出现 file 再补、禁止把 url 抄进 `boot.config` / `FILE_ASSETS`、禁止改成程序绘制。至少一个 consumer **必须提供 `listSceneBlockers`**;**当前没有 `blocksMovement: true` 也要提前写**,列表为空时建 0 块阻挡即可。禁止等出现阻挡再补、禁止平行墙表。UI / 战斗 / AI / 输入留在其他模块。静态 import 不能证明 `Build()` 已被调用;最终验收是「编辑场景 → 保存构建 → 游戏位置或属性真实变化」。
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# 已适配 JS2D 项目的资源持续同步
|
|
2
|
-
|
|
3
|
-
适用于 `scene_editor_compat: true` 项目中已授权的资源修改。自然对话换图、素材库 / AIGC 替换、游戏资源面板交给 Agent 的配置修改,均是资源变更,不因本轮未提“场景编辑器”而跳过。编辑器新增资源的保存结果进入 Agent 后,同样维护关联;本文不新增宿主触发机制。
|
|
4
|
-
|
|
5
|
-
未适配项目不自动转换,不增加首轮适配成本。标记缺失但已有场景声明时先核对项目状态,不能丢掉旧声明或擅自重建场景。只读问题只诊断;基准版本变更、文件读取失败或资源映射不明时交回宿主,不猜测覆盖。
|
|
6
|
-
|
|
7
|
-
## 找到本次变更对应的资源
|
|
8
|
-
|
|
9
|
-
读取当前工作区的 `localcraft.scene-editor.json`,按 `assetRegistry`、`scene` / `scenes`、`runtimeConsumers` 追踪引用;再读受影响的资源配置、`@slot`、面板快照和加载 / 绘制代码。旧项目沿用已有配置与导出链路,不为同步迁移 SDK。
|
|
10
|
-
|
|
11
|
-
- 分清场景资产 `assets[].id`、场景物件 `objects[].id`、资源面板槽位 key、平台素材 ID。它们不是同一个 ID;URL 也不是稳定身份。
|
|
12
|
-
- 根据本轮目标、现有声明和实际消费者确认映射,不能仅按中文名或同一旧 URL 全量替换。同一图片可被多个不同业务资产使用;同一场景资产可被多个场景实例共用。
|
|
13
|
-
- 沿用项目已有映射;确需补映射时,使用编辑器已有的 `source.schema` 关联统一配置中的 schema,并在业务适配器中使用相同槽位。出生点静态预览使用 `preview.schema`,见 [visual-contract.md](visual-contract.md)。不复制 URL 常量表、不按名称猜绑定,也不要求 `assetId` 与槽名相等。
|
|
14
|
-
- 以本轮明确选择及宿主实际应用的配置为准,结合当前代码追踪生效值。不能拿旧资产表反向覆盖新选择;有冲突且无法判定来源时先报告。地址合法性遵守 `${CRAFT_CONTEXT_DIR}/knowledge/AssetUrl.md`。
|
|
15
|
-
|
|
16
|
-
## 最小同步
|
|
17
|
-
|
|
18
|
-
### 地址归一化与历史资源修复
|
|
19
|
-
|
|
20
|
-
首次适配、修复历史上传/素材库资源和每次后续换图均执行。资源最初来自上传还是素材库,不决定地址一定是完整 URL;以当前版本的实际字段为准。
|
|
21
|
-
|
|
22
|
-
1. **先锁定目标值。** 对同一 schema,编辑器按 `change_value ?? value ?? default ?? origin` 读取(空字符串不是缺失值)。结合本轮选择与项目配置应用链路确定目标。本轮 `--provide` 并已写入 JSON 的资源,目标就是 JSON 这条。先保存这一目标,再运行可能重新导出的命令;不要用旧 `configs/assets.json`、注册表或 `origin/default` 覆盖它。保留 `source.schema` / `preview.schema`;替换平台素材不能因平台 ID 变化而重建槽名或误绑到另一个槽,检查消费者是否仍从该 schema 对应槽位取值。
|
|
23
|
-
2. **区分游戏解析和编辑器解析。** 游戏可调用 `resolveAssetUrl` 补域名;编辑器仅解析声明数据。相对槽位值需要该条配置的完整 `origin/default` 站点根,或宿主实际传入的 `assetBaseUrl`。注册表的完整 URL 不会自动变成槽位的地址基准。缺少基准时,槽位无法解析,编辑器会退到 `preview.url` / `source.runtimeUrl` / `source.url` / `path`,可能不报错却显示旧图。
|
|
24
|
-
3. **只依据明确来源补全。** 遵守 AssetUrl.md 和项目现有 `resolveAssetUrl` 的配置。已确认官方 `/Game/...`、`Game/...` 由该解析器映射到官方域时,使用其等价完整 URL;`test1/...` 等路径必须有该资源元数据或实际解析配置作为依据,不能从任意第三张图片借域名。项目本地 `assets/...` 不自动拼到 CDN;找不到可供编辑器使用的真实基准/文件地址时报告缺少宿主数据,不编造 URL、鉴权参数或协议字段。不要为修地址新增 SDK 或改 Web。
|
|
25
|
-
4. **维护最新后备而非冻结旧图。** `configs/assets.json` 与 `@slot` 继续遵守原值规则,不为编辑器强制整表改成绝对 URL。对于同一张静态图片,将目标值解析后的完整 URL 写入受影响注册项的 `source.runtimeUrl`,并同步已有 `preview.url` 等更高优先级的图片后备;不存在的 `preview.url` 不必新增。`source.url` 与目标原值保持语义一致。单独的出生点/动画静帧仅维护其 `preview.schema` 对应的预览,不能拿动画 manifest 覆盖静态预览,也不能覆盖动画运行时源。保留 ID、实例摆放及原行为。
|
|
26
|
-
5. **导出后再比一次。** 同时检查最新槽位目标和编辑器最终选择的 URL。两者经已确认的解析规则应指向同一张图片;“地址非空 / 能显示 / 构建通过”不等于换图同步。不要删除 schema 只保留静态 URL,也不要修改旧默认值假装消除覆盖差异。
|
|
27
|
-
|
|
28
|
-
典型回归:源配置/注册表仍是 `Game/.../old.png`,面板 `value` 已为 `Game/.../new.png`,旧修复只补了 `preview.url=https://.../old.png`。缺少槽位地址基准时编辑器仍显示 old。应保留 new 为本轮目标,按现有配置应用链路对齐该槽,生成 new 的完整后备,并验证第二次换图依然同步;不回滚 value。
|
|
29
|
-
|
|
30
|
-
### 按操作维护
|
|
31
|
-
|
|
32
|
-
**已有资源换图:**
|
|
33
|
-
|
|
34
|
-
1. 原地更新目标资产的视觉来源,保留场景资产 ID、实例 ID、物件 `kind`、`placement.runtimeKind`、自定义属性、位置尺寸、层级与碰撞。平台素材被替换时按新素材的真实信息更新来源元数据,不保留错误的旧平台素材 ID;场景资产 ID 不因此改名。
|
|
35
|
-
2. 真实单图替换纯程序占位时,按既有契约将对应资产改为 `kind: file` 并写入有效 `source.url`,移除该条不适用的 `source.module`。只替换绘制,不把“平台 / 敌人”等业务对象降成无行为装饰,也不在旧程序图上再叠一张重复图片。prefab / component / 动画资源按项目已支持的结构处理,不能一律压成单图。
|
|
36
|
-
3. 同步对应槽位配置与 `@slot` 接线。游戏加载与编辑器必须解析到同一资源;维护 `source.schema` / `preview.schema` 对应的有效配置,同时同步该资源过期的 `preview.url`、`source.runtimeUrl`、`source.url` 后备。编辑器不执行表达式,不能把槽名写进 `source.url`。宿主快照必须包含最新统一配置,不仅是资产表。背景也遵循此规则。
|
|
37
|
-
4. 动画保留原来的 manifest、图集参数、动画播放与业务绑定。静态预览图不等于动画源,不把预览地址覆盖运行时动画地址;编辑器当前契约无法表达时明确报告该限制,不伪报“动画已同步”。
|
|
38
|
-
|
|
39
|
-
**新增资源:**
|
|
40
|
-
|
|
41
|
-
- Agent / 平台 / 上传资源:只有确实用于场景摆放或绘制的内容才登记场景 capability;纯 UI、音频不为凑齐面板而塞进场景物件库。新资产新建唯一 ID;重复摆放复用资产 ID,只为新实例创建实例 ID。
|
|
42
|
-
- 编辑器新增后交给 Agent:保留宿主已保存的注册项、场景布局和 ID;为需要展示 / 替换的真实文件资源补对应配置槽位、`@slot` 与消费者,并通过项目已有导出链路进入“游戏资源”面板。仅写场景资产表不代表面板已更新。
|
|
43
|
-
- 接入已有行为使用项目声明的构造 / 注册逻辑;没有行为声明的新增装饰不擅自变成敌人、角色或可交互物。
|
|
44
|
-
|
|
45
|
-
**删除资源:** 先查全部已声明场景、配置槽位及消费者。删除实例不等于删除共享资产;仍有其他引用时保留资产。只有用户授权的删除范围明确且引用处理完毕,才清理对应注册 / 配置,不能整表重建。
|
|
46
|
-
|
|
47
|
-
## 导出、检查与交回
|
|
48
|
-
|
|
49
|
-
1. 完成受影响配置与场景资产同步,再跑项目已有的配置导出和构建。新模板使用 `${CRAFT_CONTEXT_DIR}/skills/export-config/SKILL.md`;旧项目只用已有脚本。不要手改导出快照代替修改源配置,也不要清空无关的面板覆盖值。
|
|
50
|
-
2. 导出后复读受影响槽位的**实际生效值**:不能只比较 `origin` / `default`,还需按项目规则核对 `value` / `change_value` 等覆盖值。如果导出保留了旧覆盖,沿既有配置更新流程对齐本轮选择,不让其在构建时把新图覆盖回旧图。
|
|
51
|
-
3. 对照目标资产的 `kind` / `source.url`、槽位生效值、实际加载路径与预览来源;经项目 URL 解析后应指向相同目标(动画的预览与运行时源按其真实关联核对)。同时检查所有引用该资产的场景,以及稳定 ID、布局、属性和行为是否保留。多条资产明确共用同一槽位时,检查所有受影响条目。
|
|
52
|
-
4. 运行契约静态检查,再按常驻 `AGENTS.md` 构建与 `game_visual_qa`:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
python3 "${CRAFT_SKILL_DIR}/scripts/check_scene_contract.py" --project-root "${CRAFT_PROJECT_DIR}" --json
|
|
56
|
-
python3 "${CRAFT_SKILL_DIR}/scripts/check_scene_resource_urls.py" --project-root "${CRAFT_PROJECT_DIR}"
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
契约检查器只验结构和静态接线。URL 检查器只读声明与统一配置,列出编辑器的选图结果,检查 schema 缺失、无法解析以及同一图片后备与生效值不一致;不联网、不改文件。只有已确认宿主实际提供时才传 `--asset-base-url`;仅在游戏解析器确实使用该基准时传 `--runtime-base-url`(用于比较目标,不模拟成宿主已传地址)。相对槽位缺少编辑器基准但已有与目标一致的完整后备,会报 warning 而非假装槽位已能解析;没有目标解析依据时标为未验证,不借另一资源的域名。检查器不运行业务代码、不验证源配置应用、HTTP 可达性、图片内容或动画,仍须完成上述人工核对与运行验证。`scene_editor_compat` 与 `sceneeditor` 功能版本仍只由标记脚本维护,版本值来自 `version/craft_feature_version.json`。
|
|
60
|
-
5. 由宿主保存包含配置、资产注册、场景与消费者的同一新版本快照。能操作宿主时重开该版本的游戏、资源面板和场景编辑器,检查本轮资源显示;只有游戏视觉 QA 时,编辑器与面板实测标为未验证,不声称三端全通过。换图后仍不显示,先比较实际载入版本与资源请求,再定位缓存或渲染,不能恢复占位掩盖问题。
|
|
61
|
-
|
|
62
|
-
重点回归:适配后程序占位换真实图、真实图 A 换 B(自然对话及面板入口)、编辑器新增资源进入面板再换图、多场景共用资产、同 URL 不同业务资产不误替换;都要检查原玩法仍正常。若本轮资源与场景无关,说明检查后无需改场景注册,不制造无关文件变化。
|
|
63
|
-
|
|
64
|
-
旧项目再加两条回归:历史上传和素材库图片只有相对路径时不丢资源、不删实例;修复可见后连续换图 A→B→C,每次检查导出后的有效值、完整后备及重开编辑器显示 C,不能仅验证第一次补全。无宿主条件时只报告静态数据检查,不声称正式环境已生效。
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# 场景初始数据与运行时状态
|
|
2
|
-
|
|
3
|
-
首次适配,或已适配项目修改场景实例的状态、碰撞、交互生命周期时读取。沿用项目已有玩法与状态系统,不新增 Web 协议、通用玩法框架或存档格式。
|
|
4
|
-
|
|
5
|
-
## 初始声明不等于永久状态
|
|
6
|
-
|
|
7
|
-
- `Build()` / JSON 描述场景初始布局;资产 `placement` 只提供新增实例默认值。加载时保留实例 ID、尺寸、属性与顶层 `blocksMovement`,未声明或 false 不产生初始阻挡,不按 kind 或颜色推断。
|
|
8
|
-
- 游戏开始后,使用项目已有运行时实体或状态管理承接变化。按稳定实例 ID 关联显示、交互与碰撞;多场景时用场景 ID + 实例 ID 隔离,不能只按 assetId 更新所有复用实例。
|
|
9
|
-
- 游戏中的移动、开关、清除、破坏等应同步更新对应实例的碰撞范围或启用状态及相关缓存。清除可阻挡物件时不能只隐藏图片,也不能为了清一个物件移除整类资产的碰撞。若该位置还有其他有效阻挡,应继续阻挡。
|
|
10
|
-
- 静态物件允许缓存初始阻挡;会变化的物件必须在变化时更新/失效缓存或直接查询当前状态。每帧重新读取初始 Build 也不是动态同步,会把已清除或移动的状态恢复。
|
|
11
|
-
- 重开、切场景及读档使用项目原有生命周期:清理旧碰撞体/事件绑定,按该项目的重置或持久化规则恢复。不要把本局变化自动写回编辑器场景文件;存档已有约定时沿用,不擅自清档。
|
|
12
|
-
|
|
13
|
-
## 状态转换保留原有玩法
|
|
14
|
-
|
|
15
|
-
修改地形或物件适配时核对“初始状态 → 玩家操作 → 新状态 → 下一步允许的操作”。渲染、通行和交互条件应读取一致的当前状态,不能只改变颜色,或把状态写成后续操作永远不接受的值。
|
|
16
|
-
|
|
17
|
-
具体状态名称和业务条件由项目定义。不要求所有项目支持耕作、破坏、开门或任何示例玩法;仅维护已有行为。发现与本轮适配无关的旧玩法缺陷,报告并区分,不为了通过检查重写整套玩法。
|
|
18
|
-
|
|
19
|
-
## 有针对性的回归
|
|
20
|
-
|
|
21
|
-
在隔离草稿中选择实际受影响的实例,记录操作前后数据及可观察结果:
|
|
22
|
-
|
|
23
|
-
1. 编辑并保存一个已声明的业务参数,重开后值一致,游戏实际消费者使用该实例值;对象与区域均适用,扩展字段和其他实例不变。
|
|
24
|
-
2. 涉及动态阻挡时:验证状态变化前后显示、通行一致;同资产的另一个实例不受影响;重叠的其他阻挡不被误删。按项目支持范围验证恢复、重开或场景切换,不遗留空气墙/重复碰撞。
|
|
25
|
-
3. 涉及业务状态时:走完受影响的连续操作,确认后续步骤可达,而不只看操作成功提示或第一帧。预期行为来自原项目设计,不来自编辑器统一规则。
|
|
26
|
-
4. 复验至少一条受影响范围内的原有正常路径。静态契约、构建、逻辑测试和实际游戏验证分别报告;未实际执行的项目不标通过。测试状态不混入用户最终布局。
|
|
27
|
-
|
|
28
|
-
静态检查脚本不能证明缓存更新、状态转换或游戏效果正确;不要用函数名存在、import 成功或适配标记代替运行证据。
|