threejs-worldgen
    Preparing search index...

    Interface RiversProps

    Props of <Rivers>: every RiversInput setting plus the ones below.

    interface RiversProps {
        buildBudget?: number;
        camera?: Camera;
        deepColor?: string;
        detail?: number;
        detailScale?: number;
        detailSpeed?: number;
        environment?: Texture<unknown, TextureEventMap> | null;
        environmentIntensity?: number;
        expand?: number;
        flowPeriod?: number;
        flowSpeed?: number;
        foam?: number;
        foamColor?: string;
        foamWidth?: number;
        horizonColor?: string;
        maxDistance?: number;
        maxFlowSpeed?: number;
        minFlowSpeed?: number;
        minStrength?: number;
        origin?: [x: number, y: number, z: number];
        rapids?: number;
        ref?: Ref<Rivers | null>;
        reflectivity?: number;
        refraction?: number;
        reframeDistance?: number;
        resolution?: number;
        roughness?: number;
        shallowColor?: string;
        skyColor?: string;
        specular?: number;
        sun?: DirectionalLight | null;
        surfaceOffset?: number;
        tileSize?: number;
        visibility?: number;
        world: World;
    }

    Hierarchy (View Summary)

    Index
    buildBudget?: number

    Milliseconds per frame spent building tiles, nearest first.

    camera?: Camera

    Camera the tiles stream around. Defaults to the R3F default camera.

    deepColor?: string

    Colour of deep water: what you see where the bottom is out of sight.

    detail?: number

    Strength of the procedural ripple normals added on top of the waves.

    detailScale?: number

    Ripple wavelength, metres.

    detailSpeed?: number

    Ripple drift speed, m/s.

    environment?: Texture<unknown, TextureEventMap> | null

    Environment reflected (an equirect or cube texture, prefiltered for you). null = the sky colours. Object input.

    environmentIntensity?: number

    Multiplier on environment reflections.

    expand?: number

    Cells the water surface extends past the wet area, so it tucks under the banks.

    flowPeriod?: number

    Seconds per flow-map cycle. Longer = less visible reset, more stretching.

    flowSpeed?: number

    Surface speed (m/s) at a 1% slope; speed grows with √slope.

    foam?: number

    0 … 1 overall foam amount (shoreline, whitecaps and rapids).

    foamColor?: string

    Foam colour.

    foamWidth?: number

    Water depth (metres) below which shoreline foam appears.

    horizonColor?: string

    Sky colour reflected near the horizon when there is no environment.

    maxDistance?: number

    Radius around the camera that has river meshes, metres. Nothing is built while the camera is higher than this.

    maxFlowSpeed?: number

    Fastest flow, m/s.

    minFlowSpeed?: number

    Slowest flow, m/s (flat stretches still drift).

    minStrength?: number

    River channel strength (the world's river, 0 … 1) where water starts.

    origin?: [x: number, y: number, z: number]

    World position that is (0, 0, 0) in render space (floating origin).

    rapids?: number

    Flow speed (m/s) where rapids start foaming.

    ref?: Ref<Rivers | null>

    Receives the underlying Rivers (for stats, …).

    reflectivity?: number

    Reflectance looking straight down (Fresnel F0); water is 0.02.

    refraction?: number

    Screen-space refraction strength (0 = none).

    reframeDistance?: number

    Planets: distance (metres) from the tile frame's centre at which a new frame is centred on the camera.

    resolution?: number

    Grid cells per tile side. Cell size = tileSize / resolution.

    roughness?: number

    Surface roughness 0 … 1 (blurs reflections and widens the sun glint). Grows by itself with distance.

    shallowColor?: string

    Tint of light that crossed shallow water (#rrggbb).

    skyColor?: string

    Sky colour reflected near the zenith when there is no environment.

    specular?: number

    Multiplier on the sun's glint.

    sun?: DirectionalLight | null

    Light for the sun glint and daylight. null = the first DirectionalLight found in the scene. Object input.

    surfaceOffset?: number

    Raises (or lowers) the water surface, metres.

    tileSize?: number

    Edge length of a streaming tile, metres.

    visibility?: number

    Metres of water after which ~63% of the view through it is replaced by deepColor.

    world: World

    World whose rivers to draw. A different world recreates the tiles.