threejs-worldgen
    Preparing search index...

    Interface FluidSurfaceConfig

    Construction options: settings plus object inputs.

    interface FluidSurfaceConfig {
        absorption?: [number, number, number];
        edge?: number;
        envMap?: Texture<unknown, TextureEventMap> | null;
        foam?: number;
        foamColor?: string;
        foamDensity?: number;
        foamSpeed?: [number, number];
        ior?: number;
        iterations?: number;
        lighting?: ParticleLighting;
        mist?: number;
        mistSize?: number;
        radius?: number;
        refraction?: number;
        resolution?: number;
        roughness?: number;
        scatterColor?: string;
        shutter?: number;
        sky?: [string, string, string];
        smoothing?: number;
        spray?: [number, number];
        streaks?: number;
        tagRadius?: number;
        turbidity?: number;
    }

    Hierarchy (View Summary)

    Index
    absorption?: [number, number, number]

    Beer–Lambert absorption of the water, per metre (linear RGB): pure water loses red first.

    edge?: number

    Water thickness (m) over which the rim of the water fades in (anti-aliased edges; a thin film is still a reflecting surface).

    envMap?: Texture<unknown, TextureEventMap> | null

    Environment for reflections, e.g. scene.environment (PMREM, equirectangular or cube; default: the sky gradient).

    foam?: number

    Most whitewater coverage, 0…1.

    foamColor?: string

    Colour of whitewater (aerated, fast or broken water), #rrggbb.

    foamDensity?: number

    How opaque aerated water gets per metre of thickness (whitewater is translucent where thin).

    foamSpeed?: [number, number]

    Speeds (m/s) over which water turns to whitewater: none below the first, all above the second.

    ior?: number

    Index of refraction (sets the Fresnel reflectance; 1.333 for water).

    iterations?: number

    Smoothing passes (each a horizontal and a vertical blur), 0…4.

    lighting?: ParticleLighting

    Sun and sky light (default: a new one; call fluid.lighting.fromScene(scene)).

    mist?: number

    Opacity of one spray particle's mist.

    mistSize?: number

    Width of a spray particle's mist, in particle spacings.

    radius?: number

    Particle sphere radius, in particle spacings (Δx/2). About 1 makes neighbours overlap into one surface.

    refraction?: number

    How far the background shifts through the surface, per metre of water thickness (screen fraction).

    resolution?: number

    Resolution of the offscreen passes relative to the drawing buffer (0.25…1).

    roughness?: number

    Microfacet roughness of the sun highlight (0.02 glassy … 0.3 rippled).

    scatterColor?: string

    Colour of the in-scattered light (silt, algae), #rrggbb.

    shutter?: number

    Exposure time of the mist's motion blur, seconds (streak length = speed × shutter).

    sky?: [string, string, string]

    Reflected sky when no envMap: zenith, horizon and ground colours, #rrggbb (scaled by the lighting's ambient).

    smoothing?: number

    Depth smoothing radius, in particle radii (world space; the bilateral filter keeps silhouettes).

    spray?: [number, number]

    Spray: water where the solver's grid is nearly empty (a node mass of a full cell of 1000 kg/m³ = 1) is drawn as soft mist, not as surface; all mist below the first value, all surface above the second (needs a source with a grid).

    streaks?: number

    Contrast of the flow-aligned streaks in falling whitewater, 0…1.

    tagRadius?: number

    Radius multiplier of tagged particles (buffers.state.z ≠ 0, e.g. rain splashes): small drops, not blobs.

    turbidity?: number

    In-scattering by suspended matter, per metre: 0 is glass-clear, tens is opaque mud within centimetres.