hex-world
    Preparing search index...

    Interface HexPickerOptions

    interface HexPickerOptions {
        camera: Camera;
        domElement: HTMLElement;
        layout: HexLayout;
        map: HexPickerSource | (() => HexPickerSource);
        meshes:
            | Mesh<
                BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
                Material<MaterialEventMap> | Material<MaterialEventMap>[],
                Object3DEventMap,
            >[]
            | (
                () => Mesh<
                    BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
                    Material<MaterialEventMap> | Material<MaterialEventMap>[],
                    Object3DEventMap,
                >[]
            );
        isWater?: (terrain: number) => boolean;
        elevationScale?: number;
        holdFrames?: number;
    }
    Index

    Properties

    camera: Camera
    domElement: HTMLElement
    layout: HexLayout

    The map to pick against. Pass an accessor when the map instance can be swapped at runtime (e.g. an editor loading a new map).

    meshes:
        | Mesh<
            BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
            Material<MaterialEventMap> | Material<MaterialEventMap>[],
            Object3DEventMap,
        >[]
        | (
            () => Mesh<
                BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
                Material<MaterialEventMap> | Material<MaterialEventMap>[],
                Object3DEventMap,
            >[]
        )

    Terrain meshes for the primary raycast — usually () => chunkManager.terrainMeshes. Pass an accessor so the picker sees fresh meshes as chunks stream in and out.

    isWater?: (terrain: number) => boolean

    Liquid predicate (e.g. t => waterTerrainSet.has(t)). When provided, picks that land on a liquid cell are re-picked against that cell's computed water surface plane, so the result matches the surface the user actually sees instead of the seabed geometry underneath it.

    elevationScale?: number

    Must match the terrain geometry's elevationScale. Default ELEVATION_SCALE.

    holdFrames?: number

    How many consecutive missed frames keep returning the last valid cell before the hover drops. Prevents flicker across chunk seams and brief geometry gaps. Default 4; set 0 to disable holding.