hex-world
    Preparing search index...

    Function createBroadleafGeometry

    • A broadleaf tree: a bare trunk under a rounded canopy, merged into one geometry with vertex colours so a single instanced draw covers both.

      The split matters to more than the silhouette. attachSeasonalTint finds the canopy by its colour and leaves the trunk alone (see FOLIAGE_GLSL), and attachSnow weights its cap by how far each face turns skyward, so winter lands on the crown and not the bark. Both fall out of the geometry — neither needs a second material or a per-vertex mask.

      Give the material vertexColors: true, and pass BROADLEAF_CANOPY_COLOR (or your own foliageColor) as the tint's summer reference.

      Parameters

      • height: number = 1.8

        Overall height in world units, base to crown.

      • opts: ScatterShapeOptions = {}

      Returns BufferGeometry