bruce-cesium 1.3.0 → 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.
- package/dist/bruce-cesium.es5.js +39 -17
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +38 -16
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine.js +38 -16
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -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 {
|
|
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,
|
|
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
|
-
|
|
1307
|
-
params.viewer.entities.add(
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
cEntities[entity.Bruce.ID] =
|
|
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
|
-
|
|
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);
|
|
@@ -1701,9 +1704,9 @@ var EntityRenderEngine;
|
|
|
1701
1704
|
var outerRing = pRings.find(function (x) { return x.Facing == Geometry.EPolygonRingType.Boundaries; });
|
|
1702
1705
|
var points = Geometry.ParsePoints(outerRing === null || outerRing === void 0 ? void 0 : outerRing.LinearRing);
|
|
1703
1706
|
var posses = points.map(function (x) { return Cartesian3.fromDegrees(EnsureNumber(x.longitude), EnsureNumber(x.latitude), EnsureNumber(x.altitude)); });
|
|
1707
|
+
Cartes.CloseRing3(posses);
|
|
1704
1708
|
var extrusion = getPolygonExtrusion(entity, params.tags, outerRing, posses, heightRef, style);
|
|
1705
1709
|
posses = extrusion.posses;
|
|
1706
|
-
console.log("EXTRUSION", extrusion, style);
|
|
1707
1710
|
var holeRings = pRings.filter(function (x) { return x.Facing == Geometry.EPolygonRingType.Hole; });
|
|
1708
1711
|
var holePosses = holeRings.map(function (x) {
|
|
1709
1712
|
var points = Geometry.ParsePoints(x.LinearRing);
|
|
@@ -1729,11 +1732,11 @@ var EntityRenderEngine;
|
|
|
1729
1732
|
show: false
|
|
1730
1733
|
});
|
|
1731
1734
|
cEntity._siblingGraphics = [];
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
var
|
|
1735
|
+
console.count("POLYGON WIDTH = " + width + ", COLOR = " + (cLineColor === null || cLineColor === void 0 ? void 0 : cLineColor.toCssColorString()));
|
|
1736
|
+
if (width > 0 && cLineColor) {
|
|
1737
|
+
var cEntityBorder = new Entity({
|
|
1735
1738
|
polyline: new PolylineGraphics({
|
|
1736
|
-
positions:
|
|
1739
|
+
positions: posses,
|
|
1737
1740
|
material: cLineColor,
|
|
1738
1741
|
width: width,
|
|
1739
1742
|
clampToGround: heightRef == HeightReference.CLAMP_TO_GROUND,
|
|
@@ -1743,9 +1746,28 @@ var EntityRenderEngine;
|
|
|
1743
1746
|
}),
|
|
1744
1747
|
show: false
|
|
1745
1748
|
});
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
+
params.viewer.entities.add(cEntityBorder);
|
|
1750
|
+
cEntityBorder._parentEntity = cEntity;
|
|
1751
|
+
cEntity._siblingGraphics.push(cEntityBorder);
|
|
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
|
+
}
|
|
1749
1771
|
}
|
|
1750
1772
|
params.viewer.entities.add(cEntity);
|
|
1751
1773
|
return cEntity;
|