bruce-cesium 5.2.8 → 5.2.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 +40 -6
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +39 -5
- 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 +40 -4
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/render-managers/tilesets/tileset-cad-render-manager.d.ts +1 -0
- package/package.json +1 -1
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, ColorBlendMode, HeadingPitchRoll, Transforms, Model, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileStyle, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, PolygonPipeline, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, Quaternion, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
const TIME_LAG = 300;
|
|
6
6
|
const POSITION_CHECK_TIMER = 950;
|
|
@@ -16903,6 +16903,10 @@ var TilesetCadRenderManager;
|
|
|
16903
16903
|
// It's pretty expensive so we save it for a few seconds inbetween checks.
|
|
16904
16904
|
this.somethingIsolated = null;
|
|
16905
16905
|
this.somethingIsolatedDateTime = null;
|
|
16906
|
+
// Entity ID -> rego.
|
|
16907
|
+
// We retain this information as a quick look-up on what has been registered.
|
|
16908
|
+
// This lets us properly assign siblings to the same rego when hierarchy items are marked as collapsed.
|
|
16909
|
+
this.loadedCesiumEntities = {};
|
|
16906
16910
|
const { viewer, register: visualsManager, getters, item } = params;
|
|
16907
16911
|
this.viewer = viewer;
|
|
16908
16912
|
this.getters = getters;
|
|
@@ -17206,6 +17210,26 @@ var TilesetCadRenderManager;
|
|
|
17206
17210
|
}
|
|
17207
17211
|
}
|
|
17208
17212
|
feature.show = !hide;
|
|
17213
|
+
// Already exists, so we add this graphic as a sibling.
|
|
17214
|
+
if (this.loadedCesiumEntities[rego.entityId]) {
|
|
17215
|
+
rego = this.loadedCesiumEntities[rego.entityId];
|
|
17216
|
+
if (!rego.visual) {
|
|
17217
|
+
// No parent graphic.
|
|
17218
|
+
rego.visual = feature;
|
|
17219
|
+
}
|
|
17220
|
+
else if (rego.visual == feature) ;
|
|
17221
|
+
else {
|
|
17222
|
+
const visual = rego.visual;
|
|
17223
|
+
// Sibling graphic.
|
|
17224
|
+
if (!visual._siblingGraphics) {
|
|
17225
|
+
visual._siblingGraphics = [];
|
|
17226
|
+
}
|
|
17227
|
+
if (visual._siblingGraphics.indexOf(feature) < 0) {
|
|
17228
|
+
visual._siblingGraphics.push(feature);
|
|
17229
|
+
}
|
|
17230
|
+
}
|
|
17231
|
+
}
|
|
17232
|
+
this.loadedCesiumEntities[rego.entityId] = rego;
|
|
17209
17233
|
this.visualsManager.AddRego({
|
|
17210
17234
|
rego,
|
|
17211
17235
|
requestRender: false
|
|
@@ -17219,6 +17243,9 @@ var TilesetCadRenderManager;
|
|
|
17219
17243
|
menuItemId: this.item.id,
|
|
17220
17244
|
doRemove: false
|
|
17221
17245
|
});
|
|
17246
|
+
// Might have to do something smarter since siblings could still be OK.
|
|
17247
|
+
this.loadedCesiumEntities[rego.entityId] = null;
|
|
17248
|
+
delete this.loadedCesiumEntities[rego.entityId];
|
|
17222
17249
|
}
|
|
17223
17250
|
}
|
|
17224
17251
|
getMetaByGeomId(geomId, tileset) {
|
|
@@ -17231,9 +17258,9 @@ var TilesetCadRenderManager;
|
|
|
17231
17258
|
if (!modelTree) {
|
|
17232
17259
|
return null;
|
|
17233
17260
|
}
|
|
17234
|
-
return this.digMetaByGeomId(geomId, modelTree, [], 0);
|
|
17261
|
+
return this.digMetaByGeomId(geomId, modelTree, [], 0, null);
|
|
17235
17262
|
}
|
|
17236
|
-
digMetaByGeomId(geomId, branch, path, depth) {
|
|
17263
|
+
digMetaByGeomId(geomId, branch, path, depth, firstFoundCollapsedBranch) {
|
|
17237
17264
|
if (this.hasHitDepthLimit || depth > 10) {
|
|
17238
17265
|
if (!this.hasHitDepthLimit) {
|
|
17239
17266
|
console.error("digMetaByGeomId: depth > 10. Disabling further attempts.");
|
|
@@ -17243,12 +17270,19 @@ var TilesetCadRenderManager;
|
|
|
17243
17270
|
}
|
|
17244
17271
|
path = [].concat(path);
|
|
17245
17272
|
path.push(branch.id);
|
|
17273
|
+
if (!firstFoundCollapsedBranch && branch.collapsed) {
|
|
17274
|
+
firstFoundCollapsedBranch = branch;
|
|
17275
|
+
}
|
|
17246
17276
|
if (branch.geomId == geomId) {
|
|
17247
|
-
|
|
17277
|
+
// If we collapsed on a higher branch then we return it instead.
|
|
17278
|
+
if (firstFoundCollapsedBranch) {
|
|
17279
|
+
branch = firstFoundCollapsedBranch;
|
|
17280
|
+
}
|
|
17281
|
+
return { id: branch.id, typeId: branch.typeId, name: branch.name };
|
|
17248
17282
|
}
|
|
17249
17283
|
else if (branch.children) {
|
|
17250
17284
|
for (let i = 0; i < branch.children.length; i++) {
|
|
17251
|
-
let meta = this.digMetaByGeomId(geomId, branch.children[i], path, depth + 1);
|
|
17285
|
+
let meta = this.digMetaByGeomId(geomId, branch.children[i], path, depth + 1, firstFoundCollapsedBranch);
|
|
17252
17286
|
if (meta) {
|
|
17253
17287
|
return meta;
|
|
17254
17288
|
}
|
|
@@ -29979,7 +30013,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
29979
30013
|
}
|
|
29980
30014
|
}
|
|
29981
30015
|
|
|
29982
|
-
const VERSION = "5.2.
|
|
30016
|
+
const VERSION = "5.2.9";
|
|
29983
30017
|
|
|
29984
30018
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isHistoricMetadataChanged, 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, 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 };
|
|
29985
30019
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|