bruce-models 2.7.1 → 2.7.3

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.
@@ -7693,16 +7693,26 @@ var EntityGlobe;
7693
7693
  const maxLon = viewRect.east;
7694
7694
  const MAX_CELLS = 150;
7695
7695
  const cellDegreeSize = getCellSizeFromHeight(viewRect.alt);
7696
- const curMinLon = floorValueToCellSize(cellDegreeSize, minLon);
7697
- const curMinLat = floorValueToCellSize(cellDegreeSize, minLat);
7696
+ let curMinLon = floorValueToCellSize(cellDegreeSize, minLon);
7697
+ let curMinLat = floorValueToCellSize(cellDegreeSize, minLat);
7698
+ // For larger views we add additional padding because our view-area culling is too strong.
7699
+ if (cellDegreeSize >= 2) {
7700
+ curMinLon -= cellDegreeSize;
7701
+ curMinLat -= cellDegreeSize;
7702
+ }
7698
7703
  let centerX = cameraPos === null || cameraPos === void 0 ? void 0 : cameraPos.longitude;
7699
7704
  let centerY = cameraPos === null || cameraPos === void 0 ? void 0 : cameraPos.latitude;
7700
7705
  if (isNaN(centerX) || isNaN(centerY)) {
7701
7706
  centerX = (minLon + maxLon) / 2;
7702
7707
  centerY = (minLat + maxLat) / 2;
7703
7708
  }
7704
- const width = Math.ceil((maxLon - curMinLon) / cellDegreeSize);
7705
- const height = Math.ceil((maxLat - curMinLat) / cellDegreeSize);
7709
+ let width = Math.ceil((maxLon - curMinLon) / cellDegreeSize);
7710
+ let height = Math.ceil((maxLat - curMinLat) / cellDegreeSize);
7711
+ // For larger views we add additional padding because our view-area culling is too strong.
7712
+ if (cellDegreeSize >= 2) {
7713
+ width += 1;
7714
+ height += 1;
7715
+ }
7706
7716
  const cellDistances = [];
7707
7717
  for (let x = 0; x < width; x++) {
7708
7718
  for (let y = 0; y < height; y++) {
@@ -7763,7 +7773,13 @@ function getCellSizeFromHeight(height) {
7763
7773
  else if (height < 500000) {
7764
7774
  return 1;
7765
7775
  }
7766
- return 1.5;
7776
+ else if (height < 1000000) {
7777
+ return 1.3;
7778
+ }
7779
+ else if (height < 1200000) {
7780
+ return 1.8;
7781
+ }
7782
+ return 4;
7767
7783
  }
7768
7784
  function isCellFetched(cell) {
7769
7785
  if (cell.Fetched) {
@@ -11922,7 +11938,7 @@ var DataSource;
11922
11938
  DataSource.GetList = GetList;
11923
11939
  })(DataSource || (DataSource = {}));
11924
11940
 
11925
- const VERSION$1 = "2.7.1";
11941
+ const VERSION$1 = "2.7.3";
11926
11942
 
11927
11943
  export { VERSION$1 as VERSION, AnnDocument, CustomForm, CustomFormContent, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, EntityCoords, EntityTypeVisualSettings, EntityAttribute, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
11928
11944
  //# sourceMappingURL=bruce-models.es5.js.map