/** * Lake Generation Module * * Identifies terrain depressions and fills them with lakes. * Uses a "pour point" algorithm - lakes fill up to the lowest point * on their rim where water can overflow. * * Algorithm: * 1. Find sinks (river endpoints that can't drain) * 2. For each sink, find the depression it sits in * 3. Calculate the pour point (lowest rim elevation) * 4. Fill all tiles below the pour point elevation * 5. Find spillway for outgoing river */ export interface LakeGenerationOptions { width: number; height: number; elevation: Uint8Array; rivers: Uint8Array; seaLevel?: number; minLakeSize?: number; maxLakeSize?: number; /** Minimum depth of depression to form a lake (pour point - sink) */ minDepth?: number; /** Maximum lake fill level above sink (caps very deep lakes) */ maxFillDepth?: number; /** Maximum elevation for lake formation (lakes don't form on high terrain) */ maxLakeElevation?: number; } export interface LakeSpillway { /** X coordinate of spillway (on lake edge) */ lakeX: number; /** Y coordinate of spillway (on lake edge) */ lakeY: number; /** X coordinate of outflow target (where river starts) */ outflowX: number; /** Y coordinate of outflow target (where river starts) */ outflowY: number; /** Elevation at the spillway point */ elevation: number; } export interface LakeResult { /** Map of lake tiles (1 = lake, 0 = not lake) */ lakeMap: Uint8Array; /** Number of lakes generated */ lakeCount: number; /** Spillway points where rivers can flow out of lakes */ spillways: LakeSpillway[]; } /** * Generate lakes by identifying and filling terrain depressions */ export declare function generateLakes(options: LakeGenerationOptions): LakeResult; //# sourceMappingURL=lakes.d.ts.map