bruce-cesium 1.1.4 → 1.1.5
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 +38 -29
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +37 -28
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine.js +27 -18
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js +5 -5
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/lib/utils/entity-utils.js +5 -5
- package/dist/lib/utils/entity-utils.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, DelayQueue, Entity as Entity$1, BatchedDataGetter, EntityRelationType, ObjectUtils, 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, OrthographicFrustum, JulianDate, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, Matrix4, Cesium3DTileStyle, Cesium3DTileset, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, CallbackProperty, ColorMaterialProperty, Rectangle, Matrix3, EasingFunction, GeometryInstance, createOsmBuildings, KmlDataSource } from 'cesium';
|
|
3
3
|
|
|
4
4
|
var TIME_LAG = 300;
|
|
5
5
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -545,14 +545,14 @@ function EnsureNumber(value, defaultNum) {
|
|
|
545
545
|
return value;
|
|
546
546
|
}
|
|
547
547
|
|
|
548
|
-
function traverseEntity(cEntity, arr) {
|
|
549
|
-
if (cEntity._parentEntity) {
|
|
550
|
-
traverseEntity(cEntity._parentEntity, arr);
|
|
548
|
+
function traverseEntity(cEntity, arr, ignoreParent) {
|
|
549
|
+
if (cEntity._parentEntity && !ignoreParent) {
|
|
550
|
+
traverseEntity(cEntity._parentEntity, arr, false);
|
|
551
551
|
}
|
|
552
552
|
if (cEntity._siblingGraphics) {
|
|
553
553
|
for (var i = 0; i < cEntity._siblingGraphics.length; i++) {
|
|
554
554
|
var sibling = cEntity._siblingGraphics[i];
|
|
555
|
-
traverseEntity(sibling, arr);
|
|
555
|
+
traverseEntity(sibling, arr, true);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
arr.push(cEntity);
|
|
@@ -833,7 +833,7 @@ var EntityUtils;
|
|
|
833
833
|
if (entity instanceof Entity) {
|
|
834
834
|
var cEntity = entity;
|
|
835
835
|
var items = [];
|
|
836
|
-
traverseEntity(cEntity, items);
|
|
836
|
+
traverseEntity(cEntity, items, false);
|
|
837
837
|
return items;
|
|
838
838
|
}
|
|
839
839
|
return [entity];
|
|
@@ -1297,28 +1297,37 @@ var EntityRenderEngine;
|
|
|
1297
1297
|
}
|
|
1298
1298
|
EntityRenderEngine.Render = Render;
|
|
1299
1299
|
function Remove(params) {
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
entity: entity._parentEntity
|
|
1308
|
-
});
|
|
1309
|
-
}
|
|
1310
|
-
if (entity._siblingGraphics) {
|
|
1311
|
-
for (var i = 0; i < entity._siblingGraphics.length; i++) {
|
|
1312
|
-
var sibling = entity._siblingGraphics[i];
|
|
1313
|
-
Remove({
|
|
1300
|
+
function doRemove(params) {
|
|
1301
|
+
var viewer = params.viewer, entity = params.entity, ignoreParent = params.ignoreParent;
|
|
1302
|
+
if (viewer.isDestroyed()) {
|
|
1303
|
+
return;
|
|
1304
|
+
}
|
|
1305
|
+
if (entity._parentEntity && !ignoreParent) {
|
|
1306
|
+
doRemove({
|
|
1314
1307
|
viewer: viewer,
|
|
1315
|
-
entity:
|
|
1308
|
+
entity: entity._parentEntity,
|
|
1309
|
+
ignoreParent: false
|
|
1316
1310
|
});
|
|
1317
1311
|
}
|
|
1312
|
+
if (entity._siblingGraphics) {
|
|
1313
|
+
for (var i = 0; i < entity._siblingGraphics.length; i++) {
|
|
1314
|
+
var sibling = entity._siblingGraphics[i];
|
|
1315
|
+
doRemove({
|
|
1316
|
+
viewer: viewer,
|
|
1317
|
+
entity: sibling,
|
|
1318
|
+
ignoreParent: true
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
if (viewer.entities.contains(entity)) {
|
|
1323
|
+
viewer.entities.remove(entity);
|
|
1324
|
+
}
|
|
1318
1325
|
}
|
|
1319
|
-
|
|
1320
|
-
viewer.
|
|
1321
|
-
|
|
1326
|
+
doRemove({
|
|
1327
|
+
viewer: params.viewer,
|
|
1328
|
+
entity: params.entity,
|
|
1329
|
+
ignoreParent: false
|
|
1330
|
+
});
|
|
1322
1331
|
}
|
|
1323
1332
|
EntityRenderEngine.Remove = Remove;
|
|
1324
1333
|
var Point;
|
|
@@ -2840,7 +2849,7 @@ var RelationRenderEngine;
|
|
|
2840
2849
|
})(RelationRenderEngine || (RelationRenderEngine = {}));
|
|
2841
2850
|
|
|
2842
2851
|
function removeEntity(viewer, visual) {
|
|
2843
|
-
unmarkEntity(visual);
|
|
2852
|
+
unmarkEntity(visual, false);
|
|
2844
2853
|
if (visual instanceof Entity) {
|
|
2845
2854
|
EntityRenderEngine.Remove({
|
|
2846
2855
|
viewer: viewer,
|
|
@@ -2944,17 +2953,17 @@ function markEntity(register, rego, visual) {
|
|
|
2944
2953
|
}
|
|
2945
2954
|
}
|
|
2946
2955
|
}
|
|
2947
|
-
function unmarkEntity(visual) {
|
|
2956
|
+
function unmarkEntity(visual, ignoreParent) {
|
|
2948
2957
|
var vis = visual;
|
|
2949
2958
|
vis._register = null;
|
|
2950
2959
|
if (visual instanceof Entity) {
|
|
2951
2960
|
var visEnt = visual;
|
|
2952
|
-
if (visEnt._parentEntity) {
|
|
2953
|
-
unmarkEntity(visEnt._parentEntity);
|
|
2961
|
+
if (visEnt._parentEntity && !ignoreParent) {
|
|
2962
|
+
unmarkEntity(visEnt._parentEntity, false);
|
|
2954
2963
|
}
|
|
2955
2964
|
if (visEnt._siblingGraphics) {
|
|
2956
2965
|
for (var i = 0; i < visEnt._siblingGraphics.length; i++) {
|
|
2957
|
-
unmarkEntity(visEnt._siblingGraphics[i]);
|
|
2966
|
+
unmarkEntity(visEnt._siblingGraphics[i], true);
|
|
2958
2967
|
}
|
|
2959
2968
|
}
|
|
2960
2969
|
}
|