bruce-cesium 3.7.0 → 3.7.2
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 +105 -50
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +104 -49
- 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 +10 -4
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/render-managers/common/entity-label.js +5 -1
- package/dist/lib/rendering/render-managers/common/entity-label.js.map +1 -1
- package/dist/lib/rendering/render-managers/common/point-clustering.js +8 -4
- package/dist/lib/rendering/render-managers/common/point-clustering.js.map +1 -1
- package/dist/lib/rendering/render-managers/data-source/data-source-static-csv-manager.js +2 -2
- package/dist/lib/rendering/render-managers/data-source/data-source-static-csv-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js +10 -6
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-loaded-render-manager.js +10 -6
- package/dist/lib/rendering/render-managers/entities/entities-loaded-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +10 -6
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/view-render-engine.js +3 -1
- package/dist/lib/rendering/view-render-engine.js.map +1 -1
- package/dist/lib/rendering/visual-register-culler.js +7 -3
- package/dist/lib/rendering/visual-register-culler.js.map +1 -1
- package/dist/lib/utils/cesium-entity-styler.js +9 -5
- package/dist/lib/utils/cesium-entity-styler.js.map +1 -1
- package/dist/lib/utils/entity-utils.js +6 -1
- package/dist/lib/utils/entity-utils.js.map +1 -1
- package/dist/lib/utils/view-utils.js +12 -3
- package/dist/lib/utils/view-utils.js.map +1 -1
- package/dist/lib/viewer/viewer-utils.js +13 -8
- package/dist/lib/viewer/viewer-utils.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ProjectViewTile, DelayQueue, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, Api, EntityRelationType, ENVIRONMENT, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, AbstractApi, ProjectViewBookmark, EntityAttachment, EntityAttachmentType, EntityAttribute, ProjectView, ProjectViewLegacyTile, Camera } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, DistanceDisplayCondition, NearFarScalar, Model, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, ConstantProperty, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, ColorMaterialProperty, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, OrthographicFrustum, EasingFunction, SceneTransforms, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, CesiumInspector, defined, ClockRange, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, CzmlDataSource, Quaternion, Intersect, ConstantPositionProperty } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -950,15 +950,19 @@ function getCesiumColorValue(viewer, prop) {
|
|
|
950
950
|
if (!prop) {
|
|
951
951
|
return Color.WHITE;
|
|
952
952
|
}
|
|
953
|
+
var date = viewer.scene.lastRenderTime;
|
|
954
|
+
if (!date) {
|
|
955
|
+
date = viewer.clock.currentTime;
|
|
956
|
+
}
|
|
953
957
|
if (prop.getValue) {
|
|
954
|
-
prop = prop.getValue(
|
|
958
|
+
prop = prop.getValue(date);
|
|
955
959
|
}
|
|
956
960
|
if (prop instanceof Color) {
|
|
957
961
|
return prop;
|
|
958
962
|
}
|
|
959
963
|
var tmp = prop === null || prop === void 0 ? void 0 : prop.color;
|
|
960
964
|
if (tmp === null || tmp === void 0 ? void 0 : tmp.getValue) {
|
|
961
|
-
tmp = tmp.getValue(
|
|
965
|
+
tmp = tmp.getValue(date);
|
|
962
966
|
}
|
|
963
967
|
return tmp ? tmp : Color.WHITE;
|
|
964
968
|
}
|
|
@@ -1088,7 +1092,7 @@ function refreshColor(viewer, graphic, opacity) {
|
|
|
1088
1092
|
graphic.color = color;
|
|
1089
1093
|
}
|
|
1090
1094
|
else if (graphic instanceof ModelGraphics) {
|
|
1091
|
-
graphic.color = color;
|
|
1095
|
+
graphic.color = new ConstantProperty(color);
|
|
1092
1096
|
}
|
|
1093
1097
|
else if (graphic instanceof PolygonGraphics) {
|
|
1094
1098
|
graphic.material = new ColorMaterialProperty(color);
|
|
@@ -1100,10 +1104,10 @@ function refreshColor(viewer, graphic, opacity) {
|
|
|
1100
1104
|
graphic.material = new ColorMaterialProperty(color);
|
|
1101
1105
|
}
|
|
1102
1106
|
else if (graphic instanceof PointGraphics) {
|
|
1103
|
-
graphic.color = color;
|
|
1107
|
+
graphic.color = new ConstantProperty(color);
|
|
1104
1108
|
}
|
|
1105
1109
|
else if (graphic instanceof BillboardGraphics) {
|
|
1106
|
-
graphic.color = color;
|
|
1110
|
+
graphic.color = new ConstantProperty(color);
|
|
1107
1111
|
}
|
|
1108
1112
|
else if (graphic instanceof EllipseGraphics) {
|
|
1109
1113
|
graphic.material = new ColorMaterialProperty(color);
|
|
@@ -1629,7 +1633,11 @@ function traverseEntity(cEntity, arr, ignoreParent) {
|
|
|
1629
1633
|
}
|
|
1630
1634
|
function GetValue(viewer, obj) {
|
|
1631
1635
|
if (obj === null || obj === void 0 ? void 0 : obj.getValue) {
|
|
1632
|
-
|
|
1636
|
+
var date = viewer.scene.lastRenderTime;
|
|
1637
|
+
if (!date) {
|
|
1638
|
+
date = viewer.clock.currentTime;
|
|
1639
|
+
}
|
|
1640
|
+
return obj.getValue(date);
|
|
1633
1641
|
}
|
|
1634
1642
|
return obj;
|
|
1635
1643
|
}
|
|
@@ -2573,6 +2581,7 @@ var EntityUtils;
|
|
|
2573
2581
|
if (isNaN(roll)) {
|
|
2574
2582
|
roll = 0;
|
|
2575
2583
|
}
|
|
2584
|
+
console.log(tSettings, entity);
|
|
2576
2585
|
matrix4 = entity.worldPosition;
|
|
2577
2586
|
offset = new Cartesian3(+matrix4[0][3], +matrix4[1][3], +matrix4[2][3]);
|
|
2578
2587
|
if (entity.worldPivot) //the position from worldMatrix + center of geometry offset
|
|
@@ -3250,19 +3259,28 @@ var ViewUtils;
|
|
|
3250
3259
|
clock.startTime = startTime;
|
|
3251
3260
|
}
|
|
3252
3261
|
else if (startTimeIso) {
|
|
3253
|
-
|
|
3262
|
+
var startDate = JulianDate.fromIso8601(startTimeIso);
|
|
3263
|
+
if (startDate) {
|
|
3264
|
+
clock.startTime = startDate;
|
|
3265
|
+
}
|
|
3254
3266
|
}
|
|
3255
3267
|
if (currentTime) {
|
|
3256
3268
|
clock.currentTime = currentTime;
|
|
3257
3269
|
}
|
|
3258
3270
|
else if (currentTimeIso) {
|
|
3259
|
-
|
|
3271
|
+
var currentDate = JulianDate.fromIso8601(currentTimeIso);
|
|
3272
|
+
if (currentDate) {
|
|
3273
|
+
clock.currentTime = currentDate;
|
|
3274
|
+
}
|
|
3260
3275
|
}
|
|
3261
3276
|
if (stopTime) {
|
|
3262
3277
|
clock.stopTime = stopTime;
|
|
3263
3278
|
}
|
|
3264
3279
|
else if (stopTimeIso) {
|
|
3265
|
-
|
|
3280
|
+
var stopDate = JulianDate.fromIso8601(stopTimeIso);
|
|
3281
|
+
if (stopDate) {
|
|
3282
|
+
clock.stopTime = stopDate;
|
|
3283
|
+
}
|
|
3266
3284
|
}
|
|
3267
3285
|
clock.clockRange = ClockRange.LOOP_STOP;
|
|
3268
3286
|
var areCesiumValues = clock[CESIUM_TIMELINE_KEY] != true;
|
|
@@ -3390,7 +3408,11 @@ function isFlatTerrain(viewer) {
|
|
|
3390
3408
|
}
|
|
3391
3409
|
function getValue(viewer, obj) {
|
|
3392
3410
|
if (obj === null || obj === void 0 ? void 0 : obj.getValue) {
|
|
3393
|
-
|
|
3411
|
+
var date = viewer.scene.lastRenderTime;
|
|
3412
|
+
if (!date) {
|
|
3413
|
+
date = viewer.clock.currentTime;
|
|
3414
|
+
}
|
|
3415
|
+
return obj.getValue(date);
|
|
3394
3416
|
}
|
|
3395
3417
|
return obj;
|
|
3396
3418
|
}
|
|
@@ -4001,7 +4023,11 @@ function getZIndex(style, entity, tags) {
|
|
|
4001
4023
|
}
|
|
4002
4024
|
function getValue$1(viewer, obj) {
|
|
4003
4025
|
if (obj === null || obj === void 0 ? void 0 : obj.getValue) {
|
|
4004
|
-
|
|
4026
|
+
var date = viewer.scene.lastRenderTime;
|
|
4027
|
+
if (!date) {
|
|
4028
|
+
date = viewer.clock.currentTime;
|
|
4029
|
+
}
|
|
4030
|
+
return obj.getValue(date);
|
|
4005
4031
|
}
|
|
4006
4032
|
return obj;
|
|
4007
4033
|
}
|
|
@@ -4669,7 +4695,7 @@ var EntityRenderEngine;
|
|
|
4669
4695
|
function Render(params) {
|
|
4670
4696
|
var _a, _b;
|
|
4671
4697
|
return __awaiter(this, void 0, void 0, function () {
|
|
4672
|
-
var entity, style, type, cEntity, siblings, iconUrlRows, icon, iconUrl, metadata, api, image, e_5, iconScale, disableDepthTest, bColor, cColor, heightRef, radius, bFill, cFill, outline, cOutline, outlineWidth, bOutline, heightRef, pos3d, extrusion, outlineExtrusion, bColor, cColor, size, heightRef, circleBillboard;
|
|
4698
|
+
var entity, style, type, cEntity, siblings, iconUrlRows, icon, iconUrl, metadata, api, image, e_5, iconScale, disableDepthTest, bColor, cColor, heightRef, radius, bFill, cFill, outline, cOutline, outlineWidth, bOutline, heightRef, pos3d, extrusion, outlineExtrusion, bColor, cColor, size, heightRef, circleBillboard, disableDepthTest;
|
|
4673
4699
|
return __generator(this, function (_c) {
|
|
4674
4700
|
switch (_c.label) {
|
|
4675
4701
|
case 0:
|
|
@@ -4855,6 +4881,7 @@ var EntityRenderEngine;
|
|
|
4855
4881
|
}
|
|
4856
4882
|
heightRef = getHeightRef(style);
|
|
4857
4883
|
circleBillboard = createCircleBillboard(size, cColor.toCssColorString());
|
|
4884
|
+
disableDepthTest = Boolean(style.renderOnTop);
|
|
4858
4885
|
cEntity = new Entity({
|
|
4859
4886
|
id: ObjectUtils.UId(10),
|
|
4860
4887
|
// point: {
|
|
@@ -4871,7 +4898,8 @@ var EntityRenderEngine;
|
|
|
4871
4898
|
width: circleBillboard.width,
|
|
4872
4899
|
image: circleBillboard.canvas,
|
|
4873
4900
|
heightReference: heightRef,
|
|
4874
|
-
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
4901
|
+
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance),
|
|
4902
|
+
disableDepthTestDistance: disableDepthTest ? Number.POSITIVE_INFINITY : undefined
|
|
4875
4903
|
},
|
|
4876
4904
|
position: EntityUtils.GetPos({
|
|
4877
4905
|
viewer: params.viewer,
|
|
@@ -5434,7 +5462,7 @@ var EntityRenderEngine;
|
|
|
5434
5462
|
color: color,
|
|
5435
5463
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
5436
5464
|
},
|
|
5437
|
-
orientation: orientation,
|
|
5465
|
+
orientation: new ConstantProperty(orientation),
|
|
5438
5466
|
position: pos,
|
|
5439
5467
|
show: true
|
|
5440
5468
|
});
|
|
@@ -6347,7 +6375,11 @@ var RelationRenderEngine;
|
|
|
6347
6375
|
*/
|
|
6348
6376
|
function getValue$2(viewer, obj) {
|
|
6349
6377
|
if (obj === null || obj === void 0 ? void 0 : obj.getValue) {
|
|
6350
|
-
|
|
6378
|
+
var date = viewer.scene.lastRenderTime;
|
|
6379
|
+
if (!date) {
|
|
6380
|
+
date = viewer.clock.currentTime;
|
|
6381
|
+
}
|
|
6382
|
+
return obj.getValue(date);
|
|
6351
6383
|
}
|
|
6352
6384
|
return obj;
|
|
6353
6385
|
}
|
|
@@ -7955,7 +7987,11 @@ var VisualsRegister;
|
|
|
7955
7987
|
|
|
7956
7988
|
function GetValue$1(viewer, obj) {
|
|
7957
7989
|
if (obj === null || obj === void 0 ? void 0 : obj.getValue) {
|
|
7958
|
-
|
|
7990
|
+
var date = viewer.scene.lastRenderTime;
|
|
7991
|
+
if (!date) {
|
|
7992
|
+
date = viewer.clock.currentTime;
|
|
7993
|
+
}
|
|
7994
|
+
return obj.getValue(date);
|
|
7959
7995
|
}
|
|
7960
7996
|
return obj;
|
|
7961
7997
|
}
|
|
@@ -8555,12 +8591,12 @@ var PointClustering = /** @class */ (function () {
|
|
|
8555
8591
|
var centroid = this_1.calculateCentroid(cluster.points);
|
|
8556
8592
|
var count = cluster.points.length;
|
|
8557
8593
|
if (clusterEntity) {
|
|
8558
|
-
clusterEntity.position = Cartesian3.fromDegrees(centroid.lon, centroid.lat, 150);
|
|
8594
|
+
clusterEntity.position = new ConstantPositionProperty(Cartesian3.fromDegrees(centroid.lon, centroid.lat, 150));
|
|
8559
8595
|
clusterEntity.billboard.image = new CallbackProperty(function () {
|
|
8560
8596
|
return getCanvas(count);
|
|
8561
8597
|
}, false),
|
|
8562
|
-
clusterEntity.billboard.width = getScale(cluster.points.length);
|
|
8563
|
-
clusterEntity.billboard.height = getScale(cluster.points.length);
|
|
8598
|
+
clusterEntity.billboard.width = new ConstantProperty(getScale(cluster.points.length));
|
|
8599
|
+
clusterEntity.billboard.height = new ConstantProperty(getScale(cluster.points.length));
|
|
8564
8600
|
}
|
|
8565
8601
|
else {
|
|
8566
8602
|
clusterEntity = this_1.viewer.entities.add({
|
|
@@ -8815,7 +8851,11 @@ var BATCH_SIZE = 500;
|
|
|
8815
8851
|
var CHECK_BATCH_SIZE = 250;
|
|
8816
8852
|
function getValue$3(viewer, obj) {
|
|
8817
8853
|
if (obj === null || obj === void 0 ? void 0 : obj.getValue) {
|
|
8818
|
-
|
|
8854
|
+
var date = viewer.scene.lastRenderTime;
|
|
8855
|
+
if (!date) {
|
|
8856
|
+
date = viewer.clock.currentTime;
|
|
8857
|
+
}
|
|
8858
|
+
return obj.getValue(date);
|
|
8819
8859
|
}
|
|
8820
8860
|
return obj;
|
|
8821
8861
|
}
|
|
@@ -9400,9 +9440,9 @@ var EntitiesRenderManager;
|
|
|
9400
9440
|
curWidth == width) {
|
|
9401
9441
|
return;
|
|
9402
9442
|
}
|
|
9403
|
-
thing.polygon.material = cFillColor_1;
|
|
9404
|
-
thing.polygon.outlineColor = cLineColor_1;
|
|
9405
|
-
thing.polygon.outlineWidth = width;
|
|
9443
|
+
thing.polygon.material = new ColorMaterialProperty(cFillColor_1);
|
|
9444
|
+
thing.polygon.outlineColor = new ConstantProperty(cLineColor_1);
|
|
9445
|
+
thing.polygon.outlineWidth = new ConstantProperty(width);
|
|
9406
9446
|
}
|
|
9407
9447
|
else if (thing.polyline) {
|
|
9408
9448
|
var bColor = lStyle.lineColor ? Calculator.GetColor(lStyle.lineColor, data, []) : null;
|
|
@@ -9424,8 +9464,8 @@ var EntitiesRenderManager;
|
|
|
9424
9464
|
curWidth == width) {
|
|
9425
9465
|
return;
|
|
9426
9466
|
}
|
|
9427
|
-
thing.polyline.material = cColor;
|
|
9428
|
-
thing.polyline.width = width;
|
|
9467
|
+
thing.polyline.material = new ColorMaterialProperty(cColor);
|
|
9468
|
+
thing.polyline.width = new ConstantProperty(width);
|
|
9429
9469
|
}
|
|
9430
9470
|
};
|
|
9431
9471
|
toForceUpdate = [];
|
|
@@ -9687,7 +9727,11 @@ var BATCH_SIZE$1 = 500;
|
|
|
9687
9727
|
var CHECK_BATCH_SIZE$1 = 250;
|
|
9688
9728
|
function getValue$4(viewer, obj) {
|
|
9689
9729
|
if (obj === null || obj === void 0 ? void 0 : obj.getValue) {
|
|
9690
|
-
|
|
9730
|
+
var date = viewer.scene.lastRenderTime;
|
|
9731
|
+
if (!date) {
|
|
9732
|
+
date = viewer.clock.currentTime;
|
|
9733
|
+
}
|
|
9734
|
+
return obj.getValue(date);
|
|
9691
9735
|
}
|
|
9692
9736
|
return obj;
|
|
9693
9737
|
}
|
|
@@ -10213,9 +10257,9 @@ var EntitiesLoadedRenderManager;
|
|
|
10213
10257
|
curWidth == width) {
|
|
10214
10258
|
return;
|
|
10215
10259
|
}
|
|
10216
|
-
thing.polygon.material = cFillColor_1;
|
|
10217
|
-
thing.polygon.outlineColor = cLineColor_1;
|
|
10218
|
-
thing.polygon.outlineWidth = width;
|
|
10260
|
+
thing.polygon.material = new ColorMaterialProperty(cFillColor_1);
|
|
10261
|
+
thing.polygon.outlineColor = new ConstantProperty(cLineColor_1);
|
|
10262
|
+
thing.polygon.outlineWidth = new ConstantProperty(width);
|
|
10219
10263
|
}
|
|
10220
10264
|
else if (thing.polyline) {
|
|
10221
10265
|
var bColor = lStyle.lineColor ? Calculator.GetColor(lStyle.lineColor, data, []) : null;
|
|
@@ -10237,8 +10281,8 @@ var EntitiesLoadedRenderManager;
|
|
|
10237
10281
|
curWidth == width) {
|
|
10238
10282
|
return;
|
|
10239
10283
|
}
|
|
10240
|
-
thing.polyline.material = cColor;
|
|
10241
|
-
thing.polyline.width = width;
|
|
10284
|
+
thing.polyline.material = new ColorMaterialProperty(cColor);
|
|
10285
|
+
thing.polyline.width = new ConstantProperty(width);
|
|
10242
10286
|
}
|
|
10243
10287
|
};
|
|
10244
10288
|
toForceUpdate = [];
|
|
@@ -10408,7 +10452,11 @@ var EntitiesLoadedRenderManager;
|
|
|
10408
10452
|
var BATCH_SIZE$2 = 500;
|
|
10409
10453
|
function getValue$5(viewer, obj) {
|
|
10410
10454
|
if (obj === null || obj === void 0 ? void 0 : obj.getValue) {
|
|
10411
|
-
|
|
10455
|
+
var date = viewer.scene.lastRenderTime;
|
|
10456
|
+
if (!date) {
|
|
10457
|
+
date = viewer.clock.currentTime;
|
|
10458
|
+
}
|
|
10459
|
+
return obj.getValue(date);
|
|
10412
10460
|
}
|
|
10413
10461
|
return obj;
|
|
10414
10462
|
}
|
|
@@ -10818,9 +10866,9 @@ var EntitiesIdsRenderManager;
|
|
|
10818
10866
|
curWidth == width) {
|
|
10819
10867
|
return;
|
|
10820
10868
|
}
|
|
10821
|
-
thing.polygon.material = cFillColor_1;
|
|
10822
|
-
thing.polygon.outlineColor = cLineColor_1;
|
|
10823
|
-
thing.polygon.outlineWidth = width;
|
|
10869
|
+
thing.polygon.material = new ColorMaterialProperty(cFillColor_1);
|
|
10870
|
+
thing.polygon.outlineColor = new ConstantProperty(cLineColor_1);
|
|
10871
|
+
thing.polygon.outlineWidth = new ConstantProperty(width);
|
|
10824
10872
|
}
|
|
10825
10873
|
else if (thing.polyline) {
|
|
10826
10874
|
var bColor = lStyle.lineColor ? Calculator.GetColor(lStyle.lineColor, data, []) : null;
|
|
@@ -10842,8 +10890,8 @@ var EntitiesIdsRenderManager;
|
|
|
10842
10890
|
curWidth == width) {
|
|
10843
10891
|
return;
|
|
10844
10892
|
}
|
|
10845
|
-
thing.polyline.material = cColor;
|
|
10846
|
-
thing.polyline.width = width;
|
|
10893
|
+
thing.polyline.material = new ColorMaterialProperty(cColor);
|
|
10894
|
+
thing.polyline.width = new ConstantProperty(width);
|
|
10847
10895
|
}
|
|
10848
10896
|
};
|
|
10849
10897
|
toForceUpdate = [];
|
|
@@ -15890,7 +15938,7 @@ function updateOrientation(rows, headingIndex, dateTimeIndex, viewer, vehicleEnt
|
|
|
15890
15938
|
var radians = Math$1.toRadians(interpolatedHeading - 90);
|
|
15891
15939
|
var quaternion = Transforms.headingPitchRollQuaternion(currentPosition, new HeadingPitchRoll(radians, 0, 0));
|
|
15892
15940
|
if (!isNaN(quaternion.w) && !isNaN(quaternion.x) && !isNaN(quaternion.y) && !isNaN(quaternion.z)) {
|
|
15893
|
-
vehicleEntity.orientation = quaternion;
|
|
15941
|
+
vehicleEntity.orientation = new ConstantProperty(quaternion);
|
|
15894
15942
|
return;
|
|
15895
15943
|
}
|
|
15896
15944
|
else {
|
|
@@ -15908,7 +15956,7 @@ function updateOrientation(rows, headingIndex, dateTimeIndex, viewer, vehicleEnt
|
|
|
15908
15956
|
var direction = Cartesian3.subtract(currentPosition, previousPosition, new Cartesian3());
|
|
15909
15957
|
Cartesian3.normalize(direction, direction);
|
|
15910
15958
|
var rotationMatrix = Transforms.rotationMatrixFromPositionVelocity(previousPosition, direction);
|
|
15911
|
-
vehicleEntity.orientation = Quaternion.fromRotationMatrix(rotationMatrix);
|
|
15959
|
+
vehicleEntity.orientation = new ConstantProperty(Quaternion.fromRotationMatrix(rotationMatrix));
|
|
15912
15960
|
}
|
|
15913
15961
|
}
|
|
15914
15962
|
function interpolateHeading(dateTimeIndex, rows, currentTime, headingIndex) {
|
|
@@ -19694,16 +19742,21 @@ function backgroundRendering(viewer) {
|
|
|
19694
19742
|
clearInterval(interval);
|
|
19695
19743
|
return;
|
|
19696
19744
|
}
|
|
19697
|
-
|
|
19698
|
-
|
|
19699
|
-
|
|
19700
|
-
|
|
19701
|
-
|
|
19702
|
-
|
|
19703
|
-
|
|
19704
|
-
|
|
19745
|
+
try {
|
|
19746
|
+
// Check if last render time is greater than 3 seconds ago.
|
|
19747
|
+
// We check in case something else is also requesting renders.
|
|
19748
|
+
var lastRenderTime = viewer.scene.lastRenderTime;
|
|
19749
|
+
if (!lastRenderTime || JulianDate.secondsDifference(JulianDate.now(), lastRenderTime) > 3) {
|
|
19750
|
+
// Check if window is active/in focus.
|
|
19751
|
+
// TODO: Should render the moment it is in focus as well.
|
|
19752
|
+
if (document.hasFocus()) {
|
|
19753
|
+
viewer.scene.requestRender();
|
|
19754
|
+
}
|
|
19705
19755
|
}
|
|
19706
19756
|
}
|
|
19757
|
+
catch (e) {
|
|
19758
|
+
console.error("backgroundRendering", e);
|
|
19759
|
+
}
|
|
19707
19760
|
}, 1500);
|
|
19708
19761
|
}
|
|
19709
19762
|
// Cache of Cesium Token -> Validity.
|
|
@@ -21888,7 +21941,9 @@ function renderLegacyNavigator(iteration, params, bookmark, view) {
|
|
|
21888
21941
|
if (pointer != null) {
|
|
21889
21942
|
clock = manager.Viewer.clock;
|
|
21890
21943
|
timeStr = JulianDate.toIso8601(pointer);
|
|
21891
|
-
|
|
21944
|
+
if (timeStr) {
|
|
21945
|
+
clock.currentTime = JulianDate.fromIso8601(timeStr);
|
|
21946
|
+
}
|
|
21892
21947
|
}
|
|
21893
21948
|
enabledItems = manager.GetEnabledItemIds();
|
|
21894
21949
|
newItemIds = (_d = bSettings === null || bSettings === void 0 ? void 0 : bSettings.selectedItemIds) !== null && _d !== void 0 ? _d : [];
|
|
@@ -22524,7 +22579,7 @@ var ViewRenderEngine;
|
|
|
22524
22579
|
ViewRenderEngine.Render = Render;
|
|
22525
22580
|
})(ViewRenderEngine || (ViewRenderEngine = {}));
|
|
22526
22581
|
|
|
22527
|
-
var VERSION = "3.7.
|
|
22582
|
+
var VERSION = "3.7.2";
|
|
22528
22583
|
|
|
22529
22584
|
export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, Draw3dPolygon, Draw3dPolyline };
|
|
22530
22585
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|