bruce-cesium 7.8.4 → 7.8.5

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, ConstantPositionProperty, HeightReference, DistanceDisplayCondition, ShaderSource, Cartesian3, Math as Math$1, Ellipsoid, Transforms, Matrix4, Geometry, GeometryAttribute, ComponentDatatype, PrimitiveType, BoundingSphere, GeometryPipeline, Cartesian2, Cartesian4, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, PixelDatatype, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass, JulianDate, Quaternion, HeadingPitchRoll, ClassificationType, ArcType, CornerType, ColorBlendMode, Model, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, Rectangle, SceneMode, IntersectionTests, Ray, SceneTransforms, HorizontalOrigin, VerticalOrigin, NearFarScalar, Matrix3, KmlDataSource, GeoJsonDataSource, FeatureDetection, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, IonResource, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, Intersect, Cesium3DTileset, OrthographicFrustum, EasingFunction, WebGLConstants, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PrimitiveCollection, ShadowMode, PolylineCollection, LabelCollection, LabelStyle, Material, GeometryInstance, CesiumInspector, ClockRange, DynamicEnvironmentMapManager, CustomDataSource, Event, CameraEventType, Plane, OrientedBoundingBox, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, CzmlDataSource } from 'cesium';
3
- import { Cartes, LRUCache, Carto, ProjectViewTile, EntityHistoricData, BruceEvent, DelayQueue, Entity as Entity$1, EntityTag, PathUtils, ClientFile, ENVIRONMENT, EntityAttachmentType, EntityRelationType, EntityType, Tileset, Calculator, DataLab, Style, ObjectUtils, MenuItem, AccountConcept, RecordChangeFeed, Geometry as Geometry$1, EntityLod, UrlUtils, Bounds, ClientFileValueMap, Color as Color$1, Assembly, EntityCoords, ZoomControl, Api, ProjectView, ProjectViewBookmark, EntityRelation, BruceApi, EntitySource, ProgramKey, ProjectViewLegacyTile, Camera, Account, AccountLimits, Session, EntityAttachment, EntityAttribute, MathUtils, ProjectViewBookmarkGroup } from 'bruce-models';
2
+ import { Cartographic, ShaderSource, Cartesian3, Math as Math$1, Ellipsoid, Transforms, Matrix4, Geometry, GeometryAttribute, ComponentDatatype, PrimitiveType, BoundingSphere, GeometryPipeline, Cartesian2, Cartesian4, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, PixelDatatype, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass, ColorMaterialProperty, Color, JulianDate, Quaternion, HeadingPitchRoll, HeightReference, ColorBlendMode, Entity, CallbackProperty, ConstantProperty, Model, ClassificationType, ConstantPositionProperty, DistanceDisplayCondition, ArcType, CornerType, Primitive, Cesium3DTileFeature, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, Rectangle, HorizontalOrigin, VerticalOrigin, SceneMode, IntersectionTests, Ray, SceneTransforms, NearFarScalar, Matrix3, KmlDataSource, FeatureDetection, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Ion, IonResource, Cesium3DTileColorBlendMode, Cesium3DTileset, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, OrthographicFrustum, EasingFunction, Intersect, WebGLConstants, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, CesiumInspector, ClockRange, ShadowMode, DynamicEnvironmentMapManager, PrimitiveCollection, PolylineCollection, LabelCollection, LabelStyle, Material, CustomDataSource, GeometryInstance, Event, CameraEventType, Plane, OrientedBoundingBox, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, CzmlDataSource } from 'cesium';
3
+ import { Cartes, LRUCache, Carto, ProjectViewTile, EntityHistoricData, BruceEvent, DelayQueue, Entity as Entity$1, EntityTag, PathUtils, ClientFile, ENVIRONMENT, EntityAttachmentType, EntityRelationType, EntityType, Tileset, Calculator, DataLab, Style, ObjectUtils, MenuItem, AccountConcept, RecordChangeFeed, EntityLod, UrlUtils, Geometry as Geometry$1, Bounds, ClientFileValueMap, Color as Color$1, ProjectView, ProjectViewBookmark, ZoomControl, Api, Assembly, EntityCoords, EntityRelation, BruceApi, EntitySource, ProgramKey, ProjectViewLegacyTile, Camera, Account, AccountLimits, Session, ProjectViewBookmarkGroup, EntityAttachment, EntityAttribute, MathUtils } from 'bruce-models';
4
4
 
5
5
  /**
6
6
  * Ensures a number is returned from a given value.
@@ -30177,7 +30177,7 @@ var XGridsRenderEngine;
30177
30177
  * Loads a scan with optional SDK tuning and per-viewer budget control.
30178
30178
  */
30179
30179
  function Render(params) {
30180
- var _a, _b, _c, _d;
30180
+ var _a, _b, _c;
30181
30181
  const { api, viewer, tileset } = params;
30182
30182
  if (typeof LCCRender === "undefined" || typeof (LCCRender === null || LCCRender === void 0 ? void 0 : LCCRender.load) !== "function") {
30183
30183
  console.warn("[XGridsRenderEngine] Render() LCCRender library not available.");
@@ -30308,8 +30308,7 @@ var XGridsRenderEngine;
30308
30308
  return null;
30309
30309
  }
30310
30310
  try {
30311
- const sdkBudget = typeof obj.getCurrentConfig === "function" ? (_d = obj.getCurrentConfig()) === null || _d === void 0 ? void 0 : _d.maxLoadSplatCount : undefined;
30312
- maxSplats = GetSplatBudget(sdkBudget, profile);
30311
+ maxSplats = GetSplatBudget(profile);
30313
30312
  if (LCCRender.nextspaceMetadataReady === 1 &&
30314
30313
  typeof obj.setNextspaceMetadataCallback === "function" &&
30315
30314
  typeof obj.setMaxSplats === "function") {
@@ -30351,16 +30350,16 @@ var XGridsRenderEngine;
30351
30350
  }
30352
30351
  XGridsRenderEngine.Render = Render;
30353
30352
  /*
30354
- * The most splats a scan may load: the tier's, lowered by the SDK's GPU limit unless overridden.
30353
+ * The most splats a scan may load: the tier's, capped by what the SDK's splat texture can hold.
30355
30354
  */
30356
- function GetSplatBudget(sdkBudget, profile) {
30355
+ function GetSplatBudget(profile) {
30356
+ var _a;
30357
30357
  const budget = DeviceProfile.GetBudget(profile.tier).splats;
30358
- // Above 2M the SDK is reporting its flat default, not a limit it chose for this GPU.
30359
- if (!profile.overridden &&
30360
- Number.isFinite(sdkBudget) &&
30361
- sdkBudget > 0 &&
30362
- sdkBudget <= 2000000) {
30363
- return Math.min(sdkBudget, budget);
30358
+ // The SDK's GPU guess misreads many GPU names and skips Firefox; only its texture cap is real.
30359
+ const size = (_a = profile.environment) === null || _a === void 0 ? void 0 : _a.maxTextureSize;
30360
+ if (Number.isFinite(size) &&
30361
+ size > 0) {
30362
+ return Math.min(budget, size * size / 4);
30364
30363
  }
30365
30364
  return budget;
30366
30365
  }
@@ -61030,7 +61029,7 @@ var StyleUtils;
61030
61029
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
61031
61030
  })(StyleUtils || (StyleUtils = {}));
61032
61031
 
61033
- const VERSION = "7.8.4";
61032
+ const VERSION = "7.8.5";
61034
61033
  /**
61035
61034
  * Updates the environment instance used by bruce-cesium to one specified.
61036
61035
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.