add comments

This commit is contained in:
Maze Winther 2026-02-01 16:44:07 +01:00
parent 8ea3db833f
commit ee7eaecc9f
3 changed files with 16 additions and 1 deletions

View File

@ -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";

View File

@ -1,3 +1,7 @@
/*
* Adds default values for new project properties introduced in v2
*/
import {
DEFAULT_BLUR_INTENSITY,
DEFAULT_CANVAS_SIZE,

View File

@ -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 {