bruce-cesium 4.7.5 → 4.7.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 +84 -25
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +82 -23
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine-point.js +81 -22
- package/dist/lib/rendering/entity-render-engine-point.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
|
-
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, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, 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, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, AbstractApi, EntityAttribute, EntityAttachment, EntityAttachmentType, Session } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, ColorBlendMode, HeadingPitchRoll, Transforms, Model, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, EllipsoidTerrainProvider, sampleTerrainMostDetailed, defined, CesiumInspector, ClockRange, PolygonPipeline, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, 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.
|
|
@@ -4229,7 +4229,7 @@ var EntityRenderEnginePoint;
|
|
|
4229
4229
|
function Render(params) {
|
|
4230
4230
|
var _a, _b, _c, _d;
|
|
4231
4231
|
return __awaiter(this, void 0, void 0, function () {
|
|
4232
|
-
var entity, style, type, cEntity, siblings, heightRef, animatePosition, shouldShowTrack, prepareExistingGraphic, updateShouldShowTrack, iconUrlRows, icon, iconUrl, metadata, api, image, e_1, iconScale, disableDepthTest, bColor, cColor, animateColorIn_1, position, series, currentImgKey, series, pos3d, prevPos3d, radius, bFill, cFill, outline, cOutline, outlineWidth, bOutline, pos3d, extrusion, hasOutline, classification,
|
|
4232
|
+
var entity, style, type, cEntity, siblings, heightRef, animatePosition, shouldShowTrack, prepareExistingGraphic, updateShouldShowTrack, iconUrlRows, icon, iconUrl, metadata, api, image, e_1, iconScale, disableDepthTest, bColor, cColor, animateColorIn_1, position, series, currentImgKey, series, pos3d, prevPos3d, radius, bFill, cFill, outline, cOutline, outlineWidth, bOutline, pos3d, extrusion, hasOutline, outlineExtrusion, classification, height, curRadius, curHeightRef, curHeight, curExtHeightRef, curExtHeight, curClassification, outlineHeight, outlineEntity, curRadius, curHeightRef, curHeight, curExtHeightRef, curExtHeight, curClassification, bColor, cColor, size, circleBillboard, disableDepthTest, animateColorIn_2, position, series, imgKey, currentImgKey, series, pos3d, prevPos3d, lStyle, bColor, cColor, width, lHeightRef, trackEntity;
|
|
4233
4233
|
return __generator(this, function (_e) {
|
|
4234
4234
|
switch (_e.label) {
|
|
4235
4235
|
case 0:
|
|
@@ -4504,10 +4504,27 @@ var EntityRenderEnginePoint;
|
|
|
4504
4504
|
});
|
|
4505
4505
|
extrusion = getCylinderExtrusion(entity, params.tags, heightRef, style.CylinderFillExtrusion);
|
|
4506
4506
|
hasOutline = outline && outlineWidth > 0;
|
|
4507
|
+
outlineExtrusion = hasOutline ? getCylinderExtrusion(entity, params.tags, heightRef, style.CylinderBorderExtrusion) : null;
|
|
4508
|
+
// If this doesn't have its own extrusion, we must make it match the sibling.
|
|
4509
|
+
// This way they render in a uniform way.
|
|
4510
|
+
if (hasOutline) {
|
|
4511
|
+
if (outlineExtrusion.value == undefined && extrusion.value != undefined) {
|
|
4512
|
+
outlineExtrusion.exHeightRef = extrusion.exHeightRef;
|
|
4513
|
+
outlineExtrusion.value = 0;
|
|
4514
|
+
}
|
|
4515
|
+
else if (outlineExtrusion.value != undefined && extrusion.value == undefined) {
|
|
4516
|
+
extrusion.exHeightRef = outlineExtrusion.exHeightRef;
|
|
4517
|
+
extrusion.value = 0;
|
|
4518
|
+
}
|
|
4519
|
+
}
|
|
4507
4520
|
classification = ClassificationType.TERRAIN;
|
|
4508
4521
|
if (style["drapeOver"] == "ALL") {
|
|
4509
4522
|
classification = ClassificationType.BOTH;
|
|
4510
4523
|
}
|
|
4524
|
+
height = undefined;
|
|
4525
|
+
if (heightRef != HeightReference.CLAMP_TO_GROUND && extrusion.value != undefined) {
|
|
4526
|
+
height = Cartographic.fromCartesian(pos3d).height;
|
|
4527
|
+
}
|
|
4511
4528
|
if (!params.rendered || !params.rendered.ellipse) {
|
|
4512
4529
|
cEntity = new Entity({
|
|
4513
4530
|
id: ObjectUtils.UId(10),
|
|
@@ -4519,7 +4536,7 @@ var EntityRenderEnginePoint;
|
|
|
4519
4536
|
extrudedHeight: extrusion.value,
|
|
4520
4537
|
heightReference: heightRef,
|
|
4521
4538
|
extrudedHeightReference: extrusion.exHeightRef,
|
|
4522
|
-
height:
|
|
4539
|
+
height: height,
|
|
4523
4540
|
zIndex: 1,
|
|
4524
4541
|
classificationType: classification,
|
|
4525
4542
|
distanceDisplayCondition: EntityRenderEngine.GetDisplayCondition(params.minDistance, params.maxDistance)
|
|
@@ -4531,16 +4548,38 @@ var EntityRenderEnginePoint;
|
|
|
4531
4548
|
else {
|
|
4532
4549
|
prepareExistingGraphic(params.rendered, hasOutline ? 1 : 0);
|
|
4533
4550
|
cEntity = params.rendered;
|
|
4534
|
-
cEntity.ellipse.semiMajorAxis
|
|
4535
|
-
|
|
4551
|
+
curRadius = GetCValue(params.viewer, cEntity.ellipse.semiMajorAxis);
|
|
4552
|
+
if (curRadius != radius) {
|
|
4553
|
+
cEntity.ellipse.semiMajorAxis = new ConstantProperty(radius);
|
|
4554
|
+
cEntity.ellipse.semiMinorAxis = new ConstantProperty(radius);
|
|
4555
|
+
}
|
|
4536
4556
|
cEntity.ellipse.outlineWidth = undefined;
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4557
|
+
{
|
|
4558
|
+
curHeightRef = GetCValue(params.viewer, cEntity.ellipse.heightReference);
|
|
4559
|
+
if (curHeightRef != heightRef) {
|
|
4560
|
+
cEntity.ellipse.heightReference = new ConstantProperty(heightRef);
|
|
4561
|
+
}
|
|
4562
|
+
curHeight = GetCValue(params.viewer, cEntity.ellipse.height);
|
|
4563
|
+
if (curHeight != height) {
|
|
4564
|
+
cEntity.ellipse.height = new ConstantProperty(height);
|
|
4565
|
+
}
|
|
4566
|
+
}
|
|
4567
|
+
{
|
|
4568
|
+
curExtHeightRef = GetCValue(params.viewer, cEntity.ellipse.extrudedHeightReference);
|
|
4569
|
+
if (curExtHeightRef != extrusion.exHeightRef) {
|
|
4570
|
+
cEntity.ellipse.extrudedHeightReference = new ConstantProperty(extrusion.exHeightRef);
|
|
4571
|
+
}
|
|
4572
|
+
curExtHeight = GetCValue(params.viewer, cEntity.ellipse.extrudedHeight);
|
|
4573
|
+
if (curExtHeight != extrusion.value) {
|
|
4574
|
+
cEntity.ellipse.extrudedHeight = new ConstantProperty(extrusion.value);
|
|
4575
|
+
}
|
|
4576
|
+
}
|
|
4541
4577
|
cEntity.ellipse.zIndex = new ConstantProperty(1);
|
|
4542
4578
|
cEntity.ellipse.distanceDisplayCondition = new ConstantProperty(EntityRenderEngine.GetDisplayCondition(params.minDistance, params.maxDistance));
|
|
4543
|
-
cEntity.ellipse.classificationType
|
|
4579
|
+
curClassification = GetCValue(params.viewer, cEntity.ellipse.classificationType);
|
|
4580
|
+
if (curClassification != classification) {
|
|
4581
|
+
cEntity.ellipse.classificationType = new ConstantProperty(classification);
|
|
4582
|
+
}
|
|
4544
4583
|
cEntity.position = new ConstantPositionProperty(pos3d === null || pos3d === void 0 ? void 0 : pos3d.clone());
|
|
4545
4584
|
// We'll use "SetDefaultColor" to updating the internal reference and to allow for an animation.
|
|
4546
4585
|
// WARNING: ellipse does not support animation (yet?).
|
|
@@ -4554,23 +4593,43 @@ var EntityRenderEnginePoint;
|
|
|
4554
4593
|
cEntity.show = true;
|
|
4555
4594
|
}
|
|
4556
4595
|
if (hasOutline) {
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
if (!outlineExtrusion.value && extrusion.value) {
|
|
4561
|
-
outlineExtrusion.exHeightRef = extrusion.exHeightRef;
|
|
4596
|
+
outlineHeight = undefined;
|
|
4597
|
+
if (outlineExtrusion.exHeightRef != HeightReference.CLAMP_TO_GROUND && outlineExtrusion.value != undefined) {
|
|
4598
|
+
outlineHeight = Cartographic.fromCartesian(pos3d).height;
|
|
4562
4599
|
}
|
|
4563
4600
|
outlineEntity = siblings === null || siblings === void 0 ? void 0 : siblings[0];
|
|
4564
4601
|
if (outlineEntity && outlineEntity.ellipse) {
|
|
4565
|
-
outlineEntity.ellipse.semiMajorAxis
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4602
|
+
curRadius = GetCValue(params.viewer, outlineEntity.ellipse.semiMajorAxis);
|
|
4603
|
+
if (curRadius != radius + outlineWidth) {
|
|
4604
|
+
outlineEntity.ellipse.semiMajorAxis = new ConstantProperty(radius + outlineWidth);
|
|
4605
|
+
outlineEntity.ellipse.semiMinorAxis = new ConstantProperty(radius + outlineWidth);
|
|
4606
|
+
}
|
|
4607
|
+
{
|
|
4608
|
+
curHeightRef = GetCValue(params.viewer, outlineEntity.ellipse.heightReference);
|
|
4609
|
+
if (curHeightRef != heightRef) {
|
|
4610
|
+
outlineEntity.ellipse.heightReference = new ConstantProperty(heightRef);
|
|
4611
|
+
}
|
|
4612
|
+
curHeight = GetCValue(params.viewer, outlineEntity.ellipse.height);
|
|
4613
|
+
if (curHeight != outlineHeight) {
|
|
4614
|
+
outlineEntity.ellipse.height = new ConstantProperty(outlineHeight);
|
|
4615
|
+
}
|
|
4616
|
+
}
|
|
4617
|
+
{
|
|
4618
|
+
curExtHeightRef = GetCValue(params.viewer, outlineEntity.ellipse.extrudedHeightReference);
|
|
4619
|
+
if (curExtHeightRef != outlineExtrusion.exHeightRef) {
|
|
4620
|
+
outlineEntity.ellipse.extrudedHeightReference = new ConstantProperty(outlineExtrusion.exHeightRef);
|
|
4621
|
+
}
|
|
4622
|
+
curExtHeight = GetCValue(params.viewer, outlineEntity.ellipse.extrudedHeight);
|
|
4623
|
+
if (curExtHeight != outlineExtrusion.value) {
|
|
4624
|
+
outlineEntity.ellipse.extrudedHeight = new ConstantProperty(outlineExtrusion.value);
|
|
4625
|
+
}
|
|
4626
|
+
}
|
|
4571
4627
|
outlineEntity.ellipse.zIndex = new ConstantProperty(2);
|
|
4572
4628
|
outlineEntity.ellipse.distanceDisplayCondition = new ConstantProperty(EntityRenderEngine.GetDisplayCondition(params.minDistance, params.maxDistance));
|
|
4573
|
-
outlineEntity.ellipse.classificationType
|
|
4629
|
+
curClassification = GetCValue(params.viewer, outlineEntity.ellipse.classificationType);
|
|
4630
|
+
if (curClassification != classification) {
|
|
4631
|
+
outlineEntity.ellipse.classificationType = new ConstantProperty(classification);
|
|
4632
|
+
}
|
|
4574
4633
|
// We'll use "SetDefaultColor" to updating the internal reference and to allow for an animation.
|
|
4575
4634
|
// WARNING: ellipse does not support animation (yet?).
|
|
4576
4635
|
CesiumEntityStyler.SetDefaultColor({
|
|
@@ -4593,7 +4652,7 @@ var EntityRenderEnginePoint;
|
|
|
4593
4652
|
extrudedHeight: outlineExtrusion.value,
|
|
4594
4653
|
heightReference: heightRef,
|
|
4595
4654
|
extrudedHeightReference: outlineExtrusion.exHeightRef,
|
|
4596
|
-
height:
|
|
4655
|
+
height: outlineHeight,
|
|
4597
4656
|
zIndex: 2,
|
|
4598
4657
|
classificationType: classification,
|
|
4599
4658
|
distanceDisplayCondition: EntityRenderEngine.GetDisplayCondition(params.minDistance, params.maxDistance)
|
|
@@ -28477,7 +28536,7 @@ var WidgetViewBar = /** @class */ (function (_super) {
|
|
|
28477
28536
|
return WidgetViewBar;
|
|
28478
28537
|
}(Widget.AWidget));
|
|
28479
28538
|
|
|
28480
|
-
var VERSION = "4.7.
|
|
28539
|
+
var VERSION = "4.7.6";
|
|
28481
28540
|
|
|
28482
28541
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, 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 };
|
|
28483
28542
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|