bruce-cesium 7.6.0 → 7.6.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 +29 -8
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +27 -6
- 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 +26 -5
- package/dist/lib/rendering/render-managers/common/entity-label.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/render-managers/common/entity-label.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -6420,6 +6420,22 @@
|
|
|
6420
6420
|
return centre && half && (axes === null || axes === void 0 ? void 0 : axes.every(Boolean)) ? { centre, axes, half } : null;
|
|
6421
6421
|
}
|
|
6422
6422
|
EntityLabel.ReadOrientedBox = ReadOrientedBox;
|
|
6423
|
+
/*
|
|
6424
|
+
* Whether a placement turns what it places. Scale alone does not count.
|
|
6425
|
+
*/
|
|
6426
|
+
function isRotated(matrix) {
|
|
6427
|
+
for (let column = 0; column < 3; column++) {
|
|
6428
|
+
const axis = [0, 1, 2].map(row => Number(matrix[row][column]));
|
|
6429
|
+
const length = Math.hypot(...axis);
|
|
6430
|
+
if (!(length > 0)) {
|
|
6431
|
+
return false;
|
|
6432
|
+
}
|
|
6433
|
+
if (axis.some((value, row) => Math.abs(value / length - Number(row === column)) > 1e-5)) {
|
|
6434
|
+
return true;
|
|
6435
|
+
}
|
|
6436
|
+
}
|
|
6437
|
+
return false;
|
|
6438
|
+
}
|
|
6423
6439
|
/*
|
|
6424
6440
|
* The eight padded world corners of an assembly Entity's geometry box, or null when the record cannot give one.
|
|
6425
6441
|
*
|
|
@@ -6438,6 +6454,10 @@
|
|
|
6438
6454
|
if ((matrix === null || matrix === void 0 ? void 0 : matrix.length) !== 4 || !matrix.every(row => (row === null || row === void 0 ? void 0 : row.length) === 4) || !Number.isFinite(+(root === null || root === void 0 ? void 0 : root.latitude)) || !Number.isFinite(+(root === null || root === void 0 ? void 0 : root.longitude))) {
|
|
6439
6455
|
return null;
|
|
6440
6456
|
}
|
|
6457
|
+
// A pure translation can hide a rotation baked into the vertices, which leaves the extents loose.
|
|
6458
|
+
if (!shape && !isRotated(matrix)) {
|
|
6459
|
+
return null;
|
|
6460
|
+
}
|
|
6441
6461
|
const pivot = ((_c = bruce.GeometryPivot) === null || _c === void 0 ? void 0 : _c.length) >= 3 ? bruce.GeometryPivot.slice(0, 3).map(Number) : [0, 0, 0];
|
|
6442
6462
|
// Without an oriented box the record's own extents are an axis-aligned box about the pivot.
|
|
6443
6463
|
const box = shape || { centre: pivot, axes: [[1, 0, 0], [0, 1, 0], [0, 0, 1]], half: half };
|
|
@@ -8152,7 +8172,7 @@
|
|
|
8152
8172
|
viewportWidth: this.viewer.canvas.clientWidth,
|
|
8153
8173
|
id: this.id, entityKey: ((_x = this.rego) === null || _x === void 0 ? void 0 : _x.entityId) ? JSON.stringify([this.rego.entityId, this.rego.menuItemId || "", this.Transient && !this.Persistent ? "hover" : ""]) : undefined,
|
|
8154
8174
|
entityId: (_y = this.rego) === null || _y === void 0 ? void 0 : _y.entityId, group: this.groupId, x, y, width, height, anchorX, anchorY, depth, leaderLength, leaderRun, leaderSide, distance,
|
|
8155
|
-
iconRadius: icon === null || icon === void 0 ? void 0 : icon.radius, modelBox: boxed || undefined, boxBlend,
|
|
8175
|
+
iconRadius: icon === null || icon === void 0 ? void 0 : icon.radius, modelBox: boxed || undefined, boxBlend, follows: !pinned && Boolean(transientPivot || cursorMotion.target),
|
|
8156
8176
|
// Priority shows the hovered member individually without dragging its cluster along.
|
|
8157
8177
|
opacity: waiting ? 0 : opacity, priority: hover || cursorAmount > 0 || (state === null || state === void 0 ? void 0 : state.highlighted) ? 1 : 0, options: this.options, text: originalText, clusterBounds
|
|
8158
8178
|
};
|
|
@@ -8279,15 +8299,16 @@
|
|
|
8279
8299
|
const normalRadius = (!leader || (ring === null || ring === void 0 ? void 0 : ring.enabled) === false ? 0 : Math.max(frame.distance <= ((_l = ring === null || ring === void 0 ? void 0 : ring.nearDistance) !== null && _l !== void 0 ? _l : 100) ? ((_m = ring === null || ring === void 0 ? void 0 : ring.nearRadius) !== null && _m !== void 0 ? _m : 10) : 0, hovered ? ((_o = ring === null || ring === void 0 ? void 0 : ring.hoverRadius) !== null && _o !== void 0 ? _o : (this.Transient && !this.Persistent ? 15.4 : 22)) : 0));
|
|
8280
8300
|
const targetRadius = normalRadius + (15.4 - normalRadius) * cursorMotion.amount;
|
|
8281
8301
|
// Around a glyph the ring keeps the glyph's size and only fades its stroke in, so it never covers the icon.
|
|
8282
|
-
|
|
8283
|
-
const
|
|
8302
|
+
// A ring around the cursor marks nothing, so a riding label keeps only its leader.
|
|
8303
|
+
const targetOuter = frame.follows ? 0 : iconRing || targetRadius || 2.5;
|
|
8304
|
+
const targetInner = frame.follows ? 0 : iconRing ? (targetRadius > 0 ? iconRing - 2 : iconRing) : Math.max(0, targetRadius - 2);
|
|
8284
8305
|
const now = Date.now();
|
|
8285
8306
|
const duration = (_p = ring === null || ring === void 0 ? void 0 : ring.transitionDuration) !== null && _p !== void 0 ? _p : 200;
|
|
8286
8307
|
const sharedRing = this.Transient && !this.Persistent && this.hoverFade.to === 1 ? this.hoverRingState : undefined;
|
|
8287
8308
|
let ringAnimation = sharedRing ? sharedRing.animation : this.ringAnimation;
|
|
8288
8309
|
if (!ringAnimation) {
|
|
8289
|
-
const outer = iconRing || 2.5;
|
|
8290
|
-
const inner = iconRing;
|
|
8310
|
+
const outer = frame.follows ? 0 : iconRing || 2.5;
|
|
8311
|
+
const inner = frame.follows ? 0 : iconRing;
|
|
8291
8312
|
ringAnimation = { target: outer, targetInner: inner, start: now, outer, inner, fromOuter: outer, fromInner: inner };
|
|
8292
8313
|
}
|
|
8293
8314
|
const animateRing = () => {
|
|
@@ -53273,7 +53294,7 @@ void main() {
|
|
|
53273
53294
|
StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
|
|
53274
53295
|
})(exports.StyleUtils || (exports.StyleUtils = {}));
|
|
53275
53296
|
|
|
53276
|
-
const VERSION = "7.6.
|
|
53297
|
+
const VERSION = "7.6.1";
|
|
53277
53298
|
/**
|
|
53278
53299
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
53279
53300
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|