style: lint style

This commit is contained in:
2912401452 2021-09-22 17:53:24 +08:00
parent ae9cd8c356
commit 2b272ea2d1
5 changed files with 14 additions and 17 deletions

View File

@ -1,6 +1,7 @@
// @ts-ignore
import { SyncBailHook, SyncHook, SyncWaterfallHook } from '@antv/async-hook';
import { Container } from 'inversify';
import { AnimationMixer, Matrix4, Object3D } from 'three';
import Clock from '../../utils/clock';
import { ISceneConfig } from '../config/IConfigService';
import { IMapService } from '../map/IMapService';
@ -30,7 +31,6 @@ import {
StyleAttributeOption,
Triangulation,
} from './IStyleAttributeService';
import { AnimationMixer, Matrix4, Object3D } from 'three';
// import {
// IStyleAttributeUpdateOptions,
@ -232,7 +232,11 @@ export interface ILayer {
// getTranslateMatrix(lnglat: ILngLat, altitude?: number): Matrix4;
// 设置模型对应地图在经纬度和高度方向的平移
applyObjectLngLat?(object: Object3D, lnglat: ILngLat, altitude?: number): void;
applyObjectLngLat?(
object: Object3D,
lnglat: ILngLat,
altitude?: number,
): void;
// 根据经纬度设置模型对应地图的平移
setObjectLngLat?(object: Object3D, lnglat: ILngLat, altitude?: number): void;

View File

@ -1,5 +1,5 @@
import { BaseLayer } from '@antv/l7-layers'
import { ILayer, IMercator } from '@antv/l7-core'
import { ILayer, IMercator } from '@antv/l7-core';
import { BaseLayer } from '@antv/l7-layers';
import {
AnimationMixer,
Camera,
@ -16,11 +16,12 @@ import {
ThreeRenderServiceType,
} from './threeRenderService';
const DEG2RAD = Math.PI / 180;
type ILngLat = [number, number]
type ILngLat = [number, number];
export default class ThreeJSLayer
extends BaseLayer<{
onAddMeshes: (threeScene: Scene, layer: ThreeJSLayer) => void;
}> implements ILayer {
}>
implements ILayer {
public type: string = 'custom';
protected threeRenderService: IThreeRenderService;
// 构建 threejs 的 scene

View File

@ -92,11 +92,7 @@ export default class GlTFThreeJSDemo extends React.Component {
// layer.setObjectLngLat(model, [center.lng + 0.05, center.lat] as ILngLat, 0)
// layer.setObjectLngLat(model, [center.lng + 0.05, center.lat] as ILngLat, 0)
layer.setObjectLngLat(
model,
[center.lng + 0.05, center.lat],
0,
);
layer.setObjectLngLat(model, [center.lng + 0.05, center.lat], 0);
let t = 0;
setInterval(() => {

View File

@ -49,11 +49,7 @@ export default class GlTFThreeJSDemo extends React.Component {
let cubeGeometry = new THREE.BoxBufferGeometry(10000, 10000, 10000);
let cubeMaterial = new THREE.MeshNormalMaterial();
let cube = new THREE.Mesh(cubeGeometry, cubeMaterial);
layer.setObjectLngLat(
cube,
[center.lng + 0.05, center.lat],
0,
);
layer.setObjectLngLat(cube, [center.lng + 0.05, center.lat], 0);
threeScene.add(cube);
// 使用 Three.js glTFLoader 加载模型

View File

@ -10,7 +10,7 @@ import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
import { animate, easeInOut } from 'popmotion';
import { Object3D, Vector3 } from 'three';
type ILngLat = [number, number]
type ILngLat = [number, number];
let isTravel = false;
function travel(