bruce-cesium 2.5.1 → 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 +49 -37
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +48 -36
- 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/render-managers/common/point-clustering.js +12 -5
- package/dist/lib/rendering/render-managers/common/point-clustering.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js +5 -2
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +5 -2
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.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/dist/types/rendering/render-managers/common/point-clustering.d.ts +3 -1
- package/package.json +1 -1
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -1975,7 +1975,6 @@
|
|
|
1975
1975
|
rendered = rendered.filter(function (x) { return x != null; });
|
|
1976
1976
|
if (rendered.length) {
|
|
1977
1977
|
rootEntity_1 = new Cesium.Entity({});
|
|
1978
|
-
params.viewer.entities.add(rootEntity_1);
|
|
1979
1978
|
rootEntity_1._siblingGraphics = [];
|
|
1980
1979
|
rootEntity_1._renderGroup = getRenderGroupId(zoomItem, (_h = params.viewer) === null || _h === void 0 ? void 0 : _h.terrainProvider);
|
|
1981
1980
|
rootEntity_1._siblingGraphics = rootEntity_1._siblingGraphics.concat(rendered);
|
|
@@ -2179,7 +2178,7 @@
|
|
|
2179
2178
|
recordHeightRef: heightRef,
|
|
2180
2179
|
returnHeightRef: heightRef
|
|
2181
2180
|
}),
|
|
2182
|
-
show:
|
|
2181
|
+
show: true
|
|
2183
2182
|
});
|
|
2184
2183
|
}
|
|
2185
2184
|
}
|
|
@@ -2226,7 +2225,7 @@
|
|
|
2226
2225
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
2227
2226
|
},
|
|
2228
2227
|
position: pos === null || pos === void 0 ? void 0 : pos.clone(),
|
|
2229
|
-
show:
|
|
2228
|
+
show: true
|
|
2230
2229
|
});
|
|
2231
2230
|
if (outline && outlineWidth > 0) {
|
|
2232
2231
|
if (!exHeightRef && outlineHeight > 0) {
|
|
@@ -2275,16 +2274,10 @@
|
|
|
2275
2274
|
recordHeightRef: heightRef,
|
|
2276
2275
|
returnHeightRef: heightRef
|
|
2277
2276
|
}),
|
|
2278
|
-
show:
|
|
2277
|
+
show: true
|
|
2279
2278
|
});
|
|
2280
2279
|
}
|
|
2281
2280
|
if (cEntity) {
|
|
2282
|
-
params.viewer.entities.add(cEntity);
|
|
2283
|
-
if (siblings) {
|
|
2284
|
-
siblings.forEach(function (sibling) {
|
|
2285
|
-
params.viewer.entities.add(sibling);
|
|
2286
|
-
});
|
|
2287
|
-
}
|
|
2288
2281
|
cEntity._siblingGraphics = siblings;
|
|
2289
2282
|
}
|
|
2290
2283
|
return [2 /*return*/, cEntity];
|
|
@@ -2452,9 +2445,8 @@
|
|
|
2452
2445
|
recordHeightRef: heightRef,
|
|
2453
2446
|
returnHeightRef: heightRef
|
|
2454
2447
|
}),
|
|
2455
|
-
show:
|
|
2448
|
+
show: true
|
|
2456
2449
|
});
|
|
2457
|
-
params.viewer.entities.add(cEntity);
|
|
2458
2450
|
return cEntity;
|
|
2459
2451
|
}
|
|
2460
2452
|
Polyline.Render = Render;
|
|
@@ -2579,7 +2571,7 @@
|
|
|
2579
2571
|
recordHeightRef: heightRef,
|
|
2580
2572
|
returnHeightRef: heightRef
|
|
2581
2573
|
}),
|
|
2582
|
-
show:
|
|
2574
|
+
show: true
|
|
2583
2575
|
});
|
|
2584
2576
|
cEntity._siblingGraphics = [];
|
|
2585
2577
|
if (width > 0 && cLineColor) {
|
|
@@ -2630,9 +2622,8 @@
|
|
|
2630
2622
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance, width),
|
|
2631
2623
|
shadows: Cesium.ShadowMode.ENABLED
|
|
2632
2624
|
},
|
|
2633
|
-
show:
|
|
2625
|
+
show: true
|
|
2634
2626
|
});
|
|
2635
|
-
params.viewer.entities.add(cEntityBorder);
|
|
2636
2627
|
cEntityBorder._parentEntity = cEntity;
|
|
2637
2628
|
cEntity._siblingGraphics.push(cEntityBorder);
|
|
2638
2629
|
for (var i = 0; i < holePosses.length; i++) {
|
|
@@ -2662,14 +2653,12 @@
|
|
|
2662
2653
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance, width),
|
|
2663
2654
|
shadows: Cesium.ShadowMode.ENABLED,
|
|
2664
2655
|
},
|
|
2665
|
-
show:
|
|
2656
|
+
show: true
|
|
2666
2657
|
});
|
|
2667
2658
|
cEntity._siblingGraphics.push(cEntityHole);
|
|
2668
2659
|
cEntityHole._parentEntity = cEntity;
|
|
2669
|
-
params.viewer.entities.add(cEntityHole);
|
|
2670
2660
|
}
|
|
2671
2661
|
}
|
|
2672
|
-
params.viewer.entities.add(cEntity);
|
|
2673
2662
|
return cEntity;
|
|
2674
2663
|
}
|
|
2675
2664
|
Polygon.Render = Render;
|
|
@@ -2794,7 +2783,7 @@
|
|
|
2794
2783
|
},
|
|
2795
2784
|
orientation: orientation,
|
|
2796
2785
|
position: pos,
|
|
2797
|
-
show:
|
|
2786
|
+
show: true
|
|
2798
2787
|
});
|
|
2799
2788
|
var model = cEntity.model;
|
|
2800
2789
|
model._clientFileId = params.lodClientFileId;
|
|
@@ -2802,7 +2791,6 @@
|
|
|
2802
2791
|
record: scale,
|
|
2803
2792
|
style: styleScale
|
|
2804
2793
|
};
|
|
2805
|
-
params.viewer.entities.add(cEntity);
|
|
2806
2794
|
return cEntity;
|
|
2807
2795
|
}
|
|
2808
2796
|
Model3d.Render = Render;
|
|
@@ -3540,18 +3528,29 @@
|
|
|
3540
3528
|
updateCEntityShow(viewer, sibling, show, true);
|
|
3541
3529
|
}
|
|
3542
3530
|
}
|
|
3543
|
-
|
|
3544
|
-
|
|
3531
|
+
/**
|
|
3532
|
+
* Do NOT use ".show" as it causes crashes in Cesium polylines that are clamped to ground.
|
|
3533
|
+
* We could target them specifically here but we may be getting overall performance gain by just removing stuff from the scene.
|
|
3534
|
+
*/
|
|
3535
|
+
if (!show && viewer.entities.contains(visual)) {
|
|
3536
|
+
viewer.entities.remove(visual);
|
|
3537
|
+
}
|
|
3538
|
+
else if (show && !viewer.entities.contains(visual)) {
|
|
3539
|
+
viewer.entities.add(visual);
|
|
3545
3540
|
}
|
|
3546
3541
|
}
|
|
3547
3542
|
function updateEntityShow(viewer, visual, show) {
|
|
3548
|
-
if (!isAlive$1(viewer, visual)) {
|
|
3549
|
-
return;
|
|
3550
|
-
}
|
|
3551
3543
|
if (visual instanceof Cesium.Entity) {
|
|
3544
|
+
if (!(viewer === null || viewer === void 0 ? void 0 : viewer.scene) || viewer.isDestroyed()) {
|
|
3545
|
+
return;
|
|
3546
|
+
}
|
|
3552
3547
|
updateCEntityShow(viewer, visual, show, false);
|
|
3548
|
+
return;
|
|
3553
3549
|
}
|
|
3554
|
-
|
|
3550
|
+
if (!isAlive$1(viewer, visual)) {
|
|
3551
|
+
return;
|
|
3552
|
+
}
|
|
3553
|
+
if (visual instanceof Cesium.Primitive) {
|
|
3555
3554
|
if (viewer.scene.primitives.contains(visual)) {
|
|
3556
3555
|
visual.show = show;
|
|
3557
3556
|
}
|
|
@@ -4726,6 +4725,9 @@
|
|
|
4726
4725
|
}
|
|
4727
4726
|
}
|
|
4728
4727
|
}
|
|
4728
|
+
PointClustering.prototype.Update = function () {
|
|
4729
|
+
this.updateQueue.Call();
|
|
4730
|
+
};
|
|
4729
4731
|
PointClustering.prototype.queueForceUpdate = function (entityIds) {
|
|
4730
4732
|
for (var i = 0; i < entityIds.length; i++) {
|
|
4731
4733
|
if (this.updateEntityQueue.includes(entityIds[i])) {
|
|
@@ -5123,9 +5125,11 @@
|
|
|
5123
5125
|
* Will return false if entity could not be clustered and therefor should not be hidden.
|
|
5124
5126
|
* @param id
|
|
5125
5127
|
* @param entity
|
|
5128
|
+
* @param queueUpdate
|
|
5126
5129
|
* @returns
|
|
5127
5130
|
*/
|
|
5128
|
-
PointClustering.prototype.AddEntity = function (id, entity) {
|
|
5131
|
+
PointClustering.prototype.AddEntity = function (id, entity, queueUpdate) {
|
|
5132
|
+
if (queueUpdate === void 0) { queueUpdate = true; }
|
|
5129
5133
|
if (this.disposed) {
|
|
5130
5134
|
return false;
|
|
5131
5135
|
}
|
|
@@ -5169,15 +5173,17 @@
|
|
|
5169
5173
|
this.iconUrl = iconUrl;
|
|
5170
5174
|
}
|
|
5171
5175
|
}
|
|
5176
|
+
if (this.registeredEntityIds.has(id)) {
|
|
5177
|
+
this.RemoveEntity(id, false);
|
|
5178
|
+
}
|
|
5172
5179
|
var added = this.addPoint(id, pos3d);
|
|
5173
5180
|
if (!added) {
|
|
5174
5181
|
return false;
|
|
5175
5182
|
}
|
|
5176
|
-
if (this.registeredEntityIds.has(id)) {
|
|
5177
|
-
this.RemoveEntity(id, false);
|
|
5178
|
-
}
|
|
5179
5183
|
this.registeredEntityIds.add(id);
|
|
5180
|
-
|
|
5184
|
+
if (queueUpdate) {
|
|
5185
|
+
this.updateQueue.Call();
|
|
5186
|
+
}
|
|
5181
5187
|
return true;
|
|
5182
5188
|
};
|
|
5183
5189
|
/**
|
|
@@ -5537,7 +5543,7 @@
|
|
|
5537
5543
|
menuItemId: this.item.id
|
|
5538
5544
|
})) === null || _b === void 0 ? void 0 : _b.visual;
|
|
5539
5545
|
if (!visual || visual != cEntity) {
|
|
5540
|
-
wasClustered = this.clustering ? this.clustering.AddEntity(id, cEntity) : false;
|
|
5546
|
+
wasClustered = this.clustering ? this.clustering.AddEntity(id, cEntity, false) : false;
|
|
5541
5547
|
tagIds = (_c = entity.Bruce) === null || _c === void 0 ? void 0 : _c["Layer.ID"];
|
|
5542
5548
|
rego = {
|
|
5543
5549
|
entityId: id,
|
|
@@ -5563,10 +5569,13 @@
|
|
|
5563
5569
|
menuItemId: this.item.id,
|
|
5564
5570
|
requestRender: false
|
|
5565
5571
|
});
|
|
5566
|
-
(_d = this.clustering) === null || _d === void 0 ? void 0 : _d.RemoveEntity(id);
|
|
5572
|
+
(_d = this.clustering) === null || _d === void 0 ? void 0 : _d.RemoveEntity(id, false);
|
|
5567
5573
|
}
|
|
5568
5574
|
}
|
|
5569
5575
|
this.viewer.scene.requestRender();
|
|
5576
|
+
if (this.clustering && entities.length) {
|
|
5577
|
+
this.clustering.Update();
|
|
5578
|
+
}
|
|
5570
5579
|
return [3 /*break*/, 3];
|
|
5571
5580
|
case 2:
|
|
5572
5581
|
e_3 = _e.sent();
|
|
@@ -5984,7 +5993,7 @@
|
|
|
5984
5993
|
menuItemId: this.item.id
|
|
5985
5994
|
})) === null || _a === void 0 ? void 0 : _a.visual;
|
|
5986
5995
|
if (!visual || visual != cEntity) {
|
|
5987
|
-
clustered = this.clustering ? this.clustering.AddEntity(id, cEntity) : false;
|
|
5996
|
+
clustered = this.clustering ? this.clustering.AddEntity(id, cEntity, false) : false;
|
|
5988
5997
|
this.visualsManager.AddRego({
|
|
5989
5998
|
rego: {
|
|
5990
5999
|
entityId: id,
|
|
@@ -6006,10 +6015,13 @@
|
|
|
6006
6015
|
menuItemId: this.item.id,
|
|
6007
6016
|
requestRender: false
|
|
6008
6017
|
});
|
|
6009
|
-
(_b = this.clustering) === null || _b === void 0 ? void 0 : _b.RemoveEntity(id);
|
|
6018
|
+
(_b = this.clustering) === null || _b === void 0 ? void 0 : _b.RemoveEntity(id, false);
|
|
6010
6019
|
}
|
|
6011
6020
|
}
|
|
6012
6021
|
this.viewer.scene.requestRender();
|
|
6022
|
+
if (this.clustering && entities.length) {
|
|
6023
|
+
this.clustering.Update();
|
|
6024
|
+
}
|
|
6013
6025
|
return [3 /*break*/, 4];
|
|
6014
6026
|
case 3:
|
|
6015
6027
|
e_2 = _c.sent();
|
|
@@ -14793,7 +14805,7 @@
|
|
|
14793
14805
|
ViewerUtils.CreateWidgets = CreateWidgets;
|
|
14794
14806
|
})(exports.ViewerUtils || (exports.ViewerUtils = {}));
|
|
14795
14807
|
|
|
14796
|
-
var VERSION$1 = "2.5.
|
|
14808
|
+
var VERSION$1 = "2.5.3";
|
|
14797
14809
|
|
|
14798
14810
|
exports.VERSION = VERSION$1;
|
|
14799
14811
|
exports.CesiumViewMonitor = CesiumViewMonitor;
|