bruce-cesium 5.8.9 → 5.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 +139 -120
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +138 -119
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-gatherer.js +6 -0
- package/dist/lib/rendering/entity-gatherer.js.map +1 -1
- package/dist/lib/rendering/render-managers/data-source/data-source-static-csv-manager.js +6 -0
- 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 +6 -1
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +27 -50
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/other/assembly-render-manager.js +94 -71
- package/dist/lib/rendering/render-managers/other/assembly-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js +4 -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/render-managers/other/assembly-render-manager.d.ts +7 -0
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Entity as Entity$1, ProjectViewTile, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttachment, EntityAttachmentType, EntityAttribute, AbstractApi, Session } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, ColorBlendMode, HeadingPitchRoll, Transforms, Model, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, Cesium3DTileset, IonResource, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
const TIME_LAG = 300;
|
|
6
6
|
const POSITION_CHECK_TIMER = 950;
|
|
@@ -13964,56 +13964,32 @@ var EntitiesRenderManager;
|
|
|
13964
13964
|
* @returns
|
|
13965
13965
|
*/
|
|
13966
13966
|
async renderAsIndividuals(entities, force = false) {
|
|
13967
|
-
var _a, _b, _c, _d, _e, _f
|
|
13967
|
+
var _a, _b, _c, _d, _e, _f;
|
|
13968
|
+
// When live we just want to show the latest pos.
|
|
13969
|
+
// When not live, the user might scroll the timeline and want to see it a fluid animation between points in time.
|
|
13970
|
+
const isLive = ViewUtils.GetTimeDetails({
|
|
13971
|
+
viewer: this.viewer
|
|
13972
|
+
}).isLive;
|
|
13968
13973
|
// Entity ID -> historic records array.
|
|
13969
13974
|
// We load this as extra information when rendering historic records.
|
|
13970
13975
|
// This way we know what to animate towards as time changes.
|
|
13971
13976
|
let entitiesHistoric = {};
|
|
13972
|
-
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
13976
|
-
|
|
13977
|
-
|
|
13978
|
-
|
|
13979
|
-
|
|
13980
|
-
|
|
13981
|
-
|
|
13982
|
-
|
|
13983
|
-
|
|
13984
|
-
|
|
13985
|
-
|
|
13986
|
-
|
|
13987
|
-
|
|
13988
|
-
entitiesHistoric = historicData.recordsByIds;
|
|
13989
|
-
// Remove ones with no historicAttrKey and no historic data.
|
|
13990
|
-
const toRemoveIds = entities.filter(x => { var _a, _b; return !((_b = (_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.Outline) === null || _b === void 0 ? void 0 : _b.length) && !entitiesHistoric[x.Bruce.ID]; }).map(x => x.Bruce.ID);
|
|
13991
|
-
for (let i = 0; i < toRemoveIds.length; i++) {
|
|
13992
|
-
const removeId = toRemoveIds[i];
|
|
13993
|
-
this.visualsManager.RemoveRegos({
|
|
13994
|
-
entityId: removeId,
|
|
13995
|
-
menuItemId: this.item.id,
|
|
13996
|
-
requestRender: false
|
|
13997
|
-
});
|
|
13998
|
-
(_c = this.clustering) === null || _c === void 0 ? void 0 : _c.RemoveEntity(removeId, false);
|
|
13999
|
-
}
|
|
14000
|
-
entities = entities.filter(x => !toRemoveIds.includes(x.Bruce.ID));
|
|
14001
|
-
}
|
|
14002
|
-
// Not interpolating.
|
|
14003
|
-
// So we'll see if the Entities have a historic key or not.
|
|
14004
|
-
else {
|
|
14005
|
-
const toRemoveIds = entities.filter(x => { var _a; return !((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.Outline); }).map(x => x.Bruce.ID);
|
|
14006
|
-
for (let i = 0; i < toRemoveIds.length; i++) {
|
|
14007
|
-
const removeId = toRemoveIds[i];
|
|
14008
|
-
this.visualsManager.RemoveRegos({
|
|
14009
|
-
entityId: removeId,
|
|
14010
|
-
menuItemId: this.item.id,
|
|
14011
|
-
requestRender: false
|
|
14012
|
-
});
|
|
14013
|
-
(_d = this.clustering) === null || _d === void 0 ? void 0 : _d.RemoveEntity(removeId, false);
|
|
14014
|
-
}
|
|
14015
|
-
entities = entities.filter(x => !toRemoveIds.includes(x.Bruce.ID));
|
|
14016
|
-
}
|
|
13977
|
+
const isHistoric = ((_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historic) || ((_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.historicAttrKey);
|
|
13978
|
+
// If we're interpolating then we request additional records to quickly swap between.
|
|
13979
|
+
if (!isLive && isHistoric && entities.length && this.item.historicInterpolation) {
|
|
13980
|
+
// We'll add/remove 1 second to ensure we cover all records.
|
|
13981
|
+
const startTmp = JulianDate.toDate(this.viewer.clock.startTime);
|
|
13982
|
+
const stopTmp = JulianDate.toDate(this.viewer.clock.stopTime);
|
|
13983
|
+
const startStr = new Date(startTmp.getTime() - 1000).toISOString();
|
|
13984
|
+
const stopStr = new Date(stopTmp.getTime() + 1000).toISOString();
|
|
13985
|
+
const historicData = await EntityHistoricData.GetList({
|
|
13986
|
+
attrKey: this.item.BruceEntity.historicAttrKey,
|
|
13987
|
+
dateTimeFrom: startStr,
|
|
13988
|
+
dateTimeTo: stopStr,
|
|
13989
|
+
entityIds: entities.map(x => x.Bruce.ID),
|
|
13990
|
+
api: this.apiGetter.getApi()
|
|
13991
|
+
});
|
|
13992
|
+
entitiesHistoric = historicData.recordsByIds;
|
|
14017
13993
|
}
|
|
14018
13994
|
if (this.disposed) {
|
|
14019
13995
|
this.doDispose();
|
|
@@ -14048,7 +14024,7 @@ var EntitiesRenderManager;
|
|
|
14048
14024
|
menuItemId: this.item.id
|
|
14049
14025
|
});
|
|
14050
14026
|
// The baseline data source must be editable.
|
|
14051
|
-
const canEdit = !((
|
|
14027
|
+
const canEdit = !((_c = entity.Bruce.Outline) === null || _c === void 0 ? void 0 : _c.find(x => x.Baseline && !x.Editable));
|
|
14052
14028
|
const visual = rego === null || rego === void 0 ? void 0 : rego.visual;
|
|
14053
14029
|
if (!visual || visual != cEntity) {
|
|
14054
14030
|
const wasClustered = this.clustering ? this.clustering.AddEntity(id, cEntity, false) : false;
|
|
@@ -14079,9 +14055,9 @@ var EntitiesRenderManager;
|
|
|
14079
14055
|
rego.visual = cEntity;
|
|
14080
14056
|
rego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
14081
14057
|
rego.tagIds = entity.Bruce["Layer.ID"] ? [].concat(entity.Bruce["Layer.ID"]) : [];
|
|
14082
|
-
rego.outline = (
|
|
14058
|
+
rego.outline = (_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d.Outline;
|
|
14083
14059
|
rego.cdn = this.item.cdnEnabled;
|
|
14084
|
-
rego.schema = (
|
|
14060
|
+
rego.schema = (_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e.Schema;
|
|
14085
14061
|
rego.canEdit = canEdit;
|
|
14086
14062
|
// Marked as stale meaning some change was performed that requires a refresh.
|
|
14087
14063
|
// This usually means a new sibling was added that we need to update.
|
|
@@ -14112,7 +14088,7 @@ var EntitiesRenderManager;
|
|
|
14112
14088
|
menuItemId: this.item.id,
|
|
14113
14089
|
requestRender: false
|
|
14114
14090
|
});
|
|
14115
|
-
(
|
|
14091
|
+
(_f = this.clustering) === null || _f === void 0 ? void 0 : _f.RemoveEntity(id, false);
|
|
14116
14092
|
}
|
|
14117
14093
|
}
|
|
14118
14094
|
this.viewer.scene.requestRender();
|
|
@@ -15183,9 +15159,14 @@ var EntitiesIdsRenderManager;
|
|
|
15183
15159
|
if (this.disposed || this.viewer.isDestroyed() || !entities.length) {
|
|
15184
15160
|
return;
|
|
15185
15161
|
}
|
|
15162
|
+
// When live we just want to show the latest pos.
|
|
15163
|
+
// When not live, the user might scroll the timeline and want to see it a fluid animation between points in time.
|
|
15164
|
+
const isLive = ViewUtils.GetTimeDetails({
|
|
15165
|
+
viewer: this.viewer,
|
|
15166
|
+
}).isLive;
|
|
15186
15167
|
let entitiesHistoric = {};
|
|
15187
15168
|
let changed = false;
|
|
15188
|
-
if ((this.item.BruceEntity.historic || this.item.BruceEntity.historicAttrKey) && entities.length) {
|
|
15169
|
+
if (!isLive && (this.item.BruceEntity.historic || this.item.BruceEntity.historicAttrKey) && entities.length) {
|
|
15189
15170
|
const res = await this.getHistoricInfo(entities);
|
|
15190
15171
|
changed = res[0];
|
|
15191
15172
|
entitiesHistoric = res[1];
|
|
@@ -15687,7 +15668,13 @@ class EntityGatherer {
|
|
|
15687
15668
|
tickDelay = null;
|
|
15688
15669
|
});
|
|
15689
15670
|
// React to clock changes and request new Entities.
|
|
15671
|
+
let prevTime = null;
|
|
15690
15672
|
this.hDisposals.push(this.viewer.clock.onTick.addEventListener(() => {
|
|
15673
|
+
const curTime = this.viewer.clock.currentTime.toString();
|
|
15674
|
+
if (curTime === prevTime) {
|
|
15675
|
+
return;
|
|
15676
|
+
}
|
|
15677
|
+
prevTime = curTime;
|
|
15691
15678
|
if (tickDelay) {
|
|
15692
15679
|
tickDelay.Call();
|
|
15693
15680
|
}
|
|
@@ -19079,6 +19066,7 @@ var TilesetCadRenderManager;
|
|
|
19079
19066
|
return await this.historicPossesLoadingProm;
|
|
19080
19067
|
};
|
|
19081
19068
|
// Last known timeline range. Helps us detect changes.
|
|
19069
|
+
let lastTime = this.viewer.clock.currentTime.toString();
|
|
19082
19070
|
let lastStartTime = this.viewer.clock.startTime.toString();
|
|
19083
19071
|
let lastStopTime = this.viewer.clock.stopTime.toString();
|
|
19084
19072
|
let clockTickRemoval;
|
|
@@ -19118,9 +19106,11 @@ var TilesetCadRenderManager;
|
|
|
19118
19106
|
clockTickRemoval = this.viewer.clock.onTick.addEventListener(() => {
|
|
19119
19107
|
const startTime = this.viewer.clock.startTime.toString();
|
|
19120
19108
|
const stopTime = this.viewer.clock.stopTime.toString();
|
|
19121
|
-
|
|
19109
|
+
const curTime = this.viewer.clock.currentTime.toString();
|
|
19110
|
+
if (startTime !== lastStartTime || stopTime !== lastStopTime || curTime !== lastTime) {
|
|
19122
19111
|
lastStartTime = startTime;
|
|
19123
19112
|
lastStopTime = stopTime;
|
|
19113
|
+
lastTime = curTime;
|
|
19124
19114
|
this.historicAnimation.onRangeChange();
|
|
19125
19115
|
}
|
|
19126
19116
|
});
|
|
@@ -21556,7 +21546,13 @@ var DataSourceStaticCsvManager;
|
|
|
21556
21546
|
if (this.viewer.clock) {
|
|
21557
21547
|
const pHeadingIndex = pHeaders.findIndex(x => x.toLowerCase().includes("head"));
|
|
21558
21548
|
let errorsInARow = 0;
|
|
21549
|
+
let prevTime = null;
|
|
21559
21550
|
const removal = this.viewer.clock.onTick.addEventListener(() => {
|
|
21551
|
+
const curTime = this.viewer.clock.currentTime.toString();
|
|
21552
|
+
if (curTime === prevTime) {
|
|
21553
|
+
return;
|
|
21554
|
+
}
|
|
21555
|
+
prevTime = curTime;
|
|
21560
21556
|
const vehicle = source.entities.getById(vehicleCesiumId);
|
|
21561
21557
|
if (vehicle) {
|
|
21562
21558
|
try {
|
|
@@ -22416,6 +22412,7 @@ var AssemblyRenderManager;
|
|
|
22416
22412
|
// Quick look-up of the hierarchy nodes by entity ID.
|
|
22417
22413
|
this.hierarchyNodeByEntityId = null;
|
|
22418
22414
|
this.modelSpace = false;
|
|
22415
|
+
this.rootId = null;
|
|
22419
22416
|
const { viewer, register: visualsManager, getters, item } = params;
|
|
22420
22417
|
this.viewer = viewer;
|
|
22421
22418
|
this.getters = getters;
|
|
@@ -22429,7 +22426,6 @@ var AssemblyRenderManager;
|
|
|
22429
22426
|
this.renderPriority = 1;
|
|
22430
22427
|
}
|
|
22431
22428
|
(async () => {
|
|
22432
|
-
var _a, _b, _c;
|
|
22433
22429
|
if (this.disposed) {
|
|
22434
22430
|
return;
|
|
22435
22431
|
}
|
|
@@ -22461,81 +22457,100 @@ var AssemblyRenderManager;
|
|
|
22461
22457
|
rootId = hierarchy.Root.ID;
|
|
22462
22458
|
}
|
|
22463
22459
|
}
|
|
22460
|
+
this.rootId = rootId;
|
|
22464
22461
|
if (this.disposed) {
|
|
22465
22462
|
return;
|
|
22466
22463
|
}
|
|
22467
|
-
|
|
22468
|
-
|
|
22469
|
-
for (let i = 0; i < batches; i++) {
|
|
22470
|
-
const batch = flatEntityIds.slice(i * BATCH_SIZE, (i + 1) * BATCH_SIZE);
|
|
22471
|
-
if (!batch.length) {
|
|
22472
|
-
continue;
|
|
22473
|
-
}
|
|
22474
|
-
const { entities } = await Entity$1.GetListByIds({
|
|
22475
|
-
entityIds: batch,
|
|
22476
|
-
api: this.getters.GetBruceApi(),
|
|
22477
|
-
expandLODs: true,
|
|
22478
|
-
expandLocation: true
|
|
22479
|
-
});
|
|
22480
|
-
if (this.disposed) {
|
|
22481
|
-
return;
|
|
22482
|
-
}
|
|
22483
|
-
for (const entity of entities) {
|
|
22484
|
-
const lod = entity.Bruce.LOD ? entity.Bruce.LOD[0] : null;
|
|
22485
|
-
if (!lod || !((_a = lod["ClientFile"]) === null || _a === void 0 ? void 0 : _a.URL)) {
|
|
22486
|
-
// Won't bother with vector data for this experiment.
|
|
22487
|
-
continue;
|
|
22488
|
-
}
|
|
22489
|
-
const pos3d = calcEntityLocation$1(entity, this.modelSpace);
|
|
22490
|
-
const orient = calcEntityOrientation(entity, pos3d, this.modelSpace);
|
|
22491
|
-
if (!pos3d || !orient) {
|
|
22492
|
-
continue;
|
|
22493
|
-
}
|
|
22494
|
-
const cEntity = this.viewer.entities.add({
|
|
22495
|
-
model: {
|
|
22496
|
-
uri: lod["ClientFile"].URL,
|
|
22497
|
-
heightReference: HeightReference.NONE
|
|
22498
|
-
},
|
|
22499
|
-
// point: {
|
|
22500
|
-
// pixelSize: 50,
|
|
22501
|
-
// disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
|
22502
|
-
// color: Cesium.Color.fromCssColorString("#FF0000"),
|
|
22503
|
-
// heightReference: Cesium.HeightReference.NONE
|
|
22504
|
-
// },
|
|
22505
|
-
position: pos3d,
|
|
22506
|
-
orientation: new ConstantProperty(orient)
|
|
22507
|
-
});
|
|
22508
|
-
const geometryRadius = Entity$1.GetValue({
|
|
22509
|
-
entity: entity,
|
|
22510
|
-
path: ["Bruce", "GeometryRadius"]
|
|
22511
|
-
});
|
|
22512
|
-
cEntity.model["_radius"] = geometryRadius;
|
|
22513
|
-
cEntity.model["_radiusLoaded"] = true;
|
|
22514
|
-
this.visualsManager.AddRego({
|
|
22515
|
-
rego: {
|
|
22516
|
-
canEdit: true,
|
|
22517
|
-
entityId: entity.Bruce.ID,
|
|
22518
|
-
menuItemId: this.item.id,
|
|
22519
|
-
menuItemType: this.item.Type,
|
|
22520
|
-
priority: this.renderPriority,
|
|
22521
|
-
visual: cEntity,
|
|
22522
|
-
accountId: this.getters.GetAccountId(),
|
|
22523
|
-
entityTypeId: entity.Bruce["EntityType.ID"],
|
|
22524
|
-
name: entity.Bruce.Name,
|
|
22525
|
-
rootId: rootId,
|
|
22526
|
-
parentId: (_c = (_b = this.hierarchyNodeByEntityId) === null || _b === void 0 ? void 0 : _b[entity.Bruce.ID]) === null || _c === void 0 ? void 0 : _c.parentId
|
|
22527
|
-
},
|
|
22528
|
-
requestRender: false
|
|
22529
|
-
});
|
|
22530
|
-
}
|
|
22531
|
-
this.viewer.scene.requestRender();
|
|
22464
|
+
else if (flatEntityIds.length === 0) {
|
|
22465
|
+
return;
|
|
22532
22466
|
}
|
|
22467
|
+
this.processEntityIds(flatEntityIds);
|
|
22533
22468
|
}
|
|
22534
22469
|
catch (e) {
|
|
22535
22470
|
console.error("AssemblyRenderManager.Manager.Init()", e);
|
|
22536
22471
|
}
|
|
22537
22472
|
})();
|
|
22538
22473
|
}
|
|
22474
|
+
/**
|
|
22475
|
+
* Processes given entity IDs and renders them in the viewer.
|
|
22476
|
+
* @param entityIds
|
|
22477
|
+
* @returns
|
|
22478
|
+
*/
|
|
22479
|
+
async processEntityIds(entityIds) {
|
|
22480
|
+
var _a, _b, _c;
|
|
22481
|
+
if (!entityIds || !entityIds.length) {
|
|
22482
|
+
return;
|
|
22483
|
+
}
|
|
22484
|
+
else if (this.disposed) {
|
|
22485
|
+
return;
|
|
22486
|
+
}
|
|
22487
|
+
const BATCH_SIZE = 200;
|
|
22488
|
+
let batches = Math.ceil(entityIds.length / BATCH_SIZE);
|
|
22489
|
+
for (let i = 0; i < batches; i++) {
|
|
22490
|
+
const batch = entityIds.slice(i * BATCH_SIZE, (i + 1) * BATCH_SIZE);
|
|
22491
|
+
if (!batch.length) {
|
|
22492
|
+
continue;
|
|
22493
|
+
}
|
|
22494
|
+
const { entities: fetched } = await Entity$1.GetListByIds({
|
|
22495
|
+
entityIds: batch,
|
|
22496
|
+
api: this.getters.GetBruceApi(),
|
|
22497
|
+
expandLODs: true,
|
|
22498
|
+
expandLocation: true
|
|
22499
|
+
});
|
|
22500
|
+
if (this.disposed) {
|
|
22501
|
+
return;
|
|
22502
|
+
}
|
|
22503
|
+
for (const entity of fetched) {
|
|
22504
|
+
const lod = entity.Bruce.LOD ? entity.Bruce.LOD[0] : null;
|
|
22505
|
+
if (!lod || !((_a = lod["ClientFile"]) === null || _a === void 0 ? void 0 : _a.URL)) {
|
|
22506
|
+
// Won't bother with vector data for this experiment.
|
|
22507
|
+
continue;
|
|
22508
|
+
}
|
|
22509
|
+
const pos3d = calcEntityLocation$1(entity, this.modelSpace);
|
|
22510
|
+
const orient = calcEntityOrientation(entity, pos3d, this.modelSpace);
|
|
22511
|
+
if (!pos3d || !orient) {
|
|
22512
|
+
continue;
|
|
22513
|
+
}
|
|
22514
|
+
const cEntity = this.viewer.entities.add({
|
|
22515
|
+
model: {
|
|
22516
|
+
uri: lod["ClientFile"].URL,
|
|
22517
|
+
heightReference: HeightReference.NONE
|
|
22518
|
+
},
|
|
22519
|
+
// point: {
|
|
22520
|
+
// pixelSize: 50,
|
|
22521
|
+
// disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
|
22522
|
+
// color: Cesium.Color.fromCssColorString("#FF0000"),
|
|
22523
|
+
// heightReference: Cesium.HeightReference.NONE
|
|
22524
|
+
// },
|
|
22525
|
+
position: pos3d,
|
|
22526
|
+
orientation: new ConstantProperty(orient)
|
|
22527
|
+
});
|
|
22528
|
+
const geometryRadius = Entity$1.GetValue({
|
|
22529
|
+
entity: entity,
|
|
22530
|
+
path: ["Bruce", "GeometryRadius"]
|
|
22531
|
+
});
|
|
22532
|
+
cEntity.model["_radius"] = geometryRadius;
|
|
22533
|
+
cEntity.model["_radiusLoaded"] = true;
|
|
22534
|
+
this.visualsManager.AddRego({
|
|
22535
|
+
rego: {
|
|
22536
|
+
canEdit: true,
|
|
22537
|
+
entityId: entity.Bruce.ID,
|
|
22538
|
+
menuItemId: this.item.id,
|
|
22539
|
+
menuItemType: this.item.Type,
|
|
22540
|
+
priority: this.renderPriority,
|
|
22541
|
+
visual: cEntity,
|
|
22542
|
+
accountId: this.getters.GetAccountId(),
|
|
22543
|
+
entityTypeId: entity.Bruce["EntityType.ID"],
|
|
22544
|
+
name: entity.Bruce.Name,
|
|
22545
|
+
rootId: this.rootId,
|
|
22546
|
+
parentId: (_c = (_b = this.hierarchyNodeByEntityId) === null || _b === void 0 ? void 0 : _b[entity.Bruce.ID]) === null || _c === void 0 ? void 0 : _c.parentId
|
|
22547
|
+
},
|
|
22548
|
+
requestRender: false
|
|
22549
|
+
});
|
|
22550
|
+
}
|
|
22551
|
+
this.viewer.scene.requestRender();
|
|
22552
|
+
}
|
|
22553
|
+
}
|
|
22539
22554
|
Dispose() {
|
|
22540
22555
|
if (this.disposed) {
|
|
22541
22556
|
return;
|
|
@@ -22550,6 +22565,10 @@ var AssemblyRenderManager;
|
|
|
22550
22565
|
if (entities && !entityIds) {
|
|
22551
22566
|
entityIds = entities.map(x => { var _a; return (_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.ID; });
|
|
22552
22567
|
}
|
|
22568
|
+
if (!entityIds && entities) {
|
|
22569
|
+
entityIds = entities.map(x => { var _a; return (_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.ID; });
|
|
22570
|
+
}
|
|
22571
|
+
this.processEntityIds(entityIds);
|
|
22553
22572
|
}
|
|
22554
22573
|
/**
|
|
22555
22574
|
* Builds quick look-up of the hierarchy nodes by entity ID.
|
|
@@ -33092,7 +33111,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
33092
33111
|
}
|
|
33093
33112
|
}
|
|
33094
33113
|
|
|
33095
|
-
const VERSION = "5.
|
|
33114
|
+
const VERSION = "5.9.1";
|
|
33096
33115
|
|
|
33097
33116
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isOutlineChanged, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, AssemblyRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, DEFAULT_LIVE_PADDING_SECONDS, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar, WidgetControlViewBar, WidgetControlViewBarSearch, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
|
|
33098
33117
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|