Explorar el Código

improve the track

tags/2.8.0
Caven Chen hace 3 años
padre
commit
6a71618774
Se han modificado 1 ficheros con 9 adiciones y 3 borrados
  1. 9
    3
      modules/history-track/Track.js

+ 9
- 3
modules/history-track/Track.js Ver fichero

@@ -16,7 +16,8 @@ const DEF_OPTS = {
clampToGround: false,
clampToTileset: false,
interpolationType: 'Linear',
interpolationDegree: 2
interpolationDegree: 2,
endDelayTime: 0.5
}

const DEF_PATH_STYLE = {
@@ -205,7 +206,7 @@ class Track {
position,
this._positionIndex + 1 === this._positions.length
)
this._positionIndex += 1
this._positionIndex++
}
}
}
@@ -286,6 +287,7 @@ class Track {
)
})
this._pathPositions = []
this._positionIndex = 0
} else if (params?.stopTime && params?.duration) {
this._duration += params.duration
this._timeLine = this._timeLine.map(item => {
@@ -326,7 +328,11 @@ class Track {
this._velocityOrientation = new Cesium.VelocityOrientationProperty(
this._sampledPosition
)
this._endTime = this._timeLine[this._timeLine.length - 1]
this._endTime = Cesium.JulianDate.addSeconds(
this._timeLine[this._timeLine.length - 1],
this._options.endDelayTime,
new Cesium.JulianDate()
)
}

/**

Cargando…
Cancelar
Guardar