( nodeCount: number, breakpoints: PixiScaleBreakpoint[] = DEFAULT_BREAKPOINTS, )
| 135 | * Returns the first breakpoint whose maxNodes >= nodeCount. |
| 136 | */ |
| 137 | export function selectBreakpoint( |
| 138 | nodeCount: number, |
| 139 | breakpoints: PixiScaleBreakpoint[] = DEFAULT_BREAKPOINTS, |
| 140 | ): PixiScaleBreakpoint { |
| 141 | for (const bp of breakpoints) { |
| 142 | if (nodeCount <= bp.maxNodes) return bp; |
| 143 | } |
| 144 | // Fallback: last breakpoint (Infinity tier) |
| 145 | return breakpoints[breakpoints.length - 1]; |
| 146 | } |
no outgoing calls
no test coverage detected