From 2f2ae5f859d994aa0cc30c687f57666d27c72c80 Mon Sep 17 00:00:00 2001 From: Sam Learner Date: Tue, 28 Jun 2022 10:24:42 -0400 Subject: [PATCH] Increased elevation point sampling --- src/components/Map.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Map.svelte b/src/components/Map.svelte index 97d54a0..9873d9c 100644 --- a/src/components/Map.svelte +++ b/src/components/Map.svelte @@ -330,9 +330,10 @@ let terrainElevationMultiplier = 1.2; let cameraBaseAltitude = 4300; + const elevationArrayStep = Math.max( 2, - Math.round(Math.min(coordinatePath.length / 4 - 1, 100)) + Math.round(Math.min(coordinatePath.length / 4 - 1, 20)) ); // Sometimes while 3D tiles are still loading, the queryTerrainElevation method doesn't hit, @@ -342,7 +343,7 @@ let attempts = 0; while ( - attempts < 10 && + attempts < 8 && (elevations === null || elevations.every((d) => d === null)) ) { await sleep(200);