docs(spec): playbook add multi-frame sprite migration rule (原 1 PNG 多帧 → Cocos N 张散图)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -180,6 +180,29 @@ mcp__funplay_cocos__validate_prefab_references
|
||||
|
||||
## 已知限制(2026-09-02 实测)
|
||||
|
||||
## 关键迁移规则:原工程多帧 sprite → Cocos 多张散图
|
||||
|
||||
**原工程** (gameabc 引擎): 一个 sprite PNG 含多个动画帧 (e.g. `00014.png` 含 12 frames)
|
||||
**Cocos 引擎**: 一个 sprite PNG → 一个 spriteFrame, 多帧 = 多张散图
|
||||
|
||||
**映射规则**:
|
||||
|
||||
| 原工程 | Cocos |
|
||||
|---|---|
|
||||
| `00014.png` (1 file, 12 frames) | `00014_01.png` ~ `00014_12.png` (12 files, 各含一个 spriteFrame rect) |
|
||||
| `frame_all` 字段 (gameabc_Image.json) | 子图数量 = frame_all |
|
||||
| SpriteFrame 引用单个 texture (atlas image) | SpriteFrame rect 指向 atlas image 的 sub-region |
|
||||
|
||||
**验证方法**:
|
||||
1. 读 `projects/Game_Surface_3/output/gameabc_Image.json` 找 id=ImgResID 的 entry,确认 bmp=00014.png + frame_all=12
|
||||
2. 在 YouleNexus assets/framework/ui/atlas-*/ 找 00014_01.png ~ 00014_12.png (12 个文件)
|
||||
3. 读对应 00014_01.png.meta 找 subMetas 里 name=spriteFrame 的 UUID + imageUuidOrDatabaseUri
|
||||
4. 在 Notice prefab 的 6 按钮 ProgressBar 用这个 spriteFrame UUID 引用
|
||||
|
||||
**当前实测**:
|
||||
- `00014_01.png` 的 spriteFrame UUID = `04f4d29d-861f-4b46-930a-baf544a80b1b@f9941` (atlas-hall)
|
||||
- 6 个按钮都引用同一个 spriteFrame UUID (Cocos atlas 9-slice 自动共享 sprite, 类似原 HTML5 sprite 复用)
|
||||
|
||||
### 类型 4 = cc.EditBox 是 best-fit
|
||||
|
||||
- `phoneInfo` (Layer00029): 3 个 type-4 spirit 真的是 EditBox (42×28 输入框)
|
||||
|
||||
Reference in New Issue
Block a user