hex-world
    Preparing search index...

    Interface FoliageTintOptions

    How foliage turns through the year. All fields optional — unset fields keep their current value. See FOLIAGE_GLSL for what each one does to the math.

    interface FoliageTintOptions {
        summer?: ColorRepresentation;
        spring?: ColorRepresentation;
        autumn?: ColorRepresentation;
        bare?: ColorRepresentation;
        greenTemp?: number;
        bareTemp?: number;
        strength?: number;
        select?: number;
        variance?: number;
        blossom?: ColorRepresentation;
        blossomAlt?: ColorRepresentation;
        blossomShare?: number;
        blossomStrength?: number;
    }
    Index

    Properties

    summer?: ColorRepresentation

    The surface's own as-authored green — the reference the whole palette is applied relative to, so high summer is exactly a no-op. attachSeasonalTint defaults it to the material's color; HexWorld resolves the terrain's from the pack (see resolveFoliageColor).

    spring?: ColorRepresentation

    Colour of new growth, seen on the way up from bare. Default a fresh yellow-green.

    autumn?: ColorRepresentation

    Colour of the turn, seen on the way down to bare. Default a burnt gold.

    bare?: ColorRepresentation

    Winter's dormant colour, at and below bareTemp. Default a grey-brown.

    greenTemp?: number

    Season-adjusted temperature at or above which foliage is fully green. Default 0.5.

    bareTemp?: number

    …and at or below which it is fully bare. Default 0.26 — above the snowline, so leaves turn before snow lies.

    strength?: number

    Overall strength, 0 (no tint) to 1 (the full palette). Default 1.

    select?: number

    How strictly the tint is confined to the green parts of the surface: 1 leaves bark, rock and sand alone, 0 tints everything evenly. Default 1; use 0 on a mesh that is foliage all over.

    variance?: number

    How far individual plants stray from the shared autumn colour, 0–1. Default 0.5.

    blossom?: ColorRepresentation

    Petal colour of a plant in bloom. Individual plants land somewhere between this and blossomAlt, so one wood carries a range. Default a soft pink.

    blossomAlt?: ColorRepresentation

    The other end of the blossom range. Default a pale blue.

    blossomShare?: number

    Fraction of plants that flower at all, 0–1. Default 0.5.

    blossomStrength?: number

    How thickly petals cover a flowering plant at the peak of the bloom, 0 (never flowers) to 1 (petals only). attachSeasonalTint switches this on at 0.85; it is 0 everywhere else, which is what keeps the terrain from flowering.