 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
|
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 |
|
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 |
|