bruce-cesium 5.9.8 → 5.9.9
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 +36 -29
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +34 -26
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js +14 -12
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-osm-render-manager.js +2 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-osm-render-manager.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js +19 -13
- 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 +6 -0
- 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, 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, 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, ColorBlendMode, HeadingPitchRoll, Transforms, Model, HorizontalOrigin, VerticalOrigin, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileStyle, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, PolygonPipeline, IonResource, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, BoundingSphere, GeometryInstance, 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;
|
|
@@ -10744,6 +10744,12 @@ var CesiumAnimatedInOut;
|
|
|
10744
10744
|
CesiumAnimatedInOut.AnimateOut = AnimateOut;
|
|
10745
10745
|
})(CesiumAnimatedInOut || (CesiumAnimatedInOut = {}));
|
|
10746
10746
|
|
|
10747
|
+
// Constants for update source types
|
|
10748
|
+
const UPDATE_SOURCES = {
|
|
10749
|
+
TREE_CASCADE: "tree-cascade",
|
|
10750
|
+
TILESET_DISPOSE: "tileset-dispose",
|
|
10751
|
+
OSM_TILESET_DISPOSE: "osm-tileset-dispose"
|
|
10752
|
+
};
|
|
10747
10753
|
/**
|
|
10748
10754
|
* Returns if a given visual is alive and in the scene.
|
|
10749
10755
|
* @param viewer
|
|
@@ -11219,7 +11225,7 @@ var VisualsRegister;
|
|
|
11219
11225
|
});
|
|
11220
11226
|
}
|
|
11221
11227
|
// Trigger update event.
|
|
11222
|
-
if (this.onUpdate && source !==
|
|
11228
|
+
if (this.onUpdate && source !== UPDATE_SOURCES.TREE_CASCADE) {
|
|
11223
11229
|
const update = {
|
|
11224
11230
|
type: EVisualUpdateType.Update,
|
|
11225
11231
|
entityId: state.entityId
|
|
@@ -11310,7 +11316,7 @@ var VisualsRegister;
|
|
|
11310
11316
|
}
|
|
11311
11317
|
}
|
|
11312
11318
|
// Trigger update event.
|
|
11313
|
-
if (this.onUpdate && source !==
|
|
11319
|
+
if (this.onUpdate && source !== UPDATE_SOURCES.TREE_CASCADE) {
|
|
11314
11320
|
const keys = Object.keys(states);
|
|
11315
11321
|
for (let i = 0; i < keys.length; i++) {
|
|
11316
11322
|
const key = keys[i];
|
|
@@ -11592,7 +11598,7 @@ var VisualsRegister;
|
|
|
11592
11598
|
if (source) {
|
|
11593
11599
|
update.source = source;
|
|
11594
11600
|
}
|
|
11595
|
-
if (source !==
|
|
11601
|
+
if (source !== UPDATE_SOURCES.TREE_CASCADE) {
|
|
11596
11602
|
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
11597
11603
|
}
|
|
11598
11604
|
}
|
|
@@ -11758,7 +11764,7 @@ var VisualsRegister;
|
|
|
11758
11764
|
if (source) {
|
|
11759
11765
|
update.source = source;
|
|
11760
11766
|
}
|
|
11761
|
-
if (source !==
|
|
11767
|
+
if (source !== UPDATE_SOURCES.TREE_CASCADE) {
|
|
11762
11768
|
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
11763
11769
|
}
|
|
11764
11770
|
}
|
|
@@ -11804,7 +11810,7 @@ var VisualsRegister;
|
|
|
11804
11810
|
if (params === null || params === void 0 ? void 0 : params.source) {
|
|
11805
11811
|
update.source = params.source;
|
|
11806
11812
|
}
|
|
11807
|
-
if ((params === null || params === void 0 ? void 0 : params.source) !==
|
|
11813
|
+
if ((params === null || params === void 0 ? void 0 : params.source) !== UPDATE_SOURCES.TREE_CASCADE) {
|
|
11808
11814
|
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
11809
11815
|
}
|
|
11810
11816
|
if ((params === null || params === void 0 ? void 0 : params.requestRender) != false) {
|
|
@@ -11954,7 +11960,7 @@ var VisualsRegister;
|
|
|
11954
11960
|
if (source) {
|
|
11955
11961
|
update.source = source;
|
|
11956
11962
|
}
|
|
11957
|
-
if (source !==
|
|
11963
|
+
if (source !== UPDATE_SOURCES.TREE_CASCADE) {
|
|
11958
11964
|
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
11959
11965
|
}
|
|
11960
11966
|
}
|
|
@@ -12066,7 +12072,7 @@ var VisualsRegister;
|
|
|
12066
12072
|
if (params === null || params === void 0 ? void 0 : params.source) {
|
|
12067
12073
|
update.source = params.source;
|
|
12068
12074
|
}
|
|
12069
|
-
if ((params === null || params === void 0 ? void 0 : params.source) !==
|
|
12075
|
+
if ((params === null || params === void 0 ? void 0 : params.source) !== UPDATE_SOURCES.TREE_CASCADE) {
|
|
12070
12076
|
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
12071
12077
|
}
|
|
12072
12078
|
}
|
|
@@ -12106,7 +12112,7 @@ var VisualsRegister;
|
|
|
12106
12112
|
if (source) {
|
|
12107
12113
|
update.source = source;
|
|
12108
12114
|
}
|
|
12109
|
-
if (source !==
|
|
12115
|
+
if (source !== UPDATE_SOURCES.TREE_CASCADE) {
|
|
12110
12116
|
(_b = this.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger(update);
|
|
12111
12117
|
}
|
|
12112
12118
|
if (requestRender != false) {
|
|
@@ -12228,7 +12234,7 @@ var VisualsRegister;
|
|
|
12228
12234
|
if (source) {
|
|
12229
12235
|
update.source = source;
|
|
12230
12236
|
}
|
|
12231
|
-
if (source !==
|
|
12237
|
+
if (source !== UPDATE_SOURCES.TREE_CASCADE) {
|
|
12232
12238
|
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
12233
12239
|
}
|
|
12234
12240
|
if (doesInclude) {
|
|
@@ -12267,7 +12273,7 @@ var VisualsRegister;
|
|
|
12267
12273
|
if (source) {
|
|
12268
12274
|
update.source = source;
|
|
12269
12275
|
}
|
|
12270
|
-
if (source !==
|
|
12276
|
+
if (source !== UPDATE_SOURCES.TREE_CASCADE) {
|
|
12271
12277
|
(_b = this.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger(update);
|
|
12272
12278
|
}
|
|
12273
12279
|
this.rego[entityId] = entityRegos.filter(r => r.menuItemId !== menuItemId);
|
|
@@ -12302,7 +12308,7 @@ var VisualsRegister;
|
|
|
12302
12308
|
if (source) {
|
|
12303
12309
|
update.source = source;
|
|
12304
12310
|
}
|
|
12305
|
-
if (source !==
|
|
12311
|
+
if (source !== UPDATE_SOURCES.TREE_CASCADE) {
|
|
12306
12312
|
(_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger(update);
|
|
12307
12313
|
}
|
|
12308
12314
|
if (doUpdate && menuItemId) {
|
|
@@ -12409,7 +12415,7 @@ var VisualsRegister;
|
|
|
12409
12415
|
if (source) {
|
|
12410
12416
|
update.source = source;
|
|
12411
12417
|
}
|
|
12412
|
-
if (source !==
|
|
12418
|
+
if (source !== UPDATE_SOURCES.TREE_CASCADE) {
|
|
12413
12419
|
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
|
|
12414
12420
|
}
|
|
12415
12421
|
this.queueUpdate({
|
|
@@ -18743,7 +18749,7 @@ var TilesetCadRenderManager;
|
|
|
18743
18749
|
requestRender: false,
|
|
18744
18750
|
menuItemId: this.item.id,
|
|
18745
18751
|
doRemove: false,
|
|
18746
|
-
source:
|
|
18752
|
+
source: UPDATE_SOURCES.TILESET_DISPOSE
|
|
18747
18753
|
});
|
|
18748
18754
|
// Might have to do something smarter since siblings could still be OK.
|
|
18749
18755
|
this.loadedCesiumEntities[rego.entityId] = null;
|
|
@@ -18771,6 +18777,7 @@ var TilesetCadRenderManager;
|
|
|
18771
18777
|
];
|
|
18772
18778
|
while (stack.length > 0) {
|
|
18773
18779
|
const { node, parentId, firstFoundCollapsedBranch } = stack.pop();
|
|
18780
|
+
let newFirstFoundCollapsedBranch = firstFoundCollapsedBranch;
|
|
18774
18781
|
if (firstFoundCollapsedBranch) {
|
|
18775
18782
|
this.treeNodeByGeomId[node.geomId] = firstFoundCollapsedBranch;
|
|
18776
18783
|
this.treeNodeByEntityId[node.id] = firstFoundCollapsedBranch;
|
|
@@ -18785,19 +18792,19 @@ var TilesetCadRenderManager;
|
|
|
18785
18792
|
};
|
|
18786
18793
|
this.treeNodeByGeomId[node.geomId] = cache;
|
|
18787
18794
|
this.treeNodeByEntityId[node.id] = cache;
|
|
18788
|
-
let newFirstFoundCollapsedBranch = firstFoundCollapsedBranch;
|
|
18789
18795
|
if (!firstFoundCollapsedBranch && node.collapsed) {
|
|
18790
18796
|
newFirstFoundCollapsedBranch = cache;
|
|
18791
18797
|
}
|
|
18792
|
-
|
|
18793
|
-
|
|
18794
|
-
|
|
18795
|
-
|
|
18796
|
-
|
|
18797
|
-
|
|
18798
|
-
|
|
18799
|
-
|
|
18800
|
-
|
|
18798
|
+
}
|
|
18799
|
+
// Always process children regardless of collapse state
|
|
18800
|
+
// This ensures all nodes are mapped, even those under collapsed branches
|
|
18801
|
+
if (node.children) {
|
|
18802
|
+
for (let i = node.children.length - 1; i >= 0; i--) {
|
|
18803
|
+
stack.push({
|
|
18804
|
+
node: node.children[i],
|
|
18805
|
+
parentId: node.id,
|
|
18806
|
+
firstFoundCollapsedBranch: newFirstFoundCollapsedBranch
|
|
18807
|
+
});
|
|
18801
18808
|
}
|
|
18802
18809
|
}
|
|
18803
18810
|
}
|
|
@@ -19026,7 +19033,7 @@ var TilesetCadRenderManager;
|
|
|
19026
19033
|
this.visualsManager.RemoveRegos({
|
|
19027
19034
|
menuItemId: this.item.id,
|
|
19028
19035
|
doRemove: false,
|
|
19029
|
-
source:
|
|
19036
|
+
source: UPDATE_SOURCES.TILESET_DISPOSE
|
|
19030
19037
|
});
|
|
19031
19038
|
this.viewerDateTimeDispose();
|
|
19032
19039
|
}
|
|
@@ -19527,7 +19534,7 @@ var TilesetOsmRenderManager;
|
|
|
19527
19534
|
}
|
|
19528
19535
|
this.visualsManager.RemoveRegos({
|
|
19529
19536
|
menuItemId: this.item.id,
|
|
19530
|
-
source:
|
|
19537
|
+
source: UPDATE_SOURCES.OSM_TILESET_DISPOSE
|
|
19531
19538
|
});
|
|
19532
19539
|
this.featureQueue = [];
|
|
19533
19540
|
}
|
|
@@ -33309,7 +33316,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
33309
33316
|
}
|
|
33310
33317
|
}
|
|
33311
33318
|
|
|
33312
|
-
const VERSION = "5.9.
|
|
33319
|
+
const VERSION = "5.9.9";
|
|
33313
33320
|
|
|
33314
|
-
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 };
|
|
33321
|
+
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isOutlineChanged, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, UPDATE_SOURCES, 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 };
|
|
33315
33322
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|