hex-world
    Preparing search index...

    Interface GenerateResourcesOptions

    interface GenerateResourcesOptions {
        isWater?: (terrain: number) => boolean;
        dataKey?: string;
        clearExisting?: boolean;
        temperature?: Float32Array<ArrayBufferLike>;
        moisture?: Float32Array<ArrayBufferLike>;
        amount?: number;
    }
    Index

    Properties

    isWater?: (terrain: number) => boolean

    Liquid predicate (e.g. world.isWater). Drives the requiresLiquid and requiresCoast rules. Defaults to the built-in water terrain.

    dataKey?: string

    Metadata channel key to write. Must match the ResourceLayer's. Default 'resource'.

    clearExisting?: boolean

    Remove existing resources before generating. Default true.

    temperature?: Float32Array<ArrayBufferLike>

    Per-cell temperature field (0–1), as produced by ClimateSimulator. Required for descriptors that set a temperature window.

    moisture?: Float32Array<ArrayBufferLike>

    Per-cell moisture field (0–1). Required for descriptors that set a moisture window.

    amount?: number

    Starting quantity written with each deposit, for games that deplete them. Omit to store bare type ids (permanent deposits).