A dry field over height (none: flat at 0).
OptionalcellSize?: numberCell size, metres. Fixed at construction.
OptionaldryTime?: numberSeconds for a wet surface without standing water to dry (e-folding).
Optionalevaporation?: numberEvaporation, mm/h.
OptionalflowSpeed?: numberHow fast water runs off and levels out, m/s (a sheet-flow speed: one cell per cellSize / flowSpeed seconds).
Optionalinfiltration?: numberWater soaking into the ground, mm/h.
Optionalorigin?: [number, number]World x, z of the field's minimum corner (cell (i, k) is centred at origin + (i + ½, k + ½)·cellSize).
Optionalresolution?: [number, number]Cells along x and z. Fixed at construction.
OptionalwetTime?: numberSeconds for a dry surface to get wet under rain (e-folding).
ReadonlydepthStanding water per cell, metres (row-major, x fastest).
ReadonlygroundTerrain height at the cell centres, world metres.
ReadonlynxCells along x and z.
ReadonlynzResolved settings.
Simulated seconds.
ReadonlywetnessSurface wetness per cell, 0…1.
Whether the last update had rain.
Length of one internal step, seconds.
Empties the field and dries it.
Standing water and wetness at world (x, z), bilinear between cell centres (0 outside the field).
Merges input into the settings (resolution and cellSize stay; moving origin re-bakes the ground and keeps the water per cell).
OptionalcellSize?: numberCell size, metres. Fixed at construction.
OptionaldryTime?: numberSeconds for a wet surface without standing water to dry (e-folding).
Optionalevaporation?: numberEvaporation, mm/h.
OptionalflowSpeed?: numberHow fast water runs off and levels out, m/s (a sheet-flow speed: one cell per cellSize / flowSpeed seconds).
Optionalinfiltration?: numberWater soaking into the ground, mm/h.
Optionalorigin?: [number, number]World x, z of the field's minimum corner (cell (i, k) is centred at origin + (i + ½, k + ½)·cellSize).
Optionalresolution?: [number, number]Cells along x and z. Fixed at construction.
OptionalwetTime?: numberSeconds for a dry surface to get wet under rain (e-folding).
Optionalheight: MPMHeightFn | nullOne internal step of dt seconds: rain, flow, losses, wetness.
Advances dt seconds with rain falling at rain mm/h (0: dry weather) in fixed internal steps. Past
64 steps (fast-forward) the steps lengthen instead: water and time stay exact, levelling lags.
Total standing water, m³.
Rain water on terrain as a CPU height field: rain adds depth everywhere, water runs downhill and levels out (an explicit, mass-conserving relaxation of the water surface between neighbouring cells), soaks in and evaporates, so it gathers in low spots as puddles that grow while it rains and drain or dry when it stops. It also keeps a surface
wetness0…1. Both are plain row-major arrays from (minX, minZ), the layout of threejs-weathering's state field, for weathering and rendering to read. Deterministic (fixed internal step).