import { Group } from "three"; import { GeoLineSource } from '../lib/utils/geoLineData'; type RGB = `rgb(${number}, ${number}, ${number})`; type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`; type HEX = `#${string}`; type Color = RGB | RGBA | HEX | string; export type BasicMaterial = "MeshBasicMaterial" | "MeshLambertMaterial" | "MeshPhongMaterial"; export type EarthMaterial = BasicMaterial | "MeshMatcapMaterial"; export declare const InitConfig: { R: number; flyLineRFactor: number; enableZoom: boolean; zoom: number; pixelRatio: number | undefined; earth: { color: string; material: string; dragConfig: { rotationSpeed: number; inertiaFactor: number; panSpeed: number; disableX: boolean; disableY: boolean; }; }; map: string; stopRotateByHover: boolean; texture: { path: string; mixed: boolean; }; bgStyle: { color: string; opacity: number; }; mapStyle: { areaColor: string; lineColor: string; opacity: number; material: BasicMaterial; }; spriteStyle: { color: string; show: boolean; }; pathStyle: { color: string; show: boolean; }; flyLineStyle: { color: string; }; roadStyle: { flyLineStyle: { color: string; }; pathStyle: { color: string; }; }; barStyle: { color: string; width: number; height: number; }; hoverRegionStyle: { areaColor: string; opacity: number; show: boolean; }; scatterStyle: { color: string; show: boolean; }; wallStyle: { color: string; opacity: number; height: number; width: number; }; mapStreamStyle: { color: string; opacity: number; speed: number; splitLine: number; }; textMark: { style: { fontSize: number; color: string; }; data: never[]; }; }; export interface Options { dom: HTMLElement; map: string; debugHelper?: boolean; cameraType?: string; mode?: "2d" | "3d"; helper?: boolean; limitFps?: boolean; autoRotate?: boolean; rotateSpeed?: number; controls?: "custom" | "builtIn"; light?: "AmbientLight" | "PointLight" | "DirectionalLight" | "RectAreaLight"; config: Partial; } export type StoreConfig = typeof InitConfig & configType; export interface TweenParams { from: { size?: number; color?: Color; opacity?: number; }; to: { size?: number | number[]; color?: Color | Color[]; opacity?: number | number[]; }; } export interface TweenConfig { duration?: number; delay?: number; repeat?: number; onComplete?: (data: any) => void; customFigure?: { texture: string; animate?: false | TweenParams; rotate?: false | number; }; } export interface PathStyle { color: Color; size: number; show: boolean; } export interface FlyLineStyle extends TweenConfig { color: Color; size: number; img?: string; } export interface ScatterStyle extends TweenConfig { color: Color; size?: number; show?: boolean; } export interface LessCoordinate { lon: number; lat: number; } export interface Coordinates extends LessCoordinate { id?: string | number; style?: ScatterStyle; [key: string]: any; } export interface LineStyle { flyLineStyle: Partial; pathStyle: Partial; } export interface RoadStyle { flyLineStyle: Partial; pathStyle: Partial; } export interface SpriteStyle { color: Color; show?: boolean; size?: number; } export interface BarStyle { color: Color; width?: number; height?: number; } export interface DragConfig { rotationSpeed: number; inertiaFactor: number; panSpeed: number; disableX: boolean; disableY: boolean; } export interface Earth { color: Color; material?: EarthMaterial | "MeshNormalMaterial"; dragConfig?: Partial; } interface MapStyle { areaColor?: Color; lineColor?: Color; opacity?: number | undefined; material?: BasicMaterial; } export interface RegionBaseStyle { areaColor?: Color; opacity?: number | undefined; show?: boolean; material?: BasicMaterial; } export interface TextStyle { fontSize: number; color: Color; } export interface TextMarkItem { id?: string | number; text: string; position: LessCoordinate; style?: Partial; } export type TextMarkConfig = { style?: TextStyle; data: TextMarkItem[]; }; type RegionsStyle = Record; export interface configType { R: number; flyLineRFactor?: number; map: string; texture?: { path: string; mixed: boolean; }; pixelRatio?: number; enableZoom?: boolean; zoom?: number; stopRotateByHover: boolean; bgStyle: { color: Color; opacity?: number; }; earth: Earth; mapStyle: MapStyle; spriteStyle: SpriteStyle; pathStyle: Partial; flyLineStyle: Partial; scatterStyle: Partial; roadStyle: Partial; barStyle: Partial; regions?: RegionsStyle; hoverRegionStyle?: RegionBaseStyle; wallStyle: Partial; mapStreamStyle: Partial; textMark?: Partial; } export interface Coordinates3D { x: number; y: number; z: number; } export interface FlyLineData { from: Coordinates; to: Coordinates; style?: Partial; [key: string]: any; } export interface RoadData { path: LessCoordinate[]; style?: Partial; id: string | number; } export interface BarData { position: LessCoordinate; value: number; style?: Partial; id?: string | number; } export interface WallStyle { color: Color; opacity: number; height: number; width: number; } export interface MapStreamStyle { color: Color; opacity: number; speed: number; splitLine: number; } export interface SetData { flyLine: FlyLineData[]; point: Coordinates[]; road: RoadData[]; wall: { data: GeoLineSource; style?: Partial; }; mapStreamLine: { data: GeoLineSource; style?: Partial; }; bar: BarData[]; textMark: TextMarkItem[]; } export type OptDataFunc = (type: keyof SetData, data: any, mainContainer?: Group) => Promise; export {};