File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,9 +20,12 @@ export function arcPoints(
2020 const start = latLngToVec3 ( sLat , sLng ) ;
2121 const end = latLngToVec3 ( eLat , eLng ) ;
2222 const dist = start . distanceTo ( end ) ;
23- // Bow height grows with arc length but is clamped so long arcs hug the sphere
24- // instead of flying far past its silhouette (and getting clipped by the canvas).
25- const lift = GLOBE_RADIUS + Math . min ( dist * 0.22 , GLOBE_RADIUS * 0.35 ) ;
23+ // Bow height grows with arc length but is clamped on both ends: a minimum floor
24+ // keeps near-coincident endpoints from collapsing into a flat (invisible) arc,
25+ // and the max stops long arcs from flying past the silhouette and getting clipped.
26+ const MIN_BOW = GLOBE_RADIUS * 0.06 ;
27+ const MAX_BOW = GLOBE_RADIUS * 0.35 ;
28+ const lift = GLOBE_RADIUS + Math . min ( Math . max ( dist * 0.22 , MIN_BOW ) , MAX_BOW ) ;
2629 const pts : THREE . Vector3 [ ] = [ ] ;
2730 for ( let i = 0 ; i <= segments ; i ++ ) {
2831 const t = i / segments ;
You can’t perform that action at this time.
0 commit comments