import { type Cs2WaterManifest } from './types'; export interface Cs2WaterField { manifest: Cs2WaterManifest; resolutionX: number; resolutionZ: number; seaLevelMetres: number; /** Headerless float32, depth below the surface in metres, 0 = dry. SOURCE row order. */ depths: Float32Array; /** Depth at a world position, 0 outside the field. */ depthAt(worldX: number, worldZ: number): number; /** Self-check: recount the wet cells and compare with `manifest.wetCellCount`. */ wetCellCount(): number; } export interface Cs2WaterSample { sx: number; sz: number; } /** * Reads `water/`. Unlike the heights and the splat, this field is NOT pre-mirrored: the Z reflection happens at read * time, `z = -(sz / scale.z - offset.z)`. */ export declare function readCs2Water(root: string): Promise; /** Grid sample to world: `x = sx / scale.x - offset.x`, `z = -(sz / scale.z - offset.z)`. */ export declare function sampleToWorld(field: Cs2WaterField, sx: number, sz: number): [number, number]; /** The inverse, rounded to the nearest sample, which is how the reference renderer reads the field. */ export declare function worldToSample(field: Cs2WaterField, worldX: number, worldZ: number): Cs2WaterSample;