瀏覽代碼

improve the AroundView

tags/2.6.0
Caven Chen 4 年之前
父節點
當前提交
44e2dcc101
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8
    2
      modules/animation/type/AroundView.js

+ 8
- 2
modules/animation/type/AroundView.js 查看文件

@@ -52,9 +52,15 @@ class AroundView extends Animation {
if (this._heading >= Math.PI * 2 || this._heading <= -Math.PI * 2) {
this._heading = 0
}
this._viewer.scene.camera.setView({
this._viewer.camera.setView({
orientation: {
heading: this._heading
heading: this._heading,
pitch: this._options.pitch
? Cesium.Math.toRadians(this._options.pitch)
: this._viewer.camera.pitch,
roll: this._options.roll
? Cesium.Math.toRadians(this._options.pitch)
: this._viewer.camera.roll
}
})
}

Loading…
取消
儲存