bruce-cesium 2.8.5 → 2.8.7
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 +47 -9
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +46 -8
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/render-managers/common/entity-label.js +45 -7
- package/dist/lib/rendering/render-managers/common/entity-label.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +1 -1
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, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, EntityRelationType, DelayQueue, BatchedDataGetter, EntityCoords, EntityFilterGetter, EntitySource, MenuItem, EntityRelation, ENVIRONMENT, ProjectView, ProjectViewBookmark, ProjectViewTile, ProjectViewLegacyTile, ProgramKey, Camera, AbstractApi, EntityAttachment, EntityAttachmentType, EntityAttribute } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, Cartesian2, CallbackProperty, Cartesian3, Color, Rectangle, Math as Math$1, HeightReference, DistanceDisplayCondition, NearFarScalar, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode,
|
|
3
|
+
import { Cartographic, Cartesian2, CallbackProperty, Cartesian3, Color, Rectangle, Math as Math$1, JulianDate, SceneMode, HeightReference, DistanceDisplayCondition, NearFarScalar, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, Cesium3DTileColorBlendMode, HeadingPitchRange, createOsmBuildings, Cesium3DTileStyle, SceneTransforms, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, KmlDataSource, PolygonPipeline, OrthographicFrustum, EasingFunction, Cesium3DTileset, Matrix4, Matrix3, IonResource, Ion, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, Model, CesiumInspector, ScreenSpaceEventHandler, ScreenSpaceEventType, ColorMaterialProperty, GeometryInstance, BoundingSphere } from 'cesium';
|
|
4
4
|
|
|
5
5
|
var TIME_LAG = 300;
|
|
6
6
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -3803,12 +3803,12 @@ var EntityLabel;
|
|
|
3803
3803
|
* @param starterPos3d optional position to create label at. Ignored for billboard labels.
|
|
3804
3804
|
*/
|
|
3805
3805
|
Label.prototype.createLabel = function (starterPos3d) {
|
|
3806
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
3806
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
3807
3807
|
return __awaiter(this, void 0, void 0, function () {
|
|
3808
|
-
var pos3d, counter, sizeInM, heightRef, pixelOffset, visual, hierarchy, posses, centerIndex, pos1, pos2, pos3, posses, isClamped, centerIndex, size, height, scale, posses, centerIndex, text, ele, _lastDistance, _lastCameraPos, getDistance, MAX_DISTANCE, updateLabel, terrTimeout;
|
|
3808
|
+
var pos3d, counter, sizeInM, heightRef, pixelOffset, visual, hierarchy, posses, centerIndex, pos1, pos2, pos3, posses, isClamped, centerIndex, size, height, scale, posses, centerIndex, text, type, e_1, ele, _lastDistance, _lastCameraPos, getDistance, MAX_DISTANCE, updateLabel, terrTimeout;
|
|
3809
3809
|
var _this = this;
|
|
3810
|
-
return __generator(this, function (
|
|
3811
|
-
switch (
|
|
3810
|
+
return __generator(this, function (_h) {
|
|
3811
|
+
switch (_h.label) {
|
|
3812
3812
|
case 0:
|
|
3813
3813
|
pos3d = starterPos3d ? starterPos3d.clone() : null;
|
|
3814
3814
|
counter = ++this.counter;
|
|
@@ -3948,12 +3948,12 @@ var EntityLabel;
|
|
|
3948
3948
|
visualRegister: this.visualRegister
|
|
3949
3949
|
})];
|
|
3950
3950
|
case 1:
|
|
3951
|
-
pos3d =
|
|
3951
|
+
pos3d = _h.sent();
|
|
3952
3952
|
heightRef = HeightReference.NONE;
|
|
3953
3953
|
if (this.counter != counter) {
|
|
3954
3954
|
return [2 /*return*/];
|
|
3955
3955
|
}
|
|
3956
|
-
|
|
3956
|
+
_h.label = 2;
|
|
3957
3957
|
case 2:
|
|
3958
3958
|
if (isNaN(pos3d === null || pos3d === void 0 ? void 0 : pos3d.x)) {
|
|
3959
3959
|
return [2 /*return*/];
|
|
@@ -3968,7 +3968,45 @@ var EntityLabel;
|
|
|
3968
3968
|
return [2 /*return*/];
|
|
3969
3969
|
}
|
|
3970
3970
|
this._pos3d = pos3d;
|
|
3971
|
-
text =
|
|
3971
|
+
text = "Unknown Entity";
|
|
3972
|
+
if (!this.rego) return [3 /*break*/, 8];
|
|
3973
|
+
if (!this.rego.relation) return [3 /*break*/, 7];
|
|
3974
|
+
type = this.rego.relation.RelationType;
|
|
3975
|
+
if (!(!type && this.rego.relation["Relation.Type.ID"])) return [3 /*break*/, 6];
|
|
3976
|
+
_h.label = 3;
|
|
3977
|
+
case 3:
|
|
3978
|
+
_h.trys.push([3, 5, , 6]);
|
|
3979
|
+
return [4 /*yield*/, EntityRelationType.Get({
|
|
3980
|
+
api: this.api,
|
|
3981
|
+
relationTypeId: this.rego.relation["Relation.Type.ID"]
|
|
3982
|
+
})];
|
|
3983
|
+
case 4:
|
|
3984
|
+
type = (_h.sent()).relationType;
|
|
3985
|
+
return [3 /*break*/, 6];
|
|
3986
|
+
case 5:
|
|
3987
|
+
e_1 = _h.sent();
|
|
3988
|
+
console.error(e_1);
|
|
3989
|
+
return [3 /*break*/, 6];
|
|
3990
|
+
case 6:
|
|
3991
|
+
if (type) {
|
|
3992
|
+
text = type.Name ? type.Name : (type.ForwardName + "/" + type.ReverseName);
|
|
3993
|
+
}
|
|
3994
|
+
else {
|
|
3995
|
+
text = "Unknown Relationship";
|
|
3996
|
+
}
|
|
3997
|
+
return [3 /*break*/, 8];
|
|
3998
|
+
case 7:
|
|
3999
|
+
if (this.rego.name) {
|
|
4000
|
+
text = this.rego.name;
|
|
4001
|
+
}
|
|
4002
|
+
else {
|
|
4003
|
+
text = "Unnamed Entity";
|
|
4004
|
+
}
|
|
4005
|
+
_h.label = 8;
|
|
4006
|
+
case 8:
|
|
4007
|
+
if (this.disposed || this.counter != counter) {
|
|
4008
|
+
return [2 /*return*/];
|
|
4009
|
+
}
|
|
3972
4010
|
ele = document.createElement("div");
|
|
3973
4011
|
ele.innerHTML = text;
|
|
3974
4012
|
ele.setAttribute("style", "\n position: absolute;\n z-index: 0;\n display: none;\n pointer-events: none;\n padding: 6px 8px;\n border-radius: 6px;\n font-family: Arial;\n font-size: 12px;\n -webkit-backdrop-filter: blur(20px);\n backdrop-filter: blur(20px);\n background: rgba(33,39,42,.8);\n border-radius: 9px;\n box-shadow: 0 0 1px rgba(18,22,25,.36),0 18px 36px -4px rgba(18,22,25,.36);\n color: #ffffff;\n }");
|
|
@@ -16095,7 +16133,7 @@ var ViewerUtils;
|
|
|
16095
16133
|
ViewerUtils.CreateWidgets = CreateWidgets;
|
|
16096
16134
|
})(ViewerUtils || (ViewerUtils = {}));
|
|
16097
16135
|
|
|
16098
|
-
var VERSION$1 = "2.8.
|
|
16136
|
+
var VERSION$1 = "2.8.7";
|
|
16099
16137
|
|
|
16100
16138
|
export { VERSION$1 as 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, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, Draw3dPolygon, Draw3dPolyline };
|
|
16101
16139
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|