huweili-cesium 1.2.64 → 1.2.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/js/movePoint.js +2 -1
  2. package/package.json +1 -1
package/js/movePoint.js CHANGED
@@ -331,7 +331,8 @@ export function movePointConfig(baseUrl) {
331
331
 
332
332
  modelEntity.positionProperty.addSample(flightEndTime, targetPosition)
333
333
  modelEntity.isFlying = true
334
- modelEntity.currentPosition = Cesium.Cartesian3.clone(targetPosition, modelEntity.currentPosition)
334
+ // 注意:这里不能提前把 currentPosition 写成 targetPosition
335
+ // currentPosition 必须只缓存无人机每帧真实显示位置,否则下一次更新拖尾时会读到未来目标点,导致轨迹跑到无人机前面。
335
336
 
336
337
  const flightTickListener = (clock) => {
337
338
  if (!modelEntity.isFlying) return
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huweili-cesium",
3
- "version": "1.2.64",
3
+ "version": "1.2.65",
4
4
  "description": "基于 Cesium 的地图工具库(无人机态势、轨迹、围栏、工具栏等)",
5
5
  "type": "module",
6
6
  "main": "./index.js",