hex-world
    Preparing search index...

    Interface WindOptions

    How the world's wind blows. Unset fields keep their current value.

    interface WindOptions {
        vector?: Vector2;
        heading?: number;
        speed?: number;
        gustiness?: number;
        gustPeriod?: number;
        turbulence?: number;
        referenceSpeed?: number;
        swayRate?: number;
        waveLength?: number;
        waterDrift?: number;
    }
    Index

    Properties

    vector?: Vector2

    Sustained wind in world units/sec, as an XZ vector. Default (1.6, 0.9).

    heading?: number

    Sustained wind as a heading in radians, measured from +X toward +Z. Applied with WindOptions.speed; either may be given alone.

    speed?: number

    Sustained wind speed in world units/sec. Applied with WindOptions.heading.

    gustiness?: number

    How far gusts swing the surface wind either side of the sustained value, as a fraction of it. 0 is a dead-steady breeze. Default 0.35.

    gustPeriod?: number

    Seconds between gust peaks. Default 7.

    turbulence?: number

    How far, in radians, gusts swing the surface wind's direction either side of the sustained heading. Default 0.12 (about 7°).

    referenceSpeed?: number

    The speed that counts as a full wind — the one Wind.strength reports as 1, and that a sway amplitude is authored against. Default 5.

    swayRate?: number

    Sway oscillation rate in radians/sec at the reference speed. Default 2.6.

    waveLength?: number

    Distance in world units between successive gust crests as they travel downwind. Sets how big a patch of wood leans together. Default 26.

    waterDrift?: number

    Fraction of the wind speed at which a water surface's ripple pattern marches downwind. Default 0.02.

    Tiny, and for a reason worth knowing before raising it: the liquid shaders sample their surface noise at worldXZ * 4.5, so one world unit of drift carries the pattern across four and a half noise features. The water's own wave animation runs at 0.2 noise-units/sec, and anything much past that stops reading as a breeze over a lake and starts reading as a river in spate. At this default a stiff wind adds roughly a third of a feature per second — a visible march that still sits under the water's own motion.