threejs-worldgen
    Preparing search index...

    Interface LakesOptions

    Options for Lakes.create.

    interface LakesOptions {
        camera?: Camera | null;
        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;
        frame?: LocalFrame | null;
        horizonColor?: string;
        hydrology: HydrologyResult;
        maxFlowSpeed?: number;
        minFlowSpeed?: number;
        origin?: [x: number, y: number, z: number];
        rapids?: number;
        reflectivity?: number;
        refraction?: number;
        renderer?: WaterRenderer;
        rivers?: boolean;
        roughness?: number;
        scene?: Object3D<Object3DEventMap>;
        shallowColor?: string;
        skyColor?: string;
        specular?: number;
        sun?: DirectionalLight | null;
        visibility?: number;
        waves?: Partial<WaveOptions>;
        whitecaps?: number;
    }

    Hierarchy (View Summary)

    Index
    camera?: Camera | null

    Camera, for the per-pixel detail fade (its field of view). Optional.

    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 each lake surface extends past its shore, so it tucks under the banks.

    flowPeriod?: number

    Seconds per flow-map cycle on the rivers.

    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.

    frame?: LocalFrame | null

    Frame the hydrology was sampled in (e.g. world.frame); omit for a flat world in world coordinates.

    horizonColor?: string

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

    hydrology: HydrologyResult

    Lakes and rivers to draw, from analyzeHydrology / computeHydrology.

    maxFlowSpeed?: number

    Fastest flow, m/s.

    minFlowSpeed?: number

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

    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 river rapids start foaming.

    reflectivity?: number

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

    refraction?: number

    Screen-space refraction strength (0 = none).

    renderer?: WaterRenderer

    A WebGPURenderer; initialised if needed.

    rivers?: boolean

    Also draw the hydrology rivers (as ribbons along their polylines, at their water surface).

    roughness?: number

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

    scene?: Object3D<Object3DEventMap>

    If given, lakes are added to it and update whenever it renders.

    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.

    visibility?: number

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

    waves?: Partial<WaveOptions>

    Wave settings to change.

    whitecaps?: number

    0 … 1 foam on the sharpest crests.