bruce-cesium 5.6.5 → 5.6.6
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 +64 -35
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +63 -34
- 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 +6 -8
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/render-managers/common/entity-label.js +2 -2
- package/dist/lib/rendering/render-managers/common/entity-label.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +8 -11
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js +1 -2
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/lib/rendering/tileset-styler.js +47 -12
- package/dist/lib/rendering/tileset-styler.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/entity-render-engine.d.ts +1 -1
- package/dist/types/rendering/tileset-styler.d.ts +6 -0
- package/dist/types/rendering/visuals-register.d.ts +0 -1
- package/package.json +2 -2
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -8278,7 +8278,7 @@
|
|
|
8278
8278
|
}
|
|
8279
8279
|
|
|
8280
8280
|
/**
|
|
8281
|
-
* Returns if the
|
|
8281
|
+
* Returns if the outline metadata is different.
|
|
8282
8282
|
* @param rego
|
|
8283
8283
|
* @param entity
|
|
8284
8284
|
*/
|
|
@@ -8327,7 +8327,7 @@
|
|
|
8327
8327
|
}
|
|
8328
8328
|
EntityRenderEngine.GetRenderGroupId = GetRenderGroupId;
|
|
8329
8329
|
async function Render(params) {
|
|
8330
|
-
var _a, _b, _c, _d
|
|
8330
|
+
var _a, _b, _c, _d;
|
|
8331
8331
|
const groupRenderParams = {
|
|
8332
8332
|
apiGetter: params.apiGetter,
|
|
8333
8333
|
viewer: params.viewer,
|
|
@@ -8410,8 +8410,7 @@
|
|
|
8410
8410
|
if (!params.force &&
|
|
8411
8411
|
newRenderId == oldRenderId &&
|
|
8412
8412
|
!(existingRego === null || existingRego === void 0 ? void 0 : existingRego.stale) &&
|
|
8413
|
-
!isOutlineChanged(existingRego, entity)
|
|
8414
|
-
((existingRego === null || existingRego === void 0 ? void 0 : existingRego.scenario) == ((_b = entity.Bruce) === null || _b === void 0 ? void 0 : _b.Scenario))) {
|
|
8413
|
+
!isOutlineChanged(existingRego, entity)) {
|
|
8415
8414
|
// No sorting category needed. Already rendered the way we want.
|
|
8416
8415
|
cEntities.set(id, existingRego.visual);
|
|
8417
8416
|
}
|
|
@@ -8422,9 +8421,8 @@
|
|
|
8422
8421
|
// Flag as no longer stale as we're unlikely to recreate the rego if we're reusing the graphic.
|
|
8423
8422
|
existingRego.stale = false;
|
|
8424
8423
|
// Update metadata for the same reason.
|
|
8425
|
-
existingRego.outline = (
|
|
8424
|
+
existingRego.outline = (_b = entity.Bruce) === null || _b === void 0 ? void 0 : _b.Outline;
|
|
8426
8425
|
existingRego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
8427
|
-
existingRego.scenario = (_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d.Scenario;
|
|
8428
8426
|
updated.set(id, true);
|
|
8429
8427
|
}
|
|
8430
8428
|
if (displayType == BModels.ZoomControl.EDisplayType.Model3D) {
|
|
@@ -8437,7 +8435,7 @@
|
|
|
8437
8435
|
entity: entity,
|
|
8438
8436
|
path: ["Bruce", "VectorGeometry"]
|
|
8439
8437
|
});
|
|
8440
|
-
if ((
|
|
8438
|
+
if ((_c = geometry === null || geometry === void 0 ? void 0 : geometry.MultiGeometry) === null || _c === void 0 ? void 0 : _c.length) {
|
|
8441
8439
|
multiGeometry.push(entity);
|
|
8442
8440
|
}
|
|
8443
8441
|
else {
|
|
@@ -8480,7 +8478,7 @@
|
|
|
8480
8478
|
entity: entity,
|
|
8481
8479
|
path: ["Bruce", "VectorGeometry"]
|
|
8482
8480
|
});
|
|
8483
|
-
if (!((
|
|
8481
|
+
if (!((_d = geometry === null || geometry === void 0 ? void 0 : geometry.MultiGeometry) === null || _d === void 0 ? void 0 : _d.length)) {
|
|
8484
8482
|
polygons.push(entity);
|
|
8485
8483
|
continue;
|
|
8486
8484
|
}
|
|
@@ -9610,7 +9608,7 @@
|
|
|
9610
9608
|
}
|
|
9611
9609
|
clearTimeout(this.loadTimeout);
|
|
9612
9610
|
this.loadTimeout = setTimeout(async () => {
|
|
9613
|
-
var _a, _b;
|
|
9611
|
+
var _a, _b, _c, _d;
|
|
9614
9612
|
if (this.disposed || this.counter != counter) {
|
|
9615
9613
|
return;
|
|
9616
9614
|
}
|
|
@@ -9644,7 +9642,7 @@
|
|
|
9644
9642
|
api: this.api,
|
|
9645
9643
|
entityId: this.rego.entityId,
|
|
9646
9644
|
entityTypeId: this.rego.entityTypeId,
|
|
9647
|
-
scenario: this.rego.
|
|
9645
|
+
scenario: ((_c = this.rego.outline) === null || _c === void 0 ? void 0 : _c.length) ? (_d = this.rego.outline.find(x => !!x.Scenario)) === null || _d === void 0 ? void 0 : _d.Scenario : null,
|
|
9648
9646
|
schemaId: this.rego.schema,
|
|
9649
9647
|
migrated: true
|
|
9650
9648
|
});
|
|
@@ -13374,7 +13372,7 @@
|
|
|
13374
13372
|
* @returns
|
|
13375
13373
|
*/
|
|
13376
13374
|
const register = (thing) => {
|
|
13377
|
-
var _a, _b, _c, _d, _e, _f
|
|
13375
|
+
var _a, _b, _c, _d, _e, _f;
|
|
13378
13376
|
// See if the cesium entity already exists in a group.
|
|
13379
13377
|
let group = groups.find((x) => { var _a; return ((_a = x.visual) === null || _a === void 0 ? void 0 : _a.id) == thing.id || x.siblings.find(x => (x === null || x === void 0 ? void 0 : x.id) == thing.id); });
|
|
13380
13378
|
if (group) {
|
|
@@ -13417,8 +13415,7 @@
|
|
|
13417
13415
|
})) !== null && _d !== void 0 ? _d : "Unnamed Entity" : "Unnamed Entity",
|
|
13418
13416
|
cdn: this.item.cdnEnabled,
|
|
13419
13417
|
collection: source.entities,
|
|
13420
|
-
|
|
13421
|
-
outline: (_h = (_g = group.data) === null || _g === void 0 ? void 0 : _g.Bruce) === null || _h === void 0 ? void 0 : _h.Outline,
|
|
13418
|
+
outline: (_f = (_e = group.data) === null || _e === void 0 ? void 0 : _e.Bruce) === null || _f === void 0 ? void 0 : _f.Outline,
|
|
13422
13419
|
};
|
|
13423
13420
|
group.rego = rego;
|
|
13424
13421
|
this.visualsManager.AddRego({
|
|
@@ -13464,7 +13461,7 @@
|
|
|
13464
13461
|
* @returns
|
|
13465
13462
|
*/
|
|
13466
13463
|
async renderAsIndividuals(entities, force = false) {
|
|
13467
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
13464
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
13468
13465
|
// Entity ID -> historic records array.
|
|
13469
13466
|
// We load this as extra information when rendering historic records.
|
|
13470
13467
|
// This way we know what to animate towards as time changes.
|
|
@@ -13565,8 +13562,7 @@
|
|
|
13565
13562
|
overrideShow: wasClustered ? false : null,
|
|
13566
13563
|
name: cEntity.name,
|
|
13567
13564
|
cdn: this.item.cdnEnabled,
|
|
13568
|
-
outline: (_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.Outline
|
|
13569
|
-
scenario: (_h = entity.Bruce) === null || _h === void 0 ? void 0 : _h.Scenario
|
|
13565
|
+
outline: (_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.Outline
|
|
13570
13566
|
};
|
|
13571
13567
|
this.visualsManager.AddRego({
|
|
13572
13568
|
rego,
|
|
@@ -13577,11 +13573,10 @@
|
|
|
13577
13573
|
rego.name = cEntity.name;
|
|
13578
13574
|
rego.visual = cEntity;
|
|
13579
13575
|
rego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
13580
|
-
rego.tagIds = ((
|
|
13581
|
-
rego.outline = (
|
|
13576
|
+
rego.tagIds = ((_h = entity.Bruce) === null || _h === void 0 ? void 0 : _h["Layer.ID"]) ? [].concat(entity.Bruce["Layer.ID"]) : [];
|
|
13577
|
+
rego.outline = (_j = entity.Bruce) === null || _j === void 0 ? void 0 : _j.Outline;
|
|
13582
13578
|
rego.cdn = this.item.cdnEnabled;
|
|
13583
|
-
rego.schema = (
|
|
13584
|
-
rego.scenario = (_m = entity.Bruce) === null || _m === void 0 ? void 0 : _m.Scenario;
|
|
13579
|
+
rego.schema = (_k = entity.Bruce) === null || _k === void 0 ? void 0 : _k.Schema;
|
|
13585
13580
|
// Marked as stale meaning some change was performed that requires a refresh.
|
|
13586
13581
|
// This usually means a new sibling was added that we need to update.
|
|
13587
13582
|
if (rego.stale) {
|
|
@@ -13611,7 +13606,7 @@
|
|
|
13611
13606
|
menuItemId: this.item.id,
|
|
13612
13607
|
requestRender: false
|
|
13613
13608
|
});
|
|
13614
|
-
(
|
|
13609
|
+
(_l = this.clustering) === null || _l === void 0 ? void 0 : _l.RemoveEntity(id, false);
|
|
13615
13610
|
}
|
|
13616
13611
|
}
|
|
13617
13612
|
this.viewer.scene.requestRender();
|
|
@@ -15396,6 +15391,47 @@
|
|
|
15396
15391
|
function colorToCColor$3(color) {
|
|
15397
15392
|
return new Cesium.Color(color.red ? color.red / 255 : 0, color.green ? color.green / 255 : 0, color.blue ? color.blue / 255 : 0, color.alpha);
|
|
15398
15393
|
}
|
|
15394
|
+
/**
|
|
15395
|
+
* Returns if the outline metadata is different.
|
|
15396
|
+
* @param rego
|
|
15397
|
+
* @param entity
|
|
15398
|
+
*/
|
|
15399
|
+
function isOutlineChanged$1(rego, entity) {
|
|
15400
|
+
var _a, _b, _c, _d, _e, _f;
|
|
15401
|
+
if (((_a = rego === null || rego === void 0 ? void 0 : rego.outline) === null || _a === void 0 ? void 0 : _a.length) != ((_c = (_b = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _b === void 0 ? void 0 : _b.Outline) === null || _c === void 0 ? void 0 : _c.length)) {
|
|
15402
|
+
return true;
|
|
15403
|
+
}
|
|
15404
|
+
else if (!(rego === null || rego === void 0 ? void 0 : rego.outline) && !((_d = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _d === void 0 ? void 0 : _d.Outline)) {
|
|
15405
|
+
return false;
|
|
15406
|
+
}
|
|
15407
|
+
else if (!(rego === null || rego === void 0 ? void 0 : rego.outline) || !((_e = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _e === void 0 ? void 0 : _e.Outline)) {
|
|
15408
|
+
return true;
|
|
15409
|
+
}
|
|
15410
|
+
// Compare each item.
|
|
15411
|
+
for (let i = 0; i < rego.outline.length; i++) {
|
|
15412
|
+
const rOutline = rego.outline[i];
|
|
15413
|
+
const eOutline = (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.Outline[i];
|
|
15414
|
+
if (rOutline.Kind !== eOutline.Kind) {
|
|
15415
|
+
return true;
|
|
15416
|
+
}
|
|
15417
|
+
else if (rOutline.DateTime !== eOutline.DateTime) {
|
|
15418
|
+
return true;
|
|
15419
|
+
}
|
|
15420
|
+
else if (rOutline.Scenario !== eOutline.Scenario) {
|
|
15421
|
+
return true;
|
|
15422
|
+
}
|
|
15423
|
+
else if (rOutline.Baseline !== eOutline.Baseline) {
|
|
15424
|
+
return true;
|
|
15425
|
+
}
|
|
15426
|
+
else if (rOutline["Source.ID"] !== eOutline["Source.ID"]) {
|
|
15427
|
+
return true;
|
|
15428
|
+
}
|
|
15429
|
+
else if (rOutline["EntityType.Source.ID"] !== eOutline["EntityType.Source.ID"]) {
|
|
15430
|
+
return true;
|
|
15431
|
+
}
|
|
15432
|
+
}
|
|
15433
|
+
return false;
|
|
15434
|
+
}
|
|
15399
15435
|
class TilesetStyler {
|
|
15400
15436
|
constructor() {
|
|
15401
15437
|
this.disposed = false;
|
|
@@ -15838,7 +15874,7 @@
|
|
|
15838
15874
|
this.styleTilesetFeatureFullData(rego, null, []);
|
|
15839
15875
|
}
|
|
15840
15876
|
styleTilesetFeatureFullData(rego, data, tags) {
|
|
15841
|
-
var _a, _b
|
|
15877
|
+
var _a, _b;
|
|
15842
15878
|
const visual = rego.visual;
|
|
15843
15879
|
if (!visual || !(visual instanceof Cesium.Cesium3DTileFeature)) {
|
|
15844
15880
|
return;
|
|
@@ -15864,17 +15900,11 @@
|
|
|
15864
15900
|
this._styleProgressQueue.Call();
|
|
15865
15901
|
// Since we only need to update it for scenarios right now.
|
|
15866
15902
|
// We'll avoid doing it if not needed, eg: first render and no scenario (same state as default).
|
|
15867
|
-
if (this.shouldUpdateRegoStates && (override ||
|
|
15903
|
+
if (this.shouldUpdateRegoStates && (override || this.historic)) {
|
|
15868
15904
|
// Update the Entity's rego state.
|
|
15869
15905
|
let changed = false;
|
|
15870
|
-
|
|
15871
|
-
|
|
15872
|
-
rego.scenario = (_d = data === null || data === void 0 ? void 0 : data.Bruce) === null || _d === void 0 ? void 0 : _d.Scenario;
|
|
15873
|
-
changed = true;
|
|
15874
|
-
}
|
|
15875
|
-
// Changed historic.
|
|
15876
|
-
if ((data && isOutlineChanged(rego, data)) || (!data && ((_e = rego.outline) === null || _e === void 0 ? void 0 : _e.length) && !((_g = (_f = data.Bruce) === null || _f === void 0 ? void 0 : _f.Outline) === null || _g === void 0 ? void 0 : _g.length))) {
|
|
15877
|
-
rego.outline = (_h = data === null || data === void 0 ? void 0 : data.Bruce) === null || _h === void 0 ? void 0 : _h.Outline;
|
|
15906
|
+
if (isOutlineChanged$1(rego, data)) {
|
|
15907
|
+
rego.outline = (_b = data === null || data === void 0 ? void 0 : data.Bruce) === null || _b === void 0 ? void 0 : _b.Outline;
|
|
15878
15908
|
changed = true;
|
|
15879
15909
|
}
|
|
15880
15910
|
// Something changed, trigger a rego update.
|
|
@@ -17739,8 +17769,7 @@
|
|
|
17739
17769
|
accountId: accountId,
|
|
17740
17770
|
tilesetId: (_c = this.item.tileset) === null || _c === void 0 ? void 0 : _c.TilesetID,
|
|
17741
17771
|
tilesetType: BModels.Tileset.EType.Cad,
|
|
17742
|
-
rootId: this.rootId
|
|
17743
|
-
scenario: null
|
|
17772
|
+
rootId: this.rootId
|
|
17744
17773
|
};
|
|
17745
17774
|
const featureAny = feature;
|
|
17746
17775
|
const propertyNames = featureAny.getPropertyNames ? featureAny.getPropertyNames() : (_d = featureAny.getPropertyIds) === null || _d === void 0 ? void 0 : _d.call(featureAny);
|
|
@@ -31617,7 +31646,7 @@
|
|
|
31617
31646
|
}
|
|
31618
31647
|
}
|
|
31619
31648
|
|
|
31620
|
-
const VERSION = "5.6.
|
|
31649
|
+
const VERSION = "5.6.6";
|
|
31621
31650
|
|
|
31622
31651
|
exports.VERSION = VERSION;
|
|
31623
31652
|
exports.isOutlineChanged = isOutlineChanged;
|