Small World Engine API Reference - v0.46.1
    Preparing search index...

    Interface TerrainManagerConfig

    Configuration for the TerrainManager.

    interface TerrainManagerConfig {
        algorithm?: TerrainAlgorithm;
        chunkSize?: number;
        gridSize?: number;
        heightmapDetail?: number;
        heightmapRoughness?: number;
        material?: TerrainMaterial;
        maxHeight?: number;
        meshSegments?: number;
        onRebuild?: () => void;
    }
    Index

    Properties

    algorithm?: TerrainAlgorithm

    Generation algorithm to use. Defaults to "Perlin".

    chunkSize?: number

    Size of a single terrain chunk in world units. Defaults to 80.

    gridSize?: number

    Number of chunks in the active grid (edge length). Defaults to 3 (3x3).

    heightmapDetail?: number

    Detail level for the heightmap (2^n + 1). Defaults to 7 (129x129).

    heightmapRoughness?: number

    Roughness factor for the DiamondSquare algorithm. Defaults to 0.55.

    material?: TerrainMaterial

    Material to use for all terrain chunks.

    maxHeight?: number

    Maximum height of the terrain. Defaults to 6.0.

    meshSegments?: number

    Resolution of the mesh subdivisions per chunk. Defaults to 64.

    onRebuild?: () => void

    Callback triggered when chunks are added or removed.