feat(timeline): 支持角色轨迹关键帧与轨道拖拽排序
This commit is contained in:
@@ -176,7 +176,8 @@ async function exportVideoFrameByFrame(view: VideoExportView): Promise<void> {
|
||||
directorStore.project.timeline.tracks,
|
||||
directorStore.project.timeline.cameraTracks,
|
||||
time,
|
||||
usePlaybackStore.getState().editingObjectId
|
||||
usePlaybackStore.getState().editingObjectId,
|
||||
{ objects: directorStore.project.objects, duration }
|
||||
);
|
||||
applyActiveCameraViewAtTime({
|
||||
camera: frameCamera,
|
||||
@@ -248,11 +249,9 @@ async function exportVideoWithMediaRecorder(view: VideoExportView): Promise<void
|
||||
const directorStore = useDirectorStore.getState();
|
||||
const duration = directorStore.project.timeline.duration;
|
||||
|
||||
// 切视角 + 复位指针 + 录制模式(到末尾停住不循环)
|
||||
// 切视角 + 复位指针(时间轴本身就是单次播放,到末尾会自己停住)
|
||||
directorStore.setViewMode(view);
|
||||
const playback = usePlaybackStore.getState();
|
||||
playback.setStopAtEnd(true);
|
||||
playback.setPlayhead(0);
|
||||
usePlaybackStore.getState().setPlayhead(0);
|
||||
|
||||
const stopped = new Promise<void>((resolve) => {
|
||||
recorder.onstop = () => resolve();
|
||||
@@ -263,7 +262,7 @@ async function exportVideoWithMediaRecorder(view: VideoExportView): Promise<void
|
||||
// 等两帧让视角切换 + 首帧渲染,避免录到上一视角的残影
|
||||
await waitNextFrame();
|
||||
|
||||
// 监听播放结束(stopAtEnd → isPlaying 置 false)→ 停止录制
|
||||
// 监听播放结束(播到末帧 → isPlaying 置 false)→ 停止录制
|
||||
const unsubscribe = usePlaybackStore.subscribe((state) => {
|
||||
if (!state.isPlaying) {
|
||||
try {
|
||||
@@ -289,7 +288,6 @@ async function exportVideoWithMediaRecorder(view: VideoExportView): Promise<void
|
||||
clearTimeout(fallbackTimer);
|
||||
unsubscribe();
|
||||
|
||||
usePlaybackStore.getState().setStopAtEnd(false);
|
||||
usePlaybackStore.getState().setPlaying(false);
|
||||
|
||||
const viewLabel = view === "director" ? "上帝视角" : "机位视角";
|
||||
|
||||
Reference in New Issue
Block a user