threejs-worldgen
    Preparing search index...

    Interface TreeParams

    Every parameter of a generated tree or plant. All lengths are metres. Plain JSON.

    interface TreeParams {
        attractionPoints: number;
        barkColor: string;
        barkContrast: number;
        barkMarks: number;
        baseRadius: number;
        buttress: number;
        crownHeight: number;
        crownRadius: number;
        crownShape: CrownShape;
        densityVariation: number;
        fruit: number;
        fruitColors: string[];
        fruitSize: number;
        height: number;
        hueVariation: number;
        influenceDistance: number;
        iterations: number;
        jitter: number;
        killDistance: number;
        kind: TreeKind;
        leader: boolean;
        leafColor: string;
        leafColorVariation: number;
        leafDensity: number;
        leafDepth: number;
        leafShape: LeafShape;
        leafSize: number;
        leanVariation: number;
        propRoots: number;
        radialSegments: number;
        radiusExponent: number;
        rootFlare: number;
        saturationVariation: number;
        scaleRange: [min: number, max: number];
        segmentLength: number;
        spacing: number;
        stems: number;
        tipRadius: number;
        tropism: [x: number, y: number, z: number];
        trunkHeight: number;
        trunkLean: number;
    }
    Index
    attractionPoints: number

    Attraction points sampled in the crown. More = denser, finer branching (and slower generation).

    barkColor: string

    Bark (or stem) base colour, CSS.

    barkContrast: number

    Strength of bark furrows and colour noise, 0..1 (birch and beech are smooth, oak and pine deeply furrowed).

    barkMarks: number

    Dark horizontal marks on the bark, 0..1 (birch).

    baseRadius: number

    Trunk radius at the base (above any flare).

    buttress: number

    Lobed buttress roots at the base, 0..1 (bald cypress, rainforest emergents).

    crownHeight: number

    Vertical extent of the crown envelope, ending at height.

    crownRadius: number

    Horizontal radius of the crown envelope.

    crownShape: CrownShape

    Crown silhouette.

    densityVariation: number

    Per-instance crown thinning, 0..1: each instance drops a random share (up to this) of its leaf cards.

    fruit: number

    Fruit (apples, berries) per leafy twig node, fractional = probability; flower heads per stalk; 0 = none.

    fruitColors: string[]

    Colours fruit and petals are picked from (seeded per fruit). CSS.

    fruitSize: number

    Fruit or flower-head diameter.

    height: number

    Total height (top of the crown).

    hueVariation: number

    Per-instance hue shift of foliage (± radians), so scattered copies of one variant don't look cloned.

    influenceDistance: number

    Attraction points only pull branch nodes within this distance.

    iterations: number

    Maximum growth steps.

    jitter: number

    Random wobble added to growth directions, 0..1. High values give gnarled, twisting wood.

    killDistance: number

    Attraction points this close to a branch are reached and removed.

    kind: TreeKind

    Generator; see TreeKind.

    leader: boolean

    Grow a straight central leader through the whole crown (conifers).

    leafColor: string

    Leaf base colour, CSS.

    leafColorVariation: number

    Per-card variation of leaf brightness and hue, 0..1.

    leafDensity: number

    Leaf cards per twig node (fractional values are random). Palms/ferns: fronds; reeds: blades per stalk.

    leafDepth: number

    How many nodes back from each branch tip carry leaves. Conifers: many (needles along branches); broadleaves: few.

    leafShape: LeafShape

    Pattern on the leaf cards.

    leafSize: number

    Edge length of one leaf card (a cluster of leaves). For palms and ferns: frond length; for reeds: blade length.

    leanVariation: number

    Per-instance random lean when scattered, radians.

    propRoots: number

    Arching prop roots from the lower trunk into the ground (mangroves).

    radialSegments: number

    Sides of the trunk tube. Branches use fewer, twigs at least 3.

    radiusExponent: number

    Pipe-model exponent: a parent's radius^e = the sum of its children's. 2 = da Vinci's rule; lower = thicker limbs.

    rootFlare: number

    Extra radius right at the ground, as a fraction of baseRadius (0.5 = 50 % wider).

    saturationVariation: number

    Per-instance saturation change of foliage (± fraction).

    scaleRange: [min: number, max: number]

    Per-instance uniform scale range when scattered.

    segmentLength: number

    Length of one growth step (branch segment).

    spacing: number

    Suggested minimum distance between two of these when scattered (used by createVegetationLayers).

    stems: number

    Stems rising from the ground. 1 = a tree; several = a multi-stemmed shrub (cactus: number of arms; reed: stalks).

    tipRadius: number

    Radius of the thinnest twigs.

    tropism: [x: number, y: number, z: number]

    Added to every growth direction: [0, -0.3, 0] makes branches droop (gravity), [0, 0.3, 0] reach up (light).

    trunkHeight: number

    Height of the clear trunk below the crown (where the crown envelope starts).

    trunkLean: number

    Maximum random lean of the trunk, in radians.