hex-world
    Preparing search index...

    Interface ScatterDefinition

    Runtime scatter definition consumed by ChunkManager and buildScatterMeshes.

    Can be built two ways:

    • Directly: construct with inline tiers (procedural geometry, demo/test use).
    • Via registry: call resolveScatterDefinition(descriptor, registry) at load time.
    interface ScatterDefinition {
        id: string;
        name: string;
        layerIndex: number;
        tiers: ScatterLayerConfig;
        allowedTerrains?: number[];
        canSpawnAt?(map: HexMap, col: number, row: number): boolean;
        tiltStrength?: number;
        thresholds?: ScatterThresholds;
    }
    Index

    Properties

    id: string
    name: string
    layerIndex: number

    Feature layer slot index in HexMap.featureData. Must be unique per map.

    allowedTerrains?: number[]

    If set, only cells whose terrain type index is in this list can host this scatter.

    tiltStrength?: number

    Random X/Z tilt applied to each instance matrix (radians). 0 = upright only.

    thresholds?: ScatterThresholds

    Own density curve; omit for the shared default. See ScatterThresholds.

    Methods

    • Custom per-cell filter applied after allowedTerrains.

      Parameters

      • map: HexMap
      • col: number
      • row: number

      Returns boolean