bruce-cesium 6.5.4 → 6.5.5
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.
- package/dist/bruce-cesium.es5.js +25 -12
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +23 -10
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/viewer/view-ground-area.js +22 -9
- package/dist/lib/viewer/view-ground-area.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/viewer/view-ground-area.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Cartes, Entity as Entity$1, Calculator, EntityRelationType, EntityType, Style, ENVIRONMENT, ProjectViewTile, DelayQueue, LRUCache, BruceEvent, ObjectUtils, Geometry, EntityHistoricData, EntityLod, ZoomControl, EntityTag, Tileset, Api, EntityCoords, DataLab, EntitySource, ClientFile, MenuItem, EntityRelation, ProgramKey,
|
|
1
|
+
import { Cartes, Entity as Entity$1, Calculator, EntityRelationType, EntityType, Style, ENVIRONMENT, ProjectViewTile, DelayQueue, LRUCache, BruceEvent, ObjectUtils, Geometry, EntityHistoricData, EntityLod, ZoomControl, EntityTag, Tileset, Api, EntityCoords, DataLab, EntitySource, ClientFile, MenuItem, EntityRelation, ProgramKey, Carto, Bounds, ProjectView, ProjectViewBookmark, ProjectViewLegacyTile, Camera, AbstractApi, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, Session } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, ColorMaterialProperty, Color,
|
|
3
|
+
import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, DistanceDisplayCondition, HeightReference, ColorBlendMode, HeadingPitchRoll, Math as Math$1, Transforms, ShadowMode, Cartesian3, ClassificationType, Model, HorizontalOrigin, VerticalOrigin, ConstantPositionProperty, ArcType, CornerType, JulianDate, Quaternion, Matrix4, PolygonHierarchy, PolylineGraphics, Cartesian2, SceneTransforms, NearFarScalar, Matrix3, Rectangle, KmlDataSource, GeoJsonDataSource, SceneMode, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, Cesium3DTileset, IonResource, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, OrthographicFrustum, EasingFunction, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, BoundingSphere, GeometryInstance, CesiumInspector, ClockRange, ScreenSpaceEventHandler, ScreenSpaceEventType, Intersect, CzmlDataSource, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Ensures a number is returned from a given value.
|
|
@@ -14952,6 +14952,27 @@ var ViewGroundArea;
|
|
|
14952
14952
|
return `${bounds.west},${bounds.south} ${bounds.west},${bounds.north} ${bounds.east},${bounds.north} ${bounds.east},${bounds.south}`;
|
|
14953
14953
|
}
|
|
14954
14954
|
ViewGroundArea.ToBboxPolygon = ToBboxPolygon;
|
|
14955
|
+
function NormalizeBounds(bounds, altitude) {
|
|
14956
|
+
if (!bounds ||
|
|
14957
|
+
!isDefined(bounds.east) ||
|
|
14958
|
+
!isDefined(bounds.west) ||
|
|
14959
|
+
!isDefined(bounds.north) ||
|
|
14960
|
+
!isDefined(bounds.south)) {
|
|
14961
|
+
return null;
|
|
14962
|
+
}
|
|
14963
|
+
const viewRect = { ...bounds };
|
|
14964
|
+
const centerLong = (viewRect.east + viewRect.west) / 2;
|
|
14965
|
+
const centerLat = (viewRect.north + viewRect.south) / 2;
|
|
14966
|
+
viewRect.east = Math.max(viewRect.east, centerLong + (MINIMUM_VIEW_AREA_SIZE_DEGREES / 2));
|
|
14967
|
+
viewRect.west = Math.min(viewRect.west, centerLong - (MINIMUM_VIEW_AREA_SIZE_DEGREES / 2));
|
|
14968
|
+
viewRect.south = Math.min(viewRect.south, centerLat - (MINIMUM_VIEW_AREA_SIZE_DEGREES / 2));
|
|
14969
|
+
viewRect.north = Math.max(viewRect.north, centerLat + (MINIMUM_VIEW_AREA_SIZE_DEGREES / 2));
|
|
14970
|
+
if (isDefined(altitude)) {
|
|
14971
|
+
viewRect.alt = altitude;
|
|
14972
|
+
}
|
|
14973
|
+
return viewRect;
|
|
14974
|
+
}
|
|
14975
|
+
ViewGroundArea.NormalizeBounds = NormalizeBounds;
|
|
14955
14976
|
async function GetViewArea(viewer) {
|
|
14956
14977
|
var _a, _b;
|
|
14957
14978
|
if (!viewer || viewer.isDestroyed()) {
|
|
@@ -15017,15 +15038,7 @@ var ViewGroundArea;
|
|
|
15017
15038
|
}
|
|
15018
15039
|
}
|
|
15019
15040
|
}
|
|
15020
|
-
|
|
15021
|
-
const centerLong = (viewRect.east + viewRect.west) / 2;
|
|
15022
|
-
const centerLat = (viewRect.north + viewRect.south) / 2;
|
|
15023
|
-
viewRect.east = Math.max(viewRect.east, centerLong + (MINIMUM_VIEW_AREA_SIZE_DEGREES / 2));
|
|
15024
|
-
viewRect.west = Math.min(viewRect.west, centerLong - (MINIMUM_VIEW_AREA_SIZE_DEGREES / 2));
|
|
15025
|
-
viewRect.south = Math.min(viewRect.south, centerLat - (MINIMUM_VIEW_AREA_SIZE_DEGREES / 2));
|
|
15026
|
-
viewRect.north = Math.max(viewRect.north, centerLat + (MINIMUM_VIEW_AREA_SIZE_DEGREES / 2));
|
|
15027
|
-
viewRect.alt = (_b = viewer.scene.camera.positionCartographic) === null || _b === void 0 ? void 0 : _b.height;
|
|
15028
|
-
}
|
|
15041
|
+
viewRect = NormalizeBounds(viewRect, (_b = viewer.scene.camera.positionCartographic) === null || _b === void 0 ? void 0 : _b.height);
|
|
15029
15042
|
if (center && viewRect) {
|
|
15030
15043
|
return {
|
|
15031
15044
|
bounds: viewRect,
|
|
@@ -35313,7 +35326,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
35313
35326
|
}
|
|
35314
35327
|
}
|
|
35315
35328
|
|
|
35316
|
-
const VERSION = "6.5.
|
|
35329
|
+
const VERSION = "6.5.5";
|
|
35317
35330
|
/**
|
|
35318
35331
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
35319
35332
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|