hex-world
    Preparing search index...

    Interface MapGeneratorConfig

    Single config object for the full procedural pipeline. All sub-configs are optional — each phase falls back to its own defaults.

    interface MapGeneratorConfig {
        landPercentage?: number;
        chunkSizeMin?: number;
        chunkSizeMax?: number;
        jitterProbability?: number;
        sinkProbability?: number;
        elevationMax?: number;
        elevationMin?: number;
        seedPlacement?: "uniform" | "accrete" | "scatter";
        scatterGap?: number;
        chunkElongation?: number;
        seedArcs?: number;
        peninsulaProbability?: number;
        coastWarp?: number;
        coastShaping?: number;
        erosionPercentage?: number;
        climate?: ClimateSimulatorOptions;
        temperature?: TemperatureModelOptions;
        biomes?: BiomeAssignerOptions;
        rivers?: ClimateRiverOptions;
        roads?: RoadGeneratorOptions;
        climateData?: ClimateData;
        mountainRanges?: number;
        rangeUplift?: number;
        mapBorderX?: number;
        mapBorderZ?: number;
        regionBorder?: number;
        regionCount?: number;
        volcanoes?: number;
        volcanoRadius?: number;
        volcanoHeight?: number;
        volcanoLavaTerrain?: number;
        volcanoAshTerrain?: number;
        volcanoAshRadius?: number;
        volcanoSmokeLayer?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    landPercentage?: number

    Target percentage of map cells that will be above water (0–100). Default 50.

    chunkSizeMin?: number

    Minimum cells in a single raised or sunk chunk. Default 30.

    chunkSizeMax?: number

    Maximum cells in a single raised or sunk chunk. Default 100.

    jitterProbability?: number

    Probability (0–0.5) that a neighbour's BFS priority is increased by 1 (jitter). Default 0.25.

    sinkProbability?: number

    Probability that an iteration sinks terrain instead of raising it. Default 0.2.

    elevationMax?: number

    Maximum land elevation value. Default 12.

    elevationMin?: number

    Minimum water elevation value (ocean floor). Default -5.

    seedPlacement?: "uniform" | "accrete" | "scatter"

    Where raise chunks seed. 'uniform' picks anywhere in the region (default); 'accrete' seeks the coast of existing land, so the landmass grows as one coherent body; 'scatter' seeks open water away from existing land, so chunks become separate islands. Sinks under either non-uniform mode seek the coast, so they carve bays instead of deepening open ocean.

    scatterGap?: number

    Open-water clearance a 'scatter' seed keeps from existing land, in cells. Small values pack islands into dense chains with narrow channels; large values spread them far apart. 0 or unset = one chunk radius (auto).

    chunkElongation?: number

    Stretch factor for chunk growth. 1 grows round chunks (default); higher values grow lens-shaped chunks along a random per-chunk axis, which union into elongated, geological-looking landmasses instead of round blobs.

    seedArcs?: number

    Number of guide curves per region that 'scatter' seeds are sampled along instead of uniformly. Islands then form chains and arcs — the visual signature of real archipelagos. Default 0 (off; plain scatter).

    peninsulaProbability?: number

    Probability (0–1) that a raise round grows a walked chunk sequence — each chunk seeded a step past the last along a drifting heading — instead of a single chunk. Produces peninsulas, capes, and isthmuses reaching out of the landmass. Needs at least one prior chunk to anchor on. Default 0.

    coastWarp?: number

    Amplitude of a shared multi-octave noise field added to the BFS growth priority, in priority steps. All chunks share the field, so their boundaries follow common contours: coasts develop coherent lobes and bights at the low frequency and fractal texture at the higher octaves, instead of the uniform per-cell fuzz jitter alone produces. Default 0.

    coastShaping?: number

    How strongly land elevation is pulled toward a distance-from-coast profile, 0–1. 0 leaves the stacked chunk heights alone (default); 1 replaces them outright. Mid values keep the chunk detail but make elevation rise inland — coastal lowlands, high interior — which is how continents read.

    erosionPercentage?: number

    Percentage of the initial erodible-cell count to eliminate (0–100). Default 50.

    climateData?: ClimateData

    Optional sink for the temperature and moisture fields the pipeline computes on its way to biomes. Without it those fields are used and discarded; pass a ClimateData sized to the map and they land in its base channels, ready for a SeasonCycle to derive snow and ice from at render time.

    The pipeline fills the base tier only — it never writes snow or ice, so handing it a ClimateData mid-campaign will not thaw anything.

    mountainRanges?: number

    Number of mountain ranges to raise across the landmass. Default 0 (off).

    rangeUplift?: number

    Peak uplift added along a range's spine, falling off by 1 per cell of distance — so it is also the half-width of the range. Default 4.

    mapBorderX?: number

    Water-buffer cells on left/right edges. Default 5.

    mapBorderZ?: number

    Water-buffer cells on top/bottom edges. Default 5.

    regionBorder?: number

    Gap between adjacent region spawn zones (each side). Default 5.

    regionCount?: number

    Number of independent spawn regions (1–4). Default 1.

    volcanoes?: number

    Number of volcanoes to raise. Default 0 (off).

    volcanoRadius?: number

    Radius of the cone in cells, rim crest to the foot of the flanks. Default 4.

    volcanoHeight?: number

    Rim height above the ground the cone is built on, in elevation steps. Default 5.

    volcanoLavaTerrain?: number

    Terrain index for the caldera pool. Should belong to a liquid type (the built-in lava is the obvious one) so the pool renders as a surface; omit for a dry crater floored with VolcanoOptions.volcanoAshTerrain.

    volcanoAshTerrain?: number

    Terrain index for the cone and the ash apron around it. Default Rock (4); pass VOLCANIC_ASH_TERRAIN_DESCRIPTOR's index for a dark ash field.

    volcanoAshRadius?: number

    How far past the foot of the cone ash falls, feathering out. Default 1.5 × radius.

    volcanoSmokeLayer?: number

    Feature layer to write smoke density into: 2 on the rim (about half its slots, at the middle and small tiers), nothing elsewhere — fumaroles, not a wall of cloud. Omit to leave every layer alone. Pair it with a scatter definition on that layer (see createSmokeGeometry).