hex-world
    Preparing search index...

    Interface TerritoryLayerOptions

    interface TerritoryLayerOptions {
        overlays: CellOverlayLayer;
        map: HexMap | (() => HexMap);
        factions?: FactionDescriptor[];
        dataKey?: string;
        fillOpacity?: number;
        borderOpacity?: number;
        fillYOffset?: number;
        borderYOffset?: number;
        borders?: boolean;
        idPrefix?: string;
    }
    Index

    Properties

    The overlay layer territory draws through — usually world.overlays.

    map: HexMap | (() => HexMap)

    The map ownership is stored on. Pass an accessor if the map can be swapped at runtime.

    factions?: FactionDescriptor[]
    dataKey?: string

    Metadata channel key ownership is stored under. Default 'owner'. Change it only to avoid a collision with your own per-cell data.

    fillOpacity?: number

    Fill opacity for owned cells. Default 0.25.

    borderOpacity?: number

    Border line opacity. Default 0.9.

    fillYOffset?: number

    Lift of the fill above the cell surface. Default 0.02.

    borderYOffset?: number

    Lift of the border above the cell surface. Default 0.035 (just over the fill).

    borders?: boolean

    Draw borders around each faction's holdings. Default true.

    idPrefix?: string

    Overlay id prefix, so several territory layers can coexist. Default 'territory'.