import * as THREE from 'three'; import type { Disposable } from '../types.js'; /** Options for {@link createConnectionGraph}: `neighbors` per node, `maxDistance` edge cutoff, and line colors. */ export interface ConnectionGraphOptions { /** Edges per node. Default 3. */ neighbors?: number; /** Skip edges longer than this. Default Infinity. */ maxDistance?: number; color?: THREE.ColorRepresentation; highlightColor?: THREE.ColorRepresentation; opacity?: number; } /** Nearest-neighbor line network. `progress` drives a draw-on animation; `dispose()` frees the line geometry/material. */ export interface ConnectionGraph extends Disposable { object: THREE.LineSegments; /** [nodeIndexA, nodeIndexB] per edge, in attribute order. */ edges: ReadonlyArray; /** Draw-on animation: 0 = no edges, 1 = all edges visible. */ setProgress(t: number): void; /** Brighten every edge touching this node; null clears. */ setHighlight(nodeIndex: number | null): void; } /** * Connect points into a nearest-neighbor `LineSegments` network — each node * links to its `neighbors` closest peers within `maxDistance`, deduplicated. * * @param nodes - Node positions as xyz tuples. * @param options - Neighbor count, distance cutoff, colors. * @returns A {@link ConnectionGraph}; set `progress` from 0 to 1 to animate * edges drawing in. */ export declare function createConnectionGraph(nodes: ReadonlyArray, { neighbors, maxDistance, color, highlightColor, opacity, }?: ConnectionGraphOptions): ConnectionGraph; //# sourceMappingURL=connection-graph.d.ts.map