bruce-cesium 4.5.7 → 4.6.0
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 +84 -25
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +85 -23
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +2 -1
- package/dist/lib/bruce-cesium.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-osm-render-manager.js +44 -14
- package/dist/lib/rendering/render-managers/tilesets/tileset-osm-render-manager.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js +30 -1
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/lib/utils/drawing-utils.js +3 -3
- package/dist/lib/utils/drawing-utils.js.map +1 -1
- package/dist/lib/utils/entity-utils.js +1 -1
- package/dist/lib/utils/entity-utils.js.map +1 -1
- package/dist/lib/widgets/widget-view-bar.js +3 -3
- package/dist/lib/widgets/widget-view-bar.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +2 -1
- package/dist/types/rendering/visuals-register.d.ts +1 -0
- package/dist/types/utils/drawing-utils.d.ts +2 -2
- package/dist/types/widgets/widget-view-bar.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,
|
|
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, Camera, EntityAttribute, EntityAttachment, EntityAttachmentType, AbstractApi, Session } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic,
|
|
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, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, Cesium3DTileset, CesiumInspector, ClockRange, Matrix4, Matrix3, IonResource, BoundingSphere, GeometryInstance, PolygonPipeline, 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.
|
|
@@ -611,13 +611,13 @@ var DrawingUtils;
|
|
|
611
611
|
/**
|
|
612
612
|
* Returns the point across a polyline at a given distance.
|
|
613
613
|
* If the distance exceeds the length of the line, the point will be placed at the end of the line.
|
|
614
|
-
* @param viewer
|
|
614
|
+
* @param viewer deprecated, unused.
|
|
615
615
|
* @param positions
|
|
616
616
|
* @param distance
|
|
617
617
|
* @returns
|
|
618
618
|
*/
|
|
619
619
|
function PointAcrossPolyline(params) {
|
|
620
|
-
var
|
|
620
|
+
var positions = params.posses, distance = params.distance;
|
|
621
621
|
if (distance <= 0 && positions.length > 0) {
|
|
622
622
|
return {
|
|
623
623
|
point: positions[0]
|
|
@@ -638,7 +638,7 @@ var DrawingUtils;
|
|
|
638
638
|
if (length_1 + currentDistance >= distance) {
|
|
639
639
|
var carto1 = Cartographic.fromCartesian(positions[i]);
|
|
640
640
|
var carto2 = Cartographic.fromCartesian(positions[i + 1]);
|
|
641
|
-
var geodesic = new EllipsoidGeodesic(carto1, carto2
|
|
641
|
+
var geodesic = new EllipsoidGeodesic(carto1, carto2);
|
|
642
642
|
//const position = geodesic.interpolateUsingSurfaceDistance(distance - currentDistance);
|
|
643
643
|
var position = geodesic.interpolateUsingFraction((distance - currentDistance) / length_1);
|
|
644
644
|
var height = (carto1.height + carto2.height) / 2;
|
|
@@ -3343,7 +3343,7 @@ var EntityUtils;
|
|
|
3343
3343
|
if (selectable == null) {
|
|
3344
3344
|
selectable = false;
|
|
3345
3345
|
}
|
|
3346
|
-
if (entity instanceof Entity) {
|
|
3346
|
+
if (entity instanceof Entity || entity instanceof Cesium3DTileFeature) {
|
|
3347
3347
|
var cEntity = entity;
|
|
3348
3348
|
var items = [];
|
|
3349
3349
|
traverseEntity(cEntity, items, false, editable, selectable);
|
|
@@ -9996,12 +9996,25 @@ function updateEntityShow(viewer, rego, show) {
|
|
|
9996
9996
|
}
|
|
9997
9997
|
else if (visual instanceof Cesium3DTileFeature) {
|
|
9998
9998
|
// No way to tell if changing show will crash it!
|
|
9999
|
+
// ^ We need to improve removing visuals from the register when tiles unload to avoid this :)
|
|
9999
10000
|
try {
|
|
10000
10001
|
visual.show = show;
|
|
10001
10002
|
}
|
|
10002
10003
|
catch (e) {
|
|
10003
10004
|
console.error(e);
|
|
10004
10005
|
}
|
|
10006
|
+
var ent = visual;
|
|
10007
|
+
if (ent._siblingGraphics) {
|
|
10008
|
+
for (var i = 0; i < ent._siblingGraphics.length; i++) {
|
|
10009
|
+
try {
|
|
10010
|
+
var sibling = ent._siblingGraphics[i];
|
|
10011
|
+
sibling.show = show;
|
|
10012
|
+
}
|
|
10013
|
+
catch (e) {
|
|
10014
|
+
console.error(e);
|
|
10015
|
+
}
|
|
10016
|
+
}
|
|
10017
|
+
}
|
|
10005
10018
|
}
|
|
10006
10019
|
}
|
|
10007
10020
|
function updateEntity(viewer, entityId, register) {
|
|
@@ -10077,6 +10090,14 @@ function markEntity(register, rego, visual, ignoreParent) {
|
|
|
10077
10090
|
}
|
|
10078
10091
|
}
|
|
10079
10092
|
}
|
|
10093
|
+
else if (visual instanceof Cesium3DTileFeature) {
|
|
10094
|
+
var visEnt = visual;
|
|
10095
|
+
if (visEnt._siblingGraphics) {
|
|
10096
|
+
for (var i = 0; i < visEnt._siblingGraphics.length; i++) {
|
|
10097
|
+
markEntity(register, rego, visEnt._siblingGraphics[i], true);
|
|
10098
|
+
}
|
|
10099
|
+
}
|
|
10100
|
+
}
|
|
10080
10101
|
}
|
|
10081
10102
|
function unmarkEntity(visual, ignoreParent) {
|
|
10082
10103
|
var vis = visual;
|
|
@@ -10092,6 +10113,14 @@ function unmarkEntity(visual, ignoreParent) {
|
|
|
10092
10113
|
}
|
|
10093
10114
|
}
|
|
10094
10115
|
}
|
|
10116
|
+
else if (visual instanceof Cesium3DTileFeature) {
|
|
10117
|
+
var visEnt = visual;
|
|
10118
|
+
if (visEnt._siblingGraphics) {
|
|
10119
|
+
for (var i = 0; i < visEnt._siblingGraphics.length; i++) {
|
|
10120
|
+
unmarkEntity(visEnt._siblingGraphics[i], true);
|
|
10121
|
+
}
|
|
10122
|
+
}
|
|
10123
|
+
}
|
|
10095
10124
|
}
|
|
10096
10125
|
/**
|
|
10097
10126
|
* Manages a registry of all Bruce visuals being rendered by menu items.
|
|
@@ -10542,7 +10571,7 @@ var VisualsRegister;
|
|
|
10542
10571
|
// ND-2078
|
|
10543
10572
|
// Tilesets will often add -> remove -> add because of how tiles load in and out of the scene.
|
|
10544
10573
|
// To avoid flickering, we'll just replace rather than remove -> add.
|
|
10545
|
-
if (!rego.tilesetId) {
|
|
10574
|
+
if (!rego.tilesetId && params.removePrior != false) {
|
|
10546
10575
|
this.RemoveRegos({
|
|
10547
10576
|
entityId: rego.entityId,
|
|
10548
10577
|
menuItemId: rego.menuItemId,
|
|
@@ -16935,7 +16964,7 @@ var TilesetOsmRenderManager;
|
|
|
16935
16964
|
};
|
|
16936
16965
|
Manager.prototype.mapTileBatch = function (features) {
|
|
16937
16966
|
return __awaiter(this, void 0, void 0, function () {
|
|
16938
|
-
var featureIds, featureMap, _loop_1, this_1, i, api, bIds, i, osmId, bruceId, feature, rego;
|
|
16967
|
+
var featureIds, featureMap, _loop_1, this_1, i, api, bIds, i, osmId, bruceId, feature, rego, visual;
|
|
16939
16968
|
return __generator(this, function (_a) {
|
|
16940
16969
|
switch (_a.label) {
|
|
16941
16970
|
case 0:
|
|
@@ -16975,22 +17004,52 @@ var TilesetOsmRenderManager;
|
|
|
16975
17004
|
if (this.item.ghostLoading == true) {
|
|
16976
17005
|
feature.color = feature._orgColor;
|
|
16977
17006
|
}
|
|
16978
|
-
rego =
|
|
16979
|
-
|
|
16980
|
-
|
|
16981
|
-
|
|
16982
|
-
|
|
16983
|
-
|
|
16984
|
-
|
|
16985
|
-
|
|
16986
|
-
|
|
16987
|
-
|
|
16988
|
-
|
|
16989
|
-
|
|
17007
|
+
rego = this._loadedCesiumEntities[bruceId];
|
|
17008
|
+
// Rego already exists, we'll add this graphic as a sibling.
|
|
17009
|
+
if (rego) {
|
|
17010
|
+
if (!rego.visual) {
|
|
17011
|
+
// No parent graphic.
|
|
17012
|
+
rego.visual = feature;
|
|
17013
|
+
}
|
|
17014
|
+
else if (rego.visual == feature) {
|
|
17015
|
+
// Same graphic.
|
|
17016
|
+
continue;
|
|
17017
|
+
}
|
|
17018
|
+
else {
|
|
17019
|
+
visual = rego.visual;
|
|
17020
|
+
// Sibling graphic.
|
|
17021
|
+
if (!visual._siblingGraphics) {
|
|
17022
|
+
visual._siblingGraphics = [];
|
|
17023
|
+
}
|
|
17024
|
+
if (visual._siblingGraphics.indexOf(feature) < 0) {
|
|
17025
|
+
visual._siblingGraphics.push(feature);
|
|
17026
|
+
}
|
|
17027
|
+
// Already exists.
|
|
17028
|
+
else {
|
|
17029
|
+
continue;
|
|
17030
|
+
}
|
|
17031
|
+
}
|
|
17032
|
+
}
|
|
17033
|
+
// Doesn't exist. Create a rego.
|
|
17034
|
+
else {
|
|
17035
|
+
rego = {
|
|
17036
|
+
entityId: bruceId,
|
|
17037
|
+
menuItemId: this.item.id,
|
|
17038
|
+
menuItemType: this.item.Type,
|
|
17039
|
+
priority: 0,
|
|
17040
|
+
visual: feature,
|
|
17041
|
+
entityTypeId: this.entityTypeId,
|
|
17042
|
+
sourceEntityId: osmId,
|
|
17043
|
+
accountId: this.getters.GetAccountId()
|
|
17044
|
+
};
|
|
17045
|
+
if (this.sourceId) {
|
|
17046
|
+
rego.sourceId = this.sourceId;
|
|
17047
|
+
}
|
|
16990
17048
|
}
|
|
16991
17049
|
this.visualsManager.AddRego({
|
|
16992
17050
|
rego: rego,
|
|
16993
|
-
requestRender: false
|
|
17051
|
+
requestRender: false,
|
|
17052
|
+
removePrior: false
|
|
16994
17053
|
});
|
|
16995
17054
|
this._loadedCesiumEntities[bruceId] = rego;
|
|
16996
17055
|
}
|
|
@@ -27571,7 +27630,7 @@ function isLatLon(text) {
|
|
|
27571
27630
|
return true;
|
|
27572
27631
|
}
|
|
27573
27632
|
|
|
27574
|
-
var
|
|
27633
|
+
var VIEWER_VIEW_BAR_WIDGET_KEY = "_viewerViewBarWidget";
|
|
27575
27634
|
var WidgetViewBar = /** @class */ (function (_super) {
|
|
27576
27635
|
__extends(WidgetViewBar, _super);
|
|
27577
27636
|
function WidgetViewBar(params) {
|
|
@@ -27585,7 +27644,7 @@ var WidgetViewBar = /** @class */ (function (_super) {
|
|
|
27585
27644
|
_this.customControls = new Map();
|
|
27586
27645
|
_this._generateStyles();
|
|
27587
27646
|
_this._generateElement();
|
|
27588
|
-
_this._viewer[
|
|
27647
|
+
_this._viewer[VIEWER_VIEW_BAR_WIDGET_KEY] = _this;
|
|
27589
27648
|
return _this;
|
|
27590
27649
|
}
|
|
27591
27650
|
// Getters for protected properties so that controls can access them.
|
|
@@ -27780,7 +27839,7 @@ var WidgetViewBar = /** @class */ (function (_super) {
|
|
|
27780
27839
|
return WidgetViewBar;
|
|
27781
27840
|
}(Widget.AWidget));
|
|
27782
27841
|
|
|
27783
|
-
var VERSION = "4.
|
|
27842
|
+
var VERSION = "4.6.0";
|
|
27784
27843
|
|
|
27785
|
-
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,
|
|
27844
|
+
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 };
|
|
27786
27845
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|