hex-world
    Preparing search index...

    Interface LiquidTypeDescriptor

    Serializable description of one liquid surface type (water, lava, acid, …). Embed in map save files via MapSerializer alongside TerrainDescriptors.

    interface LiquidTypeDescriptor {
        id: string;
        name: string;
        noiseScale?: number;
        perturbStrength?: number;
        surfaceLift?: number;
        shallowColor?: number;
        deepColor?: number;
        foamColor?: number;
        opacity?: number;
        flowSpeed?: number;
        emissiveColor?: number;
        emissiveStrength?: number;
        waveScale?: number;
        foamIntensity?: number;
        freezePoint?: number;
        freezeBand?: number;
        iceColor?: number;
        iceOpacity?: number;
        sprayIntensity?: number;
        sprayColor?: number;
        sprayRise?: number;
        sprayArc?: number;
        sprayDrift?: number;
        spraySize?: number;
        poolScale?: number;
    }
    Index

    Properties

    id: string

    Stable string key — used in save files and to link TerrainDescriptor.liquidType.

    name: string

    Display name for editors and HUDs.

    noiseScale?: number

    Per-type geometry overrides merged over the global WaterGeometryOptions. Leave undefined to inherit the global setting.

    perturbStrength?: number
    surfaceLift?: number
    shallowColor?: number

    Hex colors (e.g. 0x4a8fb5) used by resolveLiquidMaterials to build the material set. Omit to use the built-in water defaults.

    deepColor?: number
    foamColor?: number
    opacity?: number

    Surface alpha, 0–1. Default 0.82 (0.78 for rivers). Lava wants ~1.0 — translucency is the biggest "tinted water" tell for thick liquids.

    flowSpeed?: number

    Animation time multiplier for waves, foam, and river flow. 1 = water default. Lava crawls around 0.2–0.3; energetic liquids go above 1.

    emissiveColor?: number

    Hex color added as self-illumination, scaled by emissiveStrength. Emissive light is only partially dimmed by fog-of-war so lava keeps a glow in explored-but-unseen cells.

    emissiveStrength?: number

    Emissive intensity, 0 = none (default). The built-in lava uses 0.6.

    waveScale?: number

    Surface-noise frequency multiplier. <1 = broader, slower-looking swells. Default 1.

    foamIntensity?: number

    Shore/estuary foam intensity multiplier. 0 disables foam. Default 1.

    freezePoint?: number

    The season-adjusted temperature at or below which this liquid turns solid, on the same 0–1 scale as the generator's temperature field (0 = polar, 1 = equatorial). Omit for a liquid that never freezes.

    A point rather than a flag, because substances don't all give up at the same cold: water skins over across a good part of the map in deep winter (0.12), a low-freezing liquid might only seize at the poles (0.03), and lava simply never does. Set it and the liquid's surface, shore, estuary, river, and waterfall materials all still their motion and go over to LiquidTypeDescriptor.iceColor together.

    Compare against it on the CPU with ClimateData.isFrozen(col, row, freezePoint) — the same number the shader uses, so gameplay and rendering agree.

    freezeBand?: number

    How wide the thaw/freeze transition is around LiquidTypeDescriptor.freezePoint. Larger values give a longer stretch of half-frozen surface. Default 0.06.

    iceColor?: number

    Hex color a frozen surface blends toward. Default a pale blue-white (0xdce9f2).

    iceOpacity?: number

    Surface alpha once fully frozen. Higher than LiquidTypeDescriptor.opacity on purpose — ice you can see straight through reads as water that merely stopped moving. Default 0.97.

    sprayIntensity?: number

    Spray density multiplier. 0 emits no mist particles (the plunge pool still renders — silence that with foamIntensity: 0). Default 1.

    sprayColor?: number

    Hex color of the mist. Defaults to foamColor — override where the vapor a liquid throws isn't the color of its foam (lava's ash, acid's fumes).

    sprayRise?: number

    How far a puff climbs over its life, world units — the liquid's "energy" knob. Mist rises monotonically (no ballistic arc), so this is the height the cloud reaches. Default 0.75; a viscous liquid barely clears its pool at ~0.3.

    sprayArc?: number

    Whether the spray rises or is thrown, 0–1 — the axis that separates the two things "spray" can mean.

    At 0 it is mist: it climbs steadily, wanders on turbulence, swells and thins as it goes, and never falls back. At 1 it is spatter: a real ballistic arc that peaks and lands, flying outward from the impact, holding its size and opacity until it dies, and largely ignoring air currents. Per-particle alpha is allowed higher as this rises, since thrown droplets separate instead of stacking up.

    Default 0. Water and acid are mist; the built-in lava is 1.

    sprayDrift?: number

    How far downstream spray carries over its life, world units. Default 0.55.

    spraySize?: number

    Particle size in pixels at 110 world units of depth (attenuation is clamped, so this is not the on-screen size up close). Default 3.5. Bigger reads as slow smoke or steam, smaller as fine water mist.

    poolScale?: number

    Plunge-pool footprint multiplier, relative to the width of the falling sheet. Default 1; below that the churn stays tight under the fall.