Kaynağa Gözat

fix the restore issue #50

tags/2.4.0
Caven Chen 4 yıl önce
ebeveyn
işleme
8a52accfa6
1 değiştirilmiş dosya ile 5 ekleme ve 7 silme
  1. 5
    7
      modules/history-track/Track.js

+ 5
- 7
modules/history-track/Track.js Dosyayı Görüntüle

@@ -183,19 +183,17 @@ class Track {
} else {
this._delegate.position = p
}
let o = this._velocityOrientation.getValue(now)
if (o) {
this._delegate.orientation = o
let orientation = this._velocityOrientation.getValue(now)
if (orientation) {
this._delegate.orientation = orientation
}
let time = this._timeLine[this._positionIndex]
if (time) {
let timeDiff = Cesium.JulianDate.secondsDifference(now, time)
if (timeDiff >= 0 && timeDiff <= 1) {
let position = this._positions[this._positionIndex] || undefined
if (position) {
let mat = Cesium.Matrix3.fromQuaternion(
this._delegate.orientation.getValue(now)
)
if (position && orientation) {
let mat = Cesium.Matrix3.fromQuaternion(orientation)
let mat4 = Cesium.Matrix4.fromRotationTranslation(mat, p)
let hpr = Cesium.Transforms.fixedFrameToHeadingPitchRoll(mat4)
position.heading = Cesium.Math.toDegrees(hpr.heading)

Loading…
İptal
Kaydet