@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,448 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* 异比例适配审计:在多档 viewport 下加载构建产物,度量留边、stage 缩放与 UI 溢出。
|
|
4
|
-
*
|
|
5
|
-
* 传入 --config 时先采集首选显示尺寸,再采集通用比例;断言以运行时实测尺寸为准。
|
|
6
|
-
*
|
|
7
|
-
* 用法:
|
|
8
|
-
* node aspect_audit.mjs --game <dist目录> --out <输出目录>
|
|
9
|
-
* [--config <game.config.json路径>]
|
|
10
|
-
* [--package-root <含 playwright 的目录>] [--browser-channel chrome|msedge]
|
|
11
|
-
* [--settle-ms 1200] [--steps <JSON步骤文件>] [--click-center]
|
|
12
|
-
*
|
|
13
|
-
* 退出码:
|
|
14
|
-
* 0 冷启动与同会话切换的几何断言通过(仍需人工判读玩法与取景)
|
|
15
|
-
* 1 有档位渲染失败(canvas 缺失或尺寸为 0)或断言不过
|
|
16
|
-
* 2 环境异常(playwright 不可用 / 产物入口缺失)
|
|
17
|
-
*/
|
|
18
|
-
import fs from 'node:fs';
|
|
19
|
-
import http from 'node:http';
|
|
20
|
-
import path from 'node:path';
|
|
21
|
-
import { pathToFileURL } from 'node:url';
|
|
22
|
-
|
|
23
|
-
const MIME = {
|
|
24
|
-
'.html': 'text/html; charset=utf-8',
|
|
25
|
-
'.js': 'text/javascript; charset=utf-8',
|
|
26
|
-
'.mjs': 'text/javascript; charset=utf-8',
|
|
27
|
-
'.css': 'text/css; charset=utf-8',
|
|
28
|
-
'.json': 'application/json; charset=utf-8',
|
|
29
|
-
'.png': 'image/png',
|
|
30
|
-
'.jpg': 'image/jpeg',
|
|
31
|
-
'.jpeg': 'image/jpeg',
|
|
32
|
-
'.webp': 'image/webp',
|
|
33
|
-
'.svg': 'image/svg+xml',
|
|
34
|
-
'.ico': 'image/x-icon',
|
|
35
|
-
'.woff': 'font/woff',
|
|
36
|
-
'.woff2': 'font/woff2',
|
|
37
|
-
'.ttf': 'font/ttf',
|
|
38
|
-
'.mp3': 'audio/mpeg',
|
|
39
|
-
'.ogg': 'audio/ogg',
|
|
40
|
-
'.wav': 'audio/wav',
|
|
41
|
-
'.mp4': 'video/mp4',
|
|
42
|
-
'.glb': 'model/gltf-binary',
|
|
43
|
-
'.gltf': 'model/gltf+json',
|
|
44
|
-
'.hdr': 'application/octet-stream',
|
|
45
|
-
'.wasm': 'application/wasm',
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/** 短边基准。项目若显式覆盖 ViewportOptions.shortEdge,这里同步改 */
|
|
49
|
-
const SHORT_EDGE = 1080;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* 档位表。长边固定 1024,短边按比例推算 —— 与验收截图的尺寸量级一致,
|
|
53
|
-
* 既能暴露比例问题又不浪费带宽。
|
|
54
|
-
*
|
|
55
|
-
* 适配是**方向无关**的(短边锁定 + 长边扩展),所以横竖两侧都要测:
|
|
56
|
-
* 横竖方向都需要测试;支持范围内铺满,超范围允许模型留边。
|
|
57
|
-
* `expectClamp` 标记的档位超出 4:3 ~ 20:9 支持区间,留边是设计行为而非缺陷。
|
|
58
|
-
*/
|
|
59
|
-
const VIEWPORTS = [
|
|
60
|
-
{ name: '1-1', width: 768, height: 768, note: '极方屏,比 4:3 更方', expectClamp: true },
|
|
61
|
-
{ name: '4-3', width: 1024, height: 768, note: 'iPad 横屏,支持区间最方端' },
|
|
62
|
-
{ name: '16-9', width: 1024, height: 576, note: '常见横屏基准' },
|
|
63
|
-
{ name: '19.5-9', width: 1024, height: 473, note: 'iPhone 横屏' },
|
|
64
|
-
{ name: '21-9', width: 1024, height: 439, note: '超宽,超出 20:9', expectClamp: true },
|
|
65
|
-
{ name: '3-4', width: 768, height: 1024, note: 'iPad 竖屏' },
|
|
66
|
-
{ name: '9-16', width: 576, height: 1024, note: '常见竖屏基准' },
|
|
67
|
-
{ name: '9-19.5', width: 473, height: 1024, note: 'iPhone 竖屏' },
|
|
68
|
-
{ name: '9-21', width: 439, height: 1024, note: '超长,超出 20:9', expectClamp: true },
|
|
69
|
-
{ name: 'small-landscape', width: 800, height: 360, note: '小横屏,检查实际 CSS 尺度' },
|
|
70
|
-
{ name: 'small-portrait', width: 360, height: 800, note: '小竖屏,检查实际 CSS 尺度' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
|
-
/** 首选显示尺寸与通用档位。配置只决定采集视口,不改变运行时适配断言。 */
|
|
74
|
-
export function computeCases(config) {
|
|
75
|
-
if (config === undefined) return VIEWPORTS;
|
|
76
|
-
const { width, height } = config?.designResolution ?? {};
|
|
77
|
-
if (![width, height].every((value) => Number.isInteger(value) && value > 0)) {
|
|
78
|
-
throw new Error('designResolution.width/height 必须是正整数');
|
|
79
|
-
}
|
|
80
|
-
const orientation = width >= height ? 'landscape' : 'portrait';
|
|
81
|
-
if (config.orientation !== orientation) {
|
|
82
|
-
throw new Error('orientation 必须与首选展示宽高一致');
|
|
83
|
-
}
|
|
84
|
-
const ratio = Math.max(width, height) / Math.min(width, height);
|
|
85
|
-
return [
|
|
86
|
-
{
|
|
87
|
-
name: 'preferred', width, height, note: '首选显示偏好',
|
|
88
|
-
expectClamp: ratio < 4 / 3 || ratio > 20 / 9,
|
|
89
|
-
},
|
|
90
|
-
...VIEWPORTS,
|
|
91
|
-
];
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function parseArgs(argv) {
|
|
95
|
-
const out = { settleMs: 1200, clickCenter: false };
|
|
96
|
-
for (let i = 2; i < argv.length; i += 1) {
|
|
97
|
-
const key = argv[i];
|
|
98
|
-
const next = () => argv[(i += 1)];
|
|
99
|
-
if (key === '--game') out.game = next();
|
|
100
|
-
else if (key === '--out') out.out = next();
|
|
101
|
-
else if (key === '--config') {
|
|
102
|
-
out.config = next();
|
|
103
|
-
if (!out.config) throw new Error('--config 需要 game.config.json 路径');
|
|
104
|
-
} else if (key === '--steps') {
|
|
105
|
-
out.steps = next();
|
|
106
|
-
if (!out.steps) throw new Error('--steps 需要 JSON 步骤文件');
|
|
107
|
-
} else if (key === '--browser-channel') {
|
|
108
|
-
out.browserChannel = next();
|
|
109
|
-
if (!['chrome', 'msedge'].includes(out.browserChannel)) throw new Error('--browser-channel 仅支持 chrome / msedge');
|
|
110
|
-
} else if (key === '--package-root') out.packageRoot = next();
|
|
111
|
-
else if (key === '--settle-ms') out.settleMs = Number(next()) || 1200;
|
|
112
|
-
else if (key === '--click-center') out.clickCenter = true;
|
|
113
|
-
}
|
|
114
|
-
return out;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function startServer(root) {
|
|
118
|
-
return new Promise((resolve, reject) => {
|
|
119
|
-
const server = http.createServer((req, res) => {
|
|
120
|
-
const raw = decodeURIComponent((req.url || '/').split('?')[0]);
|
|
121
|
-
const rel = raw === '/' ? 'index.html' : raw.replace(/^\/+/, '');
|
|
122
|
-
// 阻断路径穿越:normalize 后必须仍在 root 内
|
|
123
|
-
const abs = path.resolve(root, rel);
|
|
124
|
-
if (!abs.startsWith(path.resolve(root))) {
|
|
125
|
-
res.writeHead(403).end('forbidden');
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
fs.readFile(abs, (err, buf) => {
|
|
129
|
-
if (err) {
|
|
130
|
-
res.writeHead(404).end('not found');
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
res.writeHead(200, {
|
|
134
|
-
'content-type': MIME[path.extname(abs).toLowerCase()] || 'application/octet-stream',
|
|
135
|
-
});
|
|
136
|
-
res.end(buf);
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
server.on('error', reject);
|
|
140
|
-
server.listen(0, '127.0.0.1', () => resolve({ server, port: server.address().port }));
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
async function loadPlaywright(packageRoot) {
|
|
145
|
-
const candidates = [];
|
|
146
|
-
if (packageRoot) candidates.push(path.join(packageRoot, 'playwright', 'index.js'));
|
|
147
|
-
candidates.push('playwright');
|
|
148
|
-
for (const candidate of candidates) {
|
|
149
|
-
try {
|
|
150
|
-
const spec = candidate.endsWith('.js') ? pathToFileURL(candidate).href : candidate;
|
|
151
|
-
const mod = await import(spec);
|
|
152
|
-
if (mod?.chromium) return mod;
|
|
153
|
-
if (mod?.default?.chromium) return mod.default;
|
|
154
|
-
} catch {
|
|
155
|
-
/* 试下一个候选 */
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return null;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* 页面内度量。全部基于 getBoundingClientRect,拿到的是**变换后的实际显示矩形**,
|
|
163
|
-
* 不需要知道内部用了 transform 还是改尺寸。
|
|
164
|
-
*/
|
|
165
|
-
export const MEASURE = (shortEdge) => {
|
|
166
|
-
const round = (n) => Math.round(n * 100) / 100;
|
|
167
|
-
const vw = window.innerWidth;
|
|
168
|
-
const vh = window.innerHeight;
|
|
169
|
-
const canvas = document.querySelector('#game canvas') || document.querySelector('canvas');
|
|
170
|
-
const stage = document.getElementById('ui-stage');
|
|
171
|
-
const rectOf = (el) => {
|
|
172
|
-
if (!el) return null;
|
|
173
|
-
const r = el.getBoundingClientRect();
|
|
174
|
-
return { x: round(r.x), y: round(r.y), width: round(r.width), height: round(r.height) };
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
const canvasRect = rectOf(canvas);
|
|
178
|
-
const stageRect = rectOf(stage);
|
|
179
|
-
|
|
180
|
-
// canvas 留边:容器铺满时四边都为 0
|
|
181
|
-
const canvasLetterbox = canvasRect
|
|
182
|
-
? {
|
|
183
|
-
x: round(Math.abs(canvasRect.x)),
|
|
184
|
-
y: round(Math.abs(canvasRect.y)),
|
|
185
|
-
right: round(Math.abs(vw - (canvasRect.x + canvasRect.width))),
|
|
186
|
-
bottom: round(Math.abs(vh - (canvasRect.y + canvasRect.height))),
|
|
187
|
-
}
|
|
188
|
-
: null;
|
|
189
|
-
|
|
190
|
-
// stage 内缩 + 从内联样式反推的缩放系数与逻辑尺寸
|
|
191
|
-
let stageInset = null;
|
|
192
|
-
let stageScale = null;
|
|
193
|
-
let stageLogical = null;
|
|
194
|
-
if (stageRect && stage) {
|
|
195
|
-
stageInset = { x: round(vw - stageRect.width), y: round(vh - stageRect.height) };
|
|
196
|
-
const transform = stage.style.transform || '';
|
|
197
|
-
const matched = /scale\(([-\d.]+)\)/.exec(transform);
|
|
198
|
-
if (matched) stageScale = Number(matched[1]);
|
|
199
|
-
const w = parseFloat(stage.style.width || '0');
|
|
200
|
-
const h = parseFloat(stage.style.height || '0');
|
|
201
|
-
if (w > 0 && h > 0) stageLogical = { width: round(w), height: round(h) };
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
// UI 溢出:stage 内元素超出 stage 可见矩形(判定基准取实际显示矩形,含 scale)
|
|
205
|
-
let uiOverflow = 0;
|
|
206
|
-
const overflowSamples = [];
|
|
207
|
-
if (stageRect && stage) {
|
|
208
|
-
const tolerance = 1.5;
|
|
209
|
-
const nodes = stage.querySelectorAll('*');
|
|
210
|
-
for (let i = 0; i < nodes.length; i += 1) {
|
|
211
|
-
const el = nodes[i];
|
|
212
|
-
const box = el.getBoundingClientRect();
|
|
213
|
-
let r = { left: box.left, top: box.top, right: box.right, bottom: box.bottom };
|
|
214
|
-
// 隐藏层不参与;滚动/裁剪容器外的内容不是可见 UI 越界。
|
|
215
|
-
let visible = true;
|
|
216
|
-
for (let parent = el; parent; parent = parent.parentElement) {
|
|
217
|
-
const css = getComputedStyle(parent);
|
|
218
|
-
if (css.display === 'none' || css.visibility !== 'visible' || Number(css.opacity) === 0) {
|
|
219
|
-
visible = false;
|
|
220
|
-
break;
|
|
221
|
-
}
|
|
222
|
-
if (parent !== el && parent !== stage && stage.contains(parent)) {
|
|
223
|
-
const clip = parent.getBoundingClientRect();
|
|
224
|
-
if (['auto', 'scroll', 'hidden', 'clip'].includes(css.overflowX)) {
|
|
225
|
-
r.left = Math.max(r.left, clip.left);
|
|
226
|
-
r.right = Math.min(r.right, clip.right);
|
|
227
|
-
}
|
|
228
|
-
if (['auto', 'scroll', 'hidden', 'clip'].includes(css.overflowY)) {
|
|
229
|
-
r.top = Math.max(r.top, clip.top);
|
|
230
|
-
r.bottom = Math.min(r.bottom, clip.bottom);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
if (!visible) continue;
|
|
235
|
-
r.width = r.right - r.left;
|
|
236
|
-
r.height = r.bottom - r.top;
|
|
237
|
-
if (r.width <= 0 || r.height <= 0) continue;
|
|
238
|
-
const over =
|
|
239
|
-
r.left < stageRect.x - tolerance ||
|
|
240
|
-
r.top < stageRect.y - tolerance ||
|
|
241
|
-
r.right > stageRect.x + stageRect.width + tolerance ||
|
|
242
|
-
r.bottom > stageRect.y + stageRect.height + tolerance;
|
|
243
|
-
if (over) {
|
|
244
|
-
uiOverflow += 1;
|
|
245
|
-
if (overflowSamples.length < 5) {
|
|
246
|
-
const cls = typeof el.className === 'string' ? el.className : '';
|
|
247
|
-
overflowSamples.push(`${el.tagName.toLowerCase()}${cls ? '.' + cls.split(/\s+/)[0] : ''}`);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
return {
|
|
254
|
-
viewport: { width: vw, height: vh },
|
|
255
|
-
canvas: canvasRect,
|
|
256
|
-
canvasLetterbox,
|
|
257
|
-
stage: stageRect,
|
|
258
|
-
stageInset,
|
|
259
|
-
stageScale,
|
|
260
|
-
stageLogical,
|
|
261
|
-
orientation: stage?.dataset?.orientation ?? null,
|
|
262
|
-
uiOverflow,
|
|
263
|
-
overflowSamples,
|
|
264
|
-
// 断言保留精度;四舍五入到两位会把合法的 1/3、2/3 缩放误判为失败。
|
|
265
|
-
expectedScale: Math.min(vw, vh) / shortEdge,
|
|
266
|
-
expectedOrientation: vw >= vh ? 'landscape' : 'portrait',
|
|
267
|
-
uiRootPresent: !!document.getElementById('ui-root'),
|
|
268
|
-
};
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
/** 步骤只通过正常点击/按键/可见条件进入玩法,不读取游戏私有状态。 */
|
|
272
|
-
export function validateSteps(value = {}) {
|
|
273
|
-
if (!value || typeof value !== 'object' || Array.isArray(value)) throw new Error('步骤须为 JSON 对象');
|
|
274
|
-
if (Object.keys(value).some(key => !['enter', 'panels'].includes(key))) throw new Error('步骤文件仅允许 enter / panels');
|
|
275
|
-
const check = (steps) => {
|
|
276
|
-
if (!Array.isArray(steps)) throw new Error('步骤须为数组');
|
|
277
|
-
for (const step of steps) {
|
|
278
|
-
const keys = step && typeof step === 'object' ? Object.keys(step) : [];
|
|
279
|
-
if (keys.length !== 1 || !['click', 'press', 'waitFor'].includes(keys[0]) ||
|
|
280
|
-
typeof step[keys[0]] !== 'string' || !step[keys[0]].trim()) {
|
|
281
|
-
throw new Error('每步仅允许一个非空 click / press / waitFor 字符串');
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
return steps;
|
|
285
|
-
};
|
|
286
|
-
const enter = check(value.enter ?? []);
|
|
287
|
-
if (!Array.isArray(value.panels ?? [])) throw new Error('panels 须为数组');
|
|
288
|
-
const names = new Set();
|
|
289
|
-
const panels = (value.panels ?? []).map((panel) => {
|
|
290
|
-
if (!panel || Object.keys(panel).some(key => !['name', 'open', 'close'].includes(key)) ||
|
|
291
|
-
typeof panel.name !== 'string' || !/^[a-zA-Z0-9_-]+$/.test(panel.name) ||
|
|
292
|
-
panel.name === 'gameplay' || names.has(panel.name)) {
|
|
293
|
-
throw new Error('面板 name 须为唯一的字母、数字、下划线或短横线');
|
|
294
|
-
}
|
|
295
|
-
names.add(panel.name);
|
|
296
|
-
const open = check(panel.open), close = check(panel.close);
|
|
297
|
-
if (!open.length || !close.length) throw new Error('面板须同时提供非空 open / close 步骤');
|
|
298
|
-
return { name: panel.name, open, close };
|
|
299
|
-
});
|
|
300
|
-
return { enter, panels };
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
async function runSteps(page, steps) {
|
|
304
|
-
for (const step of steps) {
|
|
305
|
-
if (step.click) await page.locator(step.click).click({ timeout: 10000 });
|
|
306
|
-
else if (step.press) await page.keyboard.press(step.press);
|
|
307
|
-
else await page.locator(step.waitFor).waitFor({ state: 'visible', timeout: 10000 });
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
export function geometryOk(vp, measured) {
|
|
312
|
-
const canvas = measured?.canvas;
|
|
313
|
-
// 经营管理界面可以是纯 DOM;仍须存在有效 stage 并遵守相同缩放模型。
|
|
314
|
-
const surface = canvas ?? measured?.stage;
|
|
315
|
-
if (!surface || surface.width <= 0 || surface.height <= 0) return false;
|
|
316
|
-
const orientationOk = measured.orientation === measured.expectedOrientation;
|
|
317
|
-
const overflowOk = measured.uiOverflow === 0;
|
|
318
|
-
if (vp.expectClamp) return orientationOk && overflowOk && !!measured.stageLogical;
|
|
319
|
-
const lb = measured.canvasLetterbox;
|
|
320
|
-
const filled = canvas ? !!lb && lb.x + lb.y + lb.right + lb.bottom < 2
|
|
321
|
-
: Math.abs(measured.stageInset?.x ?? Infinity) + Math.abs(measured.stageInset?.y ?? Infinity) < 2;
|
|
322
|
-
return filled && measured.stageScale != null &&
|
|
323
|
-
Math.abs(measured.stageScale - measured.expectedScale) < 0.002 && orientationOk && overflowOk;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
/** 冷启动覆盖 + 同一个页面切换并返回基线;面板关闭失败后不继续污染后续状态。 */
|
|
327
|
-
export async function collectAudit(browser, { url, cases, outDir, settleMs = 1200,
|
|
328
|
-
steps = {}, clickCenter = false }) {
|
|
329
|
-
const workflow = validateSteps(steps);
|
|
330
|
-
const results = [];
|
|
331
|
-
const baseline = cases.find(v => v.name === 'preferred') ?? cases.find(v => v.name === '16-9') ?? cases[0];
|
|
332
|
-
if (!baseline) throw new Error('至少需要一个视口');
|
|
333
|
-
async function session(phase, initial, sequence) {
|
|
334
|
-
const context = await browser.newContext({ viewport: { width: initial.width, height: initial.height } });
|
|
335
|
-
const page = await context.newPage();
|
|
336
|
-
const errors = [];
|
|
337
|
-
page.on('pageerror', e => errors.push(String(e.message).slice(0, 200)));
|
|
338
|
-
let current = initial;
|
|
339
|
-
let state = 'enter';
|
|
340
|
-
async function capture(vp, name = 'gameplay') {
|
|
341
|
-
const measured = await page.evaluate(MEASURE, SHORT_EDGE);
|
|
342
|
-
const shot = path.join(outDir, `aspect-${phase}-${vp.name}-${name}.png`);
|
|
343
|
-
await page.screenshot({ path: shot });
|
|
344
|
-
results.push({ ...vp, phase, state: name, ok: geometryOk(vp, measured) && errors.length === 0,
|
|
345
|
-
errors: [...errors], ...measured, shot });
|
|
346
|
-
}
|
|
347
|
-
try {
|
|
348
|
-
await page.goto(url, { waitUntil: 'load', timeout: 30000 });
|
|
349
|
-
await page.waitForTimeout(settleMs);
|
|
350
|
-
await runSteps(page, workflow.enter);
|
|
351
|
-
if (clickCenter) await page.mouse.click(Math.floor(initial.width / 2), Math.floor(initial.height / 2));
|
|
352
|
-
await page.waitForTimeout(settleMs);
|
|
353
|
-
for (const vp of sequence) {
|
|
354
|
-
current = vp;
|
|
355
|
-
state = 'resize';
|
|
356
|
-
if (phase === 'live') await page.setViewportSize({ width: vp.width, height: vp.height });
|
|
357
|
-
await page.waitForTimeout(settleMs);
|
|
358
|
-
// setViewportSize 返回不代表 resize / ResizeObserver 已提交,至少跨过两帧再量度。
|
|
359
|
-
await page.evaluate(() => new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(() => resolve()))));
|
|
360
|
-
state = 'gameplay';
|
|
361
|
-
await capture(vp);
|
|
362
|
-
for (const panel of workflow.panels) {
|
|
363
|
-
state = panel.name;
|
|
364
|
-
await runSteps(page, panel.open);
|
|
365
|
-
await page.waitForTimeout(settleMs);
|
|
366
|
-
await capture(vp, panel.name);
|
|
367
|
-
await runSteps(page, panel.close);
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
} catch (err) {
|
|
371
|
-
results.push({ ...current, phase, state, ok: false, errors: [...errors, String(err.message).slice(0, 200)] });
|
|
372
|
-
} finally {
|
|
373
|
-
await context.close();
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
for (const vp of cases) await session('cold', vp, [vp]);
|
|
377
|
-
await session('live', baseline, [baseline, ...cases.filter(v => v !== baseline),
|
|
378
|
-
{ ...baseline, name: `${baseline.name}-return` }]);
|
|
379
|
-
return { results, entryConfigured: workflow.enter.length > 0, panels: workflow.panels.map(p => p.name) };
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
async function main() {
|
|
383
|
-
const args = parseArgs(process.argv);
|
|
384
|
-
if (!args.game || !args.out) {
|
|
385
|
-
console.error('[aspect-audit] 需要 --game <dist目录> 与 --out <输出目录>');
|
|
386
|
-
return 2;
|
|
387
|
-
}
|
|
388
|
-
const dist = path.resolve(args.game);
|
|
389
|
-
if (!fs.existsSync(path.join(dist, 'index.html'))) {
|
|
390
|
-
console.error(`[aspect-audit] 产物入口缺失:${path.join(dist, 'index.html')}`);
|
|
391
|
-
return 2;
|
|
392
|
-
}
|
|
393
|
-
const cases = computeCases(
|
|
394
|
-
args.config ? JSON.parse(fs.readFileSync(path.resolve(args.config), 'utf8')) : undefined,
|
|
395
|
-
);
|
|
396
|
-
|
|
397
|
-
const playwright = await loadPlaywright(args.packageRoot);
|
|
398
|
-
if (!playwright) {
|
|
399
|
-
console.error('[aspect-audit] playwright 不可用;用 --package-root 指向安装了它的目录');
|
|
400
|
-
return 2;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
const outDir = path.resolve(args.out);
|
|
404
|
-
fs.mkdirSync(outDir, { recursive: true });
|
|
405
|
-
|
|
406
|
-
// 参数有误时在启动浏览器和服务前失败。
|
|
407
|
-
const steps = validateSteps(args.steps ? JSON.parse(fs.readFileSync(path.resolve(args.steps), 'utf8')) : {});
|
|
408
|
-
const { server, port } = await startServer(dist);
|
|
409
|
-
const url = `http://127.0.0.1:${port}/index.html`;
|
|
410
|
-
let browser;
|
|
411
|
-
let audit;
|
|
412
|
-
try {
|
|
413
|
-
browser = await playwright.chromium.launch({ channel: args.browserChannel });
|
|
414
|
-
audit = await collectAudit(browser, { url, cases, outDir, settleMs: args.settleMs,
|
|
415
|
-
steps, clickCenter: args.clickCenter });
|
|
416
|
-
} finally {
|
|
417
|
-
await browser?.close();
|
|
418
|
-
await new Promise(resolve => server.close(resolve));
|
|
419
|
-
}
|
|
420
|
-
const failed = audit.results.filter(r => !r.ok).length;
|
|
421
|
-
const report = { model: 'short-edge-lock', shortEdge: SHORT_EDGE, url,
|
|
422
|
-
entryConfigured: audit.entryConfigured, panels: audit.panels,
|
|
423
|
-
visualReviewRequired: true, geometryPassed: failed === 0, cases: audit.results };
|
|
424
|
-
const reportPath = path.join(outDir, 'aspect-report.json');
|
|
425
|
-
fs.writeFileSync(reportPath, JSON.stringify(report, null, 2), 'utf-8');
|
|
426
|
-
for (const r of audit.results) {
|
|
427
|
-
console.log(`[${r.ok ? 'GEOMETRY' : 'FAIL'}] ${r.phase}/${r.name}/${r.state} ` +
|
|
428
|
-
`${r.width}x${r.height} | UI overflow ${r.uiOverflow ?? 'n/a'}` +
|
|
429
|
-
(r.errors.length ? ` | ${r.errors.join('; ')}` : ''));
|
|
430
|
-
if (r.shot) console.log(`[SHOT] ${r.shot}`);
|
|
431
|
-
}
|
|
432
|
-
console.log(`[REPORT] ${reportPath}`);
|
|
433
|
-
console.log('[aspect-audit] 冷启动与运行时切换采集完成;几何通过不代表取景、阅读、命中或真机通过。');
|
|
434
|
-
if (!audit.entryConfigured) console.log('[aspect-audit] 未配置 --steps enter,可能只采集到标题;须进入实际玩法补验。');
|
|
435
|
-
|
|
436
|
-
return failed > 0 ? 1 : 0;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
// 被当作模块 import 时不执行主流程(argv[1] 可能不存在,先做守卫再比较)
|
|
440
|
-
const invokedPath = process.argv[1] ? pathToFileURL(process.argv[1]).href : '';
|
|
441
|
-
if (import.meta.url === invokedPath) {
|
|
442
|
-
main()
|
|
443
|
-
.then((code) => process.exit(code))
|
|
444
|
-
.catch((err) => {
|
|
445
|
-
console.error(`[aspect-audit] 未预期异常:${err?.stack || err}`);
|
|
446
|
-
process.exit(2);
|
|
447
|
-
});
|
|
448
|
-
}
|