threejs-worldgen
    Preparing search index...

    Interface ScatterLOD

    One level of detail of a ScatterLayer: what to draw up to a distance.

    Mesh levels are drawn as InstancedMeshes whose geometry also carries a per-instance scatterParams attribute (x = yaw, y = brightness tint, z = random 0..1, w = 0); read it in your material with scatterParamsNode() for per-instance variation.

    interface ScatterLOD {
        castShadow?: boolean;
        distance: number;
        geometry: BufferGeometry;
        material: Material<MaterialEventMap> | Material<MaterialEventMap>[];
    }
    Index
    castShadow?: boolean

    Overrides the layer's castShadow for this level (e.g. false for far levels).

    distance: number

    Instances closer to the camera than this (metres) and beyond the previous level's distance use this level.

    geometry: BufferGeometry

    Geometry of one instance, in its local space with the ground at y = 0.

    material: Material<MaterialEventMap> | Material<MaterialEventMap>[]

    Its material, or one per geometry group (e.g. bark + leaves).