bruce-cesium 6.8.6 → 6.8.8

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 * as Cesium from 'cesium';
2
- import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, DistanceDisplayCondition, Math as Math$1, Cartesian3, JulianDate, Quaternion, Transforms, HeadingPitchRoll, Matrix4, HeightReference, HorizontalOrigin, VerticalOrigin, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, Cartesian2, ColorBlendMode, Model, Rectangle, SceneTransforms, KmlDataSource, NearFarScalar, Matrix3, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, SceneMode, Ion, IonResource, Cesium3DTileColorBlendMode, OrthographicFrustum, EasingFunction, EllipsoidGeodesic, EllipsoidTerrainProvider, sampleTerrainMostDetailed, defined, Cesium3DTileset, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, PolygonPipeline, CesiumInspector, ClockRange, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, ScreenSpaceEventHandler, ScreenSpaceEventType, BoundingSphere, GeometryInstance, Intersect, CzmlDataSource, Fullscreen } from 'cesium';
3
- import { Cartes, Entity as Entity$1, ENVIRONMENT, Api, Calculator, ClientFile, EntityTag, EntityType, LRUCache, ObjectUtils, Style, MenuItem, ProjectView, ProjectViewBookmark, Tileset, ZoomControl, Carto, Geometry, Bounds, EntityLod, BruceEvent, EntityCoords, DataLab, DelayQueue, BruceApi, EntityHistoricData, EntityRelation, AccountConcept, RecordChangeFeed, ProgramKey, EntitySource, Camera, ProjectViewTile, ProjectViewLegacyTile, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, Session, EntityRelationType } from 'bruce-models';
2
+ import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, DistanceDisplayCondition, HeightReference, HorizontalOrigin, VerticalOrigin, Cartesian3, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, Math as Math$1, JulianDate, Quaternion, Transforms, HeadingPitchRoll, Matrix4, ColorBlendMode, Model, PolygonHierarchy, PolylineGraphics, Cartesian2, SceneTransforms, NearFarScalar, Matrix3, Rectangle, KmlDataSource, GeoJsonDataSource, SceneMode, Ion, IonResource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Cesium3DTileset, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, CesiumInspector, ClockRange, ScreenSpaceEventHandler, ScreenSpaceEventType, BoundingSphere, GeometryInstance, Intersect, CzmlDataSource, Fullscreen } from 'cesium';
3
+ import { Cartes, Entity as Entity$1, ENVIRONMENT, Api, Calculator, ClientFile, EntityTag, EntityType, LRUCache, ObjectUtils, Style, Carto, Geometry, EntityLod, MenuItem, ProjectView, ProjectViewBookmark, Tileset, ZoomControl, BruceEvent, EntityCoords, Bounds, DataLab, DelayQueue, EntityHistoricData, BruceApi, AccountConcept, RecordChangeFeed, EntityRelation, ProgramKey, EntitySource, Camera, ProjectViewTile, ProjectViewLegacyTile, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, Session, EntityRelationType } from 'bruce-models';
4
4
 
5
5
  /**
6
6
  * Ensures a number is returned from a given value.
@@ -13716,7 +13716,7 @@ var TilesetRenderEngine;
13716
13716
  viaCdn: false
13717
13717
  }) + "?generation=" + params.tileset.generateVersion;
13718
13718
  }
13719
- const cTileset = await createTileset(loadUrl, null, params.noMemoryLimit);
13719
+ const cTileset = await createTileset(loadUrl, params.skipLevelOfDetail ? { skipLevelOfDetail: true } : null, params.noMemoryLimit);
13720
13720
  params.viewer.scene.primitives.add(cTileset);
13721
13721
  watchTilesetDateRange(params.viewer, cTileset, params.tileset);
13722
13722
  OnTilesetReady(cTileset).then(() => {
@@ -14290,7 +14290,7 @@ var TilesetCadRenderManager;
14290
14290
  // We calculate it here instead of relying on the render engine as we need to extract the model-tree from it.
14291
14291
  let loadUrl = null;
14292
14292
  (async () => {
14293
- var _a, _b, _c, _d;
14293
+ var _a, _b, _c, _d, _e;
14294
14294
  if (!this.initQueue) {
14295
14295
  await delay(INIT_BATCH_DELAY_MS);
14296
14296
  if (this.disposed) {
@@ -14375,7 +14375,8 @@ var TilesetCadRenderManager;
14375
14375
  // TODO: this is a problem as we need to know what nodes are collapsed...
14376
14376
  // In >v1 the model-tree sits in its own file.
14377
14377
  if (((_c = tileset.settings) === null || _c === void 0 ? void 0 : _c["tilesetVersion"]) > 1) {
14378
- const modelTreeUrl = Tileset.GetFileUrl({
14378
+ // Newer APIs precalculate this URL.
14379
+ const modelTreeUrl = (_d = tileset.urlModelTree) !== null && _d !== void 0 ? _d : Tileset.GetFileUrl({
14379
14380
  api: api,
14380
14381
  file: "model_tree.json",
14381
14382
  tilesetId: tileset.id,
@@ -14420,7 +14421,7 @@ var TilesetCadRenderManager;
14420
14421
  const rootId = settings.rootEntityId;
14421
14422
  this.rootId = rootId;
14422
14423
  // If historic, we'll see if the root Entity has a historic position to use.
14423
- if (((_d = this.item.BruceEntity) === null || _d === void 0 ? void 0 : _d.historic) && rootId) {
14424
+ if (((_e = this.item.BruceEntity) === null || _e === void 0 ? void 0 : _e.historic) && rootId) {
14424
14425
  try {
14425
14426
  const { entity: root } = await Entity$1.Get({
14426
14427
  entityId: rootId,
@@ -14459,7 +14460,8 @@ var TilesetCadRenderManager;
14459
14460
  accountId: accountId,
14460
14461
  viaCdn: viaCdn,
14461
14462
  noMemoryLimit: this.item["noMaximumMemory"],
14462
- modelSpace: this.modelSpace
14463
+ modelSpace: this.modelSpace,
14464
+ skipLevelOfDetail: true
14463
14465
  });
14464
14466
  if (this.disposed) {
14465
14467
  this.doDispose();
@@ -35070,7 +35072,7 @@ var EntityRenderEngineModel3d;
35070
35072
  * @returns
35071
35073
  */
35072
35074
  async function RenderGroup(params) {
35073
- var _a, _b, _c, _d, _e, _f;
35075
+ var _a, _b, _c, _d, _e, _f, _g;
35074
35076
  const api = params.apiGetter.getApi();
35075
35077
  await api.Loading;
35076
35078
  const cEntities = new Map();
@@ -35180,7 +35182,7 @@ var EntityRenderEngineModel3d;
35180
35182
  style: mStyle,
35181
35183
  tags: tags,
35182
35184
  viewer: params.viewer,
35183
- lodUrl: ClientFile.GetUrl({
35185
+ lodUrl: (_g = lod.url) !== null && _g !== void 0 ? _g : ClientFile.GetUrl({
35184
35186
  api,
35185
35187
  fileId: lod.clientFileId,
35186
35188
  viaCdn: true
@@ -37566,7 +37568,7 @@ var StyleUtils;
37566
37568
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
37567
37569
  })(StyleUtils || (StyleUtils = {}));
37568
37570
 
37569
- const VERSION = "6.8.6";
37571
+ const VERSION = "6.8.8";
37570
37572
  /**
37571
37573
  * Updates the environment instance used by bruce-cesium to one specified.
37572
37574
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.