threejs-worldgen
    Preparing search index...

    Module threejs-water

    Oceans, lakes and rivers for three.js (WebGPU / TSL), from an ant on the beach to orbit:

    • Ocean: a sea-level surface for flat worlds and planets, Gerstner waves, refraction, depth-tinted colour, shoreline foam and whitecaps, one draw call at every altitude.
    • Rivers: streamed river surfaces for a threejs-biomes world, with flow-mapped water.
    • Bounded-map hydrology (computeHydrology): depression filling, flow routing and accumulation, rivers and lakes, plus height modifiers that carve the rivers; Lakes draws it.
    • Queries (waterAt, hydrologyWaterAt, Ocean.waterAt) for gameplay and buoyancy.
    Lakes
    Ocean
    Rivers
    HydrologyGrid
    HydrologyOptions
    HydrologyRegion
    HydrologyResult
    Lake
    LakesOptions
    LakesSettings
    OceanOptions
    OceanSample
    OceanSettings
    OceanStats
    RiverFlowOptions
    RiverPath
    RiversOptions
    RiversSettings
    RiversStats
    WaterAppearance
    WaterRenderer
    WaterSample
    WaterSource
    Wave
    WaveOptions
    WaveSample
    LakesInput
    ModifierFrame
    OceanInput
    RiversInput
    WaterUniforms
    DEFAULT_APPEARANCE
    DEFAULT_HYDROLOGY
    DEFAULT_LAKES
    DEFAULT_OCEAN
    DEFAULT_RIVERS
    GRAVITY
    MAX_WAVES
    analyzeHydrology
    applyAppearance
    applyWaves
    computeHydrology
    createRingGeometry
    createWaterMaterial
    createWaterSample
    createWaterUniforms
    createWaves
    crestSharpness
    fillDepressions
    flowAccumulation
    flowReceivers
    hydrologyWaterAt
    riverFlow
    riverModifiers
    sampleGrid
    sampleWaves
    setWavePhases
    updateSun
    waterAt