bruce-cesium 4.8.0 → 4.8.2
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 +50 -18
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +48 -16
- 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 +2 -2
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/getters/entity-filter-getter.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +4 -4
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js +5 -7
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +37 -2
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/getters/entity-filter-getter.d.ts +1 -1
- package/dist/types/rendering/render-managers/common/shared-getters.d.ts +1 -1
- package/dist/types/rendering/render-managers/entities/entities-render-manager.d.ts +1 -1
- package/dist/types/rendering/tileset-render-engine.d.ts +3 -2
- package/dist/types/rendering/visuals-register.d.ts +1 -1
- 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, AbstractApi, Session, EntityAttribute, EntityAttachment, EntityAttachmentType } 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, ConstantProperty, ConstantPositionProperty,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, HorizontalOrigin, VerticalOrigin, ColorBlendMode, HeadingPitchRoll, Transforms, Model, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, OrthographicFrustum, EasingFunction, NearFarScalar, SceneTransforms, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, CesiumInspector, ClockRange, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, BoundingSphere, GeometryInstance, Quaternion, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8253,7 +8253,7 @@ var EntityRenderEngine;
|
|
|
8253
8253
|
!(existingRego === null || existingRego === void 0 ? void 0 : existingRego.stale) &&
|
|
8254
8254
|
// If historic/scenario metadata is different then it's also stale.
|
|
8255
8255
|
((existingRego === null || existingRego === void 0 ? void 0 : existingRego.historicDateTime) == ((_b = entity.Bruce) === null || _b === void 0 ? void 0 : _b.HistoricDateTime)) &&
|
|
8256
|
-
((existingRego === null || existingRego === void 0 ? void 0 : existingRego.scenario) == ((_c = entity.Bruce) === null || _c === void 0 ? void 0 : _c
|
|
8256
|
+
((existingRego === null || existingRego === void 0 ? void 0 : existingRego.scenario) == ((_c = entity.Bruce) === null || _c === void 0 ? void 0 : _c.Scenario))) {
|
|
8257
8257
|
// No sorting category needed. Already rendered the way we want.
|
|
8258
8258
|
cEntities.set(id, existingRego.visual);
|
|
8259
8259
|
}
|
|
@@ -8267,7 +8267,7 @@ var EntityRenderEngine;
|
|
|
8267
8267
|
existingRego.historicDateTime = (_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d.HistoricDateTime;
|
|
8268
8268
|
existingRego.historicAttrKey = (_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e.HistoricAttrKey;
|
|
8269
8269
|
existingRego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
8270
|
-
existingRego.scenario = (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f
|
|
8270
|
+
existingRego.scenario = (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.Scenario;
|
|
8271
8271
|
updated.set(id, true);
|
|
8272
8272
|
}
|
|
8273
8273
|
if (displayType == ZoomControl.EDisplayType.Model3D) {
|
|
@@ -12062,7 +12062,7 @@ var EntitiesRenderManager;
|
|
|
12062
12062
|
console.warn("Geojson rendering does not support multiple zoom controls. Only the first one will be used.");
|
|
12063
12063
|
this.zoomControl = [this.zoomControl[0]];
|
|
12064
12064
|
}
|
|
12065
|
-
this.scenario = (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b
|
|
12065
|
+
this.scenario = (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.Scenario;
|
|
12066
12066
|
var isTagItem = Boolean(this.item.BruceEntity.ExpandLayers);
|
|
12067
12067
|
var tagsToRender = isTagItem ? this.item.BruceEntity.SelectedExpandLayers : null;
|
|
12068
12068
|
if (!tagsToRender) {
|
|
@@ -12717,7 +12717,7 @@ var EntitiesRenderManager;
|
|
|
12717
12717
|
})) !== null && _d !== void 0 ? _d : "Unnamed Entity" : "Unnamed Entity",
|
|
12718
12718
|
cdn: _this.item.cdnEnabled,
|
|
12719
12719
|
collection: source.entities,
|
|
12720
|
-
scenario: (_f = (_e = group.data) === null || _e === void 0 ? void 0 : _e.Bruce) === null || _f === void 0 ? void 0 : _f
|
|
12720
|
+
scenario: (_f = (_e = group.data) === null || _e === void 0 ? void 0 : _e.Bruce) === null || _f === void 0 ? void 0 : _f.Scenario
|
|
12721
12721
|
};
|
|
12722
12722
|
group.rego = rego;
|
|
12723
12723
|
_this.visualsManager.AddRego({
|
|
@@ -12870,7 +12870,7 @@ var EntitiesRenderManager;
|
|
|
12870
12870
|
cdn: this.item.cdnEnabled,
|
|
12871
12871
|
historicDateTime: (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.HistoricDateTime,
|
|
12872
12872
|
historicAttrKey: (_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.HistoricAttrKey,
|
|
12873
|
-
scenario: (_h = entity.Bruce) === null || _h === void 0 ? void 0 : _h
|
|
12873
|
+
scenario: (_h = entity.Bruce) === null || _h === void 0 ? void 0 : _h.Scenario
|
|
12874
12874
|
};
|
|
12875
12875
|
this.visualsManager.AddRego({
|
|
12876
12876
|
rego: rego_1,
|
|
@@ -12886,7 +12886,7 @@ var EntitiesRenderManager;
|
|
|
12886
12886
|
rego.historicAttrKey = (_l = entity.Bruce) === null || _l === void 0 ? void 0 : _l.HistoricAttrKey;
|
|
12887
12887
|
rego.cdn = this.item.cdnEnabled;
|
|
12888
12888
|
rego.schemaId = (_m = entity.Bruce) === null || _m === void 0 ? void 0 : _m.SchemaID;
|
|
12889
|
-
rego.scenario = (_o = entity.Bruce) === null || _o === void 0 ? void 0 : _o
|
|
12889
|
+
rego.scenario = (_o = entity.Bruce) === null || _o === void 0 ? void 0 : _o.Scenario;
|
|
12890
12890
|
// Marked as stale meaning some change was performed that requires a refresh.
|
|
12891
12891
|
// This usually means a new sibling was added that we need to update.
|
|
12892
12892
|
if (rego.stale) {
|
|
@@ -15160,6 +15160,10 @@ var TilesetRenderEngine;
|
|
|
15160
15160
|
// This is used to determine if the Style colour needs to be overriden or not.
|
|
15161
15161
|
this.styledEntityIds = {};
|
|
15162
15162
|
this.scenario = 0;
|
|
15163
|
+
// More expensive process.
|
|
15164
|
+
// When an Entity is styled, the rego is reviewed and updated if needed.
|
|
15165
|
+
// This is currently used for scenarios, and off by default to keep other processes faster.
|
|
15166
|
+
this.shouldUpdateRegoStates = false;
|
|
15163
15167
|
this.runningQueues = 0;
|
|
15164
15168
|
this.recordLoadQueue = [];
|
|
15165
15169
|
this.recordCheckQueue = [];
|
|
@@ -15225,6 +15229,9 @@ var TilesetRenderEngine;
|
|
|
15225
15229
|
if (scenario != null) {
|
|
15226
15230
|
this.scenario = scenario;
|
|
15227
15231
|
}
|
|
15232
|
+
if (!!scenario) {
|
|
15233
|
+
this.shouldUpdateRegoStates = true;
|
|
15234
|
+
}
|
|
15228
15235
|
this.loadStyles();
|
|
15229
15236
|
this.loaded = true;
|
|
15230
15237
|
};
|
|
@@ -15265,6 +15272,9 @@ var TilesetRenderEngine;
|
|
|
15265
15272
|
}
|
|
15266
15273
|
if (params.scenario != null) {
|
|
15267
15274
|
this.scenario = params.scenario;
|
|
15275
|
+
if (!this.shouldUpdateRegoStates && !!this.scenario) {
|
|
15276
|
+
this.shouldUpdateRegoStates = true;
|
|
15277
|
+
}
|
|
15268
15278
|
}
|
|
15269
15279
|
if (this.loaded) {
|
|
15270
15280
|
// Empty queues.
|
|
@@ -15724,7 +15734,7 @@ var TilesetRenderEngine;
|
|
|
15724
15734
|
this.styleTilesetFeatureFullData(entity, null, []);
|
|
15725
15735
|
};
|
|
15726
15736
|
Styler.prototype.styleTilesetFeatureFullData = function (entity, data, tags) {
|
|
15727
|
-
var _a;
|
|
15737
|
+
var _a, _b, _c, _d;
|
|
15728
15738
|
var visual = entity.visual;
|
|
15729
15739
|
if (!visual || !(visual instanceof Cesium3DTileFeature)) {
|
|
15730
15740
|
return;
|
|
@@ -15738,14 +15748,38 @@ var TilesetRenderEngine;
|
|
|
15738
15748
|
else {
|
|
15739
15749
|
cColor = colorToCColor$4(bColor);
|
|
15740
15750
|
}
|
|
15751
|
+
var override = this.styledEntityIds[entity.entityId] == true;
|
|
15741
15752
|
CesiumEntityStyler.SetDefaultColor({
|
|
15742
15753
|
color: cColor,
|
|
15743
15754
|
entity: visual,
|
|
15744
15755
|
viewer: this.viewer,
|
|
15745
|
-
override:
|
|
15756
|
+
override: override
|
|
15746
15757
|
});
|
|
15747
15758
|
this.styledEntityIds[entity.entityId] = true;
|
|
15748
15759
|
this.updateStyleProgress();
|
|
15760
|
+
// Since we only need to update it for scenarios right now.
|
|
15761
|
+
// We'll avoid doing it if not needed, eg: first render and no scenario (same state as default).
|
|
15762
|
+
if (this.shouldUpdateRegoStates && (override || ((_b = data === null || data === void 0 ? void 0 : data.Bruce) === null || _b === void 0 ? void 0 : _b.Scenario))) {
|
|
15763
|
+
// Update the Entity's rego state.
|
|
15764
|
+
var rego = this.getEntityRego(entity.entityId);
|
|
15765
|
+
if (rego) {
|
|
15766
|
+
var changed = false;
|
|
15767
|
+
// Changed scenario.
|
|
15768
|
+
if (rego.scenario != ((_c = data === null || data === void 0 ? void 0 : data.Bruce) === null || _c === void 0 ? void 0 : _c.Scenario)) {
|
|
15769
|
+
rego.scenario = (_d = data === null || data === void 0 ? void 0 : data.Bruce) === null || _d === void 0 ? void 0 : _d.Scenario;
|
|
15770
|
+
changed = true;
|
|
15771
|
+
}
|
|
15772
|
+
// Something changed, trigger a rego update.
|
|
15773
|
+
// This lets UI know when the rego has changed.
|
|
15774
|
+
if (changed) {
|
|
15775
|
+
this.register.OnUpdate.Trigger({
|
|
15776
|
+
type: VisualsRegister.EVisualUpdateType.Update,
|
|
15777
|
+
entityId: entity.entityId,
|
|
15778
|
+
rego: rego
|
|
15779
|
+
});
|
|
15780
|
+
}
|
|
15781
|
+
}
|
|
15782
|
+
}
|
|
15749
15783
|
};
|
|
15750
15784
|
Styler.prototype.getTilesetFeatureStyle = function (entityId, entityTypeId) {
|
|
15751
15785
|
var _a, _b, _c, _d;
|
|
@@ -15975,7 +16009,7 @@ var TilesetCadRenderManager;
|
|
|
15975
16009
|
expandSources: (_a = _this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.ExpandSources,
|
|
15976
16010
|
menuItemId: _this.item.id,
|
|
15977
16011
|
register: _this.visualsManager,
|
|
15978
|
-
scenario: (_b = _this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b
|
|
16012
|
+
scenario: (_b = _this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.Scenario
|
|
15979
16013
|
});
|
|
15980
16014
|
_this.viewer.scene.requestRender();
|
|
15981
16015
|
}
|
|
@@ -16040,7 +16074,7 @@ var TilesetCadRenderManager;
|
|
|
16040
16074
|
*/
|
|
16041
16075
|
Manager.prototype.mapTilesetFeature = function (feature, add) {
|
|
16042
16076
|
var _this = this;
|
|
16043
|
-
var _a, _b, _c, _d, _e
|
|
16077
|
+
var _a, _b, _c, _d, _e;
|
|
16044
16078
|
var rego = {
|
|
16045
16079
|
entityId: null,
|
|
16046
16080
|
entityTypeId: null,
|
|
@@ -16052,12 +16086,10 @@ var TilesetCadRenderManager;
|
|
|
16052
16086
|
tilesetId: (_c = this.item.tileset) === null || _c === void 0 ? void 0 : _c.TilesetID,
|
|
16053
16087
|
tilesetType: Tileset.EType.Cad,
|
|
16054
16088
|
rootId: this.rootId,
|
|
16055
|
-
|
|
16056
|
-
// So we need a way to update it when we load the record from styling.
|
|
16057
|
-
scenario: (_d = this.item.BruceEntity) === null || _d === void 0 ? void 0 : _d["Scenario.ID"]
|
|
16089
|
+
scenario: null
|
|
16058
16090
|
};
|
|
16059
16091
|
var featureAny = feature;
|
|
16060
|
-
var propertyNames = featureAny.getPropertyNames ? featureAny.getPropertyNames() : (
|
|
16092
|
+
var propertyNames = featureAny.getPropertyNames ? featureAny.getPropertyNames() : (_d = featureAny.getPropertyIds) === null || _d === void 0 ? void 0 : _d.call(featureAny);
|
|
16061
16093
|
if (!propertyNames) {
|
|
16062
16094
|
return null;
|
|
16063
16095
|
}
|
|
@@ -16105,7 +16137,7 @@ var TilesetCadRenderManager;
|
|
|
16105
16137
|
}
|
|
16106
16138
|
// Optional menu item restriction.
|
|
16107
16139
|
// Allows only showing certain entities from a tileset.
|
|
16108
|
-
var onlyIds = (
|
|
16140
|
+
var onlyIds = (_e = this.item.BruceEntity) === null || _e === void 0 ? void 0 : _e.EntityIds;
|
|
16109
16141
|
if ((onlyIds === null || onlyIds === void 0 ? void 0 : onlyIds.length) && !onlyIds.includes(rego.entityId)) {
|
|
16110
16142
|
if (this.item.BruceEntity.Ghosts) {
|
|
16111
16143
|
feature.color = Color.WHITE.clone().withAlpha(0.5);
|
|
@@ -28681,7 +28713,7 @@ var WidgetViewBar = /** @class */ (function (_super) {
|
|
|
28681
28713
|
return WidgetViewBar;
|
|
28682
28714
|
}(Widget.AWidget));
|
|
28683
28715
|
|
|
28684
|
-
var VERSION = "4.8.
|
|
28716
|
+
var VERSION = "4.8.2";
|
|
28685
28717
|
|
|
28686
28718
|
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 };
|
|
28687
28719
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|