瀏覽代碼

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…
取消
儲存