bruce-cesium 4.2.1 → 4.2.2

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, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, HeadingPitchRange, Ion, Cesium3DTileStyle, Cesium3DTileColorBlendMode, KmlDataSource, OrthographicFrustum, EasingFunction, SceneTransforms, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, 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, 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, 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, Intersect, CzmlDataSource, Quaternion } from 'cesium';
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -13714,8 +13714,17 @@ var TilesetRenderEngine;
13714
13714
  pos3d.z += offset.z;
13715
13715
  }
13716
13716
  if (legacy_1.rotate) {
13717
+ // HPR at the current position.
13717
13718
  var hpr = HeadingPitchRoll.fromDegrees(EnsureNumber(transform.heading), EnsureNumber(transform.pitch), EnsureNumber(transform.roll), new HeadingPitchRoll());
13718
- root.transform = Transforms.headingPitchRollToFixedFrame(pos3d, hpr);
13719
+ var rotationMatrix = Transforms.headingPitchRollToFixedFrame(pos3d, hpr);
13720
+ // Scale.
13721
+ var scale = EnsureNumber(transform === null || transform === void 0 ? void 0 : transform.scale, 1);
13722
+ var scaleMatrix = transform.scale
13723
+ ? Matrix4.fromUniformScale(scale, new Matrix4())
13724
+ : Matrix4.IDENTITY.clone(new Matrix4());
13725
+ // HPR + scale.
13726
+ var combinedMatrix = Matrix4.multiply(rotationMatrix, scaleMatrix, new Matrix4());
13727
+ root.transform = combinedMatrix;
13719
13728
  root.updateTransform();
13720
13729
  }
13721
13730
  var curPos3d = getCurPos3d();
@@ -13996,7 +14005,7 @@ var TilesetRenderEngine;
13996
14005
  heading: rotation.z,
13997
14006
  pitch: rotation.x,
13998
14007
  roll: rotation.y,
13999
- scale: 1,
14008
+ scale: EnsureNumber(origin_1 === null || origin_1 === void 0 ? void 0 : origin_1.scale, 1),
14000
14009
  z: EnsureNumber(positionOffset === null || positionOffset === void 0 ? void 0 : positionOffset.altitude),
14001
14010
  x: EnsureNumber(positionOffset === null || positionOffset === void 0 ? void 0 : positionOffset.latitude),
14002
14011
  y: EnsureNumber(positionOffset === null || positionOffset === void 0 ? void 0 : positionOffset.longitude)
@@ -25752,7 +25761,7 @@ var ViewRenderEngine;
25752
25761
  ViewRenderEngine.Render = Render;
25753
25762
  })(ViewRenderEngine || (ViewRenderEngine = {}));
25754
25763
 
25755
- var VERSION = "4.2.1";
25764
+ var VERSION = "4.2.2";
25756
25765
 
25757
25766
  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 };
25758
25767
  //# sourceMappingURL=bruce-cesium.es5.js.map