bruce-cesium 2.5.2 → 2.5.3
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 +27 -28
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +26 -27
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine.js +8 -20
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js +17 -6
- package/dist/lib/rendering/visuals-register.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
1
|
import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, EntityRelationType, DelayQueue, BatchedDataGetter, 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,
|
|
3
|
+
import { Cartographic, Cartesian2, CallbackProperty, Cartesian3, Color, Rectangle, Math as Math$1, HeightReference, DistanceDisplayCondition, NearFarScalar, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, SceneMode, Cesium3DTileColorBlendMode, HeadingPitchRange, createOsmBuildings, Cesium3DTileStyle, KmlDataSource, OrthographicFrustum, JulianDate, EllipsoidGeodesic, EllipsoidTerrainProvider, sampleTerrainMostDetailed, defined, Cesium3DTileset, Model, PolygonPipeline, ColorMaterialProperty, Matrix3, Matrix4, EasingFunction, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, IonResource, CesiumInspector, createWorldTerrain, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, Ion, BoundingSphere } from 'cesium';
|
|
4
4
|
|
|
5
5
|
var TIME_LAG = 300;
|
|
6
6
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -1978,7 +1978,6 @@ var EntityRenderEngine;
|
|
|
1978
1978
|
rendered = rendered.filter(function (x) { return x != null; });
|
|
1979
1979
|
if (rendered.length) {
|
|
1980
1980
|
rootEntity_1 = new Entity({});
|
|
1981
|
-
params.viewer.entities.add(rootEntity_1);
|
|
1982
1981
|
rootEntity_1._siblingGraphics = [];
|
|
1983
1982
|
rootEntity_1._renderGroup = getRenderGroupId(zoomItem, (_h = params.viewer) === null || _h === void 0 ? void 0 : _h.terrainProvider);
|
|
1984
1983
|
rootEntity_1._siblingGraphics = rootEntity_1._siblingGraphics.concat(rendered);
|
|
@@ -2182,7 +2181,7 @@ var EntityRenderEngine;
|
|
|
2182
2181
|
recordHeightRef: heightRef,
|
|
2183
2182
|
returnHeightRef: heightRef
|
|
2184
2183
|
}),
|
|
2185
|
-
show:
|
|
2184
|
+
show: true
|
|
2186
2185
|
});
|
|
2187
2186
|
}
|
|
2188
2187
|
}
|
|
@@ -2229,7 +2228,7 @@ var EntityRenderEngine;
|
|
|
2229
2228
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
2230
2229
|
},
|
|
2231
2230
|
position: pos === null || pos === void 0 ? void 0 : pos.clone(),
|
|
2232
|
-
show:
|
|
2231
|
+
show: true
|
|
2233
2232
|
});
|
|
2234
2233
|
if (outline && outlineWidth > 0) {
|
|
2235
2234
|
if (!exHeightRef && outlineHeight > 0) {
|
|
@@ -2278,16 +2277,10 @@ var EntityRenderEngine;
|
|
|
2278
2277
|
recordHeightRef: heightRef,
|
|
2279
2278
|
returnHeightRef: heightRef
|
|
2280
2279
|
}),
|
|
2281
|
-
show:
|
|
2280
|
+
show: true
|
|
2282
2281
|
});
|
|
2283
2282
|
}
|
|
2284
2283
|
if (cEntity) {
|
|
2285
|
-
params.viewer.entities.add(cEntity);
|
|
2286
|
-
if (siblings) {
|
|
2287
|
-
siblings.forEach(function (sibling) {
|
|
2288
|
-
params.viewer.entities.add(sibling);
|
|
2289
|
-
});
|
|
2290
|
-
}
|
|
2291
2284
|
cEntity._siblingGraphics = siblings;
|
|
2292
2285
|
}
|
|
2293
2286
|
return [2 /*return*/, cEntity];
|
|
@@ -2455,9 +2448,8 @@ var EntityRenderEngine;
|
|
|
2455
2448
|
recordHeightRef: heightRef,
|
|
2456
2449
|
returnHeightRef: heightRef
|
|
2457
2450
|
}),
|
|
2458
|
-
show:
|
|
2451
|
+
show: true
|
|
2459
2452
|
});
|
|
2460
|
-
params.viewer.entities.add(cEntity);
|
|
2461
2453
|
return cEntity;
|
|
2462
2454
|
}
|
|
2463
2455
|
Polyline.Render = Render;
|
|
@@ -2582,7 +2574,7 @@ var EntityRenderEngine;
|
|
|
2582
2574
|
recordHeightRef: heightRef,
|
|
2583
2575
|
returnHeightRef: heightRef
|
|
2584
2576
|
}),
|
|
2585
|
-
show:
|
|
2577
|
+
show: true
|
|
2586
2578
|
});
|
|
2587
2579
|
cEntity._siblingGraphics = [];
|
|
2588
2580
|
if (width > 0 && cLineColor) {
|
|
@@ -2633,9 +2625,8 @@ var EntityRenderEngine;
|
|
|
2633
2625
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance, width),
|
|
2634
2626
|
shadows: ShadowMode.ENABLED
|
|
2635
2627
|
},
|
|
2636
|
-
show:
|
|
2628
|
+
show: true
|
|
2637
2629
|
});
|
|
2638
|
-
params.viewer.entities.add(cEntityBorder);
|
|
2639
2630
|
cEntityBorder._parentEntity = cEntity;
|
|
2640
2631
|
cEntity._siblingGraphics.push(cEntityBorder);
|
|
2641
2632
|
for (var i = 0; i < holePosses.length; i++) {
|
|
@@ -2665,14 +2656,12 @@ var EntityRenderEngine;
|
|
|
2665
2656
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance, width),
|
|
2666
2657
|
shadows: ShadowMode.ENABLED,
|
|
2667
2658
|
},
|
|
2668
|
-
show:
|
|
2659
|
+
show: true
|
|
2669
2660
|
});
|
|
2670
2661
|
cEntity._siblingGraphics.push(cEntityHole);
|
|
2671
2662
|
cEntityHole._parentEntity = cEntity;
|
|
2672
|
-
params.viewer.entities.add(cEntityHole);
|
|
2673
2663
|
}
|
|
2674
2664
|
}
|
|
2675
|
-
params.viewer.entities.add(cEntity);
|
|
2676
2665
|
return cEntity;
|
|
2677
2666
|
}
|
|
2678
2667
|
Polygon.Render = Render;
|
|
@@ -2797,7 +2786,7 @@ var EntityRenderEngine;
|
|
|
2797
2786
|
},
|
|
2798
2787
|
orientation: orientation,
|
|
2799
2788
|
position: pos,
|
|
2800
|
-
show:
|
|
2789
|
+
show: true
|
|
2801
2790
|
});
|
|
2802
2791
|
var model = cEntity.model;
|
|
2803
2792
|
model._clientFileId = params.lodClientFileId;
|
|
@@ -2805,7 +2794,6 @@ var EntityRenderEngine;
|
|
|
2805
2794
|
record: scale,
|
|
2806
2795
|
style: styleScale
|
|
2807
2796
|
};
|
|
2808
|
-
params.viewer.entities.add(cEntity);
|
|
2809
2797
|
return cEntity;
|
|
2810
2798
|
}
|
|
2811
2799
|
Model3d.Render = Render;
|
|
@@ -3543,18 +3531,29 @@ function updateCEntityShow(viewer, visual, show, ignoreParent) {
|
|
|
3543
3531
|
updateCEntityShow(viewer, sibling, show, true);
|
|
3544
3532
|
}
|
|
3545
3533
|
}
|
|
3546
|
-
|
|
3547
|
-
|
|
3534
|
+
/**
|
|
3535
|
+
* Do NOT use ".show" as it causes crashes in Cesium polylines that are clamped to ground.
|
|
3536
|
+
* We could target them specifically here but we may be getting overall performance gain by just removing stuff from the scene.
|
|
3537
|
+
*/
|
|
3538
|
+
if (!show && viewer.entities.contains(visual)) {
|
|
3539
|
+
viewer.entities.remove(visual);
|
|
3540
|
+
}
|
|
3541
|
+
else if (show && !viewer.entities.contains(visual)) {
|
|
3542
|
+
viewer.entities.add(visual);
|
|
3548
3543
|
}
|
|
3549
3544
|
}
|
|
3550
3545
|
function updateEntityShow(viewer, visual, show) {
|
|
3551
|
-
if (!isAlive$1(viewer, visual)) {
|
|
3552
|
-
return;
|
|
3553
|
-
}
|
|
3554
3546
|
if (visual instanceof Entity) {
|
|
3547
|
+
if (!(viewer === null || viewer === void 0 ? void 0 : viewer.scene) || viewer.isDestroyed()) {
|
|
3548
|
+
return;
|
|
3549
|
+
}
|
|
3555
3550
|
updateCEntityShow(viewer, visual, show, false);
|
|
3551
|
+
return;
|
|
3556
3552
|
}
|
|
3557
|
-
|
|
3553
|
+
if (!isAlive$1(viewer, visual)) {
|
|
3554
|
+
return;
|
|
3555
|
+
}
|
|
3556
|
+
if (visual instanceof Primitive) {
|
|
3558
3557
|
if (viewer.scene.primitives.contains(visual)) {
|
|
3559
3558
|
visual.show = show;
|
|
3560
3559
|
}
|
|
@@ -14860,7 +14859,7 @@ var ViewerUtils;
|
|
|
14860
14859
|
ViewerUtils.CreateWidgets = CreateWidgets;
|
|
14861
14860
|
})(ViewerUtils || (ViewerUtils = {}));
|
|
14862
14861
|
|
|
14863
|
-
var VERSION$1 = "2.5.
|
|
14862
|
+
var VERSION$1 = "2.5.3";
|
|
14864
14863
|
|
|
14865
14864
|
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 };
|
|
14866
14865
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|