bruce-cesium 4.7.0 → 4.7.1
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 +48 -4
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +46 -2
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +45 -1
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/tileset-render-engine.d.ts +8 -1
- package/package.json +2 -2
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, Camera, ProjectViewLegacyTile, AbstractApi, EntityAttribute, EntityAttachment, EntityAttachmentType
|
|
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, Entity, DistanceDisplayCondition,
|
|
3
|
+
import { Cartographic, JulianDate, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, HorizontalOrigin, VerticalOrigin, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidTerrainProvider, CesiumInspector, defined, ClockRange, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, Quaternion, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -15029,6 +15029,11 @@ var TilesetRenderEngine;
|
|
|
15029
15029
|
this.runningQueues = 0;
|
|
15030
15030
|
this.recordLoadQueue = [];
|
|
15031
15031
|
this.recordCheckQueue = [];
|
|
15032
|
+
// % progress for how many Entities have been styled so far.
|
|
15033
|
+
// This can change as Tiles load in and more queue.
|
|
15034
|
+
this._styleProgress = 0;
|
|
15035
|
+
// Event for when the style progress changes.
|
|
15036
|
+
this.OnStyleProgress = new BruceEvent();
|
|
15032
15037
|
this.viewer = viewer;
|
|
15033
15038
|
this.api = api;
|
|
15034
15039
|
this.cTileset = cTileset;
|
|
@@ -15061,6 +15066,13 @@ var TilesetRenderEngine;
|
|
|
15061
15066
|
enumerable: false,
|
|
15062
15067
|
configurable: true
|
|
15063
15068
|
});
|
|
15069
|
+
Object.defineProperty(Styler.prototype, "StyleProgress", {
|
|
15070
|
+
get: function () {
|
|
15071
|
+
return this._styleProgress;
|
|
15072
|
+
},
|
|
15073
|
+
enumerable: false,
|
|
15074
|
+
configurable: true
|
|
15075
|
+
});
|
|
15064
15076
|
/**
|
|
15065
15077
|
* Updates style mapping and fallback style.
|
|
15066
15078
|
* This will trigger a re-style of all entities, and will stop existing style loads.
|
|
@@ -15217,9 +15229,35 @@ var TilesetRenderEngine;
|
|
|
15217
15229
|
});
|
|
15218
15230
|
};
|
|
15219
15231
|
Styler.prototype.getEntityIdsForQueue = function () {
|
|
15220
|
-
var BATCH_SIZE = this.expandSources ?
|
|
15232
|
+
var BATCH_SIZE = this.expandSources ? 100 : 500;
|
|
15221
15233
|
return this.recordLoadQueue.splice(0, BATCH_SIZE);
|
|
15222
15234
|
};
|
|
15235
|
+
/**
|
|
15236
|
+
* Calculates the current progress % and updates the progress if there is a change.
|
|
15237
|
+
*/
|
|
15238
|
+
Styler.prototype.updateStyleProgress = function () {
|
|
15239
|
+
var _this = this;
|
|
15240
|
+
var progress = 100; // Done when idling.
|
|
15241
|
+
if (this.recordCheckQueue.length || this.recordLoadQueue.length) {
|
|
15242
|
+
var total = Object.keys(this.styledEntityIds).length;
|
|
15243
|
+
var done = Object.keys(this.styledEntityIds).filter(function (x) { return _this.styledEntityIds[x]; }).length;
|
|
15244
|
+
progress = Math.round((done / total) * 100);
|
|
15245
|
+
// Round to 2dp, 0, or 100.
|
|
15246
|
+
if (progress < 0) {
|
|
15247
|
+
progress = 0;
|
|
15248
|
+
}
|
|
15249
|
+
else if (progress < 100) {
|
|
15250
|
+
progress = Math.round(progress * 100) / 100;
|
|
15251
|
+
}
|
|
15252
|
+
else if (progress > 100) {
|
|
15253
|
+
progress = 100;
|
|
15254
|
+
}
|
|
15255
|
+
}
|
|
15256
|
+
if (this._styleProgress != progress) {
|
|
15257
|
+
this._styleProgress = progress;
|
|
15258
|
+
this.OnStyleProgress.Trigger(progress);
|
|
15259
|
+
}
|
|
15260
|
+
};
|
|
15223
15261
|
Styler.prototype.getEntityRego = function (entityId) {
|
|
15224
15262
|
return this.register.GetRego({
|
|
15225
15263
|
entityId: entityId,
|
|
@@ -15487,6 +15525,11 @@ var TilesetRenderEngine;
|
|
|
15487
15525
|
});
|
|
15488
15526
|
};
|
|
15489
15527
|
Styler.prototype.queueTilesetFeatureStyle = function (entity, highPriority) {
|
|
15528
|
+
// Add to the style dict if not already there.
|
|
15529
|
+
// This helps us know the styling progress for things that have loaded in so far.
|
|
15530
|
+
if (!this.styledEntityIds[entity.entityId]) {
|
|
15531
|
+
this.styledEntityIds[entity.entityId] = null;
|
|
15532
|
+
}
|
|
15490
15533
|
if (this.styleMappingLoaded || this.styleMappingsLoaded[entity.entityTypeId] == true) {
|
|
15491
15534
|
var needsData = this.getTilesetFeatureNeedsFullData(entity.entityId, entity.entityTypeId);
|
|
15492
15535
|
if (needsData) {
|
|
@@ -15532,6 +15575,7 @@ var TilesetRenderEngine;
|
|
|
15532
15575
|
override: this.styledEntityIds[entity.entityId] == true
|
|
15533
15576
|
});
|
|
15534
15577
|
this.styledEntityIds[entity.entityId] = true;
|
|
15578
|
+
this.updateStyleProgress();
|
|
15535
15579
|
};
|
|
15536
15580
|
Styler.prototype.getTilesetFeatureStyle = function (entityId, entityTypeId) {
|
|
15537
15581
|
var _a, _b, _c, _d;
|
|
@@ -28232,7 +28276,7 @@ var WidgetViewBar = /** @class */ (function (_super) {
|
|
|
28232
28276
|
return WidgetViewBar;
|
|
28233
28277
|
}(Widget.AWidget));
|
|
28234
28278
|
|
|
28235
|
-
var VERSION = "4.7.
|
|
28279
|
+
var VERSION = "4.7.1";
|
|
28236
28280
|
|
|
28237
28281
|
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 };
|
|
28238
28282
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|