@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,141 +0,0 @@
1
- # slots.preview.js 打包契约与编辑器执行机制
2
-
3
- ## 目的
4
-
5
- 编辑器渲染 items 格式槽位物件时,执行项目自己的造型代码(bundle),使编辑器画面与游戏画面在**构造级**一致:多面体(Icosahedron / Polyhedron)、低分段柱体(六棱柱)、每实例 params 差异(8 棵树 trunkH 各不同)都原样呈现。
6
-
7
- **编辑器渲染只走 builder(bundle)**:bundle 未命中(未交付 / 加载失败 / 槽位缺失)时该槽位直接占位盒显式暴露,**没有字面量渲染路径**。编辑器运行时不解析 slots.ts 本体,只执行 bundle。
8
-
9
- ## bundle 形态
10
-
11
- - 自包含 CJS 文件,固定名 `slots.preview.js`,放项目根。
12
- - 由转换期一次性打包(SKILL.md 第 12.5 步):
13
- `esbuild slots_preview_entry.ts --bundle --format=cjs --platform=browser --external:three --outfile=slots.preview.js`
14
- - 顶层调用编辑器注入的 `registerSlotBuilders(defs)`,`defs` 形状:
15
-
16
- ```ts
17
- {
18
- [slot: string]: {
19
- label?: string;
20
- build: (params?: Record<string, unknown>) => Object3D;
21
- defaultParams?: Record<string, number | string | boolean>;
22
- tag?: string;
23
- solid?: boolean;
24
- }
25
- }
26
- ```
27
-
28
- - **逐字段透传三个可选字段**:`defaultParams` / `tag` / `solid` 是编辑器拖入新实例时抄给 item 的**唯一来源**。入口用 `toBuilder()` 逐字段透传(见下);漏传时三查全过、零报错。
29
- - `--external:three`:bundle 不内联 three;`three` 由编辑器执行时经 require shim 供给,保证两端类构造器同源。
30
- - build 根原点 = 槽位原点,不设世界位置;世界摆位(pos/rot/scale)由编辑器按 item 施加。
31
- - build 内部自行合并默认值(如 `buildTreeFromParams` 内 `{ ...TREE_DEFAULTS, ...params }`),bundle 不需要单独传 defaults;编辑器直接把 `item.params` 透传给 build。
32
-
33
- ## 入口模板
34
-
35
- ### 单场景项目
36
-
37
- 任何导出 `slots: Record<string, SlotDef>` 的项目直接复用(`<项目目录>` 换成实际路径):
38
-
39
- ```ts
40
- import { slots, type SlotDef } from './src/scenes/<项目目录>/slots';
41
-
42
- type BuilderDef = {
43
- label: string;
44
- build: (params?: Record<string, unknown>) => unknown;
45
- defaultParams?: Record<string, unknown>;
46
- tag?: string;
47
- solid?: boolean;
48
- };
49
-
50
- /** 逐字段透传——尤其 defaultParams / tag / solid:只传 label+build 时编辑器拖入的新实例三样全空。 */
51
- function toBuilder(def: SlotDef): BuilderDef {
52
- const b: BuilderDef = { label: def.label, build: def.build as BuilderDef['build'] };
53
- if (def.defaultParams !== undefined) b.defaultParams = def.defaultParams;
54
- if (def.tag !== undefined) b.tag = def.tag;
55
- if (def.solid !== undefined) b.solid = def.solid;
56
- return b;
57
- }
58
-
59
- const builders: Record<string, BuilderDef> = {};
60
- for (const [name, def] of Object.entries(slots)) {
61
- builders[name] = toBuilder(def);
62
- }
63
- declare function registerSlotBuilders(defs: unknown): void;
64
- registerSlotBuilders(builders);
65
- ```
66
-
67
- ### 多关卡项目
68
-
69
- 全项目仍**只有一份** `slots.preview.js`(编辑器扫描所有 `slots.preview.js` 并注册进同一个全局键空间,多份 bundle 的同名键会互相覆盖)。
70
-
71
- 先把并集落成 `src/scenes/allSlots.ts`——**各关 `mount.ts` 与 bundle 入口都用它**,两端同源、不可能分叉(SKILL.md 第 2 步):
72
-
73
- ```ts
74
- // src/scenes/allSlots.ts
75
- import type { SlotDef } from './city/slots';
76
- import { slots as citySlots } from './city/slots';
77
- import { slots as desertSlots } from './desert/slots';
78
-
79
- const GROUPS: Array<[string, Record<string, SlotDef>]> = [
80
- ['city', citySlots],
81
- ['desert', desertSlots],
82
- ];
83
-
84
- export const ALL_SLOTS: Record<string, SlotDef> = {};
85
- for (const [group, table] of GROUPS) {
86
- for (const [name, def] of Object.entries(table)) {
87
- const existing = ALL_SLOTS[name];
88
- if (existing) {
89
- // 「同一定义」= build / defaultParams / tag / solid 四项全等(走公共槽位模块的同一对象天然满足)。
90
- // 只比 build 会漏掉「同一造型、各关给了不同 tag/solid」这种情形——静默保留先到者会让后到者的语义无声丢失。
91
- // defaultParams 用 JSON.stringify 比对,键序不同会判为「不同定义」而 throw——宁可当场炸,也不要静默丢语义。
92
- const same = existing.build === def.build
93
- && JSON.stringify(existing.defaultParams) === JSON.stringify(def.defaultParams)
94
- && existing.tag === def.tag
95
- && existing.solid === def.solid;
96
- if (!same) throw new Error(`槽位名冲突(定义不同): ${name}(来自 ${group})`);
97
- continue;
98
- }
99
- ALL_SLOTS[name] = def;
100
- }
101
- }
102
- ```
103
-
104
- bundle 入口只用这份并集,逐字段透传(`toBuilder` 见上「单场景项目」):
105
-
106
- ```ts
107
- import { ALL_SLOTS } from './src/scenes/allSlots';
108
-
109
- const builders: Record<string, BuilderDef> = {};
110
- for (const [name, def] of Object.entries(ALL_SLOTS)) {
111
- builders[name] = toBuilder(def);
112
- }
113
- declare function registerSlotBuilders(defs: unknown): void;
114
- registerSlotBuilders(builders);
115
- ```
116
-
117
- `check` 的三查①按「全项目 slots.ts 键并集 == bundle 注册键集合」对账;跨关重名只针对**各关自己定义**的键判,公共模块并入的键天然唯一。
118
-
119
- ## 编辑器执行机制
120
-
121
- 编辑器侧 `SlotBuilderRegistry.loadSource`:
122
-
123
- ```js
124
- const requireShim = (name) => name === 'three' ? THREE : raise();
125
- const fn = new Function('require', 'module', 'exports', 'registerSlotBuilders', source);
126
- fn(requireShim, { exports: {} }, {}, registerSlotBuilders);
127
- ```
128
-
129
- - require shim 只认 `three`,映射到编辑器自己的 THREE 实例;其他模块一律抛错。造型函数必须保持纯 three。
130
- - bundle 加载失败(语法错、依赖缺失)时 console.warn 后继续,该槽位占位盒显式暴露——**没有字面量回退**,也不做 hash 校验、资源护栏。
131
- - `slots.preview.js` 在编辑器项目扫描中被显式排除出程序化脚本(不会走 `registerProceduralAsset` 通道)。
132
-
133
- ## 验收三查(node 直跑,与编辑器 loadSource 同构;SKILL.md 第 12.5 步由 `check` 调用)
134
-
135
- 1. **槽位覆盖**:`registerSlotBuilders` 收到的键集合 == slots.ts 导出的槽位键集合。
136
- 2. **逐槽位 build**:默认参数下无异常,mesh 数与形状计数自查结果一致。整块收编槽位(merge/参数化地形)按「构造语句出现次数」文本级对账 + 输出 mesh 数按 merge 产物计(见 [slots-rules.md](slots-rules.md) 计数口径)。
137
- 3. **per-item params 直通**:带 params 的槽位喂两组不同参数,产出几何必须有差异(推荐比较包围盒尺寸而非顶点数——顶点数由分段数决定,不随尺寸变)。参数化地形槽位照此办理(改振幅/频率 → 包围盒变化)。
138
-
139
- ## 交付
140
-
141
- `slots.preview.js` 必须出现在交接说明的「要一起传的文件清单」里,随项目文件一起交付。bundle 是转换期产物,交付后由平台打包策略统一处理,转换流程不附加额外的重打包要求。**改了造型代码必须重打 bundle**,否则编辑器继续渲染旧几何或占位盒。
@@ -1,92 +0,0 @@
1
- # 编辑器侧 items 格式支持(机制与排查要点)
2
-
3
- 平台编辑器已内置 items 格式与槽位 builder 支持;改造项目只有在编辑器满足本文件的**环境与全量灯光消费契约**时才无需改动编辑器。此文档说明其机制与排查要点,供理解格式约定、排查编辑器行为时参考。
4
-
5
- 编辑器架构上格式知识主要收敛在 `SceneLoader`(读)与 `SceneSerializer`(写),中间层通过 `Object3D.userData` 通信;但 `SceneData.env` 的实际渲染还必须由 `Viewport` 消费,不能把环境字段只解析不渲染。
6
-
7
- ## 格式支持涉及的核心模块
8
-
9
- | 模块 | 作用 |
10
- |---|---|
11
- | `core/sceneSource.ts` | `parseSceneSource` / `serializeSceneSource` / `isItemsSceneSource` |
12
- | `core/SlotBuilders.ts` | `SlotBuilderRegistry`,执行 slots.preview.js bundle 注册槽位构建器(见 [bundle-contract.md](bundle-contract.md)) |
13
- | `host/parseProject.ts` | 第三参收 `slotBuilders`:按 `slots.preview.js` 收集执行,并把它排除出程序化脚本 |
14
- | `core/SceneLoader.ts` | 槽位渲染只走 builder,未命中即占位盒(没有字面量渲染路径);`createSlotInstance` 同 |
15
- | `core/SlotThumbnails.ts` / `ui/AssetBrowser.ts` | 槽位缩略图与槽位卡片均只从 builders 生成 |
16
- | `scripts/normalize-scene.mjs` | 规范化 scene.ts,`--check` 为门禁模式 |
17
- | `scripts/test-items-roundtrip.mjs` | 往返测试 |
18
- | `scripts/e2e-items.mjs` | 端到端联调 |
19
- | `scripts/verify-layout-parity.mjs` | 改造前后坐标一致性比对(需按项目改 OLD 常量段) |
20
-
21
- ## 环境消费契约
22
-
23
- `SceneLoader` 与 `Viewport` 必须把 `SceneData.env` 变成编辑器实际渲染状态,不能只解析不渲染:
24
-
25
- 1. `background`、`fog`、`exposure` 必须逐字段消费。
26
- 2. `sky.kind === 'flat'` 用 `env.background` 作背景,不创建额外天空对象。`sky.kind === 'gradient'` 必须消费 `stops` 中全部色标并按 `at` 插值渲染,不能截断为固定三段;不得以默认大气 Sky、白背景或私有天空贴图替代。仅兼容读取既有 `top/middle/bottom` 三段数据,并需无损映射为 `stops`。
27
- 3. `env.lights` 必须逐条创建灯对象;directional 的方向为 `target - pos`(target 缺省原点),并消费 `castShadow`。不得只保留首盏灯而丢弃其余条目。
28
- 4. items 场景不允许未声明的 AmbientLight、HemisphereLight、DirectionalLight、RoomEnvironment / IBL 参与渲染;`runtimeControlled` 只限制编辑,不得跳过启动时的背景、雾、曝光或灯光渲染。
29
- 5. `env.lights` 只渲染不编辑:退出保存时 `env` 段原样回写、逐字段保真,没有滑杆/拾取/gizmo 入口。要调光照改 `scene.ts` 的 `env`。(「环境光照」面板是 craft(UE JSON)场景专属分组,items 场景不渲染。)
30
- 6. 碰撞开关只读写 `item.solid`:打开不写字段(缺省 true),关闭写 `solid: false`;序列化遵循「缺省值省略」。
31
- 7. 环境合同验证必须断言编辑器实际背景、雾、曝光、天空类型与逐灯参数同 `scene.ts` 一一对应。
32
-
33
- ## 解析策略
34
-
35
- **不需要 TS 编译器。**因为 `scene.ts` 形态被约定限死(只有一条 import type、只有一条 export const、值全是纯字面量),解析只要三步:
36
-
37
- 1. 正则定位 `export const scene: SceneData =` 之后
38
- 2. 用括号配对截出字面量文本(跳过字符串与注释)
39
- 3. `new Function('return (' + literal + ')')()` 求值
40
-
41
- 失败直接抛错拒绝打开,不做猜测性修复——失败通常意味着有人手写了表达式,该修文件而不是修解析器。
42
-
43
- **括号配对要分同类**:截 `[...]` 时只对 `[` / `]` 计数,否则数组元素里的花括号(如 `params: { ... }`)会让深度提前归零。
44
-
45
- ## 序列化出口
46
-
47
- 编辑器退出保存按格式分流:
48
-
49
- - `items` → `serializeSceneSource(data, importPath)`,输出 TS 源码,路径后缀 `.ts`
50
- - 其余 → `JSON.stringify(data, null, 2)`,后缀 `.json`
51
-
52
- `importPath` 由场景文件路径推 `sceneTypes` 的相对位置:约定 `sceneTypes.ts` 在 `src/scenes/` 下、`scene.ts` 在 `src/scenes/<name>/` 下,所以默认上跳一级。
53
-
54
- ## 保存语义(指导用户时必讲)
55
-
56
- 编辑器工具栏**没有单独的「保存」按钮**,只有一个「**退出编辑**」:点它时若有未保存改动,由壳弹「保存 / 放弃更改」,选**保存**才把当前场景 postMessage 给宿主、由宿主写回 `scene.ts`(独立运行、无壳确认时点退出直接存草稿)。指导用户一律说「退出编辑并保存」,**不要说「点保存」**——界面上没有这个按钮。
57
-
58
- **退出保存时提交的是场景文件 + 资产清单两项**:`scene.ts`(多关卡时各关一份)之外,本次场景的 `/Game/...` 引用还会写进 `configs/scene_assets.json`(见 SKILL.md 第 8 步 ⑥ 环)。清单无新增条目时不提交,「只改了一个物件」的提交里看不到它属正常。
59
-
60
- ## 宿主侧接入要点(供理解,平台已实现)
61
-
62
- 编辑器是 iframe 本体,接进宿主应用需要:
63
-
64
- 1. **消息桥**:收 `runtime-init` → 回 `preview config`(带 codeFiles);收 `scene-save` → 暂存
65
- 2. **来源校验**:`ev.source === iframe.contentWindow`,否则任何页面脚本都能伪造 `scene-save` 触发提交
66
- 3. **等源码就绪才下发**:编辑器可能在源码请求返回前就发 `runtime-init`,此时 codeFiles 为空,编辑器会认为项目是空的。必须两个条件都满足才 postMessage,谁后到谁触发
67
- 4. **提交前确认**:回传只暂存,用户确认后才落盘;提交前重新核对项目 id 与版本 id 未漂移
68
-
69
- 后端需两个接口,缺了编辑器打开必然失败:
70
-
71
- | 接口 | 要点 |
72
- |---|---|
73
- | `GET .../:versionId/code-files` | 优先读版本快照,无快照回退当前工作区并标注 `from_snapshot: false`;文本扩展名白名单、跳过 `node_modules`/`dist`、单文件上限 |
74
- | `POST` 提交 | 只接受增量(`files_partial`);路径解析拒绝目录穿越;全量替换会清掉 agent 生成的其他文件,应直接拒绝 |
75
-
76
- ## 端口冲突排查
77
-
78
- 本机若同时跑着多个 vite 应用,编辑器(`host: true` 绑通配地址)的端口可能被抢走路由——浏览器打开的是**别人的应用**,保存会静默写错地方。规避:起服务用冷门端口加 `--strictPort`,并用 JSON 探针确认打开的是自己的实例:`GET /__outer/files` 返回 **JSON 文件列表**才是编辑器(返回 HTML 就是撞了别的应用)。
79
-
80
- ## 宿主工程最少文件集
81
-
82
- 编辑器打开一个工程,宿主目录至少要有:
83
-
84
- ```
85
- projectDisplayInfo.json 含 name / scene / coordSpace
86
- src/scenes/sceneTypes.ts
87
- src/scenes/<name>/scene.ts
88
- src/scenes/<name>/slots.ts
89
- slots.preview.js 转换期打包的槽位构建器 bundle(见 [bundle-contract.md](bundle-contract.md))
90
- ```
91
-
92
- `projectDisplayInfo.json` 的 `scene` 字段显式指向 scene.ts 最省事,否则靠编辑器自动探测。`slots.preview.js` 不在时编辑器照常打开,但对应槽位只显示占位盒(形态完全缺失),场景加载时有 console.warn,排查时先确认这个文件在不在。
@@ -1,125 +0,0 @@
1
- # SceneData 格式
2
-
3
- 摆位与环境的唯一事实源。纯 TS 字面量,不含函数调用、变量引用、表达式、条件分支——这是编辑器能安全解析与整份重写的前提。
4
-
5
- ## 文件布局
6
-
7
- ```
8
- src/scenes/
9
- sceneTypes.ts 类型定义,全项目共用一份
10
- scenes.ts 场景索引(多场景时才需要)
11
- <mainScene>/
12
- scene.ts 场景数据 —— 编辑器读写的唯一目标
13
- slots.ts 槽位注册表 —— 一个项目一份,其他场景 import
14
- mount.ts 装配 + 查询接口
15
- index.ts 场景入口,调 mount,接玩法
16
- shapes/ 或既有造型文件 只管造型,不设世界坐标
17
- ```
18
-
19
- ## 类型定义
20
-
21
- ```ts
22
- // 单位:米,Y 轴向上,与 three 世界坐标一致
23
-
24
- export interface SceneItem {
25
- /** 稳定唯一标识,生成后不再变更 */
26
- id: string;
27
- source:
28
- | { kind: 'slot'; slot: string } // 项目内程序化造型
29
- | { kind: 'glb'; url: string; lod?: 0 | 1 | 2 }; // 云端资产库 GLB。lod 是该模型的档位,0 与缺省省略
30
- pos: [number, number, number];
31
- /** 欧拉角,单位度,顺序 XYZ */
32
- rot: [number, number, number];
33
- scale: [number, number, number];
34
- /** 显示名,不参与逻辑 */
35
- label?: string;
36
- params?: Record<string, number | string | boolean>;
37
- /** 玩法语义标记,玩法按它查坐标 */
38
- tag?: string;
39
- /** 玩家撞上去是否该被挡住。落字段判据见 SKILL.md 第 6 步,消费见第 7 步 */
40
- solid?: boolean;
41
- }
42
-
43
- export type SceneLight =
44
- | { kind: 'directional'; name: string; color: string; intensity: number;
45
- pos: [number, number, number]; target?: [number, number, number];
46
- castShadow?: boolean }
47
- | { kind: 'hemisphere'; name: string; skyColor: string; groundColor: string;
48
- intensity: number }
49
- | { kind: 'point'; name: string; color: string; intensity: number;
50
- pos: [number, number, number]; distance?: number };
51
-
52
- export interface SceneEnv {
53
- background: string;
54
- fog: { color: string; near: number; far: number } | null;
55
- /**
56
- * 只描述背景视觉,不隐含 scene.environment / PMREM / IBL 或额外光源。
57
- * gradient 用 stops 描述任意数量色标:at 位于 [0, 1]、严格递增、首尾必须为 0 与 1、至少 2 项。
58
- * 旧 top/middle/bottom 仅兼容读取旧交付物(无损映射为 at = 0 / 0.5 / 1),新转换一律写 stops。
59
- */
60
- sky:
61
- | { kind: 'flat' }
62
- | { kind: 'gradient'; stops: Array<{ at: number; color: string }> }
63
- | { kind: 'gradient'; top: string; middle: string; bottom: string };
64
- lights: SceneLight[];
65
- exposure?: number;
66
- /** true 表示运行时有系统每帧改光照(昼夜循环);与能否编辑无关 */
67
- runtimeControlled?: boolean;
68
- }
69
-
70
- export interface SceneSpace {
71
- /** 地表尺寸 [宽, 深] */
72
- ground: [number, number];
73
- /** 玩法活动边界,供编辑器画参考圈 */
74
- bounds?: number;
75
- }
76
-
77
- export interface SceneData {
78
- version: 1;
79
- name: string;
80
- space: SceneSpace;
81
- env: SceneEnv;
82
- items: SceneItem[];
83
- }
84
- ```
85
-
86
- ## id 规则
87
-
88
- - 格式 `<语义前缀>_<序号>`,如 `table_1`、`stove_1`
89
- - 全场景唯一,生成后不再变更
90
- - 编辑器新增用 `<槽位名>_<时间戳后缀>`
91
- - 删除不回收 id,避免复用导致玩法引用错位
92
- - 改 `label` 不影响 `id`
93
-
94
- ## tag:玩法与摆位的唯一接口
95
-
96
- 玩法不自存坐标,改按 tag 查:
97
-
98
- ```ts
99
- export function itemsByTag(data: SceneData, tag: string): SceneItem[];
100
- export function itemById(data: SceneData, id: string): SceneItem | undefined;
101
- ```
102
-
103
- **相对偏移留在玩法侧**。例如入座点是「桌子靠前 0.55 米」,那 `-0.55` 属于玩法规则,只把基准坐标换成查询:
104
-
105
- ```ts
106
- // 改造前
107
- const seat = { x: TABLE_CANDIDATES[i].x, z: TABLE_CANDIDATES[i].z - 0.55 };
108
- // 改造后
109
- const tables = itemsByTag(scene, 'table');
110
- const seat = { x: tables[i].pos[0], z: tables[i].pos[2] + SEAT_OFFSET_Z };
111
- ```
112
-
113
- **顺序依赖注意**:`itemsByTag` 返回顺序 = `items` 数组顺序,编辑器增删会改变它。需要固定对应关系时用 `itemById`。
114
-
115
- ## 序列化格式约定
116
-
117
- 编辑器整份重写时的固定规则,保证同一份数据两次生成逐字节相同:
118
-
119
- - 数字保留 3 位小数,去尾零与负零
120
- - 字符串单引号
121
- - 三元数组紧凑成一行
122
- - 对象逐字段换行,缩进 2 空格
123
- - 缺省值省略(`solid: true` 不写、`params` 空则不写)
124
-
125
- **代价**:手写的注释与表达式在保存后会丢失。需要联动的尺寸放 `space` 段。
@@ -1,113 +0,0 @@
1
- # slots.ts 与槽位造型规则
2
-
3
- ## slots.ts 结构
4
-
5
- ```ts
6
- export interface SlotDef {
7
- label: string;
8
- build(params?: Record<string, unknown>): Object3D;
9
- /** 尺寸参数默认值:编辑器拖入新实例时带过去(键名与 build 内 num(params, key, ...) 对应) */
10
- defaultParams?: Record<string, number | string | boolean>;
11
- /** 玩法语义标记:编辑器拖入时抄写给 item.tag */
12
- tag?: string;
13
- /** 该槽位件不挡人时写 false:编辑器拖入时抄写给 item.solid */
14
- solid?: boolean;
15
- }
16
-
17
- /** defaultParams 必须是模块级常量——写成内联对象字面量会被 scene-editor.mjs 的槽位正则误判成槽位键 */
18
- const TABLE_DEFAULTS = { w: 1.2, h: 0.75 };
19
-
20
- export const slots: Record<string, SlotDef> = {
21
- 'dining-table': {
22
- label: '餐桌',
23
- build: (params) => buildTable({ ...TABLE_DEFAULTS, ...params }).group,
24
- defaultParams: TABLE_DEFAULTS,
25
- tag: 'table',
26
- },
27
- };
28
- ```
29
-
30
- **三个可选字段的用途与判据**(编辑器拖入新实例时**只有这条通道**能把默认尺寸 / 玩法语义 / 碰撞事实带过去;工程只发布 `{ label, build }` 时三样全空):
31
-
32
- | 字段 | 什么时候必须写 | 不写的后果 |
33
- |---|---|---|
34
- | `defaultParams` | build 内有 `num(params, key, 默认值)` 这类可调尺寸 | 拖入件用 build 内部兜底值,与设计尺寸不一致 |
35
- | `tag` | 玩法要按 tag 查这个槽位件(SKILL.md 第 9 步 `itemsByTag`) | 拖入件 tag 为空,玩法查不到 |
36
- | `solid` | 该槽位件**不挡人**(水面、伤害区、贴花、纯视觉件) | 拖入件走缺省 true,被当成实体挡人 |
37
-
38
- `defaultParams` **必须写成模块级常量再引用**(如上例),不要在 `slots` 字面量里内联 `{ w: 1.2 }`——`scene-editor.mjs check` 用「缩进 ≤6 的 `name: {`」正则收集槽位键,内联字面量会被误判成一个槽位键,三查①当场报「缺槽位」。
39
-
40
- **不写 preview。** 编辑器渲染槽位只有一条路:执行转换期打包的 `slots.preview.js`(见 [bundle-contract.md](bundle-contract.md)),直接跑 `build()` 造型代码;bundle 未命中(未交付 / 加载失败)时该槽位占位盒显式暴露。`SlotDef` 没有 preview 字段,编辑器运行时不解析 slots.ts 本体;存量产物里残留的 preview 字段无害(只是多余数据),新转换不写。
41
-
42
- ## build 几何语句逐字保留
43
-
44
- 第 4 步抽取造型函数时,几何构造语句(`new THREE.BoxGeometry(...)`、顶点数组、材质参数)**逐字照抄源码,禁止重写、禁止降级**。这是构造级一致的根本保证——编辑器与游戏执行同一份代码,改写即分叉。
45
-
46
- **「逐字」包括材质参数与阴影标志**:`MeshStandardMaterial` 的 `roughness` / `metalness` / `flatShading` / `vertexColors` / `transparent` / `opacity`,以及 `castShadow` / `receiveShadow`,**一个都不能省**。图元形状、数量、位置全对但材质走 helper 缺省时,**tsc / vite build / 形状计数三样全都不报**。做法:给材质**逐个显式传参**(如 `{ roughness: 0.95, metalness: 0 }`),不依赖 helper 的缺省值。核对方式:提取两侧全部 `new THREE.XxxGeometry(...)` 与材质参数做多重集比对。
47
-
48
- ## 造型契约(build 必须满足)
49
-
50
- 1. 返回单一根节点,所有子件挂在它下面
51
- 2. 根节点局部原点 = 物件接地中心(底面中心在 y=0)
52
- 3. **根节点自身保持恒等变换**:`position` / `rotation` 为零、`scale` 为一。变换写进子节点(`const g = new THREE.Group(); mesh.position.y = size / 2; g.add(mesh); return g;`)或几何体本身(`geometry.translate(0, size / 2, 0)`、`geometry.rotateX(-Math.PI / 2)`)。姿态类图元是第二类的高发区——`PlaneGeometry` 默认立在 XY 平面、`ExtrudeGeometry` / `Shape` 挤出体默认沿 +Z 挤出、`Sprite` 恒面向相机——源码里用 `mesh.rotation.x = -Math.PI / 2` 摆平的,搬进 build 一律改写成 `mesh.geometry.rotateX(-Math.PI / 2)`。姿态搬进几何不违反上文「几何语句逐字保留」——那条管的是几何构造与材质参数(见 SKILL.md 第 4 步)
53
- 4. 构造时**不加进 scene**——造型函数只返回对象,装配由调用方做(世界摆位见第 3 条)
54
- 5. 同样参数每次构造结果一致——内部禁止 `Math.random`/运行时输入;**固定种子噪声合法**(整块收编槽位的噪声地形,种子经 params 暴露或烘焙字面量,见 SKILL.md 第 6 步)
55
-
56
- 第 2 条是贴地、旋转、缩放围绕正确点进行的前提,也是 `topY`、`stationWorldY = pos.y + 0.9` 这类隐式高度契约的正解。
57
-
58
- 第 3 条来自两端装配方式的差异:编辑器在造型外套一层 container 承载 item 的 `pos/rot/scale`、build 结果作子节点,造型自带的 transform 因此被保留;游戏侧直挂 build 返回值时会覆盖它。根节点恒等后两种装配结果一致。分量表现:`position` 被覆盖表现为下沉或水平偏移,`rotation` 被覆盖表现为姿态丢失(躺平的地面立起 90°),`scale` 被覆盖表现为缩回默认大小。见 SKILL.md 第 7 步。
59
-
60
- ## 源码图元归类表(形状计数用)
61
-
62
- 形状计数自查的归类依据。逐条数源码造型代码里的图元出现次数,再与 bundle `build()` 输出的 mesh 形状分布核对(三查②,见 SKILL.md 第 12.5 步):
63
-
64
- | 源码几何 | 归类 | 备注 |
65
- |---|---|---|
66
- | `BoxGeometry` | box | 直译 |
67
- | `SphereGeometry` | sphere | — |
68
- | `CylinderGeometry(rTop, h, rBottom)` | cylinder | 顶/底半径差异 = 截锥(树干、屋檐) |
69
- | `ConeGeometry` / 四棱锥(含 `radialSegments: 4` 的锥体屋顶) | cone | 四棱锥就是 radialSegments=4 的锥,**不是 box** |
70
- | `ExtrudeGeometry` / `Shape` + 挤出 | prism | 多边形截面实心柱体 |
71
- | 自定义 BufferGeometry / 手工顶点 | 按轮廓特征归类 | 锥形轮廓→cone、柱形→cylinder、盒形→box、球冠→sphere、多边形截面挤出体→prism。判据 = 包围盒比例 + 可见轮廓 + 截面形状,**非盒状轮廓禁止归为 box**(低多边形项目的屋顶/树冠/岛体常是自定义几何四棱锥) |
72
-
73
- 归类只影响计数核对,不影响渲染——渲染走真实 build 代码,不存在图元词表限制。
74
-
75
- ## 形状计数自查(机械校验,转换期必做)
76
-
77
- 数源码造型代码里每个图元的出现次数,与 bundle `build()` 默认参数输出的 mesh 形状分布逐一对应:
78
-
79
- - `ConeGeometry` 出现 N 次 → build 输出必须恰有 N 个锥形 mesh
80
- - `CylinderGeometry` 出现 N 次 → 恰有 N 个柱形 mesh
81
- - `SphereGeometry` 出现 N 次 → 恰有 N 个球形 mesh
82
- - `BoxGeometry` 出现 N 次 → 恰有 N 个盒形 mesh
83
- - `ExtrudeGeometry` / `Shape` + 挤出出现 N 次 → 恰有 N 个棱柱类 mesh
84
- - 自定义几何每块 → 按归类结果计入对应计数
85
-
86
- 这是纯静态检查(源码文本 + node 直跑 build 数 mesh),不需要跑编辑器。**mesh 总数一致但形状分布对不上 = 造型被降级改写**,回查「build 几何语句逐字保留」并返工。per-item 差异核对用包围盒尺寸而非顶点数——顶点数由分段数决定,不随尺寸变。
87
-
88
- **整块收编槽位的计数口径**(merge 块 / 参数化地形,见 SKILL.md 第 6 步):按「图元构造语句出现次数」做文本级对账——源码 68 个 `ConeGeometry` 构造语句 ↔ build 内 68 个同语句(逐字保留必然一致);merge 后输出单个 BufferGeometry,build 输出 mesh 数按 merge 产物计 1,写进交接说明。逐字 diff 是这类槽位的主判据。
89
-
90
- ## 主特征件
91
-
92
- 第 2 步盘点画面时列出的项目标识性大件(如屋顶、树冠、岛体、招牌)——删掉它用户就认不出这是这个项目。主特征件的 build 造型**必须与源码轮廓一致,禁用任何近似改写**,零件也不可省(逐字保留条款对它零豁免)。清单写进交接说明,逐件核对。
93
-
94
- ## 玩法要用的子节点要命名
95
-
96
- 装配后玩法需要取运行时句柄(餐盘锚点、灶火、门扇),在造型函数里给它们 `name`:
97
-
98
- ```ts
99
- const anchor = new THREE.Object3D();
100
- anchor.name = 'plateAnchor';
101
-
102
- const flame = new THREE.Mesh(...);
103
- flame.name = 'stoveFlame';
104
-
105
- const pivot = new THREE.Group();
106
- pivot.name = 'doorLeaf';
107
- ```
108
-
109
- 装配后用 `getObjectByName` 取,比按子节点顺序或类型猜稳:
110
-
111
- ```ts
112
- this.doorLeaf = mounted.nodes.get('door')?.getObjectByName('doorLeaf') ?? null;
113
- ```