mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
add comments
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Ensures every project has at least one scene
|
||||
* Adds a default "Main scene" if none exist
|
||||
* Sets currentSceneId to the new scene's id
|
||||
*/
|
||||
|
||||
import { IndexedDBAdapter } from "@/services/storage/indexeddb-adapter";
|
||||
import type { SerializedScene } from "@/services/storage/types";
|
||||
import { buildDefaultScene } from "@/lib/scenes";
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* Adds default values for new project properties introduced in v2
|
||||
*/
|
||||
|
||||
import {
|
||||
DEFAULT_BLUR_INTENSITY,
|
||||
DEFAULT_CANVAS_SIZE,
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/*
|
||||
* Adds a "duration" field to each project's metadata,
|
||||
*/
|
||||
import { getProjectDurationFromScenes } from "@/lib/scenes";
|
||||
import { IndexedDBAdapter } from "@/services/storage/indexeddb-adapter";
|
||||
import type { TScene } from "@/types/timeline";
|
||||
@@ -84,7 +87,9 @@ function isV3Project({ project }: { project: ProjectRecord }): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
return isRecord(project.metadata) && typeof project.metadata.duration === "number";
|
||||
return (
|
||||
isRecord(project.metadata) && typeof project.metadata.duration === "number"
|
||||
);
|
||||
}
|
||||
|
||||
function isRecord(value: unknown): value is ProjectRecord {
|
||||
|
||||
Reference in New Issue
Block a user