bruce-cesium 5.5.6 → 5.5.7

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, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttachment, EntityAttachmentType, EntityAttribute, 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, JulianDate, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileStyle, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, IonResource, Cesium3DTileset, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
3
+ import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, HorizontalOrigin, VerticalOrigin, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileStyle, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, IonResource, Cesium3DTileset, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
4
4
 
5
5
  const TIME_LAG = 300;
6
6
  const POSITION_CHECK_TIMER = 950;
@@ -16019,20 +16019,18 @@ var TilesetRenderEngine;
16019
16019
  }
16020
16020
  }
16021
16021
  else {
16022
- if ((location === null || location === void 0 ? void 0 : location.latitude) || (location === null || location === void 0 ? void 0 : location.longitude)) {
16023
- const translationMatrix = Matrix4.fromTranslation(new Cartesian3(EnsureNumber(transform.x), EnsureNumber(transform.y), EnsureNumber(transform.z)), new Matrix4());
16024
- const pos3d = Cartesian3.fromDegrees(EnsureNumber(location.longitude), EnsureNumber(location.latitude), EnsureNumber(location.altitude));
16025
- const m1 = Transforms.eastNorthUpToFixedFrame(pos3d);
16026
- const hpr = HeadingPitchRoll.fromDegrees(EnsureNumber(transform.heading), EnsureNumber(transform.pitch), EnsureNumber(transform.roll), new HeadingPitchRoll());
16027
- const hprRotation = Matrix3.fromHeadingPitchRoll(hpr);
16028
- const scaleMatrix = Matrix4.fromUniformScale(EnsureNumber(transform.scale), new Matrix4());
16029
- let combinedMatrix = Matrix4.multiply(m1, translationMatrix, new Matrix4());
16030
- combinedMatrix = Matrix4.multiply(combinedMatrix, Matrix4.fromRotation(hprRotation), new Matrix4());
16031
- combinedMatrix = Matrix4.multiply(combinedMatrix, scaleMatrix, new Matrix4());
16032
- root.transform = combinedMatrix;
16033
- // Force matrix to update
16034
- root.updateTransform();
16035
- }
16022
+ const translationMatrix = Matrix4.fromTranslation(new Cartesian3(EnsureNumber(transform.x), EnsureNumber(transform.y), EnsureNumber(transform.z)), new Matrix4());
16023
+ const pos3d = Cartesian3.fromDegrees(EnsureNumber(location === null || location === void 0 ? void 0 : location.longitude), EnsureNumber(location === null || location === void 0 ? void 0 : location.latitude), EnsureNumber(location === null || location === void 0 ? void 0 : location.altitude));
16024
+ const m1 = Transforms.eastNorthUpToFixedFrame(pos3d);
16025
+ const hpr = HeadingPitchRoll.fromDegrees(EnsureNumber(transform.heading), EnsureNumber(transform.pitch), EnsureNumber(transform.roll), new HeadingPitchRoll());
16026
+ const hprRotation = Matrix3.fromHeadingPitchRoll(hpr);
16027
+ const scaleMatrix = Matrix4.fromUniformScale(EnsureNumber(transform.scale), new Matrix4());
16028
+ let combinedMatrix = Matrix4.multiply(m1, translationMatrix, new Matrix4());
16029
+ combinedMatrix = Matrix4.multiply(combinedMatrix, Matrix4.fromRotation(hprRotation), new Matrix4());
16030
+ combinedMatrix = Matrix4.multiply(combinedMatrix, scaleMatrix, new Matrix4());
16031
+ root.transform = combinedMatrix;
16032
+ // Force matrix to update
16033
+ root.updateTransform();
16036
16034
  }
16037
16035
  // Store data in the tileset as we can't interpret it using the cesium primitive later.
16038
16036
  const cTilesetExt = cTileset;
@@ -21464,9 +21462,6 @@ var AssemblyRenderManager;
21464
21462
  const axis_shift = new Quaternion(0, 0, -Math.SQRT1_2, Math.SQRT1_2);
21465
21463
  function calcEntityLocation(entity) {
21466
21464
  const aRootLocation = entity.Bruce.AssemblyRootLocation;
21467
- if (!(aRootLocation === null || aRootLocation === void 0 ? void 0 : aRootLocation.longitude) || !aRootLocation.latitude) {
21468
- return null;
21469
- }
21470
21465
  const worldPosition = entity.Bruce.AssemblyWorldPosition;
21471
21466
  if (!worldPosition) {
21472
21467
  return null;
@@ -21489,9 +21484,9 @@ function calcEntityLocation(entity) {
21489
21484
  }
21490
21485
  }
21491
21486
  }
21492
- let pos3d = Cartesian3.fromDegrees(aRootLocation.longitude, aRootLocation.latitude, aRootLocation.altitude || 0);
21487
+ let pos3d = Cartesian3.fromDegrees(EnsureNumber(aRootLocation.longitude), EnsureNumber(aRootLocation.latitude), EnsureNumber(aRootLocation.altitude));
21493
21488
  const m1 = Transforms.eastNorthUpToFixedFrame(pos3d);
21494
- const hpr = HeadingPitchRoll.fromDegrees(heading, pitch, roll, new HeadingPitchRoll());
21489
+ const hpr = HeadingPitchRoll.fromDegrees(EnsureNumber(heading), EnsureNumber(pitch), EnsureNumber(roll), new HeadingPitchRoll());
21495
21490
  const transform = Matrix3.fromHeadingPitchRoll(hpr);
21496
21491
  const transformedOffset = Matrix3.multiplyByVector(transform, offset, new Cartesian3());
21497
21492
  pos3d = Matrix4.multiplyByPoint(m1, transformedOffset, new Cartesian3());
@@ -31458,7 +31453,7 @@ class WidgetViewBar extends Widget.AWidget {
31458
31453
  }
31459
31454
  }
31460
31455
 
31461
- const VERSION = "5.5.6";
31456
+ const VERSION = "5.5.7";
31462
31457
 
31463
31458
  export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isHistoricMetadataChanged, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, AssemblyRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, DEFAULT_LIVE_PADDING_SECONDS, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar, WidgetControlViewBar, WidgetControlViewBarSearch, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
31464
31459
  //# sourceMappingURL=bruce-cesium.es5.js.map