bruce-cesium 3.0.6 → 3.0.8

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, ProjectViewTile, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, EntityRelationType, DelayQueue, EntityCoords, Api, EntitySource, MenuItem, EntityRelation, ENVIRONMENT, ProjectView, ProjectViewBookmark, ProjectViewLegacyTile, ProgramKey, Camera, AbstractApi, EntityAttachment, EntityAttachmentType, EntityAttribute } from 'bruce-models';
2
2
  import * as Cesium from 'cesium';
3
- import { Cartographic, Cartesian2, CallbackProperty, Cartesian3, Color, Rectangle, Math as Math$1, JulianDate, SceneMode, Cesium3DTileColorBlendMode, HeadingPitchRange, Entity, Primitive, Cesium3DTileFeature, HeightReference, DistanceDisplayCondition, NearFarScalar, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Model, createOsmBuildings, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, CesiumInspector, defined, createWorldTerrain, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, PolygonPipeline, Matrix4, Matrix3, IonResource, Ion, ScreenSpaceEventHandler, ScreenSpaceEventType, ColorMaterialProperty, GeometryInstance, BoundingSphere, Intersect } from 'cesium';
3
+ import { Cartographic, Cartesian2, CallbackProperty, Cartesian3, Color, Rectangle, Math as Math$1, JulianDate, SceneMode, Entity, Primitive, Cesium3DTileFeature, Cesium3DTileColorBlendMode, HeadingPitchRange, HeightReference, DistanceDisplayCondition, NearFarScalar, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Model, createOsmBuildings, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, CesiumInspector, defined, createWorldTerrain, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, ScreenSpaceEventHandler, ScreenSpaceEventType, PolygonPipeline, Matrix4, Matrix3, IonResource, Ion, ColorMaterialProperty, GeometryInstance, BoundingSphere, Intersect } from 'cesium';
4
4
 
5
5
  var TIME_LAG = 300;
6
6
  var POSITION_CHECK_TIMER = 950;
@@ -3026,7 +3026,8 @@ var EntityRenderEngine;
3026
3026
  if (!iconUrl_1 && style.iconId) {
3027
3027
  iconUrl_1 = ClientFile.GetUrl({
3028
3028
  api: params.api,
3029
- fileId: style.iconId
3029
+ fileId: style.iconId,
3030
+ viaCdn: true
3030
3031
  });
3031
3032
  }
3032
3033
  if (!iconUrl_1) return [3 /*break*/, 11];
@@ -3945,7 +3946,8 @@ var EntityRenderEngine;
3945
3946
  viewer: params.viewer,
3946
3947
  lodUrl: ClientFile.GetUrl({
3947
3948
  api: api,
3948
- fileId: lod.clientFileId
3949
+ fileId: lod.clientFileId,
3950
+ viaCdn: true
3949
3951
  }),
3950
3952
  lodClientFileId: lod.clientFileId,
3951
3953
  maxDistance: zoomItem.MaxZoom,
@@ -8907,21 +8909,20 @@ var TilesetRenderEngine;
8907
8909
  }
8908
8910
  }
8909
8911
  else {
8910
- if (!(location === null || location === void 0 ? void 0 : location.latitude)) {
8911
- return;
8912
+ if ((location === null || location === void 0 ? void 0 : location.latitude) || (location === null || location === void 0 ? void 0 : location.longitude)) {
8913
+ var translationMatrix = Matrix4.fromTranslation(new Cartesian3(EnsureNumber(transform.x), EnsureNumber(transform.y), EnsureNumber(transform.z)), new Matrix4());
8914
+ var pos3d = Cartesian3.fromDegrees(EnsureNumber(location.longitude), EnsureNumber(location.latitude), EnsureNumber(location.altitude));
8915
+ var m1 = Transforms.eastNorthUpToFixedFrame(pos3d);
8916
+ var hpr = HeadingPitchRoll.fromDegrees(EnsureNumber(transform.heading), EnsureNumber(transform.pitch), EnsureNumber(transform.roll), new HeadingPitchRoll());
8917
+ var hprRotation = Matrix3.fromHeadingPitchRoll(hpr);
8918
+ var scaleMatrix = Matrix4.fromUniformScale(EnsureNumber(transform.scale), new Matrix4());
8919
+ var combinedMatrix = Matrix4.multiply(m1, translationMatrix, new Matrix4());
8920
+ combinedMatrix = Matrix4.multiply(combinedMatrix, Matrix4.fromRotation(hprRotation), new Matrix4());
8921
+ combinedMatrix = Matrix4.multiply(combinedMatrix, scaleMatrix, new Matrix4());
8922
+ root.transform = combinedMatrix;
8923
+ // Force matrix to update
8924
+ root.updateTransform();
8912
8925
  }
8913
- var translationMatrix = Matrix4.fromTranslation(new Cartesian3(EnsureNumber(transform.x), EnsureNumber(transform.y), EnsureNumber(transform.z)), new Matrix4());
8914
- var pos3d = Cartesian3.fromDegrees(EnsureNumber(location.longitude), EnsureNumber(location.latitude), EnsureNumber(location.altitude));
8915
- var m1 = Transforms.eastNorthUpToFixedFrame(pos3d);
8916
- var hpr = HeadingPitchRoll.fromDegrees(EnsureNumber(transform.heading), EnsureNumber(transform.pitch), EnsureNumber(transform.roll), new HeadingPitchRoll());
8917
- var hprRotation = Matrix3.fromHeadingPitchRoll(hpr);
8918
- var scaleMatrix = Matrix4.fromUniformScale(EnsureNumber(transform.scale), new Matrix4());
8919
- var combinedMatrix = Matrix4.multiply(m1, translationMatrix, new Matrix4());
8920
- combinedMatrix = Matrix4.multiply(combinedMatrix, Matrix4.fromRotation(hprRotation), new Matrix4());
8921
- combinedMatrix = Matrix4.multiply(combinedMatrix, scaleMatrix, new Matrix4());
8922
- root.transform = combinedMatrix;
8923
- // Force matrix to update
8924
- root.updateTransform();
8925
8926
  }
8926
8927
  // Store data in the tileset as we can't interpret it using the cesium primitive later.
8927
8928
  var cTilesetExt = cTileset;
@@ -11328,7 +11329,8 @@ var DataSourceStaticKmlManager;
11328
11329
  if (fileId) {
11329
11330
  fileUrl = ClientFile.GetUrl({
11330
11331
  api: api,
11331
- fileId: fileId
11332
+ fileId: fileId,
11333
+ viaCdn: true
11332
11334
  });
11333
11335
  }
11334
11336
  else if (externalURL) {
@@ -14932,7 +14934,8 @@ var WidgetBookmarks = /** @class */ (function (_super) {
14932
14934
  if (bookmark["Screenshot.ClientFile.ID"]) {
14933
14935
  previewUrl = ClientFile.GetUrl({
14934
14936
  fileId: bookmark["Screenshot.ClientFile.ID"],
14935
- api: api
14937
+ api: api,
14938
+ viaCdn: true
14936
14939
  });
14937
14940
  }
14938
14941
  // TODO: Some nice empty image.
@@ -18173,7 +18176,8 @@ var WidgetInfoView = /** @class */ (function (_super) {
18173
18176
  this._imageContainer.style.display = "flex";
18174
18177
  url = ClientFile.GetUrl({
18175
18178
  fileId: defaultImage["ClientFile.ID"],
18176
- api: api
18179
+ api: api,
18180
+ viaCdn: true
18177
18181
  });
18178
18182
  this._image.style.backgroundImage = "url(".concat(url, ")");
18179
18183
  }
@@ -18451,7 +18455,7 @@ var ViewerUtils;
18451
18455
  ViewerUtils.CreateWidgets = CreateWidgets;
18452
18456
  })(ViewerUtils || (ViewerUtils = {}));
18453
18457
 
18454
- var VERSION$1 = "3.0.6";
18458
+ var VERSION$1 = "3.0.8";
18455
18459
 
18456
18460
  export { VERSION$1 as 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, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, Draw3dPolygon, Draw3dPolyline };
18457
18461
  //# sourceMappingURL=bruce-cesium.es5.js.map