Skip to content

[timeline] 吸附迟滞+多探针 / 链接 offset 角标 / 音量橡皮筋 #99

Description

@appergb

缺口(渲染/吸附打磨)

  1. 吸附无迟滞(SnapState)+无多探针TimelineContainer move/trim 每次 findSnap(...,null) 传 null,1.5x sticky 迟滞从不生效,穿过吸附点会抖;snap.ts:89 findSnapDelta(多探针)是死代码。
  2. 链接 offset 红色角标缺失:链接片段相对偏移角标未画(linkGroupOffsets 未端口)。
  3. 音量橡皮筋缺失:音频片段上无可拖音量线(drawKeyframeMarkers 漏 volumeTrack)。

位置

  • web/src/components/timeline/TimelineContainer.tsx:397-430web/src/lib/snap.ts(启用 findSnapDelta、消死代码)。
  • web/src/components/timeline/clipRenderer.ts(新增 drawOffsetBadge / drawVolumeRubberBand)、timelineCanvas.ts、新 web/src/lib/linkOffsets.ts

如何完成

  • useRef 持久化 snap 锁定帧跨 tick 传入 findSnap 并回写;多探针用 findSnapDelta 取所有 companions start+end 最小修正。
  • 端口 linkGroupOffsets(纯 TS 遍历 timeline)+ drawClip 加 linkOffset → 红底白字角标。
  • drawVolumeRubberBand(dB↔Y 用已有 dbFromLinear)+ TimelineContainer 音量线/菱形命中拖动→setKeyframes(volume)
  • 上游:SnapEngine.swift:54-97EditorViewModel+Linking.swift:95-112ClipRenderer.swift:267-350 drawVolumeRubberBand/623-650 drawOffsetBadge
    cc @appergb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions