diff --git a/app/three/utils/build-meshes.ts b/app/three/utils/build-meshes.ts index 1b06dd3..a5bbe37 100644 --- a/app/three/utils/build-meshes.ts +++ b/app/three/utils/build-meshes.ts @@ -22,16 +22,14 @@ export async function buildMeshes( mappedFeatures: MappedFeature[], model: Group ) { - const meshPromises = mappedFeatures.map(async (layerData) => { - const mesh = await buildMesh(layerData); - if (layerData.name === "Topography") { + for (const mappedFeature of mappedFeatures) { + const mesh = await buildMesh(mappedFeature); + if (mappedFeature.name === "Topography") { mesh.visible = false; } model.add(mesh); - }); - - await Promise.all(meshPromises); + } } async function buildMesh(layerData: MappedFeature) {