bruce-cesium 1.3.1 → 1.3.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,5 +1,5 @@
1
1
  import { BruceEvent, Cartes, Carto, Geometry, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, DelayQueue, Entity as Entity$1, BatchedDataGetter, EntityRelationType, Tileset, EntityCoords, EntityFilterGetter, EntitySource, EntityRelation, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewTile, ProjectViewLegacyTile, ProgramKey, Camera } from 'bruce-models';
2
- import { Cartesian2, Cartographic, Math as Math$1, Color, HeightReference, Cartesian3, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, Cesium3DTileColorBlendMode, HeadingPitchRange, createOsmBuildings, Cesium3DTileStyle, Rectangle, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, Matrix4, Cesium3DTileset, IonResource, KmlDataSource, OrthographicFrustum, JulianDate, CallbackProperty, PolygonPipeline, ColorMaterialProperty, Matrix3, EasingFunction, GeometryInstance, EllipsoidGeodesic, sampleTerrainMostDetailed } from 'cesium';
2
+ import { Cartesian2, Cartographic, Math as Math$1, Color, HeightReference, Cartesian3, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, Cesium3DTileColorBlendMode, HeadingPitchRange, createOsmBuildings, Cesium3DTileStyle, Rectangle, KmlDataSource, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CallbackProperty, Matrix4, Cesium3DTileset, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, OrthographicFrustum, JulianDate, PolygonPipeline, ColorMaterialProperty, Matrix3, EasingFunction, GeometryInstance } from 'cesium';
3
3
 
4
4
  var TIME_LAG = 300;
5
5
  var POSITION_CHECK_TIMER = 950;
@@ -1267,7 +1267,7 @@ var EntityRenderEngine;
1267
1267
  case 2:
1268
1268
  if (!(multiGeometry.length > 0)) return [3 /*break*/, 6];
1269
1269
  _loop_1 = function (i) {
1270
- var entity, pParams, zoomItem, j, subEntity, cPoly, rendered, cLines, cPoints, rootEntity, firstEntity;
1270
+ var entity, pParams, zoomItem, j, subEntity, cPoly, rendered, cLines, cPoints, rootEntity_1, firstEntity;
1271
1271
  return __generator(this, function (_a) {
1272
1272
  switch (_a.label) {
1273
1273
  case 0:
@@ -1303,16 +1303,19 @@ var EntityRenderEngine;
1303
1303
  rendered = rendered.concat(Object.values(cPoints));
1304
1304
  rendered = rendered.filter(function (x) { return x != null; });
1305
1305
  if (rendered.length) {
1306
- rootEntity = new Entity({});
1307
- params.viewer.entities.add(rootEntity);
1308
- rootEntity._siblingGraphics = [];
1309
- rootEntity._renderGroup = getRenderGroupId(zoomItem);
1310
- rootEntity._siblingGraphics = rootEntity._siblingGraphics.concat(rendered);
1311
- cEntities[entity.Bruce.ID] = rootEntity;
1306
+ rootEntity_1 = new Entity({});
1307
+ params.viewer.entities.add(rootEntity_1);
1308
+ rootEntity_1._siblingGraphics = [];
1309
+ rootEntity_1._renderGroup = getRenderGroupId(zoomItem);
1310
+ rootEntity_1._siblingGraphics = rootEntity_1._siblingGraphics.concat(rendered);
1311
+ cEntities[entity.Bruce.ID] = rootEntity_1;
1312
1312
  firstEntity = rendered[0];
1313
1313
  if (firstEntity) {
1314
- rootEntity.position = getValue(params.viewer, firstEntity.position.getValue);
1314
+ rootEntity_1.position = getValue(params.viewer, firstEntity.position.getValue);
1315
1315
  }
1316
+ rendered.forEach(function (child) {
1317
+ child._parentEntity = rootEntity_1;
1318
+ });
1316
1319
  }
1317
1320
  else {
1318
1321
  polygons.push(entity);
@@ -1729,7 +1732,8 @@ var EntityRenderEngine;
1729
1732
  show: false
1730
1733
  });
1731
1734
  cEntity._siblingGraphics = [];
1732
- if (width > 0 && bLineColor) {
1735
+ console.count("POLYGON WIDTH = " + width + ", COLOR = " + (cLineColor === null || cLineColor === void 0 ? void 0 : cLineColor.toCssColorString()));
1736
+ if (width > 0 && cLineColor) {
1733
1737
  var cEntityBorder = new Entity({
1734
1738
  polyline: new PolylineGraphics({
1735
1739
  positions: posses,
@@ -1742,26 +1746,28 @@ var EntityRenderEngine;
1742
1746
  }),
1743
1747
  show: false
1744
1748
  });
1749
+ params.viewer.entities.add(cEntityBorder);
1750
+ cEntityBorder._parentEntity = cEntity;
1745
1751
  cEntity._siblingGraphics.push(cEntityBorder);
1746
- }
1747
- for (var i = 0; i < holePosses.length; i++) {
1748
- var posses_1 = holePosses[i];
1749
- Cartes.CloseRing3(posses_1);
1750
- var cEntityHole = new Entity({
1751
- polyline: new PolylineGraphics({
1752
- positions: posses_1,
1753
- material: cLineColor,
1754
- width: width,
1755
- clampToGround: heightRef == HeightReference.CLAMP_TO_GROUND,
1756
- classificationType: ClassificationType.TERRAIN,
1757
- arcType: ArcType.GEODESIC,
1758
- zIndex: zIndex
1759
- }),
1760
- show: false
1761
- });
1762
- cEntity._siblingGraphics.push(cEntityHole);
1763
- cEntityHole._parentEntity = cEntity;
1764
- params.viewer.entities.add(cEntityHole);
1752
+ for (var i = 0; i < holePosses.length; i++) {
1753
+ var posses_1 = holePosses[i];
1754
+ Cartes.CloseRing3(posses_1);
1755
+ var cEntityHole = new Entity({
1756
+ polyline: new PolylineGraphics({
1757
+ positions: posses_1,
1758
+ material: cLineColor,
1759
+ width: width,
1760
+ clampToGround: heightRef == HeightReference.CLAMP_TO_GROUND,
1761
+ classificationType: ClassificationType.TERRAIN,
1762
+ arcType: ArcType.GEODESIC,
1763
+ zIndex: zIndex
1764
+ }),
1765
+ show: false
1766
+ });
1767
+ cEntity._siblingGraphics.push(cEntityHole);
1768
+ cEntityHole._parentEntity = cEntity;
1769
+ params.viewer.entities.add(cEntityHole);
1770
+ }
1765
1771
  }
1766
1772
  params.viewer.entities.add(cEntity);
1767
1773
  return cEntity;