(edgeCount: number)
| 50 | const EDGE_MIN_SCALE = 0.05; |
| 51 | |
| 52 | export function edgeIntensityScale(edgeCount: number): number { |
| 53 | if (edgeCount <= EDGE_REFERENCE_COUNT) return 1; |
| 54 | /* ~1/sqrt(n): 4x the edges gives each ~half the brightness, total glow ~flat. */ |
| 55 | return Math.max(EDGE_MIN_SCALE, Math.sqrt(EDGE_REFERENCE_COUNT / edgeCount)); |
| 56 | } |
| 57 | |
| 58 | /* Node glow and bloom stay at full strength up to here: this covers the |
| 59 | * common "load the whole repo" case (tens of thousands of nodes) so the |
no outgoing calls