diff --git a/packages/core/src/services/interaction/PickingService.ts b/packages/core/src/services/interaction/PickingService.ts index 92bca05b31..a539a1acfb 100644 --- a/packages/core/src/services/interaction/PickingService.ts +++ b/packages/core/src/services/interaction/PickingService.ts @@ -1,10 +1,5 @@ import { decodePickingColor, DOM, encodePickingColor } from '@antv/l7-utils'; import { inject, injectable } from 'inversify'; -import { - IMapService, - IRendererService, - IShaderModuleService, -} from '../../index'; import { TYPES } from '../../types'; import { IGlobalConfigService, ISceneConfig } from '../config/IConfigService'; import { @@ -16,6 +11,7 @@ import { ILayer, ILayerService } from '../layer/ILayerService'; import { ILngLat } from '../map/IMapService'; import { gl } from '../renderer/gl'; import { IFramebuffer } from '../renderer/IFramebuffer'; +import { IRendererService } from '../renderer/IRendererService'; import { IPickingService } from './IPickingService'; @injectable() diff --git a/packages/core/src/services/renderer/passes/BaseNormalPass.ts b/packages/core/src/services/renderer/passes/BaseNormalPass.ts index 384586e928..75c5a2ff38 100644 --- a/packages/core/src/services/renderer/passes/BaseNormalPass.ts +++ b/packages/core/src/services/renderer/passes/BaseNormalPass.ts @@ -1,14 +1,12 @@ import { inject, injectable } from 'inversify'; -import { - IMapService, - IRendererService, - IShaderModuleService, -} from '../../../index'; import { TYPES } from '../../../types'; import { ICameraService } from '../../camera/ICameraService'; import { IInteractionService } from '../../interaction/IInteractionService'; import { ILayer, ILayerService } from '../../layer/ILayerService'; +import { IMapService } from '../../map/IMapService'; +import { IShaderModuleService } from '../../shader/IShaderModuleService'; import { IPass, PassType } from '../IMultiPassRenderer'; +import { IRendererService } from '../IRendererService'; /** * 常规 Pass 基类 diff --git a/packages/core/src/services/renderer/passes/BasePostProcessingPass.ts b/packages/core/src/services/renderer/passes/BasePostProcessingPass.ts index 86f2c327d0..8c53976a1e 100644 --- a/packages/core/src/services/renderer/passes/BasePostProcessingPass.ts +++ b/packages/core/src/services/renderer/passes/BasePostProcessingPass.ts @@ -1,11 +1,10 @@ import { inject, injectable } from 'inversify'; import { camelCase, isNil, upperFirst } from 'lodash'; -import { - gl, - IModel, - IRendererService, - IShaderModuleService, -} from '../../../index'; +import { IShaderModuleService } from '../../shader/IShaderModuleService'; +import { gl } from '../gl'; +import { IModel } from '../IModel'; +import { IRendererService } from '../IRendererService'; + import quad from '../../../shaders/post-processing/quad.glsl'; import { TYPES } from '../../../types'; import { ILayer } from '../../layer/ILayerService'; diff --git a/packages/map/src/geo/lng_lat.ts b/packages/map/src/geo/lng_lat.ts index 347ca9949d..ecea64b804 100644 --- a/packages/map/src/geo/lng_lat.ts +++ b/packages/map/src/geo/lng_lat.ts @@ -48,16 +48,16 @@ export default class LngLat { public toArray(): [number, number] { return [this.lng, this.lat]; } - public toBounds(radius: number = 0) { - const earthCircumferenceInMetersAtEquator = 40075017; - const latAccuracy = (360 * radius) / earthCircumferenceInMetersAtEquator; - const lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat); + // public toBounds(radius: number = 0) { + // const earthCircumferenceInMetersAtEquator = 40075017; + // const latAccuracy = (360 * radius) / earthCircumferenceInMetersAtEquator; + // const lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat); - return new LngLatBounds( - new LngLat(this.lng - lngAccuracy, this.lat - latAccuracy), - new LngLat(this.lng + lngAccuracy, this.lat + latAccuracy), - ); - } + // return new LngLatBounds( + // new LngLat(this.lng - lngAccuracy, this.lat - latAccuracy), + // new LngLat(this.lng + lngAccuracy, this.lat + latAccuracy), + // ); + // } public toString() { return `LngLat(${this.lng}, ${this.lat})`; }