bruce-cesium 4.0.4 → 4.0.6
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 +63 -34
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +62 -33
- 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 +61 -32
- package/dist/lib/rendering/tileset-render-engine.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,
|
|
3
|
+
import { Cartographic, JulianDate, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, OrthographicFrustum, EasingFunction, Cesium3DTileset, Matrix4, Matrix3, IonResource, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Quaternion, Intersect } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -13800,7 +13800,7 @@ var TilesetRenderEngine;
|
|
|
13800
13800
|
Styler.prototype.loadStyles = function () {
|
|
13801
13801
|
var _a, _b;
|
|
13802
13802
|
return __awaiter(this, void 0, void 0, function () {
|
|
13803
|
-
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;
|
|
13804
13804
|
return __generator(this, function (_c) {
|
|
13805
13805
|
switch (_c.label) {
|
|
13806
13806
|
case 0:
|
|
@@ -13859,80 +13859,109 @@ var TilesetRenderEngine;
|
|
|
13859
13859
|
catch (e) {
|
|
13860
13860
|
console.error(e);
|
|
13861
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;
|
|
13862
13867
|
i = 0;
|
|
13863
13868
|
_c.label = 5;
|
|
13864
13869
|
case 5:
|
|
13865
|
-
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];
|
|
13866
13891
|
if (this.disposed) {
|
|
13867
|
-
return [3 /*break*/,
|
|
13892
|
+
return [3 /*break*/, 21];
|
|
13868
13893
|
}
|
|
13869
13894
|
styleMap = styleMapping[i];
|
|
13870
|
-
if (!(!styleMap.style && styleMap.StyleID != -1)) return [3 /*break*/,
|
|
13895
|
+
if (!(!styleMap.style && styleMap.StyleID != -1)) return [3 /*break*/, 19];
|
|
13871
13896
|
styleId = styleMap.StyleID;
|
|
13872
|
-
if (
|
|
13873
|
-
_c.label =
|
|
13874
|
-
case
|
|
13875
|
-
_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];
|
|
13876
13903
|
return [4 /*yield*/, EntityType.Get({
|
|
13877
13904
|
api: this.api,
|
|
13878
13905
|
entityTypeId: styleMap.EntityTypeID
|
|
13879
13906
|
})];
|
|
13880
|
-
case
|
|
13907
|
+
case 11:
|
|
13881
13908
|
entityType = (_c.sent()).entityType;
|
|
13909
|
+
_c.label = 12;
|
|
13910
|
+
case 12:
|
|
13882
13911
|
styleId = entityType === null || entityType === void 0 ? void 0 : entityType["DisplaySetting.ID"];
|
|
13883
|
-
return [3 /*break*/,
|
|
13884
|
-
case
|
|
13912
|
+
return [3 /*break*/, 14];
|
|
13913
|
+
case 13:
|
|
13885
13914
|
e_2 = _c.sent();
|
|
13886
13915
|
console.error(e_2);
|
|
13887
|
-
return [3 /*break*/,
|
|
13888
|
-
case
|
|
13889
|
-
if (!styleId) return [3 /*break*/,
|
|
13890
|
-
_c.label =
|
|
13891
|
-
case
|
|
13892
|
-
_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]);
|
|
13893
13922
|
return [4 /*yield*/, Style.Get({
|
|
13894
13923
|
api: this.api,
|
|
13895
13924
|
styleId: styleId
|
|
13896
13925
|
})];
|
|
13897
|
-
case
|
|
13926
|
+
case 16:
|
|
13898
13927
|
data = (_c.sent()).style;
|
|
13899
13928
|
if (data) {
|
|
13900
13929
|
styleMap.style = data;
|
|
13901
13930
|
styleMap.StyleID = styleId;
|
|
13902
13931
|
}
|
|
13903
|
-
return [3 /*break*/,
|
|
13904
|
-
case
|
|
13932
|
+
return [3 /*break*/, 18];
|
|
13933
|
+
case 17:
|
|
13905
13934
|
e_3 = _c.sent();
|
|
13906
13935
|
console.error(e_3);
|
|
13907
|
-
return [3 /*break*/,
|
|
13908
|
-
case
|
|
13936
|
+
return [3 /*break*/, 18];
|
|
13937
|
+
case 18:
|
|
13909
13938
|
if (this.loadingCounter != counter) {
|
|
13910
13939
|
return [2 /*return*/];
|
|
13911
13940
|
}
|
|
13912
|
-
_c.label =
|
|
13913
|
-
case
|
|
13941
|
+
_c.label = 19;
|
|
13942
|
+
case 19:
|
|
13914
13943
|
this.styleMappingsLoaded[styleMap.EntityTypeID] = true;
|
|
13915
13944
|
this.processTilesetFeatureCheckQueue();
|
|
13916
13945
|
this.processQueue();
|
|
13917
|
-
_c.label =
|
|
13918
|
-
case
|
|
13946
|
+
_c.label = 20;
|
|
13947
|
+
case 20:
|
|
13919
13948
|
i++;
|
|
13920
|
-
return [3 /*break*/,
|
|
13921
|
-
case
|
|
13949
|
+
return [3 /*break*/, 9];
|
|
13950
|
+
case 21:
|
|
13922
13951
|
if (this.loadingCounter != counter) {
|
|
13923
13952
|
return [2 /*return*/];
|
|
13924
13953
|
}
|
|
13925
13954
|
this.styleMappingLoaded = true;
|
|
13926
|
-
if (!!this.disposed) return [3 /*break*/,
|
|
13955
|
+
if (!!this.disposed) return [3 /*break*/, 23];
|
|
13927
13956
|
return [4 /*yield*/, this.processTilesetFeatureCheckQueue()];
|
|
13928
|
-
case
|
|
13957
|
+
case 22:
|
|
13929
13958
|
_c.sent();
|
|
13930
13959
|
if (this.loadingCounter != counter) {
|
|
13931
13960
|
return [2 /*return*/];
|
|
13932
13961
|
}
|
|
13933
13962
|
this.processQueue();
|
|
13934
|
-
_c.label =
|
|
13935
|
-
case
|
|
13963
|
+
_c.label = 23;
|
|
13964
|
+
case 23: return [2 /*return*/];
|
|
13936
13965
|
}
|
|
13937
13966
|
});
|
|
13938
13967
|
});
|
|
@@ -24600,7 +24629,7 @@ var ViewRenderEngine;
|
|
|
24600
24629
|
ViewRenderEngine.Render = Render;
|
|
24601
24630
|
})(ViewRenderEngine || (ViewRenderEngine = {}));
|
|
24602
24631
|
|
|
24603
|
-
var VERSION = "4.0.
|
|
24632
|
+
var VERSION = "4.0.6";
|
|
24604
24633
|
|
|
24605
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 };
|
|
24606
24635
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|