bruce-cesium 5.7.2 → 5.7.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 +46 -20
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +43 -17
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine-model3d.js +1 -1
- package/dist/lib/rendering/entity-render-engine-model3d.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-point.js +1 -1
- package/dist/lib/rendering/entity-render-engine-point.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-polygon.js +1 -1
- package/dist/lib/rendering/entity-render-engine-polygon.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-polyline.js +1 -1
- package/dist/lib/rendering/entity-render-engine-polyline.js.map +1 -1
- package/dist/lib/rendering/relation-render-engine.js +1 -1
- package/dist/lib/rendering/relation-render-engine.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js +29 -4
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-loaded-render-manager.js +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-loaded-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-arb-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js +9 -4
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-entities-render-manager.js +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/tileset-styler.js +3 -3
- package/dist/lib/rendering/tileset-styler.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/tileset-styler.d.ts +2 -2
- package/package.json +2 -2
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, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, ColorBlendMode, HeadingPitchRoll, Transforms, Model, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, OrthographicFrustum, EasingFunction, NearFarScalar, SceneTransforms, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, IonResource, CesiumInspector, defined, ClockRange, Cesium3DTileset, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
const TIME_LAG = 300;
|
|
6
6
|
const POSITION_CHECK_TIMER = 950;
|
|
@@ -6120,7 +6120,7 @@ async function getName(api, entity) {
|
|
|
6120
6120
|
}
|
|
6121
6121
|
async function getStyle(api, entity, styleId) {
|
|
6122
6122
|
let style = null;
|
|
6123
|
-
if (styleId) {
|
|
6123
|
+
if (styleId && styleId != -1) {
|
|
6124
6124
|
try {
|
|
6125
6125
|
style = (await Style.Get({
|
|
6126
6126
|
api,
|
|
@@ -7405,7 +7405,7 @@ async function getName$1(api, entity) {
|
|
|
7405
7405
|
}
|
|
7406
7406
|
async function getStyle$1(api, entity, styleId) {
|
|
7407
7407
|
let style = null;
|
|
7408
|
-
if (styleId) {
|
|
7408
|
+
if (styleId && styleId != -1) {
|
|
7409
7409
|
try {
|
|
7410
7410
|
style = (await Style.Get({
|
|
7411
7411
|
api,
|
|
@@ -7813,7 +7813,7 @@ async function getName$2(api, entity) {
|
|
|
7813
7813
|
}
|
|
7814
7814
|
async function getStyle$2(api, entity, styleId) {
|
|
7815
7815
|
let style = null;
|
|
7816
|
-
if (styleId) {
|
|
7816
|
+
if (styleId && styleId != -1) {
|
|
7817
7817
|
try {
|
|
7818
7818
|
style = (await Style.Get({
|
|
7819
7819
|
api,
|
|
@@ -8282,7 +8282,7 @@ async function getName$3(api, entity) {
|
|
|
8282
8282
|
}
|
|
8283
8283
|
async function getStyle$3(api, entity, styleId) {
|
|
8284
8284
|
let style = null;
|
|
8285
|
-
if (styleId) {
|
|
8285
|
+
if (styleId && styleId != -1) {
|
|
8286
8286
|
try {
|
|
8287
8287
|
style = (await Style.Get({
|
|
8288
8288
|
api,
|
|
@@ -9351,7 +9351,7 @@ function colorToCColor(color) {
|
|
|
9351
9351
|
}
|
|
9352
9352
|
async function getStyle$4(api, typeId, styleId) {
|
|
9353
9353
|
let style = null;
|
|
9354
|
-
if (styleId) {
|
|
9354
|
+
if (styleId && styleId != -1) {
|
|
9355
9355
|
try {
|
|
9356
9356
|
style = (await Style.Get({
|
|
9357
9357
|
api,
|
|
@@ -13450,7 +13450,7 @@ var EntitiesRenderManager;
|
|
|
13450
13450
|
return;
|
|
13451
13451
|
}
|
|
13452
13452
|
let style = null;
|
|
13453
|
-
if ((zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.StyleID) &&
|
|
13453
|
+
if ((zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.StyleID) && zoomItem.StyleID != -1) {
|
|
13454
13454
|
try {
|
|
13455
13455
|
style = (_a = (await Style.Get({
|
|
13456
13456
|
api: this.apiGetter.getApi(),
|
|
@@ -14359,7 +14359,7 @@ var EntitiesLoadedRenderManager;
|
|
|
14359
14359
|
return;
|
|
14360
14360
|
}
|
|
14361
14361
|
let style = null;
|
|
14362
|
-
if ((zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.StyleID) &&
|
|
14362
|
+
if ((zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.StyleID) && zoomItem.StyleID != -1) {
|
|
14363
14363
|
try {
|
|
14364
14364
|
style = (_a = (await Style.Get({
|
|
14365
14365
|
api: this.apiGetter.getApi(),
|
|
@@ -15049,6 +15049,10 @@ var EntitiesIdsRenderManager;
|
|
|
15049
15049
|
const maxDateTimeStr = this.viewer.clock.stopTime.toString();
|
|
15050
15050
|
const minDateTime = new Date(minDateTimeStr).getTime();
|
|
15051
15051
|
const maxDateTime = new Date(maxDateTimeStr).getTime();
|
|
15052
|
+
const tDetails = ViewUtils.GetTimeDetails({
|
|
15053
|
+
viewer: this.viewer,
|
|
15054
|
+
});
|
|
15055
|
+
const isLive = tDetails.isLive;
|
|
15052
15056
|
let rangesToRequest = [{
|
|
15053
15057
|
start: minDateTime,
|
|
15054
15058
|
stop: maxDateTime
|
|
@@ -15080,10 +15084,14 @@ var EntitiesIdsRenderManager;
|
|
|
15080
15084
|
rangesToRequest = [];
|
|
15081
15085
|
// Check if we need data before our cached range.
|
|
15082
15086
|
if (foundMinDateTime != null && foundMinDateTime > minDateTime) {
|
|
15083
|
-
|
|
15084
|
-
|
|
15085
|
-
|
|
15086
|
-
|
|
15087
|
+
// When live we focus on getting the next range rather than old data.
|
|
15088
|
+
// Ends up being one less request to perform every second.
|
|
15089
|
+
if (!isLive || foundMinDateTime == null) {
|
|
15090
|
+
rangesToRequest.push({
|
|
15091
|
+
start: minDateTime,
|
|
15092
|
+
stop: new Date(foundMinDateTime).getTime()
|
|
15093
|
+
});
|
|
15094
|
+
}
|
|
15087
15095
|
}
|
|
15088
15096
|
// Check if we need data after our cached range.
|
|
15089
15097
|
if (foundMaxDateTime != null && foundMaxDateTime < maxDateTime) {
|
|
@@ -15092,6 +15100,20 @@ var EntitiesIdsRenderManager;
|
|
|
15092
15100
|
stop: maxDateTime
|
|
15093
15101
|
});
|
|
15094
15102
|
}
|
|
15103
|
+
// If the ranges to request are within a tolerance, combine them.
|
|
15104
|
+
if (rangesToRequest.length > 1) {
|
|
15105
|
+
const TOLERANCE_MS = 60000; // 1 minute.
|
|
15106
|
+
let currentRange = rangesToRequest[0];
|
|
15107
|
+
for (let i = 1; i < rangesToRequest.length; i++) {
|
|
15108
|
+
const nextRange = rangesToRequest[i];
|
|
15109
|
+
if (nextRange.start - currentRange.stop <= TOLERANCE_MS) {
|
|
15110
|
+
currentRange.stop = nextRange.stop;
|
|
15111
|
+
}
|
|
15112
|
+
else {
|
|
15113
|
+
currentRange = nextRange;
|
|
15114
|
+
}
|
|
15115
|
+
}
|
|
15116
|
+
}
|
|
15095
15117
|
}
|
|
15096
15118
|
const entityIds = entities.map(x => x.Bruce.ID);
|
|
15097
15119
|
const combined = { ...this.entitiesHistoric };
|
|
@@ -15871,7 +15893,7 @@ class TilesetStyler {
|
|
|
15871
15893
|
}
|
|
15872
15894
|
}
|
|
15873
15895
|
}
|
|
15874
|
-
if (
|
|
15896
|
+
if (params.fallbackStyleId != null && params.fallbackStyleId != undefined && params.fallbackStyleId != "") {
|
|
15875
15897
|
this.fallbackStyleId = params.fallbackStyleId;
|
|
15876
15898
|
}
|
|
15877
15899
|
if (params.fallbackStyle) {
|
|
@@ -15992,7 +16014,7 @@ class TilesetStyler {
|
|
|
15992
16014
|
this.entityGatherer.Empty();
|
|
15993
16015
|
this.entityGatherer.Init(this.historic, this.expandSources);
|
|
15994
16016
|
let fallbackStyleId = this.fallbackStyleId;
|
|
15995
|
-
if (fallbackStyleId && fallbackStyleId
|
|
16017
|
+
if (fallbackStyleId && fallbackStyleId != -1) {
|
|
15996
16018
|
try {
|
|
15997
16019
|
let { style: data } = await Style.Get({
|
|
15998
16020
|
api: this.api,
|
|
@@ -16081,7 +16103,7 @@ class TilesetStyler {
|
|
|
16081
16103
|
console.error(e);
|
|
16082
16104
|
}
|
|
16083
16105
|
}
|
|
16084
|
-
if (styleId) {
|
|
16106
|
+
if (styleId && styleId != -1) {
|
|
16085
16107
|
try {
|
|
16086
16108
|
let { style: data } = await Style.Get({
|
|
16087
16109
|
api: this.api,
|
|
@@ -17822,7 +17844,7 @@ var SharedGetters;
|
|
|
17822
17844
|
* CAD tilesets are referred to as "MODEL" tilesets in some other areas of Bruce code.
|
|
17823
17845
|
*/
|
|
17824
17846
|
var TilesetCadRenderManager;
|
|
17825
|
-
(function (TilesetCadRenderManager
|
|
17847
|
+
(function (TilesetCadRenderManager) {
|
|
17826
17848
|
class Manager {
|
|
17827
17849
|
get Disposed() {
|
|
17828
17850
|
return this.disposed;
|
|
@@ -18399,8 +18421,12 @@ var TilesetCadRenderManager;
|
|
|
18399
18421
|
maxDateTime <= foundMaxDateTime) {
|
|
18400
18422
|
return;
|
|
18401
18423
|
}
|
|
18424
|
+
const tDetails = ViewUtils.GetTimeDetails({
|
|
18425
|
+
viewer: this.viewer,
|
|
18426
|
+
});
|
|
18427
|
+
const isLive = tDetails.isLive;
|
|
18402
18428
|
// See if the requested range is before or after the range we have.
|
|
18403
|
-
const fetchBefore = !foundMinDateTime || minDateTime < foundMinDateTime;
|
|
18429
|
+
const fetchBefore = !foundMinDateTime || (!isLive && minDateTime < foundMinDateTime);
|
|
18404
18430
|
const fetchAfter = !foundMaxDateTime || maxDateTime > foundMaxDateTime;
|
|
18405
18431
|
if (!fetchBefore && !fetchAfter) {
|
|
18406
18432
|
// Already have the data we need.
|
|
@@ -18591,7 +18617,7 @@ var TilesetCadRenderManager;
|
|
|
18591
18617
|
this.viewer.scene.requestRender();
|
|
18592
18618
|
}
|
|
18593
18619
|
}
|
|
18594
|
-
TilesetCadRenderManager
|
|
18620
|
+
TilesetCadRenderManager.Manager = Manager;
|
|
18595
18621
|
})(TilesetCadRenderManager || (TilesetCadRenderManager = {}));
|
|
18596
18622
|
|
|
18597
18623
|
var DataLabRenderManager;
|
|
@@ -19224,7 +19250,7 @@ var TilesetEntitiesRenderManager;
|
|
|
19224
19250
|
viewer: this.viewer,
|
|
19225
19251
|
api: api,
|
|
19226
19252
|
cTileset: this.cTileset,
|
|
19227
|
-
fallbackStyleId:
|
|
19253
|
+
fallbackStyleId: this.item.styleId,
|
|
19228
19254
|
styleMapping: [],
|
|
19229
19255
|
expandSources: false,
|
|
19230
19256
|
menuItemId: this.item.id,
|
|
@@ -32137,7 +32163,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
32137
32163
|
}
|
|
32138
32164
|
}
|
|
32139
32165
|
|
|
32140
|
-
const VERSION = "5.7.
|
|
32166
|
+
const VERSION = "5.7.4";
|
|
32141
32167
|
|
|
32142
32168
|
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 };
|
|
32143
32169
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|