bruce-cesium 3.8.2 → 3.8.3
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.
- package/dist/bruce-cesium.es5.js +601 -186
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +599 -184
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/cesium-animated-in-out.js +166 -0
- package/dist/lib/rendering/cesium-animated-in-out.js.map +1 -0
- package/dist/lib/rendering/cesium-animated-property.js +60 -1
- package/dist/lib/rendering/cesium-animated-property.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine.js +266 -122
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +43 -21
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js +8 -23
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/lib/utils/cesium-entity-styler.js +63 -17
- package/dist/lib/utils/cesium-entity-styler.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/cesium-animated-in-out.d.ts +12 -0
- package/dist/types/rendering/cesium-animated-property.d.ts +21 -0
- package/dist/types/rendering/entity-render-engine.d.ts +6 -1
- package/dist/types/utils/cesium-entity-styler.d.ts +3 -0
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ProjectViewTile, DelayQueue, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, Api, EntityRelationType, ENVIRONMENT, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, AbstractApi, ProjectViewBookmark, EntityAttachment, EntityAttachmentType, EntityAttribute, ProjectView, ProjectViewLegacyTile, Camera } from 'bruce-models';
|
|
1
|
+
import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ProjectViewTile, DelayQueue, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, Api, EntityRelationType, ENVIRONMENT, EntityHistoricData, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, AbstractApi, ProjectViewBookmark, EntityAttachment, EntityAttachmentType, EntityAttribute, ProjectView, ProjectViewLegacyTile, Camera } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, DistanceDisplayCondition, NearFarScalar, Model,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, SceneMode, GeoJsonDataSource, ColorMaterialProperty, ConstantProperty, Cesium3DTileColorBlendMode, HeadingPitchRange, Entity, Primitive, Cesium3DTileFeature, DistanceDisplayCondition, NearFarScalar, Model, HorizontalOrigin, VerticalOrigin, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, EllipsoidTerrainProvider, CesiumInspector, OrthographicFrustum, defined, ClockRange, EasingFunction, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, PolygonPipeline, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, ScreenSpaceEventHandler, ScreenSpaceEventType, Matrix4, Matrix3, IonResource, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, CzmlDataSource, Quaternion, Intersect } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1011,6 +1011,11 @@ var CesiumAnimatedProperty;
|
|
|
1011
1011
|
}
|
|
1012
1012
|
this.startTime = new Date();
|
|
1013
1013
|
}
|
|
1014
|
+
AnimateColor.prototype.IsDone = function () {
|
|
1015
|
+
var now = new Date();
|
|
1016
|
+
var elapsedMs = now.getTime() - this.startTime.getTime();
|
|
1017
|
+
return elapsedMs >= this.durationMs;
|
|
1018
|
+
};
|
|
1014
1019
|
/**
|
|
1015
1020
|
* Returns the calculated color at the provided time.
|
|
1016
1021
|
* @returns
|
|
@@ -1107,7 +1112,7 @@ var CesiumAnimatedProperty;
|
|
|
1107
1112
|
* @returns
|
|
1108
1113
|
*/
|
|
1109
1114
|
function AnimateTFeatureColor(params) {
|
|
1110
|
-
var viewer = params.viewer, feature = params.feature, color = params.targetColor, startColor = params.startColor, durationMs = params.durationMs;
|
|
1115
|
+
var viewer = params.viewer, feature = params.feature, color = params.targetColor, startColor = params.startColor, durationMs = params.durationMs, onDone = params.onDone;
|
|
1111
1116
|
ClearTFeatureColorAnimation(feature);
|
|
1112
1117
|
if (!startColor) {
|
|
1113
1118
|
if (feature.color) {
|
|
@@ -1148,6 +1153,7 @@ var CesiumAnimatedProperty;
|
|
|
1148
1153
|
if (!assertColorMark(mark, feature.color)) {
|
|
1149
1154
|
removal === null || removal === void 0 ? void 0 : removal();
|
|
1150
1155
|
removal = null;
|
|
1156
|
+
onDone === null || onDone === void 0 ? void 0 : onDone();
|
|
1151
1157
|
return;
|
|
1152
1158
|
}
|
|
1153
1159
|
var now = new Date();
|
|
@@ -1157,6 +1163,7 @@ var CesiumAnimatedProperty;
|
|
|
1157
1163
|
feature.color = color;
|
|
1158
1164
|
removal === null || removal === void 0 ? void 0 : removal();
|
|
1159
1165
|
removal = null;
|
|
1166
|
+
onDone === null || onDone === void 0 ? void 0 : onDone();
|
|
1160
1167
|
return;
|
|
1161
1168
|
}
|
|
1162
1169
|
try {
|
|
@@ -1257,6 +1264,58 @@ var CesiumAnimatedProperty;
|
|
|
1257
1264
|
return AnimateHeading;
|
|
1258
1265
|
}());
|
|
1259
1266
|
CesiumAnimatedProperty.AnimateHeading = AnimateHeading;
|
|
1267
|
+
/**
|
|
1268
|
+
* Animates a position from a set of provided positions in time.
|
|
1269
|
+
* This will return a position across the provided positions based on the current time.
|
|
1270
|
+
* If the time exceeds the duration, the last position will be returned.
|
|
1271
|
+
* If the time proceeds the first position, the first position will be returned.
|
|
1272
|
+
*/
|
|
1273
|
+
var AnimatePositionSeries = /** @class */ (function () {
|
|
1274
|
+
function AnimatePositionSeries(params) {
|
|
1275
|
+
this.viewer = params.viewer;
|
|
1276
|
+
this.positions = params.posses;
|
|
1277
|
+
// Order positions by date.
|
|
1278
|
+
this.positions.sort(function (a, b) {
|
|
1279
|
+
return a.dateTime.getTime() - b.dateTime.getTime();
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
AnimatePositionSeries.prototype.GetValue = function () {
|
|
1283
|
+
var now = this.viewer.scene.lastRenderTime;
|
|
1284
|
+
if (!now) {
|
|
1285
|
+
now = this.viewer.clock.currentTime;
|
|
1286
|
+
}
|
|
1287
|
+
var nowTime = JulianDate.toDate(now);
|
|
1288
|
+
// See if we're before the first position.
|
|
1289
|
+
if (nowTime.getTime() <= this.positions[0].dateTime.getTime()) {
|
|
1290
|
+
return this.positions[0].pos3d;
|
|
1291
|
+
}
|
|
1292
|
+
// See if we're after the last position.
|
|
1293
|
+
if (nowTime.getTime() >= this.positions[this.positions.length - 1].dateTime.getTime()) {
|
|
1294
|
+
return this.positions[this.positions.length - 1].pos3d;
|
|
1295
|
+
}
|
|
1296
|
+
// Find the current position.
|
|
1297
|
+
var lastIndex = 0;
|
|
1298
|
+
for (var i = 1; i < this.positions.length; i++) {
|
|
1299
|
+
var pos = this.positions[i];
|
|
1300
|
+
if (nowTime.getTime() >= pos.dateTime.getTime()) {
|
|
1301
|
+
lastIndex = i;
|
|
1302
|
+
}
|
|
1303
|
+
else {
|
|
1304
|
+
break;
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
var last = this.positions[lastIndex];
|
|
1308
|
+
// Interpolate the position.
|
|
1309
|
+
var next = this.positions[lastIndex + 1];
|
|
1310
|
+
if (!next) {
|
|
1311
|
+
return last.pos3d;
|
|
1312
|
+
}
|
|
1313
|
+
var progress = (nowTime.getTime() - last.dateTime.getTime()) / (next.dateTime.getTime() - last.dateTime.getTime());
|
|
1314
|
+
return Cartesian3.lerp(last.pos3d, next.pos3d, progress, new Cartesian3());
|
|
1315
|
+
};
|
|
1316
|
+
return AnimatePositionSeries;
|
|
1317
|
+
}());
|
|
1318
|
+
CesiumAnimatedProperty.AnimatePositionSeries = AnimatePositionSeries;
|
|
1260
1319
|
})(CesiumAnimatedProperty || (CesiumAnimatedProperty = {}));
|
|
1261
1320
|
|
|
1262
1321
|
/**
|
|
@@ -1618,10 +1677,32 @@ var CesiumEntityStyler;
|
|
|
1618
1677
|
}
|
|
1619
1678
|
CesiumEntityStyler.Refresh = Refresh;
|
|
1620
1679
|
function BakeDefaultColor(params) {
|
|
1621
|
-
var
|
|
1680
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1681
|
+
var viewer = params.viewer, entity = params.entity, override = params.override, colors = params.colors, refresh = params.refresh;
|
|
1622
1682
|
if (!entity) {
|
|
1623
1683
|
return;
|
|
1624
1684
|
}
|
|
1685
|
+
if (refresh == null) {
|
|
1686
|
+
refresh = true;
|
|
1687
|
+
}
|
|
1688
|
+
var colorMap;
|
|
1689
|
+
if (colors) {
|
|
1690
|
+
if (!(colors instanceof Map)) {
|
|
1691
|
+
var keys = Object.keys(colors);
|
|
1692
|
+
var map = new Map();
|
|
1693
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1694
|
+
var key = keys[i];
|
|
1695
|
+
map.set(key, colors[key]);
|
|
1696
|
+
}
|
|
1697
|
+
colorMap = map;
|
|
1698
|
+
}
|
|
1699
|
+
else {
|
|
1700
|
+
colorMap = colors;
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
else {
|
|
1704
|
+
colorMap = new Map();
|
|
1705
|
+
}
|
|
1625
1706
|
var parts = EntityUtils.GatherEntity({
|
|
1626
1707
|
entity: entity
|
|
1627
1708
|
});
|
|
@@ -1639,37 +1720,61 @@ var CesiumEntityStyler;
|
|
|
1639
1720
|
}
|
|
1640
1721
|
if (part instanceof Cesium3DTileFeature) {
|
|
1641
1722
|
var opacity = getAppliedOpacity(part);
|
|
1642
|
-
|
|
1643
|
-
|
|
1723
|
+
var color = (_a = colorMap.get("feature")) !== null && _a !== void 0 ? _a : calculateCurColor(viewer, part);
|
|
1724
|
+
storeColor("default", color, part);
|
|
1725
|
+
if (refresh) {
|
|
1726
|
+
refreshColor(viewer, part, opacity);
|
|
1727
|
+
}
|
|
1644
1728
|
}
|
|
1645
1729
|
else if (part instanceof Entity) {
|
|
1646
1730
|
if (part.billboard) {
|
|
1647
|
-
|
|
1648
|
-
|
|
1731
|
+
var color = (_b = colorMap.get("billboard")) !== null && _b !== void 0 ? _b : calculateCurColor(viewer, part.billboard);
|
|
1732
|
+
storeColor("default", color, part.billboard);
|
|
1733
|
+
if (refresh) {
|
|
1734
|
+
refreshColor(viewer, part.billboard, getAppliedOpacity(part.billboard));
|
|
1735
|
+
}
|
|
1649
1736
|
}
|
|
1650
1737
|
if (part.model) {
|
|
1651
|
-
|
|
1652
|
-
|
|
1738
|
+
var color = (_c = colorMap.get("model")) !== null && _c !== void 0 ? _c : calculateCurColor(viewer, part.model);
|
|
1739
|
+
storeColor("default", color, part.model);
|
|
1740
|
+
if (refresh) {
|
|
1741
|
+
refreshColor(viewer, part.model, getAppliedOpacity(part.model));
|
|
1742
|
+
}
|
|
1653
1743
|
}
|
|
1654
1744
|
if (part.polyline) {
|
|
1655
|
-
|
|
1656
|
-
|
|
1745
|
+
var color = (_d = colorMap.get("polyline")) !== null && _d !== void 0 ? _d : calculateCurColor(viewer, part.polyline);
|
|
1746
|
+
storeColor("default", color, part.polyline);
|
|
1747
|
+
if (refresh) {
|
|
1748
|
+
refreshColor(viewer, part.polyline, getAppliedOpacity(part.polyline));
|
|
1749
|
+
}
|
|
1657
1750
|
}
|
|
1658
1751
|
if (part.polygon) {
|
|
1659
|
-
|
|
1660
|
-
|
|
1752
|
+
var color = (_e = colorMap.get("polygon")) !== null && _e !== void 0 ? _e : calculateCurColor(viewer, part.polygon);
|
|
1753
|
+
storeColor("default", color, part.polygon);
|
|
1754
|
+
if (refresh) {
|
|
1755
|
+
refreshColor(viewer, part.polygon, getAppliedOpacity(part.polygon));
|
|
1756
|
+
}
|
|
1661
1757
|
}
|
|
1662
1758
|
if (part.corridor) {
|
|
1663
|
-
|
|
1664
|
-
|
|
1759
|
+
var color = (_f = colorMap.get("corridor")) !== null && _f !== void 0 ? _f : calculateCurColor(viewer, part.corridor);
|
|
1760
|
+
storeColor("default", color, part.corridor);
|
|
1761
|
+
if (refresh) {
|
|
1762
|
+
refreshColor(viewer, part.corridor, getAppliedOpacity(part.corridor));
|
|
1763
|
+
}
|
|
1665
1764
|
}
|
|
1666
1765
|
if (part.point) {
|
|
1667
|
-
|
|
1668
|
-
|
|
1766
|
+
var color = (_g = colorMap.get("point")) !== null && _g !== void 0 ? _g : calculateCurColor(viewer, part.point);
|
|
1767
|
+
storeColor("default", color, part.point);
|
|
1768
|
+
if (refresh) {
|
|
1769
|
+
refreshColor(viewer, part.point, getAppliedOpacity(part.point));
|
|
1770
|
+
}
|
|
1669
1771
|
}
|
|
1670
1772
|
if (part.ellipse) {
|
|
1671
|
-
|
|
1672
|
-
|
|
1773
|
+
var color = (_h = colorMap.get("ellipse")) !== null && _h !== void 0 ? _h : calculateCurColor(viewer, part.ellipse);
|
|
1774
|
+
storeColor("default", color, part.ellipse);
|
|
1775
|
+
if (refresh) {
|
|
1776
|
+
refreshColor(viewer, part.ellipse, getAppliedOpacity(part.ellipse));
|
|
1777
|
+
}
|
|
1673
1778
|
}
|
|
1674
1779
|
}
|
|
1675
1780
|
}
|
|
@@ -4889,6 +4994,27 @@ function extractMetadataFromFileUrl(url) {
|
|
|
4889
4994
|
envId: envId
|
|
4890
4995
|
};
|
|
4891
4996
|
}
|
|
4997
|
+
function getSeriesPossesForHistoricEntity(viewer, heightRef, historic) {
|
|
4998
|
+
var series = [];
|
|
4999
|
+
for (var i = 0; i < historic.length; i++) {
|
|
5000
|
+
var item = historic[i];
|
|
5001
|
+
var pos3d = EntityUtils.GetPos({
|
|
5002
|
+
entity: item.data,
|
|
5003
|
+
viewer: viewer,
|
|
5004
|
+
recordHeightRef: heightRef,
|
|
5005
|
+
returnHeightRef: heightRef
|
|
5006
|
+
});
|
|
5007
|
+
var dateTime = new Date(item.dateTime);
|
|
5008
|
+
if (!dateTime || !pos3d || isNaN(pos3d.x) || isNaN(pos3d.y) || isNaN(pos3d.z)) {
|
|
5009
|
+
continue;
|
|
5010
|
+
}
|
|
5011
|
+
series.push({
|
|
5012
|
+
dateTime: dateTime,
|
|
5013
|
+
pos3d: pos3d
|
|
5014
|
+
});
|
|
5015
|
+
}
|
|
5016
|
+
return series;
|
|
5017
|
+
}
|
|
4892
5018
|
var EntityRenderEngine;
|
|
4893
5019
|
(function (EntityRenderEngine) {
|
|
4894
5020
|
function Render(params) {
|
|
@@ -4984,7 +5110,7 @@ var EntityRenderEngine;
|
|
|
4984
5110
|
}
|
|
4985
5111
|
}
|
|
4986
5112
|
if (!(models.length > 0)) return [3 /*break*/, 2];
|
|
4987
|
-
mParams = __assign(__assign({}, groupRenderParams), { rendered: cEntities, entities: models });
|
|
5113
|
+
mParams = __assign(__assign({}, groupRenderParams), { rendered: cEntities, entities: models, entitiesHistoric: params.entitiesHistoric });
|
|
4988
5114
|
return [4 /*yield*/, Model3d.RenderGroup(mParams)];
|
|
4989
5115
|
case 1:
|
|
4990
5116
|
mEntities = _m.sent();
|
|
@@ -5013,6 +5139,7 @@ var EntityRenderEngine;
|
|
|
5013
5139
|
return [2 /*return*/, "continue"];
|
|
5014
5140
|
}
|
|
5015
5141
|
pParams = __assign(__assign({}, groupRenderParams), { entities: [], rendered: cEntities });
|
|
5142
|
+
pParams.entitiesHistoric = params.entitiesHistoric;
|
|
5016
5143
|
zoomItem = pParams.zoomItems[entity.Bruce.ID];
|
|
5017
5144
|
for (j = 0; j < entity.geometry.MultiGeometry.length; j++) {
|
|
5018
5145
|
subEntity = __assign(__assign({}, entity), { geometry: entity.geometry.MultiGeometry[j], Bruce: __assign(__assign({}, entity.Bruce), { ID: ObjectUtils.UId() }) });
|
|
@@ -5115,7 +5242,7 @@ var EntityRenderEngine;
|
|
|
5115
5242
|
_m.label = 10;
|
|
5116
5243
|
case 10:
|
|
5117
5244
|
if (!(points.length > 0)) return [3 /*break*/, 12];
|
|
5118
|
-
pParams = __assign(__assign({}, groupRenderParams), { entities: points, rendered: cEntities });
|
|
5245
|
+
pParams = __assign(__assign({}, groupRenderParams), { entities: points, rendered: cEntities, entitiesHistoric: params.entitiesHistoric });
|
|
5119
5246
|
return [4 /*yield*/, Point.RenderGroup(pParams)];
|
|
5120
5247
|
case 11:
|
|
5121
5248
|
pEntities = _m.sent();
|
|
@@ -5184,11 +5311,14 @@ var EntityRenderEngine;
|
|
|
5184
5311
|
function Render(params) {
|
|
5185
5312
|
var _a, _b, _c, _d;
|
|
5186
5313
|
return __awaiter(this, void 0, void 0, function () {
|
|
5187
|
-
var entity, style, type, cEntity, siblings, prepareExistingGraphic, iconUrlRows, icon, iconUrl, metadata, api, image, e_5, iconScale, disableDepthTest, bColor,
|
|
5314
|
+
var entity, style, type, cEntity, siblings, prepareExistingGraphic, iconUrlRows, icon, iconUrl, metadata, api, image, e_5, iconScale, disableDepthTest, bColor, cColor, heightRef_1, animateColorIn_1, position, series, animatePosition_1, currentImgKey, series, animatePosition_2, pos3d, prevPos3d, animatePosition_3, radius, bFill, cFill, outline, cOutline, outlineWidth, bOutline, heightRef, pos3d, extrusion, hasOutline, outlineExtrusion, outlineEntity, bColor, cColor, size, heightRef_2, circleBillboard, disableDepthTest, animateColorIn_2, position, series, animatePosition_4, imgKey, currentImgKey, series, animatePosition_5, pos3d, prevPos3d, animatePosition_6;
|
|
5188
5315
|
return __generator(this, function (_e) {
|
|
5189
5316
|
switch (_e.label) {
|
|
5190
5317
|
case 0:
|
|
5191
5318
|
entity = params.entity;
|
|
5319
|
+
if (!params.entityHistoric) {
|
|
5320
|
+
params.entityHistoric = [];
|
|
5321
|
+
}
|
|
5192
5322
|
style = params.style;
|
|
5193
5323
|
type = style.Type;
|
|
5194
5324
|
if (type == null) {
|
|
@@ -5284,9 +5414,32 @@ var EntityRenderEngine;
|
|
|
5284
5414
|
disableDepthTest = Boolean(style.renderOnTop);
|
|
5285
5415
|
if (iconScale > 0) {
|
|
5286
5416
|
bColor = style.iconTintColor ? Calculator.GetColor(style.iconTintColor, entity, params.tags) : null;
|
|
5287
|
-
|
|
5417
|
+
cColor = bColor ? colorToCColor(bColor) : Color.WHITE.clone();
|
|
5288
5418
|
heightRef_1 = getHeightRef(style);
|
|
5289
5419
|
if (!params.rendered || !params.rendered.billboard) {
|
|
5420
|
+
animateColorIn_1 = new CesiumAnimatedProperty.AnimateColor({
|
|
5421
|
+
durationMs: 200,
|
|
5422
|
+
targetColor: cColor,
|
|
5423
|
+
startColor: cColor.withAlpha(0),
|
|
5424
|
+
viewer: params.viewer
|
|
5425
|
+
});
|
|
5426
|
+
position = null;
|
|
5427
|
+
series = getSeriesPossesForHistoricEntity(params.viewer, heightRef_1, params.entityHistoric);
|
|
5428
|
+
if (series.length > 1) {
|
|
5429
|
+
animatePosition_1 = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
5430
|
+
posses: series,
|
|
5431
|
+
viewer: params.viewer
|
|
5432
|
+
});
|
|
5433
|
+
position = new CallbackProperty(function () { return animatePosition_1.GetValue(); }, false);
|
|
5434
|
+
}
|
|
5435
|
+
else {
|
|
5436
|
+
position = new CallbackProperty(function () { return EntityUtils.GetPos({
|
|
5437
|
+
viewer: params.viewer,
|
|
5438
|
+
entity: entity,
|
|
5439
|
+
recordHeightRef: heightRef_1,
|
|
5440
|
+
returnHeightRef: heightRef_1
|
|
5441
|
+
}); }, true);
|
|
5442
|
+
}
|
|
5290
5443
|
cEntity = new Entity({
|
|
5291
5444
|
id: ObjectUtils.UId(10),
|
|
5292
5445
|
billboard: {
|
|
@@ -5297,18 +5450,27 @@ var EntityRenderEngine;
|
|
|
5297
5450
|
scale: iconScale,
|
|
5298
5451
|
disableDepthTestDistance: disableDepthTest ? Number.POSITIVE_INFINITY : undefined,
|
|
5299
5452
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance),
|
|
5300
|
-
color: new CallbackProperty(function () {
|
|
5453
|
+
color: new CallbackProperty(function () {
|
|
5454
|
+
var color = animateColorIn_1.GetColor();
|
|
5455
|
+
if (animateColorIn_1.IsDone() && (cEntity === null || cEntity === void 0 ? void 0 : cEntity.billboard)) {
|
|
5456
|
+
cEntity.billboard.color = new CallbackProperty(function () { return color; }, true);
|
|
5457
|
+
}
|
|
5458
|
+
return color;
|
|
5459
|
+
}, false),
|
|
5301
5460
|
// Would be great once we have a setting for this.
|
|
5302
5461
|
// translucencyByDistance: getTranslucencyByDistance(params.minDistance, params.maxDistance),
|
|
5303
5462
|
},
|
|
5304
|
-
position:
|
|
5305
|
-
viewer: params.viewer,
|
|
5306
|
-
entity: entity,
|
|
5307
|
-
recordHeightRef: heightRef_1,
|
|
5308
|
-
returnHeightRef: heightRef_1
|
|
5309
|
-
}); }, true),
|
|
5463
|
+
position: position,
|
|
5310
5464
|
show: true
|
|
5311
5465
|
});
|
|
5466
|
+
CesiumEntityStyler.BakeDefaultColor({
|
|
5467
|
+
entity: cEntity,
|
|
5468
|
+
colors: {
|
|
5469
|
+
"billboard": cColor
|
|
5470
|
+
},
|
|
5471
|
+
viewer: params.viewer,
|
|
5472
|
+
refresh: false
|
|
5473
|
+
});
|
|
5312
5474
|
}
|
|
5313
5475
|
else {
|
|
5314
5476
|
prepareExistingGraphic(params.rendered);
|
|
@@ -5321,25 +5483,35 @@ var EntityRenderEngine;
|
|
|
5321
5483
|
cEntity.billboard.heightReference = new ConstantProperty(getHeightRef(style));
|
|
5322
5484
|
cEntity.billboard.disableDepthTestDistance = new ConstantProperty(disableDepthTest ? Number.POSITIVE_INFINITY : undefined);
|
|
5323
5485
|
cEntity.billboard.distanceDisplayCondition = new ConstantProperty(getDisplayCondition(params.minDistance, params.maxDistance));
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
targetPos3d: pos3d,
|
|
5486
|
+
series = getSeriesPossesForHistoricEntity(params.viewer, heightRef_1, params.entityHistoric);
|
|
5487
|
+
if (series.length > 1) {
|
|
5488
|
+
animatePosition_2 = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
5489
|
+
posses: series,
|
|
5490
|
+
viewer: params.viewer
|
|
5491
|
+
});
|
|
5492
|
+
cEntity.position = new CallbackProperty(function () { return animatePosition_2.GetValue(); }, false);
|
|
5493
|
+
}
|
|
5494
|
+
else {
|
|
5495
|
+
pos3d = EntityUtils.GetPos({
|
|
5335
5496
|
viewer: params.viewer,
|
|
5336
|
-
|
|
5497
|
+
entity: entity,
|
|
5498
|
+
recordHeightRef: heightRef_1,
|
|
5499
|
+
returnHeightRef: heightRef_1
|
|
5337
5500
|
});
|
|
5338
|
-
|
|
5501
|
+
prevPos3d = getValue$1(params.viewer, cEntity.position);
|
|
5502
|
+
if (!prevPos3d || !Cartesian3.equals(prevPos3d, pos3d)) {
|
|
5503
|
+
animatePosition_3 = new CesiumAnimatedProperty.AnimatePosition({
|
|
5504
|
+
durationMs: 200,
|
|
5505
|
+
targetPos3d: pos3d,
|
|
5506
|
+
viewer: params.viewer,
|
|
5507
|
+
startPos3d: prevPos3d
|
|
5508
|
+
});
|
|
5509
|
+
cEntity.position = new CallbackProperty(function () { return animatePosition_3.GetValue(); }, false);
|
|
5510
|
+
}
|
|
5339
5511
|
}
|
|
5340
5512
|
// We'll use "SetDefaultColor" to updating the internal reference and to allow for an animation.
|
|
5341
5513
|
CesiumEntityStyler.SetDefaultColor({
|
|
5342
|
-
color:
|
|
5514
|
+
color: cColor ? cColor : new Color(),
|
|
5343
5515
|
entity: cEntity,
|
|
5344
5516
|
viewer: params.viewer,
|
|
5345
5517
|
override: true,
|
|
@@ -5484,6 +5656,29 @@ var EntityRenderEngine;
|
|
|
5484
5656
|
circleBillboard = createCircleBillboard(size, cColor.toCssColorString());
|
|
5485
5657
|
disableDepthTest = Boolean(style.renderOnTop);
|
|
5486
5658
|
if (!params.rendered || !params.rendered.billboard) {
|
|
5659
|
+
animateColorIn_2 = new CesiumAnimatedProperty.AnimateColor({
|
|
5660
|
+
durationMs: 200,
|
|
5661
|
+
targetColor: cColor,
|
|
5662
|
+
startColor: cColor.withAlpha(0),
|
|
5663
|
+
viewer: params.viewer
|
|
5664
|
+
});
|
|
5665
|
+
position = null;
|
|
5666
|
+
series = getSeriesPossesForHistoricEntity(params.viewer, heightRef_2, params.entityHistoric);
|
|
5667
|
+
if (series.length > 1) {
|
|
5668
|
+
animatePosition_4 = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
5669
|
+
posses: series,
|
|
5670
|
+
viewer: params.viewer
|
|
5671
|
+
});
|
|
5672
|
+
position = new CallbackProperty(function () { return animatePosition_4.GetValue(); }, false);
|
|
5673
|
+
}
|
|
5674
|
+
else {
|
|
5675
|
+
position = new CallbackProperty(function () { return EntityUtils.GetPos({
|
|
5676
|
+
viewer: params.viewer,
|
|
5677
|
+
entity: entity,
|
|
5678
|
+
recordHeightRef: heightRef_2,
|
|
5679
|
+
returnHeightRef: heightRef_2
|
|
5680
|
+
}); }, true);
|
|
5681
|
+
}
|
|
5487
5682
|
cEntity = new Entity({
|
|
5488
5683
|
id: ObjectUtils.UId(10),
|
|
5489
5684
|
// point: {
|
|
@@ -5499,19 +5694,28 @@ var EntityRenderEngine;
|
|
|
5499
5694
|
height: circleBillboard.height,
|
|
5500
5695
|
width: circleBillboard.width,
|
|
5501
5696
|
image: circleBillboard.canvasDataUri,
|
|
5502
|
-
color: new CallbackProperty(function () {
|
|
5697
|
+
color: new CallbackProperty(function () {
|
|
5698
|
+
var color = animateColorIn_2.GetColor();
|
|
5699
|
+
if (animateColorIn_2.IsDone() && (cEntity === null || cEntity === void 0 ? void 0 : cEntity.billboard)) {
|
|
5700
|
+
cEntity.billboard.color = new CallbackProperty(function () { return color; }, true);
|
|
5701
|
+
}
|
|
5702
|
+
return color;
|
|
5703
|
+
}, false),
|
|
5503
5704
|
heightReference: heightRef_2,
|
|
5504
5705
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance),
|
|
5505
5706
|
disableDepthTestDistance: disableDepthTest ? Number.POSITIVE_INFINITY : undefined
|
|
5506
5707
|
},
|
|
5507
|
-
position:
|
|
5508
|
-
viewer: params.viewer,
|
|
5509
|
-
entity: entity,
|
|
5510
|
-
recordHeightRef: heightRef_2,
|
|
5511
|
-
returnHeightRef: heightRef_2
|
|
5512
|
-
}); }, true),
|
|
5708
|
+
position: position,
|
|
5513
5709
|
show: true
|
|
5514
5710
|
});
|
|
5711
|
+
CesiumEntityStyler.BakeDefaultColor({
|
|
5712
|
+
entity: cEntity,
|
|
5713
|
+
viewer: params.viewer,
|
|
5714
|
+
colors: {
|
|
5715
|
+
"billboard": cColor
|
|
5716
|
+
},
|
|
5717
|
+
refresh: false
|
|
5718
|
+
});
|
|
5515
5719
|
}
|
|
5516
5720
|
else {
|
|
5517
5721
|
prepareExistingGraphic(params.rendered);
|
|
@@ -5526,21 +5730,31 @@ var EntityRenderEngine;
|
|
|
5526
5730
|
cEntity.billboard.heightReference = new ConstantProperty(heightRef_2);
|
|
5527
5731
|
cEntity.billboard.distanceDisplayCondition = new ConstantProperty(getDisplayCondition(params.minDistance, params.maxDistance));
|
|
5528
5732
|
cEntity.billboard.disableDepthTestDistance = new ConstantProperty(disableDepthTest ? Number.POSITIVE_INFINITY : undefined);
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
targetPos3d: pos3d,
|
|
5733
|
+
series = getSeriesPossesForHistoricEntity(params.viewer, heightRef_2, params.entityHistoric);
|
|
5734
|
+
if (series.length > 1) {
|
|
5735
|
+
animatePosition_5 = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
5736
|
+
posses: series,
|
|
5737
|
+
viewer: params.viewer
|
|
5738
|
+
});
|
|
5739
|
+
cEntity.position = new CallbackProperty(function () { return animatePosition_5.GetValue(); }, false);
|
|
5740
|
+
}
|
|
5741
|
+
else {
|
|
5742
|
+
pos3d = EntityUtils.GetPos({
|
|
5540
5743
|
viewer: params.viewer,
|
|
5541
|
-
|
|
5744
|
+
entity: entity,
|
|
5745
|
+
recordHeightRef: heightRef_2,
|
|
5746
|
+
returnHeightRef: heightRef_2
|
|
5542
5747
|
});
|
|
5543
|
-
|
|
5748
|
+
prevPos3d = getValue$1(params.viewer, cEntity.position);
|
|
5749
|
+
if (!prevPos3d || !Cartesian3.equals(prevPos3d, pos3d)) {
|
|
5750
|
+
animatePosition_6 = new CesiumAnimatedProperty.AnimatePosition({
|
|
5751
|
+
durationMs: 200,
|
|
5752
|
+
targetPos3d: pos3d,
|
|
5753
|
+
viewer: params.viewer,
|
|
5754
|
+
startPos3d: prevPos3d
|
|
5755
|
+
});
|
|
5756
|
+
cEntity.position = new CallbackProperty(function () { return animatePosition_6.GetValue(); }, false);
|
|
5757
|
+
}
|
|
5544
5758
|
}
|
|
5545
5759
|
// We'll use "SetDefaultColor" to updating the internal reference and to allow for an animation.
|
|
5546
5760
|
CesiumEntityStyler.SetDefaultColor({
|
|
@@ -5565,16 +5779,16 @@ var EntityRenderEngine;
|
|
|
5565
5779
|
}
|
|
5566
5780
|
Point.Render = Render;
|
|
5567
5781
|
function RenderGroup(params) {
|
|
5568
|
-
var _a, _b, _c, _d;
|
|
5782
|
+
var _a, _b, _c, _d, _e;
|
|
5569
5783
|
return __awaiter(this, void 0, void 0, function () {
|
|
5570
|
-
var api, cEntities, i, entity, zoomItem, style,
|
|
5571
|
-
return __generator(this, function (
|
|
5572
|
-
switch (
|
|
5784
|
+
var api, cEntities, i, entity, zoomItem, style, _f, tagIds, tags, pStyle, cEntity, name_2;
|
|
5785
|
+
return __generator(this, function (_g) {
|
|
5786
|
+
switch (_g.label) {
|
|
5573
5787
|
case 0:
|
|
5574
5788
|
api = params.apiGetter.getApi();
|
|
5575
5789
|
cEntities = new Map();
|
|
5576
5790
|
i = 0;
|
|
5577
|
-
|
|
5791
|
+
_g.label = 1;
|
|
5578
5792
|
case 1:
|
|
5579
5793
|
if (!(i < params.entities.length)) return [3 /*break*/, 11];
|
|
5580
5794
|
entity = params.entities[i];
|
|
@@ -5582,13 +5796,13 @@ var EntityRenderEngine;
|
|
|
5582
5796
|
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 3];
|
|
5583
5797
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
5584
5798
|
case 2:
|
|
5585
|
-
|
|
5799
|
+
_f = (_a = (_g.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
5586
5800
|
return [3 /*break*/, 4];
|
|
5587
5801
|
case 3:
|
|
5588
|
-
|
|
5589
|
-
|
|
5802
|
+
_f = zoomItem.Style;
|
|
5803
|
+
_g.label = 4;
|
|
5590
5804
|
case 4:
|
|
5591
|
-
style =
|
|
5805
|
+
style = _f;
|
|
5592
5806
|
tagIds = entity.Bruce["Layer.ID"];
|
|
5593
5807
|
tags = [];
|
|
5594
5808
|
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 6];
|
|
@@ -5597,8 +5811,8 @@ var EntityRenderEngine;
|
|
|
5597
5811
|
tagIds: tagIds
|
|
5598
5812
|
})];
|
|
5599
5813
|
case 5:
|
|
5600
|
-
tags = (
|
|
5601
|
-
|
|
5814
|
+
tags = (_g.sent()).tags;
|
|
5815
|
+
_g.label = 6;
|
|
5602
5816
|
case 6:
|
|
5603
5817
|
pStyle = (_b = style === null || style === void 0 ? void 0 : style.pointStyle) !== null && _b !== void 0 ? _b : {};
|
|
5604
5818
|
return [4 /*yield*/, Render({
|
|
@@ -5610,20 +5824,21 @@ var EntityRenderEngine;
|
|
|
5610
5824
|
apiGetter: params.apiGetter,
|
|
5611
5825
|
maxDistance: zoomItem.MaxZoom,
|
|
5612
5826
|
minDistance: zoomItem.MinZoom,
|
|
5613
|
-
rendered: (_c = params.rendered) === null || _c === void 0 ? void 0 : _c.get(entity.Bruce.ID)
|
|
5827
|
+
rendered: (_c = params.rendered) === null || _c === void 0 ? void 0 : _c.get(entity.Bruce.ID),
|
|
5828
|
+
entityHistoric: (_d = params.entitiesHistoric) === null || _d === void 0 ? void 0 : _d[entity.Bruce.ID]
|
|
5614
5829
|
})];
|
|
5615
5830
|
case 7:
|
|
5616
|
-
cEntity =
|
|
5831
|
+
cEntity = _g.sent();
|
|
5617
5832
|
if (!cEntity) return [3 /*break*/, 9];
|
|
5618
5833
|
return [4 /*yield*/, getName(api, entity)];
|
|
5619
5834
|
case 8:
|
|
5620
|
-
name_2 =
|
|
5835
|
+
name_2 = _g.sent();
|
|
5621
5836
|
cEntity.name = name_2;
|
|
5622
|
-
cEntity._renderGroup = getRenderGroupId(zoomItem, (
|
|
5623
|
-
|
|
5837
|
+
cEntity._renderGroup = getRenderGroupId(zoomItem, (_e = params.viewer) === null || _e === void 0 ? void 0 : _e.terrainProvider);
|
|
5838
|
+
_g.label = 9;
|
|
5624
5839
|
case 9:
|
|
5625
5840
|
cEntities.set(entity.Bruce.ID, cEntity);
|
|
5626
|
-
|
|
5841
|
+
_g.label = 10;
|
|
5627
5842
|
case 10:
|
|
5628
5843
|
i++;
|
|
5629
5844
|
return [3 /*break*/, 1];
|
|
@@ -6194,6 +6409,9 @@ var EntityRenderEngine;
|
|
|
6194
6409
|
function Render(params) {
|
|
6195
6410
|
var _this = this;
|
|
6196
6411
|
var entity = params.entity;
|
|
6412
|
+
if (!params.entityHistoric) {
|
|
6413
|
+
params.entityHistoric = [];
|
|
6414
|
+
}
|
|
6197
6415
|
var transform = entity === null || entity === void 0 ? void 0 : entity.transform;
|
|
6198
6416
|
var heading = EnsureNumber(transform === null || transform === void 0 ? void 0 : transform.heading);
|
|
6199
6417
|
heading = (heading + 90) % 360;
|
|
@@ -6240,29 +6458,38 @@ var EntityRenderEngine;
|
|
|
6240
6458
|
color = colorToCColor(bColor);
|
|
6241
6459
|
}
|
|
6242
6460
|
}
|
|
6243
|
-
/*
|
|
6244
|
-
const cEntity: ICesiumEntityExt = new Cesium.Entity({
|
|
6245
|
-
id: ObjectUtils.UId(10),
|
|
6246
|
-
model: {
|
|
6247
|
-
uri: params.lodUrl,
|
|
6248
|
-
heightReference: heightRef,
|
|
6249
|
-
scale: scale * styleScale,
|
|
6250
|
-
shadows: Cesium.ShadowMode.ENABLED,
|
|
6251
|
-
colorBlendAmount: blendAmount,
|
|
6252
|
-
colorBlendMode: blendMode,
|
|
6253
|
-
color: new Cesium.CallbackProperty(() => color, true),
|
|
6254
|
-
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
6255
|
-
},
|
|
6256
|
-
orientation: new Cesium.ConstantProperty(orientation),
|
|
6257
|
-
position: pos,
|
|
6258
|
-
show: true
|
|
6259
|
-
});
|
|
6260
|
-
*/
|
|
6261
6461
|
var animateScale = null;
|
|
6262
6462
|
var cEntity = params.rendered;
|
|
6263
6463
|
if (!cEntity || !cEntity.model) {
|
|
6264
6464
|
var hpr = new HeadingPitchRoll(Math$1.toRadians(heading), Math$1.toRadians(pitch), Math$1.toRadians(roll));
|
|
6265
6465
|
var orientation_1 = Transforms.headingPitchRollQuaternion(pos3d, hpr);
|
|
6466
|
+
if (!color) {
|
|
6467
|
+
color = Color.WHITE.clone();
|
|
6468
|
+
}
|
|
6469
|
+
var animateColor_1 = new CesiumAnimatedProperty.AnimateColor({
|
|
6470
|
+
durationMs: 1500,
|
|
6471
|
+
targetColor: color,
|
|
6472
|
+
startColor: color.clone().withAlpha(0.001),
|
|
6473
|
+
viewer: params.viewer
|
|
6474
|
+
});
|
|
6475
|
+
var position = null;
|
|
6476
|
+
// If we have a series of time-based positions then we'll animate as time changes.
|
|
6477
|
+
var series = getSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
6478
|
+
if (series.length > 1) {
|
|
6479
|
+
var animatePosition_7 = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
6480
|
+
posses: series,
|
|
6481
|
+
viewer: params.viewer
|
|
6482
|
+
});
|
|
6483
|
+
position = new CallbackProperty(function () { return animatePosition_7.GetValue(); }, false);
|
|
6484
|
+
}
|
|
6485
|
+
else {
|
|
6486
|
+
position = new CallbackProperty(function () { return EntityUtils.GetPos({
|
|
6487
|
+
viewer: params.viewer,
|
|
6488
|
+
entity: entity,
|
|
6489
|
+
recordHeightRef: heightRef,
|
|
6490
|
+
returnHeightRef: heightRef
|
|
6491
|
+
}); }, true);
|
|
6492
|
+
}
|
|
6266
6493
|
cEntity = new Entity({
|
|
6267
6494
|
id: ObjectUtils.UId(10),
|
|
6268
6495
|
model: {
|
|
@@ -6272,17 +6499,27 @@ var EntityRenderEngine;
|
|
|
6272
6499
|
shadows: ShadowMode.ENABLED,
|
|
6273
6500
|
colorBlendAmount: blendAmount,
|
|
6274
6501
|
colorBlendMode: blendMode,
|
|
6275
|
-
color: new CallbackProperty(function () {
|
|
6502
|
+
color: new CallbackProperty(function () {
|
|
6503
|
+
var color = animateColor_1.GetColor();
|
|
6504
|
+
if (animateColor_1.IsDone() && (cEntity === null || cEntity === void 0 ? void 0 : cEntity.model)) {
|
|
6505
|
+
cEntity.model.color = new CallbackProperty(function () { return color; }, true);
|
|
6506
|
+
}
|
|
6507
|
+
return color;
|
|
6508
|
+
}, false),
|
|
6276
6509
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
6277
6510
|
},
|
|
6278
6511
|
orientation: new CallbackProperty(function () { return orientation_1; }, true),
|
|
6279
|
-
position:
|
|
6512
|
+
position: position,
|
|
6280
6513
|
show: true
|
|
6281
6514
|
});
|
|
6282
6515
|
CesiumEntityStyler.BakeDefaultColor({
|
|
6283
6516
|
entity: cEntity,
|
|
6284
6517
|
viewer: params.viewer,
|
|
6285
|
-
override: true
|
|
6518
|
+
override: true,
|
|
6519
|
+
colors: {
|
|
6520
|
+
"model": color
|
|
6521
|
+
},
|
|
6522
|
+
refresh: false
|
|
6286
6523
|
});
|
|
6287
6524
|
}
|
|
6288
6525
|
else {
|
|
@@ -6312,17 +6549,28 @@ var EntityRenderEngine;
|
|
|
6312
6549
|
cEntity.model.colorBlendAmount = new ConstantProperty(blendAmount);
|
|
6313
6550
|
cEntity.model.colorBlendMode = new ConstantProperty(blendMode);
|
|
6314
6551
|
cEntity.model.distanceDisplayCondition = new ConstantProperty(getDisplayCondition(params.minDistance, params.maxDistance));
|
|
6315
|
-
|
|
6316
|
-
var
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
targetPos3d: pos3d,
|
|
6322
|
-
viewer: params.viewer,
|
|
6323
|
-
startPos3d: prevPos3d
|
|
6552
|
+
// If we have a series of time-based positions then we'll animate as time changes.
|
|
6553
|
+
var series = getSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
6554
|
+
if (series.length > 1) {
|
|
6555
|
+
var animatePosition_8 = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
6556
|
+
posses: series,
|
|
6557
|
+
viewer: params.viewer
|
|
6324
6558
|
});
|
|
6325
|
-
cEntity.position = new CallbackProperty(function () { return
|
|
6559
|
+
cEntity.position = new CallbackProperty(function () { return animatePosition_8.GetValue(); }, false);
|
|
6560
|
+
}
|
|
6561
|
+
else {
|
|
6562
|
+
var prevPos3d = getValue$1(params.viewer, cEntity.position);
|
|
6563
|
+
var posChanged = !prevPos3d || !Cartesian3.equals(prevPos3d, pos3d);
|
|
6564
|
+
var animatePosition_9 = null;
|
|
6565
|
+
if (posChanged) {
|
|
6566
|
+
animatePosition_9 = new CesiumAnimatedProperty.AnimatePosition({
|
|
6567
|
+
durationMs: 200,
|
|
6568
|
+
targetPos3d: pos3d,
|
|
6569
|
+
viewer: params.viewer,
|
|
6570
|
+
startPos3d: prevPos3d
|
|
6571
|
+
});
|
|
6572
|
+
cEntity.position = new CallbackProperty(function () { return animatePosition_9.GetValue(); }, false);
|
|
6573
|
+
}
|
|
6326
6574
|
}
|
|
6327
6575
|
// cEntity.orientation = new Cesium.ConstantProperty(orientation);
|
|
6328
6576
|
var prevHeading = cEntity.model._heading;
|
|
@@ -6471,16 +6719,16 @@ var EntityRenderEngine;
|
|
|
6471
6719
|
}
|
|
6472
6720
|
Model3d.Render = Render;
|
|
6473
6721
|
function RenderGroup(params) {
|
|
6474
|
-
var _a, _b, _c, _d, _e, _f;
|
|
6722
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6475
6723
|
return __awaiter(this, void 0, void 0, function () {
|
|
6476
|
-
var api, cEntities, reqBody, i, entity, zoomItem, style,
|
|
6477
|
-
return __generator(this, function (
|
|
6478
|
-
switch (
|
|
6724
|
+
var api, cEntities, reqBody, i, entity, zoomItem, style, _h, tagIds, tags, mStyle, group, level, catId, lodData, _loop_2, i;
|
|
6725
|
+
return __generator(this, function (_j) {
|
|
6726
|
+
switch (_j.label) {
|
|
6479
6727
|
case 0:
|
|
6480
6728
|
api = params.apiGetter.getApi();
|
|
6481
6729
|
return [4 /*yield*/, api.Loading];
|
|
6482
6730
|
case 1:
|
|
6483
|
-
|
|
6731
|
+
_j.sent();
|
|
6484
6732
|
cEntities = new Map();
|
|
6485
6733
|
reqBody = {
|
|
6486
6734
|
"strict": false,
|
|
@@ -6488,7 +6736,7 @@ var EntityRenderEngine;
|
|
|
6488
6736
|
"Items": []
|
|
6489
6737
|
};
|
|
6490
6738
|
i = 0;
|
|
6491
|
-
|
|
6739
|
+
_j.label = 2;
|
|
6492
6740
|
case 2:
|
|
6493
6741
|
if (!(i < params.entities.length)) return [3 /*break*/, 9];
|
|
6494
6742
|
entity = params.entities[i];
|
|
@@ -6496,13 +6744,13 @@ var EntityRenderEngine;
|
|
|
6496
6744
|
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 4];
|
|
6497
6745
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
6498
6746
|
case 3:
|
|
6499
|
-
|
|
6747
|
+
_h = (_a = (_j.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
6500
6748
|
return [3 /*break*/, 5];
|
|
6501
6749
|
case 4:
|
|
6502
|
-
|
|
6503
|
-
|
|
6750
|
+
_h = zoomItem.Style;
|
|
6751
|
+
_j.label = 5;
|
|
6504
6752
|
case 5:
|
|
6505
|
-
style =
|
|
6753
|
+
style = _h;
|
|
6506
6754
|
tagIds = entity.Bruce["Layer.ID"];
|
|
6507
6755
|
tags = [];
|
|
6508
6756
|
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 7];
|
|
@@ -6511,8 +6759,8 @@ var EntityRenderEngine;
|
|
|
6511
6759
|
tagIds: tagIds
|
|
6512
6760
|
})];
|
|
6513
6761
|
case 6:
|
|
6514
|
-
tags = (
|
|
6515
|
-
|
|
6762
|
+
tags = (_j.sent()).tags;
|
|
6763
|
+
_j.label = 7;
|
|
6516
6764
|
case 7:
|
|
6517
6765
|
mStyle = (_b = style === null || style === void 0 ? void 0 : style.modelStyle) !== null && _b !== void 0 ? _b : {};
|
|
6518
6766
|
group = mStyle.lodGroup ? Calculator.GetString(mStyle.lodGroup, entity, tags) : null;
|
|
@@ -6533,7 +6781,7 @@ var EntityRenderEngine;
|
|
|
6533
6781
|
"group": group,
|
|
6534
6782
|
"level": level
|
|
6535
6783
|
});
|
|
6536
|
-
|
|
6784
|
+
_j.label = 8;
|
|
6537
6785
|
case 8:
|
|
6538
6786
|
i++;
|
|
6539
6787
|
return [3 /*break*/, 2];
|
|
@@ -6542,24 +6790,24 @@ var EntityRenderEngine;
|
|
|
6542
6790
|
filter: reqBody
|
|
6543
6791
|
})];
|
|
6544
6792
|
case 10:
|
|
6545
|
-
lodData = (
|
|
6793
|
+
lodData = (_j.sent()).lods;
|
|
6546
6794
|
_loop_2 = function (i) {
|
|
6547
|
-
var entity, zoomItem, style,
|
|
6548
|
-
return __generator(this, function (
|
|
6549
|
-
switch (
|
|
6795
|
+
var entity, zoomItem, style, _k, tagIds, tags, lod, mStyle, cEntity, name_5;
|
|
6796
|
+
return __generator(this, function (_l) {
|
|
6797
|
+
switch (_l.label) {
|
|
6550
6798
|
case 0:
|
|
6551
6799
|
entity = params.entities[i];
|
|
6552
6800
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
6553
6801
|
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 2];
|
|
6554
6802
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
6555
6803
|
case 1:
|
|
6556
|
-
|
|
6804
|
+
_k = (_c = (_l.sent())) === null || _c === void 0 ? void 0 : _c.Settings;
|
|
6557
6805
|
return [3 /*break*/, 3];
|
|
6558
6806
|
case 2:
|
|
6559
|
-
|
|
6560
|
-
|
|
6807
|
+
_k = zoomItem.Style;
|
|
6808
|
+
_l.label = 3;
|
|
6561
6809
|
case 3:
|
|
6562
|
-
style =
|
|
6810
|
+
style = _k;
|
|
6563
6811
|
tagIds = entity.Bruce["Layer.ID"];
|
|
6564
6812
|
tags = [];
|
|
6565
6813
|
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 5];
|
|
@@ -6568,8 +6816,8 @@ var EntityRenderEngine;
|
|
|
6568
6816
|
tagIds: tagIds
|
|
6569
6817
|
})];
|
|
6570
6818
|
case 4:
|
|
6571
|
-
tags = (
|
|
6572
|
-
|
|
6819
|
+
tags = (_l.sent()).tags;
|
|
6820
|
+
_l.label = 5;
|
|
6573
6821
|
case 5:
|
|
6574
6822
|
lod = lodData.find(function (x) { return x.entityId == entity.Bruce.ID; });
|
|
6575
6823
|
if (!(lod === null || lod === void 0 ? void 0 : lod.clientFileId)) {
|
|
@@ -6579,6 +6827,7 @@ var EntityRenderEngine;
|
|
|
6579
6827
|
cEntity = Render({
|
|
6580
6828
|
rendered: (_e = params.rendered) === null || _e === void 0 ? void 0 : _e.get(entity.Bruce.ID),
|
|
6581
6829
|
entity: entity,
|
|
6830
|
+
entityHistoric: (_f = params.entitiesHistoric) === null || _f === void 0 ? void 0 : _f[entity.Bruce.ID],
|
|
6582
6831
|
style: mStyle,
|
|
6583
6832
|
tags: tags,
|
|
6584
6833
|
viewer: params.viewer,
|
|
@@ -6594,23 +6843,23 @@ var EntityRenderEngine;
|
|
|
6594
6843
|
if (!cEntity) return [3 /*break*/, 7];
|
|
6595
6844
|
return [4 /*yield*/, getName(api, entity)];
|
|
6596
6845
|
case 6:
|
|
6597
|
-
name_5 =
|
|
6846
|
+
name_5 = _l.sent();
|
|
6598
6847
|
cEntity.name = name_5;
|
|
6599
|
-
cEntity._renderGroup = getRenderGroupId(zoomItem, (
|
|
6848
|
+
cEntity._renderGroup = getRenderGroupId(zoomItem, (_g = params.viewer) === null || _g === void 0 ? void 0 : _g.terrainProvider);
|
|
6600
6849
|
cEntities.set(entity.Bruce.ID, cEntity);
|
|
6601
|
-
|
|
6850
|
+
_l.label = 7;
|
|
6602
6851
|
case 7: return [2 /*return*/];
|
|
6603
6852
|
}
|
|
6604
6853
|
});
|
|
6605
6854
|
};
|
|
6606
6855
|
i = 0;
|
|
6607
|
-
|
|
6856
|
+
_j.label = 11;
|
|
6608
6857
|
case 11:
|
|
6609
6858
|
if (!(i < params.entities.length)) return [3 /*break*/, 14];
|
|
6610
6859
|
return [5 /*yield**/, _loop_2(i)];
|
|
6611
6860
|
case 12:
|
|
6612
|
-
|
|
6613
|
-
|
|
6861
|
+
_j.sent();
|
|
6862
|
+
_j.label = 13;
|
|
6614
6863
|
case 13:
|
|
6615
6864
|
i++;
|
|
6616
6865
|
return [3 /*break*/, 11];
|
|
@@ -7837,6 +8086,165 @@ var EntityLabel;
|
|
|
7837
8086
|
EntityLabel.GetLabel = GetLabel;
|
|
7838
8087
|
})(EntityLabel || (EntityLabel = {}));
|
|
7839
8088
|
|
|
8089
|
+
function getColor$2(viewer, obj) {
|
|
8090
|
+
var value = null;
|
|
8091
|
+
if (obj === null || obj === void 0 ? void 0 : obj.getValue) {
|
|
8092
|
+
var date = viewer.scene.lastRenderTime;
|
|
8093
|
+
if (!date) {
|
|
8094
|
+
date = viewer.clock.currentTime;
|
|
8095
|
+
}
|
|
8096
|
+
value = obj.getValue(date);
|
|
8097
|
+
}
|
|
8098
|
+
else {
|
|
8099
|
+
value = obj;
|
|
8100
|
+
}
|
|
8101
|
+
if (value && value instanceof ColorMaterialProperty) {
|
|
8102
|
+
value = value.color;
|
|
8103
|
+
}
|
|
8104
|
+
return value;
|
|
8105
|
+
}
|
|
8106
|
+
var CesiumAnimatedInOut;
|
|
8107
|
+
(function (CesiumAnimatedInOut) {
|
|
8108
|
+
/**
|
|
8109
|
+
* Animates an Entity out of the scene.
|
|
8110
|
+
* Removes it from the scene at the end of the animation.
|
|
8111
|
+
* @param params
|
|
8112
|
+
*/
|
|
8113
|
+
function AnimateOut(params) {
|
|
8114
|
+
var viewer = params.viewer, entity = params.entity;
|
|
8115
|
+
if (entity instanceof Entity) {
|
|
8116
|
+
var pieces = EntityUtils.GatherEntity({
|
|
8117
|
+
entity: entity,
|
|
8118
|
+
});
|
|
8119
|
+
var leaderSet = false;
|
|
8120
|
+
var removed_1 = false;
|
|
8121
|
+
var doRemove_1 = function () {
|
|
8122
|
+
if (removed_1) {
|
|
8123
|
+
return;
|
|
8124
|
+
}
|
|
8125
|
+
removed_1 = true;
|
|
8126
|
+
var removal = viewer.scene.postRender.addEventListener(function () {
|
|
8127
|
+
removal();
|
|
8128
|
+
EntityRenderEngine.Remove({
|
|
8129
|
+
viewer: viewer,
|
|
8130
|
+
entity: entity
|
|
8131
|
+
});
|
|
8132
|
+
});
|
|
8133
|
+
};
|
|
8134
|
+
var _loop_1 = function (i) {
|
|
8135
|
+
var piece = pieces[i];
|
|
8136
|
+
if (piece instanceof Entity) {
|
|
8137
|
+
var animateColor_1;
|
|
8138
|
+
var thing_1;
|
|
8139
|
+
var colorPropKey_1;
|
|
8140
|
+
if (piece.model) {
|
|
8141
|
+
var curColor = getColor$2(viewer, piece.model.color);
|
|
8142
|
+
if (!curColor) {
|
|
8143
|
+
curColor = Color.WHITE.clone();
|
|
8144
|
+
}
|
|
8145
|
+
animateColor_1 = new CesiumAnimatedProperty.AnimateColor({
|
|
8146
|
+
durationMs: 500,
|
|
8147
|
+
targetColor: curColor.withAlpha(0.01),
|
|
8148
|
+
startColor: curColor,
|
|
8149
|
+
viewer: viewer
|
|
8150
|
+
});
|
|
8151
|
+
thing_1 = piece.model;
|
|
8152
|
+
colorPropKey_1 = "color";
|
|
8153
|
+
}
|
|
8154
|
+
else if (piece.point) {
|
|
8155
|
+
var curColor = getColor$2(viewer, piece.point.color);
|
|
8156
|
+
if (!curColor) {
|
|
8157
|
+
curColor = Color.WHITE.clone();
|
|
8158
|
+
}
|
|
8159
|
+
animateColor_1 = new CesiumAnimatedProperty.AnimateColor({
|
|
8160
|
+
durationMs: 500,
|
|
8161
|
+
targetColor: curColor.withAlpha(0.01),
|
|
8162
|
+
startColor: curColor,
|
|
8163
|
+
viewer: viewer
|
|
8164
|
+
});
|
|
8165
|
+
thing_1 = piece.point;
|
|
8166
|
+
colorPropKey_1 = "color";
|
|
8167
|
+
}
|
|
8168
|
+
else if (piece.billboard) {
|
|
8169
|
+
var curColor = getColor$2(viewer, piece.billboard.color);
|
|
8170
|
+
if (!curColor) {
|
|
8171
|
+
curColor = Color.WHITE.clone();
|
|
8172
|
+
}
|
|
8173
|
+
animateColor_1 = new CesiumAnimatedProperty.AnimateColor({
|
|
8174
|
+
durationMs: 200,
|
|
8175
|
+
targetColor: curColor.withAlpha(0.0),
|
|
8176
|
+
startColor: curColor,
|
|
8177
|
+
viewer: viewer
|
|
8178
|
+
});
|
|
8179
|
+
thing_1 = piece.billboard;
|
|
8180
|
+
colorPropKey_1 = "color";
|
|
8181
|
+
}
|
|
8182
|
+
// Other graphic types don't support colour animation.
|
|
8183
|
+
if (thing_1 && colorPropKey_1 && animateColor_1) {
|
|
8184
|
+
var isLeader_1 = !leaderSet;
|
|
8185
|
+
leaderSet = true;
|
|
8186
|
+
var callback = function () {
|
|
8187
|
+
var color = animateColor_1.GetColor();
|
|
8188
|
+
if (isLeader_1 && animateColor_1.IsDone()) {
|
|
8189
|
+
doRemove_1();
|
|
8190
|
+
thing_1[colorPropKey_1] = new ConstantProperty(color);
|
|
8191
|
+
}
|
|
8192
|
+
return color;
|
|
8193
|
+
};
|
|
8194
|
+
if (thing_1[colorPropKey_1] instanceof CallbackProperty) {
|
|
8195
|
+
thing_1[colorPropKey_1].setCallback(callback, false);
|
|
8196
|
+
}
|
|
8197
|
+
else {
|
|
8198
|
+
thing_1[colorPropKey_1] = new CallbackProperty(callback, false);
|
|
8199
|
+
}
|
|
8200
|
+
}
|
|
8201
|
+
}
|
|
8202
|
+
};
|
|
8203
|
+
for (var i = 0; i < pieces.length; i++) {
|
|
8204
|
+
_loop_1(i);
|
|
8205
|
+
}
|
|
8206
|
+
// Nothing animated, so just remove the entity.
|
|
8207
|
+
if (!leaderSet) {
|
|
8208
|
+
EntityRenderEngine.Remove({
|
|
8209
|
+
viewer: viewer,
|
|
8210
|
+
entity: entity
|
|
8211
|
+
});
|
|
8212
|
+
}
|
|
8213
|
+
}
|
|
8214
|
+
else if (entity instanceof Primitive) {
|
|
8215
|
+
if (viewer.scene.primitives.contains(entity)) {
|
|
8216
|
+
viewer.scene.primitives.remove(entity);
|
|
8217
|
+
}
|
|
8218
|
+
}
|
|
8219
|
+
else if (entity instanceof Cesium3DTileFeature) {
|
|
8220
|
+
try {
|
|
8221
|
+
CesiumAnimatedProperty.AnimateTFeatureColor({
|
|
8222
|
+
durationMs: 500,
|
|
8223
|
+
feature: entity,
|
|
8224
|
+
targetColor: Color.WHITE.withAlpha(0.0),
|
|
8225
|
+
startColor: entity.color ? entity.color : Color.WHITE.clone(),
|
|
8226
|
+
viewer: viewer,
|
|
8227
|
+
onDone: function () {
|
|
8228
|
+
var tileset = entity === null || entity === void 0 ? void 0 : entity.tileset;
|
|
8229
|
+
if (tileset && viewer.scene.primitives.contains(tileset)) {
|
|
8230
|
+
entity.show = false;
|
|
8231
|
+
}
|
|
8232
|
+
}
|
|
8233
|
+
});
|
|
8234
|
+
}
|
|
8235
|
+
catch (e) {
|
|
8236
|
+
console.error(e);
|
|
8237
|
+
// If an error occurs, just hide the feature.
|
|
8238
|
+
var tileset = entity === null || entity === void 0 ? void 0 : entity.tileset;
|
|
8239
|
+
if (tileset && viewer.scene.primitives.contains(tileset)) {
|
|
8240
|
+
entity.show = false;
|
|
8241
|
+
}
|
|
8242
|
+
}
|
|
8243
|
+
}
|
|
8244
|
+
}
|
|
8245
|
+
CesiumAnimatedInOut.AnimateOut = AnimateOut;
|
|
8246
|
+
})(CesiumAnimatedInOut || (CesiumAnimatedInOut = {}));
|
|
8247
|
+
|
|
7840
8248
|
/**
|
|
7841
8249
|
* Returns if a given visual is alive and in the scene.
|
|
7842
8250
|
* @param viewer
|
|
@@ -7867,28 +8275,10 @@ function isAlive$1(viewer, visual) {
|
|
|
7867
8275
|
}
|
|
7868
8276
|
function removeEntity(viewer, visual) {
|
|
7869
8277
|
unmarkEntity(visual, false);
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
});
|
|
7875
|
-
}
|
|
7876
|
-
else if (visual instanceof Primitive) {
|
|
7877
|
-
if (viewer.scene.primitives.contains(visual)) {
|
|
7878
|
-
viewer.scene.primitives.remove(visual);
|
|
7879
|
-
}
|
|
7880
|
-
}
|
|
7881
|
-
else if (visual instanceof Cesium3DTileFeature) {
|
|
7882
|
-
try {
|
|
7883
|
-
var tileset = visual === null || visual === void 0 ? void 0 : visual.tileset;
|
|
7884
|
-
if (tileset && viewer.scene.primitives.contains(tileset)) {
|
|
7885
|
-
visual.show = false;
|
|
7886
|
-
}
|
|
7887
|
-
}
|
|
7888
|
-
catch (e) {
|
|
7889
|
-
console.error(e);
|
|
7890
|
-
}
|
|
7891
|
-
}
|
|
8278
|
+
CesiumAnimatedInOut.AnimateOut({
|
|
8279
|
+
entity: visual,
|
|
8280
|
+
viewer: viewer
|
|
8281
|
+
});
|
|
7892
8282
|
}
|
|
7893
8283
|
var MAX_SHOW_DEPTH = 10;
|
|
7894
8284
|
function updateCEntityShow(viewer, visual, rego, show, ignoreParent, depth) {
|
|
@@ -8636,6 +9026,7 @@ var VisualsRegister;
|
|
|
8636
9026
|
rego: rego
|
|
8637
9027
|
});
|
|
8638
9028
|
removeEntity(this.viewer, rego.visual);
|
|
9029
|
+
rego.visual = null;
|
|
8639
9030
|
var doesInclude = this.rego[entityId_4].find(function (r) { return r.menuItemId === menuItemId; });
|
|
8640
9031
|
if (doesInclude) {
|
|
8641
9032
|
this.rego[entityId_4] = entityRegos.filter(function (r) { return r.menuItemId !== menuItemId; });
|
|
@@ -8667,6 +9058,7 @@ var VisualsRegister;
|
|
|
8667
9058
|
rego: rego
|
|
8668
9059
|
});
|
|
8669
9060
|
removeEntity(this_2.viewer, rego.visual);
|
|
9061
|
+
rego.visual = null;
|
|
8670
9062
|
(_b = this_2.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger({
|
|
8671
9063
|
type: EVisualUpdateType.Remove,
|
|
8672
9064
|
entityId: rego.entityId,
|
|
@@ -8697,6 +9089,7 @@ var VisualsRegister;
|
|
|
8697
9089
|
rego: rego
|
|
8698
9090
|
});
|
|
8699
9091
|
removeEntity(this.viewer, rego.visual);
|
|
9092
|
+
rego.visual = null;
|
|
8700
9093
|
this.rego[entityId_5] = entityRegos.filter(function (r) { return r.menuItemId !== menuItemId; });
|
|
8701
9094
|
(_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger({
|
|
8702
9095
|
type: EVisualUpdateType.Remove,
|
|
@@ -10486,33 +10879,55 @@ var EntitiesRenderManager;
|
|
|
10486
10879
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
10487
10880
|
if (force === void 0) { force = false; }
|
|
10488
10881
|
return __awaiter(this, void 0, void 0, function () {
|
|
10489
|
-
var toRemove, i, entity, _k, updated, cEntities, i, entity, id, cEntity, rego, visual, wasClustered, tagIds, rego_1;
|
|
10882
|
+
var entitiesHistoric, toRemove, i, entity, startTmp, stopTmp, startStr, stopStr, historicData, _k, updated, cEntities, i, entity, id, cEntity, rego, visual, wasClustered, tagIds, rego_1;
|
|
10490
10883
|
return __generator(this, function (_l) {
|
|
10491
10884
|
switch (_l.label) {
|
|
10492
10885
|
case 0:
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
requestRender: false
|
|
10501
|
-
});
|
|
10502
|
-
(_b = this.clustering) === null || _b === void 0 ? void 0 : _b.RemoveEntity(entity.Bruce.ID, false);
|
|
10503
|
-
}
|
|
10504
|
-
entities = entities.filter(function (x) { var _a; return !!((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.historicAttrKey); });
|
|
10505
|
-
}
|
|
10506
|
-
return [4 /*yield*/, EntityRenderEngine.Render({
|
|
10507
|
-
viewer: this.viewer,
|
|
10508
|
-
apiGetter: this.apiGetter,
|
|
10509
|
-
entities: entities,
|
|
10886
|
+
entitiesHistoric = {};
|
|
10887
|
+
if (!((_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey)) return [3 /*break*/, 2];
|
|
10888
|
+
toRemove = entities.filter(function (x) { var _a; return !((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.historicAttrKey); });
|
|
10889
|
+
for (i = 0; i < toRemove.length; i++) {
|
|
10890
|
+
entity = toRemove[i];
|
|
10891
|
+
this.visualsManager.RemoveRegos({
|
|
10892
|
+
entityId: entity.Bruce.ID,
|
|
10510
10893
|
menuItemId: this.item.id,
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10894
|
+
requestRender: false
|
|
10895
|
+
});
|
|
10896
|
+
(_b = this.clustering) === null || _b === void 0 ? void 0 : _b.RemoveEntity(entity.Bruce.ID, false);
|
|
10897
|
+
}
|
|
10898
|
+
entities = entities.filter(function (x) { var _a; return !!((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.historicAttrKey); });
|
|
10899
|
+
if (!this.item.historicInterpolation) return [3 /*break*/, 2];
|
|
10900
|
+
if (!entities.length) return [3 /*break*/, 2];
|
|
10901
|
+
startTmp = JulianDate.toDate(this.viewer.clock.startTime);
|
|
10902
|
+
stopTmp = JulianDate.toDate(this.viewer.clock.stopTime);
|
|
10903
|
+
startStr = new Date(startTmp.getTime() - 1000).toISOString();
|
|
10904
|
+
stopStr = new Date(stopTmp.getTime() + 1000).toISOString();
|
|
10905
|
+
return [4 /*yield*/, EntityHistoricData.GetList({
|
|
10906
|
+
attrKey: this.item.BruceEntity.historicAttrKey,
|
|
10907
|
+
dateTimeFrom: startStr,
|
|
10908
|
+
dateTimeTo: stopStr,
|
|
10909
|
+
entityIds: entities.map(function (x) { return x.Bruce.ID; }),
|
|
10910
|
+
api: this.apiGetter.getApi()
|
|
10514
10911
|
})];
|
|
10515
10912
|
case 1:
|
|
10913
|
+
historicData = _l.sent();
|
|
10914
|
+
if (this.disposed) {
|
|
10915
|
+
this.doDispose();
|
|
10916
|
+
return [2 /*return*/];
|
|
10917
|
+
}
|
|
10918
|
+
entitiesHistoric = historicData.recordsByIds;
|
|
10919
|
+
_l.label = 2;
|
|
10920
|
+
case 2: return [4 /*yield*/, EntityRenderEngine.Render({
|
|
10921
|
+
viewer: this.viewer,
|
|
10922
|
+
apiGetter: this.apiGetter,
|
|
10923
|
+
entities: entities,
|
|
10924
|
+
menuItemId: this.item.id,
|
|
10925
|
+
visualRegister: this.visualsManager,
|
|
10926
|
+
zoomControl: this.item.CameraZoomSettings,
|
|
10927
|
+
entitiesHistoric: entitiesHistoric,
|
|
10928
|
+
force: force
|
|
10929
|
+
})];
|
|
10930
|
+
case 3:
|
|
10516
10931
|
_k = _l.sent(), updated = _k.updated, cEntities = _k.entities;
|
|
10517
10932
|
if (this.disposed) {
|
|
10518
10933
|
this.doDispose();
|
|
@@ -23662,7 +24077,7 @@ var ViewRenderEngine;
|
|
|
23662
24077
|
ViewRenderEngine.Render = Render;
|
|
23663
24078
|
})(ViewRenderEngine || (ViewRenderEngine = {}));
|
|
23664
24079
|
|
|
23665
|
-
var VERSION = "3.8.
|
|
24080
|
+
var VERSION = "3.8.3";
|
|
23666
24081
|
|
|
23667
24082
|
export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, Draw3dPolygon, Draw3dPolyline };
|
|
23668
24083
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|