diff --git a/src/features/map/types.ts b/src/features/map/types.ts index b4009ca..c96b184 100644 --- a/src/features/map/types.ts +++ b/src/features/map/types.ts @@ -108,7 +108,10 @@ export const PACKET_FLOW_HOP_MS = 480; // ms the dot takes to cross one hop segm export const PACKET_FLOW_FLASH_MS = 900; // a crossed node's flash decays back to dim over this export const PACKET_FLOW_TRAIL_FADE_MS = 1000; // the dashed trail fades once the dot reaches the end export const PACKET_FLOW_MAX = 120; // cap on concurrent packet animations (busy-feed guard) -export const LIVE_DIM_OPACITY = 0.18; // idle node/cluster opacity while Live mode is on +export const LIVE_DIM_OPACITY = 0.18; // idle individual-node opacity while Live mode is on +// Clusters dim further: many overlapping semi-transparent hexagons composite toward opaque, so a +// dense cluster field stops being see-through. A lower per-cluster alpha keeps the stack translucent. +export const LIVE_CLUSTER_DIM_OPACITY = 0.07; export const CLUSTER_RADIUS = 50; // px // Keep clustering alive across the whole reachable zoom range (default max is 22). maplibre drops diff --git a/src/features/map/useMapPacketFlow.ts b/src/features/map/useMapPacketFlow.ts index 2c4d3cd..92e5a00 100644 --- a/src/features/map/useMapPacketFlow.ts +++ b/src/features/map/useMapPacketFlow.ts @@ -15,6 +15,7 @@ import { PACKET_FLOW_TRAIL_FADE_MS, PACKET_FLOW_MAX, LIVE_DIM_OPACITY, + LIVE_CLUSTER_DIM_OPACITY, NODES_SOURCE_ID, NODES_POINT_LAYER_ID, NODES_CLUSTER_LAYER_ID, @@ -195,7 +196,7 @@ export function useMapPacketFlow( map.setPaintProperty(NODES_POINT_LAYER_ID, "text-opacity", enabled ? 0 : LABEL_OPACITY); } if (map.getLayer(NODES_CLUSTER_LAYER_ID)) { - map.setPaintProperty(NODES_CLUSTER_LAYER_ID, "icon-opacity", enabled ? LIVE_DIM_OPACITY : 1); + map.setPaintProperty(NODES_CLUSTER_LAYER_ID, "icon-opacity", enabled ? LIVE_CLUSTER_DIM_OPACITY : 1); map.setPaintProperty(NODES_CLUSTER_LAYER_ID, "text-opacity", enabled ? 0 : 1); } }, [mapRef, isReady, enabled, themeKey]);