hex-world
    Preparing search index...

    Interface HexWorldSeasonOptions

    Season options plus the rendering and wiring knobs HexWorld.setSeasons adds.

    interface HexWorldSeasonOptions {
        phase?: number;
        scope?: SeasonScope;
        daysPerYear?: number;
        dayLength?: number;
        paused?: boolean;
        polarAmplitude?: number;
        equatorAmplitude?: number;
        hemisphere?: "both" | "north" | "south";
        localSummer?: number;
        localAmplitude?: number;
        localVariation?: number;
        snowThreshold?: number;
        band?: number;
        accumulationRate?: number;
        meltRate?: number;
        enabled?: boolean;
        color?: ColorRepresentation;
        slope?: number;
        noise?: number;
        snowTerrain?: number;
        foliage?: FoliageTintOptions;
        temperature?: TemperatureModelOptions;
        applyInterval?: number;
        terrainFoliage?: FoliageTintOptions;
    }

    Hierarchy (View Summary)

    Index

    Properties

    phase?: number

    Starting phase, 0–1 with 0 = midwinter and 0.5 = midsummer. Default 0.25 (spring).

    scope?: SeasonScope

    Whether the map spans a range of climates or sits inside one. Default 'continental'. See SeasonScope — this picks which set of options below has any effect.

    daysPerYear?: number

    Days in a year — how many day/night cycles the phase takes to come around. Default 8.

    dayLength?: number

    Real seconds per day, matching DayNightOptions.dayLength, for SeasonCycle.advance. Default 120.

    paused?: boolean

    Start with the phase frozen (drive it via setPhase). Default false.

    polarAmplitude?: number

    How far midwinter drags the temperature down at the poles, in temperature-field units (the same 0–1 scale computeTemperature writes). Default 0.55.

    equatorAmplitude?: number

    The same swing at the equator. Much smaller than polarAmplitude on purpose — that gap is what makes the snowline descend the map through autumn rather than the whole world fading white at once. Default 0.08.

    hemisphere?: "both" | "north" | "south"

    Which map edge is the equator. Must match the map's TemperatureModelOptions. Default 'both'.

    localSummer?: number

    Local scope: the temperature the whole map sits at in high summer. Wants to be clear of the foliage tint's greenTemp (0.5) so midsummer is unambiguous everywhere. Default 0.78.

    localAmplitude?: number

    Local scope: how far midwinter pulls that down. Wants to carry the map past every threshold that matters — bareTemp (0.26), snowThreshold (0.22), water's freezePoint (0.12) — or winter never fully arrives. Default 0.72.

    localVariation?: number

    Local scope: how much the map's own temperature field staggers the turn, so the whole map doesn't flip on one frame. The field is reused as the stagger rather than as the climate — scaled this far down, its latitude ramp reads as a few cells turning first, and its elevation cooling as the high ground leading, which is exactly the variation a valley should show.

    Deliberately small: the stagger has to be narrower than the swing, or the promise that a hard winter strips every tree stops holding. Default 0.1.

    snowThreshold?: number

    Effective temperature at or below which snow lies. Default 0.22.

    band?: number

    Width of the soft edge on the snow threshold. Larger = a hazier snowline. Default 0.1.

    accumulationRate?: number

    Snow depth gained per second when SeasonCycle.apply is given a dt. Default 0.35.

    meltRate?: number

    Snow depth lost per second when melting. Faster than it falls, as thaws go. Default 0.5.

    enabled?: boolean

    Show or hide snow. Defaults to true when configureSeason is called.

    color?: ColorRepresentation

    Tint multiplied over the snow color. Default white (the pack's snow texture as authored).

    slope?: number

    How strongly slope sheds snow: 1 leaves cliff faces bare, 0 buries everything regardless of angle. Default 1.

    noise?: number

    How much noise frays the snowline. 0 is a clean contour. Default 0.5.

    snowTerrain?: number

    Texture-array layer holding the snow surface, for materials that sample the terrain atlas. -1 falls back to a flat SnowAppearanceOptions.color. ChunkManager resolves this from the pack's snow terrain automatically.

    Foliage tint styling, for materials carrying attachSeasonalTint or the terrain shader.

    Options to rebuild the base temperature field with when no ClimateData is supplied. Pass the same ones the map was generated with — climateData.temperatureOptions records them — or the seasons will be computed against a different climate than the biomes were.

    applyInterval?: number

    Seconds between seasonal passes over the map. The pass is O(cells), so on a continent-scale map running it every frame is waste — snow does not move fast enough to notice. Default 0.25.

    terrainFoliage?: FoliageTintOptions

    Foliage styling for the ground only, applied over SeasonAppearanceOptions.foliage.

    The two want to differ. Ground cover turns straw where a wood turns gold, and the terrain shader ships that way already — this is for tuning it without dragging every tree along, which is what setting foliage alone would do.

    world.setSeasons({ terrainFoliage: { autumn: 0xc9b070, strength: 0.8 } });