bruce-cesium 5.9.1 → 5.9.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.
@@ -1,6 +1,6 @@
1
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, 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, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, ColorBlendMode, HeadingPitchRoll, Transforms, Model, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, Cesium3DTileset, IonResource, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
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, Cesium3DTileStyle, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, IonResource, Cesium3DTileset, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
4
4
 
5
5
  const TIME_LAG = 300;
6
6
  const POSITION_CHECK_TIMER = 950;
@@ -18386,7 +18386,7 @@ var TilesetCadRenderManager;
18386
18386
  mapTilesetFeature(feature, add) {
18387
18387
  var _a, _b, _c, _d, _e, _f;
18388
18388
  const accountId = (_b = ((_a = this.item.tileset) === null || _a === void 0 ? void 0 : _a.ClientAccountID)) !== null && _b !== void 0 ? _b : this.getters.GetAccountId();
18389
- const canEdit = accountId === this.getters.GetAccountId() && !this.modelSpace && !((_c = this.item.BruceEntity) === null || _c === void 0 ? void 0 : _c.historic);
18389
+ const canEdit = accountId === this.getters.GetAccountId() && !((_c = this.item.BruceEntity) === null || _c === void 0 ? void 0 : _c.historic);
18390
18390
  let rego = {
18391
18391
  canEdit: canEdit,
18392
18392
  entityId: null,
@@ -22453,7 +22453,7 @@ var AssemblyRenderManager;
22453
22453
  }
22454
22454
  };
22455
22455
  if (hierarchy === null || hierarchy === void 0 ? void 0 : hierarchy.Root) {
22456
- traverseHierarchy(hierarchy.Root, true);
22456
+ traverseHierarchy(hierarchy.Root, false);
22457
22457
  rootId = hierarchy.Root.ID;
22458
22458
  }
22459
22459
  }
@@ -22477,14 +22477,14 @@ var AssemblyRenderManager;
22477
22477
  * @returns
22478
22478
  */
22479
22479
  async processEntityIds(entityIds) {
22480
- var _a, _b, _c;
22480
+ var _a, _b;
22481
22481
  if (!entityIds || !entityIds.length) {
22482
22482
  return;
22483
22483
  }
22484
22484
  else if (this.disposed) {
22485
22485
  return;
22486
22486
  }
22487
- const BATCH_SIZE = 200;
22487
+ const BATCH_SIZE = 50;
22488
22488
  let batches = Math.ceil(entityIds.length / BATCH_SIZE);
22489
22489
  for (let i = 0; i < batches; i++) {
22490
22490
  const batch = entityIds.slice(i * BATCH_SIZE, (i + 1) * BATCH_SIZE);
@@ -22501,8 +22501,24 @@ var AssemblyRenderManager;
22501
22501
  return;
22502
22502
  }
22503
22503
  for (const entity of fetched) {
22504
- const lod = entity.Bruce.LOD ? entity.Bruce.LOD[0] : null;
22505
- if (!lod || !((_a = lod["ClientFile"]) === null || _a === void 0 ? void 0 : _a.URL)) {
22504
+ // Filter for valid LODs then take the highest quality one (lowest level).
22505
+ let lods = entity.Bruce.LOD || [];
22506
+ lods = lods.filter(lod => { var _a; return ((_a = lod["ClientFile"]) === null || _a === void 0 ? void 0 : _a.URL) && lod["LODCategory.Key"] && lod["LODCategory.Key"].toLowerCase() == "glb"; });
22507
+ let lod = lods.sort((a, b) => {
22508
+ const aLevel = a.Level;
22509
+ const bLevel = b.Level;
22510
+ if (aLevel == null && bLevel == null) {
22511
+ return 0;
22512
+ }
22513
+ else if (aLevel == null) {
22514
+ return 1;
22515
+ }
22516
+ else if (bLevel == null) {
22517
+ return -1;
22518
+ }
22519
+ return aLevel - bLevel;
22520
+ })[0];
22521
+ if (!lod) {
22506
22522
  // Won't bother with vector data for this experiment.
22507
22523
  continue;
22508
22524
  }
@@ -22543,7 +22559,7 @@ var AssemblyRenderManager;
22543
22559
  entityTypeId: entity.Bruce["EntityType.ID"],
22544
22560
  name: entity.Bruce.Name,
22545
22561
  rootId: this.rootId,
22546
- parentId: (_c = (_b = this.hierarchyNodeByEntityId) === null || _b === void 0 ? void 0 : _b[entity.Bruce.ID]) === null || _c === void 0 ? void 0 : _c.parentId
22562
+ parentId: (_b = (_a = this.hierarchyNodeByEntityId) === null || _a === void 0 ? void 0 : _a[entity.Bruce.ID]) === null || _b === void 0 ? void 0 : _b.parentId
22547
22563
  },
22548
22564
  requestRender: false
22549
22565
  });
@@ -33111,7 +33127,7 @@ class WidgetViewBar extends Widget.AWidget {
33111
33127
  }
33112
33128
  }
33113
33129
 
33114
- const VERSION = "5.9.1";
33130
+ const VERSION = "5.9.2";
33115
33131
 
33116
33132
  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 };
33117
33133
  //# sourceMappingURL=bruce-cesium.es5.js.map