bruce-cesium 5.4.2 → 5.4.4
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 +23 -19
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +21 -17
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/cesium-animated-property.js +2 -2
- package/dist/lib/rendering/cesium-animated-property.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-model3d.js +3 -3
- package/dist/lib/rendering/entity-render-engine-model3d.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-point.js +5 -5
- package/dist/lib/rendering/entity-render-engine-point.js.map +1 -1
- package/dist/lib/rendering/render-managers/common/entity-label.js +9 -5
- package/dist/lib/rendering/render-managers/common/entity-label.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/cesium-animated-property.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -1365,7 +1365,7 @@
|
|
|
1365
1365
|
}
|
|
1366
1366
|
}
|
|
1367
1367
|
CesiumAnimatedProperty.AnimatePositionSeries = AnimatePositionSeries;
|
|
1368
|
-
function GetSeriesPossesForHistoricEntity(viewer, heightRef, historic) {
|
|
1368
|
+
function GetSeriesPossesForHistoricEntity(viewer, dataHeightRef, heightRef, historic) {
|
|
1369
1369
|
if (!historic || !historic.length) {
|
|
1370
1370
|
return [];
|
|
1371
1371
|
}
|
|
@@ -1388,7 +1388,7 @@
|
|
|
1388
1388
|
const pos3d = exports.EntityUtils.GetPos({
|
|
1389
1389
|
entity: data,
|
|
1390
1390
|
viewer: viewer,
|
|
1391
|
-
recordHeightRef:
|
|
1391
|
+
recordHeightRef: dataHeightRef,
|
|
1392
1392
|
returnHeightRef: heightRef,
|
|
1393
1393
|
allowRendered: false
|
|
1394
1394
|
});
|
|
@@ -4397,7 +4397,7 @@
|
|
|
4397
4397
|
const bColor = lStyle.lineColor ? BModels.Calculator.GetColor(lStyle.lineColor, entity, params.tags) : null;
|
|
4398
4398
|
const cColor = bColor ? ColorToCColor(bColor) : Cesium.Color.fromCssColorString("rgba(255, 193, 7, 0.8)");
|
|
4399
4399
|
if (cColor.alpha > 0) {
|
|
4400
|
-
const seriesTrackPosses = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
4400
|
+
const seriesTrackPosses = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, heightRef, params.entityHistoric);
|
|
4401
4401
|
seriesTrackPosses.reverse();
|
|
4402
4402
|
let posses = seriesTrackPosses.map(x => x.pos3d);
|
|
4403
4403
|
posses = CullDuplicateCPosses(posses);
|
|
@@ -4478,7 +4478,7 @@
|
|
|
4478
4478
|
});
|
|
4479
4479
|
let position = null;
|
|
4480
4480
|
// If we have a series of time-based positions then we'll animate as time changes.
|
|
4481
|
-
const series = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
4481
|
+
const series = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, heightRef, params.entityHistoric);
|
|
4482
4482
|
if (series.length > 1) {
|
|
4483
4483
|
animatePosition = new exports.CesiumAnimatedProperty.AnimatePositionSeries({
|
|
4484
4484
|
posses: series,
|
|
@@ -4542,7 +4542,7 @@
|
|
|
4542
4542
|
cEntity.billboard.width = undefined;
|
|
4543
4543
|
cEntity.billboard.height = undefined;
|
|
4544
4544
|
// If we have a series of time-based positions then we'll animate as time changes.
|
|
4545
|
-
const series = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
4545
|
+
const series = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, heightRef, params.entityHistoric);
|
|
4546
4546
|
if (series.length > 1) {
|
|
4547
4547
|
animatePosition = new exports.CesiumAnimatedProperty.AnimatePositionSeries({
|
|
4548
4548
|
posses: series,
|
|
@@ -4796,7 +4796,7 @@
|
|
|
4796
4796
|
});
|
|
4797
4797
|
let position = null;
|
|
4798
4798
|
// If we have a series of time-based positions then we'll animate as time changes.
|
|
4799
|
-
const series = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
4799
|
+
const series = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, heightRef, params.entityHistoric);
|
|
4800
4800
|
if (series.length > 1) {
|
|
4801
4801
|
animatePosition = new exports.CesiumAnimatedProperty.AnimatePositionSeries({
|
|
4802
4802
|
posses: series,
|
|
@@ -4865,7 +4865,7 @@
|
|
|
4865
4865
|
cEntity.billboard.distanceDisplayCondition = new Cesium.ConstantProperty(exports.EntityRenderEngine.GetDisplayCondition(params.minDistance, params.maxDistance));
|
|
4866
4866
|
cEntity.billboard.disableDepthTestDistance = new Cesium.ConstantProperty(disableDepthTest ? Number.POSITIVE_INFINITY : undefined);
|
|
4867
4867
|
// If we have a series of time-based positions then we'll animate as time changes.
|
|
4868
|
-
const series = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
4868
|
+
const series = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, heightRef, params.entityHistoric);
|
|
4869
4869
|
if (series.length > 1) {
|
|
4870
4870
|
animatePosition = new exports.CesiumAnimatedProperty.AnimatePositionSeries({
|
|
4871
4871
|
posses: series,
|
|
@@ -6358,7 +6358,7 @@
|
|
|
6358
6358
|
const bColor = lStyle.lineColor ? BModels.Calculator.GetColor(lStyle.lineColor, entity, params.tags) : null;
|
|
6359
6359
|
const cColor = bColor ? ColorToCColor(bColor) : Cesium.Color.fromCssColorString("rgba(255, 193, 7, 0.8)");
|
|
6360
6360
|
if (cColor.alpha > 0) {
|
|
6361
|
-
const seriesTrackPosses = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
6361
|
+
const seriesTrackPosses = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, heightRef, params.entityHistoric);
|
|
6362
6362
|
seriesTrackPosses.reverse();
|
|
6363
6363
|
let posses = seriesTrackPosses.map(x => x.pos3d);
|
|
6364
6364
|
posses = CullDuplicateCPosses(posses);
|
|
@@ -6381,7 +6381,7 @@
|
|
|
6381
6381
|
});
|
|
6382
6382
|
let position = null;
|
|
6383
6383
|
// If we have a series of time-based positions then we'll animate as time changes.
|
|
6384
|
-
const series = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
6384
|
+
const series = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, heightRef, params.entityHistoric);
|
|
6385
6385
|
if (series.length > 1) {
|
|
6386
6386
|
animatePosition = new exports.CesiumAnimatedProperty.AnimatePositionSeries({
|
|
6387
6387
|
posses: series,
|
|
@@ -6457,7 +6457,7 @@
|
|
|
6457
6457
|
cEntity.model.colorBlendMode = new Cesium.ConstantProperty(blendMode);
|
|
6458
6458
|
cEntity.model.distanceDisplayCondition = new Cesium.ConstantProperty(exports.EntityRenderEngine.GetDisplayCondition(params.minDistance, params.maxDistance));
|
|
6459
6459
|
// If we have a series of time-based positions then we'll animate as time changes.
|
|
6460
|
-
const series = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, params.entityHistoric);
|
|
6460
|
+
const series = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(params.viewer, heightRef, heightRef, params.entityHistoric);
|
|
6461
6461
|
if (series.length > 1) {
|
|
6462
6462
|
animatePosition = new exports.CesiumAnimatedProperty.AnimatePositionSeries({
|
|
6463
6463
|
posses: series,
|
|
@@ -9199,7 +9199,7 @@
|
|
|
9199
9199
|
const height = visual.billboard._billboardSize;
|
|
9200
9200
|
if (height) {
|
|
9201
9201
|
const scale = EnsureNumber(getValue$1(this.viewer, visual.billboard.scale), 1);
|
|
9202
|
-
pixelOffset.y = -(height * scale);
|
|
9202
|
+
pixelOffset.y = -((height * scale) / 2);
|
|
9203
9203
|
pixelOffset.y -= 5;
|
|
9204
9204
|
}
|
|
9205
9205
|
}
|
|
@@ -9489,6 +9489,9 @@
|
|
|
9489
9489
|
lineEle.style.display = "none";
|
|
9490
9490
|
return;
|
|
9491
9491
|
}
|
|
9492
|
+
// Offset start by the pixel offset.
|
|
9493
|
+
lineStartPos2d.x += pixelOffset.x;
|
|
9494
|
+
lineStartPos2d.y += pixelOffset.y;
|
|
9492
9495
|
ele.style.display = "block";
|
|
9493
9496
|
lineEle.style.display = "block";
|
|
9494
9497
|
// Calculate opacity to apply based on distance between camera and pos3d.
|
|
@@ -9540,6 +9543,9 @@
|
|
|
9540
9543
|
lineEle.style.display = "none";
|
|
9541
9544
|
return;
|
|
9542
9545
|
}
|
|
9546
|
+
// Offset end by the pixel offset.
|
|
9547
|
+
lineEndPos2d.x += pixelOffset.x;
|
|
9548
|
+
lineEndPos2d.y += pixelOffset.y;
|
|
9543
9549
|
// If out of the screen then we can hide it.
|
|
9544
9550
|
const startOutOfScreen = (lineStartPos2d.x < 0 || lineStartPos2d.x > this.viewer.canvas.clientWidth ||
|
|
9545
9551
|
lineStartPos2d.y < 0 || lineStartPos2d.y > this.viewer.canvas.clientHeight);
|
|
@@ -9552,10 +9558,8 @@
|
|
|
9552
9558
|
return;
|
|
9553
9559
|
}
|
|
9554
9560
|
// Position the label above the line end point.
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
this.label.style.left = `${labelLeft}px`;
|
|
9558
|
-
this.label.style.top = `${labelTop}px`;
|
|
9561
|
+
this.label.style.left = `${lineEndPos2d.x}px`;
|
|
9562
|
+
this.label.style.top = `${lineEndPos2d.y}px`;
|
|
9559
9563
|
// Update line position and size.
|
|
9560
9564
|
const dx = lineEndPos2d.x - lineStartPos2d.x;
|
|
9561
9565
|
const dy = lineEndPos2d.y - lineStartPos2d.y;
|
|
@@ -17592,7 +17596,7 @@
|
|
|
17592
17596
|
entityIds: [this.rootId],
|
|
17593
17597
|
api: api
|
|
17594
17598
|
});
|
|
17595
|
-
const posses = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(this.viewer, Cesium.HeightReference.NONE, historicData.recordsByIds[this.rootId]);
|
|
17599
|
+
const posses = exports.CesiumAnimatedProperty.GetSeriesPossesForHistoricEntity(this.viewer, Cesium.HeightReference.NONE, Cesium.HeightReference.CLAMP_TO_GROUND, historicData.recordsByIds[this.rootId]);
|
|
17596
17600
|
res(posses);
|
|
17597
17601
|
}
|
|
17598
17602
|
catch (e) {
|
|
@@ -30540,7 +30544,7 @@
|
|
|
30540
30544
|
}
|
|
30541
30545
|
}
|
|
30542
30546
|
|
|
30543
|
-
const VERSION = "5.4.
|
|
30547
|
+
const VERSION = "5.4.4";
|
|
30544
30548
|
|
|
30545
30549
|
exports.VERSION = VERSION;
|
|
30546
30550
|
exports.isHistoricMetadataChanged = isHistoricMetadataChanged;
|