(sameCluster: boolean, edgeCount: number)
| 132 | * WebGL-Kontext zu oeffnen. |
| 133 | */ |
| 134 | export function edgeIntensityFor(sameCluster: boolean, edgeCount: number): number { |
| 135 | const ported = sameCluster ? PORTED_INTENSITY_NEAR : PORTED_INTENSITY_FAR; |
| 136 | const washed = ported * edgeIntensityScale(edgeCount); |
| 137 | if (!Number.isFinite(edgeCount) || edgeCount >= EDGE_WASH_COUNT) { |
| 138 | return washed; |
| 139 | } |
| 140 | const readable = sameCluster ? EDGE_INTENSITY_NEAR : EDGE_INTENSITY_FAR; |
| 141 | if (edgeCount <= EDGE_FULL_COUNT) { |
| 142 | return readable; |
| 143 | } |
| 144 | const atWash = ported * edgeIntensityScale(EDGE_WASH_COUNT); |
| 145 | const share = |
| 146 | Math.log(edgeCount / EDGE_FULL_COUNT) / Math.log(EDGE_WASH_COUNT / EDGE_FULL_COUNT); |
| 147 | return readable * Math.pow(atWash / readable, share); |
| 148 | } |
| 149 | |
| 150 | export function createEdgeGeometry({ |
| 151 | nodes, |
no test coverage detected