소스 검색

improve math center

tags/3.0.1
Caven Chen 2 년 전
부모
커밋
a63509471a
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      src/modules/math/center.js

+ 2
- 1
src/modules/math/center.js 파일 보기

@@ -6,9 +6,10 @@ import { Cesium } from '../../namespace'
import { Transform } from '../transform'
import Position from '../position/Position'


export default function center(positions) {
if (positions && Array.isArray(positions)) {
let heightMax = 0 // 位置最高的点的高度
let heightMax = 0
positions.forEach(({ alt }) => (heightMax = Math.max(heightMax, alt)))

let boundingSphere = Cesium.BoundingSphere.fromPoints(

Loading…
취소
저장