bruce-cesium 7.8.9 → 7.9.1
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 +43 -18
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +41 -16
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/render-managers/common/entity-label.js +4 -4
- package/dist/lib/rendering/render-managers/common/entity-label.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-entities-render-manager.js +2 -8
- package/dist/lib/rendering/render-managers/tilesets/tileset-entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +12 -2
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js +22 -1
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/tileset-render-engine.d.ts +1 -0
- package/dist/types/rendering/visuals-register.d.ts +3 -0
- package/package.json +1 -1
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -11097,7 +11097,7 @@
|
|
|
11097
11097
|
* If one exists then the action is ignored.
|
|
11098
11098
|
*/
|
|
11099
11099
|
function Attach(params) {
|
|
11100
|
-
var _a, _b, _c;
|
|
11100
|
+
var _a, _b, _c, _d;
|
|
11101
11101
|
const { rego, viewer, pos3d, visualRegister, api, options, groupId } = params;
|
|
11102
11102
|
if (!rego || !viewer) {
|
|
11103
11103
|
return;
|
|
@@ -11108,8 +11108,8 @@
|
|
|
11108
11108
|
return Attach({
|
|
11109
11109
|
...params,
|
|
11110
11110
|
pos3d: undefined,
|
|
11111
|
-
options: (_a =
|
|
11112
|
-
groupId: (
|
|
11111
|
+
options: group ? group.options : (_b = (_a = visualRegister.GetLabelDefaults) === null || _a === void 0 ? void 0 : _a.call(visualRegister)) !== null && _b !== void 0 ? _b : options,
|
|
11112
|
+
groupId: (_c = group === null || group === void 0 ? void 0 : group.groupId) !== null && _c !== void 0 ? _c : groupId,
|
|
11113
11113
|
persistent: true
|
|
11114
11114
|
});
|
|
11115
11115
|
}
|
|
@@ -11119,7 +11119,7 @@
|
|
|
11119
11119
|
if (rego[EntityLabel.ATTACH_KEY].Persistent && params.persistent !== true && !groupId) {
|
|
11120
11120
|
return rego[EntityLabel.ATTACH_KEY];
|
|
11121
11121
|
}
|
|
11122
|
-
rego[EntityLabel.ATTACH_KEY].Persistent = (
|
|
11122
|
+
rego[EntityLabel.ATTACH_KEY].Persistent = (_d = params.persistent) !== null && _d !== void 0 ? _d : Boolean(groupId);
|
|
11123
11123
|
rego[EntityLabel.ATTACH_KEY].Configure(options, groupId);
|
|
11124
11124
|
return rego[EntityLabel.ATTACH_KEY];
|
|
11125
11125
|
}
|
|
@@ -13830,7 +13830,7 @@
|
|
|
13830
13830
|
viewer,
|
|
13831
13831
|
api: (_b = register.ApiGetters) === null || _b === void 0 ? void 0 : _b.GetBruceApi(),
|
|
13832
13832
|
visualRegister: register,
|
|
13833
|
-
options: labelGroup
|
|
13833
|
+
options: labelGroup ? labelGroup.options : register.GetLabelDefaults(),
|
|
13834
13834
|
groupId: labelGroup === null || labelGroup === void 0 ? void 0 : labelGroup.groupId,
|
|
13835
13835
|
persistent: true
|
|
13836
13836
|
});
|
|
@@ -14013,6 +14013,8 @@
|
|
|
14013
14013
|
this.menuItemSources = new Map();
|
|
14014
14014
|
// Set when the data source order no longer matches the zIndexes seen, so it is re-applied once.
|
|
14015
14015
|
this.sourceOrderDirty = false;
|
|
14016
|
+
// The look of labelled Entities no label group holds.
|
|
14017
|
+
this.labelDefaults = null;
|
|
14016
14018
|
// Stops following what is simulated, so labels can read it again when it changes.
|
|
14017
14019
|
this.simulationRemoval = null;
|
|
14018
14020
|
this.shadowsRemoval = null;
|
|
@@ -16867,6 +16869,25 @@
|
|
|
16867
16869
|
var _a;
|
|
16868
16870
|
return (_a = this.labelGroups) === null || _a === void 0 ? void 0 : _a.Resolve(entityId, menuItemId);
|
|
16869
16871
|
}
|
|
16872
|
+
/*
|
|
16873
|
+
* How a labelled Entity in no label group is drawn, such as an account's default look; null draws plain text.
|
|
16874
|
+
*/
|
|
16875
|
+
SetLabelDefaults(options) {
|
|
16876
|
+
if (this.disposed) {
|
|
16877
|
+
return;
|
|
16878
|
+
}
|
|
16879
|
+
const next = options ? { ...options } : null;
|
|
16880
|
+
if (JSON.stringify(next) === JSON.stringify(this.labelDefaults)) {
|
|
16881
|
+
return;
|
|
16882
|
+
}
|
|
16883
|
+
this.labelDefaults = next;
|
|
16884
|
+
for (const entityId of this.GetLabelled()) {
|
|
16885
|
+
this.queueUpdate({ entityId, refresh: false });
|
|
16886
|
+
}
|
|
16887
|
+
}
|
|
16888
|
+
GetLabelDefaults() {
|
|
16889
|
+
return this.labelDefaults ? { ...this.labelDefaults } : null;
|
|
16890
|
+
}
|
|
16870
16891
|
/*
|
|
16871
16892
|
* Called by a group label once it is on screen, so its entity's default image is read only when it can be seen.
|
|
16872
16893
|
*/
|
|
@@ -18624,11 +18645,20 @@
|
|
|
18624
18645
|
TilesetRenderEngine.ApplyPosition = ApplyPosition;
|
|
18625
18646
|
// Eye dome lighting strength that keeps depth readable as soft grey edges, tuned on a coloured scan in November 2026.
|
|
18626
18647
|
TilesetRenderEngine.POINT_OUTLINE_STRENGTH = 0.02;
|
|
18648
|
+
/*
|
|
18649
|
+
* Returns a positive maximum point size, since a stored 0 or null shrinks every point to nothing.
|
|
18650
|
+
*/
|
|
18651
|
+
function GetMaximumAttenuation(value, fallback) {
|
|
18652
|
+
const size = value == null ? NaN : Number(value);
|
|
18653
|
+
return size > 0 ? size : fallback;
|
|
18654
|
+
}
|
|
18655
|
+
TilesetRenderEngine.GetMaximumAttenuation = GetMaximumAttenuation;
|
|
18627
18656
|
function ApplySettings(params) {
|
|
18628
18657
|
const { cTileset, settings } = params;
|
|
18629
18658
|
cTileset.maximumScreenSpaceError = EnsureNumber(settings.maxScreenSpaceError, 5);
|
|
18630
18659
|
cTileset.pointCloudShading.attenuation = Boolean(settings.attenuation);
|
|
18631
|
-
|
|
18660
|
+
const maximumAttenuation = GetMaximumAttenuation(settings.maximumAttenuation, 4);
|
|
18661
|
+
cTileset.pointCloudShading.maximumAttenuation = maximumAttenuation;
|
|
18632
18662
|
// Cesium's eye dome lighting is the point outline, at its default strength of 1 they render black.
|
|
18633
18663
|
cTileset.pointCloudShading.eyeDomeLighting = settings.pointOutlines !== false;
|
|
18634
18664
|
cTileset.pointCloudShading.eyeDomeLightingStrength = TilesetRenderEngine.POINT_OUTLINE_STRENGTH;
|
|
@@ -18639,7 +18669,8 @@
|
|
|
18639
18669
|
}
|
|
18640
18670
|
const cTilesetExt = cTileset;
|
|
18641
18671
|
cTilesetExt._bruceSettings = {
|
|
18642
|
-
...settings
|
|
18672
|
+
...settings,
|
|
18673
|
+
maximumAttenuation
|
|
18643
18674
|
};
|
|
18644
18675
|
}
|
|
18645
18676
|
TilesetRenderEngine.ApplySettings = ApplySettings;
|
|
@@ -29456,10 +29487,7 @@
|
|
|
29456
29487
|
if (!attenuation && attenuation != false) {
|
|
29457
29488
|
attenuation = true;
|
|
29458
29489
|
}
|
|
29459
|
-
|
|
29460
|
-
if (isNaN(attenuationMax)) {
|
|
29461
|
-
attenuationMax = 20;
|
|
29462
|
-
}
|
|
29490
|
+
const attenuationMax = exports.TilesetRenderEngine.GetMaximumAttenuation(this.item.attenuationMax, 20);
|
|
29463
29491
|
exports.TilesetRenderEngine.OnTilesetReady(this.cTileset).then(() => {
|
|
29464
29492
|
exports.TilesetRenderEngine.ApplySettings({
|
|
29465
29493
|
cTileset: this.cTileset,
|
|
@@ -29829,10 +29857,7 @@
|
|
|
29829
29857
|
if (!attenuation && attenuation != false) {
|
|
29830
29858
|
attenuation = true;
|
|
29831
29859
|
}
|
|
29832
|
-
|
|
29833
|
-
if (isNaN(attenuationMax)) {
|
|
29834
|
-
attenuationMax = 20;
|
|
29835
|
-
}
|
|
29860
|
+
const attenuationMax = exports.TilesetRenderEngine.GetMaximumAttenuation(this.item.attenuationMax, 20);
|
|
29836
29861
|
exports.TilesetRenderEngine.ApplySettings({
|
|
29837
29862
|
cTileset: this.cTileset,
|
|
29838
29863
|
settings: {
|
|
@@ -61101,7 +61126,7 @@ void main() {
|
|
|
61101
61126
|
StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
|
|
61102
61127
|
})(exports.StyleUtils || (exports.StyleUtils = {}));
|
|
61103
61128
|
|
|
61104
|
-
const VERSION = "7.
|
|
61129
|
+
const VERSION = "7.9.1";
|
|
61105
61130
|
/**
|
|
61106
61131
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
61107
61132
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|