Merge pull request #735 from antvis/fix_vite

fix: 循环引用
This commit is contained in:
@thinkinggis 2021-08-04 17:17:48 +08:00 committed by GitHub
commit bfd7cbb70d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 25 deletions

View File

@ -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()

View File

@ -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

View File

@ -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';

View File

@ -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})`;
}