hex-world
    Preparing search index...

    Interface ChunkManagerOptions

    interface ChunkManagerOptions {
        map: HexMap;
        layout: HexLayout;
        scene: Scene;
        material: Material;
        chunkSize?: number;
        loadRadius?: number;
        geometryOptions?: ChunkGeometryOptions;
        roadMaterial?: Material<MaterialEventMap>;
        liquidMaterials?: Map<string, LiquidMaterialSet>;
        liquidDescriptors?: LiquidTypeDescriptor[];
        waterGeometryOptions?: WaterGeometryOptions;
        hashGrid?: HexHashGrid;
        scatterDefinitions?: ScatterDefinition[];
        fogData?: FogData;
        flowWidenedRivers?: boolean;
        terrainDefinitions?: TerrainDefinition[];
        workerFactory?: () => ChunkWorkerLike;
    }
    Index

    Properties

    map: HexMap
    layout: HexLayout
    scene: Scene
    material: Material
    chunkSize?: number

    Cells per chunk side. Default 32.

    loadRadius?: number

    How many chunks in each direction around the camera to keep loaded. Default 4.

    geometryOptions?: ChunkGeometryOptions

    Passed through to each chunk's terrain geometry builder.

    roadMaterial?: Material<MaterialEventMap>

    If provided, roads are rendered with this material.

    liquidMaterials?: Map<string, LiquidMaterialSet>

    Per-liquid-type material sets, keyed by LiquidTypeDescriptor.id. Each entry controls which mesh layers are rendered for that liquid type. Omit entries for liquid types that should not be rendered.

    liquidDescriptors?: LiquidTypeDescriptor[]

    Liquid type descriptors that define per-type geometry overrides. Defaults to DEFAULT_LIQUID_DESCRIPTORS (water, lava, acid). Must include an entry for every key present in liquidMaterials.

    waterGeometryOptions?: WaterGeometryOptions

    Passed through to the water geometry builder as baseline options.

    hashGrid?: HexHashGrid

    Hash grid for deterministic scatter placement. Required when scatterDefinitions is provided.

    scatterDefinitions?: ScatterDefinition[]

    One definition per scatter layer. Each definition declares its own layerIndex.

    fogData?: FogData

    If provided, fog-of-war uniforms are set on all shader materials.

    flowWidenedRivers?: boolean

    Widen river channels (water AND carved stream bed, in lockstep) with accumulated flow from computeRiverFlow — tributaries joining a river make it visibly wider downstream. Default true; set false for the fixed-width channels of earlier versions.

    terrainDefinitions?: TerrainDefinition[]

    Terrain type definitions controlling vertex colors, road colors, and water geometry. Defaults to the built-in six types. Pass a merged or custom array to extend terrain.

    workerFactory?: () => ChunkWorkerLike

    Factory for a chunk-build worker. When provided, terrain/road geometry for newly streamed-in chunks is built off the main thread (liquids, scatter, and dirty-chunk rebuilds stay synchronous). Pass createDefaultChunkWorker for the library's bundled worker, or your own factory (e.g. a pre-created worker pool member). The manager owns workers it creates and terminates them on dispose().