feat: add expandable multi-track voiceover timeline

This commit is contained in:
haixin.yang committed 2026-07-11 15:18:43 +08:00
1 parent e302b25288
commit 6f0666e513
10 files changed
+608 -145

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
import { MAX_TIMELINE_DURATION_SECONDS } from "../config/editor.js";
import { DEFAULT_TIMELINE_DURATION_SECONDS } from "../config/editor.js";
export const TIMELINE_MIN_ZOOM = 0.25;
export const TIMELINE_MAX_ZOOM = 16;
@@ -18,7 +18,7 @@ export function getTimelineVisibleDuration(zoom) {
if (clampedZoom <= 1) {
const progress = (clampedZoom - TIMELINE_MIN_ZOOM) / (1 - TIMELINE_MIN_ZOOM);
const maxLog = Math.log(MAX_TIMELINE_DURATION_SECONDS);
const maxLog = Math.log(DEFAULT_TIMELINE_DURATION_SECONDS);
const defaultLog = Math.log(TIMELINE_DEFAULT_VISIBLE_SECONDS);
return Math.exp(maxLog + (defaultLog - maxLog) * progress);
}