bruce-cesium 4.0.3 → 4.0.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 +92 -47
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +91 -46
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/getters/entity-filter-getter.js +1 -0
- package/dist/lib/rendering/getters/entity-filter-getter.js.map +1 -1
- package/dist/lib/rendering/relation-render-engine.js +4 -1
- package/dist/lib/rendering/relation-render-engine.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js +2 -1
- 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 +2 -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 +4 -2
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entity-render-manager.js +2 -1
- package/dist/lib/rendering/render-managers/entities/entity-render-manager.js.map +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +63 -33
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/lib/utils/entity-utils.js +10 -5
- package/dist/lib/utils/entity-utils.js.map +1 -1
- package/dist/lib/widgets/widget-info-view.js +2 -1
- package/dist/lib/widgets/widget-info-view.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ProjectViewTile, DelayQueue, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, Api, EntityRelationType, ENVIRONMENT, EntityHistoricData, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, AbstractApi, ProjectViewBookmark, EntityAttachment, EntityAttachmentType, EntityAttribute, ProjectView, ProjectViewLegacyTile, Camera } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, Primitive, Cesium3DTileFeature, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Quaternion, Intersect } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2675,7 +2675,8 @@ var EntityUtils;
|
|
|
2675
2675
|
api: api,
|
|
2676
2676
|
entityId: entityId,
|
|
2677
2677
|
// Not expanding relative positions at first to see if the entity has valid location just by itself.
|
|
2678
|
-
expandLocation: false
|
|
2678
|
+
expandLocation: false,
|
|
2679
|
+
migrated: true
|
|
2679
2680
|
})];
|
|
2680
2681
|
case 4:
|
|
2681
2682
|
entity = (_e.sent()).entity;
|
|
@@ -2703,7 +2704,8 @@ var EntityUtils;
|
|
|
2703
2704
|
api: api,
|
|
2704
2705
|
entityId: entityId,
|
|
2705
2706
|
// We'll be expanding relative positioning and related tilesets now.
|
|
2706
|
-
expandLocation: true
|
|
2707
|
+
expandLocation: true,
|
|
2708
|
+
migrated: true
|
|
2707
2709
|
})];
|
|
2708
2710
|
case 9:
|
|
2709
2711
|
entity = (_e.sent()).entity;
|
|
@@ -3103,7 +3105,8 @@ var EntityUtils;
|
|
|
3103
3105
|
return [4 /*yield*/, Entity$1.Get({
|
|
3104
3106
|
api: api,
|
|
3105
3107
|
entityId: entityId,
|
|
3106
|
-
expandLocation: false
|
|
3108
|
+
expandLocation: false,
|
|
3109
|
+
migrated: true
|
|
3107
3110
|
})];
|
|
3108
3111
|
case 2:
|
|
3109
3112
|
entity = (_e.sent()).entity;
|
|
@@ -3128,7 +3131,8 @@ var EntityUtils;
|
|
|
3128
3131
|
return [4 /*yield*/, Entity$1.Get({
|
|
3129
3132
|
api: api,
|
|
3130
3133
|
entityId: entityId,
|
|
3131
|
-
expandLocation: true
|
|
3134
|
+
expandLocation: true,
|
|
3135
|
+
migrated: true
|
|
3132
3136
|
})];
|
|
3133
3137
|
case 6:
|
|
3134
3138
|
entity = (_e.sent()).entity;
|
|
@@ -3139,7 +3143,8 @@ var EntityUtils;
|
|
|
3139
3143
|
return [4 /*yield*/, Entity$1.Get({
|
|
3140
3144
|
api: api,
|
|
3141
3145
|
entityId: entityId,
|
|
3142
|
-
expandLocation: false
|
|
3146
|
+
expandLocation: false,
|
|
3147
|
+
migrated: true
|
|
3143
3148
|
})];
|
|
3144
3149
|
case 8:
|
|
3145
3150
|
entity = (_e.sent()).entity;
|
|
@@ -7746,19 +7751,22 @@ var RelationRenderEngine;
|
|
|
7746
7751
|
return [4 /*yield*/, Entity$1.Get({
|
|
7747
7752
|
api: api,
|
|
7748
7753
|
entityId: relation["Principal.Entity.ID"],
|
|
7754
|
+
migrated: true
|
|
7749
7755
|
})];
|
|
7750
7756
|
case 3:
|
|
7751
7757
|
fromEntity = (_b.sent()).entity;
|
|
7752
7758
|
return [4 /*yield*/, Entity$1.Get({
|
|
7753
7759
|
api: api,
|
|
7754
7760
|
entityId: relation["Related.Entity.ID"],
|
|
7761
|
+
migrated: true
|
|
7755
7762
|
})];
|
|
7756
7763
|
case 4:
|
|
7757
7764
|
toEntity = (_b.sent()).entity;
|
|
7758
7765
|
if (!relation["Data.Entity.ID"]) return [3 /*break*/, 6];
|
|
7759
7766
|
return [4 /*yield*/, Entity$1.Get({
|
|
7760
7767
|
api: api,
|
|
7761
|
-
entityId: relation["Data.Entity.ID"]
|
|
7768
|
+
entityId: relation["Data.Entity.ID"],
|
|
7769
|
+
migrated: true
|
|
7762
7770
|
})];
|
|
7763
7771
|
case 5:
|
|
7764
7772
|
_a = (_b.sent()).entity;
|
|
@@ -10798,7 +10806,8 @@ var EntitiesRenderManager;
|
|
|
10798
10806
|
entityIds: entityIds,
|
|
10799
10807
|
historicKey: (_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey,
|
|
10800
10808
|
historicPoint: this.viewer.clock.currentTime.toString(),
|
|
10801
|
-
schemaId: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.schemaId
|
|
10809
|
+
schemaId: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.schemaId,
|
|
10810
|
+
migrated: true
|
|
10802
10811
|
})];
|
|
10803
10812
|
case 2:
|
|
10804
10813
|
data = _c.sent();
|
|
@@ -10882,7 +10891,8 @@ var EntitiesRenderManager;
|
|
|
10882
10891
|
entityIds: entityIds,
|
|
10883
10892
|
historicKey: (_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey,
|
|
10884
10893
|
historicPoint: this.viewer.clock.currentTime.toString(),
|
|
10885
|
-
schemaId: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.schemaId
|
|
10894
|
+
schemaId: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.schemaId,
|
|
10895
|
+
migrated: true
|
|
10886
10896
|
})];
|
|
10887
10897
|
case 1:
|
|
10888
10898
|
entities = (_c.sent()).entities;
|
|
@@ -11765,7 +11775,8 @@ var EntitiesLoadedRenderManager;
|
|
|
11765
11775
|
entityIds = ids.splice(0, CHECK_BATCH_SIZE$1);
|
|
11766
11776
|
return [4 /*yield*/, Entity$1.GetListByIds({
|
|
11767
11777
|
api: api,
|
|
11768
|
-
entityIds: entityIds
|
|
11778
|
+
entityIds: entityIds,
|
|
11779
|
+
migrated: true
|
|
11769
11780
|
})];
|
|
11770
11781
|
case 1:
|
|
11771
11782
|
entities = (_a.sent()).entities;
|
|
@@ -12406,7 +12417,8 @@ var EntitiesIdsRenderManager;
|
|
|
12406
12417
|
api = this.apiGetter.getApi();
|
|
12407
12418
|
return [4 /*yield*/, Entity$1.GetListByIds({
|
|
12408
12419
|
api: api,
|
|
12409
|
-
entityIds: entityIds
|
|
12420
|
+
entityIds: entityIds,
|
|
12421
|
+
migrated: true
|
|
12410
12422
|
})];
|
|
12411
12423
|
case 2:
|
|
12412
12424
|
entities = (_a.sent()).entities;
|
|
@@ -12959,7 +12971,8 @@ var EntityRenderManager;
|
|
|
12959
12971
|
api = this.apiGetter.getApi();
|
|
12960
12972
|
return [4 /*yield*/, Entity$1.Get({
|
|
12961
12973
|
api: api,
|
|
12962
|
-
entityId: id
|
|
12974
|
+
entityId: id,
|
|
12975
|
+
migrated: true
|
|
12963
12976
|
})];
|
|
12964
12977
|
case 1:
|
|
12965
12978
|
entity = (_a.sent()).entity;
|
|
@@ -13705,7 +13718,8 @@ var TilesetRenderEngine;
|
|
|
13705
13718
|
if (!(batch.length > 0)) return [3 /*break*/, 5];
|
|
13706
13719
|
return [4 /*yield*/, Entity$1.GetListByIds({
|
|
13707
13720
|
api: this.api,
|
|
13708
|
-
entityIds: batch
|
|
13721
|
+
entityIds: batch,
|
|
13722
|
+
migrated: true
|
|
13709
13723
|
})];
|
|
13710
13724
|
case 2:
|
|
13711
13725
|
entities = (_c.sent()).entities;
|
|
@@ -13786,7 +13800,7 @@ var TilesetRenderEngine;
|
|
|
13786
13800
|
Styler.prototype.loadStyles = function () {
|
|
13787
13801
|
var _a, _b;
|
|
13788
13802
|
return __awaiter(this, void 0, void 0, function () {
|
|
13789
|
-
var counter, fallbackStyleId, data, e_1, styleMapping, modelTree, entityTypeIds, _loop_2, this_2, i, i, styleMap, styleId, entityType, e_2, data, e_3;
|
|
13803
|
+
var counter, fallbackStyleId, data, e_1, styleMapping, modelTree, entityTypeIds, _loop_2, this_2, i, typeMap, typeIds, splits, batchSize, i, batch, entityTypes, i_1, entityType, i, styleMap, styleId, entityType, e_2, data, e_3;
|
|
13790
13804
|
return __generator(this, function (_c) {
|
|
13791
13805
|
switch (_c.label) {
|
|
13792
13806
|
case 0:
|
|
@@ -13845,80 +13859,109 @@ var TilesetRenderEngine;
|
|
|
13845
13859
|
catch (e) {
|
|
13846
13860
|
console.error(e);
|
|
13847
13861
|
}
|
|
13862
|
+
typeMap = new Map();
|
|
13863
|
+
typeIds = styleMapping.map(function (x) { return x.StyleID == -1 || Boolean(x.style) ? null : x.EntityTypeID; }).filter(function (x) { return !!x; });
|
|
13864
|
+
if (!typeIds.length) return [3 /*break*/, 8];
|
|
13865
|
+
splits = Math.ceil(typeIds.length / 50);
|
|
13866
|
+
batchSize = 50;
|
|
13848
13867
|
i = 0;
|
|
13849
13868
|
_c.label = 5;
|
|
13850
13869
|
case 5:
|
|
13851
|
-
if (!(i <
|
|
13870
|
+
if (!(i < splits)) return [3 /*break*/, 8];
|
|
13871
|
+
batch = typeIds.slice(i * batchSize, (i + 1) * batchSize);
|
|
13872
|
+
return [4 /*yield*/, EntityType.GetList({
|
|
13873
|
+
api: this.api,
|
|
13874
|
+
entityTypeIds: batch
|
|
13875
|
+
})];
|
|
13876
|
+
case 6:
|
|
13877
|
+
entityTypes = (_c.sent()).entityTypes;
|
|
13878
|
+
for (i_1 = 0; i_1 < entityTypes.length; i_1++) {
|
|
13879
|
+
entityType = entityTypes[i_1];
|
|
13880
|
+
typeMap.set(entityType.ID, entityType);
|
|
13881
|
+
}
|
|
13882
|
+
_c.label = 7;
|
|
13883
|
+
case 7:
|
|
13884
|
+
i++;
|
|
13885
|
+
return [3 /*break*/, 5];
|
|
13886
|
+
case 8:
|
|
13887
|
+
i = 0;
|
|
13888
|
+
_c.label = 9;
|
|
13889
|
+
case 9:
|
|
13890
|
+
if (!(i < styleMapping.length)) return [3 /*break*/, 21];
|
|
13852
13891
|
if (this.disposed) {
|
|
13853
|
-
return [3 /*break*/,
|
|
13892
|
+
return [3 /*break*/, 21];
|
|
13854
13893
|
}
|
|
13855
13894
|
styleMap = styleMapping[i];
|
|
13856
|
-
if (!(!styleMap.style && styleMap.StyleID != -1)) return [3 /*break*/,
|
|
13895
|
+
if (!(!styleMap.style && styleMap.StyleID != -1)) return [3 /*break*/, 19];
|
|
13857
13896
|
styleId = styleMap.StyleID;
|
|
13858
|
-
if (
|
|
13859
|
-
_c.label =
|
|
13860
|
-
case
|
|
13861
|
-
_c.trys.push([
|
|
13897
|
+
if (!(!styleId && !this.fallbackStyle)) return [3 /*break*/, 14];
|
|
13898
|
+
_c.label = 10;
|
|
13899
|
+
case 10:
|
|
13900
|
+
_c.trys.push([10, 13, , 14]);
|
|
13901
|
+
entityType = typeMap.get(styleMap.EntityTypeID);
|
|
13902
|
+
if (!!entityType) return [3 /*break*/, 12];
|
|
13862
13903
|
return [4 /*yield*/, EntityType.Get({
|
|
13863
13904
|
api: this.api,
|
|
13864
13905
|
entityTypeId: styleMap.EntityTypeID
|
|
13865
13906
|
})];
|
|
13866
|
-
case
|
|
13907
|
+
case 11:
|
|
13867
13908
|
entityType = (_c.sent()).entityType;
|
|
13909
|
+
_c.label = 12;
|
|
13910
|
+
case 12:
|
|
13868
13911
|
styleId = entityType === null || entityType === void 0 ? void 0 : entityType["DisplaySetting.ID"];
|
|
13869
|
-
return [3 /*break*/,
|
|
13870
|
-
case
|
|
13912
|
+
return [3 /*break*/, 14];
|
|
13913
|
+
case 13:
|
|
13871
13914
|
e_2 = _c.sent();
|
|
13872
13915
|
console.error(e_2);
|
|
13873
|
-
return [3 /*break*/,
|
|
13874
|
-
case
|
|
13875
|
-
if (!styleId) return [3 /*break*/,
|
|
13876
|
-
_c.label =
|
|
13877
|
-
case
|
|
13878
|
-
_c.trys.push([
|
|
13916
|
+
return [3 /*break*/, 14];
|
|
13917
|
+
case 14:
|
|
13918
|
+
if (!styleId) return [3 /*break*/, 18];
|
|
13919
|
+
_c.label = 15;
|
|
13920
|
+
case 15:
|
|
13921
|
+
_c.trys.push([15, 17, , 18]);
|
|
13879
13922
|
return [4 /*yield*/, Style.Get({
|
|
13880
13923
|
api: this.api,
|
|
13881
13924
|
styleId: styleId
|
|
13882
13925
|
})];
|
|
13883
|
-
case
|
|
13926
|
+
case 16:
|
|
13884
13927
|
data = (_c.sent()).style;
|
|
13885
13928
|
if (data) {
|
|
13886
13929
|
styleMap.style = data;
|
|
13887
13930
|
styleMap.StyleID = styleId;
|
|
13888
13931
|
}
|
|
13889
|
-
return [3 /*break*/,
|
|
13890
|
-
case
|
|
13932
|
+
return [3 /*break*/, 18];
|
|
13933
|
+
case 17:
|
|
13891
13934
|
e_3 = _c.sent();
|
|
13892
13935
|
console.error(e_3);
|
|
13893
|
-
return [3 /*break*/,
|
|
13894
|
-
case
|
|
13936
|
+
return [3 /*break*/, 18];
|
|
13937
|
+
case 18:
|
|
13895
13938
|
if (this.loadingCounter != counter) {
|
|
13896
13939
|
return [2 /*return*/];
|
|
13897
13940
|
}
|
|
13898
|
-
_c.label =
|
|
13899
|
-
case
|
|
13941
|
+
_c.label = 19;
|
|
13942
|
+
case 19:
|
|
13900
13943
|
this.styleMappingsLoaded[styleMap.EntityTypeID] = true;
|
|
13901
13944
|
this.processTilesetFeatureCheckQueue();
|
|
13902
13945
|
this.processQueue();
|
|
13903
|
-
_c.label =
|
|
13904
|
-
case
|
|
13946
|
+
_c.label = 20;
|
|
13947
|
+
case 20:
|
|
13905
13948
|
i++;
|
|
13906
|
-
return [3 /*break*/,
|
|
13907
|
-
case
|
|
13949
|
+
return [3 /*break*/, 9];
|
|
13950
|
+
case 21:
|
|
13908
13951
|
if (this.loadingCounter != counter) {
|
|
13909
13952
|
return [2 /*return*/];
|
|
13910
13953
|
}
|
|
13911
13954
|
this.styleMappingLoaded = true;
|
|
13912
|
-
if (!!this.disposed) return [3 /*break*/,
|
|
13955
|
+
if (!!this.disposed) return [3 /*break*/, 23];
|
|
13913
13956
|
return [4 /*yield*/, this.processTilesetFeatureCheckQueue()];
|
|
13914
|
-
case
|
|
13957
|
+
case 22:
|
|
13915
13958
|
_c.sent();
|
|
13916
13959
|
if (this.loadingCounter != counter) {
|
|
13917
13960
|
return [2 /*return*/];
|
|
13918
13961
|
}
|
|
13919
13962
|
this.processQueue();
|
|
13920
|
-
_c.label =
|
|
13921
|
-
case
|
|
13963
|
+
_c.label = 23;
|
|
13964
|
+
case 23: return [2 /*return*/];
|
|
13922
13965
|
}
|
|
13923
13966
|
});
|
|
13924
13967
|
});
|
|
@@ -15027,6 +15070,7 @@ var EntityFilterGetter;
|
|
|
15027
15070
|
entityTypeConditions: this.attrFilter
|
|
15028
15071
|
},
|
|
15029
15072
|
viaCdn: this.viaCdn,
|
|
15073
|
+
migrated: true,
|
|
15030
15074
|
req: {
|
|
15031
15075
|
noCache: true
|
|
15032
15076
|
}
|
|
@@ -21408,7 +21452,8 @@ var WidgetInfoView = /** @class */ (function (_super) {
|
|
|
21408
21452
|
api = this._apiGetters.GetBruceApi();
|
|
21409
21453
|
return [4 /*yield*/, Entity$1.Get({
|
|
21410
21454
|
entityId: firstId,
|
|
21411
|
-
api: api
|
|
21455
|
+
api: api,
|
|
21456
|
+
migrated: true
|
|
21412
21457
|
})];
|
|
21413
21458
|
case 2:
|
|
21414
21459
|
entity = (_d.sent()).entity;
|
|
@@ -24584,7 +24629,7 @@ var ViewRenderEngine;
|
|
|
24584
24629
|
ViewRenderEngine.Render = Render;
|
|
24585
24630
|
})(ViewRenderEngine || (ViewRenderEngine = {}));
|
|
24586
24631
|
|
|
24587
|
-
var VERSION = "4.0.
|
|
24632
|
+
var VERSION = "4.0.5";
|
|
24588
24633
|
|
|
24589
24634
|
export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline };
|
|
24590
24635
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|