bruce-cesium 6.5.3 → 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 +32 -19
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +28 -15
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/viewer/cesium-view-monitor.js +1 -1
- package/dist/lib/viewer/cesium-view-monitor.js.map +1 -1
- package/dist/lib/viewer/view-ground-area.js +28 -15
- package/dist/lib/viewer/view-ground-area.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/viewer/cesium-view-monitor.d.ts +2 -2
- package/dist/types/viewer/view-ground-area.d.ts +2 -1
- 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, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, DistanceDisplayCondition, Math as Math$1,
|
|
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.
|
|
@@ -14946,12 +14946,33 @@ function getGroundCenterOfCameraRay(viewer, screenPos) {
|
|
|
14946
14946
|
}
|
|
14947
14947
|
return null;
|
|
14948
14948
|
}
|
|
14949
|
-
var
|
|
14950
|
-
(function (
|
|
14949
|
+
var ViewGroundArea;
|
|
14950
|
+
(function (ViewGroundArea) {
|
|
14951
14951
|
function ToBboxPolygon(bounds) {
|
|
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 CesiumViewGroundArea;
|
|
|
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,
|
|
@@ -15034,8 +15047,8 @@ var CesiumViewGroundArea;
|
|
|
15034
15047
|
}
|
|
15035
15048
|
return null;
|
|
15036
15049
|
}
|
|
15037
|
-
|
|
15038
|
-
})(
|
|
15050
|
+
ViewGroundArea.GetViewArea = GetViewArea;
|
|
15051
|
+
})(ViewGroundArea || (ViewGroundArea = {}));
|
|
15039
15052
|
|
|
15040
15053
|
const TIME_LAG = 300;
|
|
15041
15054
|
const POSITION_CHECK_TIMER = 950;
|
|
@@ -15134,7 +15147,7 @@ var CesiumViewMonitor;
|
|
|
15134
15147
|
if (!this.viewer.container || ((_a = this.viewer.container.style) === null || _a === void 0 ? void 0 : _a.display) == "none") {
|
|
15135
15148
|
return ESearchStatus.LocationMissing;
|
|
15136
15149
|
}
|
|
15137
|
-
const viewArea = await
|
|
15150
|
+
const viewArea = await ViewGroundArea.GetViewArea(this.viewer);
|
|
15138
15151
|
if ((viewArea === null || viewArea === void 0 ? void 0 : viewArea.target) && (viewArea === null || viewArea === void 0 ? void 0 : viewArea.bounds)) {
|
|
15139
15152
|
const center = viewArea.target;
|
|
15140
15153
|
const viewRect = viewArea.bounds;
|
|
@@ -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.
|
|
@@ -35330,5 +35343,5 @@ const getENVIRONMENT = () => {
|
|
|
35330
35343
|
return ENVIRONMENT;
|
|
35331
35344
|
};
|
|
35332
35345
|
|
|
35333
|
-
export { VERSION, setENVIRONMENT, getENVIRONMENT, CesiumAnimatedInOut, CesiumAnimatedProperty, isOutlineChanged$1 as isOutlineChanged, EntityRenderEngine, EntityRenderEngineModel3d, EntityRenderEnginePoint, EntityRenderEnginePolygon, EntityRenderEnginePolyline, MenuItemCreator, MenuItemManager, CesiumParabola, EntityLabel, LiveCursor, SharedGetters, DataSourceStaticKmlManager, DataLabRenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, AssemblyRenderManager, GoogleSearchRenderManager, RelationsRenderManager, RenderManager, TilesetArbRenderManager, TilesetCadRenderManager, TilesetEntitiesRenderManager, TilesetGooglePhotosRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TileRenderEngine, TilesetRenderEngine, ViewRenderEngine, VisualsRegister, XGridsRenderEngine, CesiumEntityStyler, DrawingUtils, EntityUtils, MeasureUtils, StyleUtils, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, CESIUM_MODEL_SPACE_KEY, DEFAULT_LIVE_PADDING_SECONDS, ViewUtils, CesiumViewMonitor,
|
|
35346
|
+
export { VERSION, setENVIRONMENT, getENVIRONMENT, CesiumAnimatedInOut, CesiumAnimatedProperty, isOutlineChanged$1 as isOutlineChanged, EntityRenderEngine, EntityRenderEngineModel3d, EntityRenderEnginePoint, EntityRenderEnginePolygon, EntityRenderEnginePolyline, MenuItemCreator, MenuItemManager, CesiumParabola, EntityLabel, LiveCursor, SharedGetters, DataSourceStaticKmlManager, DataLabRenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, AssemblyRenderManager, GoogleSearchRenderManager, RelationsRenderManager, RenderManager, TilesetArbRenderManager, TilesetCadRenderManager, TilesetEntitiesRenderManager, TilesetGooglePhotosRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TileRenderEngine, TilesetRenderEngine, ViewRenderEngine, VisualsRegister, XGridsRenderEngine, CesiumEntityStyler, DrawingUtils, EntityUtils, MeasureUtils, StyleUtils, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, CESIUM_MODEL_SPACE_KEY, DEFAULT_LIVE_PADDING_SECONDS, ViewUtils, CesiumViewMonitor, ViewGroundArea, ViewerEventTracker, ViewerUtils, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, WidgetControlViewBar, WidgetControlViewBarSearch, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar };
|
|
35334
35347
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|