20 Commits
Author SHA1 Message Date
joywayer 35216f75e7 feat: integrate room framework and isolated subgame bundles
Complete room UI and protocol integration, move game definitions and resources behind bundle entries, publish authoritative version XML, and document single-game builds. Include all current resource changes and experiment artifacts.
2026-09-09 03:13:18 +08:00
joywayer a7ec8aa6a7 feat: integrate erqiwang rooms and use spec-compliant Web compilation 2026-09-07 22:36:24 +08:00
joywayer 0aa66e1ec7 界面迁移更新 2026-09-05 00:12:11 +08:00
joywayerandClaude Opus 5 65c627e2de docs(scripts): spirit-semantics type=5 uncertainty note
PoC 2 实证: Login_Layer.prefab Spirit465 (type=5 _type=1 SLICED)
引用的 SpriteFrame 8e3905be-...@f9941 实际 capInsets=[0,0,0,0] (非 9-slice).
Fix path: 扩展 resolveSpriteFrameUuid 返回 capInsets, emitPrefabJson
根据 capInsets 决定 _type (all zero → 0/SIMPLE, otherwise → 1/SLICED).
当前按 type 硬编码 _type=1 与 YouleNexus 手工 prefab 1:1 一致
(手工 prefab 也有同样 bug), 运行时 SpriteFrame 实际非 SLICED.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 18:09:31 +08:00
joywayerandClaude Opus 5 d0b2265716 docs(scripts): spirit-semantics type=4 uncertainty note (Pay_Layer 11 type-4 可能 Button; 待 PoC 2 验证)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 17:51:45 +08:00
joywayer cb3bd54175 fix(scripts): final review Critical+Important fixes (Widget alignment, full readLayerXml, Label _string, atlas selection, hard-coded paths, exit code, dead code removal) 2026-09-02 09:11:51 +08:00
joywayer 601de1f903 fix(tests): PoC 3 bypass CLI to verify _lpos (sprite atlas import out of scope) 2026-09-02 08:42:39 +08:00
joywayer 36e593ecef test(scripts): PoC 阶段 3 - Login_Layer 端到端 _lpos 测试
参考 brief task-11-brief.md, 验证 Layer00002.xml → Login_Layer.prefab 在
渠道logo (Spirit405) + 游客登录 (Spirit177) 两个 anchor 节点 _lpos 误差 < 0.001.

测试目前因 ImgResID 427 (00427.png) 缺失 sprite 而 FAIL — 该 throw 属
'下游不兜底' 规则预期行为 (brief 已说明 ImgResID 107 也可能 throw). 详见
task-11-report.md.
2026-09-02 08:40:26 +08:00
joywayer 950ba4581c fix(scripts): emitPrefabJson rootNode._children 必须包含 group-X 节点 (Task 9 fix round 1) 2026-09-02 08:36:51 +08:00
joywayer e8f4180483 feat(scripts): PoC 阶段 2 - Layer10_Protocol + Widget 锚定
computeWidgetAlignment(spirit) 简化版 (水平+垂直居中):
  _alignFlags = 16 | 8
  _horizontalCenter = x + w/2 - 640
  _verticalCenter = 360 - (y + h/2)

emitPrefabJson 仅在 Spirit 父节点是 group (非 Layer 根) 时调用;
root / group-X envelope 沿用默认 _alignFlags=45 全屏铺满.

PoC 验证: Layer00010.xml Protol_Layer (group 37, 4 spirits)
生成 Protol_Layer.prefab — 6 Widget 节点 (1 root + 1 group-37 + 4 spirit),
4 spirit widget 全部 _alignFlags=24.
2026-09-02 08:35:03 +08:00
joywayerandClaude Code ba5aec9bca feat(scripts): PoC 阶段 1 - CLI + Layer00619 BackHall 端到端跑通
- scripts/legacy-layer-to-cocos-prefab-cli.mjs (CLI 入口: <inputXml> [<youlePrefab>] <outputDir>)
- framework-tests/legacy-layer-migration/poc-iconbutton.test.mjs (1 个 node:test 端到端校验 cc.Prefab 头 + group-55 父节点)
- YouleNexus/out/legacy-migration/BackHall_Layer.prefab (生成产物, 437 lines)
- YouleNexus/out/legacy-migration/BackHall_Layer.prefab.diff (vs YouleNexus Layer619_BackOtherGame.prefab, 1244 lines)

累计: 30/30 PASS (29 prior + 1 PoC). Layer00619 (1 Spirit, type=3 ProgressBar, group=55) 是最简 PoC, diff 大是预期 (脚本首个端到端输出 vs 手写 prefab 必然差异大).

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-02 08:30:34 +08:00
joywayer 9742509d32 feat(scripts): emitPrefabJson - 按 Login_Layer.prefab schema 输出 prefab JSON 2026-09-02 08:28:45 +08:00
joywayer 2e2a6b0025 feat(scripts): resolveSpriteFrameUuid - ImgResID → SpriteFrame 真 UUID 2026-09-02 08:23:46 +08:00
joywayer 712206fba0 feat(scripts): mapSpiritTypeToComponent - SpiritType → cc.* 组件映射(读 spirit-semantics.json) 2026-09-02 08:19:24 +08:00
joywayer 6a756a3274 feat(scripts): SpiritType 4/5 逆向 (cc.EditBox / cc.Sprite SLICED) + SizeCalcMode 公式 (Task 5)
gameabc.min.js 逆向结果固化到 fixtures/spirit-semantics.json:

SpiritType 4 = cc.EditBox
  逆向证据: phoneInfo Layer00029.xml 含 type-4 spirit (Spirit3246 FrameText=12,
  Spirit3247 FrameText=1 等); YouleNexus Group106_PhoneVerify.prefab (映射到
  Layer00029) 含 cc.EditBox 节点, 与 type-4 FrameText 输入框语义一致.
  独有属性: FrameText (默认/显示文本) + ImgResID (背景图) + CanClick=1.

SpiritType 5 = cc.Sprite (type=SLICED)
  逆向证据 1 (smoking gun): Layer00002.xml Spirit159 (370x170, 边缘 100/80/100/80)
    → YouleNexus Login_Layer.prefab 唯一 cc.Sprite._type=1 (SLICED), _contentSize
    严格等于 370x170. 1:1 同一个节点.
  逆向证据 2: Layer00609.xml '设置背景' (100/134/100/135) → YouleNexus
    Layer609_Setting.prefab cc.Sprite._type=1.
  独有属性: LeftEdge/TopEdge/RightEdge/BottomEdge (4 边缘宽度) = 9-slice scaling.

SizeCalcMode 0/2 公式 (55 Layer 全量解析: 仅观察到这两种值):
  0 = 直接读 Width/Height (Task 3 已实现).
  2 = parent_size (lookup by SizeParentID) * SizeRelaWidth/Height / 10000. 全部采样
    WidthCalcMode=1, SizeRelaWidth=10000 (即按 100% 比例继承父 spirit 尺寸).

测试 spirit-type-reverse.test.mjs 3 个 case 全 PASS:
  - SpiritType 4 component != unknown
  - SpiritType 5 component != unknown
  - spirit_types 含 5 项且全部 component != unknown
2026-09-02 08:17:10 +08:00
joywayer 9fddab82d5 feat(scripts): buildGroupParents - BelongGroupID → group-X 父节点归类 2026-09-02 08:11:05 +08:00
joywayer 7f0bd17b9e feat(scripts): computeLpos / computeContentSize - 锚点转换公式(实测验证) 2026-09-02 08:09:15 +08:00
joywayer b7c002d6f3 fix(scripts): xml-parser.test.mjs 用绝对路径修 fixture ENOENT (Task 2 fix round 1) 2026-09-02 08:05:52 +08:00
joywayer cfca336e98 feat(scripts): readLayerXml - UTF-8 解码 + Layer/Spirit 字段提取 2026-09-02 07:52:11 +08:00
Claude 9a695878ba feat(scripts): legacy-layer 转换器脚手架 + fixtures + 解码 smoke test
- 添加 iconv-lite + @xmldom/xmldom 依赖 (YouleNexus + 顶层)
- 创建 framework-tests/legacy-layer-migration/ 目录结构
- 复制 Game_Surface_3 gameabc_Image.json / Layer00002.xml / Login_Layer.prefab 作 fixtures
- spirit-semantics.json 骨架 (Task 5 完整化)
- _smoke-iconv.mjs 验证解码可读中文 Spirit 名

注意: 顶层 package.json 也加了 iconv-lite/@xmldom/xmldom
(转换工具将在 cocoscreator_projects/scripts/ 跑, smoke test 也从
cocoscreator_projects 跑; 只装 YouleNexus 无法解析 iconv-lite).
另: 实际 Layer00002.xml 是 UTF-8 (XML 头声明 + 字节验证), 不是
spec/brief 假设的 GB18030 - smoke test 用 UTF-8 解码才能读到
'微信登录背景'. 转换工具后续 Task 应支持自动检测 (XML 声明优先,
fallback GB18030).
2026-09-02 07:41:53 +08:00