bruce-cesium 3.8.2 → 3.8.4
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 +612 -186
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +610 -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 +71 -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 +23 -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, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Primitive, Cesium3DTileFeature,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, DistanceDisplayCondition, NearFarScalar, Model, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, 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,69 @@ 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.cachedCalc = null;
|
|
1276
|
+
this.cachedTime = null;
|
|
1277
|
+
this.viewer = params.viewer;
|
|
1278
|
+
this.positions = params.posses;
|
|
1279
|
+
// Order positions by date.
|
|
1280
|
+
this.positions.sort(function (a, b) {
|
|
1281
|
+
return a.dateTime.getTime() - b.dateTime.getTime();
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
AnimatePositionSeries.prototype.GetValue = function () {
|
|
1285
|
+
var _this = this;
|
|
1286
|
+
var now = this.viewer.scene.lastRenderTime;
|
|
1287
|
+
if (!now) {
|
|
1288
|
+
now = this.viewer.clock.currentTime;
|
|
1289
|
+
}
|
|
1290
|
+
var nowTime = JulianDate.toDate(now);
|
|
1291
|
+
if (this.cachedTime == nowTime.getTime()) {
|
|
1292
|
+
return this.cachedCalc;
|
|
1293
|
+
}
|
|
1294
|
+
var calculate = function () {
|
|
1295
|
+
// See if we're before the first position.
|
|
1296
|
+
if (nowTime.getTime() <= _this.positions[0].dateTime.getTime()) {
|
|
1297
|
+
return _this.positions[0].pos3d;
|
|
1298
|
+
}
|
|
1299
|
+
// See if we're after the last position.
|
|
1300
|
+
if (nowTime.getTime() >= _this.positions[_this.positions.length - 1].dateTime.getTime()) {
|
|
1301
|
+
return _this.positions[_this.positions.length - 1].pos3d;
|
|
1302
|
+
}
|
|
1303
|
+
// Find the current position.
|
|
1304
|
+
var lastIndex = 0;
|
|
1305
|
+
for (var i = 1; i < _this.positions.length; i++) {
|
|
1306
|
+
var pos = _this.positions[i];
|
|
1307
|
+
if (nowTime.getTime() >= pos.dateTime.getTime()) {
|
|
1308
|
+
lastIndex = i;
|
|
1309
|
+
}
|
|
1310
|
+
else {
|
|
1311
|
+
break;
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
var last = _this.positions[lastIndex];
|
|
1315
|
+
// Interpolate the position.
|
|
1316
|
+
var next = _this.positions[lastIndex + 1];
|
|
1317
|
+
if (!next) {
|
|
1318
|
+
return last.pos3d;
|
|
1319
|
+
}
|
|
1320
|
+
var progress = (nowTime.getTime() - last.dateTime.getTime()) / (next.dateTime.getTime() - last.dateTime.getTime());
|
|
1321
|
+
return Cartesian3.lerp(last.pos3d, next.pos3d, progress, new Cartesian3());
|
|
1322
|
+
};
|
|
1323
|
+
this.cachedTime = nowTime.getTime();
|
|
1324
|
+
this.cachedCalc = calculate();
|
|
1325
|
+
return this.cachedCalc;
|
|
1326
|
+
};
|
|
1327
|
+
return AnimatePositionSeries;
|
|
1328
|
+
}());
|
|
1329
|
+
CesiumAnimatedProperty.AnimatePositionSeries = AnimatePositionSeries;
|
|
1260
1330
|
})(CesiumAnimatedProperty || (CesiumAnimatedProperty = {}));
|
|
1261
1331
|
|
|
1262
1332
|
/**
|
|
@@ -1618,10 +1688,32 @@ var CesiumEntityStyler;
|
|
|
1618
1688
|
}
|
|
1619
1689
|
CesiumEntityStyler.Refresh = Refresh;
|
|
1620
1690
|
function BakeDefaultColor(params) {
|
|
1621
|
-
var
|
|
1691
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1692
|
+
var viewer = params.viewer, entity = params.entity, override = params.override, colors = params.colors, refresh = params.refresh;
|
|
1622
1693
|
if (!entity) {
|
|
1623
1694
|
return;
|
|
1624
1695
|
}
|
|
1696
|
+
if (refresh == null) {
|
|
1697
|
+
refresh = true;
|
|
1698
|
+
}
|
|
1699
|
+
var colorMap;
|
|
1700
|
+
if (colors) {
|
|
1701
|
+
if (!(colors instanceof Map)) {
|
|
1702
|
+
var keys = Object.keys(colors);
|
|
1703
|
+
var map = new Map();
|
|
1704
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1705
|
+
var key = keys[i];
|
|
1706
|
+
map.set(key, colors[key]);
|
|
1707
|
+
}
|
|
1708
|
+
colorMap = map;
|
|
1709
|
+
}
|
|
1710
|
+
else {
|
|
1711
|
+
colorMap = colors;
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
else {
|
|
1715
|
+
colorMap = new Map();
|
|
1716
|
+
}
|
|
1625
1717
|
var parts = EntityUtils.GatherEntity({
|
|
1626
1718
|
entity: entity
|
|
1627
1719
|
});
|
|
@@ -1639,37 +1731,61 @@ var CesiumEntityStyler;
|
|
|
1639
1731
|
}
|
|
1640
1732
|
if (part instanceof Cesium3DTileFeature) {
|
|
1641
1733
|
var opacity = getAppliedOpacity(part);
|
|
1642
|
-
|
|
1643
|
-
|
|
1734
|
+
var color = (_a = colorMap.get("feature")) !== null && _a !== void 0 ? _a : calculateCurColor(viewer, part);
|
|
1735
|
+
storeColor("default", color, part);
|
|
1736
|
+
if (refresh) {
|
|
1737
|
+
refreshColor(viewer, part, opacity);
|
|
1738
|
+
}
|
|
1644
1739
|
}
|
|
1645
1740
|
else if (part instanceof Entity) {
|
|
1646
1741
|
if (part.billboard) {
|
|
1647
|
-
|
|
1648
|
-
|
|
1742
|
+
var color = (_b = colorMap.get("billboard")) !== null && _b !== void 0 ? _b : calculateCurColor(viewer, part.billboard);
|
|
1743
|
+
storeColor("default", color, part.billboard);
|
|
1744
|
+
if (refresh) {
|
|
1745
|
+
refreshColor(viewer, part.billboard, getAppliedOpacity(part.billboard));
|
|
1746
|
+
}
|
|
1649
1747
|
}
|
|
1650
1748
|
if (part.model) {
|
|
1651
|
-
|
|
1652
|
-
|
|
1749
|
+
var color = (_c = colorMap.get("model")) !== null && _c !== void 0 ? _c : calculateCurColor(viewer, part.model);
|
|
1750
|
+
storeColor("default", color, part.model);
|
|
1751
|
+
if (refresh) {
|
|
1752
|
+
refreshColor(viewer, part.model, getAppliedOpacity(part.model));
|
|
1753
|
+
}
|
|
1653
1754
|
}
|
|
1654
1755
|
if (part.polyline) {
|
|
1655
|
-
|
|
1656
|
-
|
|
1756
|
+
var color = (_d = colorMap.get("polyline")) !== null && _d !== void 0 ? _d : calculateCurColor(viewer, part.polyline);
|
|
1757
|
+
storeColor("default", color, part.polyline);
|
|
1758
|
+
if (refresh) {
|
|
1759
|
+
refreshColor(viewer, part.polyline, getAppliedOpacity(part.polyline));
|
|
1760
|
+
}
|
|
1657
1761
|
}
|
|
1658
1762
|
if (part.polygon) {
|
|
1659
|
-
|
|
1660
|
-
|
|
1763
|
+
var color = (_e = colorMap.get("polygon")) !== null && _e !== void 0 ? _e : calculateCurColor(viewer, part.polygon);
|
|
1764
|
+
storeColor("default", color, part.polygon);
|
|
1765
|
+
if (refresh) {
|
|
1766
|
+
refreshColor(viewer, part.polygon, getAppliedOpacity(part.polygon));
|
|
1767
|
+
}
|
|
1661
1768
|
}
|
|
1662
1769
|
if (part.corridor) {
|
|
1663
|
-
|
|
1664
|
-
|
|
1770
|
+
var color = (_f = colorMap.get("corridor")) !== null && _f !== void 0 ? _f : calculateCurColor(viewer, part.corridor);
|
|
1771
|
+
storeColor("default", color, part.corridor);
|
|
1772
|
+
if (refresh) {
|
|
1773
|
+
refreshColor(viewer, part.corridor, getAppliedOpacity(part.corridor));
|
|
1774
|
+
}
|
|
1665
1775
|
}
|
|
1666
1776
|
if (part.point) {
|
|
1667
|
-
|
|
1668
|
-
|
|
1777
|
+
var color = (_g = colorMap.get("point")) !== null && _g !== void 0 ? _g : calculateCurColor(viewer, part.point);
|
|
1778
|
+
storeColor("default", color, part.point);
|
|
1779
|
+
if (refresh) {
|
|
1780
|
+
refreshColor(viewer, part.point, getAppliedOpacity(part.point));
|
|
1781
|
+
}
|
|
1669
1782
|
}
|
|
1670
1783
|
if (part.ellipse) {
|
|
1671
|
-
|
|
1672
|
-
|
|
1784
|
+
var color = (_h = colorMap.get("ellipse")) !== null && _h !== void 0 ? _h : calculateCurColor(viewer, part.ellipse);
|
|
1785
|
+
storeColor("default", color, part.ellipse);
|
|
1786
|
+
if (refresh) {
|
|
1787
|
+
refreshColor(viewer, part.ellipse, getAppliedOpacity(part.ellipse));
|
|
1788
|
+
}
|
|
1673
1789
|
}
|
|
1674
1790
|
}
|
|
1675
1791
|
}
|
|
@@ -4889,6 +5005,27 @@ function extractMetadataFromFileUrl(url) {
|
|
|
4889
5005
|
envId: envId
|
|
4890
5006
|
};
|
|
4891
5007
|
}
|
|
5008
|
+
function getSeriesPossesForHistoricEntity(viewer, heightRef, historic) {
|
|
5009
|
+
var series = [];
|
|
5010
|
+
for (var i = 0; i < historic.length; i++) {
|
|
5011
|
+
var item = historic[i];
|
|
5012
|
+
var pos3d = EntityUtils.GetPos({
|
|
5013
|
+
entity: item.data,
|
|
5014
|
+
viewer: viewer,
|
|
5015
|
+
recordHeightRef: heightRef,
|
|
5016
|
+
returnHeightRef: heightRef
|
|
5017
|
+
});
|
|
5018
|
+
var dateTime = new Date(item.dateTime);
|
|
5019
|
+
if (!dateTime || !pos3d || isNaN(pos3d.x) || isNaN(pos3d.y) || isNaN(pos3d.z)) {
|
|
5020
|
+
continue;
|
|
5021
|
+
}
|
|
5022
|
+
series.push({
|
|
5023
|
+
dateTime: dateTime,
|
|
5024
|
+
pos3d: pos3d
|
|
5025
|
+
});
|
|
5026
|
+
}
|
|
5027
|
+
return series;
|
|
5028
|
+
}
|
|
4892
5029
|
var EntityRenderEngine;
|
|
4893
5030
|
(function (EntityRenderEngine) {
|
|
4894
5031
|
function Render(params) {
|
|
@@ -4984,7 +5121,7 @@ var EntityRenderEngine;
|
|
|
4984
5121
|
}
|
|
4985
5122
|
}
|
|
4986
5123
|
if (!(models.length > 0)) return [3 /*break*/, 2];
|
|
4987
|
-
mParams = __assign(__assign({}, groupRenderParams), { rendered: cEntities, entities: models });
|
|
5124
|
+
mParams = __assign(__assign({}, groupRenderParams), { rendered: cEntities, entities: models, entitiesHistoric: params.entitiesHistoric });
|
|
4988
5125
|
return [4 /*yield*/, Model3d.RenderGroup(mParams)];
|
|
4989
5126
|
case 1:
|
|
4990
5127
|
mEntities = _m.sent();
|
|
@@ -5013,6 +5150,7 @@ var EntityRenderEngine;
|
|
|
5013
5150
|
return [2 /*return*/, "continue"];
|
|
5014
5151
|
}
|
|
5015
5152
|
pParams = __assign(__assign({}, groupRenderParams), { entities: [], rendered: cEntities });
|
|
5153
|
+
pParams.entitiesHistoric = params.entitiesHistoric;
|
|
5016
5154
|
zoomItem = pParams.zoomItems[entity.Bruce.ID];
|
|
5017
5155
|
for (j = 0; j < entity.geometry.MultiGeometry.length; j++) {
|
|
5018
5156
|
subEntity = __assign(__assign({}, entity), { geometry: entity.geometry.MultiGeometry[j], Bruce: __assign(__assign({}, entity.Bruce), { ID: ObjectUtils.UId() }) });
|
|
@@ -5115,7 +5253,7 @@ var EntityRenderEngine;
|
|
|
5115
5253
|
_m.label = 10;
|
|
5116
5254
|
case 10:
|
|
5117
5255
|
if (!(points.length > 0)) return [3 /*break*/, 12];
|
|
5118
|
-
pParams = __assign(__assign({}, groupRenderParams), { entities: points, rendered: cEntities });
|
|
5256
|
+
pParams = __assign(__assign({}, groupRenderParams), { entities: points, rendered: cEntities, entitiesHistoric: params.entitiesHistoric });
|
|
5119
5257
|
return [4 /*yield*/, Point.RenderGroup(pParams)];
|
|
5120
5258
|
case 11:
|
|
5121
5259
|
pEntities = _m.sent();
|
|
@@ -5184,11 +5322,14 @@ var EntityRenderEngine;
|
|
|
5184
5322
|
function Render(params) {
|
|
5185
5323
|
var _a, _b, _c, _d;
|
|
5186
5324
|
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,
|
|
5325
|
+
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
5326
|
return __generator(this, function (_e) {
|
|
5189
5327
|
switch (_e.label) {
|
|
5190
5328
|
case 0:
|
|
5191
5329
|
entity = params.entity;
|
|
5330
|
+
if (!params.entityHistoric) {
|
|
5331
|
+
params.entityHistoric = [];
|
|
5332
|
+
}
|
|
5192
5333
|
style = params.style;
|
|
5193
5334
|
type = style.Type;
|
|
5194
5335
|
if (type == null) {
|
|
@@ -5284,9 +5425,32 @@ var EntityRenderEngine;
|
|
|
5284
5425
|
disableDepthTest = Boolean(style.renderOnTop);
|
|
5285
5426
|
if (iconScale > 0) {
|
|
5286
5427
|
bColor = style.iconTintColor ? Calculator.GetColor(style.iconTintColor, entity, params.tags) : null;
|
|
5287
|
-
|
|
5428
|
+
cColor = bColor ? colorToCColor(bColor) : Color.WHITE.clone();
|
|
5288
5429
|
heightRef_1 = getHeightRef(style);
|
|
5289
5430
|
if (!params.rendered || !params.rendered.billboard) {
|
|
5431
|
+
animateColorIn_1 = new CesiumAnimatedProperty.AnimateColor({
|
|
5432
|
+
durationMs: 200,
|
|
5433
|
+
targetColor: cColor,
|
|
5434
|
+
startColor: cColor.withAlpha(0),
|
|
5435
|
+
viewer: params.viewer
|
|
5436
|
+
});
|
|
5437
|
+
position = null;
|
|
5438
|
+
series = getSeriesPossesForHistoricEntity(params.viewer, heightRef_1, params.entityHistoric);
|
|
5439
|
+
if (series.length > 1) {
|
|
5440
|
+
animatePosition_1 = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
5441
|
+
posses: series,
|
|
5442
|
+
viewer: params.viewer
|
|
5443
|
+
});
|
|
5444
|
+
position = new CallbackProperty(function () { return animatePosition_1.GetValue(); }, false);
|
|
5445
|
+
}
|
|
5446
|
+
else {
|
|
5447
|
+
position = new CallbackProperty(function () { return EntityUtils.GetPos({
|
|
5448
|
+
viewer: params.viewer,
|
|
5449
|
+
entity: entity,
|
|
5450
|
+
recordHeightRef: heightRef_1,
|
|
5451
|
+
returnHeightRef: heightRef_1
|
|
5452
|
+
}); }, true);
|
|
5453
|
+
}
|
|
5290
5454
|
cEntity = new Entity({
|
|
5291
5455
|
id: ObjectUtils.UId(10),
|
|
5292
5456
|
billboard: {
|
|
@@ -5297,18 +5461,27 @@ var EntityRenderEngine;
|
|
|
5297
5461
|
scale: iconScale,
|
|
5298
5462
|
disableDepthTestDistance: disableDepthTest ? Number.POSITIVE_INFINITY : undefined,
|
|
5299
5463
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance),
|
|
5300
|
-
color: new CallbackProperty(function () {
|
|
5464
|
+
color: new CallbackProperty(function () {
|
|
5465
|
+
var color = animateColorIn_1.GetColor();
|
|
5466
|
+
if (animateColorIn_1.IsDone() && (cEntity === null || cEntity === void 0 ? void 0 : cEntity.billboard)) {
|
|
5467
|
+
cEntity.billboard.color = new CallbackProperty(function () { return color; }, true);
|
|
5468
|
+
}
|
|
5469
|
+
return color;
|
|
5470
|
+
}, false),
|
|
5301
5471
|
// Would be great once we have a setting for this.
|
|
5302
5472
|
// translucencyByDistance: getTranslucencyByDistance(params.minDistance, params.maxDistance),
|
|
5303
5473
|
},
|
|
5304
|
-
position:
|
|
5305
|
-
viewer: params.viewer,
|
|
5306
|
-
entity: entity,
|
|
5307
|
-
recordHeightRef: heightRef_1,
|
|
5308
|
-
returnHeightRef: heightRef_1
|
|
5309
|
-
}); }, true),
|
|
5474
|
+
position: position,
|
|
5310
5475
|
show: true
|
|
5311
5476
|
});
|
|
5477
|
+
CesiumEntityStyler.BakeDefaultColor({
|
|
5478
|
+
entity: cEntity,
|
|
5479
|
+
colors: {
|
|
5480
|
+
"billboard": cColor
|
|
5481
|
+
},
|
|
5482
|
+
viewer: params.viewer,
|
|
5483
|
+
refresh: false
|
|
5484
|
+
});
|
|
5312
5485
|
}
|
|
5313
5486
|
else {
|
|
5314
5487
|
prepareExistingGraphic(params.rendered);
|
|
@@ -5321,25 +5494,35 @@ var EntityRenderEngine;
|
|
|
5321
5494
|
cEntity.billboard.heightReference = new ConstantProperty(getHeightRef(style));
|
|
5322
5495
|
cEntity.billboard.disableDepthTestDistance = new ConstantProperty(disableDepthTest ? Number.POSITIVE_INFINITY : undefined);
|
|
5323
5496
|
cEntity.billboard.distanceDisplayCondition = new ConstantProperty(getDisplayCondition(params.minDistance, params.maxDistance));
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
targetPos3d: pos3d,
|
|
5497
|
+
series = getSeriesPossesForHistoricEntity(params.viewer, heightRef_1, params.entityHistoric);
|
|
5498
|
+
if (series.length > 1) {
|
|
5499
|
+
animatePosition_2 = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
5500
|
+
posses: series,
|
|
5501
|
+
viewer: params.viewer
|
|
5502
|
+
});
|
|
5503
|
+
cEntity.position = new CallbackProperty(function () { return animatePosition_2.GetValue(); }, false);
|
|
5504
|
+
}
|
|
5505
|
+
else {
|
|
5506
|
+
pos3d = EntityUtils.GetPos({
|
|
5335
5507
|
viewer: params.viewer,
|
|
5336
|
-
|
|
5508
|
+
entity: entity,
|
|
5509
|
+
recordHeightRef: heightRef_1,
|
|
5510
|
+
returnHeightRef: heightRef_1
|
|
5337
5511
|
});
|
|
5338
|
-
|
|
5512
|
+
prevPos3d = getValue$1(params.viewer, cEntity.position);
|
|
5513
|
+
if (!prevPos3d || !Cartesian3.equals(prevPos3d, pos3d)) {
|
|
5514
|
+
animatePosition_3 = new CesiumAnimatedProperty.AnimatePosition({
|
|
5515
|
+
durationMs: 200,
|
|
5516
|
+
targetPos3d: pos3d,
|
|
5517
|
+
viewer: params.viewer,
|
|
5518
|
+
startPos3d: prevPos3d
|
|
5519
|
+
});
|
|
5520
|
+
cEntity.position = new CallbackProperty(function () { return animatePosition_3.GetValue(); }, false);
|
|
5521
|
+
}
|
|
5339
5522
|
}
|
|
5340
5523
|
// We'll use "SetDefaultColor" to updating the internal reference and to allow for an animation.
|
|
5341
5524
|
CesiumEntityStyler.SetDefaultColor({
|
|
5342
|
-
color:
|
|
5525
|
+
color: cColor ? cColor : new Color(),
|
|
5343
5526
|
entity: cEntity,
|
|
5344
5527
|
viewer: params.viewer,
|
|
5345
5528
|
override: true,
|
|
@@ -5484,6 +5667,29 @@ var EntityRenderEngine;
|
|
|
5484
5667
|
circleBillboard = createCircleBillboard(size, cColor.toCssColorString());
|
|
5485
5668
|
disableDepthTest = Boolean(style.renderOnTop);
|
|
5486
5669
|
if (!params.rendered || !params.rendered.billboard) {
|
|
5670
|
+
animateColorIn_2 = new CesiumAnimatedProperty.AnimateColor({
|
|
5671
|
+
durationMs: 200,
|
|
5672
|
+
targetColor: cColor,
|
|
5673
|
+
startColor: cColor.withAlpha(0),
|
|
5674
|
+
viewer: params.viewer
|
|
5675
|
+
});
|
|
5676
|
+
position = null;
|
|
5677
|
+
series = getSeriesPossesForHistoricEntity(params.viewer, heightRef_2, params.entityHistoric);
|
|
5678
|
+
if (series.length > 1) {
|
|
5679
|
+
animatePosition_4 = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
5680
|
+
posses: series,
|
|
5681
|
+
viewer: params.viewer
|
|
5682
|
+
});
|
|
5683
|
+
position = new CallbackProperty(function () { return animatePosition_4.GetValue(); }, false);
|
|
5684
|
+
}
|
|
5685
|
+
else {
|
|
5686
|
+
position = new CallbackProperty(function () { return EntityUtils.GetPos({
|
|
5687
|
+
viewer: params.viewer,
|
|
5688
|
+
entity: entity,
|
|
5689
|
+
recordHeightRef: heightRef_2,
|
|
5690
|
+
returnHeightRef: heightRef_2
|
|
5691
|
+
}); }, true);
|
|
5692
|
+
}
|
|
5487
5693
|
cEntity = new Entity({
|
|
5488
5694
|
id: ObjectUtils.UId(10),
|
|
5489
5695
|
// point: {
|
|
@@ -5499,19 +5705,28 @@ var EntityRenderEngine;
|
|
|
5499
5705
|
height: circleBillboard.height,
|
|
5500
5706
|
width: circleBillboard.width,
|
|
5501
5707
|
image: circleBillboard.canvasDataUri,
|
|
5502
|
-
color: new CallbackProperty(function () {
|
|
5708
|
+
color: new CallbackProperty(function () {
|
|
5709
|
+
var color = animateColorIn_2.GetColor();
|
|
5710
|
+
if (animateColorIn_2.IsDone() && (cEntity === null || cEntity === void 0 ? void 0 : cEntity.billboard)) {
|
|
5711
|
+
cEntity.billboard.color = new CallbackProperty(function () { return color; }, true);
|
|
5712
|
+
}
|
|
5713
|
+
return color;
|
|
5714
|
+
}, false),
|
|
5503
5715
|
heightReference: heightRef_2,
|
|
5504
5716
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance),
|
|
5505
5717
|
disableDepthTestDistance: disableDepthTest ? Number.POSITIVE_INFINITY : undefined
|
|
5506
5718
|
},
|
|
5507
|
-
position:
|
|
5508
|
-
viewer: params.viewer,
|
|
5509
|
-
entity: entity,
|
|
5510
|
-
recordHeightRef: heightRef_2,
|
|
5511
|
-
returnHeightRef: heightRef_2
|
|
5512
|
-
}); }, true),
|
|
5719
|
+
position: position,
|
|
5513
5720
|
show: true
|
|
5514
5721
|
});
|
|
5722
|
+
CesiumEntityStyler.BakeDefaultColor({
|
|
5723
|
+
entity: cEntity,
|
|
5724
|
+
viewer: params.viewer,
|
|
5725
|
+
colors: {
|
|
5726
|
+
"billboard": cColor
|
|
5727
|
+
},
|
|
5728
|
+
refresh: false
|
|
5729
|
+
});
|
|
5515
5730
|
}
|
|
5516
5731
|
else {
|
|
5517
5732
|
prepareExistingGraphic(params.rendered);
|
|
@@ -5526,21 +5741,31 @@ var EntityRenderEngine;
|
|
|
5526
5741
|
cEntity.billboard.heightReference = new ConstantProperty(heightRef_2);
|
|
5527
5742
|
cEntity.billboard.distanceDisplayCondition = new ConstantProperty(getDisplayCondition(params.minDistance, params.maxDistance));
|
|
5528
5743
|
cEntity.billboard.disableDepthTestDistance = new ConstantProperty(disableDepthTest ? Number.POSITIVE_INFINITY : undefined);
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
targetPos3d: pos3d,
|
|
5744
|
+
series = getSeriesPossesForHistoricEntity(params.viewer, heightRef_2, params.entityHistoric);
|
|
5745
|
+
if (series.length > 1) {
|
|
5746
|
+
animatePosition_5 = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
5747
|
+
posses: series,
|
|
5748
|
+
viewer: params.viewer
|
|
5749
|
+
});
|
|
5750
|
+
cEntity.position = new CallbackProperty(function () { return animatePosition_5.GetValue(); }, false);
|
|
5751
|
+
}
|
|
5752
|
+
else {
|
|
5753
|
+
pos3d = EntityUtils.GetPos({
|
|
5540
5754
|
viewer: params.viewer,
|
|
5541
|
-
|
|
5755
|
+
entity: entity,
|
|
5756
|
+
recordHeightRef: heightRef_2,
|
|
5757
|
+
returnHeightRef: heightRef_2
|
|
5542
5758
|
});
|
|
5543
|
-
|
|
5759
|
+
prevPos3d = getValue$1(params.viewer, cEntity.position);
|
|
5760
|
+
if (!prevPos3d || !Cartesian3.equals(prevPos3d, pos3d)) {
|
|
5761
|
+
animatePosition_6 = new CesiumAnimatedProperty.AnimatePosition({
|
|
5762
|
+
durationMs: 200,
|
|
5763
|
+
targetPos3d: pos3d,
|
|
5764
|
+
viewer: params.viewer,
|
|
5765
|
+
startPos3d: prevPos3d
|
|
5766
|
+
});
|
|
5767
|
+
cEntity.position = new CallbackProperty(function () { return animatePosition_6.GetValue(); }, false);
|
|
5768
|
+
}
|
|
5544
5769
|
}
|
|
5545
5770
|
// We'll use "SetDefaultColor" to updating the internal reference and to allow for an animation.
|
|
5546
5771
|
CesiumEntityStyler.SetDefaultColor({
|
|
@@ -5565,16 +5790,16 @@ var EntityRenderEngine;
|
|
|
5565
5790
|
}
|
|
5566
5791
|
Point.Render = Render;
|
|
5567
5792
|
function RenderGroup(params) {
|
|
5568
|
-
var _a, _b, _c, _d;
|
|
5793
|
+
var _a, _b, _c, _d, _e;
|
|
5569
5794
|
return __awaiter(this, void 0, void 0, function () {
|
|
5570
|
-
var api, cEntities, i, entity, zoomItem, style,
|
|
5571
|
-
return __generator(this, function (
|
|
5572
|
-
switch (
|
|
5795
|
+
var api, cEntities, i, entity, zoomItem, style, _f, tagIds, tags, pStyle, cEntity, name_2;
|
|
5796
|
+
return __generator(this, function (_g) {
|
|
5797
|
+
switch (_g.label) {
|
|
5573
5798
|
case 0:
|
|
5574
5799
|
api = params.apiGetter.getApi();
|
|
5575
5800
|
cEntities = new Map();
|
|
5576
5801
|
i = 0;
|
|
5577
|
-
|
|
5802
|
+
_g.label = 1;
|
|
5578
5803
|
case 1:
|
|
5579
5804
|
if (!(i < params.entities.length)) return [3 /*break*/, 11];
|
|
5580
5805
|
entity = params.entities[i];
|
|
@@ -5582,13 +5807,13 @@ var EntityRenderEngine;
|
|
|
5582
5807
|
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 3];
|
|
5583
5808
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
5584
5809
|
case 2:
|
|
5585
|
-
|
|
5810
|
+
_f = (_a = (_g.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
5586
5811
|
return [3 /*break*/, 4];
|
|
5587
5812
|
case 3:
|
|
5588
|
-
|
|
5589
|
-
|
|
5813
|
+
_f = zoomItem.Style;
|
|
5814
|
+
_g.label = 4;
|
|
5590
5815
|
case 4:
|
|
5591
|
-
style =
|
|
5816
|
+
style = _f;
|
|
5592
5817
|
tagIds = entity.Bruce["Layer.ID"];
|
|
5593
5818
|
tags = [];
|
|
5594
5819
|
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 6];
|
|
@@ -5597,8 +5822,8 @@ var EntityRenderEngine;
|
|
|
5597
5822
|
tagIds: tagIds
|
|
5598
5823
|
})];
|
|
5599
5824
|
case 5:
|
|
5600
|
-
tags = (
|
|
5601
|
-
|
|
5825
|
+
tags = (_g.sent()).tags;
|
|
5826
|
+
_g.label = 6;
|
|
5602
5827
|
case 6:
|
|
5603
5828
|
pStyle = (_b = style === null || style === void 0 ? void 0 : style.pointStyle) !== null && _b !== void 0 ? _b : {};
|
|
5604
5829
|
return [4 /*yield*/, Render({
|
|
@@ -5610,20 +5835,21 @@ var EntityRenderEngine;
|
|
|
5610
5835
|
apiGetter: params.apiGetter,
|
|
5611
5836
|
maxDistance: zoomItem.MaxZoom,
|
|
5612
5837
|
minDistance: zoomItem.MinZoom,
|
|
5613
|
-
rendered: (_c = params.rendered) === null || _c === void 0 ? void 0 : _c.get(entity.Bruce.ID)
|
|
5838
|
+
rendered: (_c = params.rendered) === null || _c === void 0 ? void 0 : _c.get(entity.Bruce.ID),
|
|
5839
|
+
entityHistoric: (_d = params.entitiesHistoric) === null || _d === void 0 ? void 0 : _d[entity.Bruce.ID]
|
|
5614
5840
|
})];
|
|
5615
5841
|
case 7:
|
|
5616
|
-
cEntity =
|
|
5842
|
+
cEntity = _g.sent();
|
|
5617
5843
|
if (!cEntity) return [3 /*break*/, 9];
|
|
5618
5844
|
return [4 /*yield*/, getName(api, entity)];
|
|
5619
5845
|
case 8:
|
|
5620
|
-
name_2 =
|
|
5846
|
+
name_2 = _g.sent();
|
|
5621
5847
|
cEntity.name = name_2;
|
|
5622
|
-
cEntity._renderGroup = getRenderGroupId(zoomItem, (
|
|
5623
|
-
|
|
5848
|
+
cEntity._renderGroup = getRenderGroupId(zoomItem, (_e = params.viewer) === null || _e === void 0 ? void 0 : _e.terrainProvider);
|
|
5849
|
+
_g.label = 9;
|
|
5624
5850
|
case 9:
|
|
5625
5851
|
cEntities.set(entity.Bruce.ID, cEntity);
|
|
5626
|
-
|
|
5852
|
+
_g.label = 10;
|
|
5627
5853
|
case 10:
|
|
5628
5854
|
i++;
|
|
5629
5855
|
return [3 /*break*/, 1];
|
|
@@ -6194,6 +6420,9 @@ var EntityRenderEngine;
|
|
|
6194
6420
|
function Render(params) {
|
|
6195
6421
|
var _this = this;
|
|
6196
6422
|
var entity = params.entity;
|
|
6423
|
+
if (!params.entityHistoric) {
|
|
6424
|
+
params.entityHistoric = [];
|
|
6425
|
+
}
|
|
6197
6426
|
var transform = entity === null || entity === void 0 ? void 0 : entity.transform;
|
|
6198
6427
|
var heading = EnsureNumber(transform === null || transform === void 0 ? void 0 : transform.heading);
|
|
6199
6428
|
heading = (heading + 90) % 360;
|
|
@@ -6240,29 +6469,38 @@ var EntityRenderEngine;
|
|
|
6240
6469
|
color = colorToCColor(bColor);
|
|
6241
6470
|
}
|
|
6242
6471
|
}
|
|
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
6472
|
var animateScale = null;
|
|
6262
6473
|
var cEntity = params.rendered;
|
|
6263
6474
|
if (!cEntity || !cEntity.model) {
|
|
6264
6475
|
var hpr = new HeadingPitchRoll(Math$1.toRadians(heading), Math$1.toRadians(pitch), Math$1.toRadians(roll));
|
|
6265
6476
|
var orientation_1 = Transforms.headingPitchRollQuaternion(pos3d, hpr);
|
|
6477
|
+
if (!color) {
|
|
6478
|
+
color = Color.WHITE.clone();
|
|
6479
|
+
}
|
|
6480
|
+
var animateColor_1 = new CesiumAnimatedProperty.AnimateColor({
|
|
6481
|
+
durationMs: 1500,
|
|
6482
|
+
targetColor: color,
|
|
6483
|
+
startColor: color.clone().withAlpha(0.001),
|
|
6484
|
+
viewer: params.viewer
|
|
6485
|
+
});
|
|
6486
|
+
var position = null;
|
|
6487
|
+
// If we have a series of time-based positions then we'll animate as time changes.
|
|
6488
|
+
var series = getSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
6489
|
+
if (series.length > 1) {
|
|
6490
|
+
var animatePosition_7 = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
6491
|
+
posses: series,
|
|
6492
|
+
viewer: params.viewer
|
|
6493
|
+
});
|
|
6494
|
+
position = new CallbackProperty(function () { return animatePosition_7.GetValue(); }, false);
|
|
6495
|
+
}
|
|
6496
|
+
else {
|
|
6497
|
+
position = new CallbackProperty(function () { return EntityUtils.GetPos({
|
|
6498
|
+
viewer: params.viewer,
|
|
6499
|
+
entity: entity,
|
|
6500
|
+
recordHeightRef: heightRef,
|
|
6501
|
+
returnHeightRef: heightRef
|
|
6502
|
+
}); }, true);
|
|
6503
|
+
}
|
|
6266
6504
|
cEntity = new Entity({
|
|
6267
6505
|
id: ObjectUtils.UId(10),
|
|
6268
6506
|
model: {
|
|
@@ -6272,17 +6510,27 @@ var EntityRenderEngine;
|
|
|
6272
6510
|
shadows: ShadowMode.ENABLED,
|
|
6273
6511
|
colorBlendAmount: blendAmount,
|
|
6274
6512
|
colorBlendMode: blendMode,
|
|
6275
|
-
color: new CallbackProperty(function () {
|
|
6513
|
+
color: new CallbackProperty(function () {
|
|
6514
|
+
var color = animateColor_1.GetColor();
|
|
6515
|
+
if (animateColor_1.IsDone() && (cEntity === null || cEntity === void 0 ? void 0 : cEntity.model)) {
|
|
6516
|
+
cEntity.model.color = new CallbackProperty(function () { return color; }, true);
|
|
6517
|
+
}
|
|
6518
|
+
return color;
|
|
6519
|
+
}, false),
|
|
6276
6520
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
6277
6521
|
},
|
|
6278
6522
|
orientation: new CallbackProperty(function () { return orientation_1; }, true),
|
|
6279
|
-
position:
|
|
6523
|
+
position: position,
|
|
6280
6524
|
show: true
|
|
6281
6525
|
});
|
|
6282
6526
|
CesiumEntityStyler.BakeDefaultColor({
|
|
6283
6527
|
entity: cEntity,
|
|
6284
6528
|
viewer: params.viewer,
|
|
6285
|
-
override: true
|
|
6529
|
+
override: true,
|
|
6530
|
+
colors: {
|
|
6531
|
+
"model": color
|
|
6532
|
+
},
|
|
6533
|
+
refresh: false
|
|
6286
6534
|
});
|
|
6287
6535
|
}
|
|
6288
6536
|
else {
|
|
@@ -6312,17 +6560,28 @@ var EntityRenderEngine;
|
|
|
6312
6560
|
cEntity.model.colorBlendAmount = new ConstantProperty(blendAmount);
|
|
6313
6561
|
cEntity.model.colorBlendMode = new ConstantProperty(blendMode);
|
|
6314
6562
|
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
|
|
6563
|
+
// If we have a series of time-based positions then we'll animate as time changes.
|
|
6564
|
+
var series = getSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
6565
|
+
if (series.length > 1) {
|
|
6566
|
+
var animatePosition_8 = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
6567
|
+
posses: series,
|
|
6568
|
+
viewer: params.viewer
|
|
6324
6569
|
});
|
|
6325
|
-
cEntity.position = new CallbackProperty(function () { return
|
|
6570
|
+
cEntity.position = new CallbackProperty(function () { return animatePosition_8.GetValue(); }, false);
|
|
6571
|
+
}
|
|
6572
|
+
else {
|
|
6573
|
+
var prevPos3d = getValue$1(params.viewer, cEntity.position);
|
|
6574
|
+
var posChanged = !prevPos3d || !Cartesian3.equals(prevPos3d, pos3d);
|
|
6575
|
+
var animatePosition_9 = null;
|
|
6576
|
+
if (posChanged) {
|
|
6577
|
+
animatePosition_9 = new CesiumAnimatedProperty.AnimatePosition({
|
|
6578
|
+
durationMs: 200,
|
|
6579
|
+
targetPos3d: pos3d,
|
|
6580
|
+
viewer: params.viewer,
|
|
6581
|
+
startPos3d: prevPos3d
|
|
6582
|
+
});
|
|
6583
|
+
cEntity.position = new CallbackProperty(function () { return animatePosition_9.GetValue(); }, false);
|
|
6584
|
+
}
|
|
6326
6585
|
}
|
|
6327
6586
|
// cEntity.orientation = new Cesium.ConstantProperty(orientation);
|
|
6328
6587
|
var prevHeading = cEntity.model._heading;
|
|
@@ -6471,16 +6730,16 @@ var EntityRenderEngine;
|
|
|
6471
6730
|
}
|
|
6472
6731
|
Model3d.Render = Render;
|
|
6473
6732
|
function RenderGroup(params) {
|
|
6474
|
-
var _a, _b, _c, _d, _e, _f;
|
|
6733
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6475
6734
|
return __awaiter(this, void 0, void 0, function () {
|
|
6476
|
-
var api, cEntities, reqBody, i, entity, zoomItem, style,
|
|
6477
|
-
return __generator(this, function (
|
|
6478
|
-
switch (
|
|
6735
|
+
var api, cEntities, reqBody, i, entity, zoomItem, style, _h, tagIds, tags, mStyle, group, level, catId, lodData, _loop_2, i;
|
|
6736
|
+
return __generator(this, function (_j) {
|
|
6737
|
+
switch (_j.label) {
|
|
6479
6738
|
case 0:
|
|
6480
6739
|
api = params.apiGetter.getApi();
|
|
6481
6740
|
return [4 /*yield*/, api.Loading];
|
|
6482
6741
|
case 1:
|
|
6483
|
-
|
|
6742
|
+
_j.sent();
|
|
6484
6743
|
cEntities = new Map();
|
|
6485
6744
|
reqBody = {
|
|
6486
6745
|
"strict": false,
|
|
@@ -6488,7 +6747,7 @@ var EntityRenderEngine;
|
|
|
6488
6747
|
"Items": []
|
|
6489
6748
|
};
|
|
6490
6749
|
i = 0;
|
|
6491
|
-
|
|
6750
|
+
_j.label = 2;
|
|
6492
6751
|
case 2:
|
|
6493
6752
|
if (!(i < params.entities.length)) return [3 /*break*/, 9];
|
|
6494
6753
|
entity = params.entities[i];
|
|
@@ -6496,13 +6755,13 @@ var EntityRenderEngine;
|
|
|
6496
6755
|
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 4];
|
|
6497
6756
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
6498
6757
|
case 3:
|
|
6499
|
-
|
|
6758
|
+
_h = (_a = (_j.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
6500
6759
|
return [3 /*break*/, 5];
|
|
6501
6760
|
case 4:
|
|
6502
|
-
|
|
6503
|
-
|
|
6761
|
+
_h = zoomItem.Style;
|
|
6762
|
+
_j.label = 5;
|
|
6504
6763
|
case 5:
|
|
6505
|
-
style =
|
|
6764
|
+
style = _h;
|
|
6506
6765
|
tagIds = entity.Bruce["Layer.ID"];
|
|
6507
6766
|
tags = [];
|
|
6508
6767
|
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 7];
|
|
@@ -6511,8 +6770,8 @@ var EntityRenderEngine;
|
|
|
6511
6770
|
tagIds: tagIds
|
|
6512
6771
|
})];
|
|
6513
6772
|
case 6:
|
|
6514
|
-
tags = (
|
|
6515
|
-
|
|
6773
|
+
tags = (_j.sent()).tags;
|
|
6774
|
+
_j.label = 7;
|
|
6516
6775
|
case 7:
|
|
6517
6776
|
mStyle = (_b = style === null || style === void 0 ? void 0 : style.modelStyle) !== null && _b !== void 0 ? _b : {};
|
|
6518
6777
|
group = mStyle.lodGroup ? Calculator.GetString(mStyle.lodGroup, entity, tags) : null;
|
|
@@ -6533,7 +6792,7 @@ var EntityRenderEngine;
|
|
|
6533
6792
|
"group": group,
|
|
6534
6793
|
"level": level
|
|
6535
6794
|
});
|
|
6536
|
-
|
|
6795
|
+
_j.label = 8;
|
|
6537
6796
|
case 8:
|
|
6538
6797
|
i++;
|
|
6539
6798
|
return [3 /*break*/, 2];
|
|
@@ -6542,24 +6801,24 @@ var EntityRenderEngine;
|
|
|
6542
6801
|
filter: reqBody
|
|
6543
6802
|
})];
|
|
6544
6803
|
case 10:
|
|
6545
|
-
lodData = (
|
|
6804
|
+
lodData = (_j.sent()).lods;
|
|
6546
6805
|
_loop_2 = function (i) {
|
|
6547
|
-
var entity, zoomItem, style,
|
|
6548
|
-
return __generator(this, function (
|
|
6549
|
-
switch (
|
|
6806
|
+
var entity, zoomItem, style, _k, tagIds, tags, lod, mStyle, cEntity, name_5;
|
|
6807
|
+
return __generator(this, function (_l) {
|
|
6808
|
+
switch (_l.label) {
|
|
6550
6809
|
case 0:
|
|
6551
6810
|
entity = params.entities[i];
|
|
6552
6811
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
6553
6812
|
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 2];
|
|
6554
6813
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
6555
6814
|
case 1:
|
|
6556
|
-
|
|
6815
|
+
_k = (_c = (_l.sent())) === null || _c === void 0 ? void 0 : _c.Settings;
|
|
6557
6816
|
return [3 /*break*/, 3];
|
|
6558
6817
|
case 2:
|
|
6559
|
-
|
|
6560
|
-
|
|
6818
|
+
_k = zoomItem.Style;
|
|
6819
|
+
_l.label = 3;
|
|
6561
6820
|
case 3:
|
|
6562
|
-
style =
|
|
6821
|
+
style = _k;
|
|
6563
6822
|
tagIds = entity.Bruce["Layer.ID"];
|
|
6564
6823
|
tags = [];
|
|
6565
6824
|
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 5];
|
|
@@ -6568,8 +6827,8 @@ var EntityRenderEngine;
|
|
|
6568
6827
|
tagIds: tagIds
|
|
6569
6828
|
})];
|
|
6570
6829
|
case 4:
|
|
6571
|
-
tags = (
|
|
6572
|
-
|
|
6830
|
+
tags = (_l.sent()).tags;
|
|
6831
|
+
_l.label = 5;
|
|
6573
6832
|
case 5:
|
|
6574
6833
|
lod = lodData.find(function (x) { return x.entityId == entity.Bruce.ID; });
|
|
6575
6834
|
if (!(lod === null || lod === void 0 ? void 0 : lod.clientFileId)) {
|
|
@@ -6579,6 +6838,7 @@ var EntityRenderEngine;
|
|
|
6579
6838
|
cEntity = Render({
|
|
6580
6839
|
rendered: (_e = params.rendered) === null || _e === void 0 ? void 0 : _e.get(entity.Bruce.ID),
|
|
6581
6840
|
entity: entity,
|
|
6841
|
+
entityHistoric: (_f = params.entitiesHistoric) === null || _f === void 0 ? void 0 : _f[entity.Bruce.ID],
|
|
6582
6842
|
style: mStyle,
|
|
6583
6843
|
tags: tags,
|
|
6584
6844
|
viewer: params.viewer,
|
|
@@ -6594,23 +6854,23 @@ var EntityRenderEngine;
|
|
|
6594
6854
|
if (!cEntity) return [3 /*break*/, 7];
|
|
6595
6855
|
return [4 /*yield*/, getName(api, entity)];
|
|
6596
6856
|
case 6:
|
|
6597
|
-
name_5 =
|
|
6857
|
+
name_5 = _l.sent();
|
|
6598
6858
|
cEntity.name = name_5;
|
|
6599
|
-
cEntity._renderGroup = getRenderGroupId(zoomItem, (
|
|
6859
|
+
cEntity._renderGroup = getRenderGroupId(zoomItem, (_g = params.viewer) === null || _g === void 0 ? void 0 : _g.terrainProvider);
|
|
6600
6860
|
cEntities.set(entity.Bruce.ID, cEntity);
|
|
6601
|
-
|
|
6861
|
+
_l.label = 7;
|
|
6602
6862
|
case 7: return [2 /*return*/];
|
|
6603
6863
|
}
|
|
6604
6864
|
});
|
|
6605
6865
|
};
|
|
6606
6866
|
i = 0;
|
|
6607
|
-
|
|
6867
|
+
_j.label = 11;
|
|
6608
6868
|
case 11:
|
|
6609
6869
|
if (!(i < params.entities.length)) return [3 /*break*/, 14];
|
|
6610
6870
|
return [5 /*yield**/, _loop_2(i)];
|
|
6611
6871
|
case 12:
|
|
6612
|
-
|
|
6613
|
-
|
|
6872
|
+
_j.sent();
|
|
6873
|
+
_j.label = 13;
|
|
6614
6874
|
case 13:
|
|
6615
6875
|
i++;
|
|
6616
6876
|
return [3 /*break*/, 11];
|
|
@@ -7837,6 +8097,165 @@ var EntityLabel;
|
|
|
7837
8097
|
EntityLabel.GetLabel = GetLabel;
|
|
7838
8098
|
})(EntityLabel || (EntityLabel = {}));
|
|
7839
8099
|
|
|
8100
|
+
function getColor$2(viewer, obj) {
|
|
8101
|
+
var value = null;
|
|
8102
|
+
if (obj === null || obj === void 0 ? void 0 : obj.getValue) {
|
|
8103
|
+
var date = viewer.scene.lastRenderTime;
|
|
8104
|
+
if (!date) {
|
|
8105
|
+
date = viewer.clock.currentTime;
|
|
8106
|
+
}
|
|
8107
|
+
value = obj.getValue(date);
|
|
8108
|
+
}
|
|
8109
|
+
else {
|
|
8110
|
+
value = obj;
|
|
8111
|
+
}
|
|
8112
|
+
if (value && value instanceof ColorMaterialProperty) {
|
|
8113
|
+
value = value.color;
|
|
8114
|
+
}
|
|
8115
|
+
return value;
|
|
8116
|
+
}
|
|
8117
|
+
var CesiumAnimatedInOut;
|
|
8118
|
+
(function (CesiumAnimatedInOut) {
|
|
8119
|
+
/**
|
|
8120
|
+
* Animates an Entity out of the scene.
|
|
8121
|
+
* Removes it from the scene at the end of the animation.
|
|
8122
|
+
* @param params
|
|
8123
|
+
*/
|
|
8124
|
+
function AnimateOut(params) {
|
|
8125
|
+
var viewer = params.viewer, entity = params.entity;
|
|
8126
|
+
if (entity instanceof Entity) {
|
|
8127
|
+
var pieces = EntityUtils.GatherEntity({
|
|
8128
|
+
entity: entity,
|
|
8129
|
+
});
|
|
8130
|
+
var leaderSet = false;
|
|
8131
|
+
var removed_1 = false;
|
|
8132
|
+
var doRemove_1 = function () {
|
|
8133
|
+
if (removed_1) {
|
|
8134
|
+
return;
|
|
8135
|
+
}
|
|
8136
|
+
removed_1 = true;
|
|
8137
|
+
var removal = viewer.scene.postRender.addEventListener(function () {
|
|
8138
|
+
removal();
|
|
8139
|
+
EntityRenderEngine.Remove({
|
|
8140
|
+
viewer: viewer,
|
|
8141
|
+
entity: entity
|
|
8142
|
+
});
|
|
8143
|
+
});
|
|
8144
|
+
};
|
|
8145
|
+
var _loop_1 = function (i) {
|
|
8146
|
+
var piece = pieces[i];
|
|
8147
|
+
if (piece instanceof Entity) {
|
|
8148
|
+
var animateColor_1;
|
|
8149
|
+
var thing_1;
|
|
8150
|
+
var colorPropKey_1;
|
|
8151
|
+
if (piece.model) {
|
|
8152
|
+
var curColor = getColor$2(viewer, piece.model.color);
|
|
8153
|
+
if (!curColor) {
|
|
8154
|
+
curColor = Color.WHITE.clone();
|
|
8155
|
+
}
|
|
8156
|
+
animateColor_1 = new CesiumAnimatedProperty.AnimateColor({
|
|
8157
|
+
durationMs: 500,
|
|
8158
|
+
targetColor: curColor.withAlpha(0.01),
|
|
8159
|
+
startColor: curColor,
|
|
8160
|
+
viewer: viewer
|
|
8161
|
+
});
|
|
8162
|
+
thing_1 = piece.model;
|
|
8163
|
+
colorPropKey_1 = "color";
|
|
8164
|
+
}
|
|
8165
|
+
else if (piece.point) {
|
|
8166
|
+
var curColor = getColor$2(viewer, piece.point.color);
|
|
8167
|
+
if (!curColor) {
|
|
8168
|
+
curColor = Color.WHITE.clone();
|
|
8169
|
+
}
|
|
8170
|
+
animateColor_1 = new CesiumAnimatedProperty.AnimateColor({
|
|
8171
|
+
durationMs: 500,
|
|
8172
|
+
targetColor: curColor.withAlpha(0.01),
|
|
8173
|
+
startColor: curColor,
|
|
8174
|
+
viewer: viewer
|
|
8175
|
+
});
|
|
8176
|
+
thing_1 = piece.point;
|
|
8177
|
+
colorPropKey_1 = "color";
|
|
8178
|
+
}
|
|
8179
|
+
else if (piece.billboard) {
|
|
8180
|
+
var curColor = getColor$2(viewer, piece.billboard.color);
|
|
8181
|
+
if (!curColor) {
|
|
8182
|
+
curColor = Color.WHITE.clone();
|
|
8183
|
+
}
|
|
8184
|
+
animateColor_1 = new CesiumAnimatedProperty.AnimateColor({
|
|
8185
|
+
durationMs: 200,
|
|
8186
|
+
targetColor: curColor.withAlpha(0.0),
|
|
8187
|
+
startColor: curColor,
|
|
8188
|
+
viewer: viewer
|
|
8189
|
+
});
|
|
8190
|
+
thing_1 = piece.billboard;
|
|
8191
|
+
colorPropKey_1 = "color";
|
|
8192
|
+
}
|
|
8193
|
+
// Other graphic types don't support colour animation.
|
|
8194
|
+
if (thing_1 && colorPropKey_1 && animateColor_1) {
|
|
8195
|
+
var isLeader_1 = !leaderSet;
|
|
8196
|
+
leaderSet = true;
|
|
8197
|
+
var callback = function () {
|
|
8198
|
+
var color = animateColor_1.GetColor();
|
|
8199
|
+
if (isLeader_1 && animateColor_1.IsDone()) {
|
|
8200
|
+
doRemove_1();
|
|
8201
|
+
thing_1[colorPropKey_1] = new ConstantProperty(color);
|
|
8202
|
+
}
|
|
8203
|
+
return color;
|
|
8204
|
+
};
|
|
8205
|
+
if (thing_1[colorPropKey_1] instanceof CallbackProperty) {
|
|
8206
|
+
thing_1[colorPropKey_1].setCallback(callback, false);
|
|
8207
|
+
}
|
|
8208
|
+
else {
|
|
8209
|
+
thing_1[colorPropKey_1] = new CallbackProperty(callback, false);
|
|
8210
|
+
}
|
|
8211
|
+
}
|
|
8212
|
+
}
|
|
8213
|
+
};
|
|
8214
|
+
for (var i = 0; i < pieces.length; i++) {
|
|
8215
|
+
_loop_1(i);
|
|
8216
|
+
}
|
|
8217
|
+
// Nothing animated, so just remove the entity.
|
|
8218
|
+
if (!leaderSet) {
|
|
8219
|
+
EntityRenderEngine.Remove({
|
|
8220
|
+
viewer: viewer,
|
|
8221
|
+
entity: entity
|
|
8222
|
+
});
|
|
8223
|
+
}
|
|
8224
|
+
}
|
|
8225
|
+
else if (entity instanceof Primitive) {
|
|
8226
|
+
if (viewer.scene.primitives.contains(entity)) {
|
|
8227
|
+
viewer.scene.primitives.remove(entity);
|
|
8228
|
+
}
|
|
8229
|
+
}
|
|
8230
|
+
else if (entity instanceof Cesium3DTileFeature) {
|
|
8231
|
+
try {
|
|
8232
|
+
CesiumAnimatedProperty.AnimateTFeatureColor({
|
|
8233
|
+
durationMs: 500,
|
|
8234
|
+
feature: entity,
|
|
8235
|
+
targetColor: Color.WHITE.withAlpha(0.0),
|
|
8236
|
+
startColor: entity.color ? entity.color : Color.WHITE.clone(),
|
|
8237
|
+
viewer: viewer,
|
|
8238
|
+
onDone: function () {
|
|
8239
|
+
var tileset = entity === null || entity === void 0 ? void 0 : entity.tileset;
|
|
8240
|
+
if (tileset && viewer.scene.primitives.contains(tileset)) {
|
|
8241
|
+
entity.show = false;
|
|
8242
|
+
}
|
|
8243
|
+
}
|
|
8244
|
+
});
|
|
8245
|
+
}
|
|
8246
|
+
catch (e) {
|
|
8247
|
+
console.error(e);
|
|
8248
|
+
// If an error occurs, just hide the feature.
|
|
8249
|
+
var tileset = entity === null || entity === void 0 ? void 0 : entity.tileset;
|
|
8250
|
+
if (tileset && viewer.scene.primitives.contains(tileset)) {
|
|
8251
|
+
entity.show = false;
|
|
8252
|
+
}
|
|
8253
|
+
}
|
|
8254
|
+
}
|
|
8255
|
+
}
|
|
8256
|
+
CesiumAnimatedInOut.AnimateOut = AnimateOut;
|
|
8257
|
+
})(CesiumAnimatedInOut || (CesiumAnimatedInOut = {}));
|
|
8258
|
+
|
|
7840
8259
|
/**
|
|
7841
8260
|
* Returns if a given visual is alive and in the scene.
|
|
7842
8261
|
* @param viewer
|
|
@@ -7867,28 +8286,10 @@ function isAlive$1(viewer, visual) {
|
|
|
7867
8286
|
}
|
|
7868
8287
|
function removeEntity(viewer, visual) {
|
|
7869
8288
|
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
|
-
}
|
|
8289
|
+
CesiumAnimatedInOut.AnimateOut({
|
|
8290
|
+
entity: visual,
|
|
8291
|
+
viewer: viewer
|
|
8292
|
+
});
|
|
7892
8293
|
}
|
|
7893
8294
|
var MAX_SHOW_DEPTH = 10;
|
|
7894
8295
|
function updateCEntityShow(viewer, visual, rego, show, ignoreParent, depth) {
|
|
@@ -8636,6 +9037,7 @@ var VisualsRegister;
|
|
|
8636
9037
|
rego: rego
|
|
8637
9038
|
});
|
|
8638
9039
|
removeEntity(this.viewer, rego.visual);
|
|
9040
|
+
rego.visual = null;
|
|
8639
9041
|
var doesInclude = this.rego[entityId_4].find(function (r) { return r.menuItemId === menuItemId; });
|
|
8640
9042
|
if (doesInclude) {
|
|
8641
9043
|
this.rego[entityId_4] = entityRegos.filter(function (r) { return r.menuItemId !== menuItemId; });
|
|
@@ -8667,6 +9069,7 @@ var VisualsRegister;
|
|
|
8667
9069
|
rego: rego
|
|
8668
9070
|
});
|
|
8669
9071
|
removeEntity(this_2.viewer, rego.visual);
|
|
9072
|
+
rego.visual = null;
|
|
8670
9073
|
(_b = this_2.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger({
|
|
8671
9074
|
type: EVisualUpdateType.Remove,
|
|
8672
9075
|
entityId: rego.entityId,
|
|
@@ -8697,6 +9100,7 @@ var VisualsRegister;
|
|
|
8697
9100
|
rego: rego
|
|
8698
9101
|
});
|
|
8699
9102
|
removeEntity(this.viewer, rego.visual);
|
|
9103
|
+
rego.visual = null;
|
|
8700
9104
|
this.rego[entityId_5] = entityRegos.filter(function (r) { return r.menuItemId !== menuItemId; });
|
|
8701
9105
|
(_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger({
|
|
8702
9106
|
type: EVisualUpdateType.Remove,
|
|
@@ -10486,33 +10890,55 @@ var EntitiesRenderManager;
|
|
|
10486
10890
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
10487
10891
|
if (force === void 0) { force = false; }
|
|
10488
10892
|
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;
|
|
10893
|
+
var entitiesHistoric, toRemove, i, entity, startTmp, stopTmp, startStr, stopStr, historicData, _k, updated, cEntities, i, entity, id, cEntity, rego, visual, wasClustered, tagIds, rego_1;
|
|
10490
10894
|
return __generator(this, function (_l) {
|
|
10491
10895
|
switch (_l.label) {
|
|
10492
10896
|
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,
|
|
10897
|
+
entitiesHistoric = {};
|
|
10898
|
+
if (!((_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey)) return [3 /*break*/, 2];
|
|
10899
|
+
toRemove = entities.filter(function (x) { var _a; return !((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.historicAttrKey); });
|
|
10900
|
+
for (i = 0; i < toRemove.length; i++) {
|
|
10901
|
+
entity = toRemove[i];
|
|
10902
|
+
this.visualsManager.RemoveRegos({
|
|
10903
|
+
entityId: entity.Bruce.ID,
|
|
10510
10904
|
menuItemId: this.item.id,
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10905
|
+
requestRender: false
|
|
10906
|
+
});
|
|
10907
|
+
(_b = this.clustering) === null || _b === void 0 ? void 0 : _b.RemoveEntity(entity.Bruce.ID, false);
|
|
10908
|
+
}
|
|
10909
|
+
entities = entities.filter(function (x) { var _a; return !!((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.historicAttrKey); });
|
|
10910
|
+
if (!this.item.historicInterpolation) return [3 /*break*/, 2];
|
|
10911
|
+
if (!entities.length) return [3 /*break*/, 2];
|
|
10912
|
+
startTmp = JulianDate.toDate(this.viewer.clock.startTime);
|
|
10913
|
+
stopTmp = JulianDate.toDate(this.viewer.clock.stopTime);
|
|
10914
|
+
startStr = new Date(startTmp.getTime() - 1000).toISOString();
|
|
10915
|
+
stopStr = new Date(stopTmp.getTime() + 1000).toISOString();
|
|
10916
|
+
return [4 /*yield*/, EntityHistoricData.GetList({
|
|
10917
|
+
attrKey: this.item.BruceEntity.historicAttrKey,
|
|
10918
|
+
dateTimeFrom: startStr,
|
|
10919
|
+
dateTimeTo: stopStr,
|
|
10920
|
+
entityIds: entities.map(function (x) { return x.Bruce.ID; }),
|
|
10921
|
+
api: this.apiGetter.getApi()
|
|
10514
10922
|
})];
|
|
10515
10923
|
case 1:
|
|
10924
|
+
historicData = _l.sent();
|
|
10925
|
+
if (this.disposed) {
|
|
10926
|
+
this.doDispose();
|
|
10927
|
+
return [2 /*return*/];
|
|
10928
|
+
}
|
|
10929
|
+
entitiesHistoric = historicData.recordsByIds;
|
|
10930
|
+
_l.label = 2;
|
|
10931
|
+
case 2: return [4 /*yield*/, EntityRenderEngine.Render({
|
|
10932
|
+
viewer: this.viewer,
|
|
10933
|
+
apiGetter: this.apiGetter,
|
|
10934
|
+
entities: entities,
|
|
10935
|
+
menuItemId: this.item.id,
|
|
10936
|
+
visualRegister: this.visualsManager,
|
|
10937
|
+
zoomControl: this.item.CameraZoomSettings,
|
|
10938
|
+
entitiesHistoric: entitiesHistoric,
|
|
10939
|
+
force: force
|
|
10940
|
+
})];
|
|
10941
|
+
case 3:
|
|
10516
10942
|
_k = _l.sent(), updated = _k.updated, cEntities = _k.entities;
|
|
10517
10943
|
if (this.disposed) {
|
|
10518
10944
|
this.doDispose();
|
|
@@ -23662,7 +24088,7 @@ var ViewRenderEngine;
|
|
|
23662
24088
|
ViewRenderEngine.Render = Render;
|
|
23663
24089
|
})(ViewRenderEngine || (ViewRenderEngine = {}));
|
|
23664
24090
|
|
|
23665
|
-
var VERSION = "3.8.
|
|
24091
|
+
var VERSION = "3.8.4";
|
|
23666
24092
|
|
|
23667
24093
|
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
24094
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|