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

    Interface TerrainImageOptions

    Configuration for terrain initialized from an image.

    interface TerrainImageOptions {
        depth?: number;
        image: ImageBitmap | HTMLImageElement;
        maxHeight?: number;
        meshDepthSegments?: number;
        meshWidthSegments?: number;
        strategy?: TerrainHeightStrategy;
        width?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    depth?: number

    The depth of the terrain in world units. Defaults to 100.

    image: ImageBitmap | HTMLImageElement

    The image to use as a heightmap source.

    maxHeight?: number

    The maximum height of the terrain. Defaults to 20.

    meshDepthSegments?: number

    The number of segments along the depth for the mesh. Defaults to 64.

    meshWidthSegments?: number

    The number of segments along the width for the mesh. Defaults to 64.

    The strategy to extract height from image pixels. Defaults to CENTERED_AVERAGE.

    width?: number

    The width of the terrain in world units. Defaults to 100.