Remove unnecessary try-catch blocks in GLTF loading functions

This commit is contained in:
2026-03-31 18:50:08 +02:00
parent a775df160e
commit 8b90a3d851

View File

@@ -596,9 +596,7 @@ async function loadGltfFromImportedModelFileSet(fileSet: ImportedModelFileSet):
const loader = new GLTFLoader();
try {
return await loader.parseAsync(JSON.stringify(gltfJson), "");
}
return loader.parseAsync(JSON.stringify(gltfJson), "");
}
function createModelAssetRecordFromFileSet(
@@ -723,8 +721,6 @@ export async function loadModelAssetFromStorage(
const loader = new GLTFLoader();
try {
const gltf = await loader.parseAsync(JSON.stringify(gltfJson), "");
return createLoadedModelAsset(asset, cloneTemplateScene(gltf.scene));
}
const gltf = await loader.parseAsync(JSON.stringify(gltfJson), "");
return createLoadedModelAsset(asset, cloneTemplateScene(gltf.scene));
}