import * as three from 'three';
import { Group, Scene, PerspectiveCamera, OrthographicCamera, Object3D, Vector3, Vector2, Mesh } from 'three';
export { debounce, merge, throttle } from 'lodash-es';

/**
 * A star
 * TODO:需要处理坐标为 threejs 规范的 Vector3 或 Vector2
 */
declare class AStar {
    private path;
    sc: number;
    keyPoints: any[];
    keyPointMap: any;
    openList: any[];
    closeList: any[];
    invalidList: any[];
    searchCount: number;
    beginTime: Date;
    endTime: Date;
    beginNode: any;
    endNode: any;
    private beginVertical;
    private endVertical;
    constructor(path: any[]);
    private shortestPath;
    private contain;
    private remove;
    private f;
    private g;
    private h;
    private euclidianCost;
    private getNearest;
    /**
     * @desc 最佳线路计算
     */
    calcShortestPath(begin: number[], end: number[]): any;
    /**
     * @desc 线路优化
     */
    private trackOptimize;
    /**
     * @desc 获取点到各个线段上最近的一条线段和相关信息
     * 需要返回距离，来筛选最近的线段
     * dist：一般来说是点和垂点的距离 dist。但是需要判断如果垂点在直线外部，就计算点到线段两端的距离 min dist
     * 拿到 dist 循环筛选出最近的即可。
     * point：表示距离点最近的线段端点，主要用来a星算法
     * vertical：表示垂点，主要用来补充线段
     */
    private nearestPointOnLine;
    /**
     * @desc 求点C在由点A、点B组成的直线的垂点
     */
    private getVerticalPoint;
    /**
     * @desc 计算两个坐标连线后的倾斜角度
     */
    private getAngle;
    /**
     * @desc 判断p是否在p1和p2的线段内
     */
    private isInLine;
}

declare const GLTFLoaderPromise: (url: string, onProgress?: ((event: ProgressEvent<EventTarget>) => void) | undefined) => Promise<Group>;

declare const warn: (msg: string, ...args: any[]) => void;

/**
 * 射线拾取
 */
declare const getIntersects: ({ event, $map, scene, camera, objects }: {
    event: any;
    $map: HTMLElement;
    scene: Scene;
    camera: PerspectiveCamera | OrthographicCamera;
    objects?: Object3D<three.Event>[] | undefined;
}) => three.Intersection<Object3D<three.Event>>[];
/**
 * 获取世界坐标
 * 用于射线拾取对象
 * objects 传入需要被射线拾取的物体。精准判断情况，不传入 objects， 获取被射线拾取的所有对象，然后再判断第一个对象是否被命中，即可判断当前是否点击了想要的对象。
 * @return 返回第一个点和所有被射线拾取的对象
 */
declare const getWorldPosition: ({ event, $map, scene, camera, objects }: {
    event: any;
    $map: HTMLElement;
    scene: Scene;
    camera: PerspectiveCamera | OrthographicCamera;
    objects?: Object3D<three.Event>[] | undefined;
}) => {
    worldPosition: Vector3;
    intersects: three.Intersection<Object3D<three.Event>>[];
} | {
    worldPosition?: undefined;
    intersects?: undefined;
};
/**
 * 获取屏幕坐标
 */
declare const getScreenPostion: ({ worldPosition, $map, scene, camera }: {
    worldPosition: Vector3;
    $map: HTMLElement;
    scene: Scene;
    camera: PerspectiveCamera | OrthographicCamera;
}) => {
    x: number;
    y: number;
};
/**
 * 根据 name 获取对应的对象集合
 */
declare const getObjectsByName: <T extends Object3D<three.Event>>(name: string, parent: Object3D) => T[];
/**
 * 根据 name 获取对应的对象
 */
declare const getObjectByName: <T extends Object3D<three.Event>>(name: string, parent: Object3D) => T;
declare const getPointBetweenPoints: ({ p1, p2, segment, i }: {
    p1: Vector3 | Vector2;
    p2: Vector3 | Vector2;
    segment?: number | undefined;
    i?: number | undefined;
}) => {
    point: Vector2;
    segment: number;
};
/**
 * 计算两个坐标连线后的倾斜角度
 */
declare const getAngle: (p1: Vector2 | Vector3, p2: Vector2 | Vector3) => {
    radian: number;
    angle: number;
};
declare const CLS_PREFIX = "ktmap";
declare const truncateNumber: <T extends number | number[]>(data: T, precision?: number) => T;
declare const truncateVector2: <T extends Vector2 | Vector2[]>(data: T, precision?: number) => T;
declare const truncateVector3: <T extends Vector3 | Vector3[]>(data: T, precision?: number) => T;
/**
 * 获取两点间距离
 */
declare const getDistance: (p1: Vector3 | Vector2, p2: Vector3 | Vector2) => number;
/**
 * 获取包围盒的中心点
 */
declare const getBox3Center: (mesh: Object3D) => Vector3;
/**
 * sleep
 */
declare const sleep: (delay?: number) => Promise<unknown>;
declare const getDollys: (targetMesh: Mesh, controls: any, offset?: number) => {
    fitDistance: any;
    dollys: any[];
};
declare const NOOP: () => void;
declare const extend: {
    <T, U>(target: T, source: U): T & U;
    <T_1, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
    <T_2, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
    (target: object, ...sources: any[]): any;
};
declare const objectToString: () => string;
declare const toTypeString: (value: unknown) => string;
declare const isArray: (arg: any) => arg is any[];
declare const isMap: (val: unknown) => val is Map<any, any>;
declare const isSet: (val: unknown) => val is Set<any>;
declare const isDate: (val: unknown) => val is Date;
declare const isFunction: (val: unknown) => val is () => void;
declare const isString: (val: unknown) => val is string;
declare const isSymbol: (val: unknown) => val is symbol;
declare const isObject: (val: unknown) => val is Record<any, any>;
declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;

export { AStar, CLS_PREFIX, GLTFLoaderPromise, NOOP, extend, getAngle, getBox3Center, getDistance, getDollys, getIntersects, getObjectByName, getObjectsByName, getPointBetweenPoints, getScreenPostion, getWorldPosition, isArray, isDate, isFunction, isMap, isObject, isPromise, isSet, isString, isSymbol, objectToString, sleep, toTypeString, truncateNumber, truncateVector2, truncateVector3, warn };
