Tidewater: Oceans, Lakes, Rivers, Waterfalls, Swimming and Splashes Water Kit
README.md
kind_river
Builds Tidewater river water (see ARCHITECTURE.md, "The kind contract").
Water.create({ kind = "river", preset = "mountainRapids", look = "painted", position = { 0, 0, 0 },
path = { { 0, 14, 0 }, { 30, 11, 4 }, { 60, 4, -2 }, { 100, 3, 0 } } })
A smooth ribbon along a centripetal Catmull-Rom spline through path (upstream first, entity space),
heights kept running downhill, laid on a ground entity's rendered surface when one is given. The
current follows the spline tangent at Manning's speed from the local slope (faster where steeper);
steep reaches (rapidsSlope) or rapids turn white: torn foam streaks, standing waves, turbulent
normals, spray emitters. Physics: a grid body with per-texel flow, so Physics.water,
Water.flowAt, FluidForces and Buoyancy carry floating bodies downstream. With no ground it
carves its own bed and banks (bed = false turns that off).
Options: path, width, depth, ground, groundOffset, bed, bankWidth, bankHeight, step,
widthVariation, flowScale, minSpeed, maxSpeed, roughness, rapids, rapidsSlope,
shallow, deep, scatter, absorption, turbidity, foam, foamAmount, bankFoam,
rapidsFoam, waveHeight, rippleStrength, flowTile, flowPeriod, riffle, caustics, rain.
Presets: forestRiver (default), mountainRapids, lazyLowland, muddyFlood, glacialMeltwater, canal.
Each carries a demoPath used when no path is given. setLook is live (lowpoly rebuilds a coarse
faceted mesh). Handle extras: sampleAt(s) -> x, y, z, speed, rapids along the centreline.