From 47a269c44120956b2adc276764df9629c24d0469 Mon Sep 17 00:00:00 2001 From: chrisgervang Date: Sun, 6 Jun 2021 16:05:50 -0700 Subject: [PATCH] Adjust default flying camera curve --- modules/core/src/keyframes/camera-keyframes.js | 4 +++- modules/core/test/keyframes/camera-keyframes.spec.js | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/core/src/keyframes/camera-keyframes.js b/modules/core/src/keyframes/camera-keyframes.js index f3aef85e..94a23ab8 100644 --- a/modules/core/src/keyframes/camera-keyframes.js +++ b/modules/core/src/keyframes/camera-keyframes.js @@ -24,7 +24,9 @@ import {lerp} from '@math.gl/core'; const LINEARLY_INTERPOLATED_PROPS = ['bearing', 'pitch']; const DEFAULT_OPTS = { speed: 1.2, - curve: 1.414 + // curve: 1.414 + // curve: Math.pow(6, 0.25) + curve: 1.75 // screenSpeed and maxDuration are used only if specified }; diff --git a/modules/core/test/keyframes/camera-keyframes.spec.js b/modules/core/test/keyframes/camera-keyframes.spec.js index 3d9fb640..54f75282 100644 --- a/modules/core/test/keyframes/camera-keyframes.spec.js +++ b/modules/core/test/keyframes/camera-keyframes.spec.js @@ -62,9 +62,9 @@ const TEST_CASES = [ } }, transition: { - 0.25: {bearing: 0, pitch: 5, longitude: -122.4017, latitude: 37.78297, zoom: 7.518116}, - 0.5: {bearing: 0, pitch: 10, longitude: -106.3, latitude: 38.76683, zoom: 3.618313}, - 0.75: {bearing: 0, pitch: 15, longitude: -74.19253, latitude: 40.68864, zoom: 6.522422} + 0.25: {longitude: -122.4184, latitude: 37.78194, zoom: 7.210047, bearing: 0, pitch: 5}, + 0.5: {longitude: -106.3, latitude: 38.76683, zoom: 3.003175, bearing: 0, pitch: 10}, + 0.75: {longitude: -74.12596, latitude: 40.69257, zoom: 6.212863, bearing: 0, pitch: 15} } } ];