bruce-cesium 5.7.3 → 5.7.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 +66 -13
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +62 -9
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +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/tilesets/tileset-cad-render-manager.js +40 -7
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/render-managers/tilesets/tileset-cad-render-manager.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, 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,
|
|
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, AbstractApi, Session, EntityAttachment, EntityAttachmentType, EntityAttribute } 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, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, HeadingPitchRange, Cesium3DTileStyle, KmlDataSource, Cesium3DTileColorBlendMode, Ion, Quaternion, Matrix3, Matrix4, OrthographicFrustum, EasingFunction, NearFarScalar, SceneTransforms, EllipsoidTerrainProvider, CesiumInspector, defined, ClockRange, PolygonPipeline, Cesium3DTileset, IonResource, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, BoundingSphere, GeometryInstance, EllipsoidGeodesic, sampleTerrainMostDetailed, 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;
|
|
@@ -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 };
|
|
@@ -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;
|
|
@@ -17856,7 +17878,7 @@ var TilesetCadRenderManager;
|
|
|
17856
17878
|
// Callback to dispose the link between scene time and the root's historic position.
|
|
17857
17879
|
this.viewerDateTimeChangeRemoval = null;
|
|
17858
17880
|
// Series of points to help interpolate movement when the timeline changes.
|
|
17859
|
-
this.
|
|
17881
|
+
this.historicPossesInitialLoaded = false;
|
|
17860
17882
|
this.historicAnimation = null;
|
|
17861
17883
|
this.historicPossesLoadingProm = null;
|
|
17862
17884
|
const { viewer, register: visualsManager, getters, item, modelSpace } = params;
|
|
@@ -18392,15 +18414,19 @@ var TilesetCadRenderManager;
|
|
|
18392
18414
|
const foundMinDateTime = (range === null || range === void 0 ? void 0 : range.minDate) ? range.minDate.getTime() : null;
|
|
18393
18415
|
const foundMaxDateTime = (range === null || range === void 0 ? void 0 : range.maxDate) ? range.maxDate.getTime() : null;
|
|
18394
18416
|
// See if the current range is within the range we already have.
|
|
18395
|
-
if (this.
|
|
18417
|
+
if (this.historicPossesInitialLoaded &&
|
|
18396
18418
|
foundMinDateTime &&
|
|
18397
18419
|
foundMaxDateTime &&
|
|
18398
18420
|
minDateTime >= foundMinDateTime &&
|
|
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.
|
|
@@ -18470,7 +18496,34 @@ var TilesetCadRenderManager;
|
|
|
18470
18496
|
res(false);
|
|
18471
18497
|
return;
|
|
18472
18498
|
}
|
|
18473
|
-
|
|
18499
|
+
// Also request the current position in case its not in the range.
|
|
18500
|
+
const { entity } = await Entity$1.Get({
|
|
18501
|
+
entityId: this.rootId,
|
|
18502
|
+
historicPoint: this.viewer.clock.currentTime.toString(),
|
|
18503
|
+
api: api
|
|
18504
|
+
});
|
|
18505
|
+
if (this.disposed || !entity) {
|
|
18506
|
+
res(false);
|
|
18507
|
+
return;
|
|
18508
|
+
}
|
|
18509
|
+
const historicDetails = entity.Bruce.Outline ? entity.Bruce.Outline.find(x => !!x.DateTime) : null;
|
|
18510
|
+
if (historicDetails) {
|
|
18511
|
+
const pos3d = EntityUtils.GetPos({
|
|
18512
|
+
entity: entity,
|
|
18513
|
+
viewer: this.viewer,
|
|
18514
|
+
recordHeightRef: HeightReference.NONE,
|
|
18515
|
+
returnHeightRef: HeightReference.CLAMP_TO_GROUND,
|
|
18516
|
+
allowRendered: false
|
|
18517
|
+
});
|
|
18518
|
+
if (pos3d && !isNaN(pos3d.x) && !isNaN(pos3d.y) && !isNaN(pos3d.z)) {
|
|
18519
|
+
positions.push({
|
|
18520
|
+
dateTime: new Date(historicDetails.DateTime),
|
|
18521
|
+
pos3d: pos3d,
|
|
18522
|
+
heading: null
|
|
18523
|
+
});
|
|
18524
|
+
}
|
|
18525
|
+
}
|
|
18526
|
+
this.historicPossesInitialLoaded = true;
|
|
18474
18527
|
res(positions);
|
|
18475
18528
|
}
|
|
18476
18529
|
catch (e) {
|
|
@@ -18591,7 +18644,7 @@ var TilesetCadRenderManager;
|
|
|
18591
18644
|
this.viewer.scene.requestRender();
|
|
18592
18645
|
}
|
|
18593
18646
|
}
|
|
18594
|
-
TilesetCadRenderManager
|
|
18647
|
+
TilesetCadRenderManager.Manager = Manager;
|
|
18595
18648
|
})(TilesetCadRenderManager || (TilesetCadRenderManager = {}));
|
|
18596
18649
|
|
|
18597
18650
|
var DataLabRenderManager;
|
|
@@ -32137,7 +32190,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
32137
32190
|
}
|
|
32138
32191
|
}
|
|
32139
32192
|
|
|
32140
|
-
const VERSION = "5.7.
|
|
32193
|
+
const VERSION = "5.7.5";
|
|
32141
32194
|
|
|
32142
32195
|
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
32196
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|