bruce-cesium 4.3.4 → 4.3.6

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
- 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, Camera, ProjectView, ProjectViewBookmark, ProjectViewLegacyTile, EntityAttribute, EntityAttachment, EntityAttachmentType, AbstractApi, Session } from 'bruce-models';
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, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttribute, EntityAttachment, EntityAttachmentType, 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, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, JulianDate, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, ScreenSpaceEventHandler, ScreenSpaceEventType, Intersect, CzmlDataSource, Quaternion } from 'cesium';
3
+ import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Quaternion, Intersect } from 'cesium';
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2578,11 +2578,24 @@ var EntityUtils;
2578
2578
  });
2579
2579
  }); };
2580
2580
  evaluateRecord = function () { return __awaiter(_this, void 0, void 0, function () {
2581
- var posses, location, latitude, longitude, pos3d_3, geometry, pointStr, points, point, pos3d_4, lineStr, points, pPosses, pRings, boundary, points, pPosses, boundaries, point, bPosses;
2581
+ var posses, assemblyLocation, latitude, longitude, pos3d_3, location, latitude, longitude, pos3d_4, geometry, pointStr, points, point, pos3d_5, lineStr, points, pPosses, pRings, boundary, points, pPosses, boundaries, point, bPosses;
2582
2582
  return __generator(this, function (_a) {
2583
2583
  switch (_a.label) {
2584
2584
  case 0:
2585
2585
  posses = [];
2586
+ assemblyLocation = Entity$1.GetValue({
2587
+ entity: entity,
2588
+ path: ["Bruce", "AssemblyLocation"]
2589
+ });
2590
+ if (assemblyLocation && typeof assemblyLocation == "object" && Carto.ValidateCarto(assemblyLocation)) {
2591
+ latitude = EnsureNumber(assemblyLocation.latitude);
2592
+ longitude = EnsureNumber(assemblyLocation.longitude);
2593
+ // Disallowing exact 0.
2594
+ if (latitude || longitude) {
2595
+ pos3d_3 = Cartesian3.fromDegrees(longitude, latitude, EnsureNumber(assemblyLocation.altitude));
2596
+ posses.push(pos3d_3);
2597
+ }
2598
+ }
2586
2599
  location = Entity$1.GetValue({
2587
2600
  entity: entity,
2588
2601
  path: ["Bruce", "Location"]
@@ -2592,8 +2605,8 @@ var EntityUtils;
2592
2605
  longitude = EnsureNumber(location.longitude);
2593
2606
  // Disallowing exact 0.
2594
2607
  if (latitude || longitude) {
2595
- pos3d_3 = Cartesian3.fromDegrees(longitude, latitude, EnsureNumber(location.altitude));
2596
- posses.push(pos3d_3);
2608
+ pos3d_4 = Cartesian3.fromDegrees(longitude, latitude, EnsureNumber(location.altitude));
2609
+ posses.push(pos3d_4);
2597
2610
  }
2598
2611
  }
2599
2612
  geometry = Entity$1.GetValue({
@@ -2608,8 +2621,8 @@ var EntityUtils;
2608
2621
  points = Geometry.ParsePoints(pointStr);
2609
2622
  point = points.length > 0 ? points[0] : null;
2610
2623
  if (point && Carto.ValidateCarto(point)) {
2611
- pos3d_4 = Cartesian3.fromDegrees(EnsureNumber(point.longitude), EnsureNumber(point.latitude), EnsureNumber(point.altitude));
2612
- posses.push(pos3d_4);
2624
+ pos3d_5 = Cartesian3.fromDegrees(EnsureNumber(point.longitude), EnsureNumber(point.latitude), EnsureNumber(point.altitude));
2625
+ posses.push(pos3d_5);
2613
2626
  }
2614
2627
  }
2615
2628
  lineStr = geometry.LineString;
@@ -2955,9 +2968,9 @@ var EntityUtils;
2955
2968
  if ((rego === null || rego === void 0 ? void 0 : rego.visual) instanceof Entity) {
2956
2969
  var visual = rego.visual;
2957
2970
  if (visual.position) {
2958
- var pos3d_5 = GetValue(viewer, visual.position);
2971
+ var pos3d_6 = GetValue(viewer, visual.position);
2959
2972
  // Fix height reference.
2960
- if (pos3d_5 === null || pos3d_5 === void 0 ? void 0 : pos3d_5.x) {
2973
+ if (pos3d_6 === null || pos3d_6 === void 0 ? void 0 : pos3d_6.x) {
2961
2974
  var visualHeightRef = HeightReference.RELATIVE_TO_GROUND;
2962
2975
  if (visual.model) {
2963
2976
  visualHeightRef = GetValue(viewer, visual.model.heightReference);
@@ -2984,7 +2997,7 @@ var EntityUtils;
2984
2997
  return DrawingUtils.EnsurePosHeight({
2985
2998
  desiredHeightRef: params.returnHeightRef,
2986
2999
  heightRef: visualHeightRef,
2987
- pos3d: pos3d_5,
3000
+ pos3d: pos3d_6,
2988
3001
  viewer: viewer
2989
3002
  });
2990
3003
  }
@@ -2993,6 +3006,19 @@ var EntityUtils;
2993
3006
  return null;
2994
3007
  }
2995
3008
  function evaluateRecord() {
3009
+ // Checking for a pre-calculated lat/lon for assembly entities.
3010
+ var assemblyLocation = Entity$1.GetValue({
3011
+ entity: entity,
3012
+ path: ["Bruce", "AssemblyLocation"]
3013
+ });
3014
+ if (assemblyLocation && typeof assemblyLocation == "object" && Carto.ValidateCarto(assemblyLocation)) {
3015
+ var latitude = EnsureNumber(assemblyLocation.latitude);
3016
+ var longitude = EnsureNumber(assemblyLocation.longitude);
3017
+ // Disallowing exact 0.
3018
+ if (latitude || longitude) {
3019
+ return Cartesian3.fromDegrees(longitude, latitude, EnsureNumber(assemblyLocation.altitude));
3020
+ }
3021
+ }
2996
3022
  var location = Entity$1.GetValue({
2997
3023
  entity: entity,
2998
3024
  path: ["Bruce", "Location"]
@@ -26517,7 +26543,7 @@ var ViewerUtils;
26517
26543
  ViewerUtils.AssertIonToken = AssertIonToken;
26518
26544
  })(ViewerUtils || (ViewerUtils = {}));
26519
26545
 
26520
- var VERSION = "4.3.4";
26546
+ var VERSION = "4.3.6";
26521
26547
 
26522
26548
  export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, WidgetSearchBar, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
26523
26549
  //# sourceMappingURL=bruce-cesium.es5.js.map