bruce-cesium 4.6.3 → 4.6.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 +34 -27
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +32 -25
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine.js +3 -3
- package/dist/lib/rendering/getters/entity-filter-getter.js +7 -7
- package/dist/lib/rendering/getters/entity-filter-getter.js.map +1 -1
- package/dist/lib/rendering/getters/entity-globe.js +21 -44
- package/dist/lib/rendering/getters/entity-globe.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, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, ProjectViewLegacyTile,
|
|
1
|
+
import { BruceEvent, Cartes, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, AbstractApi, Session, EntityAttribute, EntityAttachment, EntityAttachmentType } 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, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, Primitive, Cesium3DTileFeature,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, Quaternion, PolygonPipeline, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8414,16 +8414,16 @@ var EntityRenderEngine;
|
|
|
8414
8414
|
min = 0;
|
|
8415
8415
|
}
|
|
8416
8416
|
// Adjusting slightly because I distrust our initial calculation vs Cesium's one.
|
|
8417
|
-
max = (+max) * 1.
|
|
8417
|
+
max = (+max) * 1.8;
|
|
8418
8418
|
min = +min;
|
|
8419
8419
|
if (min > 0) {
|
|
8420
8420
|
min = (+min) * 0.8;
|
|
8421
8421
|
}
|
|
8422
8422
|
meterSize = +meterSize;
|
|
8423
8423
|
if (!isNaN(meterSize) && meterSize > 0) {
|
|
8424
|
-
// A 1m thing at
|
|
8424
|
+
// A 1m thing at 3000m distance is barely visible, so we can cull it.
|
|
8425
8425
|
// So we'll multiply this magic distance by the size of the thing and determine when it'll be too small to see.
|
|
8426
|
-
var METER_DISTANCE_PER_METER = isPolygon ?
|
|
8426
|
+
var METER_DISTANCE_PER_METER = isPolygon ? 200 : 3000;
|
|
8427
8427
|
var newMax = meterSize * METER_DISTANCE_PER_METER;
|
|
8428
8428
|
// Enforcing a minimum max distance in case something goes wrong we want stuff to always be visible when close.
|
|
8429
8429
|
var MIN_MAX = 300;
|
|
@@ -16032,10 +16032,10 @@ var EntityGlobe;
|
|
|
16032
16032
|
return range;
|
|
16033
16033
|
}
|
|
16034
16034
|
// Add minor decimal as API crashes when giving it whole numbers.
|
|
16035
|
-
var maxLon = prepareRangeForBounds(this.Boundaries.maxLongitude)
|
|
16036
|
-
var minLon = prepareRangeForBounds(this.Boundaries.minLongitude)
|
|
16037
|
-
var maxLat = prepareRangeForBounds(this.Boundaries.maxLatitude)
|
|
16038
|
-
var minLat = prepareRangeForBounds(this.Boundaries.minLatitude)
|
|
16035
|
+
var maxLon = prepareRangeForBounds(this.Boundaries.maxLongitude);
|
|
16036
|
+
var minLon = prepareRangeForBounds(this.Boundaries.minLongitude);
|
|
16037
|
+
var maxLat = prepareRangeForBounds(this.Boundaries.maxLatitude);
|
|
16038
|
+
var minLat = prepareRangeForBounds(this.Boundaries.minLatitude);
|
|
16039
16039
|
return {
|
|
16040
16040
|
east: maxLon,
|
|
16041
16041
|
north: maxLat,
|
|
@@ -16058,6 +16058,7 @@ var EntityGlobe;
|
|
|
16058
16058
|
var maxLon = viewRect.east;
|
|
16059
16059
|
var MAX_CELLS = 150;
|
|
16060
16060
|
var cellDegreeSize = getCellSizeFromHeight(viewRect.alt);
|
|
16061
|
+
// console.log("cell size", cellDegreeSize, "height", viewRect.alt);
|
|
16061
16062
|
var curMinLon = floorValueToCellSize(cellDegreeSize, minLon);
|
|
16062
16063
|
var curMinLat = floorValueToCellSize(cellDegreeSize, minLat);
|
|
16063
16064
|
// For larger views we add additional padding because our view-area culling is too strong.
|
|
@@ -16114,39 +16115,45 @@ function getCellSizeFromHeight(height) {
|
|
|
16114
16115
|
return 0.01;
|
|
16115
16116
|
}
|
|
16116
16117
|
if (height < 5000) {
|
|
16117
|
-
return 0.
|
|
16118
|
+
return 0.05;
|
|
16118
16119
|
}
|
|
16119
16120
|
else if (height < 10000) {
|
|
16120
16121
|
return 0.05;
|
|
16121
16122
|
}
|
|
16122
16123
|
else if (height < 30000) {
|
|
16123
|
-
return 0.
|
|
16124
|
+
return 0.2;
|
|
16124
16125
|
}
|
|
16125
16126
|
else if (height < 70000) {
|
|
16126
16127
|
return 0.2;
|
|
16127
16128
|
}
|
|
16128
16129
|
else if (height < 100000) {
|
|
16129
|
-
return 0.
|
|
16130
|
+
return 0.5;
|
|
16130
16131
|
}
|
|
16131
16132
|
else if (height < 150000) {
|
|
16132
|
-
return 0.
|
|
16133
|
+
return 0.5;
|
|
16133
16134
|
}
|
|
16134
16135
|
else if (height < 200000) {
|
|
16135
|
-
return
|
|
16136
|
+
return 1.5;
|
|
16136
16137
|
}
|
|
16137
16138
|
else if (height < 300000) {
|
|
16138
|
-
return
|
|
16139
|
+
return 1.5;
|
|
16139
16140
|
}
|
|
16140
16141
|
else if (height < 500000) {
|
|
16141
|
-
return
|
|
16142
|
+
return 3;
|
|
16142
16143
|
}
|
|
16143
16144
|
else if (height < 1000000) {
|
|
16144
|
-
return
|
|
16145
|
+
return 3;
|
|
16145
16146
|
}
|
|
16146
16147
|
else if (height < 1200000) {
|
|
16147
|
-
return
|
|
16148
|
+
return 4;
|
|
16149
|
+
}
|
|
16150
|
+
else if (height < 2000000) {
|
|
16151
|
+
return 6;
|
|
16152
|
+
}
|
|
16153
|
+
else if (height < 3000000) {
|
|
16154
|
+
return 20;
|
|
16148
16155
|
}
|
|
16149
|
-
return
|
|
16156
|
+
return 35;
|
|
16150
16157
|
}
|
|
16151
16158
|
function isCellFetched(cell) {
|
|
16152
16159
|
if (cell.Fetched) {
|
|
@@ -16475,14 +16482,14 @@ var EntityFilterGetter;
|
|
|
16475
16482
|
return __generator(this, function (_j) {
|
|
16476
16483
|
switch (_j.label) {
|
|
16477
16484
|
case 0:
|
|
16478
|
-
//
|
|
16479
|
-
//
|
|
16480
|
-
//
|
|
16481
|
-
return [4 /*yield*/, delay(
|
|
16485
|
+
// Larger initial delay for the first loops because terrain is likely loading in.
|
|
16486
|
+
// We also delay because if we enable 50 Menu Items at the same time, common requests we be made if we wait a bit.
|
|
16487
|
+
// Eg: same entity type will be grouped into the same filter getter instance.
|
|
16488
|
+
return [4 /*yield*/, delay(loopId <= 3 ? 800 : 300)];
|
|
16482
16489
|
case 1:
|
|
16483
|
-
//
|
|
16484
|
-
//
|
|
16485
|
-
//
|
|
16490
|
+
// Larger initial delay for the first loops because terrain is likely loading in.
|
|
16491
|
+
// We also delay because if we enable 50 Menu Items at the same time, common requests we be made if we wait a bit.
|
|
16492
|
+
// Eg: same entity type will be grouped into the same filter getter instance.
|
|
16486
16493
|
_j.sent();
|
|
16487
16494
|
MIN_HEIGHT = this.minHeight;
|
|
16488
16495
|
MAX_HEIGHT = this.maxHeight;
|
|
@@ -28071,7 +28078,7 @@ var WidgetViewBar = /** @class */ (function (_super) {
|
|
|
28071
28078
|
return WidgetViewBar;
|
|
28072
28079
|
}(Widget.AWidget));
|
|
28073
28080
|
|
|
28074
|
-
var VERSION = "4.6.
|
|
28081
|
+
var VERSION = "4.6.4";
|
|
28075
28082
|
|
|
28076
28083
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, 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, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar, WidgetControlViewBar, WidgetControlViewBarSearch, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
|
|
28077
28084
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|