bruce-cesium 5.8.0 → 5.8.1
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 +80 -34
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +78 -32
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/visuals-register.js +77 -31
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/visuals-register.d.ts +12 -2
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BruceEvent, Cartes, Entity as Entity$1, ProjectViewTile, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, 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, ProjectViewTile, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, AbstractApi, Session, EntityAttachment, EntityAttachmentType, EntityAttribute } 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,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, HorizontalOrigin, VerticalOrigin, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Ion, Cesium3DTileColorBlendMode, KmlDataSource, Quaternion, Matrix3, Matrix4, OrthographicFrustum, EasingFunction, NearFarScalar, Cesium3DTileset, IonResource, SceneTransforms, PolygonPipeline, EllipsoidTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
const TIME_LAG = 300;
|
|
6
6
|
const POSITION_CHECK_TIMER = 950;
|
|
@@ -10902,7 +10902,7 @@ var VisualsRegister;
|
|
|
10902
10902
|
* @param state
|
|
10903
10903
|
* @param update
|
|
10904
10904
|
*/
|
|
10905
|
-
SetState(state, update = true) {
|
|
10905
|
+
SetState(state, update = true, source) {
|
|
10906
10906
|
if (!state || isBlankState(state)) {
|
|
10907
10907
|
return;
|
|
10908
10908
|
}
|
|
@@ -10944,12 +10944,15 @@ var VisualsRegister;
|
|
|
10944
10944
|
if (state.hasOwnProperty("hidden")) {
|
|
10945
10945
|
update.hidden = state.hidden;
|
|
10946
10946
|
}
|
|
10947
|
+
if (source) {
|
|
10948
|
+
update.source = source;
|
|
10949
|
+
}
|
|
10947
10950
|
this.onUpdate.Trigger(update);
|
|
10948
10951
|
}
|
|
10949
10952
|
}
|
|
10950
10953
|
return changed;
|
|
10951
10954
|
}
|
|
10952
|
-
SetStates(states) {
|
|
10955
|
+
SetStates(states, source) {
|
|
10953
10956
|
// Array of changed Entity IDs so we know what to refresh/notify at the end.
|
|
10954
10957
|
const entityIds = [];
|
|
10955
10958
|
// If we need to update all Entities.
|
|
@@ -10983,7 +10986,7 @@ var VisualsRegister;
|
|
|
10983
10986
|
}
|
|
10984
10987
|
};
|
|
10985
10988
|
const doUpdate = (state) => {
|
|
10986
|
-
const eChanged = this.SetState(state, false);
|
|
10989
|
+
const eChanged = this.SetState(state, false, source);
|
|
10987
10990
|
if (eChanged && !entityIds.includes(state.entityId)) {
|
|
10988
10991
|
updateRefreshMarkers(state);
|
|
10989
10992
|
entityIds.push(state.entityId);
|
|
@@ -11037,6 +11040,9 @@ var VisualsRegister;
|
|
|
11037
11040
|
if (state.hasOwnProperty("hidden")) {
|
|
11038
11041
|
update.hidden = state.hidden;
|
|
11039
11042
|
}
|
|
11043
|
+
if (source) {
|
|
11044
|
+
update.source = source;
|
|
11045
|
+
}
|
|
11040
11046
|
this.onUpdate.Trigger(update);
|
|
11041
11047
|
}
|
|
11042
11048
|
}
|
|
@@ -11280,17 +11286,21 @@ var VisualsRegister;
|
|
|
11280
11286
|
}
|
|
11281
11287
|
ForceUpdate(params) {
|
|
11282
11288
|
var _a;
|
|
11283
|
-
let { entityIds, requestRender, refreshColors } = params;
|
|
11289
|
+
let { entityIds, requestRender, refreshColors, source } = params;
|
|
11284
11290
|
for (let i = 0; i < entityIds.length; i++) {
|
|
11285
11291
|
const entityId = entityIds[i];
|
|
11286
11292
|
this.queueUpdate({
|
|
11287
11293
|
entityId: entityId,
|
|
11288
11294
|
refresh: true
|
|
11289
11295
|
});
|
|
11290
|
-
|
|
11296
|
+
const update = {
|
|
11291
11297
|
type: EVisualUpdateType.Update,
|
|
11292
11298
|
entityId
|
|
11293
|
-
}
|
|
11299
|
+
};
|
|
11300
|
+
if (source) {
|
|
11301
|
+
update.source = source;
|
|
11302
|
+
}
|
|
11303
|
+
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
11294
11304
|
}
|
|
11295
11305
|
}
|
|
11296
11306
|
/**
|
|
@@ -11392,7 +11402,7 @@ var VisualsRegister;
|
|
|
11392
11402
|
}
|
|
11393
11403
|
SetSelected(params) {
|
|
11394
11404
|
var _a;
|
|
11395
|
-
let { entityIds, selected, refreshIfSelected, requestRender, menuItemId } = params;
|
|
11405
|
+
let { entityIds, selected, refreshIfSelected, requestRender, menuItemId, source } = params;
|
|
11396
11406
|
if (refreshIfSelected == null || refreshIfSelected === undefined) {
|
|
11397
11407
|
refreshIfSelected = true;
|
|
11398
11408
|
}
|
|
@@ -11446,11 +11456,15 @@ var VisualsRegister;
|
|
|
11446
11456
|
}
|
|
11447
11457
|
}
|
|
11448
11458
|
}
|
|
11449
|
-
|
|
11459
|
+
const update = {
|
|
11450
11460
|
entityId: id,
|
|
11451
11461
|
type: EVisualUpdateType.Update,
|
|
11452
11462
|
selected: selected
|
|
11453
|
-
}
|
|
11463
|
+
};
|
|
11464
|
+
if (source) {
|
|
11465
|
+
update.source = source;
|
|
11466
|
+
}
|
|
11467
|
+
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
11454
11468
|
}
|
|
11455
11469
|
if (requestRender != false) {
|
|
11456
11470
|
this.viewer.scene.requestRender();
|
|
@@ -11488,9 +11502,13 @@ var VisualsRegister;
|
|
|
11488
11502
|
}
|
|
11489
11503
|
}
|
|
11490
11504
|
});
|
|
11491
|
-
|
|
11505
|
+
const update = {
|
|
11492
11506
|
type: EVisualUpdateType.DeselectAll
|
|
11493
|
-
}
|
|
11507
|
+
};
|
|
11508
|
+
if (params === null || params === void 0 ? void 0 : params.source) {
|
|
11509
|
+
update.source = params.source;
|
|
11510
|
+
}
|
|
11511
|
+
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
11494
11512
|
if ((params === null || params === void 0 ? void 0 : params.requestRender) != false) {
|
|
11495
11513
|
this.viewer.scene.requestRender();
|
|
11496
11514
|
}
|
|
@@ -11621,7 +11639,7 @@ var VisualsRegister;
|
|
|
11621
11639
|
}
|
|
11622
11640
|
SetIsolated(params) {
|
|
11623
11641
|
var _a;
|
|
11624
|
-
const { entityIds, isolated: isolate, requestRender, menuItemId } = params;
|
|
11642
|
+
const { entityIds, isolated: isolate, requestRender, menuItemId, source } = params;
|
|
11625
11643
|
for (let i = 0; i < entityIds.length; i++) {
|
|
11626
11644
|
const entityId = entityIds[i];
|
|
11627
11645
|
this.setStateValues({
|
|
@@ -11630,11 +11648,15 @@ var VisualsRegister;
|
|
|
11630
11648
|
// Null means it will be deleted from the object.
|
|
11631
11649
|
isolated: isolate ? true : null
|
|
11632
11650
|
});
|
|
11633
|
-
|
|
11651
|
+
const update = {
|
|
11634
11652
|
entityId: entityId,
|
|
11635
11653
|
type: EVisualUpdateType.Update,
|
|
11636
11654
|
isolated: isolate
|
|
11637
|
-
}
|
|
11655
|
+
};
|
|
11656
|
+
if (source) {
|
|
11657
|
+
update.source = source;
|
|
11658
|
+
}
|
|
11659
|
+
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
11638
11660
|
}
|
|
11639
11661
|
this.updateAllEntities({
|
|
11640
11662
|
requestRender: false,
|
|
@@ -11685,7 +11707,7 @@ var VisualsRegister;
|
|
|
11685
11707
|
}
|
|
11686
11708
|
}
|
|
11687
11709
|
SetHidden(params) {
|
|
11688
|
-
const { entityIds, hidden, requestRender, menuItemId } = params;
|
|
11710
|
+
const { entityIds, hidden, requestRender, menuItemId, source } = params;
|
|
11689
11711
|
const stateChanges = [];
|
|
11690
11712
|
for (let i = 0; i < entityIds.length; i++) {
|
|
11691
11713
|
const entityId = entityIds[i];
|
|
@@ -11698,7 +11720,7 @@ var VisualsRegister;
|
|
|
11698
11720
|
}
|
|
11699
11721
|
stateChanges.push(state);
|
|
11700
11722
|
}
|
|
11701
|
-
this.SetStates(stateChanges);
|
|
11723
|
+
this.SetStates(stateChanges, source);
|
|
11702
11724
|
}
|
|
11703
11725
|
GetIsHidden(params) {
|
|
11704
11726
|
const { entityId: id, menuItemId } = params;
|
|
@@ -11737,14 +11759,18 @@ var VisualsRegister;
|
|
|
11737
11759
|
refresh: true
|
|
11738
11760
|
});
|
|
11739
11761
|
}
|
|
11740
|
-
|
|
11762
|
+
const update = {
|
|
11741
11763
|
type: EVisualUpdateType.Update,
|
|
11742
11764
|
hidden: false
|
|
11743
|
-
}
|
|
11765
|
+
};
|
|
11766
|
+
if (params === null || params === void 0 ? void 0 : params.source) {
|
|
11767
|
+
update.source = params.source;
|
|
11768
|
+
}
|
|
11769
|
+
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
11744
11770
|
}
|
|
11745
11771
|
AddRego(params) {
|
|
11746
11772
|
var _a, _b;
|
|
11747
|
-
const { rego, requestRender } = params;
|
|
11773
|
+
const { rego, requestRender, source } = params;
|
|
11748
11774
|
// ND-2078
|
|
11749
11775
|
// Tilesets will often add -> remove -> add because of how tiles load in and out of the scene.
|
|
11750
11776
|
// To avoid flickering, we'll just replace rather than remove -> add.
|
|
@@ -11769,11 +11795,15 @@ var VisualsRegister;
|
|
|
11769
11795
|
entityId: entityId,
|
|
11770
11796
|
refresh: true
|
|
11771
11797
|
});
|
|
11772
|
-
|
|
11798
|
+
const update = {
|
|
11773
11799
|
rego: rego,
|
|
11774
11800
|
type: EVisualUpdateType.Add,
|
|
11775
11801
|
entityId: rego.entityId
|
|
11776
|
-
}
|
|
11802
|
+
};
|
|
11803
|
+
if (source) {
|
|
11804
|
+
update.source = source;
|
|
11805
|
+
}
|
|
11806
|
+
(_b = this.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger(update);
|
|
11777
11807
|
if (requestRender != false) {
|
|
11778
11808
|
this.viewer.scene.requestRender();
|
|
11779
11809
|
}
|
|
@@ -11852,7 +11882,7 @@ var VisualsRegister;
|
|
|
11852
11882
|
*/
|
|
11853
11883
|
RemoveRegos(params) {
|
|
11854
11884
|
var _a, _b, _c;
|
|
11855
|
-
let { entityId, menuItemId, doUpdate, relation, retainTagIds, requestRender, doRemove } = params;
|
|
11885
|
+
let { entityId, menuItemId, doUpdate, relation, retainTagIds, requestRender, doRemove, source } = params;
|
|
11856
11886
|
if (doUpdate == null || doUpdate === undefined) {
|
|
11857
11887
|
doUpdate = true;
|
|
11858
11888
|
}
|
|
@@ -11885,11 +11915,15 @@ var VisualsRegister;
|
|
|
11885
11915
|
if (doesInclude) {
|
|
11886
11916
|
this.rego[entityId] = entityRegos.filter(r => r.menuItemId !== menuItemId);
|
|
11887
11917
|
}
|
|
11888
|
-
|
|
11918
|
+
const update = {
|
|
11889
11919
|
type: EVisualUpdateType.Remove,
|
|
11890
11920
|
entityId: rego.entityId,
|
|
11891
11921
|
rego: rego
|
|
11892
|
-
}
|
|
11922
|
+
};
|
|
11923
|
+
if (source) {
|
|
11924
|
+
update.source = source;
|
|
11925
|
+
}
|
|
11926
|
+
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
11893
11927
|
if (doesInclude) {
|
|
11894
11928
|
this.queueUpdate({
|
|
11895
11929
|
entityId: entityId,
|
|
@@ -11918,11 +11952,15 @@ var VisualsRegister;
|
|
|
11918
11952
|
removeEntity(this.viewer, rego.visual);
|
|
11919
11953
|
}
|
|
11920
11954
|
rego.visual = null;
|
|
11921
|
-
|
|
11955
|
+
const update = {
|
|
11922
11956
|
type: EVisualUpdateType.Remove,
|
|
11923
11957
|
entityId: rego.entityId,
|
|
11924
11958
|
rego: rego
|
|
11925
|
-
}
|
|
11959
|
+
};
|
|
11960
|
+
if (source) {
|
|
11961
|
+
update.source = source;
|
|
11962
|
+
}
|
|
11963
|
+
(_b = this.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger(update);
|
|
11926
11964
|
this.rego[entityId] = entityRegos.filter(r => r.menuItemId !== menuItemId);
|
|
11927
11965
|
if (doUpdate && menuItemId) {
|
|
11928
11966
|
this.queueUpdate({
|
|
@@ -11947,11 +11985,15 @@ var VisualsRegister;
|
|
|
11947
11985
|
removeEntity(this.viewer, rego.visual);
|
|
11948
11986
|
rego.visual = null;
|
|
11949
11987
|
this.rego[entityId] = entityRegos.filter(r => r.menuItemId !== menuItemId);
|
|
11950
|
-
|
|
11988
|
+
const update = {
|
|
11951
11989
|
type: EVisualUpdateType.Remove,
|
|
11952
11990
|
entityId: rego.entityId,
|
|
11953
11991
|
rego: rego
|
|
11954
|
-
}
|
|
11992
|
+
};
|
|
11993
|
+
if (source) {
|
|
11994
|
+
update.source = source;
|
|
11995
|
+
}
|
|
11996
|
+
(_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger(update);
|
|
11955
11997
|
if (doUpdate && menuItemId) {
|
|
11956
11998
|
this.queueUpdate({
|
|
11957
11999
|
entityId: entityId,
|
|
@@ -12041,18 +12083,22 @@ var VisualsRegister;
|
|
|
12041
12083
|
*/
|
|
12042
12084
|
SetOpacity(params) {
|
|
12043
12085
|
var _a;
|
|
12044
|
-
let { opacity, entityIds, menuItemId, requestRender } = params;
|
|
12086
|
+
let { opacity, entityIds, menuItemId, requestRender, source } = params;
|
|
12045
12087
|
for (const entityId of entityIds) {
|
|
12046
12088
|
this.setStateValues({
|
|
12047
12089
|
entityId: entityId,
|
|
12048
12090
|
menuItemId: menuItemId,
|
|
12049
12091
|
opacity: opacity
|
|
12050
12092
|
});
|
|
12051
|
-
|
|
12093
|
+
const update = {
|
|
12052
12094
|
type: EVisualUpdateType.Update,
|
|
12053
12095
|
entityId: entityId,
|
|
12054
12096
|
opacity: opacity
|
|
12055
|
-
}
|
|
12097
|
+
};
|
|
12098
|
+
if (source) {
|
|
12099
|
+
update.source = source;
|
|
12100
|
+
}
|
|
12101
|
+
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
12056
12102
|
this.queueUpdate({
|
|
12057
12103
|
entityId: entityId,
|
|
12058
12104
|
refresh: {
|
|
@@ -32256,7 +32302,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
32256
32302
|
}
|
|
32257
32303
|
}
|
|
32258
32304
|
|
|
32259
|
-
const VERSION = "5.8.
|
|
32305
|
+
const VERSION = "5.8.1";
|
|
32260
32306
|
|
|
32261
32307
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isOutlineChanged, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, AssemblyRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, DEFAULT_LIVE_PADDING_SECONDS, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, 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 };
|
|
32262
32308
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|