@craft_eco/craft-mcp 0.1.29 → 0.1.31
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 +17 -60
- package/bin/craft-mcp.mjs +7 -1
- package/dist-server/game-workflow/check.mjs +3 -2
- package/dist-server/game-workflow/context-state.mjs +68 -67
- package/dist-server/game-workflow/draft-archive.mjs +147 -2
- package/dist-server/game-workflow/draft-upload-identity.mjs +11 -0
- package/dist-server/game-workflow/draft-uploads.mjs +105 -60
- package/dist-server/game-workflow/native-context.mjs +289 -289
- package/dist-server/game-workflow/project-bundles.mjs +246 -246
- package/dist-server/game-workflow/project-context.mjs +56 -18
- package/dist-server/game-workflow/project-install.mjs +81 -0
- package/dist-server/game-workflow/projects.mjs +37 -7
- package/dist-server/game-workflow/tasks.mjs +1 -1
- package/dist-server/game-workflow/work-scope.mjs +7 -7
- package/dist-server/integrations/config.mjs +162 -145
- package/dist-server/integrations/connect.mjs +48 -0
- package/dist-server/integrations/connection-handoff.mjs +36 -42
- package/dist-server/integrations/dsh-config.mjs +182 -182
- package/dist-server/integrations/fixed-launcher.mjs +31 -0
- package/dist-server/integrations/host-config-scope.mjs +16 -0
- package/dist-server/integrations/host-reload.mjs +25 -0
- package/dist-server/integrations/hosts.mjs +93 -55
- package/dist-server/integrations/install.mjs +337 -205
- package/dist-server/integrations/installation-state.mjs +85 -84
- package/dist-server/integrations/installation-transaction.mjs +27 -0
- package/dist-server/integrations/jsonc-config.mjs +56 -0
- package/dist-server/integrations/launcher-start.mjs +52 -0
- package/dist-server/integrations/npm-diagnostics.mjs +32 -0
- package/dist-server/integrations/opencode-config.mjs +94 -0
- package/dist-server/integrations/project-setup.mjs +206 -0
- package/dist-server/integrations/registration-identity.mjs +15 -0
- package/dist-server/integrations/runtime-candidate.mjs +103 -0
- package/dist-server/integrations/runtime-gc.mjs +191 -188
- package/dist-server/integrations/runtime-identity.mjs +22 -0
- package/dist-server/integrations/runtime.mjs +111 -126
- package/dist-server/integrations/updates.mjs +331 -225
- package/dist-server/integrations/version-policy.mjs +32 -32
- package/dist-server/launcher.mjs +1852 -0
- package/dist-server/mcp/control-panel.mjs +8 -23
- package/dist-server/mcp/server.mjs +47 -82
- package/dist-server/mcp/update-session.mjs +185 -92
- package/dist-server/upstream/craft-aigc.mjs +43 -16
- package/dist-server/upstream/draft-source.mjs +29 -0
- package/package.json +5 -3
- package/resources/context-filter-report.json +120 -0
- package/resources/craft-create/SKILL.md +19 -19
- package/resources/craft-update/SKILL.md +9 -11
- package/resources/targets/claude/js/bootstrap/SKILL.md +3 -1
- package/resources/targets/claude/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/claude/js/js/bundle.json +7 -7
- package/resources/targets/claude/js/recovery.md +5 -1
- package/resources/targets/claude/js/target.json +1 -1
- package/resources/targets/claude/js3d/bootstrap/SKILL.md +3 -1
- package/resources/targets/claude/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/claude/js3d/js3d/bundle.json +8 -8
- package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/claude/js3d/recovery.md +5 -1
- package/resources/targets/claude/js3d/target.json +1 -1
- package/resources/targets/codebuddy/js/bootstrap/SKILL.md +3 -1
- package/resources/targets/codebuddy/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/codebuddy/js/js/bundle.json +7 -7
- package/resources/targets/codebuddy/js/recovery.md +5 -1
- package/resources/targets/codebuddy/js/target.json +1 -1
- package/resources/targets/codebuddy/js3d/bootstrap/SKILL.md +3 -1
- package/resources/targets/codebuddy/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/codebuddy/js3d/js3d/bundle.json +8 -8
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/codebuddy/js3d/recovery.md +5 -1
- package/resources/targets/codebuddy/js3d/target.json +1 -1
- package/resources/targets/codex/js/bootstrap/SKILL.md +2 -4
- package/resources/targets/codex/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/codex/js/js/bundle.json +7 -7
- package/resources/targets/codex/js/recovery.md +3 -3
- package/resources/targets/codex/js/target.json +1 -1
- package/resources/targets/codex/js3d/bootstrap/SKILL.md +2 -4
- package/resources/targets/codex/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/codex/js3d/js3d/bundle.json +8 -8
- package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/codex/js3d/recovery.md +3 -3
- package/resources/targets/codex/js3d/target.json +1 -1
- package/resources/targets/comate/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/comate/js/context-filter-report.json +27 -0
- package/resources/targets/comate/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/comate/js/craft-game-maker/js.md +10 -0
- package/resources/targets/comate/js/js/bundle.json +97 -0
- package/resources/targets/comate/js/js/context/AGENTS.md +29 -0
- package/resources/targets/comate/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/comate/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/comate/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/comate/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/comate/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/comate/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/comate/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/comate/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/comate/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/comate/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/comate/js/js/context/skills/index.json +19 -0
- package/resources/targets/comate/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/comate/js/js/project/README.md +7 -0
- package/resources/targets/comate/js/js/project/configs/assets.json +1 -0
- package/resources/targets/comate/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/comate/js/js/project/configs/game.json +3 -0
- package/resources/targets/comate/js/js/project/game-runtime.json +7 -0
- package/resources/targets/comate/js/js/project/game.config.json +7 -0
- package/resources/targets/comate/js/js/project/index.html +20 -0
- package/resources/targets/comate/js/js/project/package.json +22 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/comate/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/comate/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/comate/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/comate/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/comate/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/comate/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/comate/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/comate/js/js/project/src/main.ts +87 -0
- package/resources/targets/comate/js/js/project/src/platform.ts +2 -0
- package/resources/targets/comate/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/comate/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/comate/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/comate/js/js/project/src/style.css +294 -0
- package/resources/targets/comate/js/js/project/tsconfig.json +20 -0
- package/resources/targets/comate/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/comate/js/js/project/vite.config.ts +5 -0
- package/resources/targets/comate/js/recovery.md +17 -0
- package/resources/targets/comate/js/target.json +61 -0
- package/resources/targets/comate/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/comate/js3d/context-filter-report.json +27 -0
- package/resources/targets/comate/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/comate/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/comate/js3d/js3d/bundle.json +108 -0
- package/resources/targets/comate/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/comate/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/comate/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/comate/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/comate/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/comate/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/comate/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/comate/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/comate/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/comate/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/comate/js3d/js3d/project/README.md +7 -0
- package/resources/targets/comate/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/comate/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/comate/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/comate/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/comate/js3d/js3d/project/index.html +12 -0
- package/resources/targets/comate/js3d/js3d/project/package.json +23 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/comate/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/comate/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/comate/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/comate/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/comate/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/comate/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/comate/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/comate/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/comate/js3d/recovery.md +17 -0
- package/resources/targets/comate/js3d/target.json +60 -0
- package/resources/targets/cursor/js/bootstrap/SKILL.md +3 -1
- package/resources/targets/cursor/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/cursor/js/js/bundle.json +7 -7
- package/resources/targets/cursor/js/recovery.md +5 -1
- package/resources/targets/cursor/js/target.json +1 -1
- package/resources/targets/cursor/js3d/bootstrap/SKILL.md +3 -1
- package/resources/targets/cursor/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/cursor/js3d/js3d/bundle.json +8 -8
- package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/cursor/js3d/recovery.md +5 -1
- package/resources/targets/cursor/js3d/target.json +1 -1
- package/resources/targets/dsh/js/bootstrap/SKILL.md +3 -1
- package/resources/targets/dsh/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/dsh/js/js/bundle.json +7 -7
- package/resources/targets/dsh/js/recovery.md +5 -1
- package/resources/targets/dsh/js/target.json +1 -1
- package/resources/targets/dsh/js3d/bootstrap/SKILL.md +3 -1
- package/resources/targets/dsh/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/dsh/js3d/js3d/bundle.json +8 -8
- package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/dsh/js3d/recovery.md +5 -1
- package/resources/targets/dsh/js3d/target.json +1 -1
- package/resources/targets/index.json +104 -32
- package/resources/targets/kimi/js/bootstrap/SKILL.md +3 -1
- package/resources/targets/kimi/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/kimi/js/js/bundle.json +7 -7
- package/resources/targets/kimi/js/recovery.md +5 -1
- package/resources/targets/kimi/js/target.json +1 -1
- package/resources/targets/kimi/js3d/bootstrap/SKILL.md +3 -1
- package/resources/targets/kimi/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/kimi/js3d/js3d/bundle.json +8 -8
- package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/kimi/js3d/recovery.md +5 -1
- package/resources/targets/kimi/js3d/target.json +1 -1
- package/resources/targets/opencode/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/opencode/js/context-filter-report.json +27 -0
- package/resources/targets/opencode/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/opencode/js/craft-game-maker/js.md +10 -0
- package/resources/targets/opencode/js/js/bundle.json +97 -0
- package/resources/targets/opencode/js/js/context/AGENTS.md +29 -0
- package/resources/targets/opencode/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/opencode/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/opencode/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/opencode/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/opencode/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/opencode/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/opencode/js/js/context/skills/index.json +19 -0
- package/resources/targets/opencode/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/opencode/js/js/project/README.md +7 -0
- package/resources/targets/opencode/js/js/project/configs/assets.json +1 -0
- package/resources/targets/opencode/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/opencode/js/js/project/configs/game.json +3 -0
- package/resources/targets/opencode/js/js/project/game-runtime.json +7 -0
- package/resources/targets/opencode/js/js/project/game.config.json +7 -0
- package/resources/targets/opencode/js/js/project/index.html +20 -0
- package/resources/targets/opencode/js/js/project/package.json +22 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/opencode/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/opencode/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/opencode/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/opencode/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/opencode/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/opencode/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/opencode/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/opencode/js/js/project/src/main.ts +87 -0
- package/resources/targets/opencode/js/js/project/src/platform.ts +2 -0
- package/resources/targets/opencode/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/opencode/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/opencode/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/opencode/js/js/project/src/style.css +294 -0
- package/resources/targets/opencode/js/js/project/tsconfig.json +20 -0
- package/resources/targets/opencode/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/opencode/js/js/project/vite.config.ts +5 -0
- package/resources/targets/opencode/js/recovery.md +17 -0
- package/resources/targets/opencode/js/target.json +61 -0
- package/resources/targets/opencode/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/opencode/js3d/context-filter-report.json +27 -0
- package/resources/targets/opencode/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/opencode/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/opencode/js3d/js3d/bundle.json +108 -0
- package/resources/targets/opencode/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/opencode/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/opencode/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/opencode/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/opencode/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/opencode/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/opencode/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/opencode/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/opencode/js3d/js3d/project/README.md +7 -0
- package/resources/targets/opencode/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/opencode/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/opencode/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/opencode/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/opencode/js3d/js3d/project/index.html +12 -0
- package/resources/targets/opencode/js3d/js3d/project/package.json +23 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/opencode/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/opencode/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/opencode/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/opencode/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/opencode/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/opencode/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/opencode/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/opencode/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/opencode/js3d/recovery.md +17 -0
- package/resources/targets/opencode/js3d/target.json +60 -0
- package/resources/targets/qoder/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/qoder/js/context-filter-report.json +27 -0
- package/resources/targets/qoder/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/qoder/js/craft-game-maker/js.md +10 -0
- package/resources/targets/qoder/js/js/bundle.json +97 -0
- package/resources/targets/qoder/js/js/context/AGENTS.md +31 -0
- package/resources/targets/qoder/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/qoder/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/qoder/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/qoder/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/qoder/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/qoder/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder/js/js/context/skills/index.json +19 -0
- package/resources/targets/qoder/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/qoder/js/js/project/README.md +7 -0
- package/resources/targets/qoder/js/js/project/configs/assets.json +1 -0
- package/resources/targets/qoder/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/qoder/js/js/project/configs/game.json +3 -0
- package/resources/targets/qoder/js/js/project/game-runtime.json +7 -0
- package/resources/targets/qoder/js/js/project/game.config.json +7 -0
- package/resources/targets/qoder/js/js/project/index.html +20 -0
- package/resources/targets/qoder/js/js/project/package.json +22 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/qoder/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/qoder/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/qoder/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/qoder/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/qoder/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/qoder/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/qoder/js/js/project/src/main.ts +87 -0
- package/resources/targets/qoder/js/js/project/src/platform.ts +2 -0
- package/resources/targets/qoder/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/qoder/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/qoder/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/qoder/js/js/project/src/style.css +294 -0
- package/resources/targets/qoder/js/js/project/tsconfig.json +20 -0
- package/resources/targets/qoder/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/qoder/js/js/project/vite.config.ts +5 -0
- package/resources/targets/qoder/js/recovery.md +17 -0
- package/resources/targets/qoder/js/target.json +61 -0
- package/resources/targets/qoder/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/qoder/js3d/context-filter-report.json +27 -0
- package/resources/targets/qoder/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/qoder/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/qoder/js3d/js3d/bundle.json +108 -0
- package/resources/targets/qoder/js3d/js3d/context/AGENTS.md +32 -0
- package/resources/targets/qoder/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/qoder/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/qoder/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/qoder/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/qoder/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/qoder/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/qoder/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/qoder/js3d/js3d/project/README.md +7 -0
- package/resources/targets/qoder/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/qoder/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/qoder/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/qoder/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/qoder/js3d/js3d/project/index.html +12 -0
- package/resources/targets/qoder/js3d/js3d/project/package.json +23 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/qoder/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/qoder/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/qoder/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/qoder/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/qoder/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/qoder/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/qoder/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/qoder/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/qoder/js3d/recovery.md +17 -0
- package/resources/targets/qoder/js3d/target.json +60 -0
- package/resources/targets/qoder-cn/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/qoder-cn/js/context-filter-report.json +27 -0
- package/resources/targets/qoder-cn/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/qoder-cn/js/craft-game-maker/js.md +10 -0
- package/resources/targets/qoder-cn/js/js/bundle.json +97 -0
- package/resources/targets/qoder-cn/js/js/context/AGENTS.md +31 -0
- package/resources/targets/qoder-cn/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/qoder-cn/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/qoder-cn/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/qoder-cn/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/qoder-cn/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/qoder-cn/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder-cn/js/js/context/skills/index.json +19 -0
- package/resources/targets/qoder-cn/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/qoder-cn/js/js/project/README.md +7 -0
- package/resources/targets/qoder-cn/js/js/project/configs/assets.json +1 -0
- package/resources/targets/qoder-cn/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/qoder-cn/js/js/project/configs/game.json +3 -0
- package/resources/targets/qoder-cn/js/js/project/game-runtime.json +7 -0
- package/resources/targets/qoder-cn/js/js/project/game.config.json +7 -0
- package/resources/targets/qoder-cn/js/js/project/index.html +20 -0
- package/resources/targets/qoder-cn/js/js/project/package.json +22 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/qoder-cn/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/qoder-cn/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/qoder-cn/js/js/project/src/main.ts +87 -0
- package/resources/targets/qoder-cn/js/js/project/src/platform.ts +2 -0
- package/resources/targets/qoder-cn/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/qoder-cn/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/qoder-cn/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/qoder-cn/js/js/project/src/style.css +294 -0
- package/resources/targets/qoder-cn/js/js/project/tsconfig.json +20 -0
- package/resources/targets/qoder-cn/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/qoder-cn/js/js/project/vite.config.ts +5 -0
- package/resources/targets/qoder-cn/js/recovery.md +17 -0
- package/resources/targets/qoder-cn/js/target.json +61 -0
- package/resources/targets/qoder-cn/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/qoder-cn/js3d/context-filter-report.json +27 -0
- package/resources/targets/qoder-cn/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/qoder-cn/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/qoder-cn/js3d/js3d/bundle.json +108 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/AGENTS.md +32 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/README.md +7 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/index.html +12 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/package.json +23 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/qoder-cn/js3d/recovery.md +17 -0
- package/resources/targets/qoder-cn/js3d/target.json +60 -0
- package/resources/targets/qwen/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/qwen/js/context-filter-report.json +27 -0
- package/resources/targets/qwen/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/qwen/js/craft-game-maker/js.md +10 -0
- package/resources/targets/qwen/js/js/bundle.json +97 -0
- package/resources/targets/qwen/js/js/context/AGENTS.md +29 -0
- package/resources/targets/qwen/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/qwen/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/qwen/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/qwen/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/qwen/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/qwen/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/qwen/js/js/context/skills/index.json +19 -0
- package/resources/targets/qwen/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/qwen/js/js/project/README.md +7 -0
- package/resources/targets/qwen/js/js/project/configs/assets.json +1 -0
- package/resources/targets/qwen/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/qwen/js/js/project/configs/game.json +3 -0
- package/resources/targets/qwen/js/js/project/game-runtime.json +7 -0
- package/resources/targets/qwen/js/js/project/game.config.json +7 -0
- package/resources/targets/qwen/js/js/project/index.html +20 -0
- package/resources/targets/qwen/js/js/project/package.json +22 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/qwen/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/qwen/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/qwen/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/qwen/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/qwen/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/qwen/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/qwen/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/qwen/js/js/project/src/main.ts +87 -0
- package/resources/targets/qwen/js/js/project/src/platform.ts +2 -0
- package/resources/targets/qwen/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/qwen/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/qwen/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/qwen/js/js/project/src/style.css +294 -0
- package/resources/targets/qwen/js/js/project/tsconfig.json +20 -0
- package/resources/targets/qwen/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/qwen/js/js/project/vite.config.ts +5 -0
- package/resources/targets/qwen/js/recovery.md +17 -0
- package/resources/targets/qwen/js/target.json +61 -0
- package/resources/targets/qwen/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/qwen/js3d/context-filter-report.json +27 -0
- package/resources/targets/qwen/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/qwen/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/qwen/js3d/js3d/bundle.json +108 -0
- package/resources/targets/qwen/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/qwen/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/qwen/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/qwen/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/qwen/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/qwen/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/qwen/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/qwen/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/qwen/js3d/js3d/project/README.md +7 -0
- package/resources/targets/qwen/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/qwen/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/qwen/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/qwen/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/qwen/js3d/js3d/project/index.html +12 -0
- package/resources/targets/qwen/js3d/js3d/project/package.json +23 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/qwen/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/qwen/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/qwen/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/qwen/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/qwen/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/qwen/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/qwen/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/qwen/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/qwen/js3d/recovery.md +17 -0
- package/resources/targets/qwen/js3d/target.json +60 -0
- package/resources/targets/trae/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/trae/js/context-filter-report.json +27 -0
- package/resources/targets/trae/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/trae/js/craft-game-maker/js.md +10 -0
- package/resources/targets/trae/js/js/bundle.json +97 -0
- package/resources/targets/trae/js/js/context/AGENTS.md +29 -0
- package/resources/targets/trae/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/trae/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/trae/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/trae/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/trae/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/trae/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/trae/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/trae/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/trae/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/trae/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/trae/js/js/context/skills/index.json +19 -0
- package/resources/targets/trae/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/trae/js/js/project/README.md +7 -0
- package/resources/targets/trae/js/js/project/configs/assets.json +1 -0
- package/resources/targets/trae/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/trae/js/js/project/configs/game.json +3 -0
- package/resources/targets/trae/js/js/project/game-runtime.json +7 -0
- package/resources/targets/trae/js/js/project/game.config.json +7 -0
- package/resources/targets/trae/js/js/project/index.html +20 -0
- package/resources/targets/trae/js/js/project/package.json +22 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/trae/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/trae/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/trae/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/trae/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/trae/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/trae/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/trae/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/trae/js/js/project/src/main.ts +87 -0
- package/resources/targets/trae/js/js/project/src/platform.ts +2 -0
- package/resources/targets/trae/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/trae/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/trae/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/trae/js/js/project/src/style.css +294 -0
- package/resources/targets/trae/js/js/project/tsconfig.json +20 -0
- package/resources/targets/trae/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/trae/js/js/project/vite.config.ts +5 -0
- package/resources/targets/trae/js/recovery.md +17 -0
- package/resources/targets/trae/js/target.json +61 -0
- package/resources/targets/trae/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/trae/js3d/context-filter-report.json +27 -0
- package/resources/targets/trae/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/trae/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/trae/js3d/js3d/bundle.json +108 -0
- package/resources/targets/trae/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/trae/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/trae/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/trae/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/trae/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/trae/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/trae/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/trae/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/trae/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/trae/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/trae/js3d/js3d/project/README.md +7 -0
- package/resources/targets/trae/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/trae/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/trae/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/trae/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/trae/js3d/js3d/project/index.html +12 -0
- package/resources/targets/trae/js3d/js3d/project/package.json +23 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/trae/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/trae/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/trae/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/trae/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/trae/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/trae/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/trae/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/trae/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/trae/js3d/recovery.md +17 -0
- package/resources/targets/trae/js3d/target.json +60 -0
- package/resources/targets/workbuddy/js/bootstrap/SKILL.md +22 -24
- package/resources/targets/workbuddy/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/workbuddy/js/js/bundle.json +8 -8
- package/resources/targets/workbuddy/js/js/context/AGENTS.md +29 -29
- package/resources/targets/workbuddy/js/recovery.md +19 -19
- package/resources/targets/workbuddy/js/target.json +1 -1
- package/resources/targets/workbuddy/js3d/bootstrap/SKILL.md +22 -24
- package/resources/targets/workbuddy/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/workbuddy/js3d/js3d/bundle.json +9 -9
- package/resources/targets/workbuddy/js3d/js3d/context/AGENTS.md +30 -30
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/workbuddy/js3d/recovery.md +19 -19
- package/resources/targets/workbuddy/js3d/target.json +1 -1
- package/resources/targets/zcode/js/bootstrap/SKILL.md +3 -1
- package/resources/targets/zcode/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/zcode/js/js/bundle.json +7 -7
- package/resources/targets/zcode/js/recovery.md +5 -1
- package/resources/targets/zcode/js/target.json +1 -1
- package/resources/targets/zcode/js3d/bootstrap/SKILL.md +3 -1
- package/resources/targets/zcode/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/zcode/js3d/js3d/bundle.json +8 -8
- package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/zcode/js3d/recovery.md +5 -1
- package/resources/targets/zcode/js3d/target.json +1 -1
- package/vendor/craft-runtime/SOURCE.json +3 -3
- package/vendor/craft-runtime/package.json +1 -1
- package/dist-server/game-workflow/publication-materials.mjs +0 -92
- package/dist-server/game-workflow/publications.mjs +0 -168
- package/dist-server/game-workflow/publish-capture-worker.mjs +0 -57
- package/dist-server/game-workflow/publish-capture.mjs +0 -75
- package/dist-server/mcp/publication-page.html +0 -86
- package/dist-server/mcp/publication-page.mjs +0 -375
- package/dist-server/mcp/publication-preview.mjs +0 -63
- package/dist-server/mcp/publication-tools.mjs +0 -22
- package/dist-server/mcp/publish-panel.mjs +0 -210
- package/dist-server/upstream/publication-transport.mjs +0 -101
package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/project.d.mts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ConfigEntry, ControlMetadata } from './config.mjs';
|
|
2
|
+
export interface ConfigManifest { configs: string; cdnBase?: string; projectRoot: string }
|
|
3
|
+
export function projectPath(root: string, path: string): string;
|
|
4
|
+
export function readProjectConfigs(root: string): Promise<{ manifest: ConfigManifest; configs: Array<{ name: string; path: string; metadataPath: string; data: object; metadata: Record<string, ControlMetadata> }>; snapshotPath: string; snapshot: ConfigEntry[] }>;
|
|
5
|
+
export function exportProjectConfig(root: string, options?: { check?: boolean; onWarn?: (message: string) => void }): Promise<{ entries: ConfigEntry[]; warnings: string[]; changed: boolean }>;
|
|
6
|
+
export function resolvedProjectConfigs(root: string): Promise<Awaited<ReturnType<typeof readProjectConfigs>> & { resolved: Map<string, object> }>;
|
package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/project.mjs
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { readFile, readdir, writeFile, rename, unlink } from 'node:fs/promises';
|
|
2
|
+
import { resolve, relative, isAbsolute, join, basename } from 'node:path';
|
|
3
|
+
import { randomUUID } from 'node:crypto';
|
|
4
|
+
import { createConfigEntries, resolveConfig } from './config.mjs';
|
|
5
|
+
|
|
6
|
+
export function projectPath(root, path) {
|
|
7
|
+
const target = resolve(root, path);
|
|
8
|
+
const rel = relative(resolve(root), target);
|
|
9
|
+
if (rel === '..' || rel.startsWith('../') || rel.startsWith('..\\') || isAbsolute(rel)) throw new Error(`Path escapes project: ${path}`);
|
|
10
|
+
return target;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async function readJson(path, fallback) {
|
|
14
|
+
try { return JSON.parse(await readFile(path, 'utf8')); }
|
|
15
|
+
catch (error) {
|
|
16
|
+
if (error.code === 'ENOENT' && fallback !== undefined) return fallback;
|
|
17
|
+
throw new Error(`${path}: ${error.message}`, { cause: error });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export async function readProjectConfigs(projectRoot) {
|
|
22
|
+
const root = resolve(projectRoot);
|
|
23
|
+
const manifest = { configs: 'configs', ...await readJson(join(root, 'game-runtime.json'), {}), projectRoot: root };
|
|
24
|
+
const configRoot = projectPath(root, manifest.configs);
|
|
25
|
+
let files;
|
|
26
|
+
try { files = await readdir(configRoot, { withFileTypes: true }); }
|
|
27
|
+
catch (error) {
|
|
28
|
+
if (error.code === 'ENOENT') throw new Error(`Configured directory is missing: ${configRoot}. Existing panel values were not changed.`);
|
|
29
|
+
throw error;
|
|
30
|
+
}
|
|
31
|
+
const configs = [];
|
|
32
|
+
for (const file of files.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
33
|
+
if (!file.isFile() || !file.name.endsWith('.json') || file.name.endsWith('.controls.json')) continue;
|
|
34
|
+
const name = basename(file.name, '.json');
|
|
35
|
+
const path = join(configRoot, file.name);
|
|
36
|
+
const metadataPath = join(configRoot, `${name}.controls.json`);
|
|
37
|
+
configs.push({ name, path, metadataPath, data: await readJson(path), metadata: await readJson(metadataPath, {}) });
|
|
38
|
+
}
|
|
39
|
+
const snapshotPath = join(root, 'unified_data_control_config.json');
|
|
40
|
+
const snapshot = await readJson(snapshotPath, []);
|
|
41
|
+
if (!Array.isArray(snapshot) && !(snapshot && typeof snapshot === 'object' && Object.keys(snapshot).length === 0)) {
|
|
42
|
+
throw new Error(`${snapshotPath}: expected a ConfigItem array`);
|
|
43
|
+
}
|
|
44
|
+
return { manifest, configs, snapshotPath, snapshot: Array.isArray(snapshot) ? snapshot : [] };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const exportQueues = new Map();
|
|
48
|
+
export function exportProjectConfig(projectRoot, options = {}) {
|
|
49
|
+
const key = resolve(projectRoot);
|
|
50
|
+
const previous = exportQueues.get(key) ?? Promise.resolve();
|
|
51
|
+
const next = previous.catch(() => {}).then(() => writeProjectConfig(key, options));
|
|
52
|
+
exportQueues.set(key, next);
|
|
53
|
+
return next.finally(() => { if (exportQueues.get(key) === next) exportQueues.delete(key); });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function writeProjectConfig(projectRoot, options) {
|
|
57
|
+
const state = await readProjectConfigs(projectRoot);
|
|
58
|
+
const warnings = [];
|
|
59
|
+
const entries = state.configs.flatMap(config => createConfigEntries(config.name, config.data, config.metadata, state.snapshot, { onWarn: warning => warnings.push(warning) }));
|
|
60
|
+
const output = `${JSON.stringify(entries, null, 2)}\n`;
|
|
61
|
+
let current = '';
|
|
62
|
+
try { current = await readFile(state.snapshotPath, 'utf8'); }
|
|
63
|
+
catch (error) { if (error.code !== 'ENOENT') throw error; }
|
|
64
|
+
if (current !== output) {
|
|
65
|
+
if (options.check) throw new Error('Configuration snapshot is stale. Run the export-config command before collecting the upload snapshot.');
|
|
66
|
+
const temporary = `${state.snapshotPath}.${process.pid}.${randomUUID()}.tmp`;
|
|
67
|
+
try { await writeFile(temporary, output, 'utf8'); await rename(temporary, state.snapshotPath); }
|
|
68
|
+
finally { await unlink(temporary).catch(error => { if (error.code !== 'ENOENT') throw error; }); }
|
|
69
|
+
}
|
|
70
|
+
for (const warning of warnings) options.onWarn?.(warning);
|
|
71
|
+
return { entries, warnings, changed: current !== output };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export async function resolvedProjectConfigs(projectRoot) {
|
|
75
|
+
const state = await readProjectConfigs(projectRoot);
|
|
76
|
+
return { ...state, resolved: new Map(state.configs.map(config => [resolve(config.path), resolveConfig(config.name, config.data, config.metadata, state.snapshot, { cdnBase: state.manifest.cdnBase })])) };
|
|
77
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { resolve, join } from 'node:path';
|
|
2
|
+
import { exportProjectConfig, resolvedProjectConfigs } from './project.mjs';
|
|
3
|
+
|
|
4
|
+
export function gameConfig() {
|
|
5
|
+
let root, state, server;
|
|
6
|
+
const refresh = async () => {
|
|
7
|
+
await exportProjectConfig(root, { onWarn: message => console.warn(`[LightGame config] ${message}`) });
|
|
8
|
+
state = await resolvedProjectConfigs(root);
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
name: 'lightgame-config',
|
|
12
|
+
enforce: 'pre',
|
|
13
|
+
async configResolved(config) { root = config.root; await refresh(); },
|
|
14
|
+
configureServer(value) { server = value; },
|
|
15
|
+
transform(code, id) {
|
|
16
|
+
const path = resolve(id.split('?')[0]);
|
|
17
|
+
const query = new URLSearchParams(id.includes('?') ? id.slice(id.indexOf('?') + 1) : '');
|
|
18
|
+
const data = state?.resolved.get(path);
|
|
19
|
+
if (data !== undefined && !query.has('raw') && !query.has('url')) return { code: JSON.stringify(data), map: null };
|
|
20
|
+
},
|
|
21
|
+
async hotUpdate(context) {
|
|
22
|
+
if (this.environment.name !== 'client') return;
|
|
23
|
+
const path = resolve(context.file);
|
|
24
|
+
const configRoot = resolve(root, state.manifest.configs);
|
|
25
|
+
if (path === join(root, 'game-runtime.json') || path === join(root, 'unified_data_control_config.json')
|
|
26
|
+
|| path.startsWith(`${configRoot}/`) || path.startsWith(`${configRoot}\\`)) {
|
|
27
|
+
await refresh();
|
|
28
|
+
server?.moduleGraph.invalidateAll();
|
|
29
|
+
server?.ws.send({ type: 'full-reload' });
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { promises as fs } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
const distDir = path.resolve('dist');
|
|
5
|
+
const indexPath = path.join(distDir, 'index.html');
|
|
6
|
+
const markerPath = path.join(distDir, '.lgb-preview-ready.json');
|
|
7
|
+
const tempPath = `${markerPath}.${process.pid}.tmp`;
|
|
8
|
+
|
|
9
|
+
const stat = await fs.stat(indexPath);
|
|
10
|
+
if (!stat.isFile()) throw new Error('dist/index.html is not a file');
|
|
11
|
+
|
|
12
|
+
const payload = {
|
|
13
|
+
schema: 1,
|
|
14
|
+
built_at: new Date().toISOString(),
|
|
15
|
+
index: {
|
|
16
|
+
mtime_ms: stat.mtimeMs,
|
|
17
|
+
size: stat.size,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
await fs.writeFile(tempPath, `${JSON.stringify(payload)}\n`, 'utf8');
|
|
22
|
+
await fs.rename(tempPath, markerPath);
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `#ui-root` / `#ui-stage` 的唯一 owner:把 `viewport.ts` 的解算结果落到 DOM 上。
|
|
3
|
+
*
|
|
4
|
+
* 落盘位置:`${CRAFT_PROJECT_DIR}/src/display/ui-stage.ts`
|
|
5
|
+
*
|
|
6
|
+
* 职责边界:
|
|
7
|
+
* - 层级骨架(root / stage / 层段)由本文件的 `createUiStage()` 创建;
|
|
8
|
+
* - stage 的**盒(width / height)与 transform(translate + scale)**在每次 `apply()` 时重设。
|
|
9
|
+
*
|
|
10
|
+
* 为什么每次重设:短边锁定模型下长边随设备比例变化(1440 ~ 2400),设计尺寸不是常量,
|
|
11
|
+
* 不能用 contain 模型「构造期固定尺寸 + `min(cssW / width, cssH / height)` 缩放」。
|
|
12
|
+
*
|
|
13
|
+
* 为什么要 `id`:`#ui-root` 是平台截图合成(`connectPreview({ uiRoot })`)与视觉自检的
|
|
14
|
+
* 锚点,`#ui-stage` 是业务 CSS 与方向钩子的锚点。同域重绘必须能按固定 id 定位这一层。
|
|
15
|
+
*/
|
|
16
|
+
import { computeLogicalSize, getOmniSafeFrame, getSafeFrame } from './viewport';
|
|
17
|
+
import type { LogicalSize, SafeFrame, ViewportOptions } from './viewport';
|
|
18
|
+
|
|
19
|
+
const UI_LAYERS: Record<string, number> = { background: 0, hud: 100, panel: 300, scrim: 600, modal: 650, toast: 900 };
|
|
20
|
+
|
|
21
|
+
function createUiStage(container: HTMLElement, options: { width: number; height: number }): {
|
|
22
|
+
root: HTMLDivElement;
|
|
23
|
+
stage: HTMLDivElement;
|
|
24
|
+
layer(name: string): HTMLDivElement;
|
|
25
|
+
dispose(): void;
|
|
26
|
+
} {
|
|
27
|
+
const document = container.ownerDocument;
|
|
28
|
+
const root = document.createElement('div');
|
|
29
|
+
const stage = document.createElement('div');
|
|
30
|
+
Object.assign(root.style, { position: 'absolute', inset: '0', pointerEvents: 'none', overflow: 'hidden', zIndex: '10' });
|
|
31
|
+
Object.assign(stage.style, {
|
|
32
|
+
position: 'absolute', left: '50%', top: '50%', width: `${options.width}px`, height: `${options.height}px`,
|
|
33
|
+
transform: 'translate(-50%, -50%)', transformOrigin: 'center center', pointerEvents: 'none',
|
|
34
|
+
});
|
|
35
|
+
root.append(stage);
|
|
36
|
+
const layers = new Map<string, HTMLDivElement>();
|
|
37
|
+
for (const [name, order] of Object.entries(UI_LAYERS)) {
|
|
38
|
+
const element = document.createElement('div');
|
|
39
|
+
element.dataset.layer = name;
|
|
40
|
+
Object.assign(element.style, { position: 'absolute', inset: '0', pointerEvents: 'none', zIndex: String(order) });
|
|
41
|
+
stage.append(element);
|
|
42
|
+
layers.set(name, element);
|
|
43
|
+
}
|
|
44
|
+
container.append(root);
|
|
45
|
+
return {
|
|
46
|
+
root,
|
|
47
|
+
stage,
|
|
48
|
+
layer(name: string): HTMLDivElement {
|
|
49
|
+
const element = layers.get(name);
|
|
50
|
+
if (!element) throw new Error(`Unknown UI layer '${name}'`);
|
|
51
|
+
return element;
|
|
52
|
+
},
|
|
53
|
+
dispose(): void {
|
|
54
|
+
root.remove();
|
|
55
|
+
layers.clear();
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** 稳定的 DOM 钩子,业务 CSS 与自检脚本依赖它们,不要改名 */
|
|
61
|
+
export const UI_ROOT_ID = 'ui-root';
|
|
62
|
+
export const UI_STAGE_ID = 'ui-stage';
|
|
63
|
+
|
|
64
|
+
export interface UiStageHandle {
|
|
65
|
+
readonly root: HTMLDivElement;
|
|
66
|
+
readonly stage: HTMLDivElement;
|
|
67
|
+
/** 当前逻辑尺寸(设计像素)。**不是常量**:短边恒定、长边随 viewport 比例伸缩 */
|
|
68
|
+
readonly logical: LogicalSize;
|
|
69
|
+
/** 逻辑像素 → CSS 像素的缩放系数。控件半径 / 拖动阈值等设计像素尺寸都乘它 */
|
|
70
|
+
readonly scale: number;
|
|
71
|
+
/** 当前方向下必须完整可见的居中区域(逻辑坐标) */
|
|
72
|
+
readonly safeFrame: SafeFrame;
|
|
73
|
+
/** 横竖都可见的居中方形(逻辑坐标)。转屏后也必须还在的元素用它 */
|
|
74
|
+
readonly omniSafeFrame: SafeFrame;
|
|
75
|
+
/**
|
|
76
|
+
* 取层段容器(`background` / `hud` / `panel` / `scrim` / `modal` / `toast`)。
|
|
77
|
+
* 虚拟控件与业务 HUD 都挂进层段里,
|
|
78
|
+
* **不要自己在 stage 下另建一层** —— 会绕过层序,且破坏触点仲裁所依赖的插入顺序。
|
|
79
|
+
*/
|
|
80
|
+
layer(name: string): HTMLDivElement;
|
|
81
|
+
/** 按 viewport(容器)CSS 尺寸重算并同步。入参必须是容器尺寸,不是 canvas 尺寸 */
|
|
82
|
+
apply(viewportW: number, viewportH: number): void;
|
|
83
|
+
/** 直接读容器实测尺寸再 apply;容器未布局(宽高为 0)时保持上一次的有效值 */
|
|
84
|
+
applyFromContainer(): void;
|
|
85
|
+
dispose(): void;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
let current: UiStageHandle | null = null;
|
|
89
|
+
|
|
90
|
+
/** 入口 `initUiStage` 之后,`screenUi` 与虚拟控件共用这一层,不要再 `createUiStage`。 */
|
|
91
|
+
export function getUiStage(): UiStageHandle {
|
|
92
|
+
if (!current) throw new Error('UI stage 尚未 initUiStage');
|
|
93
|
+
return current;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function initUiStage(container: HTMLElement, options?: ViewportOptions): UiStageHandle {
|
|
97
|
+
// 容器未布局(iframe 首帧)时 clientWidth/Height 为 0。此时用兜底解算值建 stage,
|
|
98
|
+
// 建完必须再走一次 applyFromContainer,等观测回调送来真实尺寸。
|
|
99
|
+
let logical = computeLogicalSize(container.clientWidth, container.clientHeight, options);
|
|
100
|
+
|
|
101
|
+
const ui = createUiStage(container, { width: logical.logicW, height: logical.logicH });
|
|
102
|
+
const root: HTMLDivElement = ui.root;
|
|
103
|
+
const stage: HTMLDivElement = ui.stage;
|
|
104
|
+
root.id = UI_ROOT_ID;
|
|
105
|
+
stage.id = UI_STAGE_ID;
|
|
106
|
+
|
|
107
|
+
const handle: UiStageHandle = {
|
|
108
|
+
root,
|
|
109
|
+
stage,
|
|
110
|
+
get logical() {
|
|
111
|
+
return logical;
|
|
112
|
+
},
|
|
113
|
+
get scale() {
|
|
114
|
+
return logical.scale;
|
|
115
|
+
},
|
|
116
|
+
get safeFrame() {
|
|
117
|
+
return getSafeFrame(logical, options);
|
|
118
|
+
},
|
|
119
|
+
get omniSafeFrame() {
|
|
120
|
+
return getOmniSafeFrame(logical, options);
|
|
121
|
+
},
|
|
122
|
+
layer(name: string): HTMLDivElement {
|
|
123
|
+
return ui.layer(name);
|
|
124
|
+
},
|
|
125
|
+
apply(viewportW: number, viewportH: number): void {
|
|
126
|
+
logical = computeLogicalSize(viewportW, viewportH, options);
|
|
127
|
+
|
|
128
|
+
// translate(-50%, -50%) 是 createUiStage 设好的居中方式,必须原样保留。
|
|
129
|
+
stage.style.width = `${logical.logicW}px`;
|
|
130
|
+
stage.style.height = `${logical.logicH}px`;
|
|
131
|
+
stage.style.transform = `translate(-50%, -50%) scale(${logical.scale})`;
|
|
132
|
+
|
|
133
|
+
// 方向钩子(**实测值**,转屏实时翻转)。业务 CSS 用
|
|
134
|
+
// `#ui-stage[data-orientation="portrait"] .xxx { ... }` 分支排布,
|
|
135
|
+
// 业务坐标更新沿现有 resize 链处理。
|
|
136
|
+
stage.dataset.orientation = logical.orientation;
|
|
137
|
+
|
|
138
|
+
// 给「不在 stage 内」的元素(全屏视频层、canvas 内控件等)留一个换算入口:
|
|
139
|
+
// 设计像素尺寸 × --ui-scale = 实际 CSS 像素。
|
|
140
|
+
container.style.setProperty('--ui-scale', String(logical.scale));
|
|
141
|
+
},
|
|
142
|
+
applyFromContainer(): void {
|
|
143
|
+
const w = container.clientWidth;
|
|
144
|
+
const h = container.clientHeight;
|
|
145
|
+
if (w > 0 && h > 0) handle.apply(w, h);
|
|
146
|
+
},
|
|
147
|
+
dispose(): void {
|
|
148
|
+
if (current === handle) current = null;
|
|
149
|
+
ui.dispose();
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
handle.applyFromContainer();
|
|
154
|
+
current = handle;
|
|
155
|
+
return handle;
|
|
156
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 显示器适配:短边锁定 + 长边扩展,**方向无关**。
|
|
3
|
+
*
|
|
4
|
+
* 落盘位置:`${CRAFT_PROJECT_DIR}/src/display/viewport.ts`
|
|
5
|
+
* 本文件是纯函数模块:不引用 Phaser、不引用 runtime、不碰 DOM。渲染层、UI 层、
|
|
6
|
+
* 玩法层都从同一份解算结果取值,因此三者的坐标系必然一致。
|
|
7
|
+
*
|
|
8
|
+
* 核心规则:
|
|
9
|
+
* - 哪条轴是短边由**运行时实测**决定:`vw >= vh` 即横向,反之纵向;
|
|
10
|
+
* - 短边逻辑长度恒为 shortEdge(默认 1080);
|
|
11
|
+
* - 长边逻辑长度 = shortEdge × (viewport 长边 / viewport 短边),clamp 到
|
|
12
|
+
* [minLong, maxLong](默认 [1440, 2400])。
|
|
13
|
+
*
|
|
14
|
+
* 由此:
|
|
15
|
+
* - 支持的比例范围内,横竖方向的逻辑区域都铺满容器;
|
|
16
|
+
* - 只有比 4:3 更方、或比 20:9 更长的极端比例才触发 clamp 并留边;
|
|
17
|
+
* - 逻辑像素乘返回的 scale 得到 CSS 像素;控件可读性按实际显示结果检查。
|
|
18
|
+
*
|
|
19
|
+
* `#ui-stage` 的 `data-orientation` 可用于 CSS 重排;需要业务坐标更新时沿现有 resize 链处理。
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/** 可选覆盖项。绝大多数项目不需要传 —— 默认值就是规范值 */
|
|
23
|
+
export interface ViewportOptions {
|
|
24
|
+
/** 短边逻辑长度,默认 1080;不规定控件字号 */
|
|
25
|
+
shortEdge?: number;
|
|
26
|
+
/**
|
|
27
|
+
* 长边 clamp 范围 [min, max],单位为设计像素。
|
|
28
|
+
* 缺省时**按 shortEdge 派生**:`[shortEdge × 4/3, shortEdge × 20/9]`
|
|
29
|
+
* (默认 shortEdge 1080 → [1440, 2400]),即支持 4:3 ~ 20:9。
|
|
30
|
+
* 这样改 shortEdge 不会意外触发 clamp。显式传值则完全按传入的绝对像素。
|
|
31
|
+
*/
|
|
32
|
+
longEdgeClamp?: [number, number];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** 运行时**实测**方向,不是配置声明 */
|
|
36
|
+
export type Orientation = 'landscape' | 'portrait';
|
|
37
|
+
|
|
38
|
+
/** 一次 resize 的解算结果,UI 层与相机层共用 */
|
|
39
|
+
export interface LogicalSize {
|
|
40
|
+
/** 逻辑宽(设计像素) */
|
|
41
|
+
logicW: number;
|
|
42
|
+
/** 逻辑高(设计像素) */
|
|
43
|
+
logicH: number;
|
|
44
|
+
/** 逻辑像素 → CSS 像素的缩放系数 */
|
|
45
|
+
scale: number;
|
|
46
|
+
/** 居中偏移(CSS 像素)。未触发 clamp 时恒为 0 */
|
|
47
|
+
offsetX: number;
|
|
48
|
+
offsetY: number;
|
|
49
|
+
/** 长边是否被 clamp。为 true 时才会出现留边 */
|
|
50
|
+
clamped: boolean;
|
|
51
|
+
/** 本次解算时 viewport 的实际方向 */
|
|
52
|
+
orientation: Orientation;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** 保守可见区(UI 逻辑坐标,居中),不作为世界或碰撞边界 */
|
|
56
|
+
export interface SafeFrame {
|
|
57
|
+
x: number;
|
|
58
|
+
y: number;
|
|
59
|
+
width: number;
|
|
60
|
+
height: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const DEFAULT_SHORT_EDGE = 1080;
|
|
64
|
+
/** 默认支持的长短边比例区间:4:3 ~ 20:9 */
|
|
65
|
+
const DEFAULT_MIN_RATIO = 4 / 3;
|
|
66
|
+
const DEFAULT_MAX_RATIO = 20 / 9;
|
|
67
|
+
|
|
68
|
+
function clamp(value: number, min: number, max: number): number {
|
|
69
|
+
return Math.min(max, Math.max(min, value));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function resolveParams(options?: ViewportOptions): {
|
|
73
|
+
shortEdge: number;
|
|
74
|
+
minLong: number;
|
|
75
|
+
maxLong: number;
|
|
76
|
+
} {
|
|
77
|
+
const rawShort = Number(options?.shortEdge);
|
|
78
|
+
const shortEdge = rawShort > 0 ? rawShort : DEFAULT_SHORT_EDGE;
|
|
79
|
+
// 缺省 clamp 按短边派生,保证换 shortEdge 时比例区间不变
|
|
80
|
+
const [rawMin, rawMax] = options?.longEdgeClamp ?? [
|
|
81
|
+
shortEdge * DEFAULT_MIN_RATIO,
|
|
82
|
+
shortEdge * DEFAULT_MAX_RATIO,
|
|
83
|
+
];
|
|
84
|
+
// 容错:配置写反或非法时退回派生默认,不让一处笔误把画面算崩
|
|
85
|
+
const minLong = rawMin > 0 ? Math.min(rawMin, rawMax) : shortEdge * DEFAULT_MIN_RATIO;
|
|
86
|
+
const maxLong = rawMax > 0 ? Math.max(rawMin, rawMax) : shortEdge * DEFAULT_MAX_RATIO;
|
|
87
|
+
return { shortEdge, minLong, maxLong };
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* 由 viewport 尺寸解算逻辑坐标系,运行时方向由入参实测得出。
|
|
92
|
+
*
|
|
93
|
+
* @param viewportW CSS 像素宽(用容器 clientWidth,不要用 window.innerWidth ——
|
|
94
|
+
* iOS Safari 地址栏收起会改变后者,且预览跑在 iframe 里时它是宿主尺寸)
|
|
95
|
+
* @param viewportH CSS 像素高
|
|
96
|
+
* @param options 可选覆盖;缺省即规范值
|
|
97
|
+
*/
|
|
98
|
+
export function computeLogicalSize(
|
|
99
|
+
viewportW: number,
|
|
100
|
+
viewportH: number,
|
|
101
|
+
options?: ViewportOptions,
|
|
102
|
+
): LogicalSize {
|
|
103
|
+
const { shortEdge, minLong, maxLong } = resolveParams(options);
|
|
104
|
+
|
|
105
|
+
// iframe 尚未布局时宽高为 0,退回横向基准比例,避免除零产生 NaN 污染整条链路
|
|
106
|
+
if (!(viewportW > 0) || !(viewportH > 0)) {
|
|
107
|
+
return {
|
|
108
|
+
logicW: minLong,
|
|
109
|
+
logicH: shortEdge,
|
|
110
|
+
scale: 1,
|
|
111
|
+
offsetX: 0,
|
|
112
|
+
offsetY: 0,
|
|
113
|
+
clamped: false,
|
|
114
|
+
orientation: 'landscape',
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// 方向来自实测。正方形(vw === vh)归为 landscape,避免边界抖动。
|
|
119
|
+
const landscape = viewportW >= viewportH;
|
|
120
|
+
const viewportShort = landscape ? viewportH : viewportW;
|
|
121
|
+
const viewportLong = landscape ? viewportW : viewportH;
|
|
122
|
+
|
|
123
|
+
const rawLong = shortEdge * (viewportLong / viewportShort);
|
|
124
|
+
const logicLong = clamp(rawLong, minLong, maxLong);
|
|
125
|
+
// 浮点比较用绝对误差:rawLong 来自除法,与 clamp 边界直接 !== 会误判
|
|
126
|
+
const clamped = Math.abs(logicLong - rawLong) > 1e-6;
|
|
127
|
+
|
|
128
|
+
const logicW = landscape ? logicLong : shortEdge;
|
|
129
|
+
const logicH = landscape ? shortEdge : logicLong;
|
|
130
|
+
|
|
131
|
+
// 未 clamp 时两轴比值相同,min 取到的就是短边比值,offset 自然为 0;
|
|
132
|
+
// clamp 后逻辑比例与 viewport 不符,min 保证内容不被裁切,多出部分成为留边。
|
|
133
|
+
const scale = Math.min(viewportW / logicW, viewportH / logicH);
|
|
134
|
+
const offsetX = (viewportW - logicW * scale) / 2;
|
|
135
|
+
const offsetY = (viewportH - logicH * scale) / 2;
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
logicW,
|
|
139
|
+
logicH,
|
|
140
|
+
scale,
|
|
141
|
+
offsetX,
|
|
142
|
+
offsetY,
|
|
143
|
+
clamped,
|
|
144
|
+
orientation: landscape ? 'landscape' : 'portrait',
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* 当前方向下必须完整可见的居中区域(逻辑坐标)。
|
|
150
|
+
*
|
|
151
|
+
* 短边方向恒等于 shortEdge(全高/全宽可见),长边方向取 clamp 下限 minLong ——
|
|
152
|
+
* 即最方的受支持比例。在当前方向下该区域完整落在画面内,因此:
|
|
153
|
+
* - 需要持续可见的屏幕内容可按此区域布局,或随方向重新布局;
|
|
154
|
+
* - 世界对象按相机取景保护当前玩法必需区域,不限制在此 UI 坐标框内。
|
|
155
|
+
*
|
|
156
|
+
* **注意 safe frame 随设备方向翻转**(横向 1440×1080 ↔ 纵向 1080×1440)。
|
|
157
|
+
* 跨方向的屏幕布局参考见 `getOmniSafeFrame()`。
|
|
158
|
+
*/
|
|
159
|
+
export function getSafeFrame(logical: LogicalSize, options?: ViewportOptions): SafeFrame {
|
|
160
|
+
const { shortEdge, minLong } = resolveParams(options);
|
|
161
|
+
const landscape = logical.orientation === 'landscape';
|
|
162
|
+
const width = landscape ? Math.min(minLong, logical.logicW) : shortEdge;
|
|
163
|
+
const height = landscape ? shortEdge : Math.min(minLong, logical.logicH);
|
|
164
|
+
return {
|
|
165
|
+
x: (logical.logicW - width) / 2,
|
|
166
|
+
y: (logical.logicH - height) / 2,
|
|
167
|
+
width,
|
|
168
|
+
height,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* 横竖方向都保证可见的居中方形区域(逻辑坐标,边长 = shortEdge)。
|
|
174
|
+
*
|
|
175
|
+
* 用于需要跨方向持续可见的屏幕内容,例如暂停按钮与提示。
|
|
176
|
+
* 世界对象按实际相机投影与玩法取景处理,不以此框限制世界坐标。
|
|
177
|
+
*/
|
|
178
|
+
export function getOmniSafeFrame(logical: LogicalSize, options?: ViewportOptions): SafeFrame {
|
|
179
|
+
const { shortEdge } = resolveParams(options);
|
|
180
|
+
const side = Math.min(shortEdge, logical.logicW, logical.logicH);
|
|
181
|
+
return {
|
|
182
|
+
x: (logical.logicW - side) / 2,
|
|
183
|
+
y: (logical.logicH - side) / 2,
|
|
184
|
+
width: side,
|
|
185
|
+
height: side,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* 有界世界的取景矩形(逻辑坐标)。世界**居中**放进逻辑区域,多出的空间向四周均匀延伸。
|
|
191
|
+
*
|
|
192
|
+
* 两条轴各自独立判断,一个表达式覆盖两种情形:
|
|
193
|
+
*
|
|
194
|
+
* | 情形 | 结果 | 表现 |
|
|
195
|
+
* |---|---|---|
|
|
196
|
+
* | 世界 **窄于** 该轴逻辑长度 | 起点取负、长度取逻辑长度 | 取景被钳在居中位,世界居中、两侧留白 |
|
|
197
|
+
* | 世界 **不窄于** 该轴逻辑长度 | 等价于 `(0, 0, worldW, worldH)` | 相机正常跟随滚动 |
|
|
198
|
+
*
|
|
199
|
+
* 因此单轴滚动的横版世界会自动得到「滚动轴滚动 + 另一轴居中留白」,不需要按品类分支。
|
|
200
|
+
*
|
|
201
|
+
* **两个硬约束:**
|
|
202
|
+
*
|
|
203
|
+
* 1. **不要把返回值当作物理 / 碰撞边界。** 物理边界必须保持世界原尺寸
|
|
204
|
+
* `(0, 0, worldW, worldH)`,否则角色能走进留白区。
|
|
205
|
+
* 取景矩形是「镜头能看到哪」,物理边界是「角色能走到哪」,改造后二者不再相等。
|
|
206
|
+
* 2. **必须在 resize 回调里重算并重设。** 逻辑区域是运行时值,转屏或改窗口后旧值立即失效
|
|
207
|
+
* (世界会重新贴边)。Phaser 侧写在 `this.scale.on(Phaser.Scale.Events.RESIZE)` 里,
|
|
208
|
+
* 和背景铺满用的是同一个回调:
|
|
209
|
+
*
|
|
210
|
+
* ```ts
|
|
211
|
+
* private applyCameraBounds(): void {
|
|
212
|
+
* // this.scale.width/height 就是逻辑区域尺寸(入口已 setGameSize),不要再算一遍
|
|
213
|
+
* const b = getCameraBounds(WORLD_W, WORLD_H, this.scale.width, this.scale.height);
|
|
214
|
+
* this.cameras.main.setBounds(b.x, b.y, b.width, b.height);
|
|
215
|
+
* }
|
|
216
|
+
* // create() 与 this.scale.on(Phaser.Scale.Events.RESIZE) 里各调一次
|
|
217
|
+
* ```
|
|
218
|
+
*
|
|
219
|
+
* 另外注意世界坐标会出现**负值区域**(屏幕左边缘可能对应世界 x < 0),
|
|
220
|
+
* 所以出界判定一律用世界坐标与世界尺寸比较,写 `x < 0` 会误判。
|
|
221
|
+
*
|
|
222
|
+
* @param worldW 玩法世界宽(设计像素常量);无界世界传世界包围盒或按需放大
|
|
223
|
+
* @param worldH 玩法世界高
|
|
224
|
+
* @param logicW 当前逻辑区域宽。Phaser 场景里**直接传 `this.scale.width`**
|
|
225
|
+
* @param logicH 当前逻辑区域高。同上,传 `this.scale.height`
|
|
226
|
+
*/
|
|
227
|
+
export interface CameraBounds {
|
|
228
|
+
/** 可能为负:世界窄于逻辑区域时,屏幕左/上边缘落在世界之外 */
|
|
229
|
+
x: number;
|
|
230
|
+
y: number;
|
|
231
|
+
width: number;
|
|
232
|
+
height: number;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export function getCameraBounds(
|
|
236
|
+
worldW: number,
|
|
237
|
+
worldH: number,
|
|
238
|
+
logicW: number,
|
|
239
|
+
logicH: number,
|
|
240
|
+
): CameraBounds {
|
|
241
|
+
// -(0) 会得到 -0:数值上等价,但 Object.is(-0, 0) 为 false、JSON 往返也会变号,
|
|
242
|
+
// 对外暴露不干净。用 `|| 0` 把 ±0 一律归一到 +0。
|
|
243
|
+
return {
|
|
244
|
+
x: Math.min(0, -(logicW - worldW) / 2) || 0,
|
|
245
|
+
y: Math.min(0, -(logicH - worldH) / 2) || 0,
|
|
246
|
+
width: Math.max(worldW, logicW),
|
|
247
|
+
height: Math.max(worldH, logicH),
|
|
248
|
+
};
|
|
249
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import Phaser from 'phaser';
|
|
2
|
+
import { connectPreview } from './platform';
|
|
3
|
+
import { LoadScene } from './scenes/LoadScene';
|
|
4
|
+
import { PlayScene } from './scenes/PlayScene';
|
|
5
|
+
import './style.css';
|
|
6
|
+
import { initUiStage } from './display/ui-stage';
|
|
7
|
+
import { computeLogicalSize } from './display/viewport';
|
|
8
|
+
import type { LogicalSize } from './display/viewport';
|
|
9
|
+
|
|
10
|
+
const container = document.querySelector<HTMLDivElement>('#game')!;
|
|
11
|
+
const initial: LogicalSize = computeLogicalSize(container.clientWidth, container.clientHeight);
|
|
12
|
+
const ui = initUiStage(container);
|
|
13
|
+
|
|
14
|
+
const game = new Phaser.Game({
|
|
15
|
+
type: Phaser.AUTO,
|
|
16
|
+
parent: 'game',
|
|
17
|
+
banner: false,
|
|
18
|
+
scale: {
|
|
19
|
+
mode: Phaser.Scale.FIT,
|
|
20
|
+
autoCenter: Phaser.Scale.CENTER_BOTH,
|
|
21
|
+
width: initial.logicW,
|
|
22
|
+
height: initial.logicH,
|
|
23
|
+
},
|
|
24
|
+
render: {
|
|
25
|
+
preserveDrawingBuffer: true,
|
|
26
|
+
},
|
|
27
|
+
physics: {
|
|
28
|
+
default: 'arcade',
|
|
29
|
+
},
|
|
30
|
+
scene: [LoadScene],
|
|
31
|
+
callbacks: {
|
|
32
|
+
preBoot: (game) => {
|
|
33
|
+
game.scene.add('PlayScene', PlayScene, false);
|
|
34
|
+
},
|
|
35
|
+
postBoot: (booted) => {
|
|
36
|
+
const canvas = booted.canvas;
|
|
37
|
+
if (!canvas) throw new Error('Phaser 未创建画布');
|
|
38
|
+
const preview = connectPreview(canvas, { uiRoot: '#ui-root' });
|
|
39
|
+
let marked = false;
|
|
40
|
+
booted.registry.set('markPreviewReady', () => {
|
|
41
|
+
if (marked) return;
|
|
42
|
+
marked = true;
|
|
43
|
+
preview.markReady();
|
|
44
|
+
});
|
|
45
|
+
booted.events.on(Phaser.Core.Events.POST_RENDER, () => {
|
|
46
|
+
preview.afterRender();
|
|
47
|
+
});
|
|
48
|
+
(globalThis as unknown as { __qaWarp?: (target: string) => boolean }).__qaWarp = (target) => {
|
|
49
|
+
const want = String(target || '').toLowerCase();
|
|
50
|
+
if (want !== 'play' && want !== 'playscene' && want !== 'game') return false;
|
|
51
|
+
try { booted.scene.stop('LoadScene'); } catch { /* already stopped */ }
|
|
52
|
+
booted.scene.start('PlayScene');
|
|
53
|
+
const loading = document.getElementById('loading');
|
|
54
|
+
if (loading) {
|
|
55
|
+
loading.style.display = 'none';
|
|
56
|
+
loading.setAttribute('aria-hidden', 'true');
|
|
57
|
+
}
|
|
58
|
+
return true;
|
|
59
|
+
};
|
|
60
|
+
if (import.meta.hot) {
|
|
61
|
+
import.meta.hot.dispose(() => {
|
|
62
|
+
preview.dispose();
|
|
63
|
+
ui.dispose();
|
|
64
|
+
booted.destroy(true);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
function applyViewSize(): void {
|
|
72
|
+
const vw = container.clientWidth;
|
|
73
|
+
const vh = container.clientHeight;
|
|
74
|
+
if (!(vw > 0) || !(vh > 0)) return;
|
|
75
|
+
const next = computeLogicalSize(vw, vh);
|
|
76
|
+
if (
|
|
77
|
+
Math.abs(game.scale.width - next.logicW) > 0.5 ||
|
|
78
|
+
Math.abs(game.scale.height - next.logicH) > 0.5
|
|
79
|
+
) {
|
|
80
|
+
game.scale.setGameSize(next.logicW, next.logicH);
|
|
81
|
+
}
|
|
82
|
+
ui.apply(vw, vh);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
new ResizeObserver(applyViewSize).observe(container);
|
|
86
|
+
applyViewSize();
|
|
87
|
+
game.scale.on(Phaser.Scale.Events.RESIZE, () => ui.applyFromContainer());
|