MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / edgeIntensityScale

Function edgeIntensityScale

graph-ui/src/lib/density.ts:17–21  ·  view source on GitHub ↗
(edgeCount: number)

Source from the content-addressed store, hash-verified

15const EDGE_MIN_SCALE = 0.05;
16
17export function edgeIntensityScale(edgeCount: number): number {
18 if (edgeCount <= EDGE_REFERENCE_COUNT) return 1;
19 /* ~1/sqrt(n): 4× the edges → each ~half as bright → total glow ~flat. */
20 return Math.max(EDGE_MIN_SCALE, Math.sqrt(EDGE_REFERENCE_COUNT / edgeCount));
21}
22
23/* Node glow and bloom stay at full strength up to here — this covers the
24 * common "load the whole repo" case (tens of thousands of nodes) so the

Callers 2

EdgeLinesFunction · 0.90
density.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected