feat(timeline): 交互式分支演出 + 从任意节点开始 + 时间轴分面板/自适应

- 交互分支:播到选择/战斗/随机节点暂停,在镜头下方弹按钮手选,点完接对应分支续演
- 从任意节点开始:单击节点选中→「从选中处开始」或双击节点,立即从该处播放;
  起始位置按从开头到该节点途中的走位重放算出(角色站在应有位置),已离线验证
- 布局分两块(上舞台/下时间轴),时间轴 playhead 仅播放时居中、暂停可自由滚
- 时间轴自适应宽度按钮(整条压进可视区)+鼠标滚轮横向滚动,解决长时间轴够不着节点
- 演示事件 QY_TLDEMO 扩充两条分支(和解→随机夜晚/拔剑→战斗胜败),去掉对焦NP1
This commit is contained in:
2026-06-13 18:54:32 +08:00
parent 9525dadfd6
commit e6ec743564
3 changed files with 394 additions and 236 deletions

View File

@ -1,7 +1,7 @@
{
"id": "QY_TLDEMO",
"title": "演出预览功能演示",
"theme": "P1 白模演出测试(走位/对话打字机/动画/镜头/多角色",
"theme": "P1 白模演出测试(走位/对话/动画/镜头/选择/随机/战斗",
"scale": "演示",
"roles": [
{ "slot": "NP1", "name": "神秘剑客", "archetype": "负伤外门高手", "camp": 0 },
@ -13,18 +13,48 @@
{ "id": "n_p1walk", "kind": "move", "actor": "P1", "to": "PT_DOOR", "next": "n_p1say" },
{ "id": "n_p1say", "kind": "dialogue", "speaker": "P1", "text": "(这客栈看着冷清,却处处透着古怪……)", "next": "n_npenter" },
{ "id": "n_npenter", "kind": "move", "actor": "NP1", "to": "PT_CENTER", "next": "n_npsay" },
{ "id": "n_npsay", "kind": "dialogue", "speaker": "NP1", "camera": "NP1", "text": "阁下,留步。在下身负旧伤,想借贵宝地歇一晚,天明即走。", "next": "n_draw" },
{ "id": "n_npsay", "kind": "dialogue", "speaker": "NP1", "text": "阁下,留步。在下身负旧伤,想借贵宝地歇一晚,天明即走。", "next": "n_draw" },
{ "id": "n_draw", "kind": "anim", "actor": "NP1", "ani": "draw_sword", "next": "n_p1ask" },
{ "id": "n_p1ask", "kind": "dialogue", "speaker": "P1", "text": "来者何人?这般夜半叩门,又突然按剑,意欲何为?", "next": "n_xiaoer" },
{ "id": "n_xiaoer", "kind": "move", "actor": "NP2", "to": "PT_SIDE", "next": "n_xsay" },
{ "id": "n_xsay", "kind": "dialogue", "speaker": "NP2", "text": "二位客官息怒!有话好好说,小店实在经不起折腾啊……", "next": "n_choice" },
{ "id": "n_choice", "kind": "choice", "options": [
{ "text": "收剑,请他进来歇脚", "goto": "end_peace" },
{ "text": "拔剑相向,喝令他离开", "goto": "end_fight" }
] }
{ "text": "收剑,请他进来歇脚", "goto": "sc_peace1" },
{ "text": "拔剑相向,喝令他离开", "goto": "sc_fight1" }
] },
{ "id": "sc_peace1", "kind": "dialogue", "speaker": "P1", "text": "(罢了,他确实带着伤,眼神也不像歹人。)", "next": "sc_peace2" },
{ "id": "sc_peace2", "kind": "anim", "actor": "P1", "ani": "sheath_sword", "next": "sc_peace3" },
{ "id": "sc_peace3", "kind": "dialogue", "speaker": "NP1", "text": "多谢。萍水相逢,承蒙阁下不弃,这份情,在下记下了。", "next": "sc_peace4" },
{ "id": "sc_peace4", "kind": "move", "actor": "NP2", "to": "PT_CENTER", "next": "sc_peace5" },
{ "id": "sc_peace5", "kind": "dialogue", "speaker": "NP2", "text": "好嘞!二位里边请,小的这就去沏一壶热茶,再添两副碗筷!", "next": "sc_peace6" },
{ "id": "sc_peace6", "kind": "move", "actor": "NP1", "to": "PT_SIDE", "next": "sc_peace_rand" },
{ "id": "sc_peace_rand", "kind": "random", "branches": [
{ "weight": 60, "goto": "sc_peace_calm" },
{ "weight": 40, "goto": "sc_peace_night" }
] },
{ "id": "sc_peace_calm", "kind": "narration", "speaker": "P1", "text": "这一夜风停雨歇,客栈里难得安宁。剑客和衣而眠,天没亮便悄然上路。", "next": "sc_peace_calm2" },
{ "id": "sc_peace_calm2", "kind": "dialogue", "speaker": "NP1", "text": "后会有期。他日江湖再见,必当厚报。", "next": "end_peace" },
{ "id": "sc_peace_night", "kind": "narration", "speaker": "P1", "text": "三更天,窗外忽有黑影一闪而过。剑客猛然睁眼,按住了腰间的剑。", "next": "sc_peace_night2" },
{ "id": "sc_peace_night2", "kind": "move", "actor": "NP1", "to": "PT_DOOR", "next": "sc_peace_night3" },
{ "id": "sc_peace_night3", "kind": "dialogue", "speaker": "NP1", "text": "阁下,麻烦没完——他们找上门了。今夜怕是要承你一把剑。", "next": "end_peace_twist" },
{ "id": "sc_fight1", "kind": "dialogue", "speaker": "P1", "text": "想进这道门,先问过我手里的剑!", "next": "sc_fight2" },
{ "id": "sc_fight2", "kind": "anim", "actor": "P1", "ani": "draw_sword", "next": "sc_fight3" },
{ "id": "sc_fight3", "kind": "dialogue", "speaker": "NP1", "text": "既然阁下不肯通融……那就别怪在下。得罪了!", "next": "sc_fight4" },
{ "id": "sc_fight4", "kind": "move", "actor": "NP1", "to": "PT_DOOR", "next": "sc_fight_battle" },
{ "id": "sc_fight_battle", "kind": "fight", "fight_type": 1, "camp2": [ "NP1" ], "win": "sc_fight_win", "lose": "sc_fight_lose" },
{ "id": "sc_fight_win", "kind": "dialogue", "speaker": "P1", "text": "承让。你伤成这样还要硬闯,又是何苦。", "next": "sc_fight_win2" },
{ "id": "sc_fight_win2", "kind": "move", "actor": "NP1", "to": "PT_SIDE", "next": "sc_fight_win3" },
{ "id": "sc_fight_win3", "kind": "dialogue", "speaker": "NP1", "text": "好剑法……是在下唐突了。告辞。", "next": "end_fight_win" },
{ "id": "sc_fight_lose", "kind": "dialogue", "speaker": "NP1", "text": "阁下手下留情。这一晚的账,日后江湖上再算。", "next": "sc_fight_lose2" },
{ "id": "sc_fight_lose2", "kind": "move", "actor": "NP1", "to": "PT_CENTER", "next": "end_fight_lose" }
],
"endings": [
{ "id": "end_peace", "summary": "化干戈为玉帛,与剑客结为知己", "grants": [], "result": "success" },
{ "id": "end_fight", "summary": "不欢而散,剑客消失在茫茫雨夜中", "grants": [], "result": "end" }
{ "id": "end_peace", "summary": "结义同盟,平安一夜", "grants": [], "result": "success" },
{ "id": "end_peace_twist", "summary": "夜半生变,新的麻烦找上门", "grants": [], "result": "end" },
{ "id": "end_fight_win", "summary": "技高一筹,剑客败退消失在雨夜", "grants": [], "result": "success" },
{ "id": "end_fight_lose", "summary": "技不如人,被剑客闯入客栈", "grants": [], "result": "fail" }
]
}