threejs-worldgen
    Preparing search index...

    Interface PrecipitationConfig

    Construction options for Precipitation: settings plus the objects it works with.

    interface PrecipitationConfig {
        camera: Camera;
        ground?: ((x: number, z: number) => number) | null;
        heavyRate?: number;
        height?: number;
        maxRain?: number;
        maxSnow?: number;
        override?: PrecipitationOverride | null;
        radius?: number;
        rain?: Partial<RainLook>;
        seed?: string | number;
        snow?: Partial<SnowLook>;
        splashes?: Partial<SplashLook>;
        weather: Weather;
    }

    Hierarchy (View Summary)

    Index
    camera: Camera

    Camera the particles surround.

    ground?: ((x: number, z: number) => number) | null

    Ground height (x, z) => y in frame coordinates for splashes. Default: the weather's world.

    heavyRate?: number

    Precipitation rate (mm/h) that shows every particle.

    height?: number

    Height of the particle box, metres.

    maxRain?: number

    Raindrops at full rain.

    maxSnow?: number

    Snowflakes at full snow.

    override?: PrecipitationOverride | null

    Fixed conditions instead of the weather (demos, cutscenes): rate in mm/h, snow share 0…1 and wind [x, z] m/s. null reads the weather at the camera.

    radius?: number

    Half-width of the particle box around the camera, metres.

    rain?: Partial<RainLook>

    Rain look to change.

    seed?: string | number

    Seed for particle placement.

    snow?: Partial<SnowLook>

    Snow look to change.

    splashes?: Partial<SplashLook>

    Splash look to change.

    weather: Weather

    Weather to read (rate, rain/snow, wind).