import * as THREE from 'three'; import * as TWEEN from '@tweenjs/tween.js'; import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'; import { LczEarthProps } from '../type'; import EarthEvent from './EarthEvent'; type Props = { w: number; h: number; el: HTMLDivElement; design: boolean; baseConfig: { cameraConfig?: LczEarthProps['cameraConfig']; rotateConfig?: LczEarthProps['rotateConfig']; controllerConfig?: LczEarthProps['controllerConfig']; }; onLoad?(): void; }; type Materials = { baseEarthMaterial?: THREE.MeshPhysicalMaterial; }; export default class Earth { el: HTMLDivElement; isDestroy: boolean; uuid: string; mapDataCache: Map; options: Props; __event?: EarthEvent; events: { [key: string]: { [key: string]: () => void; }; }; renderer?: THREE.WebGLRenderer; scene?: THREE.Scene; camera?: THREE.PerspectiveCamera; controller?: OrbitControls; textureLoad: THREE.TextureLoader; earthGroup: THREE.Group; lightGroup: THREE.Group; materials: Materials; animateId?: number; tweenObjects: { [key: string]: TWEEN.Tween; }; childCompUpdataFn: { [key in string]: { fn(step: number): void; target: any; }; }; constructor(options: Props); updataBase(w: number, h: number, baseConfig: Props['baseConfig']): void; initScene(): void; animate(): void; createWorldofwar(): void; processRotate(): void; initcamera(init?: boolean): void; initController(): false | undefined; initLight(): void; getMapData(url: string): Promise; updateTweens(): void; initEvent(): void; lglt2xyz(lng: number | string, lat: number | string, _radius?: number): THREE.Vector3; destroy(): void; } export {};