bruce-cesium 4.9.3 → 4.9.5
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 +41 -29
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +40 -28
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine.js +5 -4
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/getters/entity-filter-getter.js +8 -4
- package/dist/lib/rendering/getters/entity-filter-getter.js.map +1 -1
- package/dist/lib/rendering/render-managers/common/shared-getters.js +2 -0
- package/dist/lib/rendering/render-managers/common/shared-getters.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +21 -18
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js +3 -1
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/getters/entity-filter-getter.d.ts +2 -0
- package/dist/types/rendering/render-managers/common/shared-getters.d.ts +1 -0
- package/dist/types/rendering/visuals-register.d.ts +1 -0
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttachment, EntityAttachmentType, EntityAttribute, AbstractApi, Session } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, Quaternion, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
const TIME_LAG = 300;
|
|
6
6
|
const POSITION_CHECK_TIMER = 950;
|
|
@@ -7637,7 +7637,7 @@ var EntityRenderEngine;
|
|
|
7637
7637
|
}
|
|
7638
7638
|
EntityRenderEngine.GetRenderGroupId = GetRenderGroupId;
|
|
7639
7639
|
async function Render(params) {
|
|
7640
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7640
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
7641
7641
|
const groupRenderParams = {
|
|
7642
7642
|
apiGetter: params.apiGetter,
|
|
7643
7643
|
viewer: params.viewer,
|
|
@@ -7735,8 +7735,9 @@ var EntityRenderEngine;
|
|
|
7735
7735
|
// Update metadata for the same reason.
|
|
7736
7736
|
existingRego.historicDateTime = (_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d.HistoricDateTime;
|
|
7737
7737
|
existingRego.historicAttrKey = (_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e.HistoricAttrKey;
|
|
7738
|
+
existingRego.historicLayers = (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.HistoricLayers;
|
|
7738
7739
|
existingRego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
7739
|
-
existingRego.scenario = (
|
|
7740
|
+
existingRego.scenario = (_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.Scenario;
|
|
7740
7741
|
updated.set(id, true);
|
|
7741
7742
|
}
|
|
7742
7743
|
if (displayType == ZoomControl.EDisplayType.Model3D) {
|
|
@@ -7749,7 +7750,7 @@ var EntityRenderEngine;
|
|
|
7749
7750
|
entity: entity,
|
|
7750
7751
|
path: ["Bruce", "VectorGeometry"]
|
|
7751
7752
|
});
|
|
7752
|
-
if ((
|
|
7753
|
+
if ((_h = geometry === null || geometry === void 0 ? void 0 : geometry.MultiGeometry) === null || _h === void 0 ? void 0 : _h.length) {
|
|
7753
7754
|
multiGeometry.push(entity);
|
|
7754
7755
|
}
|
|
7755
7756
|
else {
|
|
@@ -7792,7 +7793,7 @@ var EntityRenderEngine;
|
|
|
7792
7793
|
entity: entity,
|
|
7793
7794
|
path: ["Bruce", "VectorGeometry"]
|
|
7794
7795
|
});
|
|
7795
|
-
if (!((
|
|
7796
|
+
if (!((_j = geometry === null || geometry === void 0 ? void 0 : geometry.MultiGeometry) === null || _j === void 0 ? void 0 : _j.length)) {
|
|
7796
7797
|
polygons.push(entity);
|
|
7797
7798
|
continue;
|
|
7798
7799
|
}
|
|
@@ -10755,7 +10756,9 @@ var VisualsRegister;
|
|
|
10755
10756
|
if (menuItemId) {
|
|
10756
10757
|
return entityRegos.find(r => r.menuItemId === menuItemId);
|
|
10757
10758
|
}
|
|
10758
|
-
return entityRegos.
|
|
10759
|
+
return entityRegos.sort((a, b) => {
|
|
10760
|
+
return b.priority - a.priority;
|
|
10761
|
+
})[0];
|
|
10759
10762
|
}
|
|
10760
10763
|
}
|
|
10761
10764
|
/**
|
|
@@ -12048,7 +12051,7 @@ var EntitiesRenderManager;
|
|
|
12048
12051
|
}, 3000);
|
|
12049
12052
|
}
|
|
12050
12053
|
setGetter() {
|
|
12051
|
-
var _a, _b;
|
|
12054
|
+
var _a, _b, _c;
|
|
12052
12055
|
this.unsetGetter();
|
|
12053
12056
|
const isTagItem = Boolean(this.item.BruceEntity.ExpandLayers);
|
|
12054
12057
|
let tagsToRender = isTagItem ? this.item.BruceEntity.SelectedExpandLayers : null;
|
|
@@ -12068,9 +12071,10 @@ var EntitiesRenderManager;
|
|
|
12068
12071
|
tagIds: (tagsToRender === null || tagsToRender === void 0 ? void 0 : tagsToRender.length) ? tagsToRender : [],
|
|
12069
12072
|
debugShowBounds: getShowDebugBounds(),
|
|
12070
12073
|
cdn: this.item.cdnEnabled,
|
|
12074
|
+
historic: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.historic,
|
|
12071
12075
|
historicAttrKey: this.item.BruceEntity.historicAttrKey,
|
|
12072
12076
|
historicInterpolation: this.item.historicInterpolation,
|
|
12073
|
-
schemaId: (
|
|
12077
|
+
schemaId: (_c = this.item.BruceEntity) === null || _c === void 0 ? void 0 : _c.schemaId,
|
|
12074
12078
|
scenario: this.scenario
|
|
12075
12079
|
});
|
|
12076
12080
|
const minMax = RenderManager.GetZoomMinMax({
|
|
@@ -12651,12 +12655,12 @@ var EntitiesRenderManager;
|
|
|
12651
12655
|
* @returns
|
|
12652
12656
|
*/
|
|
12653
12657
|
async renderAsIndividuals(entities, force = false) {
|
|
12654
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
12658
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
12655
12659
|
// Entity ID -> historic records array.
|
|
12656
12660
|
// We load this as extra information when rendering historic records.
|
|
12657
12661
|
// This way we know what to animate towards as time changes.
|
|
12658
12662
|
let entitiesHistoric = {};
|
|
12659
|
-
if (((_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey) && entities.length) {
|
|
12663
|
+
if ((((_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historic) || ((_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.historicAttrKey)) && entities.length) {
|
|
12660
12664
|
// Interpolating.
|
|
12661
12665
|
// We will allow non-historic Entities as long as they have historic data in the range.
|
|
12662
12666
|
if (this.item.historicInterpolation) {
|
|
@@ -12682,14 +12686,14 @@ var EntitiesRenderManager;
|
|
|
12682
12686
|
menuItemId: this.item.id,
|
|
12683
12687
|
requestRender: false
|
|
12684
12688
|
});
|
|
12685
|
-
(
|
|
12689
|
+
(_c = this.clustering) === null || _c === void 0 ? void 0 : _c.RemoveEntity(removeId, false);
|
|
12686
12690
|
}
|
|
12687
12691
|
entities = entities.filter(x => !toRemoveIds.includes(x.Bruce.ID));
|
|
12688
12692
|
}
|
|
12689
12693
|
// Not interpolating.
|
|
12690
12694
|
// So we'll see if the Entities have a historic key or not.
|
|
12691
12695
|
else {
|
|
12692
|
-
const toRemoveIds = entities.filter(x => { var _a; return !((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.
|
|
12696
|
+
const toRemoveIds = entities.filter(x => { var _a; return !((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.HistoricLayers); }).map(x => x.Bruce.ID);
|
|
12693
12697
|
for (let i = 0; i < toRemoveIds.length; i++) {
|
|
12694
12698
|
const removeId = toRemoveIds[i];
|
|
12695
12699
|
this.visualsManager.RemoveRegos({
|
|
@@ -12697,7 +12701,7 @@ var EntitiesRenderManager;
|
|
|
12697
12701
|
menuItemId: this.item.id,
|
|
12698
12702
|
requestRender: false
|
|
12699
12703
|
});
|
|
12700
|
-
(
|
|
12704
|
+
(_d = this.clustering) === null || _d === void 0 ? void 0 : _d.RemoveEntity(removeId, false);
|
|
12701
12705
|
}
|
|
12702
12706
|
entities = entities.filter(x => !toRemoveIds.includes(x.Bruce.ID));
|
|
12703
12707
|
}
|
|
@@ -12737,10 +12741,10 @@ var EntitiesRenderManager;
|
|
|
12737
12741
|
const visual = rego === null || rego === void 0 ? void 0 : rego.visual;
|
|
12738
12742
|
if (!visual || visual != cEntity) {
|
|
12739
12743
|
const wasClustered = this.clustering ? this.clustering.AddEntity(id, cEntity, false) : false;
|
|
12740
|
-
const tagIds = (
|
|
12744
|
+
const tagIds = (_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e["Layer.ID"];
|
|
12741
12745
|
const rego = {
|
|
12742
12746
|
entityId: id,
|
|
12743
|
-
schemaId: (
|
|
12747
|
+
schemaId: (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.SchemaID,
|
|
12744
12748
|
menuItemId: this.item.id,
|
|
12745
12749
|
menuItemType: this.item.Type,
|
|
12746
12750
|
visual: cEntity,
|
|
@@ -12751,9 +12755,10 @@ var EntitiesRenderManager;
|
|
|
12751
12755
|
overrideShow: wasClustered ? false : null,
|
|
12752
12756
|
name: cEntity.name,
|
|
12753
12757
|
cdn: this.item.cdnEnabled,
|
|
12754
|
-
historicDateTime: (
|
|
12755
|
-
historicAttrKey: (
|
|
12756
|
-
|
|
12758
|
+
historicDateTime: (_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.HistoricDateTime,
|
|
12759
|
+
historicAttrKey: (_h = entity.Bruce) === null || _h === void 0 ? void 0 : _h.HistoricAttrKey,
|
|
12760
|
+
historicLayers: (_j = entity.Bruce) === null || _j === void 0 ? void 0 : _j.HistoricLayers,
|
|
12761
|
+
scenario: (_k = entity.Bruce) === null || _k === void 0 ? void 0 : _k.Scenario
|
|
12757
12762
|
};
|
|
12758
12763
|
this.visualsManager.AddRego({
|
|
12759
12764
|
rego,
|
|
@@ -12764,12 +12769,13 @@ var EntitiesRenderManager;
|
|
|
12764
12769
|
rego.name = cEntity.name;
|
|
12765
12770
|
rego.visual = cEntity;
|
|
12766
12771
|
rego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
12767
|
-
rego.tagIds = ((
|
|
12768
|
-
rego.historicDateTime = (
|
|
12769
|
-
rego.historicAttrKey = (
|
|
12772
|
+
rego.tagIds = ((_l = entity.Bruce) === null || _l === void 0 ? void 0 : _l["Layer.ID"]) ? [].concat(entity.Bruce["Layer.ID"]) : [];
|
|
12773
|
+
rego.historicDateTime = (_m = entity.Bruce) === null || _m === void 0 ? void 0 : _m.HistoricDateTime;
|
|
12774
|
+
rego.historicAttrKey = (_o = entity.Bruce) === null || _o === void 0 ? void 0 : _o.HistoricAttrKey;
|
|
12775
|
+
rego.historicLayers = (_p = entity.Bruce) === null || _p === void 0 ? void 0 : _p.HistoricLayers;
|
|
12770
12776
|
rego.cdn = this.item.cdnEnabled;
|
|
12771
|
-
rego.schemaId = (
|
|
12772
|
-
rego.scenario = (
|
|
12777
|
+
rego.schemaId = (_q = entity.Bruce) === null || _q === void 0 ? void 0 : _q.SchemaID;
|
|
12778
|
+
rego.scenario = (_r = entity.Bruce) === null || _r === void 0 ? void 0 : _r.Scenario;
|
|
12773
12779
|
// Marked as stale meaning some change was performed that requires a refresh.
|
|
12774
12780
|
// This usually means a new sibling was added that we need to update.
|
|
12775
12781
|
if (rego.stale) {
|
|
@@ -12799,7 +12805,7 @@ var EntitiesRenderManager;
|
|
|
12799
12805
|
menuItemId: this.item.id,
|
|
12800
12806
|
requestRender: false
|
|
12801
12807
|
});
|
|
12802
|
-
(
|
|
12808
|
+
(_s = this.clustering) === null || _s === void 0 ? void 0 : _s.RemoveEntity(id, false);
|
|
12803
12809
|
}
|
|
12804
12810
|
}
|
|
12805
12811
|
this.viewer.scene.requestRender();
|
|
@@ -16276,10 +16282,11 @@ var EntityFilterGetter;
|
|
|
16276
16282
|
// We use this for refreshing historic data without having to repeat geographic queries.
|
|
16277
16283
|
this.gatheredIntegrity = null;
|
|
16278
16284
|
this.gatheredEntityIds = [];
|
|
16279
|
-
const { api, viewer, viewPort, typeId, schemaId, batchSize, attrFilter, historicAttrKey, historicInterpolation, viaCdn, scenario } = params;
|
|
16285
|
+
const { api, viewer, viewPort, typeId, schemaId, batchSize, attrFilter, historicAttrKey, historicInterpolation, historic, viaCdn, scenario } = params;
|
|
16280
16286
|
this.api = api;
|
|
16281
16287
|
this.typeId = typeId;
|
|
16282
16288
|
this.schemaId = schemaId;
|
|
16289
|
+
this.historic = Boolean(historic);
|
|
16283
16290
|
this.historicAttrKey = historicAttrKey;
|
|
16284
16291
|
this.historicInterpolation = Boolean(historicInterpolation);
|
|
16285
16292
|
this.viaCdn = Boolean(viaCdn);
|
|
@@ -16297,6 +16304,9 @@ var EntityFilterGetter;
|
|
|
16297
16304
|
*/
|
|
16298
16305
|
getIntegrityId() {
|
|
16299
16306
|
let integrity = this.tagIds == null ? "" : this.tagIds.join();
|
|
16307
|
+
if (this.historic) {
|
|
16308
|
+
integrity += "isHistoric";
|
|
16309
|
+
}
|
|
16300
16310
|
if (this.historicAttrKey) {
|
|
16301
16311
|
integrity += this.historicAttrKey;
|
|
16302
16312
|
}
|
|
@@ -16329,7 +16339,7 @@ var EntityFilterGetter;
|
|
|
16329
16339
|
* If there is no historic attr set, this will do nothing.
|
|
16330
16340
|
*/
|
|
16331
16341
|
viewerDateTimeSub() {
|
|
16332
|
-
if (!this.historicAttrKey || this.viewerDateTimeChangeRemoval) {
|
|
16342
|
+
if ((!this.historicAttrKey && !this.historic) || this.viewerDateTimeChangeRemoval) {
|
|
16333
16343
|
return;
|
|
16334
16344
|
}
|
|
16335
16345
|
// This is multiplied by the speed of animation to figure
|
|
@@ -16372,7 +16382,7 @@ var EntityFilterGetter;
|
|
|
16372
16382
|
};
|
|
16373
16383
|
}
|
|
16374
16384
|
updateHistoricDateTime() {
|
|
16375
|
-
if (!this.historicAttrKey) {
|
|
16385
|
+
if (!this.historicAttrKey && !this.historic) {
|
|
16376
16386
|
this.historicAttrDateTime = null;
|
|
16377
16387
|
return;
|
|
16378
16388
|
}
|
|
@@ -16553,7 +16563,7 @@ var EntityFilterGetter;
|
|
|
16553
16563
|
api: this.api,
|
|
16554
16564
|
scenario: this.scenario,
|
|
16555
16565
|
historicKey: this.historicAttrKey,
|
|
16556
|
-
historicPoint: this.historicAttrDateTime,
|
|
16566
|
+
historicPoint: (this.historicAttrKey || this.historic) ? this.historicAttrDateTime : null,
|
|
16557
16567
|
schemaId: this.schemaId,
|
|
16558
16568
|
filter: {
|
|
16559
16569
|
pageSize: PAGE_SIZE,
|
|
@@ -16769,6 +16779,7 @@ function createFilterGetterCacheKey(params) {
|
|
|
16769
16779
|
cacheKey += params.schemaId ? params.schemaId : "";
|
|
16770
16780
|
cacheKey += JSON.stringify(params.tagIds ? params.tagIds : []);
|
|
16771
16781
|
cacheKey += params.historicAttrKey ? params.historicAttrKey : "";
|
|
16782
|
+
cacheKey += params.historic ? "true" : "false";
|
|
16772
16783
|
cacheKey += params.scenario ? params.scenario : 0;
|
|
16773
16784
|
if (params.historicAttrKey) {
|
|
16774
16785
|
cacheKey += params.historicInterpolation ? "true" : "false";
|
|
@@ -16796,6 +16807,7 @@ var SharedGetters;
|
|
|
16796
16807
|
schemaId: params.schemaId,
|
|
16797
16808
|
batchSize: params.batchSize,
|
|
16798
16809
|
attrFilter: params.attrFilter,
|
|
16810
|
+
historic: params.historic,
|
|
16799
16811
|
historicAttrKey: params.historicAttrKey,
|
|
16800
16812
|
historicInterpolation: params.historicInterpolation,
|
|
16801
16813
|
viaCdn: params.cdn,
|
|
@@ -28345,7 +28357,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
28345
28357
|
}
|
|
28346
28358
|
}
|
|
28347
28359
|
|
|
28348
|
-
const VERSION = "4.9.
|
|
28360
|
+
const VERSION = "4.9.5";
|
|
28349
28361
|
|
|
28350
28362
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar, WidgetControlViewBar, WidgetControlViewBarSearch, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
|
|
28351
28363
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|