bruce-cesium 4.3.2 → 4.3.4
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 -8
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +23 -6
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/render-managers/common/entity-label.js +22 -5
- package/dist/lib/rendering/render-managers/common/entity-label.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, ProjectView, ProjectViewBookmark,
|
|
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, Camera, ProjectView, ProjectViewBookmark, ProjectViewLegacyTile, EntityAttribute, EntityAttachment, EntityAttachmentType, 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,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, JulianDate, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, ScreenSpaceEventHandler, ScreenSpaceEventType, Intersect, CzmlDataSource, Quaternion } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8757,11 +8757,28 @@ var EntityLabel;
|
|
|
8757
8757
|
// We get the pos3d and add 'n' to it, then turn it back into 2d.
|
|
8758
8758
|
var lineEndPos3d = _this._pos3d.clone();
|
|
8759
8759
|
var lineEndPoint = Cartographic.fromCartesian(lineEndPos3d);
|
|
8760
|
-
var addHeight =
|
|
8761
|
-
//
|
|
8762
|
-
//
|
|
8763
|
-
if (
|
|
8764
|
-
addHeight =
|
|
8760
|
+
var addHeight = null;
|
|
8761
|
+
// If we're pre-positioned that means the user is hovering over the entity.
|
|
8762
|
+
// We will keep the height low to avoid looking goofy.
|
|
8763
|
+
if (_this.prePositioned) {
|
|
8764
|
+
addHeight = distance / 12;
|
|
8765
|
+
}
|
|
8766
|
+
else {
|
|
8767
|
+
// If known then calculate based on size.
|
|
8768
|
+
// If we're close then we'll favour the distance over the size.
|
|
8769
|
+
if (sizeInM && sizeInM > 0) {
|
|
8770
|
+
addHeight = Math.min(distance / 5, sizeInM * 1.2);
|
|
8771
|
+
}
|
|
8772
|
+
// If unknown then calculate based on camera height or distance.
|
|
8773
|
+
// Radius is unknown for Tileset things. We could bake the radius in possibly as a feature property.
|
|
8774
|
+
// We have to make it work for both labels against tall skyscrapers, and up-close assembly models.
|
|
8775
|
+
else {
|
|
8776
|
+
addHeight = Math.min(distance, _this.viewer.camera.positionCartographic.height) / 7;
|
|
8777
|
+
}
|
|
8778
|
+
}
|
|
8779
|
+
// Safety check.
|
|
8780
|
+
if (!addHeight || addHeight <= 0) {
|
|
8781
|
+
addHeight = 0.001;
|
|
8765
8782
|
}
|
|
8766
8783
|
lineEndPoint.height += addHeight;
|
|
8767
8784
|
lineEndPos3d = Cartographic.toCartesian(lineEndPoint);
|
|
@@ -26500,7 +26517,7 @@ var ViewerUtils;
|
|
|
26500
26517
|
ViewerUtils.AssertIonToken = AssertIonToken;
|
|
26501
26518
|
})(ViewerUtils || (ViewerUtils = {}));
|
|
26502
26519
|
|
|
26503
|
-
var VERSION = "4.3.
|
|
26520
|
+
var VERSION = "4.3.4";
|
|
26504
26521
|
|
|
26505
26522
|
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, MeasureCreator, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, WidgetSearchBar, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
|
|
26506
26523
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|