Files
youle_cocos/cocoscreator_projects/framework-tests/legacy-layer-migration/fixtures/spirit-semantics.json
T
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

18 lines
731 B
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"spirit_types": {
"0": { "component": "cc.Sprite", "note": "普通精灵" },
"1": { "component": "cc.Label", "note": "文本" },
"3": { "component": "cc.ProgressBar", "note": "进度条" },
"4": { "component": "unknown", "note": "PoC 阶段 1 逆向 gameabc.min.js" },
"5": { "component": "unknown", "note": "PoC 阶段 1 逆向 gameabc.min.js" }
},
"coord_self_pos": {
"_note": "原 X, Y 是精灵左上角绝对屏幕坐标 (基于 1280x720);Cocos 用中心锚点",
"cocos_lpos_x": "original_X + original_W/2 - 640",
"cocos_lpos_y": "360 - (original_Y + original_H/2)"
},
"anchor_point": {
"cocos_default": { "x": 0.5, "y": 0.5 },
"original_default": "左上角 (0, 0)"
}
}