bruce-cesium 5.7.0 → 5.7.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.
- package/dist/bruce-cesium.es5.js +49 -6
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +48 -5
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/view-render-engine.js +13 -4
- package/dist/lib/rendering/view-render-engine.js.map +1 -1
- package/dist/lib/utils/view-utils.js +34 -0
- package/dist/lib/utils/view-utils.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/utils/view-utils.d.ts +5 -0
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Entity as Entity$1, ProjectViewTile, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttachment, EntityAttachmentType, EntityAttribute, 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, JulianDate, Entity, DistanceDisplayCondition,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, HorizontalOrigin, VerticalOrigin, ColorBlendMode, HeadingPitchRoll, Transforms, Model, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, IonResource, Cesium3DTileset, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
const TIME_LAG = 300;
|
|
6
6
|
const POSITION_CHECK_TIMER = 950;
|
|
@@ -3237,6 +3237,40 @@ var ViewUtils;
|
|
|
3237
3237
|
}
|
|
3238
3238
|
viewer[CESIUM_TIMELINE_LIVE_KEY] = false;
|
|
3239
3239
|
}
|
|
3240
|
+
function SetGlobeDetails(params) {
|
|
3241
|
+
let { viewer, hidden, baseColor } = params;
|
|
3242
|
+
const scene = viewer === null || viewer === void 0 ? void 0 : viewer.scene;
|
|
3243
|
+
if (!(scene === null || scene === void 0 ? void 0 : scene.globe)) {
|
|
3244
|
+
return;
|
|
3245
|
+
}
|
|
3246
|
+
if (hidden == null) {
|
|
3247
|
+
hidden = !scene.globe.show;
|
|
3248
|
+
}
|
|
3249
|
+
else {
|
|
3250
|
+
scene.globe.show = !hidden;
|
|
3251
|
+
}
|
|
3252
|
+
if (baseColor == null) {
|
|
3253
|
+
baseColor = scene.globe.baseColor;
|
|
3254
|
+
}
|
|
3255
|
+
// When globe is off, we'll also hide the stars/moon.
|
|
3256
|
+
// We also grab the globe color and apply it to the sky.
|
|
3257
|
+
if (hidden) {
|
|
3258
|
+
scene.skyBox.show = false;
|
|
3259
|
+
scene.skyAtmosphere.show = false;
|
|
3260
|
+
scene.sun.show = false;
|
|
3261
|
+
scene.moon.show = false;
|
|
3262
|
+
scene.backgroundColor = baseColor.clone();
|
|
3263
|
+
}
|
|
3264
|
+
else {
|
|
3265
|
+
scene.skyBox.show = true;
|
|
3266
|
+
scene.skyAtmosphere.show = true;
|
|
3267
|
+
scene.sun.show = true;
|
|
3268
|
+
scene.moon.show = true;
|
|
3269
|
+
scene.backgroundColor = Color.BLACK;
|
|
3270
|
+
}
|
|
3271
|
+
scene.globe.baseColor = baseColor;
|
|
3272
|
+
}
|
|
3273
|
+
ViewUtils.SetGlobeDetails = SetGlobeDetails;
|
|
3240
3274
|
})(ViewUtils || (ViewUtils = {}));
|
|
3241
3275
|
|
|
3242
3276
|
function traverseEntity(cEntity, arr, ignoreParent, onlyEditable, onlySelectable) {
|
|
@@ -25655,7 +25689,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25655
25689
|
}
|
|
25656
25690
|
let camera = ((_d = bookmark === null || bookmark === void 0 ? void 0 : bookmark.Camera) !== null && _d !== void 0 ? _d : {});
|
|
25657
25691
|
if (contentType == ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE) {
|
|
25658
|
-
if (!Cartes.ValidateCartes3(camera)) {
|
|
25692
|
+
if (!Cartes.ValidateCartes3(camera) && !Carto.ValidateCarto(camera)) {
|
|
25659
25693
|
camera = {
|
|
25660
25694
|
altitude: 500,
|
|
25661
25695
|
latitude: 0,
|
|
@@ -25792,7 +25826,6 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25792
25826
|
// TODO: Need global default.
|
|
25793
25827
|
baseColor = "#0326BE";
|
|
25794
25828
|
}
|
|
25795
|
-
scene.globe.baseColor = Color.fromCssColorString(baseColor);
|
|
25796
25829
|
let globeHidden = bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeHidden;
|
|
25797
25830
|
if (globeHidden == null) {
|
|
25798
25831
|
globeHidden = (_r = defaults.settings) === null || _r === void 0 ? void 0 : _r.globeHidden;
|
|
@@ -25800,7 +25833,11 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25800
25833
|
if (globeHidden == null) {
|
|
25801
25834
|
globeHidden = false;
|
|
25802
25835
|
}
|
|
25803
|
-
|
|
25836
|
+
ViewUtils.SetGlobeDetails({
|
|
25837
|
+
viewer: viewer,
|
|
25838
|
+
hidden: globeHidden,
|
|
25839
|
+
baseColor: Color.fromCssColorString(baseColor)
|
|
25840
|
+
});
|
|
25804
25841
|
let terrainWireframe = bSettings === null || bSettings === void 0 ? void 0 : bSettings.terrainWireframe;
|
|
25805
25842
|
if (terrainWireframe == null) {
|
|
25806
25843
|
terrainWireframe = (_s = defaults.settings) === null || _s === void 0 ? void 0 : _s.terrainWireframe;
|
|
@@ -26052,6 +26089,9 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
26052
26089
|
}
|
|
26053
26090
|
}
|
|
26054
26091
|
}
|
|
26092
|
+
if (contentType === ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE) {
|
|
26093
|
+
imagery = [];
|
|
26094
|
+
}
|
|
26055
26095
|
// We don't wait for imageries to load, this does not affect rendering other things.
|
|
26056
26096
|
TileRenderEngine.Map.Navigator.Render({
|
|
26057
26097
|
apiGetter: params.apiGetter,
|
|
@@ -26151,6 +26191,9 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
26151
26191
|
// TODO: Need global default.
|
|
26152
26192
|
gOcclusion = true;
|
|
26153
26193
|
}
|
|
26194
|
+
if (contentType === ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE) {
|
|
26195
|
+
gOcclusion = false;
|
|
26196
|
+
}
|
|
26154
26197
|
scene.globe.depthTestAgainstTerrain = Boolean(gOcclusion);
|
|
26155
26198
|
}
|
|
26156
26199
|
var ViewRenderEngine;
|
|
@@ -26267,7 +26310,7 @@ var ViewRenderEngine;
|
|
|
26267
26310
|
}
|
|
26268
26311
|
let camera = ((_d = bookmark === null || bookmark === void 0 ? void 0 : bookmark.Camera) !== null && _d !== void 0 ? _d : {});
|
|
26269
26312
|
if (contentType == ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE) {
|
|
26270
|
-
if (!Cartes.ValidateCartes3(camera)) {
|
|
26313
|
+
if (!Cartes.ValidateCartes3(camera) && !Carto.ValidateCarto(camera)) {
|
|
26271
26314
|
camera = {
|
|
26272
26315
|
altitude: 500,
|
|
26273
26316
|
latitude: 0,
|
|
@@ -32094,7 +32137,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
32094
32137
|
}
|
|
32095
32138
|
}
|
|
32096
32139
|
|
|
32097
|
-
const VERSION = "5.7.
|
|
32140
|
+
const VERSION = "5.7.2";
|
|
32098
32141
|
|
|
32099
32142
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isOutlineChanged, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, AssemblyRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, DEFAULT_LIVE_PADDING_SECONDS, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar, WidgetControlViewBar, WidgetControlViewBarSearch, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
|
|
32100
32143
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|