@@ -168,10 +168,13 @@ const MAP_WIDTH = 1400;
168168const MAP_HEIGHT = 620 ;
169169const MAX_POINTS = 320 ;
170170const FLASH_MS = 900 ;
171- const PULSE_MS = 15_000 ;
171+ const PULSE_MS = 30_000 ;
172172const PULSE_CYCLE_MS = 3_600 ;
173173const FADE_MS = 10_000 ;
174174const POINT_TTL_MS = FLASH_MS + PULSE_MS + FADE_MS ;
175+ const LIVE_POINT_RADIUS = 4.7 ;
176+ const IDLE_POINT_RADIUS = 4.2 ;
177+ const IDLE_POINT_BREATH_MS = 4_800 ;
175178const MAP_PADDING_X = 34 ;
176179const MAP_PADDING_Y = 28 ;
177180const HOME_ANIMATION_MS = 820 ;
@@ -245,6 +248,11 @@ function pointOpacity(point: LivePoint, now: number) {
245248 return Math . max ( 0 , 1 - ( age - FLASH_MS - PULSE_MS ) / FADE_MS ) ;
246249}
247250
251+ function idlePointBreath ( now : number ) {
252+ const progress = ( now % IDLE_POINT_BREATH_MS ) / IDLE_POINT_BREATH_MS ;
253+ return 0.5 - Math . cos ( progress * Math . PI * 2 ) / 2 ;
254+ }
255+
248256function activityLabel ( activity : GeoActivity ) {
249257 return ACTIVITY_META [ activity ] ?. label ?? activity ;
250258}
@@ -699,7 +707,10 @@ function drawRealtimePoint(
699707 const pulseActive = ! point . persistent && age <= FLASH_MS + PULSE_MS ;
700708 const pulseAge = Math . max ( 0 , age - FLASH_MS * 0.35 ) ;
701709 const pulseRamp = Math . min ( 1 , Math . max ( 0 , pulseAge / 900 ) ) ;
702- const coreRadius = 4.7 ;
710+ const breath = pulseActive ? 0 : idlePointBreath ( now ) ;
711+ const coreRadius = pulseActive ? LIVE_POINT_RADIUS : IDLE_POINT_RADIUS + breath * 0.5 ;
712+ const fillOpacity = ( pulseActive ? 0.3 : 0.18 + breath * 0.16 ) * opacity ;
713+ const strokeOpacity = ( pulseActive ? 1 : 0.52 + breath * 0.26 ) * opacity ;
703714
704715 context . save ( ) ;
705716 context . globalCompositeOperation = "lighter" ;
@@ -719,13 +730,13 @@ function drawRealtimePoint(
719730 }
720731
721732 context . shadowBlur = 0 ;
722- context . globalAlpha = 0.3 * opacity ;
733+ context . globalAlpha = fillOpacity ;
723734 context . fillStyle = meta . color ;
724735 context . beginPath ( ) ;
725736 context . arc ( x , y , coreRadius , 0 , Math . PI * 2 ) ;
726737 context . fill ( ) ;
727738
728- context . globalAlpha = opacity ;
739+ context . globalAlpha = strokeOpacity ;
729740 context . strokeStyle = meta . color ;
730741 context . lineWidth = 1 ;
731742 context . beginPath ( ) ;
0 commit comments