bruce-cesium 4.0.2 → 4.0.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.
@@ -1,6 +1,6 @@
1
1
  import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ProjectViewTile, DelayQueue, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, Api, EntityRelationType, ENVIRONMENT, EntityHistoricData, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, AbstractApi, ProjectViewBookmark, EntityAttachment, EntityAttachmentType, EntityAttribute, ProjectView, ProjectViewLegacyTile, Camera } 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, Primitive, Cesium3DTileFeature, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, BoundingSphere, GeometryInstance, CesiumInspector, ClockRange, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Quaternion, Intersect } from 'cesium';
3
+ import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, SceneMode, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, GeoJsonDataSource, Primitive, Cesium3DTileFeature, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, CesiumInspector, ClockRange, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Quaternion, Intersect } from 'cesium';
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2582,7 +2582,7 @@ var EntityUtils;
2582
2582
  posses = [];
2583
2583
  location = Entity$1.GetValue({
2584
2584
  entity: entity,
2585
- path: ["Bruce", "location"]
2585
+ path: ["Bruce", "Location"]
2586
2586
  });
2587
2587
  if (location && typeof location == "object" && Carto.ValidateCarto(location)) {
2588
2588
  latitude = EnsureNumber(location.latitude);
@@ -2595,7 +2595,7 @@ var EntityUtils;
2595
2595
  }
2596
2596
  geometry = Entity$1.GetValue({
2597
2597
  entity: entity,
2598
- path: ["Bruce", "geometry"]
2598
+ path: ["Bruce", "VectorGeometry"]
2599
2599
  });
2600
2600
  if (!(geometry && typeof geometry == "object")) return [3 /*break*/, 4];
2601
2601
  pointStr = geometry.Point;
@@ -2634,7 +2634,7 @@ var EntityUtils;
2634
2634
  case 4:
2635
2635
  boundaries = Entity$1.GetValue({
2636
2636
  entity: entity,
2637
- path: ["boundaries"]
2637
+ path: ["Bruce, Boundaries"]
2638
2638
  });
2639
2639
  if (!(boundaries && typeof boundaries == "object")) return [3 /*break*/, 6];
2640
2640
  point = {
@@ -2716,7 +2716,7 @@ var EntityUtils;
2716
2716
  if (!tilesetId) {
2717
2717
  tilesetIds = Entity$1.GetValue({
2718
2718
  entity: entity,
2719
- path: ["Bruce", "tilesetID"]
2719
+ path: ["Bruce", "TilesetIDs"]
2720
2720
  });
2721
2721
  tilesetId = (tilesetIds === null || tilesetIds === void 0 ? void 0 : tilesetIds.length) ? tilesetIds[0] : tilesetId;
2722
2722
  }
@@ -2735,7 +2735,7 @@ var EntityUtils;
2735
2735
  pos3d = null;
2736
2736
  eLocation = Entity$1.GetValue({
2737
2737
  entity: entity,
2738
- path: ["Bruce", "location"]
2738
+ path: ["Bruce", "Location"]
2739
2739
  });
2740
2740
  if (!((eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude) || ((_a = tSettings === null || tSettings === void 0 ? void 0 : tSettings.location) === null || _a === void 0 ? void 0 : _a.longitude))) return [3 /*break*/, 16];
2741
2741
  if (eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude) {
@@ -2754,12 +2754,12 @@ var EntityUtils;
2754
2754
  }
2755
2755
  worldPosition = Entity$1.GetValue({
2756
2756
  entity: entity,
2757
- path: ["Bruce", "worldPosition"]
2757
+ path: ["Bruce", "AssemblyWorldPosition"]
2758
2758
  });
2759
2759
  if (!worldPosition) return [3 /*break*/, 16];
2760
2760
  eTransform = Entity$1.GetValue({
2761
2761
  entity: entity,
2762
- path: ["Bruce", "transform"]
2762
+ path: ["Bruce", "Transform"]
2763
2763
  });
2764
2764
  heading = 0;
2765
2765
  pitch = 0;
@@ -2798,7 +2798,7 @@ var EntityUtils;
2798
2798
  offset = new Cartesian3(+matrix4[0][3], +matrix4[1][3], +matrix4[2][3]);
2799
2799
  worldPivot = Entity$1.GetValue({
2800
2800
  entity: entity,
2801
- path: ["Bruce", "worldPivot"]
2801
+ path: ["Bruce", "GeometryWorldPivot"]
2802
2802
  });
2803
2803
  if (worldPivot) //the position from worldMatrix + center of geometry offset
2804
2804
  {
@@ -2817,7 +2817,7 @@ var EntityUtils;
2817
2817
  case 15:
2818
2818
  geometryRadius = Entity$1.GetValue({
2819
2819
  entity: entity,
2820
- path: ["Bruce", "geometryRadius"]
2820
+ path: ["Bruce", "GeometryRadius"]
2821
2821
  });
2822
2822
  if (geometryRadius && (pos3d === null || pos3d === void 0 ? void 0 : pos3d.x)) {
2823
2823
  sphere = BoundingSphere.fromPoints([pos3d]);
@@ -2990,7 +2990,7 @@ var EntityUtils;
2990
2990
  function evaluateRecord() {
2991
2991
  var location = Entity$1.GetValue({
2992
2992
  entity: entity,
2993
- path: ["Bruce", "location"]
2993
+ path: ["Bruce", "Location"]
2994
2994
  });
2995
2995
  if (location && typeof location == "object" && Carto.ValidateCarto(location)) {
2996
2996
  var latitude = EnsureNumber(location.latitude);
@@ -3002,7 +3002,7 @@ var EntityUtils;
3002
3002
  }
3003
3003
  var geometry = Entity$1.GetValue({
3004
3004
  entity: entity,
3005
- path: ["Bruce", "geometry"]
3005
+ path: ["Bruce", "VectorGeometry"]
3006
3006
  });
3007
3007
  if (geometry && typeof geometry == "object") {
3008
3008
  var pointStr = geometry.Point;
@@ -3050,7 +3050,7 @@ var EntityUtils;
3050
3050
  }
3051
3051
  var boundaries = Entity$1.GetValue({
3052
3052
  entity: entity,
3053
- path: ["Bruce", "boundaries"]
3053
+ path: ["Bruce", "Boundaries"]
3054
3054
  });
3055
3055
  if (boundaries && typeof boundaries == "object") {
3056
3056
  var point = {
@@ -3110,7 +3110,7 @@ var EntityUtils;
3110
3110
  if (entity) {
3111
3111
  location_1 = Entity$1.GetValue({
3112
3112
  entity: entity,
3113
- path: ["Bruce", "location"]
3113
+ path: ["Bruce", "Location"]
3114
3114
  });
3115
3115
  lat = +(location_1 === null || location_1 === void 0 ? void 0 : location_1.latitude);
3116
3116
  lon = +(location_1 === null || location_1 === void 0 ? void 0 : location_1.longitude);
@@ -3151,7 +3151,7 @@ var EntityUtils;
3151
3151
  if (!tilesetId) {
3152
3152
  tilesetIds = Entity$1.GetValue({
3153
3153
  entity: entity,
3154
- path: ["Bruce", "tilesetID"]
3154
+ path: ["Bruce", "TilesetIDs"]
3155
3155
  });
3156
3156
  tilesetId = (tilesetIds === null || tilesetIds === void 0 ? void 0 : tilesetIds.length) ? tilesetIds[0] : tilesetId;
3157
3157
  }
@@ -3178,7 +3178,7 @@ var EntityUtils;
3178
3178
  tSettings = tileset === null || tileset === void 0 ? void 0 : tileset.settings;
3179
3179
  eLocation = Entity$1.GetValue({
3180
3180
  entity: entity,
3181
- path: ["Bruce", "location"]
3181
+ path: ["Bruce", "Location"]
3182
3182
  });
3183
3183
  if ((eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude) || ((_a = tSettings === null || tSettings === void 0 ? void 0 : tSettings.location) === null || _a === void 0 ? void 0 : _a.longitude)) {
3184
3184
  if (eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude) {
@@ -3197,7 +3197,7 @@ var EntityUtils;
3197
3197
  }
3198
3198
  worldPosition = Entity$1.GetValue({
3199
3199
  entity: entity,
3200
- path: ["Bruce", "worldPosition"]
3200
+ path: ["Bruce", "AssemblyWorldPosition"]
3201
3201
  });
3202
3202
  if (worldPosition) {
3203
3203
  heading = 0;
@@ -3205,7 +3205,7 @@ var EntityUtils;
3205
3205
  roll = 0;
3206
3206
  eTransform = Entity$1.GetValue({
3207
3207
  entity: entity,
3208
- path: ["Bruce", "transform"]
3208
+ path: ["Bruce", "Transform"]
3209
3209
  });
3210
3210
  if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.heading) {
3211
3211
  heading = eTransform.heading;
@@ -3241,7 +3241,7 @@ var EntityUtils;
3241
3241
  offset = new Cartesian3(+matrix4[0][3], +matrix4[1][3], +matrix4[2][3]);
3242
3242
  worldPivot = Entity$1.GetValue({
3243
3243
  entity: entity,
3244
- path: ["Bruce", "worldPivot"]
3244
+ path: ["Bruce", "GeometryWorldPivot"]
3245
3245
  });
3246
3246
  if (worldPivot) //the position from worldMatrix + center of geometry offset
3247
3247
  {
@@ -3512,15 +3512,15 @@ function createCacheKey(point, entity) {
3512
3512
  };
3513
3513
  var location_1 = Entity$1.GetValue({
3514
3514
  entity: entity,
3515
- path: ["Bruce", "location"]
3515
+ path: ["Bruce", "Location"]
3516
3516
  });
3517
3517
  var geometry = Entity$1.GetValue({
3518
3518
  entity: entity,
3519
- path: ["Bruce", "geometry"]
3519
+ path: ["Bruce", "VectorGeometry"]
3520
3520
  });
3521
3521
  var boundaries = Entity$1.GetValue({
3522
3522
  entity: entity,
3523
- path: ["Bruce", "boundaries"]
3523
+ path: ["Bruce", "Boundaries"]
3524
3524
  });
3525
3525
  var entityData = __assign(__assign(__assign({}, location_1), geometry), boundaries);
3526
3526
  return JSON.stringify(pointData) + '|' + JSON.stringify(entityData);
@@ -3549,7 +3549,7 @@ function calculateDistance(point, entity) {
3549
3549
  var entityPos3d = null;
3550
3550
  var location = Entity$1.GetValue({
3551
3551
  entity: entity,
3552
- path: ["Bruce", "location"]
3552
+ path: ["Bruce", "Location"]
3553
3553
  });
3554
3554
  if (location && location.latitude) {
3555
3555
  var latitude = EnsureNumber(location.latitude);
@@ -3566,7 +3566,7 @@ function calculateDistance(point, entity) {
3566
3566
  // Check geometry if it's available.
3567
3567
  var geometry = Entity$1.GetValue({
3568
3568
  entity: entity,
3569
- path: ["Bruce", "geometry"]
3569
+ path: ["Bruce", "VectorGeometry"]
3570
3570
  });
3571
3571
  if (geometry) {
3572
3572
  var passedGeometry = false;
@@ -3614,7 +3614,7 @@ function calculateDistance(point, entity) {
3614
3614
  if (minDistance === Infinity) {
3615
3615
  var boundaries = Entity$1.GetValue({
3616
3616
  entity: entity,
3617
- path: ["Bruce", "boundaries"]
3617
+ path: ["Bruce", "Boundaries"]
3618
3618
  });
3619
3619
  if (boundaries && typeof boundaries == "object") {
3620
3620
  var point_1 = {
@@ -4657,7 +4657,7 @@ function getPolygonStyleExtrusion(pStyle, entity, tags, heightRef) {
4657
4657
  */
4658
4658
  var height = Entity$1.GetValue({
4659
4659
  entity: entity,
4660
- path: ["Bruce", "location", "altitude"]
4660
+ path: ["Bruce", "Location", "altitude"]
4661
4661
  });
4662
4662
  return heightRef != HeightReference.CLAMP_TO_GROUND ? extrusion + height : extrusion;
4663
4663
  }
@@ -4680,7 +4680,7 @@ function getPolygonExtrusion(entity, tags, ring, posses, heightRef, pStyle) {
4680
4680
  // This let's us have a consistent extrusion height, and be adjustable easier by user.
4681
4681
  var alt_1 = Entity$1.GetValue({
4682
4682
  entity: entity,
4683
- path: ["Bruce", "location", "altitude"]
4683
+ path: ["Bruce", "Location", "altitude"]
4684
4684
  });
4685
4685
  if (!alt_1) {
4686
4686
  alt_1 = 0;
@@ -4737,7 +4737,7 @@ function getCylinderStyleExtrusion(style, entity, tags, heightRef) {
4737
4737
  */
4738
4738
  var height = EnsureNumber(Entity$1.GetValue({
4739
4739
  entity: entity,
4740
- path: ["Bruce", "location", "altitude"]
4740
+ path: ["Bruce", "Location", "altitude"]
4741
4741
  }), 0);
4742
4742
  return heightRef != HeightReference.CLAMP_TO_GROUND ? extrusion + height : extrusion;
4743
4743
  }
@@ -4961,7 +4961,7 @@ function getSizeOfPolygonEntity(entity) {
4961
4961
  var hasCalculatedBounds = false;
4962
4962
  var bounds = Entity$1.GetValue({
4963
4963
  entity: entity,
4964
- path: ["Bruce", "boundaries"]
4964
+ path: ["Bruce", "Boundaries"]
4965
4965
  });
4966
4966
  var calculateBounds = function () {
4967
4967
  hasCalculatedBounds = true;
@@ -5007,11 +5007,11 @@ function getSizeOfPolygonEntity(entity) {
5007
5007
  // We'll set the change in both places.
5008
5008
  if (entity.boundaries) {
5009
5009
  entity.boundaries = bounds;
5010
- entity.Bruce.boundaries = bounds;
5010
+ entity.Bruce.Boundaries = bounds;
5011
5011
  }
5012
5012
  // Data migrated to an internal field.
5013
5013
  else {
5014
- entity.Bruce.boundaries = bounds;
5014
+ entity.Bruce.Boundaries = bounds;
5015
5015
  }
5016
5016
  }
5017
5017
  return length;
@@ -5329,17 +5329,17 @@ var EntityRenderEngine;
5329
5329
  entity = params.entities[i];
5330
5330
  geometry = Entity$1.GetValue({
5331
5331
  entity: entity,
5332
- path: ["Bruce", "geometry"]
5332
+ path: ["Bruce", "VectorGeometry"]
5333
5333
  });
5334
5334
  if (((_a = geometry === null || geometry === void 0 ? void 0 : geometry.MultiGeometry) === null || _a === void 0 ? void 0 : _a.length) == 1) {
5335
5335
  // Not migrated to internal, set in both places.
5336
5336
  if (entity.geometry) {
5337
5337
  entity.geometry = __assign(__assign(__assign({}, entity.geometry), geometry.MultiGeometry[0]), { MultiGeometry: [] });
5338
- entity.Bruce.geometry = entity.geometry;
5338
+ entity.Bruce.VectorGeometry = entity.geometry;
5339
5339
  }
5340
5340
  // Migrated to internal, we'll set it there.
5341
- else if (entity.Bruce.geometry) {
5342
- entity.Bruce.geometry = __assign(__assign(__assign({}, entity.Bruce.geometry), geometry.MultiGeometry[0]), { MultiGeometry: [] });
5341
+ else if (entity.Bruce.VectorGeometry) {
5342
+ entity.Bruce.VectorGeometry = __assign(__assign(__assign({}, entity.Bruce.VectorGeometry), geometry.MultiGeometry[0]), { MultiGeometry: [] });
5343
5343
  }
5344
5344
  }
5345
5345
  }
@@ -5400,7 +5400,7 @@ var EntityRenderEngine;
5400
5400
  else if (displayType == ZoomControl.EDisplayType.Geometry) {
5401
5401
  geometry = Entity$1.GetValue({
5402
5402
  entity: entity,
5403
- path: ["Bruce", "geometry"]
5403
+ path: ["Bruce", "VectorGeometry"]
5404
5404
  });
5405
5405
  if ((_f = geometry === null || geometry === void 0 ? void 0 : geometry.MultiGeometry) === null || _f === void 0 ? void 0 : _f.length) {
5406
5406
  multiGeometry.push(entity);
@@ -5443,7 +5443,7 @@ var EntityRenderEngine;
5443
5443
  entity = multiGeometry[i];
5444
5444
  geometry = Entity$1.GetValue({
5445
5445
  entity: entity,
5446
- path: ["Bruce", "geometry"]
5446
+ path: ["Bruce", "VectorGeometry"]
5447
5447
  });
5448
5448
  if (!((_g = geometry === null || geometry === void 0 ? void 0 : geometry.MultiGeometry) === null || _g === void 0 ? void 0 : _g.length)) {
5449
5449
  polygons.push(entity);
@@ -6171,7 +6171,7 @@ var EntityRenderEngine;
6171
6171
  var entity = params.entity;
6172
6172
  var lineString = Entity$1.GetValue({
6173
6173
  entity: entity,
6174
- path: ["Bruce", "geometry", "LineString"]
6174
+ path: ["Bruce", "VectorGeometry", "LineString"]
6175
6175
  });
6176
6176
  var points = lineString && typeof lineString == "string" ? Geometry.ParsePoints(lineString) : [];
6177
6177
  if (!points || points.length < 2) {
@@ -6435,7 +6435,7 @@ var EntityRenderEngine;
6435
6435
  var entity = params.entity;
6436
6436
  var pRings = Entity$1.GetValue({
6437
6437
  entity: entity,
6438
- path: ["Bruce", "geometry", "Polygon"]
6438
+ path: ["Bruce", "VectorGeometry", "Polygon"]
6439
6439
  });
6440
6440
  if (pRings == null || !Array.isArray(pRings) || pRings.length <= 0) {
6441
6441
  return null;
@@ -6813,7 +6813,7 @@ var EntityRenderEngine;
6813
6813
  }
6814
6814
  var transform = Entity$1.GetValue({
6815
6815
  entity: entity,
6816
- path: ["Bruce", "transform"]
6816
+ path: ["Bruce", "Transform"]
6817
6817
  });
6818
6818
  var heading = EnsureNumber(transform === null || transform === void 0 ? void 0 : transform.heading);
6819
6819
  heading = (heading + 90) % 360;
@@ -24584,7 +24584,7 @@ var ViewRenderEngine;
24584
24584
  ViewRenderEngine.Render = Render;
24585
24585
  })(ViewRenderEngine || (ViewRenderEngine = {}));
24586
24586
 
24587
- var VERSION = "4.0.2";
24587
+ var VERSION = "4.0.3";
24588
24588
 
24589
24589
  export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline };
24590
24590
  //# sourceMappingURL=bruce-cesium.es5.js.map