Remove parallelization to retain layer order

This commit is contained in:
Fuhrmann 2025-05-05 10:12:13 +02:00
parent ec68fccaa3
commit 676a4e6cc1

View file

@ -22,16 +22,14 @@ export async function buildMeshes(
mappedFeatures: MappedFeature[], mappedFeatures: MappedFeature[],
model: Group model: Group
) { ) {
const meshPromises = mappedFeatures.map(async (layerData) => { for (const mappedFeature of mappedFeatures) {
const mesh = await buildMesh(layerData); const mesh = await buildMesh(mappedFeature);
if (layerData.name === "Topography") { if (mappedFeature.name === "Topography") {
mesh.visible = false; mesh.visible = false;
} }
model.add(mesh); model.add(mesh);
}); }
await Promise.all(meshPromises);
} }
async function buildMesh(layerData: MappedFeature) { async function buildMesh(layerData: MappedFeature) {