deeptwins-engine-3d 0.0.46 → 0.0.48

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.
@@ -6,6 +6,7 @@ interface Position {
6
6
  lng: number;
7
7
  lat: number;
8
8
  alt: number;
9
+ timestamp?: number;
9
10
  }
10
11
  export default class ModelRoamRealTime {
11
12
  readonly _map: any;
@@ -16,16 +17,16 @@ export default class ModelRoamRealTime {
16
17
  private readonly _onPositionUpdate;
17
18
  modelLayer: any;
18
19
  polylineLayer: any;
19
- private positions;
20
- private positionsLineC3;
21
- private positionInterC3;
20
+ private receivedPositions;
21
+ private completedSegments;
22
+ private currentSegment;
23
+ private futureSegments;
24
+ private currentPointIndex;
25
+ private segmentCounter;
22
26
  private _eventPreUpdate;
23
27
  private modelMatrix;
24
28
  private hpRoll;
25
- private _time;
26
29
  status: 'stop' | 'running' | 'destroy';
27
- private currentPathIndex;
28
- private maxPathIndex;
29
30
  private targetHeading;
30
31
  private currentHeading;
31
32
  private rotationSpeed;
@@ -35,9 +36,20 @@ export default class ModelRoamRealTime {
35
36
  /**
36
37
  * 实时添加点位
37
38
  * @param newPosition 新位置点
38
- * @throws 如果新位置与上一个位置完全相同
39
39
  */
40
40
  updatePosition(newPosition: Position): void;
41
+ /**
42
+ * 判断两个位置是否相同
43
+ */
44
+ private isSamePosition;
45
+ /**
46
+ * 创建新的路径段
47
+ */
48
+ private createNewSegment;
49
+ /**
50
+ * 开始漫游
51
+ */
52
+ private startRoaming;
41
53
  /**
42
54
  * 计算两点之间的路径点
43
55
  * 使用插值算法生成平滑的路径
@@ -49,7 +61,7 @@ export default class ModelRoamRealTime {
49
61
  private _getInterPosition;
50
62
  /**
51
63
  * 初始化模型
52
- * 加载模型
64
+ * 加载模型到第一个位置
53
65
  * @param initialPosition 初始位置
54
66
  */
55
67
  private initModel;
@@ -58,6 +70,31 @@ export default class ModelRoamRealTime {
58
70
  * 更新模型位置、朝向和路径线
59
71
  */
60
72
  private updateModel;
73
+ /**
74
+ * 完成当前路径段,切换到下一个路径段
75
+ */
76
+ private completeCurrentSegment;
77
+ /**
78
+ * 初始化轨迹线Entity
79
+ */
80
+ private initTrailLine;
81
+ /**
82
+ * 获取轨迹线位置点
83
+ * 返回:所有原始接收位置点 + 当前路径段已飞行的插值点
84
+ */
85
+ private getTrailLinePositions;
86
+ /**
87
+ * 更新轨迹线 - 现在由CallbackProperty自动更新
88
+ */
89
+ private updateTrailLine;
90
+ /**
91
+ * 获取当前状态信息
92
+ */
93
+ getStatus(): any;
94
+ /**
95
+ * 获取详细的飞行信息
96
+ */
97
+ getFlightDetails(): any;
61
98
  /**
62
99
  * 计算模型朝向
63
100
  * @param start 起始点