Repository navigation
feat(story-player): logall 文本行点击快进到该行 - #445
Open
daflyinbed wants to merge 1 commit into
Open
daflyinbed wants to merge 1 commit into
daflyinbed wants to merge 1 commit into
Conversation
与调试页 StoryPlayerDebugShell 同一套编排:planChoicesForLine 求选择 方案 → 从头重建播放器(方案以脚本起点为前提,资源已缓存所以二次预载 很快)→ 引擎侧 seekToLine 以 quick 最高档推进,到达/播完/人工干预由 引擎推终态。播放器上方浮状态条显示进度并支持取消。 - LogAllList/LogAllPanel:seekable 时文本行可点击发 seek(源行号), 条件分栏递归转发 - index.vue:openLogAll 时与文档同源保留 StoryFlowResult(跳转规划 需要 emissions);initAndPreload 返回创建的播放器供跳转路径取重建 产物(player 模块级可变量,TS 控制流不认内部重新赋值)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
调试页 StoryPlayerDebugShell 已有"行号 + 跳转"能力(
planChoicesForLine求选择方案 → 从头重建播放器 → 引擎侧seekToLine以 quick 最高档推进)。把同样的快进到某行功能带进正式播放器的 Log All 面板,玩家在文本全览里看到感兴趣的行,点一下即可直达。实现内容
编排与调试页同一套,按 widget 的生命周期做了适配:
seekableprop 与seek事件;文本行可点击(hover 高亮 + "快进到该行" tooltip),条件分栏递归转发;面板标题提示"点击文本行快进"。播放中的浮层与"只加载文本"两种放置都开启。openLogAll时与文档同源保留一份StoryFlowResult(planChoicesForLine需要 emissions,LogDocument里没有;含ConditionStore实例,沿用 shallowRef 整体替换约定)。planChoicesForLine求方案 → 销毁旧播放器重走initAndPreload(方案以脚本起点为前提,必须从头播放;已就绪资源在 PIXI 缓存里,二次预载很快)→seekToLine武装 + 补start()(quick 模式自己不会从 idle 起播)。void→ 创建的播放器:跳转路径要拿重建产物,player是模块级可变量,TS 控制流分析不认函数内部的重新赋值(否则窄化成never)。验证
pnpm build(含 vue-tsc)通过。level_main_00-01_beg,含 1 处 decision):