bruce-cesium 4.9.4 → 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 +39 -29
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +37 -27
- 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.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
|
-
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,
|
|
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, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode,
|
|
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
|
}
|
|
@@ -12050,7 +12051,7 @@ var EntitiesRenderManager;
|
|
|
12050
12051
|
}, 3000);
|
|
12051
12052
|
}
|
|
12052
12053
|
setGetter() {
|
|
12053
|
-
var _a, _b;
|
|
12054
|
+
var _a, _b, _c;
|
|
12054
12055
|
this.unsetGetter();
|
|
12055
12056
|
const isTagItem = Boolean(this.item.BruceEntity.ExpandLayers);
|
|
12056
12057
|
let tagsToRender = isTagItem ? this.item.BruceEntity.SelectedExpandLayers : null;
|
|
@@ -12070,9 +12071,10 @@ var EntitiesRenderManager;
|
|
|
12070
12071
|
tagIds: (tagsToRender === null || tagsToRender === void 0 ? void 0 : tagsToRender.length) ? tagsToRender : [],
|
|
12071
12072
|
debugShowBounds: getShowDebugBounds(),
|
|
12072
12073
|
cdn: this.item.cdnEnabled,
|
|
12074
|
+
historic: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.historic,
|
|
12073
12075
|
historicAttrKey: this.item.BruceEntity.historicAttrKey,
|
|
12074
12076
|
historicInterpolation: this.item.historicInterpolation,
|
|
12075
|
-
schemaId: (
|
|
12077
|
+
schemaId: (_c = this.item.BruceEntity) === null || _c === void 0 ? void 0 : _c.schemaId,
|
|
12076
12078
|
scenario: this.scenario
|
|
12077
12079
|
});
|
|
12078
12080
|
const minMax = RenderManager.GetZoomMinMax({
|
|
@@ -12653,12 +12655,12 @@ var EntitiesRenderManager;
|
|
|
12653
12655
|
* @returns
|
|
12654
12656
|
*/
|
|
12655
12657
|
async renderAsIndividuals(entities, force = false) {
|
|
12656
|
-
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;
|
|
12657
12659
|
// Entity ID -> historic records array.
|
|
12658
12660
|
// We load this as extra information when rendering historic records.
|
|
12659
12661
|
// This way we know what to animate towards as time changes.
|
|
12660
12662
|
let entitiesHistoric = {};
|
|
12661
|
-
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) {
|
|
12662
12664
|
// Interpolating.
|
|
12663
12665
|
// We will allow non-historic Entities as long as they have historic data in the range.
|
|
12664
12666
|
if (this.item.historicInterpolation) {
|
|
@@ -12684,14 +12686,14 @@ var EntitiesRenderManager;
|
|
|
12684
12686
|
menuItemId: this.item.id,
|
|
12685
12687
|
requestRender: false
|
|
12686
12688
|
});
|
|
12687
|
-
(
|
|
12689
|
+
(_c = this.clustering) === null || _c === void 0 ? void 0 : _c.RemoveEntity(removeId, false);
|
|
12688
12690
|
}
|
|
12689
12691
|
entities = entities.filter(x => !toRemoveIds.includes(x.Bruce.ID));
|
|
12690
12692
|
}
|
|
12691
12693
|
// Not interpolating.
|
|
12692
12694
|
// So we'll see if the Entities have a historic key or not.
|
|
12693
12695
|
else {
|
|
12694
|
-
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);
|
|
12695
12697
|
for (let i = 0; i < toRemoveIds.length; i++) {
|
|
12696
12698
|
const removeId = toRemoveIds[i];
|
|
12697
12699
|
this.visualsManager.RemoveRegos({
|
|
@@ -12699,7 +12701,7 @@ var EntitiesRenderManager;
|
|
|
12699
12701
|
menuItemId: this.item.id,
|
|
12700
12702
|
requestRender: false
|
|
12701
12703
|
});
|
|
12702
|
-
(
|
|
12704
|
+
(_d = this.clustering) === null || _d === void 0 ? void 0 : _d.RemoveEntity(removeId, false);
|
|
12703
12705
|
}
|
|
12704
12706
|
entities = entities.filter(x => !toRemoveIds.includes(x.Bruce.ID));
|
|
12705
12707
|
}
|
|
@@ -12739,10 +12741,10 @@ var EntitiesRenderManager;
|
|
|
12739
12741
|
const visual = rego === null || rego === void 0 ? void 0 : rego.visual;
|
|
12740
12742
|
if (!visual || visual != cEntity) {
|
|
12741
12743
|
const wasClustered = this.clustering ? this.clustering.AddEntity(id, cEntity, false) : false;
|
|
12742
|
-
const tagIds = (
|
|
12744
|
+
const tagIds = (_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e["Layer.ID"];
|
|
12743
12745
|
const rego = {
|
|
12744
12746
|
entityId: id,
|
|
12745
|
-
schemaId: (
|
|
12747
|
+
schemaId: (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.SchemaID,
|
|
12746
12748
|
menuItemId: this.item.id,
|
|
12747
12749
|
menuItemType: this.item.Type,
|
|
12748
12750
|
visual: cEntity,
|
|
@@ -12753,9 +12755,10 @@ var EntitiesRenderManager;
|
|
|
12753
12755
|
overrideShow: wasClustered ? false : null,
|
|
12754
12756
|
name: cEntity.name,
|
|
12755
12757
|
cdn: this.item.cdnEnabled,
|
|
12756
|
-
historicDateTime: (
|
|
12757
|
-
historicAttrKey: (
|
|
12758
|
-
|
|
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
|
|
12759
12762
|
};
|
|
12760
12763
|
this.visualsManager.AddRego({
|
|
12761
12764
|
rego,
|
|
@@ -12766,12 +12769,13 @@ var EntitiesRenderManager;
|
|
|
12766
12769
|
rego.name = cEntity.name;
|
|
12767
12770
|
rego.visual = cEntity;
|
|
12768
12771
|
rego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
12769
|
-
rego.tagIds = ((
|
|
12770
|
-
rego.historicDateTime = (
|
|
12771
|
-
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;
|
|
12772
12776
|
rego.cdn = this.item.cdnEnabled;
|
|
12773
|
-
rego.schemaId = (
|
|
12774
|
-
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;
|
|
12775
12779
|
// Marked as stale meaning some change was performed that requires a refresh.
|
|
12776
12780
|
// This usually means a new sibling was added that we need to update.
|
|
12777
12781
|
if (rego.stale) {
|
|
@@ -12801,7 +12805,7 @@ var EntitiesRenderManager;
|
|
|
12801
12805
|
menuItemId: this.item.id,
|
|
12802
12806
|
requestRender: false
|
|
12803
12807
|
});
|
|
12804
|
-
(
|
|
12808
|
+
(_s = this.clustering) === null || _s === void 0 ? void 0 : _s.RemoveEntity(id, false);
|
|
12805
12809
|
}
|
|
12806
12810
|
}
|
|
12807
12811
|
this.viewer.scene.requestRender();
|
|
@@ -16278,10 +16282,11 @@ var EntityFilterGetter;
|
|
|
16278
16282
|
// We use this for refreshing historic data without having to repeat geographic queries.
|
|
16279
16283
|
this.gatheredIntegrity = null;
|
|
16280
16284
|
this.gatheredEntityIds = [];
|
|
16281
|
-
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;
|
|
16282
16286
|
this.api = api;
|
|
16283
16287
|
this.typeId = typeId;
|
|
16284
16288
|
this.schemaId = schemaId;
|
|
16289
|
+
this.historic = Boolean(historic);
|
|
16285
16290
|
this.historicAttrKey = historicAttrKey;
|
|
16286
16291
|
this.historicInterpolation = Boolean(historicInterpolation);
|
|
16287
16292
|
this.viaCdn = Boolean(viaCdn);
|
|
@@ -16299,6 +16304,9 @@ var EntityFilterGetter;
|
|
|
16299
16304
|
*/
|
|
16300
16305
|
getIntegrityId() {
|
|
16301
16306
|
let integrity = this.tagIds == null ? "" : this.tagIds.join();
|
|
16307
|
+
if (this.historic) {
|
|
16308
|
+
integrity += "isHistoric";
|
|
16309
|
+
}
|
|
16302
16310
|
if (this.historicAttrKey) {
|
|
16303
16311
|
integrity += this.historicAttrKey;
|
|
16304
16312
|
}
|
|
@@ -16331,7 +16339,7 @@ var EntityFilterGetter;
|
|
|
16331
16339
|
* If there is no historic attr set, this will do nothing.
|
|
16332
16340
|
*/
|
|
16333
16341
|
viewerDateTimeSub() {
|
|
16334
|
-
if (!this.historicAttrKey || this.viewerDateTimeChangeRemoval) {
|
|
16342
|
+
if ((!this.historicAttrKey && !this.historic) || this.viewerDateTimeChangeRemoval) {
|
|
16335
16343
|
return;
|
|
16336
16344
|
}
|
|
16337
16345
|
// This is multiplied by the speed of animation to figure
|
|
@@ -16374,7 +16382,7 @@ var EntityFilterGetter;
|
|
|
16374
16382
|
};
|
|
16375
16383
|
}
|
|
16376
16384
|
updateHistoricDateTime() {
|
|
16377
|
-
if (!this.historicAttrKey) {
|
|
16385
|
+
if (!this.historicAttrKey && !this.historic) {
|
|
16378
16386
|
this.historicAttrDateTime = null;
|
|
16379
16387
|
return;
|
|
16380
16388
|
}
|
|
@@ -16555,7 +16563,7 @@ var EntityFilterGetter;
|
|
|
16555
16563
|
api: this.api,
|
|
16556
16564
|
scenario: this.scenario,
|
|
16557
16565
|
historicKey: this.historicAttrKey,
|
|
16558
|
-
historicPoint: this.historicAttrDateTime,
|
|
16566
|
+
historicPoint: (this.historicAttrKey || this.historic) ? this.historicAttrDateTime : null,
|
|
16559
16567
|
schemaId: this.schemaId,
|
|
16560
16568
|
filter: {
|
|
16561
16569
|
pageSize: PAGE_SIZE,
|
|
@@ -16771,6 +16779,7 @@ function createFilterGetterCacheKey(params) {
|
|
|
16771
16779
|
cacheKey += params.schemaId ? params.schemaId : "";
|
|
16772
16780
|
cacheKey += JSON.stringify(params.tagIds ? params.tagIds : []);
|
|
16773
16781
|
cacheKey += params.historicAttrKey ? params.historicAttrKey : "";
|
|
16782
|
+
cacheKey += params.historic ? "true" : "false";
|
|
16774
16783
|
cacheKey += params.scenario ? params.scenario : 0;
|
|
16775
16784
|
if (params.historicAttrKey) {
|
|
16776
16785
|
cacheKey += params.historicInterpolation ? "true" : "false";
|
|
@@ -16798,6 +16807,7 @@ var SharedGetters;
|
|
|
16798
16807
|
schemaId: params.schemaId,
|
|
16799
16808
|
batchSize: params.batchSize,
|
|
16800
16809
|
attrFilter: params.attrFilter,
|
|
16810
|
+
historic: params.historic,
|
|
16801
16811
|
historicAttrKey: params.historicAttrKey,
|
|
16802
16812
|
historicInterpolation: params.historicInterpolation,
|
|
16803
16813
|
viaCdn: params.cdn,
|
|
@@ -28347,7 +28357,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
28347
28357
|
}
|
|
28348
28358
|
}
|
|
28349
28359
|
|
|
28350
|
-
const VERSION = "4.9.
|
|
28360
|
+
const VERSION = "4.9.5";
|
|
28351
28361
|
|
|
28352
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 };
|
|
28353
28363
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|