threejs-worldgen
    Preparing search index...

    Interface OceanSettings

    Every setting of an Ocean. All optional on input; see OceanInput.

    interface OceanSettings {
        altitudeFactor: number;
        deepColor: string;
        detail: number;
        detailScale: number;
        detailSpeed: number;
        environment: Texture<unknown, TextureEventMap> | null;
        environmentIntensity: number;
        foam: number;
        foamColor: string;
        foamWidth: number;
        horizonColor: string;
        innerRadius: number;
        origin: [x: number, y: number, z: number];
        radius: number;
        range: number;
        reanchorDistance: number;
        reflectivity: number;
        refraction: number;
        roughness: number;
        seaLevel: number;
        segments: number;
        shallowColor: string;
        skyColor: string;
        specular: number;
        sun: DirectionalLight | null;
        visibility: number;
        waves: WaveOptions;
        whitecaps: number;
    }

    Hierarchy (View Summary)

    Index
    altitudeFactor: number

    Inner ring radius as a fraction of the camera's height above the sea (rounded down to a power of two).

    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.

    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.

    innerRadius: number

    Smallest inner ring radius, metres (the finest vertex spacing, right under the camera).

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

    World position (planet-centred, metres) that is (0, 0, 0) in render space. Keep it near the camera for float32 precision.

    radius: number

    Planet radius, metres, when no world is given; 0 = flat world.

    range: number

    Outer radius ÷ inner radius of the ring grid. Sets the ring count (≈ 330 at 1e7 and 128 segments).

    reanchorDistance: number

    Planets: distance (metres) the camera travels before the wave frame is re-anchored. Phases stay continuous.

    reflectivity: number

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

    refraction: number

    Screen-space refraction strength (0 = none).

    roughness: number

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

    seaLevel: number

    Sea level, metres, when no world is given (a world's seaLevel wins).

    segments: number

    Vertices around each ring. Vertex spacing ≈ distance × 2π / segments, so the grid looks the same at every scale.

    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.

    The wind sea.

    whitecaps: number

    0 … 1 foam on the sharpest crests.