(nodeCount: number)
| 66 | const NODE_BOOST_FLOOR = 0.8; |
| 67 | |
| 68 | function fadeFactor(nodeCount: number): number { |
| 69 | if (nodeCount <= NODE_REFERENCE_COUNT) return 0; |
| 70 | return Math.min( |
| 71 | 1, |
| 72 | (nodeCount - NODE_REFERENCE_COUNT) / (NODE_FADE_END - NODE_REFERENCE_COUNT), |
| 73 | ); |
| 74 | } |
| 75 | |
| 76 | export function bloomIntensityScale(nodeCount: number): number { |
| 77 | return 1 - fadeFactor(nodeCount) * (1 - BLOOM_FLOOR); |
no outgoing calls
no test coverage detected