deeptwins-engine-3d 0.1.62 → 0.1.63
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.
|
@@ -235,6 +235,11 @@ var ModelRoamRealTime = /*#__PURE__*/function () {
|
|
|
235
235
|
// 检查是否与上一个位置相同
|
|
236
236
|
var lastPos = this.receivedPositions[this.receivedPositions.length - 1];
|
|
237
237
|
if (this.isSamePosition(newPosition, lastPos)) {
|
|
238
|
+
// 同位置数据只刷新最后一次采样时间,避免静止时长被并入下一段移动时间
|
|
239
|
+
if (newPosition.timestamp >= lastPos.timestamp) {
|
|
240
|
+
lastPos.timestamp = newPosition.timestamp;
|
|
241
|
+
lastPos.alt = newPosition.alt;
|
|
242
|
+
}
|
|
238
243
|
return;
|
|
239
244
|
}
|
|
240
245
|
|
|
@@ -269,7 +274,7 @@ var ModelRoamRealTime = /*#__PURE__*/function () {
|
|
|
269
274
|
var endC3 = Cesium.Cartesian3.fromDegrees(endPos.lng, endPos.lat, endPos.alt);
|
|
270
275
|
|
|
271
276
|
// 计算飞行时间
|
|
272
|
-
var flightTime = (endPos.timestamp - startPos.timestamp) / 1000;
|
|
277
|
+
var flightTime = Math.max(0, (endPos.timestamp - startPos.timestamp) / 1000);
|
|
273
278
|
|
|
274
279
|
// 计算插值点
|
|
275
280
|
var interpolatedPoints = this._getInterPosition(startC3, endC3, flightTime);
|
|
@@ -15,7 +15,7 @@ export default class BaseSource {
|
|
|
15
15
|
remove(): void;
|
|
16
16
|
setData(data: any): this | undefined;
|
|
17
17
|
_toDestroy(): void;
|
|
18
|
-
static analysisSourceType(data: any): "
|
|
18
|
+
static analysisSourceType(data: any): "other" | "clampedPolygonGrid" | "wkt" | "sourceId" | "sourceInstance" | "geoJson";
|
|
19
19
|
static wktToGeoJon(wkt: string): any;
|
|
20
20
|
static geoJsonToGeoCartesian3Array(geoJson: any): any[];
|
|
21
21
|
static handleFeaturePoint(feature: any): any;
|
package/dist/esm/index.js
CHANGED
|
@@ -63,11 +63,11 @@ DEEP_TWINS_BASE_URL && (window.CESIUM_BASE_URL = DEEP_TWINS_BASE_URL);
|
|
|
63
63
|
// 全局加载css
|
|
64
64
|
loadCss(Cesium.buildModuleUrl('Widgets/widgets.css'));
|
|
65
65
|
// 打印版本信息
|
|
66
|
-
console.log('DeepTwinsEngine3D Version:', "0.1.
|
|
66
|
+
console.log('DeepTwinsEngine3D Version:', "0.1.63");
|
|
67
67
|
export var DeepTwinsEngine3D = /*#__PURE__*/_createClass(function DeepTwinsEngine3D() {
|
|
68
68
|
_classCallCheck(this, DeepTwinsEngine3D);
|
|
69
69
|
});
|
|
70
|
-
_defineProperty(DeepTwinsEngine3D, "Version", "0.1.
|
|
70
|
+
_defineProperty(DeepTwinsEngine3D, "Version", "0.1.63");
|
|
71
71
|
_defineProperty(DeepTwinsEngine3D, "Map", Map);
|
|
72
72
|
_defineProperty(DeepTwinsEngine3D, "GroundSkyBox", GroundSkyBox);
|
|
73
73
|
_defineProperty(DeepTwinsEngine3D, "RasterLayer", RasterLayer);
|