Files
tianshu-engine/docs/EDITOR_ROADMAP.md

124 lines
4.2 KiB
Markdown
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.

# 编辑器 Roadmap — 与引擎功能同步
P3 完成的编辑器支持基本的场景节点编辑。以下是与引擎 P4~P31 同步所需的编辑器功能迭代。
---
## 已完成P3
| 功能 | 完成 |
|------|:--:|
| 场景节点图Vue Flow | ✅ |
| 场景属性编辑videoUrl, choices, nextScene, onEnter | ✅ |
| QTE 参数编辑 | ✅ |
| JSON 导入/导出 | ✅ |
| 视频预览 | ✅ |
---
## E1: 图片/视频热点编辑(对标 P4
- [ ] NodeEditor 新增 `type` 切换video / image
- [ ] `imageUrl` 字段
- [ ] 热区列表编辑id / label / targetScene / x / y / w / h
- [ ] 时间轴参数showAt / hideAt
- [ ] conditions / effects 编辑
- [ ] timeLimit 字段
## E2: 循环等待参数(对标 P5
- [ ] loopStart / loopEnd 两个数字字段
## E3: BGM 字段编辑(对标 P6
- [ ] bgmUrl / bgmVolume / bgmCrossFade
- [ ] bgmDuckLevel / bgmDuckFade
- [ ] videoMuted
## E4: i18n Key 编辑(对标 P11/P31
- [ ] SceneNode: subtitleUrl → subtitles map按语言编辑
- [ ] Choice: textKey / promptKey
- [ ] Hotspot: labelKey
- [ ] ChapterInfo: labelKey
- [ ] AchievementDef: titleKey / descKey
- [ ] EndingDef: labelKey
- [ ] QTEDefinition: promptKey
- [ ] BattleHUD / BattleResult: labelKey / titleKey
## E5: Choice 增强(对标 P13
- [ ] prompt 字段编辑
## E6: 顶级字段编辑(对标 P8/P14/P15/P20/P24
- [ ] chapters 列表编辑id / label / startScene / thumbnail / defaultVariables
- [ ] achievements 列表编辑id / title / description / icon / hidden / condition
- [ ] endings 列表编辑id / label / sceneId / chapterId / thumbnail
- [ ] introVideo / menuVideo
- [ ] streamingUrl map三档画质 key-value
- [ ] assetBase 字段
## E7: 条件路由编辑(对标 P25
- [ ] nextScene 类型切换(字符串 / 数组)
- [ ] 数组模式:逐条编辑 conditions + targetScene
## E8: 关键节点编辑(对标 P26
- [ ] keyMoment 字段(三态:自动 / 强制 true / 强制 false
## E9: 战斗系统编辑(对标 P31
- [ ] battleHUD 列表编辑:每项含 label / portrait / stats 数组
- [ ] battleHUD stats 编辑variable / label / max / style
- [ ] battleResult 编辑title / stats 数组
## E10: 内嵌快速测试
- [ ] 节点右键菜单 → "从此场景开始测试"
- [ ] PreviewPanel 切换为 iframe 内嵌游戏播放器(加载 `/?scene=<id>`
- [ ] Engine 支持 `?scene=` URL 参数指定起始场景
## E11: 场景列表 + 搜索
- [ ] 左侧可折叠场景列表面板(`SceneList.vue`
- [ ] 按名称搜索/筛选场景节点
- [ ] 点击列表项 → 画布跳转到对应节点并选中
## E12: JSON 校验器
- [ ] 导出/保存前实时检查
- [ ] 引用完整性targetScene 指向不存在的场景 ID
- [ ] 死路检测:无 choices / 无 nextScene / 无 qte / 无 hotspots 的场景
- [ ] 变量引用conditions 中的 variable 未在 `variables` 声明
## E13: 撤销/重做
- [ ] 操作历史栈add/delete/update/move node & edge
- [ ] Ctrl+Z 撤销 / Ctrl+Shift+Z 重做
- [ ] `useGraphEditor` 中维护 `history[]` + `historyIndex`
## E14: 面板可折叠 + 标签页
- [ ] NodeEditor 和 PreviewPanel 加折叠/展开按钮
- [ ] NodeEditor 按类别分标签页基本id/type/videoUrl/ 音频bgmUrl 等)/ 战斗battleHUD/battleResult/ 高级loopStart/keyMoment
- [ ] 标签页间切换不丢失编辑状态
---
## 优先级建议
| 优先级 | 编号 | 说明 |
|:--:|------|------|
| **P0** | E4 | i18n key 编辑——覆盖最广P11/P31 都依赖 |
| **P0** | E10 | 内嵌快速测试——最直接的创作者效率提升 |
| **P1** | E1 | 热点编辑——P4 是核心交互功能 |
| **P1** | E6 | 顶级字段——chapters/achievements/endings 创作者需求最大 |
| **P1** | E12 | JSON 校验——防止导出后游戏崩溃 |
| **P2** | E7/E8/E9 | 条件路由/关键节点/战斗——新增功能,但依赖前置 |
| **P2** | E11 | 场景列表搜索——场景多了才有真实需求 |
| **P2** | E14 | 面板标签页——属性字段达到 20+ 后优势明显 |
| **P3** | E2/E3/E5 | 单字段编辑——BGM/loop/prompt改动小 |
| **P3** | E13 | 撤销/重做——重要但改动不小 |