bruce-cesium 4.7.4 → 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 +93 -23
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +91 -21
- 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 +90 -20
- package/dist/lib/rendering/entity-render-engine-point.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +2 -3
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, Session
|
|
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,
|
|
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, outlineExtrusion, outlineEntity, bColor, cColor, size, circleBillboard, disableDepthTest, animateColorIn_2, position, series, imgKey, currentImgKey, series, pos3d, prevPos3d, lStyle, bColor, cColor, width, lHeightRef, trackEntity;
|
|
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:
|
|
@@ -4433,6 +4433,9 @@ var EntityRenderEnginePoint;
|
|
|
4433
4433
|
cEntity.billboard.heightReference = new ConstantProperty(getHeightRef(style));
|
|
4434
4434
|
cEntity.billboard.disableDepthTestDistance = new ConstantProperty(disableDepthTest ? Number.POSITIVE_INFINITY : undefined);
|
|
4435
4435
|
cEntity.billboard.distanceDisplayCondition = new ConstantProperty(EntityRenderEngine.GetDisplayCondition(params.minDistance, params.maxDistance));
|
|
4436
|
+
// Unset width/height.
|
|
4437
|
+
cEntity.billboard.width = undefined;
|
|
4438
|
+
cEntity.billboard.height = undefined;
|
|
4436
4439
|
series = CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
4437
4440
|
if (series.length > 1) {
|
|
4438
4441
|
animatePosition = new CesiumAnimatedProperty.AnimatePositionSeries({
|
|
@@ -4501,6 +4504,27 @@ var EntityRenderEnginePoint;
|
|
|
4501
4504
|
});
|
|
4502
4505
|
extrusion = getCylinderExtrusion(entity, params.tags, heightRef, style.CylinderFillExtrusion);
|
|
4503
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
|
+
}
|
|
4520
|
+
classification = ClassificationType.TERRAIN;
|
|
4521
|
+
if (style["drapeOver"] == "ALL") {
|
|
4522
|
+
classification = ClassificationType.BOTH;
|
|
4523
|
+
}
|
|
4524
|
+
height = undefined;
|
|
4525
|
+
if (heightRef != HeightReference.CLAMP_TO_GROUND && extrusion.value != undefined) {
|
|
4526
|
+
height = Cartographic.fromCartesian(pos3d).height;
|
|
4527
|
+
}
|
|
4504
4528
|
if (!params.rendered || !params.rendered.ellipse) {
|
|
4505
4529
|
cEntity = new Entity({
|
|
4506
4530
|
id: ObjectUtils.UId(10),
|
|
@@ -4512,8 +4536,9 @@ var EntityRenderEnginePoint;
|
|
|
4512
4536
|
extrudedHeight: extrusion.value,
|
|
4513
4537
|
heightReference: heightRef,
|
|
4514
4538
|
extrudedHeightReference: extrusion.exHeightRef,
|
|
4515
|
-
height:
|
|
4539
|
+
height: height,
|
|
4516
4540
|
zIndex: 1,
|
|
4541
|
+
classificationType: classification,
|
|
4517
4542
|
distanceDisplayCondition: EntityRenderEngine.GetDisplayCondition(params.minDistance, params.maxDistance)
|
|
4518
4543
|
},
|
|
4519
4544
|
position: pos3d === null || pos3d === void 0 ? void 0 : pos3d.clone(),
|
|
@@ -4523,15 +4548,38 @@ var EntityRenderEnginePoint;
|
|
|
4523
4548
|
else {
|
|
4524
4549
|
prepareExistingGraphic(params.rendered, hasOutline ? 1 : 0);
|
|
4525
4550
|
cEntity = params.rendered;
|
|
4526
|
-
cEntity.ellipse.semiMajorAxis
|
|
4527
|
-
|
|
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
|
+
}
|
|
4528
4556
|
cEntity.ellipse.outlineWidth = undefined;
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
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
|
+
}
|
|
4533
4577
|
cEntity.ellipse.zIndex = new ConstantProperty(1);
|
|
4534
4578
|
cEntity.ellipse.distanceDisplayCondition = new ConstantProperty(EntityRenderEngine.GetDisplayCondition(params.minDistance, params.maxDistance));
|
|
4579
|
+
curClassification = GetCValue(params.viewer, cEntity.ellipse.classificationType);
|
|
4580
|
+
if (curClassification != classification) {
|
|
4581
|
+
cEntity.ellipse.classificationType = new ConstantProperty(classification);
|
|
4582
|
+
}
|
|
4535
4583
|
cEntity.position = new ConstantPositionProperty(pos3d === null || pos3d === void 0 ? void 0 : pos3d.clone());
|
|
4536
4584
|
// We'll use "SetDefaultColor" to updating the internal reference and to allow for an animation.
|
|
4537
4585
|
// WARNING: ellipse does not support animation (yet?).
|
|
@@ -4545,22 +4593,43 @@ var EntityRenderEnginePoint;
|
|
|
4545
4593
|
cEntity.show = true;
|
|
4546
4594
|
}
|
|
4547
4595
|
if (hasOutline) {
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
if (!outlineExtrusion.value && extrusion.value) {
|
|
4552
|
-
outlineExtrusion.exHeightRef = extrusion.exHeightRef;
|
|
4596
|
+
outlineHeight = undefined;
|
|
4597
|
+
if (outlineExtrusion.exHeightRef != HeightReference.CLAMP_TO_GROUND && outlineExtrusion.value != undefined) {
|
|
4598
|
+
outlineHeight = Cartographic.fromCartesian(pos3d).height;
|
|
4553
4599
|
}
|
|
4554
4600
|
outlineEntity = siblings === null || siblings === void 0 ? void 0 : siblings[0];
|
|
4555
4601
|
if (outlineEntity && outlineEntity.ellipse) {
|
|
4556
|
-
outlineEntity.ellipse.semiMajorAxis
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
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
|
+
}
|
|
4562
4627
|
outlineEntity.ellipse.zIndex = new ConstantProperty(2);
|
|
4563
4628
|
outlineEntity.ellipse.distanceDisplayCondition = new ConstantProperty(EntityRenderEngine.GetDisplayCondition(params.minDistance, params.maxDistance));
|
|
4629
|
+
curClassification = GetCValue(params.viewer, outlineEntity.ellipse.classificationType);
|
|
4630
|
+
if (curClassification != classification) {
|
|
4631
|
+
outlineEntity.ellipse.classificationType = new ConstantProperty(classification);
|
|
4632
|
+
}
|
|
4564
4633
|
// We'll use "SetDefaultColor" to updating the internal reference and to allow for an animation.
|
|
4565
4634
|
// WARNING: ellipse does not support animation (yet?).
|
|
4566
4635
|
CesiumEntityStyler.SetDefaultColor({
|
|
@@ -4583,8 +4652,9 @@ var EntityRenderEnginePoint;
|
|
|
4583
4652
|
extrudedHeight: outlineExtrusion.value,
|
|
4584
4653
|
heightReference: heightRef,
|
|
4585
4654
|
extrudedHeightReference: outlineExtrusion.exHeightRef,
|
|
4586
|
-
height:
|
|
4655
|
+
height: outlineHeight,
|
|
4587
4656
|
zIndex: 2,
|
|
4657
|
+
classificationType: classification,
|
|
4588
4658
|
distanceDisplayCondition: EntityRenderEngine.GetDisplayCondition(params.minDistance, params.maxDistance)
|
|
4589
4659
|
},
|
|
4590
4660
|
position: pos3d === null || pos3d === void 0 ? void 0 : pos3d.clone()
|
|
@@ -28466,7 +28536,7 @@ var WidgetViewBar = /** @class */ (function (_super) {
|
|
|
28466
28536
|
return WidgetViewBar;
|
|
28467
28537
|
}(Widget.AWidget));
|
|
28468
28538
|
|
|
28469
|
-
var VERSION = "4.7.
|
|
28539
|
+
var VERSION = "4.7.6";
|
|
28470
28540
|
|
|
28471
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 };
|
|
28472
28542
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|