fix runtime map loading lifecycle

This commit is contained in:
Tom Boullay
2026-04-28 14:42:49 +02:00
parent 8c6af0ed6d
commit 7e99d455b4
7 changed files with 65 additions and 44 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import type { MapNode, SceneData } from "@/types/editor";
import { parseMapNodes } from "@/utils/mapNodeValidation";
const MAP_JSON_PATH = "/map.json";
const MODEL_FILE_NAME = "model.gltf";
@@ -11,7 +12,7 @@ export async function loadMapSceneData(): Promise<SceneData | null> {
return null;
}
const mapNodes: MapNode[] = await response.json();
const mapNodes = parseMapNodes(await response.json());
return createSceneData(mapNodes);
}