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[],
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) {