Repository navigation
feat: 新增动画时间线功能 - #1565
Closed
15915996690 wants to merge 28 commits into
Closed
feat: 新增动画时间线功能#156515915996690 wants to merge 28 commits into
15915996690 wants to merge 28 commits into
Conversation
thekingofcity
requested changes
Aug 31, 2026
thekingofcity
left a comment
Member
There was a problem hiding this comment.
我暂时看到几个很夸张的问题,你先修到ai跟你说可以开pr再说吧
| } | ||
|
|
||
| export const CURRENT_VERSION = 78; | ||
| export const CURRENT_VERSION = 77; |
Member
There was a problem hiding this comment.
???
why the save version will revert?
Author
|
哦,不好意思,我是基于76版本开发的,后来移植了78的功能后忘记改版本号了😅
下面的几个冲突我也看到了,还有我测试发现含地理地图的导出也有点问题。。。
我修完了再来👋
在 2026-08-31 20:02:13,thekingofcity ***@***.***> 写道:
@thekingofcity requested changes on this pull request.
我暂时看到几个很夸张的问题,你先修到ai跟你说可以开pr再说吧
In src/util/save.ts:
… }
-export const CURRENT_VERSION = 78;
+export const CURRENT_VERSION = 77;
???
why the save version will revert?
On src/util/bezier-parallel.ts:
Do not remove comments
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
added 4 commits
September 6, 2026 16:22
- save.ts: 将存储版本号从 77 更新到 79,补全官方版本 77→78 升级函数, 新增版本 78→79 升级函数以支持时间线功能(解决官方开发者指出的版本回退问题) - bezier-parallel.ts: 恢复被误删的 51 行注释(解决官方开发者"Do not remove comments"反馈) - video-export/download/fonts: 优化视频导出相关逻辑
合并 railmapgen/rmp 最新 main(3cdfa80)到 timeline 分支,解决冲突: - package.json: 保留 timeline 的 recordrtc/webm-writer 依赖,采用官方 rollup ^4.63.1 和版本号 6.0.23 - package-lock.json: 采用官方版本并 npm install 同步额外依赖 - map-tile-controller.ts/test.ts: 采用官方 railmapgen#1562 多区域地图瓦片重写版本 - prettier 格式修正:jr-east-single-color-utils.tsx、map-raster-cache.ts、clipboard.ts、save.ts 合并后项目同时拥有官方最新功能(rmp-6.0.23、railmapgen#1562 多区域地图瓦片、map-routing) 和 timeline 分支的时间线动画功能、视频导出功能。构建验证通过。
Author
|
@thekingofcity 有空看看吗?修复了那些离谱的问题以及一些影响使用的功能问题😊 |
Author
|
@thekingofcity 抱歉打扰~这个 PR 的 CI(Code Quality Check)因为是首次贡献需要维护者手动批准,最新的运行一直停留在等待批准状态(No jobs were run)。方便的时候能帮忙点一下 Approve workflow 让测试跑起来吗?辛苦啦!🙏 另外补充一下:本 PR 已合并官方 main(rmp-6.0.25),之前提到的 save 版本号等问题也已修复。 |
added 16 commits
October 1, 2026 19:06
- applyEdgeProgress 完成时恢复路径自身的 stroke-dasharray,不再覆盖为绘制用实线(修复 gzmtr-virtual-int 被渲染成实心灰线) - 全览缩放缓动从进入全览那一帧的真实缩放起步,而非 userScale(修复全览首帧缩放跳变) - 进入全览时清除遗留 focusZoom,避免全览结束后聚焦离开缓动被旧值短路 - 接通全部 5 条帧循环的缓动起点持久化
- 线段生长动画改用 clipPath 沿路径揭示:原路径线型(stroke-dasharray)完全不动,虚线样式(gzmtr-virtual-int 方块虚线)在生长过程中不再被纯色实线覆盖 - 全览缩放缓动起点改取上一帧真实渲染缩放(lastRenderedZoom),进入全览首帧画面与上一帧完全一致,消除首帧缩放跳变 - 进入全览时清除残留 focusZoom/focusZoomTransition,避免后续缓动被旧值短路 - 删除不可能命中的 phase.type==='overview' 死分支;为 focusCenterHold 增加空值收窄
- applyEdgeProgress 恢复为原始 dasharray/dashoffset 生长实现(移除 clipPath 方案) - gzmtr-virtual-int 方块虚线边不做逐段生长(生长动画会覆盖其虚线图案),单独使用整体透明度渐隐渐现
canReconcileLine used truthiness check while line path types only mark supportsReconcile:false on bezier/freeform and default to supported (undefined). Treat a line as supported unless supportsReconcile === false.
Edges other than single-color and gzmtr-virtual-int now grow as a solid line in their first foreground colour (black fallback) while opening. Each edge switches to its real style as soon as its own progress reaches 1; close animations keep the real style.
A failed dynamic import (e.g. chunk replaced during deployment or a transient network error) used to leave users stuck on the global error page. React.lazy usages now retry via a single automatic page reload per session; persistent failures still surface the error page.
applyEdgeProgress no longer overwrites decorative dasharrays once progress reaches 1, fixing china-railway edges stuck as a solid black line. Each open/close action also includes a built-in 1-second hold folded into both minimum and suggested durations; the scheduler reserves that tail instead of stretching animations into it.
The camera (centre and zoom) now stays locked on the completed drawing for the built-in 1-second hold, instead of triggering the simultaneous/parallel viewport restore zoom and then jumping to the next action. The view only starts moving to the next phase once the hold has elapsed. Applies to export, WebCodecs render and preview.
open-actions loadParam 中 graph.import(save.graph) 按引用持有节点属性,同一 save.graph 又作为 baseGraph 经 loadTimeline 进入 Redux。timeline-slice 未做 深拷贝,Immer autoFreeze 深度冻结 baseGraph 时连带冻结 window.graph 的节点 attributes,导致 changeStationType 的 removeNodeAttribute 与 applyNodeVersion 的 mergeNodeAttributes 抛出 Cannot delete / assign to read only property。 - open-actions 导入前 structuredClone(save.graph),切断 window.graph 与 Redux 引用 - timeline-slice 的 loadTimeline/setBaseGraph 存入前一律 structuredClone, 与 param-slice 防御口径一致,覆盖所有加载路径
added 3 commits
October 2, 2026 10:08
handleNew 只清空了画布和视图,未重置时间线状态,导致上一个项目的启用状态、日期/动作行、基准图等残留到空白项目。改为在保存前 dispatch(clearTimelineData()),与设置中关闭时间线的清理口径一致。
原行为:动作结束前并行/同时视口会惯性回缩到用户缩放(缩小),下一动作开始 再放大到新视口;动作之间插入等待时这个缩小-放大完全暴露。尾部 1s 停留期间 冻结镜头只是掩盖了回缩的开始,等待阶段仍会出现视口跳动。 新行为: - 开通/停运的 1s 内置预留从末尾移到开头(PRE_ANIMATION_HOLD_SECONDS), 元素排程整体后移,末尾画完即动作结束; - 开头 1s 画面保持上一动作结束时的内容,镜头(中心+缩放)用 smoothstep 从上一视口平滑过渡到本动作入场视口(同时组包围盒 / 并行合并包围盒 / 顺序动作首元素笔尖端),内容开始时镜头已就位; - 内容动画期间镜头正常跟随进度,删除动作结束时的回缩用户缩放逻辑, 相邻动作的视口差统一由下一动作的开场过渡消化。
删除元素级“同时”的包围盒中心焦点与对应 fit 缩放、入场视口的同组包围盒分支: 此前同时段镜头固定在合并包围盒中心不跟随绘制,同时组画完后焦点又切到 其他元素位置,表现为“动作结束前调整视口到别的位置”。现在 open/close 焦点始终落在正在绘制/擦除的元素上(镜头跟笔尖),间隙与收尾保持最后 焦点不动;入场视口统一为首个元素的绘制笔尖端 + 用户缩放。动作级并行 (withPrevious 批次)的合并视口逻辑保留。
边元素实为 SVG g 节点,此前断言为 HTMLElement 导致 ownerSVGElement 报错(HTMLElement 上不存在该属性)。将 applyEdgeProgress、makeSolidGrowingPath、getEdgeSolidForeground 参数与 getElementById 断言统一改为 SVGElement。
Member
|
版本似乎没有对齐吧,比如我看到你这个分支里还有 slack 的 icon,和旧版的一些方法 |
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.
摘要
新增动画时间线(animation timeline)功能,允许为线路图添加动画播放效果。
主要内容
此 PR 由 fork 15915996690/rmp 提交。