@craft_eco/craft-mcp 0.1.25 → 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 +31 -10
- package/bin/craft-mcp.mjs +10 -8
- 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/game-workflow/publication-materials.mjs +18 -20
- package/dist-server/game-workflow/publications.mjs +15 -17
- package/dist-server/game-workflow/publish-capture.mjs +21 -57
- 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/publication-page.mjs +18 -50
- package/dist-server/mcp/publish-panel.mjs +28 -35
- package/dist-server/mcp/server.mjs +17 -14
- package/dist-server/preview/preview-launcher.mjs +9 -2
- package/dist-server/preview/preview-start.mjs +2 -2
- package/dist-server/upstream/publication-transport.mjs +19 -19
- package/package.json +10 -2
- 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 +2 -1
- 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 +29 -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 +18 -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 +15 -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 +14 -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 +1 -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 +8 -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 +6 -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,271 +0,0 @@
|
|
|
1
|
-
// tune 运行时:纯 JavaScript、零依赖,因此可以被两侧同时 import,保证语义同源:
|
|
2
|
-
// - 游戏运行时:FeatureConfig.ts(把 tune 标记解析为裸值并应用 Web 覆盖)
|
|
3
|
-
// - 导出器:context/skills/export-config/.../loadFeatureConfigs.mjs(把 tune 标记拍平成 schema 条目)
|
|
4
|
-
// 只要两侧共用本文件,「代码 -> JSON」与「JSON -> 运行时」就不会出现类型/范围语义漂移。
|
|
5
|
-
// 类型声明见同目录 tuneRuntime.d.mts。
|
|
6
|
-
|
|
7
|
-
const COLOR_RE = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;
|
|
8
|
-
// 与 ConfigManager / 导出器保持一致:schema 每段只允许 Unicode 字母、数字、下划线。
|
|
9
|
-
const KEY_SEGMENT_RE = /^[\p{L}\p{N}_]+$/u;
|
|
10
|
-
|
|
11
|
-
// 只负责「裸 CDN 相对路径补域名」这一件事(resolveAssetUrl.ts 的 TS 实现不可 import,故此处内联同判据):AIGC result_url 可能丢失域名(如 test1/ai-resource/...),注入 .path 前补全,否则会被当作相对路径请求 404。完整 URL 与其余路径原样返回。
|
|
12
|
-
const CDN_ROOT = 'https://file.craft.qq.com';
|
|
13
|
-
function normalizeResourcePath(pathOrUrl) {
|
|
14
|
-
const trimmed = typeof pathOrUrl === 'string' ? pathOrUrl.trim() : '';
|
|
15
|
-
if (!trimmed) return trimmed;
|
|
16
|
-
if (/^(?:https?:\/\/|data:|blob:)/i.test(trimmed)) return trimmed;
|
|
17
|
-
if (trimmed.startsWith('/') || trimmed.startsWith('./') || trimmed.startsWith('../')) return trimmed;
|
|
18
|
-
return `${CDN_ROOT}/${trimmed}`;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const TUNE_TYPES = Object.freeze(['int', 'float', 'string', 'bool', 'enum', 'color']);
|
|
22
|
-
|
|
23
|
-
function isRecord(value) {
|
|
24
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function isTuned(value) {
|
|
28
|
-
return isRecord(value)
|
|
29
|
-
&& value.$tune === true
|
|
30
|
-
&& typeof value.type === 'string'
|
|
31
|
-
&& Object.hasOwn(value, 'value');
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// AssetRef 是资产事实,导出为 resource 控件供 Web 端替换(见 resolveFeatureData 的 AssetRef 分支)。
|
|
35
|
-
export function isAssetRefLike(value) {
|
|
36
|
-
return isRecord(value) && value.$assetRef === true;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// 校验某个值是否满足 tune 元信息约束。
|
|
40
|
-
// 同时用于:声明期(createTuned,违规直接抛错)与覆盖期(applyOverride,违规忽略并告警)。
|
|
41
|
-
// 返回 null 表示合法,否则返回中文原因。
|
|
42
|
-
export function checkTunedValue(meta, value) {
|
|
43
|
-
switch (meta.type) {
|
|
44
|
-
case 'int':
|
|
45
|
-
if (typeof value !== 'number' || !Number.isInteger(value)) return `值必须是整数,实际 ${JSON.stringify(value)}`;
|
|
46
|
-
break;
|
|
47
|
-
case 'float':
|
|
48
|
-
if (typeof value !== 'number' || !Number.isFinite(value)) return `值必须是有限数值,实际 ${JSON.stringify(value)}`;
|
|
49
|
-
break;
|
|
50
|
-
case 'string':
|
|
51
|
-
if (typeof value !== 'string') return `值必须是字符串,实际 ${JSON.stringify(value)}`;
|
|
52
|
-
break;
|
|
53
|
-
case 'bool':
|
|
54
|
-
if (typeof value !== 'boolean') return `值必须是布尔值,实际 ${JSON.stringify(value)}`;
|
|
55
|
-
break;
|
|
56
|
-
case 'enum':
|
|
57
|
-
if (typeof value !== 'string') return `值必须是枚举字符串,实际 ${JSON.stringify(value)}`;
|
|
58
|
-
if (!meta.options.includes(value)) return `值 '${value}' 不在 options [${meta.options.join(', ')}] 中`;
|
|
59
|
-
break;
|
|
60
|
-
case 'color':
|
|
61
|
-
if (typeof value !== 'string' || !COLOR_RE.test(value)) return `值必须是 #rgb / #rrggbb / #rrggbbaa,实际 ${JSON.stringify(value)}`;
|
|
62
|
-
break;
|
|
63
|
-
default:
|
|
64
|
-
return `未知 tune 类型 '${meta.type}'`;
|
|
65
|
-
}
|
|
66
|
-
if (meta.type === 'int' || meta.type === 'float') {
|
|
67
|
-
if (typeof meta.min === 'number' && value < meta.min) return `值 ${value} 小于 min ${meta.min}`;
|
|
68
|
-
if (typeof meta.max === 'number' && value > meta.max) return `值 ${value} 大于 max ${meta.max}`;
|
|
69
|
-
}
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function createTuned(type, value, extra) {
|
|
74
|
-
const meta = { $tune: true, type, value };
|
|
75
|
-
|
|
76
|
-
if (type === 'int' || type === 'float') {
|
|
77
|
-
const range = extra ?? {};
|
|
78
|
-
if (!isRecord(range)) throw new TypeError(`[tune.${type}] range 必须是 Object`);
|
|
79
|
-
// 必须省略而不是写 undefined:导出器用 Object.hasOwn 判断是否使用作者显式范围。
|
|
80
|
-
for (const bound of ['min', 'max']) {
|
|
81
|
-
if (range[bound] === undefined) continue;
|
|
82
|
-
if (typeof range[bound] !== 'number' || !Number.isFinite(range[bound])) {
|
|
83
|
-
throw new TypeError(`[tune.${type}] ${bound} 必须是有限数值`);
|
|
84
|
-
}
|
|
85
|
-
meta[bound] = range[bound];
|
|
86
|
-
}
|
|
87
|
-
if (typeof meta.min === 'number' && typeof meta.max === 'number' && meta.min > meta.max) {
|
|
88
|
-
throw new TypeError(`[tune.${type}] 必须满足 min <= max`);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (type === 'enum') {
|
|
93
|
-
if (!Array.isArray(extra) || extra.length === 0) throw new TypeError('[tune.enum] options 必须是非空数组');
|
|
94
|
-
extra.forEach((option, index) => {
|
|
95
|
-
if (typeof option !== 'string' || option.trim().length === 0) {
|
|
96
|
-
throw new TypeError(`[tune.enum] options[${index}] 必须是非空字符串`);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
if (new Set(extra).size !== extra.length) throw new TypeError('[tune.enum] options 不得重复');
|
|
100
|
-
meta.options = Object.freeze([...extra]);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
const error = checkTunedValue(meta, value);
|
|
104
|
-
if (error) throw new TypeError(`[tune.${type}] ${error}`);
|
|
105
|
-
return Object.freeze(meta);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// tune.* 用于精修控件语义(自定义范围、枚举下拉、强制类型);
|
|
109
|
-
// 未标注的标量叶子由 inferControlMeta 自动成为控件,见其说明。
|
|
110
|
-
export const tune = Object.freeze({
|
|
111
|
-
int: (value, range) => createTuned('int', value, range),
|
|
112
|
-
float: (value, range) => createTuned('float', value, range),
|
|
113
|
-
string: (value) => createTuned('string', value),
|
|
114
|
-
bool: (value) => createTuned('bool', value),
|
|
115
|
-
enum: (value, options) => createTuned('enum', value, options),
|
|
116
|
-
color: (value) => createTuned('color', value),
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* 未标注叶子的自动控件推断:让 config.ts 零标注也能导出,写配置的一侧无需感知导出机制。
|
|
121
|
-
* - number -> 整数字面量按 int(滑条 step=1),非整数按 float
|
|
122
|
-
* - boolean -> bool
|
|
123
|
-
* - 颜色串 -> color
|
|
124
|
-
* - 其余字符串 -> null(动作名、存档键、动画标识符等改错即崩,默认私有)
|
|
125
|
-
* 想让整数默认值支持连续调节,或需要枚举下拉,用 tune.float / tune.enum 显式标注。
|
|
126
|
-
* @returns {{type: string, value: unknown} | null} null 表示该叶子不导出
|
|
127
|
-
*/
|
|
128
|
-
export function inferControlMeta(value) {
|
|
129
|
-
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
130
|
-
return { type: Number.isInteger(value) ? 'int' : 'float', value };
|
|
131
|
-
}
|
|
132
|
-
if (typeof value === 'boolean') return { type: 'bool', value };
|
|
133
|
-
if (typeof value === 'string' && COLOR_RE.test(value.trim())) return { type: 'color', value };
|
|
134
|
-
return null;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// 导出器条目形状:与旧 config.json 的 { type, value, min?, max?, options? } 完全一致,
|
|
138
|
-
// 因此 export-config 的生成/翻译/终态阶段无需任何改动。
|
|
139
|
-
function controlOf(tuned) {
|
|
140
|
-
const control = { type: tuned.type, value: tuned.value };
|
|
141
|
-
if (typeof tuned.min === 'number') control.min = tuned.min;
|
|
142
|
-
if (typeof tuned.max === 'number') control.max = tuned.max;
|
|
143
|
-
if (tuned.options) control.options = [...tuned.options];
|
|
144
|
-
return control;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// 与 ConfigManager.valuesEqual 同语义:容忍 JSON 数值精度差异,防陈旧覆盖。
|
|
148
|
-
export function valuesEqual(left, right) {
|
|
149
|
-
if (typeof left === 'number' && typeof right === 'number') return Math.abs(left - right) < 1e-9;
|
|
150
|
-
if (typeof left === typeof right) return left === right;
|
|
151
|
-
return String(left) === String(right);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// 把 unified_data_control_config.json(数组)索引成 schema -> { origin, value }。
|
|
155
|
-
// 模板初始值 {} 与任何非数组输入都安全降级为空索引。
|
|
156
|
-
export function buildOverrideIndex(source) {
|
|
157
|
-
const index = new Map();
|
|
158
|
-
if (!Array.isArray(source)) return index;
|
|
159
|
-
for (const entry of source) {
|
|
160
|
-
if (!isRecord(entry) || entry.enabled === false) continue;
|
|
161
|
-
const schema = typeof entry.schema === 'string' ? entry.schema.trim() : '';
|
|
162
|
-
if (!schema) continue;
|
|
163
|
-
const control = entry.control;
|
|
164
|
-
if (!isRecord(control) || !Object.hasOwn(control, 'value')) continue;
|
|
165
|
-
index.set(schema, { origin: control.origin, value: control.value });
|
|
166
|
-
}
|
|
167
|
-
return index;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* 深度遍历 feature 数据:
|
|
172
|
-
* - tune 标记 -> 替换为裸值(可被 overrides 覆盖),并登记控件定义
|
|
173
|
-
* - 未标注标量 -> 按 inferControlMeta 自动登记控件(同样可被覆盖)
|
|
174
|
-
* - AssetRef -> 登记为 resource 控件,控件值取 AssetRef.source(该槽位当前生效的资产
|
|
175
|
-
* URL,供 Web 面板反查缩略图);生效路径注入为 .path,取「面板选中值 >
|
|
176
|
-
* source」,两者都空时无该字段
|
|
177
|
-
* - 数组子树 -> 原样拷贝,内部不自动登记(下标会随长度漂移,schema 不稳定)
|
|
178
|
-
* controls 中记录的始终是「代码里声明的原始值」(即导出时的 origin),与生效值解耦。
|
|
179
|
-
* @returns {{ data: unknown, controls: Record<string, object>, errors: string[] }}
|
|
180
|
-
*/
|
|
181
|
-
export function resolveFeatureData({ owner, data, overrides, onWarn } = {}) {
|
|
182
|
-
const controls = {};
|
|
183
|
-
const errors = [];
|
|
184
|
-
const warn = typeof onWarn === 'function' ? onWarn : () => {};
|
|
185
|
-
const index = overrides instanceof Map ? overrides : new Map();
|
|
186
|
-
const visiting = new Set();
|
|
187
|
-
|
|
188
|
-
const label = (path) => (path ? `${owner}.${path}` : owner);
|
|
189
|
-
|
|
190
|
-
// 覆盖只在 enabled、origin 与代码默认值一致、且新值满足控件约束时生效,否则告警保留代码值。
|
|
191
|
-
const applyOverride = (meta, path) => {
|
|
192
|
-
const schema = `${owner}.${path}`;
|
|
193
|
-
const override = index.get(schema);
|
|
194
|
-
if (!override) return meta.value;
|
|
195
|
-
if (!valuesEqual(override.origin, meta.value)) {
|
|
196
|
-
warn(`跳过覆盖 '${schema}':origin ${JSON.stringify(override.origin)} 与代码默认值 ${JSON.stringify(meta.value)} 不一致`);
|
|
197
|
-
return meta.value;
|
|
198
|
-
}
|
|
199
|
-
const error = checkTunedValue(meta, override.value);
|
|
200
|
-
if (error) {
|
|
201
|
-
warn(`跳过覆盖 '${schema}':${error}`);
|
|
202
|
-
return meta.value;
|
|
203
|
-
}
|
|
204
|
-
return override.value;
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
const walk = (input, path, inArray) => {
|
|
208
|
-
if (isTuned(input)) {
|
|
209
|
-
if (!path) {
|
|
210
|
-
errors.push(`${owner}: 顶层不得直接是 tune 标记,必须包裹在对象中`);
|
|
211
|
-
return input.value;
|
|
212
|
-
}
|
|
213
|
-
controls[path] = controlOf(input);
|
|
214
|
-
return applyOverride(input, path);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// 资产槽位:登记为 resource 控件,Web 端选中的资源路径经 override 注入为 .path。
|
|
218
|
-
// 不复用 applyOverride —— resource 的合法值是任意非空字符串,与 tune 的类型/范围校验语义不同。
|
|
219
|
-
//
|
|
220
|
-
// 控件 value 取 AssetRef.source(该槽位当前生效的资产 URL):Web 面板拿这个值当 key
|
|
221
|
-
// 反查素材库、取 preview_image_url 渲染缩略图,留空则卡片没有预览图。
|
|
222
|
-
// 程序直绘的槽位没有 source,value 仍是空串。
|
|
223
|
-
if (isAssetRefLike(input)) {
|
|
224
|
-
if (!path) {
|
|
225
|
-
errors.push(`${owner}: 顶层不得直接是 asset.*() 声明,必须包裹在对象中`);
|
|
226
|
-
return input;
|
|
227
|
-
}
|
|
228
|
-
const source = typeof input.source === 'string' ? input.source.trim() : '';
|
|
229
|
-
controls[path] = { type: 'resource', value: source, slot: input.slot, assetCategory: input.category };
|
|
230
|
-
const override = index.get(`${owner}.${path}`);
|
|
231
|
-
const overridden = typeof override?.value === 'string' ? override.value.trim() : '';
|
|
232
|
-
// 面板选过资产就用面板的值,否则回落到代码里写的 source(AIGC 产物 / 召回命中)。
|
|
233
|
-
const resourcePath = overridden || source;
|
|
234
|
-
if (!resourcePath) return input;
|
|
235
|
-
return Object.freeze({ ...input, path: normalizeResourcePath(resourcePath) });
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
if (typeof input !== 'object' || input === null) {
|
|
239
|
-
if (!path || inArray) return input;
|
|
240
|
-
const meta = inferControlMeta(input);
|
|
241
|
-
if (!meta) return input;
|
|
242
|
-
controls[path] = controlOf(meta);
|
|
243
|
-
return applyOverride(meta, path);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
if (visiting.has(input)) {
|
|
247
|
-
errors.push(`${label(path)}: 检测到循环引用`);
|
|
248
|
-
return undefined;
|
|
249
|
-
}
|
|
250
|
-
visiting.add(input);
|
|
251
|
-
|
|
252
|
-
let result;
|
|
253
|
-
if (Array.isArray(input)) {
|
|
254
|
-
result = input.map((item, itemIndex) => walk(item, path ? `${path}.${itemIndex}` : String(itemIndex), true));
|
|
255
|
-
} else {
|
|
256
|
-
result = {};
|
|
257
|
-
for (const [key, child] of Object.entries(input)) {
|
|
258
|
-
if (!KEY_SEGMENT_RE.test(key)) {
|
|
259
|
-
errors.push(`${label(path)}: 键 '${key}' 非法;每段只能包含 Unicode 字母、数字或下划线`);
|
|
260
|
-
continue;
|
|
261
|
-
}
|
|
262
|
-
result[key] = walk(child, path ? `${path}.${key}` : key, inArray);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
visiting.delete(input);
|
|
267
|
-
return result;
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
return { data: walk(data, '', false), controls, errors };
|
|
271
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @tencent/core-manager-js — 业务代码公开面。
|
|
3
|
-
*
|
|
4
|
-
* 业务统一从包根引入;冻结工程运行时改从 `@tencent/core-manager-js/runtime`
|
|
5
|
-
* 引入宿主、Runtime 与内部 Manager。
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export * from './assetManager/AssetRef';
|
|
9
|
-
export * from './assetManager/resolveAssetUrl';
|
|
10
|
-
|
|
11
|
-
export * from './audioManager/AudioManager';
|
|
12
|
-
|
|
13
|
-
export * from './configManager/FeatureConfig';
|
|
14
|
-
|
|
15
|
-
export * from './inputManager/InputConfig';
|
|
16
|
-
export * from './inputManager/InputManager';
|
|
17
|
-
|
|
18
|
-
export * from './logManager/LogManager';
|
|
19
|
-
|
|
20
|
-
export * from './spriteAnimManager/CharacterEntity';
|
|
21
|
-
export * from './spriteAnimManager/CharacterPhysicsBinding';
|
|
22
|
-
export * from './spriteAnimManager/EffectComposite';
|
|
23
|
-
export * from './spriteAnimManager/EffectEntity';
|
|
24
|
-
export * from './spriteAnimManager/FxManager';
|
|
25
|
-
export * from './spriteAnimManager/FxRecipe';
|
|
26
|
-
|
|
27
|
-
export * from './uiManager/DomUiKit';
|
|
28
|
-
export * from './uiManager/UIFacadePlugin';
|
|
29
|
-
export type { DomUiPanel } from './uiManager/DomUiContracts';
|
|
30
|
-
|
|
31
|
-
export * from './videoManager/VideoManager';
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* input_config.json 的 TypeScript 类型定义。
|
|
3
|
-
* 与 input_config.example.json 一一对应。
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/** PC 端单轴的负向/正向按键集合 */
|
|
7
|
-
export interface PcAxisBinding {
|
|
8
|
-
negative: string[];
|
|
9
|
-
positive: string[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** PC 端一个轴的水平/竖直按键 */
|
|
13
|
-
export interface PcAxis {
|
|
14
|
-
horizontal: PcAxisBinding;
|
|
15
|
-
vertical: PcAxisBinding;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/** 移动端摇杆配置(用于 axes) */
|
|
19
|
-
export interface MobileJoystick {
|
|
20
|
-
type: 'joystick';
|
|
21
|
-
/** 中心 X(负值=从屏幕右侧算起) */
|
|
22
|
-
x: number;
|
|
23
|
-
/** 中心 Y(负值=从屏幕底部算起) */
|
|
24
|
-
y: number;
|
|
25
|
-
baseSize?: number;
|
|
26
|
-
thumbSize?: number;
|
|
27
|
-
/** 有效拖动半径(逻辑值) */
|
|
28
|
-
baseRadius?: number;
|
|
29
|
-
/** 固定位置 / 跟随触点 */
|
|
30
|
-
fixed?: boolean;
|
|
31
|
-
/** 响应区域 */
|
|
32
|
-
zone?: 'left' | 'right' | 'full';
|
|
33
|
-
/** 死区比例 */
|
|
34
|
-
deadZone?: number;
|
|
35
|
-
baseAlpha?: number;
|
|
36
|
-
thumbAlpha?: number;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/** 轴定义 */
|
|
40
|
-
export interface AxisDefinition {
|
|
41
|
-
pc: PcAxis;
|
|
42
|
-
mobile: MobileJoystick;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/** 移动端虚拟按钮 */
|
|
46
|
-
export interface MobileButton {
|
|
47
|
-
type: 'button';
|
|
48
|
-
/** 中心 X(负值=从屏幕右侧算起) */
|
|
49
|
-
x: number;
|
|
50
|
-
/** 中心 Y(负值=从屏幕底部算起) */
|
|
51
|
-
y: number;
|
|
52
|
-
/** 圆形按钮半径(与 width/height 二选一) */
|
|
53
|
-
radius?: number;
|
|
54
|
-
/** 矩形按钮宽 */
|
|
55
|
-
width?: number;
|
|
56
|
-
/** 矩形按钮高 */
|
|
57
|
-
height?: number;
|
|
58
|
-
/** 按钮文字 */
|
|
59
|
-
label?: string;
|
|
60
|
-
/** 透明度,默认 0.7 */
|
|
61
|
-
alpha?: number;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/** 动作定义 */
|
|
65
|
-
export interface ActionDefinition {
|
|
66
|
-
/** PC 端按键名数组。支持:
|
|
67
|
-
* - 字母键 'A'..'Z'
|
|
68
|
-
* - 数字键 '0'..'9'
|
|
69
|
-
* - 特殊键 'SPACE' / 'UP' / 'DOWN' / 'LEFT' / 'RIGHT' / 'ENTER' / 'SHIFT' / 'CTRL' / 'ALT' / 'TAB' / 'ESC'
|
|
70
|
-
* - 鼠标键 'MOUSE_LEFT' / 'MOUSE_RIGHT' / 'MOUSE_MIDDLE'
|
|
71
|
-
*/
|
|
72
|
-
pc: string[];
|
|
73
|
-
/** 移动端按钮配置 */
|
|
74
|
-
mobile: MobileButton;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/** 输入配置根对象 */
|
|
78
|
-
export interface InputConfig {
|
|
79
|
-
axes: Record<string, AxisDefinition>;
|
|
80
|
-
actions: Record<string, ActionDefinition>;
|
|
81
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
-
|
|
3
|
-
vi.mock('./_internal/InputManagerImpl', () => ({
|
|
4
|
-
inputManagerImpl: {
|
|
5
|
-
getHorizontal: vi.fn(() => 0),
|
|
6
|
-
getVertical: vi.fn(() => 0),
|
|
7
|
-
getPressed: vi.fn(() => false),
|
|
8
|
-
wasPressed: vi.fn(() => false),
|
|
9
|
-
wasReleased: vi.fn(() => false),
|
|
10
|
-
getDirectionEdge: vi.fn(() => null),
|
|
11
|
-
},
|
|
12
|
-
}));
|
|
13
|
-
|
|
14
|
-
import { InputManager } from './InputManager';
|
|
15
|
-
|
|
16
|
-
describe('InputManager business facade', () => {
|
|
17
|
-
it('只暴露业务查询方法且对象已冻结', () => {
|
|
18
|
-
expect(Object.keys(InputManager).sort()).toEqual([
|
|
19
|
-
'getDirectionEdge',
|
|
20
|
-
'getHorizontal',
|
|
21
|
-
'getPressed',
|
|
22
|
-
'getVertical',
|
|
23
|
-
'wasPressed',
|
|
24
|
-
'wasReleased',
|
|
25
|
-
]);
|
|
26
|
-
expect(Object.isFrozen(InputManager)).toBe(true);
|
|
27
|
-
|
|
28
|
-
for (const internalName of [
|
|
29
|
-
'configure',
|
|
30
|
-
'bindHost',
|
|
31
|
-
'tick',
|
|
32
|
-
'unbindHost',
|
|
33
|
-
'setConfig',
|
|
34
|
-
'bindScene',
|
|
35
|
-
'update',
|
|
36
|
-
'unbindScene',
|
|
37
|
-
'init',
|
|
38
|
-
'destroy',
|
|
39
|
-
]) {
|
|
40
|
-
expect(internalName in InputManager).toBe(false);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { inputManagerImpl } from './_internal/InputManagerImpl';
|
|
2
|
-
|
|
3
|
-
/** 离散方向(用于 getDirectionEdge)。'none' 表示轴未跨过阈值。 */
|
|
4
|
-
export type Direction = 'up' | 'down' | 'left' | 'right' | 'none';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 业务输入查询分面。
|
|
8
|
-
*
|
|
9
|
-
* 配置、宿主绑定和逐帧刷新只存在于框架内部 InputRuntime,
|
|
10
|
-
* 业务代码无法通过此类型或对象访问输入生命周期。
|
|
11
|
-
*/
|
|
12
|
-
export interface InputManagerApi {
|
|
13
|
-
getHorizontal(axis?: string): number;
|
|
14
|
-
getVertical(axis?: string): number;
|
|
15
|
-
/** 当前 hold 状态。 */
|
|
16
|
-
getPressed(action: string): boolean;
|
|
17
|
-
/** 当前帧从未按下变为按下;同一帧可被多个消费者稳定读取。 */
|
|
18
|
-
wasPressed(action: string): boolean;
|
|
19
|
-
/** 当前帧从按下变为释放;同一帧可被多个消费者稳定读取。 */
|
|
20
|
-
wasReleased(action: string): boolean;
|
|
21
|
-
getDirectionEdge(axis?: string, threshold?: number): Direction | null;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const InputManager: Readonly<InputManagerApi> = Object.freeze({
|
|
25
|
-
getHorizontal: (axis?: string) => inputManagerImpl.getHorizontal(axis),
|
|
26
|
-
getVertical: (axis?: string) => inputManagerImpl.getVertical(axis),
|
|
27
|
-
getPressed: (action: string) => inputManagerImpl.getPressed(action),
|
|
28
|
-
wasPressed: (action: string) => inputManagerImpl.wasPressed(action),
|
|
29
|
-
wasReleased: (action: string) => inputManagerImpl.wasReleased(action),
|
|
30
|
-
getDirectionEdge: (axis?: string, threshold?: number) =>
|
|
31
|
-
inputManagerImpl.getDirectionEdge(axis, threshold),
|
|
32
|
-
});
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import type Phaser from 'phaser';
|
|
3
|
-
import type { InputConfig } from './InputConfig';
|
|
4
|
-
|
|
5
|
-
const providerMocks = vi.hoisted(() => ({
|
|
6
|
-
applyConfig: vi.fn(),
|
|
7
|
-
enable: vi.fn(),
|
|
8
|
-
update: vi.fn(),
|
|
9
|
-
destroy: vi.fn(),
|
|
10
|
-
pressed: {} as Record<string, boolean>,
|
|
11
|
-
}));
|
|
12
|
-
|
|
13
|
-
vi.mock('./KeyboardProvider', () => ({
|
|
14
|
-
KeyboardProvider: class {
|
|
15
|
-
applyConfig = providerMocks.applyConfig;
|
|
16
|
-
enable = providerMocks.enable;
|
|
17
|
-
update = providerMocks.update;
|
|
18
|
-
destroy = providerMocks.destroy;
|
|
19
|
-
getAxis = vi.fn(() => ({ x: 0, y: 0 }));
|
|
20
|
-
isActionPressed = vi.fn((action: string) => providerMocks.pressed[action] ?? false);
|
|
21
|
-
},
|
|
22
|
-
}));
|
|
23
|
-
|
|
24
|
-
vi.mock('./TouchProvider', () => ({
|
|
25
|
-
TouchProvider: class {
|
|
26
|
-
applyConfig = providerMocks.applyConfig;
|
|
27
|
-
enable = providerMocks.enable;
|
|
28
|
-
update = providerMocks.update;
|
|
29
|
-
destroy = providerMocks.destroy;
|
|
30
|
-
getAxis = vi.fn(() => ({ x: 0, y: 0 }));
|
|
31
|
-
isActionPressed = vi.fn((action: string) => providerMocks.pressed[action] ?? false);
|
|
32
|
-
},
|
|
33
|
-
}));
|
|
34
|
-
|
|
35
|
-
vi.mock('../logManager/LogManager', () => ({
|
|
36
|
-
LogManager: {
|
|
37
|
-
info: vi.fn(),
|
|
38
|
-
},
|
|
39
|
-
}));
|
|
40
|
-
|
|
41
|
-
const config: InputConfig = {
|
|
42
|
-
axes: {},
|
|
43
|
-
actions: {
|
|
44
|
-
fire: {
|
|
45
|
-
pc: ['SPACE'],
|
|
46
|
-
mobile: { type: 'button', x: -80, y: -80, radius: 40 },
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const host = { input: {} } as Phaser.Scene;
|
|
52
|
-
|
|
53
|
-
async function loadRuntime() {
|
|
54
|
-
return import('./InputRuntime');
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
describe('InputRuntime lifecycle', () => {
|
|
58
|
-
beforeEach(() => {
|
|
59
|
-
vi.resetModules();
|
|
60
|
-
vi.clearAllMocks();
|
|
61
|
-
providerMocks.pressed = {};
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it('未配置或宿主无效时 bindHost fail-fast', async () => {
|
|
65
|
-
const { InputRuntime } = await loadRuntime();
|
|
66
|
-
|
|
67
|
-
expect(() => InputRuntime.bindHost(host)).toThrow(/configure/);
|
|
68
|
-
|
|
69
|
-
InputRuntime.configure(config);
|
|
70
|
-
expect(() => InputRuntime.bindHost(null as unknown as Phaser.Scene)).toThrow(
|
|
71
|
-
/有效的 Phaser\.Scene/,
|
|
72
|
-
);
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
it('冻结生命周期分面,并拒绝第二个 active lease', async () => {
|
|
76
|
-
const { InputRuntime } = await loadRuntime();
|
|
77
|
-
InputRuntime.configure(config);
|
|
78
|
-
|
|
79
|
-
const lease = InputRuntime.bindHost(host);
|
|
80
|
-
|
|
81
|
-
expect(Object.isFrozen(InputRuntime)).toBe(true);
|
|
82
|
-
expect(Object.isFrozen(lease)).toBe(true);
|
|
83
|
-
expect(() => InputRuntime.bindHost(host)).toThrow(/active host lease/);
|
|
84
|
-
expect(() => InputRuntime.configure(config)).toThrow(/宿主绑定前/);
|
|
85
|
-
|
|
86
|
-
InputRuntime.tick(lease, 100, 16);
|
|
87
|
-
expect(providerMocks.update).toHaveBeenCalledWith(100, 16);
|
|
88
|
-
expect(InputRuntime.unbindHost(lease)).toBe(true);
|
|
89
|
-
expect(providerMocks.destroy).toHaveBeenCalledOnce();
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
it('stale lease 不会刷新或释放新 owner', async () => {
|
|
93
|
-
const { InputRuntime } = await loadRuntime();
|
|
94
|
-
InputRuntime.configure(config);
|
|
95
|
-
|
|
96
|
-
const staleLease = InputRuntime.bindHost(host);
|
|
97
|
-
expect(InputRuntime.unbindHost(staleLease)).toBe(true);
|
|
98
|
-
const activeLease = InputRuntime.bindHost(host);
|
|
99
|
-
vi.clearAllMocks();
|
|
100
|
-
|
|
101
|
-
InputRuntime.tick(staleLease, 1, 2);
|
|
102
|
-
expect(providerMocks.update).not.toHaveBeenCalled();
|
|
103
|
-
expect(InputRuntime.unbindHost(staleLease)).toBe(false);
|
|
104
|
-
expect(providerMocks.destroy).not.toHaveBeenCalled();
|
|
105
|
-
|
|
106
|
-
InputRuntime.tick(activeLease, 3, 4);
|
|
107
|
-
expect(providerMocks.update).toHaveBeenCalledWith(3, 4);
|
|
108
|
-
expect(InputRuntime.unbindHost(activeLease)).toBe(true);
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
it('action edge 在 tick 时生成且同一帧可重复读取', async () => {
|
|
112
|
-
const { InputRuntime } = await loadRuntime();
|
|
113
|
-
const { InputManager } = await import('./InputManager');
|
|
114
|
-
InputRuntime.configure(config);
|
|
115
|
-
const lease = InputRuntime.bindHost(host);
|
|
116
|
-
|
|
117
|
-
InputRuntime.tick(lease, 0, 16);
|
|
118
|
-
expect(InputManager.wasPressed('fire')).toBe(false);
|
|
119
|
-
expect(InputManager.wasReleased('fire')).toBe(false);
|
|
120
|
-
|
|
121
|
-
providerMocks.pressed.fire = true;
|
|
122
|
-
InputRuntime.tick(lease, 16, 16);
|
|
123
|
-
expect(InputManager.getPressed('fire')).toBe(true);
|
|
124
|
-
expect(InputManager.wasPressed('fire')).toBe(true);
|
|
125
|
-
expect(InputManager.wasPressed('fire')).toBe(true);
|
|
126
|
-
expect(InputManager.wasReleased('fire')).toBe(false);
|
|
127
|
-
|
|
128
|
-
InputRuntime.tick(lease, 32, 16);
|
|
129
|
-
expect(InputManager.wasPressed('fire')).toBe(false);
|
|
130
|
-
|
|
131
|
-
providerMocks.pressed.fire = false;
|
|
132
|
-
InputRuntime.tick(lease, 48, 16);
|
|
133
|
-
expect(InputManager.getPressed('fire')).toBe(false);
|
|
134
|
-
expect(InputManager.wasReleased('fire')).toBe(true);
|
|
135
|
-
expect(InputManager.wasReleased('fire')).toBe(true);
|
|
136
|
-
|
|
137
|
-
expect(InputRuntime.unbindHost(lease)).toBe(true);
|
|
138
|
-
expect(InputManager.wasPressed('fire')).toBe(false);
|
|
139
|
-
expect(InputManager.wasReleased('fire')).toBe(false);
|
|
140
|
-
});
|
|
141
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { inputManagerImpl, type InputHostLease } from './_internal/InputManagerImpl';
|
|
2
|
-
import type { InputConfig } from './InputConfig';
|
|
3
|
-
|
|
4
|
-
export type { InputHostLease } from './_internal/InputManagerImpl';
|
|
5
|
-
|
|
6
|
-
interface InputRuntimeLifecycle {
|
|
7
|
-
configure(config: InputConfig): void;
|
|
8
|
-
bindHost(host: Phaser.Scene): InputHostLease;
|
|
9
|
-
tick(lease: InputHostLease, time: number, delta: number): void;
|
|
10
|
-
unbindHost(lease: InputHostLease): boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/** @internal 冻结的框架输入生命周期分面;仅供 main 与 RuntimeHostScene 接线。 */
|
|
14
|
-
export const InputRuntime: Readonly<InputRuntimeLifecycle> = Object.freeze({
|
|
15
|
-
configure: (config: InputConfig) => inputManagerImpl.configure(config),
|
|
16
|
-
bindHost: (host: Phaser.Scene) => inputManagerImpl.bindHost(host),
|
|
17
|
-
tick: (lease: InputHostLease, time: number, delta: number) =>
|
|
18
|
-
inputManagerImpl.tick(lease, time, delta),
|
|
19
|
-
unbindHost: (lease: InputHostLease) => inputManagerImpl.unbindHost(lease),
|
|
20
|
-
});
|