@craft_eco/craft-mcp 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (620) hide show
  1. package/README.md +31 -10
  2. package/bin/craft-mcp.mjs +10 -8
  3. package/dist-server/game-workflow/bundle-files.mjs +43 -0
  4. package/dist-server/game-workflow/engines.mjs +13 -6
  5. package/dist-server/game-workflow/project-bundles.mjs +90 -0
  6. package/dist-server/game-workflow/project-context.mjs +91 -0
  7. package/dist-server/game-workflow/projects.mjs +16 -4
  8. package/dist-server/game-workflow/publication-materials.mjs +18 -20
  9. package/dist-server/game-workflow/publications.mjs +15 -17
  10. package/dist-server/game-workflow/publish-capture.mjs +21 -57
  11. package/dist-server/integrations/config.mjs +71 -0
  12. package/dist-server/integrations/files.mjs +54 -0
  13. package/dist-server/integrations/hosts.mjs +30 -0
  14. package/dist-server/integrations/install.mjs +86 -0
  15. package/dist-server/integrations/runtime.mjs +71 -0
  16. package/dist-server/mcp/publication-page.mjs +18 -50
  17. package/dist-server/mcp/publish-panel.mjs +28 -35
  18. package/dist-server/mcp/server.mjs +17 -14
  19. package/dist-server/preview/preview-launcher.mjs +9 -2
  20. package/dist-server/preview/preview-start.mjs +2 -2
  21. package/dist-server/upstream/publication-transport.mjs +19 -19
  22. package/package.json +10 -2
  23. package/resources/craft-create/SKILL.md +14 -0
  24. package/resources/craft-game-maker/SKILL.md +77 -71
  25. package/resources/craft-game-maker/js.md +10 -10
  26. package/resources/craft-game-maker/js3d.md +13 -13
  27. package/resources/game_visual_qa.mjs +1149 -1149
  28. package/resources/js/bundle.json +93 -0
  29. package/resources/js/context/AGENTS.md +15 -102
  30. package/resources/js/context/knowledge/AigcWiring.md +5 -196
  31. package/resources/js/context/knowledge/AssetUrl.md +5 -20
  32. package/resources/js/context/knowledge/Layout.md +7 -0
  33. package/resources/js/context/knowledge/Lifecycle.md +6 -27
  34. package/resources/js/context/skills/aigc-generate/SKILL.md +6 -141
  35. package/resources/js/context/skills/asset-search/SKILL.md +5 -62
  36. package/resources/js/context/skills/asset-search/references/resource-config.md +9 -0
  37. package/resources/js/context/skills/export-config/SKILL.md +7 -19
  38. package/resources/js/context/skills/export-config/scripts/export-config.mjs +3 -45
  39. package/resources/js/context/skills/index.json +30 -0
  40. package/resources/js/context/skills/visual-qa/SKILL.md +6 -28
  41. package/resources/js/project/README.md +4 -96
  42. package/resources/js/project/package.json +1 -2
  43. package/resources/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  44. package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +1 -37
  45. package/resources/js/project/scripts/config-export.mjs +10 -34
  46. package/resources/js3d/bundle.json +104 -0
  47. package/resources/js3d/context/AGENTS.md +16 -85
  48. package/resources/js3d/context/knowledge/AigcWiring.md +9 -0
  49. package/resources/js3d/context/knowledge/AssetUrl.md +9 -0
  50. package/resources/js3d/context/knowledge/CodingGuide/Pitfalls.md +9 -67
  51. package/resources/js3d/context/knowledge/Layout.md +7 -0
  52. package/resources/js3d/context/knowledge/Runtime.md +5 -30
  53. package/resources/js3d/context/skills/aigc-integration/SKILL.md +6 -164
  54. package/resources/js3d/context/skills/asset-search/SKILL.md +5 -171
  55. package/resources/js3d/context/skills/asset-search/references/resource-config.md +6 -94
  56. package/resources/js3d/context/skills/asset-usage-audit/SKILL.md +6 -82
  57. package/resources/js3d/context/skills/export-config/SKILL.md +7 -11
  58. package/resources/js3d/context/skills/export-config/scripts/export-config.mjs +3 -55
  59. package/resources/js3d/context/skills/index.json +42 -0
  60. package/resources/js3d/context/skills/performance-audit/SKILL.md +8 -153
  61. package/resources/js3d/context/skills/visual-qa/SKILL.md +14 -0
  62. package/resources/js3d/project/README.md +4 -103
  63. package/resources/js3d/project/package.json +1 -2
  64. package/resources/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  65. package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-scene-assets.mjs +3 -28
  66. package/resources/js3d/project/scripts/config-export.mjs +12 -34
  67. package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts +8 -0
  68. package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts.map +1 -0
  69. package/vendor/agent-cli/dist/src/artifacts/build-failure.js +39 -0
  70. package/vendor/agent-cli/dist/src/artifacts/build-failure.js.map +1 -0
  71. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts +5 -0
  72. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts.map +1 -0
  73. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js +45 -0
  74. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js.map +1 -0
  75. package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.d.ts.map +1 -1
  76. package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js +2 -1
  77. package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js.map +1 -1
  78. package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts +2 -0
  79. package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts.map +1 -1
  80. package/vendor/agent-cli/dist/src/artifacts/prepare.js +7 -2
  81. package/vendor/agent-cli/dist/src/artifacts/prepare.js.map +1 -1
  82. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts +2 -0
  83. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts.map +1 -1
  84. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js +27 -16
  85. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js.map +1 -1
  86. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts +14 -0
  87. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts.map +1 -0
  88. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js +119 -0
  89. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js.map +1 -0
  90. package/vendor/agent-cli/dist/src/artifacts/static.d.ts.map +1 -1
  91. package/vendor/agent-cli/dist/src/artifacts/static.js +20 -6
  92. package/vendor/agent-cli/dist/src/artifacts/static.js.map +1 -1
  93. package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts.map +1 -1
  94. package/vendor/agent-cli/dist/src/cli/process-protocol.js +24 -2
  95. package/vendor/agent-cli/dist/src/cli/process-protocol.js.map +1 -1
  96. package/vendor/agent-cli/dist/src/cli/process-steering.d.ts +21 -0
  97. package/vendor/agent-cli/dist/src/cli/process-steering.d.ts.map +1 -0
  98. package/vendor/agent-cli/dist/src/cli/process-steering.js +66 -0
  99. package/vendor/agent-cli/dist/src/cli/process-steering.js.map +1 -0
  100. package/vendor/agent-cli/dist/src/context/user-skill-bundle.js +1 -1
  101. package/vendor/agent-cli/dist/src/context/user-skill-bundle.js.map +1 -1
  102. package/vendor/agent-cli/dist/src/index.d.ts +4 -1
  103. package/vendor/agent-cli/dist/src/index.d.ts.map +1 -1
  104. package/vendor/agent-cli/dist/src/index.js +3 -0
  105. package/vendor/agent-cli/dist/src/index.js.map +1 -1
  106. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +29 -1
  107. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +1 -1
  108. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +18 -1
  109. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +1 -1
  110. package/vendor/agent-cli/dist/src/session/client.d.ts +10 -0
  111. package/vendor/agent-cli/dist/src/session/client.d.ts.map +1 -1
  112. package/vendor/agent-cli/dist/src/session/client.js +15 -5
  113. package/vendor/agent-cli/dist/src/session/client.js.map +1 -1
  114. package/vendor/agent-cli/dist/src/session/link-session.d.ts +3 -0
  115. package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +1 -1
  116. package/vendor/agent-cli/dist/src/session/link-session.js +14 -1
  117. package/vendor/agent-cli/dist/src/session/link-session.js.map +1 -1
  118. package/vendor/agent-cli/dist/src/session/process-observability.d.ts +3 -0
  119. package/vendor/agent-cli/dist/src/session/process-observability.d.ts.map +1 -1
  120. package/vendor/agent-cli/dist/src/session/process-observability.js +11 -0
  121. package/vendor/agent-cli/dist/src/session/process-observability.js.map +1 -1
  122. package/vendor/agent-cli/dist/src/session/process-request.d.ts +3 -2
  123. package/vendor/agent-cli/dist/src/session/process-request.d.ts.map +1 -1
  124. package/vendor/agent-cli/dist/src/session/process-request.js +27 -9
  125. package/vendor/agent-cli/dist/src/session/process-request.js.map +1 -1
  126. package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +1 -0
  127. package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +1 -1
  128. package/vendor/agent-cli/dist/src/session/run-start-body.js +8 -3
  129. package/vendor/agent-cli/dist/src/session/run-start-body.js.map +1 -1
  130. package/vendor/agent-cli/dist/src/session/run-steer.d.ts +42 -0
  131. package/vendor/agent-cli/dist/src/session/run-steer.d.ts.map +1 -0
  132. package/vendor/agent-cli/dist/src/session/run-steer.js +205 -0
  133. package/vendor/agent-cli/dist/src/session/run-steer.js.map +1 -0
  134. package/vendor/agent-cli/dist/src/shared/types.d.ts +6 -0
  135. package/vendor/agent-cli/dist/src/shared/types.d.ts.map +1 -1
  136. package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts +21 -0
  137. package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts.map +1 -0
  138. package/vendor/agent-cli/dist/src/tools/context-program-receipt.js +102 -0
  139. package/vendor/agent-cli/dist/src/tools/context-program-receipt.js.map +1 -0
  140. package/vendor/agent-cli/dist/src/tools/context-program.d.ts.map +1 -1
  141. package/vendor/agent-cli/dist/src/tools/context-program.js +3 -0
  142. package/vendor/agent-cli/dist/src/tools/context-program.js.map +1 -1
  143. package/resources/js/context/.role/AGENTS_DESIGN.md +0 -9
  144. package/resources/js/context/agents/aigc-asset.md +0 -168
  145. package/resources/js/context/knowledge/AigcEnabled.md +0 -49
  146. package/resources/js/context/knowledge/FrontendComponents.md +0 -17
  147. package/resources/js/context/knowledge/MobileAdaptation.md +0 -73
  148. package/resources/js/context/knowledge/MobileAdapted.md +0 -36
  149. package/resources/js/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
  150. package/resources/js/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -115
  151. package/resources/js/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -392
  152. package/resources/js/context/knowledge/PlatformServices.md +0 -190
  153. package/resources/js/context/knowledge/ProjectDisplayConfig.md +0 -35
  154. package/resources/js/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
  155. package/resources/js/context/knowledge/Ui.md +0 -11
  156. package/resources/js/context/knowledge/UiEditorCompat.md +0 -21
  157. package/resources/js/context/rules/MultiplayerCapability.md +0 -23
  158. package/resources/js/context/rules/MultiplayerRoomEntryUX.md +0 -63
  159. package/resources/js/context/rules/PlatformBoundaryModules.md +0 -44
  160. package/resources/js/context/rules/preview_ready.md +0 -8
  161. package/resources/js/context/skills/aigc-generate/knowledge/audio.md +0 -39
  162. package/resources/js/context/skills/aigc-generate/knowledge/batch-replace.md +0 -26
  163. package/resources/js/context/skills/aigc-generate/knowledge/character2d.md +0 -132
  164. package/resources/js/context/skills/aigc-generate/knowledge/non-stepwise-aigc.md +0 -53
  165. package/resources/js/context/skills/aigc-generate/knowledge/texture-prop.md +0 -52
  166. package/resources/js/context/skills/aigc-generate/knowledge/texture-scene.md +0 -191
  167. package/resources/js/context/skills/aigc-generate/knowledge/texture-ui.md +0 -55
  168. package/resources/js/context/skills/asset-search/scripts/asset_display.mjs +0 -62
  169. package/resources/js/context/skills/asset-search/scripts/config.json +0 -5
  170. package/resources/js/context/skills/asset-search/scripts/provided_assets.mjs +0 -125
  171. package/resources/js/context/skills/asset-search/scripts/search.mjs +0 -760
  172. package/resources/js/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -657
  173. package/resources/js/context/skills/asset-search/strategies/anim2d.md +0 -42
  174. package/resources/js/context/skills/asset-search/strategies/audio.md +0 -34
  175. package/resources/js/context/skills/asset-search/strategies/effect2d.md +0 -31
  176. package/resources/js/context/skills/asset-search/strategies/texture-prop.md +0 -22
  177. package/resources/js/context/skills/asset-search/strategies/ui-common.md +0 -40
  178. package/resources/js/context/skills/asset-search/strategies/ui-style.md +0 -28
  179. package/resources/js/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
  180. package/resources/js/context/skills/lightgame-runtime-adapt/SKILL.md +0 -93
  181. package/resources/js/context/skills/lightgame-runtime-adapt/project/game-runtime.json +0 -7
  182. package/resources/js/context/skills/lightgame-runtime-adapt/project/package.json +0 -22
  183. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +0 -5
  184. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +0 -208
  185. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +0 -37
  186. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +0 -227
  187. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +0 -31
  188. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +0 -272
  189. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.d.mts +0 -79
  190. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.mjs +0 -29
  191. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/release.json +0 -22
  192. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/cli.mjs +0 -16
  193. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.d.mts +0 -4
  194. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.mjs +0 -50
  195. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +0 -3
  196. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.mjs +0 -72
  197. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.d.mts +0 -24
  198. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.mjs +0 -2
  199. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.d.mts +0 -10
  200. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.mjs +0 -1
  201. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/config-export.mjs +0 -37
  202. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/refresh-runtime.mjs +0 -50
  203. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/cli.mjs +0 -20
  204. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.d.mts +0 -19
  205. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.mjs +0 -1
  206. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/installed.json +0 -6
  207. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.d.mts +0 -6
  208. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.mjs +0 -77
  209. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.d.mts +0 -2
  210. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.mjs +0 -34
  211. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/ui-stage.ts +0 -156
  212. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/viewport.ts +0 -249
  213. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/main.ts +0 -87
  214. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/platform.ts +0 -2
  215. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/screenUi.ts +0 -185
  216. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/style.css +0 -294
  217. package/resources/js/context/skills/lightgame-runtime-adapt/project/tsconfig.json +0 -20
  218. package/resources/js/context/skills/lightgame-runtime-adapt/project/vite.config.ts +0 -5
  219. package/resources/js/context/skills/lightgame-runtime-adapt/scripts/install-template.mjs +0 -159
  220. package/resources/js/context/skills/mobile-adaptation/SKILL.md +0 -277
  221. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -50
  222. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -862
  223. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
  224. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
  225. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
  226. package/resources/js/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -135
  227. package/resources/js/context/skills/mobile-adaptation/references/input-config.md +0 -342
  228. package/resources/js/context/skills/mobile-adaptation/references/verification.md +0 -140
  229. package/resources/js/context/skills/mobile-adaptation/references/web-audio.md +0 -11
  230. package/resources/js/context/skills/mobile-compat-qa/SKILL.md +0 -53
  231. package/resources/js/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
  232. package/resources/js/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
  233. package/resources/js/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
  234. package/resources/js/context/skills/optimization-suggestions/SKILL.md +0 -89
  235. package/resources/js/context/skills/platform-services/SKILL.md +0 -101
  236. package/resources/js/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
  237. package/resources/js/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
  238. package/resources/js/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
  239. package/resources/js/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
  240. package/resources/js/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
  241. package/resources/js/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
  242. package/resources/js/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
  243. package/resources/js/context/skills/platform-services/assets/modules/log.ts +0 -35
  244. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
  245. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
  246. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
  247. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
  248. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
  249. package/resources/js/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
  250. package/resources/js/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
  251. package/resources/js/context/skills/platform-services/assets/modules/save.d.mts +0 -49
  252. package/resources/js/context/skills/platform-services/assets/modules/save.mjs +0 -1
  253. package/resources/js/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
  254. package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
  255. package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
  256. package/resources/js/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
  257. package/resources/js/context/skills/platform-services/references/api_reference.md +0 -18
  258. package/resources/js/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
  259. package/resources/js/context/skills/platform-services/scripts/install.mjs +0 -148
  260. package/resources/js/context/skills/resolution-adaptation/SKILL.md +0 -47
  261. package/resources/js/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
  262. package/resources/js/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -249
  263. package/resources/js/context/skills/resolution-adaptation/assets/example/main.ts +0 -98
  264. package/resources/js/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -200
  265. package/resources/js/context/skills/resolution-adaptation/references/audit.md +0 -31
  266. package/resources/js/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
  267. package/resources/js/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
  268. package/resources/js/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
  269. package/resources/js/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
  270. package/resources/js/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
  271. package/resources/js/context/skills/resolution-adaptation/references/world-resize.md +0 -55
  272. package/resources/js/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
  273. package/resources/js/context/skills/scene-editor-compat/SKILL.md +0 -94
  274. package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.assets.json +0 -13
  275. package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.scene-editor.json +0 -6
  276. package/resources/js/context/skills/scene-editor-compat/assets/example/src/game/sceneAdapter.ts +0 -25
  277. package/resources/js/context/skills/scene-editor-compat/assets/example/src/scenes/main.scene.json +0 -18
  278. package/resources/js/context/skills/scene-editor-compat/assets/runtime/release.json +0 -7
  279. package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.d.mts +0 -42
  280. package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.mjs +0 -144
  281. package/resources/js/context/skills/scene-editor-compat/docs/contract.md +0 -330
  282. package/resources/js/context/skills/scene-editor-compat/docs/resource-sync.md +0 -64
  283. package/resources/js/context/skills/scene-editor-compat/docs/runtime-state.md +0 -28
  284. package/resources/js/context/skills/scene-editor-compat/docs/terrain-contract.md +0 -47
  285. package/resources/js/context/skills/scene-editor-compat/docs/visual-contract.md +0 -64
  286. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.assets.json +0 -38
  287. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.scene-editor.json +0 -9
  288. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneAdapter.ts +0 -59
  289. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneBlockers.ts +0 -30
  290. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneFileAssets.ts +0 -66
  291. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/Main.Scene.ts +0 -20
  292. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/SceneTypes.ts +0 -26
  293. package/resources/js/context/skills/scene-editor-compat/references/contract.md +0 -73
  294. package/resources/js/context/skills/scene-editor-compat/scripts/apply_scene_marker.py +0 -162
  295. package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_contract.py +0 -853
  296. package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_resource_urls.py +0 -173
  297. package/resources/js/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -427
  298. package/resources/js/context/skills/scene-editor-compat/version.json +0 -1
  299. package/resources/js/context/skills/ui-editor-compat/SKILL.md +0 -48
  300. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
  301. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -74
  302. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
  303. package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
  304. package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
  305. package/resources/js/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
  306. package/resources/js/context/skills/ui-editor-compat/references/contract.md +0 -132
  307. package/resources/js/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
  308. package/resources/js/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
  309. package/resources/js/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
  310. package/resources/js/context/skills/version-update/SKILL.md +0 -192
  311. package/resources/js/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
  312. package/resources/js/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
  313. package/resources/js/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
  314. package/resources/js/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
  315. package/resources/js/context/version/version.json +0 -1
  316. package/resources/js/project/SPEC/assist/.gitkeep +0 -0
  317. package/resources/js/project/SPEC/guide/.gitkeep +0 -0
  318. package/resources/js/project/SPEC/plan/.gitkeep +0 -0
  319. package/resources/js/project/SPEC/readme.md +0 -6
  320. package/resources/js/project/SPEC/res/.gitkeep +0 -0
  321. package/resources/js/project/SPEC/task-item/.gitkeep +0 -0
  322. package/resources/js/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
  323. package/resources/js/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
  324. package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
  325. package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
  326. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
  327. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
  328. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
  329. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
  330. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -29
  331. package/resources/js/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
  332. package/resources/js/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
  333. package/resources/js/project/runtime/lightgame/1.0.0/release.json +0 -37
  334. package/resources/js/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
  335. package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
  336. package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
  337. package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
  338. package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -8
  339. package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
  340. package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
  341. package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
  342. package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
  343. package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
  344. package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
  345. package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
  346. package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
  347. package/resources/js/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
  348. package/resources/js/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
  349. package/resources/js/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
  350. package/resources/js/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
  351. package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
  352. package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
  353. package/resources/js/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
  354. package/resources/js/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
  355. package/resources/js/project/scripts/refresh-runtime.mjs +0 -50
  356. package/resources/js/project/vendor/core-manager-js/package.json +0 -33
  357. package/resources/js/project/vendor/core-manager-js/src/.versions.json +0 -42
  358. package/resources/js/project/vendor/core-manager-js/src/CoreManagerPlugin.ts +0 -41
  359. package/resources/js/project/vendor/core-manager-js/src/assetManager/AssetRef.ts +0 -93
  360. package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcFirstImageFile.ts +0 -203
  361. package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcTextureLoader.ts +0 -106
  362. package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.test.ts +0 -25
  363. package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.ts +0 -21
  364. package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.test.ts +0 -65
  365. package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.ts +0 -340
  366. package/resources/js/project/vendor/core-manager-js/src/configManager/FeatureConfig.ts +0 -87
  367. package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.d.mts +0 -92
  368. package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.mjs +0 -271
  369. package/resources/js/project/vendor/core-manager-js/src/index.ts +0 -31
  370. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputConfig.ts +0 -81
  371. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.test.ts +0 -43
  372. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.ts +0 -32
  373. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.test.ts +0 -141
  374. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.ts +0 -20
  375. package/resources/js/project/vendor/core-manager-js/src/inputManager/KeyboardProvider.ts +0 -183
  376. package/resources/js/project/vendor/core-manager-js/src/inputManager/TouchProvider.ts +0 -304
  377. package/resources/js/project/vendor/core-manager-js/src/inputManager/VirtualJoystick.ts +0 -351
  378. package/resources/js/project/vendor/core-manager-js/src/inputManager/_internal/InputManagerImpl.ts +0 -180
  379. package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64 +0 -13
  380. package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64.d.ts +0 -14
  381. package/resources/js/project/vendor/core-manager-js/src/inputManager/input_config.example.json +0 -68
  382. package/resources/js/project/vendor/core-manager-js/src/logManager/DebugConsole.ts +0 -433
  383. package/resources/js/project/vendor/core-manager-js/src/logManager/LogCapture.ts +0 -118
  384. package/resources/js/project/vendor/core-manager-js/src/logManager/LogManager.ts +0 -444
  385. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCapture.ts +0 -485
  386. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.test.ts +0 -66
  387. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.ts +0 -149
  388. package/resources/js/project/vendor/core-manager-js/src/logManager/icons.b64 +0 -9
  389. package/resources/js/project/vendor/core-manager-js/src/resourceManager/AssetUrlResolver.ts +0 -29
  390. package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.test.ts +0 -88
  391. package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.ts +0 -122
  392. package/resources/js/project/vendor/core-manager-js/src/runtime.ts +0 -24
  393. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterEntity.ts +0 -318
  394. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.test.ts +0 -151
  395. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.ts +0 -235
  396. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.test.ts +0 -98
  397. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.ts +0 -94
  398. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectEntity.ts +0 -209
  399. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.test.ts +0 -106
  400. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.ts +0 -341
  401. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.test.ts +0 -68
  402. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.ts +0 -236
  403. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.test.ts +0 -22
  404. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.ts +0 -29
  405. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteEntity.test.ts +0 -197
  406. package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiContracts.ts +0 -9
  407. package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiKit.ts +0 -555
  408. package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.test.ts +0 -112
  409. package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.ts +0 -178
  410. package/resources/js/project/vendor/core-manager-js/src/uiManager/ui-base.css +0 -246
  411. package/resources/js/project/vendor/core-manager-js/src/videoManager/VideoManager.ts +0 -139
  412. package/resources/js/project/vendor/core-manager-js/tsconfig.json +0 -15
  413. package/resources/js/project/vendor/run.sh +0 -4
  414. package/resources/js/project/version/craft_feature_version.json +0 -42
  415. package/resources/js/project/version/project_feature_version.json +0 -11
  416. package/resources/js3d/context/.role/AGENTS_DESIGN.md +0 -9
  417. package/resources/js3d/context/knowledge/3D/PoseInterpolationKnowledge.md +0 -75
  418. package/resources/js3d/context/knowledge/CodingGuide/SceneEditableGuide.md +0 -42
  419. package/resources/js3d/context/knowledge/FrontendComponents.md +0 -19
  420. package/resources/js3d/context/knowledge/MobileAdaptation.md +0 -73
  421. package/resources/js3d/context/knowledge/MobileAdapted.md +0 -36
  422. package/resources/js3d/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
  423. package/resources/js3d/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -117
  424. package/resources/js3d/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -430
  425. package/resources/js3d/context/knowledge/PlatformServices.md +0 -190
  426. package/resources/js3d/context/knowledge/ProjectDisplayConfig.md +0 -35
  427. package/resources/js3d/context/knowledge/SceneEditorCompat.md +0 -35
  428. package/resources/js3d/context/knowledge/StepByStep.md +0 -21
  429. package/resources/js3d/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
  430. package/resources/js3d/context/knowledge/UiEditorCompat.md +0 -21
  431. package/resources/js3d/context/rules/MultiplayerCapability.md +0 -27
  432. package/resources/js3d/context/rules/MultiplayerRoomEntryUX.md +0 -63
  433. package/resources/js3d/context/rules/PlatformBoundaryModules.md +0 -44
  434. package/resources/js3d/context/rules/preview_ready.md +0 -8
  435. package/resources/js3d/context/skills/aigc-integration/assets/sprite-sheet-player.mjs +0 -70
  436. package/resources/js3d/context/skills/aigc-integration/callback.md +0 -77
  437. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/README.md +0 -23
  438. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/audio-aigc-knowledge.md +0 -38
  439. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/character2d-aigc-knowledge.md +0 -72
  440. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/staticmesh-aigc-knowledge.md +0 -33
  441. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-prop-aigc-knowledge.md +0 -36
  442. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-scene-aigc-knowledge.md +0 -37
  443. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-ui-aigc-knowledge.md +0 -35
  444. package/resources/js3d/context/skills/asset-search/references/sprite-sheets.md +0 -58
  445. package/resources/js3d/context/skills/asset-search/scripts/asset_display.mjs +0 -62
  446. package/resources/js3d/context/skills/asset-search/scripts/config.json +0 -235
  447. package/resources/js3d/context/skills/asset-search/scripts/manifest_pipeline.mjs +0 -905
  448. package/resources/js3d/context/skills/asset-search/scripts/preflight.mjs +0 -79
  449. package/resources/js3d/context/skills/asset-search/scripts/provided_assets.mjs +0 -74
  450. package/resources/js3d/context/skills/asset-search/scripts/search.mjs +0 -637
  451. package/resources/js3d/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -667
  452. package/resources/js3d/context/skills/asset-search/strategies/anim2d.md +0 -42
  453. package/resources/js3d/context/skills/asset-search/strategies/effect2d.md +0 -31
  454. package/resources/js3d/context/skills/asset-usage-audit/references/case-tidewater-zoo.md +0 -89
  455. package/resources/js3d/context/skills/asset-usage-audit/references/optimization-playbook.md +0 -143
  456. package/resources/js3d/context/skills/asset-usage-audit/references/usage-model.md +0 -90
  457. package/resources/js3d/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
  458. package/resources/js3d/context/skills/game-art-style/SKILL.md +0 -60
  459. package/resources/js3d/context/skills/game-art-style/assets/previews/cartoon.png +0 -0
  460. package/resources/js3d/context/skills/game-art-style/assets/previews/comic.png +0 -0
  461. package/resources/js3d/context/skills/game-art-style/assets/previews/cozy.png +0 -0
  462. package/resources/js3d/context/skills/game-art-style/assets/previews/cyber.png +0 -0
  463. package/resources/js3d/context/skills/game-art-style/assets/previews/horror.png +0 -0
  464. package/resources/js3d/context/skills/game-art-style/assets/previews/lowpoly.png +0 -0
  465. package/resources/js3d/context/skills/game-art-style/assets/previews/paper.png +0 -0
  466. package/resources/js3d/context/skills/game-art-style/assets/previews/voxel.png +0 -0
  467. package/resources/js3d/context/skills/game-art-style/references/art-parameters-lite.md +0 -38
  468. package/resources/js3d/context/skills/game-art-style/references/construction.md +0 -111
  469. package/resources/js3d/context/skills/game-art-style/references/materials-textures.md +0 -105
  470. package/resources/js3d/context/skills/game-art-style/references/sources.md +0 -25
  471. package/resources/js3d/context/skills/game-art-style/references/styles/cartoon.md +0 -175
  472. package/resources/js3d/context/skills/game-art-style/references/styles/comic.md +0 -168
  473. package/resources/js3d/context/skills/game-art-style/references/styles/cozy.md +0 -191
  474. package/resources/js3d/context/skills/game-art-style/references/styles/cyber.md +0 -165
  475. package/resources/js3d/context/skills/game-art-style/references/styles/horror.md +0 -173
  476. package/resources/js3d/context/skills/game-art-style/references/styles/lowpoly.md +0 -185
  477. package/resources/js3d/context/skills/game-art-style/references/styles/paper.md +0 -181
  478. package/resources/js3d/context/skills/game-art-style/references/styles/voxel.md +0 -189
  479. package/resources/js3d/context/skills/game-art-style/references/user-style-document.md +0 -88
  480. package/resources/js3d/context/skills/mobile-adaptation/SKILL.md +0 -301
  481. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -104
  482. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -933
  483. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
  484. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
  485. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
  486. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -257
  487. package/resources/js3d/context/skills/mobile-adaptation/references/input-config.md +0 -342
  488. package/resources/js3d/context/skills/mobile-adaptation/references/verification.md +0 -140
  489. package/resources/js3d/context/skills/mobile-adaptation/references/web-audio.md +0 -11
  490. package/resources/js3d/context/skills/mobile-compat-qa/SKILL.md +0 -53
  491. package/resources/js3d/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
  492. package/resources/js3d/context/skills/mobile-compat-qa/references/web-form-input.md +0 -10
  493. package/resources/js3d/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
  494. package/resources/js3d/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
  495. package/resources/js3d/context/skills/optimization-suggestions/SKILL.md +0 -74
  496. package/resources/js3d/context/skills/performance-audit/references/case-notes.md +0 -93
  497. package/resources/js3d/context/skills/performance-audit/references/rules.md +0 -183
  498. package/resources/js3d/context/skills/platform-services/SKILL.md +0 -101
  499. package/resources/js3d/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
  500. package/resources/js3d/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
  501. package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
  502. package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
  503. package/resources/js3d/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
  504. package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
  505. package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
  506. package/resources/js3d/context/skills/platform-services/assets/modules/log.ts +0 -35
  507. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
  508. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
  509. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
  510. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
  511. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
  512. package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
  513. package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
  514. package/resources/js3d/context/skills/platform-services/assets/modules/save.d.mts +0 -49
  515. package/resources/js3d/context/skills/platform-services/assets/modules/save.mjs +0 -1
  516. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
  517. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
  518. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
  519. package/resources/js3d/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
  520. package/resources/js3d/context/skills/platform-services/references/api_reference.md +0 -18
  521. package/resources/js3d/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
  522. package/resources/js3d/context/skills/platform-services/scripts/install.mjs +0 -148
  523. package/resources/js3d/context/skills/resolution-adaptation/SKILL.md +0 -46
  524. package/resources/js3d/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
  525. package/resources/js3d/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -239
  526. package/resources/js3d/context/skills/resolution-adaptation/assets/example/main.ts +0 -129
  527. package/resources/js3d/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -188
  528. package/resources/js3d/context/skills/resolution-adaptation/references/audit.md +0 -31
  529. package/resources/js3d/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
  530. package/resources/js3d/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
  531. package/resources/js3d/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
  532. package/resources/js3d/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
  533. package/resources/js3d/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
  534. package/resources/js3d/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
  535. package/resources/js3d/context/skills/scene-editor-compat/SKILL.md +0 -599
  536. package/resources/js3d/context/skills/scene-editor-compat/references/bundle-contract.md +0 -141
  537. package/resources/js3d/context/skills/scene-editor-compat/references/editor-integration.md +0 -92
  538. package/resources/js3d/context/skills/scene-editor-compat/references/scene-data-format.md +0 -125
  539. package/resources/js3d/context/skills/scene-editor-compat/references/slots-rules.md +0 -113
  540. package/resources/js3d/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -1187
  541. package/resources/js3d/context/skills/threejs-game-quality/SKILL.md +0 -53
  542. package/resources/js3d/context/skills/threejs-game-quality/agents/openai.yaml +0 -4
  543. package/resources/js3d/context/skills/threejs-game-quality/references/01-build.md +0 -94
  544. package/resources/js3d/context/skills/threejs-game-quality/references/02-avoid.md +0 -50
  545. package/resources/js3d/context/skills/threejs-game-quality/references/03-detect.md +0 -105
  546. package/resources/js3d/context/skills/threejs-game-quality/references/camera-by-genre.md +0 -147
  547. package/resources/js3d/context/skills/threejs-game-quality/references/camera-distance.md +0 -79
  548. package/resources/js3d/context/skills/threejs-game-quality/references/camera-sources.md +0 -56
  549. package/resources/js3d/context/skills/threejs-game-quality/references/character-motion-face.md +0 -51
  550. package/resources/js3d/context/skills/threejs-game-quality/references/parameter-contract.md +0 -55
  551. package/resources/js3d/context/skills/threejs-game-quality/references/refine-existing.md +0 -78
  552. package/resources/js3d/context/skills/threejs-game-quality/references/rendering-stability.md +0 -84
  553. package/resources/js3d/context/skills/threejs-game-quality/references/runtime-tools.md +0 -120
  554. package/resources/js3d/context/skills/threejs-game-quality/scripts/package.json +0 -4
  555. package/resources/js3d/context/skills/threejs-game-quality/scripts/runtime-audit.js +0 -238
  556. package/resources/js3d/context/skills/ui-editor-compat/SKILL.md +0 -59
  557. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
  558. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -61
  559. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
  560. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
  561. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
  562. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
  563. package/resources/js3d/context/skills/ui-editor-compat/references/contract.md +0 -110
  564. package/resources/js3d/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
  565. package/resources/js3d/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
  566. package/resources/js3d/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
  567. package/resources/js3d/context/skills/version-update/SKILL.md +0 -191
  568. package/resources/js3d/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
  569. package/resources/js3d/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
  570. package/resources/js3d/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
  571. package/resources/js3d/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
  572. package/resources/js3d/context/version/version.json +0 -1
  573. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
  574. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
  575. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
  576. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
  577. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
  578. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
  579. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
  580. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
  581. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -30
  582. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
  583. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
  584. package/resources/js3d/project/runtime/lightgame/1.0.0/release.json +0 -39
  585. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
  586. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
  587. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
  588. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
  589. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -7
  590. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
  591. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
  592. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
  593. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
  594. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
  595. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
  596. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
  597. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
  598. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.d.mts +0 -26
  599. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.mjs +0 -351
  600. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
  601. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
  602. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
  603. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
  604. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
  605. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
  606. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
  607. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
  608. package/resources/js3d/project/scripts/refresh-runtime.mjs +0 -50
  609. package/resources/js3d/project/vendor/core-manager-three/package.json +0 -12
  610. package/resources/js3d/project/vendor/core-manager-three/src/index.ts +0 -2
  611. package/resources/js3d/project/vendor/run.sh +0 -4
  612. package/resources/js3d/project/version/craft_feature_version.json +0 -42
  613. package/resources/js3d/project/version/project_feature_version.json +0 -11
  614. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts +0 -7
  615. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts.map +0 -1
  616. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js +0 -145
  617. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js.map +0 -1
  618. /package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
  619. /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
  620. /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +0 -0
@@ -1,277 +0,0 @@
1
- ---
2
- name: mobile-adaptation
3
- description: >
4
- 移动端输入适配:平台单点判定(pc/mobile + ?launchPlatform 验收开关)、PC 键鼠与
5
- 移动端虚拟控件映射到同一套语义接口、触点仲裁(button 优先于 joystick,joystick 优先于 look)、
6
- 视角滑动区的消费型语义。首次为项目接入触屏、新增虚拟摇杆/动作按钮/视角滑动区、
7
- 排查手机上按键无反应或视角异常、以及需要移动端验收时加载。
8
- 游戏设计包含移动端支持(含 clarifier 默认开启)、明确移动端需求、具体移动端故障或已适配能力维护时使用。
9
- ---
10
-
11
- # 移动端输入适配
12
-
13
- ## 适用范围与状态
14
-
15
- 先按 `${CRAFT_CONTEXT_DIR}/knowledge/MobileAdapted.md` 核对游戏设计的平台范围并读取 `mobile_adapted`。clarifier 默认开启且已写入游戏设计的范围也触发适配;明确关闭或无移动端范围的旧项目不预装。本技能的双端映射与落盘清单仅约束已触发的适配工作,按实际操作选控件。完成下方验收后,按该文档合并更新状态;未完成或受阻不写 `true`。
16
-
17
- 相关工作按需读取,不作为每轮制作的固定检查:
18
-
19
- - 首次接入移动端有声音频,或排查首次播放、静音和恢复:[`references/web-audio.md`](references/web-audio.md)。
20
- - 修改或排查暂停、后台恢复、重入与运行中断:`${CRAFT_CONTEXT_DIR}/skills/mobile-compat-qa/references/web-lifecycle.md`。
21
- - JS2D 根规则禁止自由文本输入;软键盘适配不授权新增输入框、自定义命名或自由打字,没有合规场景时按不适用处理。
22
-
23
- ## 目标与判据
24
-
25
- 让同一份玩法代码在 PC 键鼠与移动端触屏上都跑通,**玩法里不出现平台分支**。
26
-
27
- 判据一句话:`src/` 里搜不到 `isMobile` / `maxTouchPoints` / `userAgent` 这类判定,
28
- 玩法只调用 `input.isDown('jump')` / `input.horizontal()` / `input.lookDelta()`。
29
-
30
- ## 一、三层职责
31
-
32
- | 层 | 位置 | 职责 |
33
- |---|---|---|
34
- | ① 语义层 | `GameInput` 接口(`input-layer.ts` 导出) | 业务唯一入口。PC 与移动端在同一条代码路径上 |
35
- | ② 映射层 | `src/input/input-config.json` | 每个语义 key 同时给出 `pc`(键盘 code / 鼠标键 token)与 `mobile`(控件描述) |
36
- | ③ 控件层 | PC:`createKeyboard`;移动端:DOM 虚拟控件 | 只负责采集,不做语义解释 |
37
-
38
- **每项必须同时有 `pc` 与 `mobile`** —— 缺一边等于该平台玩不了,且不会报错(见
39
- [`references/input-config.md`](references/input-config.md))。
40
-
41
- `pc` 支持两类 token:键盘写**逐字的 `KeyboardEvent.code`**(`KeyJ` / `Space`),
42
- 鼠标键写 **`Mouse0`(左)/ `Mouse1`(中)/ `Mouse2`(右)**。键名写错不会报错、只会那个键
43
- 完全没反应,所以输入层启动时会对 `'A'` / `'UP'` / `'MOUSE_LEFT'` 这类旧写法打 warn。
44
-
45
- ## 二、平台判定:单点、缓存、可覆盖
46
-
47
- `src/input/input-platform.ts` 是**唯一事实源**(范式代码见
48
- [`assets/example/src/input/input-platform.ts`](assets/example/src/input/input-platform.ts))。
49
- 命名带 `input-` 前缀是为了与项目根已有的预览桥接 `src/platform.ts` 区分。判定链:
50
-
51
- ```
52
- 显式注入(overrideInputPlatform / 验收脚本)
53
- → globalThis.wx(微信小游戏)→ mobile
54
- → ?launchPlatform=pc|mobile → 参数值(**验收门禁走这条**)
55
- → 有触摸能力 且 (pointer: coarse) → mobile,否则 pc
56
- ```
57
-
58
- - 首次调用判定并**缓存**:插拔鼠标、旋转设备都不重算。
59
- - `#game` 上写 `data-platform="pc|mobile"`,业务 CSS 用 `#game[data-platform='mobile'] .xxx` 做**样式**分支。
60
- - **只在构建期读**(建场景、装配 UI、决定要不要建虚拟控件)。禁止每帧读它做输入分支。
61
- - **禁止业务自行判定平台**:会绕过 `?launchPlatform`,让移动端验收门禁失效,
62
- 还会与运行时实际装配的控件不一致(典型症状:铺了移动端 HUD 但没有摇杆)。
63
-
64
- 第 4 级要求「触摸能力」与「`(pointer: coarse)`」同时成立:只看 `maxTouchPoints` 会把
65
- 触屏 Windows 笔记本判成 mobile(有触摸屏但用户在用键鼠)。
66
-
67
- ## 三、三类控件
68
-
69
- | 控件 | 对应配置 | 形态 |
70
- |---|---|---|
71
- | 摇杆 | `axes.<name>.mobile` | 浮动摇杆,命中区为左侧 50% 宽、下方 65% 高,可视底盘跟随手指落点 |
72
- | 动作按钮 | `actions.<name>.mobile` | 右下角圆形按钮,负坐标从右/下算起 |
73
- | ↳ 切换型按钮 | `actions.<name>.mode: 'toggle'` | 同上,但**按一次翻转一次**(瞄准镜、静步);`isDown()` 返回锁存态 |
74
- | ↳ 拖拽控向按钮 | `actions.<name>.mobile.drag` | 同上,且**按住拖动的位移并入 look 通道**(按下即开火 + 拖拽控向) |
75
- | ↳ 上下文交互按钮 | `actions.<name>.mobile.hidden` + `setActionButtonVisible()` | 同上,但**靠近目标才浮出**,文案可随目标切换(开门 / 拾取 / 对话) |
76
- | 视角滑动区 | `looks.<name>.mobile` | 右半屏空白区,**无可视控件** |
77
-
78
- 尺寸与位置全部按**设计像素**给(见 resolution-adaptation skill),缩放由 `#ui-stage`
79
- 的 `transform: scale()` 承担。不同设备上的实际 CSS 尺寸随缩放变化,仍需检查可读性与触控可达性。
80
-
81
- **选型看「谁在控制、控什么、多频繁」**:有玩家操控的角色 → 摇杆;**没有明显角色**
82
- (观赏 / 场景探索 / 卡牌 / 休闲)→ 用**点击拖动 / 滑动**移动镜头与整体场景(走 `looks`,不要造假轴);
83
- 只有离散、可枚举的玩法动作才做按钮;界面类操作(开始 / 暂停 / 设置)不做虚拟控件。
84
-
85
- **布局看「拇指够不够得到」**:横屏双手拇指 → 左下放移动类、右下放高频操作类;高频操作靠近
86
- 拇指自然落点,越靠近屏幕上沿使用频率越低。这条原则用于避开宿主遮挡后的可用区域。
87
-
88
- 接线前读取 `${CRAFT_CONTEXT_DIR}/skills/resolution-adaptation/references/device-safe-area.md`:普通界面按钮、虚拟控件与展示型 HUD 共用功能 UI 避让规则。竖屏避开顶部整带;横屏避开左上、右上宿主区域,顶部中间可放 HUD 或低频按钮。完整文字/图标和热区都要避让,不只检查控件中心。
89
-
90
- **移动端所有交互控件完成全部缩放后,可见控件区域与有效热区的宽、高均不得小于 40 CSS px;圆形控件直径不得小于 40 CSS px。** 内部图标可小于控件区域;高频操作按需加大。范围包含玩法动作、开始、暂停、设置、关闭、重开和开关,不因采用 DOM 或 Canvas 而豁免。按钮仍须完整位于 safe frame 内。
91
- 完整选型与布局经验见 [`references/input-config.md`](references/input-config.md) 的「控件选型与布局」。
92
-
93
- **上下文交互**(PC 按 `E`、移动端靠近才浮出按钮)**写配置 + 两行调用即可**:
94
- 按钮配 `"hidden": true` 作为初始态,每帧 `setActionButtonVisible('interact', !!target)` 驱动显隐、
95
- `setActionLabel('interact', target.verb)` 切文案。两个 setter **只管移动端 UI,不屏蔽 PC 键位** ——
96
- 业务照常写 `if (target && input.wasPressed('interact'))`,这条判断两端共用,不是平台分支。
97
- **不要自己去改 `.touch-btn` 的 DOM**:隐藏时必须同步清掉按钮上残留的触点,
98
- 否则 `display: none` 不保证释放指针捕获,`isDown()` 会永久为真。
99
- 不需要新增 `tap` 语义 —— `wasPressed()` 本来就是按下沿。
100
- 字段与完整语义见 [`references/input-config.md`](references/input-config.md)「上下文交互按钮」。
101
-
102
- ## 四、触点仲裁:button > joystick > look
103
-
104
- `down` 阶段按 **button → joystick → look** 依次尝试,命中即消费;该指针自此归属唯一控件,
105
- 后续 `move` 只发给它(`setPointerCapture` 保证)。
106
-
107
- 范式代码靠 **DOM 命中测试**天然实现这条仲裁,不需要手写仲裁表:
108
-
109
- 1. `.touch-look-zone` 先插入、`.touch-btn` 后插入 → 同 z-index 下**后插入者优先命中**,
110
- 落在按钮上的触点根本到不了滑动区;
111
- 2. 摇杆区(左下区域)与滑动区(右半屏)互不重叠;
112
- 3. 容器 `pointer-events: none`,只有可操作元素是 `auto`,所以控件不会挡住场景的指针事件。
113
-
114
- 由此得到两条可以直接依赖的性质:
115
-
116
- - 落在动作按钮上的触点**不会**驱动视角 —— 无需给 look 配排除区;
117
- - 拖摇杆时手指划过按钮**不会**误触发按钮。
118
-
119
- **改动这三层 DOM 顺序或 `pointer-events` 就会破坏仲裁**,见
120
- [`assets/example/src/ui/touch-controls.css`](assets/example/src/ui/touch-controls.css) 顶部注释。
121
-
122
- 同一个仲裁规则也约束业务 HUD:控件树挂在 hud 层,业务交互元素若也放进 hud 层且**早于**输入层创建,
123
- 就会被摇杆/滑动区抢走触点(按了没反应)。两种正确做法任选:
124
-
125
- - 业务 HUD 的交互元素在输入层之后创建,或放进更高层段(`panel` / `modal`);
126
- - 模态面板用 scrim(`scrim` / `modal` 层,层级高于 hud)盖住控件 —— 覆盖是全屏的,
127
- 控件自然收不到触点。
128
-
129
- 制作或修改 HUD、面板与控件布局时,读 `${CRAFT_CONTEXT_DIR}/skills/resolution-adaptation/references/game-ui-occlusion.md`;视觉遮挡与实际输入分别核对,DOM 遮罩不代表键盘或世界点选已被禁用。
130
-
131
- ## 五、look 通道(FPS/TPS 必读)
132
-
133
- 只在玩家需要主动控制镜头时声明 `looks`,其它品类**整段不写**。
134
-
135
- - **消费型**:`lookDelta()` 读一次即清零,**每帧只能读一次**。多个系统(相机、武器摆动、
136
- 准星)都要用时,在帧开头读一次存成局部变量往下传,不要各调各的 —— 第二个调用者永远拿到 0。
137
- - **不要为视角伪造轴**:塞进轴会被归一化到 `[-1,1]`,丢掉量纲,快慢拖动转速一样。
138
- - **不要与全屏的相机拖拽逻辑并存**(`OrbitControls` 之类):两者都监听指针,会双重响应
139
- (拖摇杆/摇滑动区时镜头也跟着转)。二选一。
140
- - 「按下即开火 + 拖拽控向」**写配置即可**:给该按钮加 `mobile.drag`
141
- (`{ "look": "look", "sensitivity": 0.6 }`),范式代码把拖拽量并进同一通道,
142
- 业务侧仍然只读一个 `lookDelta()`,**不需要自己接 pointermove、也不需要调 `feedLookDelta`**。
143
- `feedLookDelta(dx, dy)` 留给配置表达不了的来源(陀螺仪、剧情镜头、后坐力抖动)。
144
- 已内置:按住拖出按钮外 `isDown` 不掉、滑动区有专职手指时自动让位、`invertY` 两路一致。
145
- 字段与取值见 [`references/input-config.md`](references/input-config.md)「`drag`」。
146
- - 「切换型」动作(瞄准镜开关)写 `"mode": "toggle"`,`isDown()` 直接返回锁存态,
147
- `wasPressed()` / `wasReleased()` 变成「锁存开 / 关」的那一帧。
148
- **不要自己存 boolean 翻转** —— 那会漏掉 `setControlsVisible` 的复位语义,
149
- 还会在 PC 与移动端各写一套。强制退出(死亡 / 换弹)用 `setToggle(action, false)`。
150
- - PC 端 look 有**三条驱动路径**,输入层全部覆盖,业务不需要分支:
151
- **指针锁定态**(业务调过 `requestPointerLock()`,用 `movementX/Y`)、
152
- **悬停转向**(`requireButton: null`,不按键移动即转向)、
153
- **拖拽转向**(`requireButton: 0 | 2`,默认 2 = 右键)。
154
- **业务可以自由决定是否 `requestPointerLock()`**,锁定与否输入层都能出位移、量纲一致。
155
- 但**不要自己接 `mousemove` 读 `movementX` 再喂给相机** —— 那会和 look 通道双份注入。
156
- - **右键不要同时给 look 和某个 action**:`requireButton: 2` 与 `"pc": ["Mouse2"]` 并存时,
157
- 一次右键按下会同时转向与触发该动作。FPS 的正确配法(左键开火 + 右键瞄准 + 自由转向)见
158
- [`references/input-config.md`](references/input-config.md)「右键冲突」。
159
-
160
- ## 六、极性:在输入边界统一一次
161
-
162
- 轴的极性统一为**右正 X、下正 Y**,键盘与摇杆一致:
163
-
164
- | 输入 | 语义 |
165
- |---|---|
166
- | `KeyD` / `ArrowRight`(positive) | `horizontal() > 0` |
167
- | `KeyW` / `ArrowUp`(**negative**) | `vertical() < 0` |
168
- | 摇杆向右 | `horizontal() > 0` |
169
- | 摇杆向下 | `vertical() > 0`(与键盘 S 同号) |
170
-
171
- **不要为移动端单独取反**。屏幕方向 → 世界方向的转换与相机朝向有关(相机朝 +Z 时
172
- 直接当世界方向会双轴同时镜像),在**消费侧**用相机基向量统一推导一次即可。
173
- 各消费者自己翻符号是这类 bug 的常见根源。
174
-
175
- ## 七、落盘清单
176
-
177
- 1. `src/input/input-platform.ts` —— 平台单点判定 + `data-platform`
178
- 2. `src/input/look-pad.ts` —— 视角通道(消费型位移)
179
- 3. `src/input/input-primitives.ts` —— 键盘、虚拟摇杆与动作边沿原语
180
- 4. `src/input/input-layer.ts` —— 统一输入层(含移动端控件构建与仲裁)
181
- 5. `src/input/input-config.json` —— 键位与控件映射
182
- 6. `src/ui/touch-controls.css` —— 控件样式(在 `src/style.css` 里导入)
183
- 7. `src/main.ts` 接线(见下)
184
-
185
- ## 八、接线(Phaser)
186
-
187
- ```ts
188
- // src/main.ts —— 建一次,挂到 registry 供 Scene 取用
189
- const input = createInputLayer({ container, ui, canvas: game.canvas });
190
- game.registry.set('input', input);
191
-
192
- // src/scenes/PlayScene.ts
193
- import type { GameInput } from '../input/input-layer';
194
-
195
- export class PlayScene extends Phaser.Scene {
196
- /** 注意命名:Phaser 的 `this.input` 是它自己的输入插件,这里必须换个字段名 */
197
- private gameInput!: GameInput;
198
-
199
- create(): void {
200
- this.gameInput = this.registry.get('input') as GameInput;
201
- }
202
-
203
- update(_time: number, delta: number): void {
204
- const input = this.gameInput;
205
- input.sample(); // ① 所有消费者之前
206
- const moveX = input.horizontal('move');
207
- const moveY = input.vertical('move');
208
- const look = input.lookDelta(); // 消费型:本帧只读一次
209
- if (input.wasPressed('jump')) this.jump();
210
- this.world.update(moveX, moveY, look, delta / 1000);
211
- input.endFrame(); // ② 所有消费者之后
212
- }
213
- }
214
-
215
- // 打开模态面板 / 暂停 / 切场景时
216
- input.setControlsVisible(false);
217
- ```
218
-
219
- - `sample()` 必须在所有消费者之前;`endFrame()` 在所有消费者之后
220
- (只有直读 `keyboard.wasPressed` 时才非调不可,但保持这个顺序不会有副作用)。
221
- - **不要用 `this.input`(Phaser 输入插件)处理同一批玩法动作** —— 那是另一条通路,会双重触发。
222
- Phaser 指针只保留给世界内点选 / 拖拽世界物体,且要确认触点没被虚拟控件消费(见「四、触点仲裁」)。
223
- - 打开面板 / 暂停 / `this.scene.start()` 时都要 `setControlsVisible(false)`:
224
- DOM 面板本来就盖在控件之上,但显式关掉才能复位触点与按键,
225
- 并且 Phaser 暂停后不再调用 `update()`,虚拟控件却仍然可见可点 —— 不关会出现
226
- 「暂停了还能按按钮,恢复后角色自己在走」。
227
- - `input.platform` 只用于构建期决定要不要建移动端专属 HUD,**不要在 `update` 里分支**。
228
-
229
- ## 九、红线
230
-
231
- - 禁止业务自判平台、禁止每帧读平台。
232
- - 禁止在玩法逻辑里写平台分支;功能差异靠语义接口抹平,纯样式差异靠 `data-platform` + CSS。
233
- - **禁止用 `this.input`(Phaser 输入插件)处理同一批玩法动作**:DOM 控件与 Phaser 指针是两条通路,
234
- 同时接同一动作会双重触发(表现为"跳一下变两下")。
235
- - 禁止把玩法动作按钮做成 UI 面板按钮(`createButton` 那套,本工程是 Phaser 场景内按钮或 DOM UI 按钮):
236
- 玩法按钮必须参与触点仲裁,属于输入层;界面按钮属于 UI 层。两层不要互相接线。
237
- - 禁止在暂停 / 切场景 / 打开面板时不关虚拟控件(Phaser 停更新了,控件还活着)。
238
- - 禁止可见文字小于 24 设计像素;移动端交互控件须满足上文缩放后尺寸要求,不能仅凭设计半径达标。
239
- - 禁止把移动端控件配置放进 `configs/`(会污染玩家的参数面板)。
240
- - **同一形态下,所有控件对 `pointerType` / 鼠标键的接收门槛必须一致。** 两种典型翻车:
241
- ① 底盘另接 `pointerdown` 会绕过单触点锁定;必须由 `createJoystick.onStart` 统一定位,
242
- 用 zone 的矩形换算局部坐标,第二根手指不能改变底盘与原点;
243
- ② 移动端各控件门槛不齐 —— 摇杆认鼠标左键、动作按钮不筛 pointerType,
244
- 若 look 区写成 `pointerTypes: ['touch', 'pen']`,桌面用 `?launchPlatform=mobile` 验收时
245
- 就「摇杆能推、按钮能按,唯独视角拖不动」,极易被误判成 look 区没实现。
246
- **移动端控件一律按 `['touch', 'pen', 'mouse']` + 鼠标只认左键来配。**
247
- 这类劈叉不报错,只表现为一半功能正常。
248
- - **禁止用 `??` 给「可以显式写 null」的配置项兜默认值。** `??` 对 `null` 和 `undefined` 都生效,
249
- 会把「显式关闭」当成「没填」。典型是 `looks.*.pc.requireButton`:
250
- `null` 语义是「不限制,移动鼠标即转向」(FPS 在 PC 上的标准操作),
251
- 写成 `?? 2` 会强制成右键,表现为「视角转不动」且配置看起来完全正确。
252
- 要默认值就显式判 `=== undefined`,并把它收进一个具名函数,
253
- 让所有读取点(包括 contextmenu 抑制这类联动判断)共用同一个出口。
254
- - 需要独占拖动的游戏控件保留 `touch-action: none`;浏览器手势范围见 `references/input-config.md`,不扩大到正常页面、说明列表、表单或可滚动区域。
255
- - 禁止为鼠标键伪造键盘名(`'MOUSE_LEFT'` 之类),也禁止业务自己另接一套 `pointerdown` 做开火:
256
- 写 `"pc": ["Mouse0"]` 即可,输入层已处理移出画布松手、失焦清空与右键菜单抑制。
257
- - **禁止业务直接操作 `.touch-btn` 的 DOM**(改 `style.display` / `textContent` / class):
258
- 显隐走 `setActionButtonVisible`、文案走 `setActionLabel`。自己改 DOM 会漏掉隐藏时的触点清理 ——
259
- 手指按着时被隐藏,`isDown()` 永久为真(症状:按钮没了却一直在触发)。
260
-
261
- ## 十、验收
262
-
263
- 用 `?launchPlatform=mobile` 强制移动端,逐条过
264
- [`references/verification.md`](references/verification.md) 的清单(含症状 → 根因表)。
265
-
266
- ## 文件索引
267
-
268
- | 文件 | 内容 |
269
- |---|---|
270
- | [`assets/example/src/input/input-platform.ts`](assets/example/src/input/input-platform.ts) | 平台判定唯一事实源 |
271
- | [`assets/example/src/input/look-pad.ts`](assets/example/src/input/look-pad.ts) | 视角通道(消费型位移、死区、`feedDelta`) |
272
- | [`assets/example/src/input/input-primitives.ts`](assets/example/src/input/input-primitives.ts) | `createKeyboard` / `createJoystick` / `createActionInput` 采集原语 |
273
- | [`assets/example/src/input/input-layer.ts`](assets/example/src/input/input-layer.ts) | 统一输入层 + 移动端控件 + DOM 命中仲裁 |
274
- | [`assets/example/src/input/input-config.json`](assets/example/src/input/input-config.json) | 映射配置示例(含双端与 look) |
275
- | [`assets/example/src/ui/touch-controls.css`](assets/example/src/ui/touch-controls.css) | 控件样式与三层 DOM 结构约定 |
276
- | [`references/input-config.md`](references/input-config.md) | 配置结构、键位名、尺寸与布局约束、品类建议 |
277
- | [`references/verification.md`](references/verification.md) | 移动端验收清单、症状 → 根因、反模式 |
@@ -1,50 +0,0 @@
1
- {
2
- "axes": {
3
- "move": {
4
- "pc": {
5
- "horizontal": { "negative": ["KeyA", "ArrowLeft"], "positive": ["KeyD", "ArrowRight"] },
6
- "vertical": { "negative": ["KeyW", "ArrowUp"], "positive": ["KeyS", "ArrowDown"] }
7
- },
8
- "mobile": { "type": "joystick", "radius": 72, "deadZone": 0.12 }
9
- }
10
- },
11
- "actions": {
12
- "jump": {
13
- "pc": ["Space"],
14
- "mobile": { "type": "button", "label": "跳", "x": -230, "y": -230, "radius": 60 }
15
- },
16
- "attack": {
17
- "pc": ["KeyJ", "Mouse0"],
18
- "mobile": {
19
- "type": "button",
20
- "label": "攻击",
21
- "x": -110,
22
- "y": -150,
23
- "radius": 70,
24
- "drag": { "look": "look", "sensitivity": 0.6 }
25
- }
26
- },
27
- "aim": {
28
- "pc": ["Mouse2"],
29
- "mode": "toggle",
30
- "mobile": { "type": "button", "label": "瞄准", "x": -110, "y": -320, "radius": 56 }
31
- },
32
- "interact": {
33
- "pc": ["KeyE"],
34
- "mobile": {
35
- "type": "button",
36
- "label": "交互",
37
- "x": -250,
38
- "y": -100,
39
- "radius": 56,
40
- "hidden": true
41
- }
42
- }
43
- },
44
- "looks": {
45
- "look": {
46
- "pc": { "requireButton": null, "sensitivity": 1 },
47
- "mobile": { "sensitivity": 1, "deadZonePx": 2 }
48
- }
49
- }
50
- }