(x0: number, x1: number)
| 977 | /** What each stretch of the canvas is filled to, so far. */ |
| 978 | const sky: { x0: number; x1: number; y: number }[] = []; |
| 979 | const floorAt = (x0: number, x1: number): number => { |
| 980 | let f = topY; |
| 981 | for (const s of sky) if (s.x1 > x0 + 1 && s.x0 < x1 - 1) f = Math.max(f, s.y); |
| 982 | return f; |
| 983 | }; |
| 984 | for (const region of regions.values()) { |
| 985 | const p = packed.get(region.id)!; |
| 986 | const rh = Math.max(0, p.lines - 1) * REGION_PITCH + NODE_HEIGHT; |