bruce-cesium 2.4.0 → 2.4.2

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.
@@ -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, DelayQueue, BatchedDataGetter, EntityRelationType, 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, SceneMode, Entity, Primitive, Cesium3DTileFeature, HeightReference, DistanceDisplayCondition, NearFarScalar, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Cesium3DTileColorBlendMode, HeadingPitchRange, createOsmBuildings, Cesium3DTileStyle, KmlDataSource, OrthographicFrustum, JulianDate, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, Model, CesiumInspector, PolygonPipeline, ColorMaterialProperty, EasingFunction, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, Ion, BoundingSphere } from 'cesium';
3
+ import { Cartographic, Cartesian2, CallbackProperty, Cartesian3, Color, Rectangle, Math as Math$1, Entity, Primitive, Cesium3DTileFeature, HeightReference, DistanceDisplayCondition, NearFarScalar, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, CornerType, HeadingPitchRoll, Transforms, ColorBlendMode, SceneMode, Cesium3DTileColorBlendMode, HeadingPitchRange, createOsmBuildings, Cesium3DTileStyle, OrthographicFrustum, JulianDate, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumInspector, defined, KmlDataSource, Cesium3DTileset, Matrix4, Matrix3, IonResource, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, Model, ColorMaterialProperty, EasingFunction, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, Ion, BoundingSphere } from 'cesium';
4
4
 
5
5
  var TIME_LAG = 300;
6
6
  var POSITION_CHECK_TIMER = 950;
@@ -823,6 +823,8 @@ function revertAppliedEntityOpacity(viewer, entity) {
823
823
  processKey("point", "color");
824
824
  processKey("ellipse");
825
825
  processKey("model", "color");
826
+ processKey("corridor");
827
+ processKey("billboard", "color");
826
828
  }
827
829
  else if (entity instanceof Cesium3DTileFeature) {
828
830
  var orgOpacity = entity[ORG_OPACITY_KEY];
@@ -859,6 +861,8 @@ function applyOpacityToEntity(viewer, opacity, entity) {
859
861
  processKey("point", "color");
860
862
  processKey("ellipse");
861
863
  processKey("model", "color");
864
+ processKey("corridor");
865
+ processKey("billboard", "color");
862
866
  }
863
867
  else if (entity instanceof Cesium3DTileFeature) {
864
868
  var orgOpacity = entity[ORG_OPACITY_KEY];
@@ -919,6 +923,9 @@ var EntityUtils;
919
923
  else if (visual.billboard) {
920
924
  visualHeightRef = GetValue(viewer, visual.billboard.heightReference);
921
925
  }
926
+ else if (visual.corridor) {
927
+ visualHeightRef = GetValue(viewer, visual.corridor.heightReference);
928
+ }
922
929
  else if (visual.ellipse) {
923
930
  visualHeightRef = GetValue(viewer, visual.ellipse.heightReference);
924
931
  }
@@ -2484,16 +2491,28 @@ var EntityRenderEngine;
2484
2491
  Cartes.CloseRing3(borderPosses);
2485
2492
  }
2486
2493
  var cEntityBorder = new Entity({
2487
- polyline: new PolylineGraphics({
2494
+ // polyline: new Cesium.PolylineGraphics({
2495
+ // positions: borderPosses,
2496
+ // material: <Cesium.MaterialProperty><any>cLineColor,
2497
+ // width: width,
2498
+ // clampToGround: heightRef == Cesium.HeightReference.CLAMP_TO_GROUND,
2499
+ // classificationType: Cesium.ClassificationType.TERRAIN,
2500
+ // arcType: Cesium.ArcType.GEODESIC,
2501
+ // zIndex: zIndex,
2502
+ // distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
2503
+ // }),
2504
+ corridor: {
2488
2505
  positions: borderPosses,
2489
2506
  material: cLineColor,
2507
+ heightReference: heightRef,
2490
2508
  width: width,
2491
- clampToGround: heightRef == HeightReference.CLAMP_TO_GROUND,
2509
+ fill: true,
2510
+ zIndex: zIndex + 1,
2511
+ cornerType: CornerType.MITERED,
2492
2512
  classificationType: ClassificationType.TERRAIN,
2493
- arcType: ArcType.GEODESIC,
2494
- zIndex: zIndex,
2495
- distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
2496
- }),
2513
+ distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance),
2514
+ shadows: ShadowMode.ENABLED
2515
+ },
2497
2516
  show: false
2498
2517
  });
2499
2518
  params.viewer.entities.add(cEntityBorder);
@@ -2503,16 +2522,28 @@ var EntityRenderEngine;
2503
2522
  var posses_1 = holePosses[i];
2504
2523
  Cartes.CloseRing3(posses_1);
2505
2524
  var cEntityHole = new Entity({
2506
- polyline: new PolylineGraphics({
2507
- positions: posses_1,
2525
+ // polyline: new Cesium.PolylineGraphics({
2526
+ // positions: posses,
2527
+ // material: <Cesium.MaterialProperty><any>cLineColor,
2528
+ // width: width,
2529
+ // clampToGround: heightRef == Cesium.HeightReference.CLAMP_TO_GROUND,
2530
+ // classificationType: Cesium.ClassificationType.TERRAIN,
2531
+ // arcType: Cesium.ArcType.GEODESIC,
2532
+ // zIndex: zIndex,
2533
+ // distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
2534
+ // }),
2535
+ corridor: {
2536
+ positions: borderPosses,
2508
2537
  material: cLineColor,
2538
+ heightReference: heightRef,
2509
2539
  width: width,
2510
- clampToGround: heightRef == HeightReference.CLAMP_TO_GROUND,
2540
+ fill: true,
2541
+ zIndex: zIndex + 1,
2542
+ cornerType: CornerType.MITERED,
2511
2543
  classificationType: ClassificationType.TERRAIN,
2512
- arcType: ArcType.GEODESIC,
2513
- zIndex: zIndex,
2514
- distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
2515
- }),
2544
+ distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance),
2545
+ shadows: ShadowMode.ENABLED,
2546
+ },
2516
2547
  show: false
2517
2548
  });
2518
2549
  cEntity._siblingGraphics.push(cEntityHole);
@@ -4930,6 +4961,7 @@ function select(viewer, visual, color) {
4930
4961
  "polyline": "material",
4931
4962
  "model": "color",
4932
4963
  "billboard": "color",
4964
+ "corridor": "material",
4933
4965
  "ellipse": "material"
4934
4966
  };
4935
4967
  var _loop_1 = function (i) {
@@ -4989,6 +5021,7 @@ function deselect(viewer, visual) {
4989
5021
  "polyline": "material",
4990
5022
  "model": "color",
4991
5023
  "billboard": "color",
5024
+ "corridor": "material",
4992
5025
  "ellipse": "material"
4993
5026
  };
4994
5027
  var _loop_2 = function (i) {
@@ -14399,7 +14432,7 @@ var ViewerUtils;
14399
14432
  ViewerUtils.CreateWidgets = CreateWidgets;
14400
14433
  })(ViewerUtils || (ViewerUtils = {}));
14401
14434
 
14402
- var VERSION$1 = "2.4.0";
14435
+ var VERSION$1 = "2.4.2";
14403
14436
 
14404
14437
  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, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, Draw3dPolygon, Draw3dPolyline };
14405
14438
  //# sourceMappingURL=bruce-cesium.es5.js.map