Remove parallelization to retain layer order
This commit is contained in:
parent
ec68fccaa3
commit
676a4e6cc1
1 changed files with 4 additions and 6 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue