(nodeCount: number)
| 31 | const NODE_BOOST_FLOOR = 0.8; |
| 32 | |
| 33 | function fadeFactor(nodeCount: number): number { |
| 34 | if (nodeCount <= NODE_REFERENCE_COUNT) return 0; |
| 35 | return Math.min( |
| 36 | 1, |
| 37 | (nodeCount - NODE_REFERENCE_COUNT) / (NODE_FADE_END - NODE_REFERENCE_COUNT), |
| 38 | ); |
| 39 | } |
| 40 | |
| 41 | export function bloomIntensityScale(nodeCount: number): number { |
| 42 | return 1 - fadeFactor(nodeCount) * (1 - BLOOM_FLOOR); |
no outgoing calls
no test coverage detected