threejs-worldgen
    Preparing search index...

    Interface WaveOptions

    A parametric set of Gerstner waves: a wind sea built from a handful of numbers.

    interface WaveOptions {
        amplitude: number;
        choppiness: number;
        count: number;
        direction: [x: number, z: number];
        seed: string | number;
        speed: number;
        spread: number;
        wavelength: [min: number, max: number];
    }
    Index
    amplitude: number

    Amplitude of the longest wave, metres. Shorter waves scale down with their wavelength (constant steepness).

    choppiness: number

    0 … 1: horizontal displacement that sharpens crests and flattens troughs (1 = circular orbits, capped before crests fold).

    count: number

    Number of waves summed, 0 … 16. More = less regular, a little more GPU time.

    direction: [x: number, z: number]

    Wind direction as [x, z] in the surface's tangent plane (east, south). Normalised internally.

    seed: string | number

    Seed for wavelength jitter and directions.

    speed: number

    Time multiplier (1 = real deep-water speed).

    spread: number

    0 … 1: how far wave directions fan out from the wind (1 = up to ±90°).

    wavelength: [min: number, max: number]

    Shortest and longest wavelength, metres.