bruce-cesium 5.5.7 → 5.5.8
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 +251 -83
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +250 -82
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/menu-item-creator.js +13 -3
- package/dist/lib/rendering/menu-item-creator.js.map +1 -1
- package/dist/lib/rendering/menu-item-manager.js +56 -14
- package/dist/lib/rendering/menu-item-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/other/assembly-render-manager.js +14 -4
- 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 +9 -3
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +7 -2
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/lib/rendering/view-render-engine.js +58 -31
- package/dist/lib/rendering/view-render-engine.js.map +1 -1
- package/dist/lib/utils/entity-utils.js +93 -24
- package/dist/lib/utils/entity-utils.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/menu-item-manager.d.ts +1 -0
- package/dist/types/rendering/render-managers/other/assembly-render-manager.d.ts +3 -0
- package/dist/types/rendering/render-managers/tilesets/tileset-cad-render-manager.d.ts +3 -0
- package/dist/types/rendering/tileset-render-engine.d.ts +2 -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, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, 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, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, HorizontalOrigin, VerticalOrigin, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, EllipsoidTerrainProvider, CesiumInspector, OrthographicFrustum, defined, ClockRange, EasingFunction, NearFarScalar, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, IonResource, PolygonPipeline, Cesium3DTileset, EllipsoidGeodesic, sampleTerrainMostDetailed, 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;
|
|
@@ -2888,6 +2888,43 @@ const getLocationFromFeature = (feature) => {
|
|
|
2888
2888
|
}
|
|
2889
2889
|
return result;
|
|
2890
2890
|
};
|
|
2891
|
+
function calcEntityLocation(entity, modelSpace) {
|
|
2892
|
+
let aRootLocation = entity.Bruce.AssemblyRootLocation;
|
|
2893
|
+
// If we're in model-space we cull location.
|
|
2894
|
+
// This puts it at 0,0 lat/lon which we treat as 0,0,0 for model-space viewing.
|
|
2895
|
+
if (modelSpace) {
|
|
2896
|
+
aRootLocation = null;
|
|
2897
|
+
}
|
|
2898
|
+
const worldPosition = entity.Bruce.AssemblyWorldPosition;
|
|
2899
|
+
if (!worldPosition) {
|
|
2900
|
+
return null;
|
|
2901
|
+
}
|
|
2902
|
+
let offset = new Cartesian3(+worldPosition[0][3], +worldPosition[1][3], +worldPosition[2][3]);
|
|
2903
|
+
let heading = 0;
|
|
2904
|
+
let pitch = 0;
|
|
2905
|
+
let roll = 0;
|
|
2906
|
+
{
|
|
2907
|
+
const eTransform = entity.Bruce.Transform;
|
|
2908
|
+
if (eTransform) {
|
|
2909
|
+
if (eTransform.heading) {
|
|
2910
|
+
heading = eTransform.heading;
|
|
2911
|
+
}
|
|
2912
|
+
if (eTransform.pitch) {
|
|
2913
|
+
pitch = eTransform.pitch;
|
|
2914
|
+
}
|
|
2915
|
+
if (eTransform.roll) {
|
|
2916
|
+
roll = eTransform.roll;
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
let pos3d = Cartesian3.fromDegrees(EnsureNumber(aRootLocation === null || aRootLocation === void 0 ? void 0 : aRootLocation.longitude), EnsureNumber(aRootLocation === null || aRootLocation === void 0 ? void 0 : aRootLocation.latitude), EnsureNumber(aRootLocation === null || aRootLocation === void 0 ? void 0 : aRootLocation.altitude));
|
|
2921
|
+
const m1 = Transforms.eastNorthUpToFixedFrame(pos3d);
|
|
2922
|
+
const hpr = HeadingPitchRoll.fromDegrees(EnsureNumber(heading), EnsureNumber(pitch), EnsureNumber(roll), new HeadingPitchRoll());
|
|
2923
|
+
const transform = Matrix3.fromHeadingPitchRoll(hpr);
|
|
2924
|
+
const transformedOffset = Matrix3.multiplyByVector(transform, offset, new Cartesian3());
|
|
2925
|
+
pos3d = Matrix4.multiplyByPoint(m1, transformedOffset, new Cartesian3());
|
|
2926
|
+
return pos3d;
|
|
2927
|
+
}
|
|
2891
2928
|
var EntityUtils;
|
|
2892
2929
|
(function (EntityUtils) {
|
|
2893
2930
|
/**
|
|
@@ -2909,6 +2946,9 @@ var EntityUtils;
|
|
|
2909
2946
|
let terrainSamples = 0;
|
|
2910
2947
|
const MAX_VALID_SAMPLES = 20;
|
|
2911
2948
|
let validSamples = 0;
|
|
2949
|
+
// When in model-space, Assembly Entities are all relative to 0,0 lat/lon.
|
|
2950
|
+
// Which means we have to ignore the location and calculate based on relative position to 0,0.
|
|
2951
|
+
const modelSpace = viewer["nextspace-model-space"] === true;
|
|
2912
2952
|
const data = {
|
|
2913
2953
|
pos3d: null,
|
|
2914
2954
|
rectangle: null,
|
|
@@ -3170,8 +3210,9 @@ var EntityUtils;
|
|
|
3170
3210
|
* @param sample
|
|
3171
3211
|
*/
|
|
3172
3212
|
const getRecordEntityPositions = async (sample) => {
|
|
3173
|
-
var _a;
|
|
3213
|
+
var _a, _b;
|
|
3174
3214
|
let { entityId, entity, disallowRendered } = sample;
|
|
3215
|
+
const isAssemblyEntity = ((_a = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _a === void 0 ? void 0 : _a.AssemblyRootLocation) != null;
|
|
3175
3216
|
/**
|
|
3176
3217
|
* Returns an array of positions from the entity's record.
|
|
3177
3218
|
*/
|
|
@@ -3248,38 +3289,59 @@ var EntityUtils;
|
|
|
3248
3289
|
}
|
|
3249
3290
|
return posses;
|
|
3250
3291
|
};
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
const eLocation = Entity$1.GetValue({
|
|
3292
|
+
if (isAssemblyEntity) {
|
|
3293
|
+
let pos3d = calcEntityLocation(entity, modelSpace);
|
|
3294
|
+
if (pos3d) {
|
|
3295
|
+
pos3d = await processPosHeight(pos3d, HeightReference.NONE);
|
|
3296
|
+
const geometryRadius = Entity$1.GetValue({
|
|
3257
3297
|
entity: entity,
|
|
3258
|
-
path: ["Bruce", "
|
|
3298
|
+
path: ["Bruce", "GeometryRadius"]
|
|
3259
3299
|
});
|
|
3260
|
-
if (
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3300
|
+
if (geometryRadius && (pos3d === null || pos3d === void 0 ? void 0 : pos3d.x)) {
|
|
3301
|
+
const sphere = BoundingSphere.fromPoints([pos3d]);
|
|
3302
|
+
// For now making sure it's less than x amount because we had a bug which made it huge.
|
|
3303
|
+
if (geometryRadius && geometryRadius < 500 && geometryRadius > 0.1) {
|
|
3304
|
+
sphere.radius = geometryRadius;
|
|
3305
|
+
spheres.push(sphere);
|
|
3264
3306
|
}
|
|
3265
|
-
|
|
3307
|
+
}
|
|
3308
|
+
return [pos3d];
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3311
|
+
else {
|
|
3312
|
+
const recordPosses = await evaluateRecord();
|
|
3313
|
+
if (recordPosses === null || recordPosses === void 0 ? void 0 : recordPosses.length) {
|
|
3314
|
+
// See if we can also get the spherical bounds.
|
|
3315
|
+
try {
|
|
3316
|
+
let pos3d = null;
|
|
3317
|
+
const eLocation = Entity$1.GetValue({
|
|
3266
3318
|
entity: entity,
|
|
3267
|
-
path: ["Bruce", "
|
|
3319
|
+
path: ["Bruce", "Location"]
|
|
3268
3320
|
});
|
|
3269
|
-
if (
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3321
|
+
if ((eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude) && ((_b = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _b === void 0 ? void 0 : _b.AssemblyRootLocation) != null) {
|
|
3322
|
+
pos3d = Cartesian3.fromDegrees(EnsureNumber(eLocation.longitude), EnsureNumber(eLocation.latitude), EnsureNumber(eLocation.altitude));
|
|
3323
|
+
if (pos3d === null || pos3d === void 0 ? void 0 : pos3d.x) {
|
|
3324
|
+
pos3d = await processPosHeight(pos3d, HeightReference.NONE);
|
|
3325
|
+
}
|
|
3326
|
+
const geometryRadius = Entity$1.GetValue({
|
|
3327
|
+
entity: entity,
|
|
3328
|
+
path: ["Bruce", "GeometryRadius"]
|
|
3329
|
+
});
|
|
3330
|
+
if (geometryRadius && (pos3d === null || pos3d === void 0 ? void 0 : pos3d.x)) {
|
|
3331
|
+
const sphere = BoundingSphere.fromPoints([pos3d]);
|
|
3332
|
+
// For now making sure it's less than x amount because we had a bug which made it huge.
|
|
3333
|
+
if (geometryRadius && geometryRadius < 500 && geometryRadius > 0.1) {
|
|
3334
|
+
sphere.radius = geometryRadius;
|
|
3335
|
+
spheres.push(sphere);
|
|
3336
|
+
}
|
|
3275
3337
|
}
|
|
3276
3338
|
}
|
|
3277
3339
|
}
|
|
3340
|
+
catch (e) {
|
|
3341
|
+
console.error(e);
|
|
3342
|
+
}
|
|
3343
|
+
return recordPosses;
|
|
3278
3344
|
}
|
|
3279
|
-
catch (e) {
|
|
3280
|
-
console.error(e);
|
|
3281
|
-
}
|
|
3282
|
-
return recordPosses;
|
|
3283
3345
|
}
|
|
3284
3346
|
return [];
|
|
3285
3347
|
};
|
|
@@ -3443,10 +3505,13 @@ var EntityUtils;
|
|
|
3443
3505
|
* @returns
|
|
3444
3506
|
*/
|
|
3445
3507
|
function GetPos(params) {
|
|
3508
|
+
var _a;
|
|
3446
3509
|
let { viewer, entity, visualRegister, allowRendered } = params;
|
|
3447
3510
|
if (allowRendered == null) {
|
|
3448
3511
|
allowRendered = true;
|
|
3449
3512
|
}
|
|
3513
|
+
const isModelSpace = viewer["nextspace-model-space"] === true;
|
|
3514
|
+
const isAssemblyEntity = ((_a = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _a === void 0 ? void 0 : _a.AssemblyRootLocation) != null;
|
|
3450
3515
|
function evaluateRendered() {
|
|
3451
3516
|
const rego = visualRegister ? visualRegister.GetRego({
|
|
3452
3517
|
entityId: entity.Bruce.ID,
|
|
@@ -3492,6 +3557,9 @@ var EntityUtils;
|
|
|
3492
3557
|
return null;
|
|
3493
3558
|
}
|
|
3494
3559
|
function evaluateRecord() {
|
|
3560
|
+
if (isAssemblyEntity) {
|
|
3561
|
+
return calcEntityLocation(entity, isModelSpace);
|
|
3562
|
+
}
|
|
3495
3563
|
const location = Entity$1.GetValue({
|
|
3496
3564
|
entity: entity,
|
|
3497
3565
|
path: ["Bruce", "Location"]
|
|
@@ -15897,7 +15965,7 @@ var TilesetRenderEngine;
|
|
|
15897
15965
|
const cTileset = params.cTileset;
|
|
15898
15966
|
const root = cTileset.root;
|
|
15899
15967
|
const position = params.position;
|
|
15900
|
-
|
|
15968
|
+
let location = ((_a = position.ucs) === null || _a === void 0 ? void 0 : _a.location) ? position.ucs.location : position.location;
|
|
15901
15969
|
let transform = position.transform;
|
|
15902
15970
|
transform = {
|
|
15903
15971
|
heading: 0,
|
|
@@ -15913,6 +15981,10 @@ var TilesetRenderEngine;
|
|
|
15913
15981
|
if (transform.scale <= 0) {
|
|
15914
15982
|
transform.scale = 0.000001;
|
|
15915
15983
|
}
|
|
15984
|
+
// If we're in model-space we'll just go at 0,0 lat/lon.
|
|
15985
|
+
if (params.modelSpace) {
|
|
15986
|
+
location = null;
|
|
15987
|
+
}
|
|
15916
15988
|
/**
|
|
15917
15989
|
* Very cursed.
|
|
15918
15990
|
*/
|
|
@@ -16108,7 +16180,8 @@ var TilesetRenderEngine;
|
|
|
16108
16180
|
ucs: (_b = params.coords) === null || _b === void 0 ? void 0 : _b.ucs,
|
|
16109
16181
|
location: ((_c = params.coords) === null || _c === void 0 ? void 0 : _c.location) == null ? settings.location : params.coords.location,
|
|
16110
16182
|
transform: ((_d = params.coords) === null || _d === void 0 ? void 0 : _d.transform) == null ? settings.transform : params.coords.transform
|
|
16111
|
-
}
|
|
16183
|
+
},
|
|
16184
|
+
modelSpace: params.modelSpace
|
|
16112
16185
|
});
|
|
16113
16186
|
params.viewer.scene.requestRender();
|
|
16114
16187
|
}
|
|
@@ -17366,6 +17439,9 @@ var TilesetCadRenderManager;
|
|
|
17366
17439
|
get Disposed() {
|
|
17367
17440
|
return this.disposed;
|
|
17368
17441
|
}
|
|
17442
|
+
get ModelSpace() {
|
|
17443
|
+
return this.modelSpace;
|
|
17444
|
+
}
|
|
17369
17445
|
get Tileset() {
|
|
17370
17446
|
return this.cTileset;
|
|
17371
17447
|
}
|
|
@@ -17374,6 +17450,7 @@ var TilesetCadRenderManager;
|
|
|
17374
17450
|
}
|
|
17375
17451
|
constructor(params) {
|
|
17376
17452
|
this.disposed = false;
|
|
17453
|
+
this.modelSpace = false;
|
|
17377
17454
|
this.cTileset = null;
|
|
17378
17455
|
this.styler = new TilesetRenderEngine.Styler();
|
|
17379
17456
|
// Quick look-up of the model tree nodes by entity/geomId.
|
|
@@ -17394,11 +17471,12 @@ var TilesetCadRenderManager;
|
|
|
17394
17471
|
this.historicPosses = [];
|
|
17395
17472
|
this.historicAnimation = null;
|
|
17396
17473
|
this.historicPossesLoadingProm = null;
|
|
17397
|
-
const { viewer, register: visualsManager, getters, item } = params;
|
|
17474
|
+
const { viewer, register: visualsManager, getters, item, modelSpace } = params;
|
|
17398
17475
|
this.viewer = viewer;
|
|
17399
17476
|
this.getters = getters;
|
|
17400
17477
|
this.item = item;
|
|
17401
17478
|
this.visualsManager = visualsManager;
|
|
17479
|
+
this.modelSpace = Boolean(modelSpace);
|
|
17402
17480
|
}
|
|
17403
17481
|
Init() {
|
|
17404
17482
|
var _a, _b;
|
|
@@ -17500,7 +17578,8 @@ var TilesetCadRenderManager;
|
|
|
17500
17578
|
coords: coords,
|
|
17501
17579
|
accountId: accountId,
|
|
17502
17580
|
viaCdn: Boolean(this.item.cdnEnabled == null ? true : this.item.cdnEnabled),
|
|
17503
|
-
noMemoryLimit: this.item["noMaximumMemory"]
|
|
17581
|
+
noMemoryLimit: this.item["noMaximumMemory"],
|
|
17582
|
+
modelSpace: this.modelSpace
|
|
17504
17583
|
});
|
|
17505
17584
|
if (this.disposed) {
|
|
17506
17585
|
this.doDispose();
|
|
@@ -17608,7 +17687,7 @@ var TilesetCadRenderManager;
|
|
|
17608
17687
|
mapTilesetFeature(feature, add) {
|
|
17609
17688
|
var _a, _b, _c, _d, _e;
|
|
17610
17689
|
const accountId = (_b = ((_a = this.item.tileset) === null || _a === void 0 ? void 0 : _a.ClientAccountID)) !== null && _b !== void 0 ? _b : this.getters.GetAccountId();
|
|
17611
|
-
const canEdit = accountId === this.getters.GetAccountId();
|
|
17690
|
+
const canEdit = accountId === this.getters.GetAccountId() && !this.modelSpace;
|
|
17612
17691
|
let rego = {
|
|
17613
17692
|
canEdit: canEdit,
|
|
17614
17693
|
entityId: null,
|
|
@@ -21327,15 +21406,20 @@ var AssemblyRenderManager;
|
|
|
21327
21406
|
get Disposed() {
|
|
21328
21407
|
return this.disposed;
|
|
21329
21408
|
}
|
|
21409
|
+
get ModelSpace() {
|
|
21410
|
+
return this.modelSpace;
|
|
21411
|
+
}
|
|
21330
21412
|
constructor(params) {
|
|
21331
21413
|
this.disposed = false;
|
|
21332
21414
|
// Cache of the hierarchy so that our scene-tree can reference it.
|
|
21333
21415
|
this.hierarchy = null;
|
|
21416
|
+
this.modelSpace = false;
|
|
21334
21417
|
const { viewer, register: visualsManager, getters, item } = params;
|
|
21335
21418
|
this.viewer = viewer;
|
|
21336
21419
|
this.getters = getters;
|
|
21337
21420
|
this.item = item;
|
|
21338
21421
|
this.visualsManager = visualsManager;
|
|
21422
|
+
this.modelSpace = Boolean(params.modelSpace);
|
|
21339
21423
|
}
|
|
21340
21424
|
Init() {
|
|
21341
21425
|
this.renderPriority = this.item.renderPriority;
|
|
@@ -21398,7 +21482,7 @@ var AssemblyRenderManager;
|
|
|
21398
21482
|
// Won't bother with vector data for this experiment.
|
|
21399
21483
|
continue;
|
|
21400
21484
|
}
|
|
21401
|
-
const pos3d = calcEntityLocation(entity);
|
|
21485
|
+
const pos3d = calcEntityLocation$1(entity, this.modelSpace);
|
|
21402
21486
|
const orient = calcEntityOrientation(entity, pos3d);
|
|
21403
21487
|
if (!pos3d || !orient) {
|
|
21404
21488
|
continue;
|
|
@@ -21460,8 +21544,13 @@ var AssemblyRenderManager;
|
|
|
21460
21544
|
AssemblyRenderManager.Manager = Manager;
|
|
21461
21545
|
})(AssemblyRenderManager || (AssemblyRenderManager = {}));
|
|
21462
21546
|
const axis_shift = new Quaternion(0, 0, -Math.SQRT1_2, Math.SQRT1_2);
|
|
21463
|
-
function calcEntityLocation(entity) {
|
|
21464
|
-
|
|
21547
|
+
function calcEntityLocation$1(entity, modelSpace) {
|
|
21548
|
+
let aRootLocation = entity.Bruce.AssemblyRootLocation;
|
|
21549
|
+
// If we're in model-space we cull location.
|
|
21550
|
+
// This puts it at 0,0 lat/lon which we treat as 0,0,0 for model-space viewing.
|
|
21551
|
+
if (modelSpace) {
|
|
21552
|
+
aRootLocation = null;
|
|
21553
|
+
}
|
|
21465
21554
|
const worldPosition = entity.Bruce.AssemblyWorldPosition;
|
|
21466
21555
|
if (!worldPosition) {
|
|
21467
21556
|
return null;
|
|
@@ -21484,7 +21573,7 @@ function calcEntityLocation(entity) {
|
|
|
21484
21573
|
}
|
|
21485
21574
|
}
|
|
21486
21575
|
}
|
|
21487
|
-
let pos3d = Cartesian3.fromDegrees(EnsureNumber(aRootLocation.longitude), EnsureNumber(aRootLocation.latitude), EnsureNumber(aRootLocation.altitude));
|
|
21576
|
+
let pos3d = Cartesian3.fromDegrees(EnsureNumber(aRootLocation === null || aRootLocation === void 0 ? void 0 : aRootLocation.longitude), EnsureNumber(aRootLocation === null || aRootLocation === void 0 ? void 0 : aRootLocation.latitude), EnsureNumber(aRootLocation === null || aRootLocation === void 0 ? void 0 : aRootLocation.altitude));
|
|
21488
21577
|
const m1 = Transforms.eastNorthUpToFixedFrame(pos3d);
|
|
21489
21578
|
const hpr = HeadingPitchRoll.fromDegrees(EnsureNumber(heading), EnsureNumber(pitch), EnsureNumber(roll), new HeadingPitchRoll());
|
|
21490
21579
|
const transform = Matrix3.fromHeadingPitchRoll(hpr);
|
|
@@ -21590,7 +21679,7 @@ var MenuItemManager;
|
|
|
21590
21679
|
* @returns
|
|
21591
21680
|
*/
|
|
21592
21681
|
RenderItem(params) {
|
|
21593
|
-
var _a, _b, _c, _d;
|
|
21682
|
+
var _a, _b, _c, _d, _e;
|
|
21594
21683
|
if (this.viewer.isDestroyed()) {
|
|
21595
21684
|
return null;
|
|
21596
21685
|
}
|
|
@@ -21607,7 +21696,11 @@ var MenuItemManager;
|
|
|
21607
21696
|
else if (!params.apiGetter) {
|
|
21608
21697
|
params.apiGetter = params.getters.GetBruceGetter();
|
|
21609
21698
|
}
|
|
21699
|
+
if (params.modelSpace == null) {
|
|
21700
|
+
params.modelSpace = false;
|
|
21701
|
+
}
|
|
21610
21702
|
let rItem = this.items.find(x => x.id == params.item.id);
|
|
21703
|
+
let create = true;
|
|
21611
21704
|
if (rItem) {
|
|
21612
21705
|
// This means we're updating a tag menu item.
|
|
21613
21706
|
// Tag menu items have alternative states based on bookmark settings.
|
|
@@ -21620,6 +21713,7 @@ var MenuItemManager;
|
|
|
21620
21713
|
});
|
|
21621
21714
|
rItem.item = params.item;
|
|
21622
21715
|
}
|
|
21716
|
+
create = false;
|
|
21623
21717
|
}
|
|
21624
21718
|
// This means we're updating a entities tileset menu item.
|
|
21625
21719
|
// These have different point scaling settings based on bookmark settings.
|
|
@@ -21628,6 +21722,7 @@ var MenuItemManager;
|
|
|
21628
21722
|
item: params.item,
|
|
21629
21723
|
});
|
|
21630
21724
|
rItem.item = params.item;
|
|
21725
|
+
create = false;
|
|
21631
21726
|
}
|
|
21632
21727
|
// This means we're updating a rendered relationships menu item.
|
|
21633
21728
|
// Eg: different entities need to be rendered, or one of the relationship data entities changed.
|
|
@@ -21637,6 +21732,7 @@ var MenuItemManager;
|
|
|
21637
21732
|
item: params.item,
|
|
21638
21733
|
});
|
|
21639
21734
|
rItem.item = params.item;
|
|
21735
|
+
create = false;
|
|
21640
21736
|
}
|
|
21641
21737
|
// This means we're updating a rendered relationships menu item.
|
|
21642
21738
|
// Eg: different entities need to be rendered, or one of the relationship data entities changed.
|
|
@@ -21645,17 +21741,50 @@ var MenuItemManager;
|
|
|
21645
21741
|
item: params.item,
|
|
21646
21742
|
});
|
|
21647
21743
|
rItem.item = params.item;
|
|
21744
|
+
create = false;
|
|
21745
|
+
}
|
|
21746
|
+
// Re-init in case model-space changed to geo-spatial or vice-versa.
|
|
21747
|
+
else if (rItem.type == MenuItem.EType.CadTileset && params.item.Type == MenuItem.EType.CadTileset) {
|
|
21748
|
+
if (rItem.renderManager && rItem.renderManager.ModelSpace == params.modelSpace) {
|
|
21749
|
+
create = false;
|
|
21750
|
+
}
|
|
21751
|
+
}
|
|
21752
|
+
// Re-init in case model-space changed to geo-spatial or vice-versa.
|
|
21753
|
+
else if (rItem.type == MenuItem.EType.Assembly && params.item.Type == MenuItem.EType.Assembly) {
|
|
21754
|
+
if (rItem.renderManager && rItem.renderManager.ModelSpace == params.modelSpace) {
|
|
21755
|
+
create = false;
|
|
21756
|
+
}
|
|
21757
|
+
}
|
|
21758
|
+
else if (rItem.type != params.item.Type) {
|
|
21759
|
+
create = true;
|
|
21760
|
+
}
|
|
21761
|
+
if (create) {
|
|
21762
|
+
try {
|
|
21763
|
+
(_b = rItem.renderManager) === null || _b === void 0 ? void 0 : _b.Dispose();
|
|
21764
|
+
}
|
|
21765
|
+
catch (e) {
|
|
21766
|
+
console.error(e);
|
|
21767
|
+
}
|
|
21768
|
+
this.items = this.items.filter(x => x.id !== rItem.id);
|
|
21648
21769
|
}
|
|
21649
21770
|
}
|
|
21650
|
-
|
|
21651
|
-
rItem
|
|
21652
|
-
|
|
21653
|
-
|
|
21654
|
-
|
|
21655
|
-
|
|
21656
|
-
|
|
21657
|
-
|
|
21658
|
-
|
|
21771
|
+
if (create) {
|
|
21772
|
+
if (!rItem) {
|
|
21773
|
+
rItem = {
|
|
21774
|
+
id: (_c = params.item.id) !== null && _c !== void 0 ? _c : ObjectUtils.UId(),
|
|
21775
|
+
childIds: [],
|
|
21776
|
+
item: params.item,
|
|
21777
|
+
renderManager: null,
|
|
21778
|
+
type: params.item.Type,
|
|
21779
|
+
errors: []
|
|
21780
|
+
};
|
|
21781
|
+
}
|
|
21782
|
+
else {
|
|
21783
|
+
rItem.item = params.item;
|
|
21784
|
+
rItem.type = params.item.Type;
|
|
21785
|
+
rItem.renderManager = null;
|
|
21786
|
+
rItem.errors = [];
|
|
21787
|
+
}
|
|
21659
21788
|
this.items.push(rItem);
|
|
21660
21789
|
if (!params.item.Type) {
|
|
21661
21790
|
params.item.Type = MenuItem.EType.None;
|
|
@@ -21703,7 +21832,8 @@ var MenuItemManager;
|
|
|
21703
21832
|
viewer: this.viewer,
|
|
21704
21833
|
register: this.visualsRegister,
|
|
21705
21834
|
getters: params.getters,
|
|
21706
|
-
item: params.item
|
|
21835
|
+
item: params.item,
|
|
21836
|
+
modelSpace: params.modelSpace,
|
|
21707
21837
|
});
|
|
21708
21838
|
break;
|
|
21709
21839
|
case MenuItem.EType.Assembly:
|
|
@@ -21711,7 +21841,8 @@ var MenuItemManager;
|
|
|
21711
21841
|
viewer: this.viewer,
|
|
21712
21842
|
register: this.visualsRegister,
|
|
21713
21843
|
getters: params.getters,
|
|
21714
|
-
item: params.item
|
|
21844
|
+
item: params.item,
|
|
21845
|
+
modelSpace: params.modelSpace,
|
|
21715
21846
|
});
|
|
21716
21847
|
break;
|
|
21717
21848
|
case MenuItem.EType.Osm:
|
|
@@ -21839,8 +21970,8 @@ var MenuItemManager;
|
|
|
21839
21970
|
rItem.childIds.push(childId);
|
|
21840
21971
|
}
|
|
21841
21972
|
}
|
|
21842
|
-
if (rItem.renderManager && !((
|
|
21843
|
-
(
|
|
21973
|
+
if (rItem.renderManager && !((_d = rItem.renderManager) === null || _d === void 0 ? void 0 : _d.Disposed)) {
|
|
21974
|
+
(_e = this.onUpdate) === null || _e === void 0 ? void 0 : _e.Trigger({ isEnabling: true, itemId: rItem.id });
|
|
21844
21975
|
}
|
|
21845
21976
|
return rItem.id;
|
|
21846
21977
|
}
|
|
@@ -22918,7 +23049,7 @@ var MenuItemCreator;
|
|
|
22918
23049
|
}
|
|
22919
23050
|
MenuItemCreator.RenderTileset = RenderTileset;
|
|
22920
23051
|
async function RenderBookmarkItems(params) {
|
|
22921
|
-
var _a;
|
|
23052
|
+
var _a, _b;
|
|
22922
23053
|
let { viewId, bookmarkId, apiGetter, getters, manager, viewer } = params;
|
|
22923
23054
|
if (!getters) {
|
|
22924
23055
|
getters = ENVIRONMENT.Api();
|
|
@@ -22965,10 +23096,19 @@ var MenuItemCreator;
|
|
|
22965
23096
|
enabledIds = bSettings.selectedItemIds;
|
|
22966
23097
|
}
|
|
22967
23098
|
}
|
|
22968
|
-
|
|
23099
|
+
const bSettings = bookmark.Settings;
|
|
23100
|
+
const defaults = (_a = view.Settings) === null || _a === void 0 ? void 0 : _a.defaults;
|
|
23101
|
+
let alternations = bSettings === null || bSettings === void 0 ? void 0 : bSettings.menuItemAlternations;
|
|
22969
23102
|
if (!alternations) {
|
|
22970
23103
|
alternations = {};
|
|
22971
23104
|
}
|
|
23105
|
+
let contentType = bSettings.contentType;
|
|
23106
|
+
if (!contentType && ((_b = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _b === void 0 ? void 0 : _b.contentType)) {
|
|
23107
|
+
contentType = defaults.settings.contentType;
|
|
23108
|
+
}
|
|
23109
|
+
if (contentType == null) {
|
|
23110
|
+
contentType = ProjectViewBookmark.EContentType.WEB_3D;
|
|
23111
|
+
}
|
|
22972
23112
|
const renderedItemIds = [];
|
|
22973
23113
|
if ((menuItems === null || menuItems === void 0 ? void 0 : menuItems.length) && (enabledIds === null || enabledIds === void 0 ? void 0 : enabledIds.length)) {
|
|
22974
23114
|
const traverseItems = async (item) => {
|
|
@@ -22996,7 +23136,8 @@ var MenuItemCreator;
|
|
|
22996
23136
|
if (enabledIds.includes(item.id)) {
|
|
22997
23137
|
const itemId = await manager.RenderItem({
|
|
22998
23138
|
item: item,
|
|
22999
|
-
getters: getters
|
|
23139
|
+
getters: getters,
|
|
23140
|
+
modelSpace: contentType === ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE
|
|
23000
23141
|
});
|
|
23001
23142
|
renderedItemIds.push(itemId);
|
|
23002
23143
|
}
|
|
@@ -24905,6 +25046,9 @@ const ITERATION_KEY$1 = "nextspace-view-render-engine-iteration";
|
|
|
24905
25046
|
// 1- new accounts get our token set.
|
|
24906
25047
|
// 2- we reference to the template account's token.
|
|
24907
25048
|
const CESIUM_DEFAULT_TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiODI1OWQyZC0wYzdlLTRlOTctODFlOC1kYjIwOGYzOWE0NGIiLCJpZCI6MTE3NDg0LCJpYXQiOjE2NzAzODczOTR9.sx0EZdD-Y33FQ7gB_R3CkTsk3KhNpODoQGrnpvSH4UQ";
|
|
25049
|
+
// Model-space flag so we know if we're changing from and to model-space.
|
|
25050
|
+
// This helps determine if we should instantly transition.
|
|
25051
|
+
const MODEL_SPACE_FLAG = "nextspace-model-space";
|
|
24908
25052
|
/**
|
|
24909
25053
|
* Creates a new iteration state.
|
|
24910
25054
|
* This will stop any existing renders from processing to their end.
|
|
@@ -25069,7 +25213,7 @@ async function renderLegacyNavigator(iteration, params, bookmark, view) {
|
|
|
25069
25213
|
* @param view
|
|
25070
25214
|
*/
|
|
25071
25215
|
async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
25072
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
25216
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
|
25073
25217
|
const viewer = params.manager.Viewer;
|
|
25074
25218
|
const scene = viewer.scene;
|
|
25075
25219
|
let cTokenSet = Ion.defaultAccessToken ? await ViewerUtils.AssertIonToken(Ion.defaultAccessToken) : false;
|
|
@@ -25105,21 +25249,28 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25105
25249
|
const vSettings = view.Settings;
|
|
25106
25250
|
const bSettings = ((_a = bookmark === null || bookmark === void 0 ? void 0 : bookmark.Settings) !== null && _a !== void 0 ? _a : {});
|
|
25107
25251
|
const defaults = (_b = vSettings.defaults) !== null && _b !== void 0 ? _b : {};
|
|
25108
|
-
let
|
|
25252
|
+
let contentType = bSettings.contentType;
|
|
25253
|
+
if (!contentType && ((_c = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _c === void 0 ? void 0 : _c.contentType)) {
|
|
25254
|
+
contentType = defaults.settings.contentType;
|
|
25255
|
+
}
|
|
25256
|
+
if (contentType == null) {
|
|
25257
|
+
contentType = ProjectViewBookmark.EContentType.WEB_3D;
|
|
25258
|
+
}
|
|
25259
|
+
let camera = ((_d = bookmark === null || bookmark === void 0 ? void 0 : bookmark.Camera) !== null && _d !== void 0 ? _d : {});
|
|
25109
25260
|
if (!Carto.ValidateCarto(camera)) {
|
|
25110
25261
|
camera = {
|
|
25111
25262
|
...camera,
|
|
25112
|
-
altitude: (
|
|
25113
|
-
latitude: (
|
|
25114
|
-
longitude: (
|
|
25115
|
-
heading: (
|
|
25116
|
-
pitch: (
|
|
25117
|
-
roll: (
|
|
25263
|
+
altitude: (_e = defaults.camera) === null || _e === void 0 ? void 0 : _e.altitude,
|
|
25264
|
+
latitude: (_f = defaults.camera) === null || _f === void 0 ? void 0 : _f.latitude,
|
|
25265
|
+
longitude: (_g = defaults.camera) === null || _g === void 0 ? void 0 : _g.longitude,
|
|
25266
|
+
heading: (_h = defaults.camera) === null || _h === void 0 ? void 0 : _h.heading,
|
|
25267
|
+
pitch: (_j = defaults.camera) === null || _j === void 0 ? void 0 : _j.pitch,
|
|
25268
|
+
roll: (_k = defaults.camera) === null || _k === void 0 ? void 0 : _k.roll
|
|
25118
25269
|
};
|
|
25119
25270
|
}
|
|
25120
25271
|
let newLens = camera.cameraFrustum;
|
|
25121
25272
|
if (newLens == null) {
|
|
25122
|
-
newLens = (
|
|
25273
|
+
newLens = (_l = defaults.camera) === null || _l === void 0 ? void 0 : _l.cameraFrustum;
|
|
25123
25274
|
}
|
|
25124
25275
|
if (newLens == null) {
|
|
25125
25276
|
// TODO: Need global default.
|
|
@@ -25139,7 +25290,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25139
25290
|
if (!params.skipCamera) {
|
|
25140
25291
|
let transition = params.skipTransition ? 0 : shouldBe2d === curIs2d ? camera.transition : 0;
|
|
25141
25292
|
if (transition == null) {
|
|
25142
|
-
transition = (
|
|
25293
|
+
transition = (_m = defaults.camera) === null || _m === void 0 ? void 0 : _m.transition;
|
|
25143
25294
|
}
|
|
25144
25295
|
if (transition == null) {
|
|
25145
25296
|
// TODO: Need global default.
|
|
@@ -25147,6 +25298,20 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25147
25298
|
}
|
|
25148
25299
|
if (Carto.ValidateCarto(camera)) {
|
|
25149
25300
|
const pos = Cartesian3.fromDegrees(+camera.longitude, +camera.latitude, +camera.altitude);
|
|
25301
|
+
if (
|
|
25302
|
+
// Moving into model-space.
|
|
25303
|
+
(contentType == ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE) ||
|
|
25304
|
+
// Moving away from model-space.
|
|
25305
|
+
// @ts-expect-error
|
|
25306
|
+
(contentType != ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE && viewer[MODEL_SPACE_FLAG] == true)) {
|
|
25307
|
+
const cameraPos3d = viewer.camera.position;
|
|
25308
|
+
if (!cameraPos3d || (cameraPos3d.x == 0 && cameraPos3d.y == 0 && cameraPos3d.z == 0)) {
|
|
25309
|
+
transition = 0;
|
|
25310
|
+
}
|
|
25311
|
+
else if (Cartesian3.distance(cameraPos3d, pos) > 10000) {
|
|
25312
|
+
transition = 0;
|
|
25313
|
+
}
|
|
25314
|
+
}
|
|
25150
25315
|
scene.camera.flyTo({
|
|
25151
25316
|
destination: pos,
|
|
25152
25317
|
orientation: {
|
|
@@ -25160,7 +25325,8 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25160
25325
|
});
|
|
25161
25326
|
}
|
|
25162
25327
|
}
|
|
25163
|
-
|
|
25328
|
+
viewer[MODEL_SPACE_FLAG] = contentType == ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE;
|
|
25329
|
+
let terrain = (bSettings === null || bSettings === void 0 ? void 0 : bSettings.terrain) != null ? bSettings === null || bSettings === void 0 ? void 0 : bSettings.terrain : (_o = defaults.settings) === null || _o === void 0 ? void 0 : _o.terrain;
|
|
25164
25330
|
if (terrain) {
|
|
25165
25331
|
// If there is no Cesium token set then we'll swap cesium terrain to flat terrain.
|
|
25166
25332
|
// This allows a scene to render even if it's not the correct one.
|
|
@@ -25183,7 +25349,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25183
25349
|
}
|
|
25184
25350
|
let hillShades = bSettings === null || bSettings === void 0 ? void 0 : bSettings.hillShades;
|
|
25185
25351
|
if (hillShades == null) {
|
|
25186
|
-
hillShades = (
|
|
25352
|
+
hillShades = (_p = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _p === void 0 ? void 0 : _p.hillShades;
|
|
25187
25353
|
}
|
|
25188
25354
|
if (hillShades == null) {
|
|
25189
25355
|
hillShades = true;
|
|
@@ -25191,7 +25357,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25191
25357
|
scene.globe.enableLighting = Boolean(hillShades);
|
|
25192
25358
|
let baseColor = bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeColor;
|
|
25193
25359
|
if (baseColor == null) {
|
|
25194
|
-
baseColor = (
|
|
25360
|
+
baseColor = (_q = defaults.settings) === null || _q === void 0 ? void 0 : _q.globeColor;
|
|
25195
25361
|
}
|
|
25196
25362
|
if (baseColor == null) {
|
|
25197
25363
|
// TODO: Need global default.
|
|
@@ -25200,7 +25366,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25200
25366
|
scene.globe.baseColor = Color.fromCssColorString(baseColor);
|
|
25201
25367
|
let globeHidden = bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeHidden;
|
|
25202
25368
|
if (globeHidden == null) {
|
|
25203
|
-
globeHidden = (
|
|
25369
|
+
globeHidden = (_r = defaults.settings) === null || _r === void 0 ? void 0 : _r.globeHidden;
|
|
25204
25370
|
}
|
|
25205
25371
|
if (globeHidden == null) {
|
|
25206
25372
|
globeHidden = false;
|
|
@@ -25208,7 +25374,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25208
25374
|
scene.globe.show = !globeHidden;
|
|
25209
25375
|
let terrainWireframe = bSettings === null || bSettings === void 0 ? void 0 : bSettings.terrainWireframe;
|
|
25210
25376
|
if (terrainWireframe == null) {
|
|
25211
|
-
terrainWireframe = (
|
|
25377
|
+
terrainWireframe = (_s = defaults.settings) === null || _s === void 0 ? void 0 : _s.terrainWireframe;
|
|
25212
25378
|
}
|
|
25213
25379
|
if (terrainWireframe == null) {
|
|
25214
25380
|
terrainWireframe = false;
|
|
@@ -25219,7 +25385,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25219
25385
|
});
|
|
25220
25386
|
let globeAlpha = +(bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeAlpha);
|
|
25221
25387
|
if (isNaN(globeAlpha)) {
|
|
25222
|
-
globeAlpha = +((
|
|
25388
|
+
globeAlpha = +((_t = defaults.settings) === null || _t === void 0 ? void 0 : _t.globeAlpha);
|
|
25223
25389
|
}
|
|
25224
25390
|
if (!scene.globe.translucency.enabled) {
|
|
25225
25391
|
scene.globe.translucency.enabled = true;
|
|
@@ -25229,7 +25395,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25229
25395
|
scene.globe.translucency.frontFaceAlphaByDistance.nearValue = EnsureNumber(globeAlpha, 1);
|
|
25230
25396
|
let shadows = bSettings === null || bSettings === void 0 ? void 0 : bSettings.shadows;
|
|
25231
25397
|
if (shadows == null) {
|
|
25232
|
-
shadows = (
|
|
25398
|
+
shadows = (_u = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _u === void 0 ? void 0 : _u.shadows;
|
|
25233
25399
|
}
|
|
25234
25400
|
if (shadows == null) {
|
|
25235
25401
|
shadows = {
|
|
@@ -25250,7 +25416,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25250
25416
|
viewer.shadowMap.darkness = EnsureNumber(shadows.darkness, 0.3);
|
|
25251
25417
|
let ambientOcclusion = bSettings === null || bSettings === void 0 ? void 0 : bSettings.ambientOcclusion;
|
|
25252
25418
|
if (ambientOcclusion == null) {
|
|
25253
|
-
ambientOcclusion = (
|
|
25419
|
+
ambientOcclusion = (_v = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _v === void 0 ? void 0 : _v.ambientOcclusion;
|
|
25254
25420
|
}
|
|
25255
25421
|
if (ambientOcclusion == null) {
|
|
25256
25422
|
ambientOcclusion = {
|
|
@@ -25273,7 +25439,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25273
25439
|
}
|
|
25274
25440
|
let lighting = bSettings === null || bSettings === void 0 ? void 0 : bSettings.lighting;
|
|
25275
25441
|
if (lighting == null) {
|
|
25276
|
-
lighting = (
|
|
25442
|
+
lighting = (_w = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _w === void 0 ? void 0 : _w.lighting;
|
|
25277
25443
|
}
|
|
25278
25444
|
if (lighting == null) {
|
|
25279
25445
|
lighting = {
|
|
@@ -25288,7 +25454,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25288
25454
|
}
|
|
25289
25455
|
let quality = bSettings === null || bSettings === void 0 ? void 0 : bSettings.quality;
|
|
25290
25456
|
if (quality == null) {
|
|
25291
|
-
quality = (
|
|
25457
|
+
quality = (_x = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _x === void 0 ? void 0 : _x.quality;
|
|
25292
25458
|
}
|
|
25293
25459
|
if (quality == null) {
|
|
25294
25460
|
quality = {
|
|
@@ -25299,11 +25465,11 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25299
25465
|
fxaa.enabled = Boolean(quality.fxaa);
|
|
25300
25466
|
let dateTime = bSettings === null || bSettings === void 0 ? void 0 : bSettings.dateTime;
|
|
25301
25467
|
if (dateTime == null) {
|
|
25302
|
-
dateTime = (
|
|
25468
|
+
dateTime = (_y = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _y === void 0 ? void 0 : _y.dateTime;
|
|
25303
25469
|
}
|
|
25304
25470
|
let timeline = bSettings === null || bSettings === void 0 ? void 0 : bSettings.timeline;
|
|
25305
25471
|
if (timeline == null) {
|
|
25306
|
-
timeline = (
|
|
25472
|
+
timeline = (_z = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _z === void 0 ? void 0 : _z.timeline;
|
|
25307
25473
|
}
|
|
25308
25474
|
if (timeline == null) {
|
|
25309
25475
|
timeline = {
|
|
@@ -25327,7 +25493,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25327
25493
|
// Newer version that has states per Entity ID + Menu Item ID.
|
|
25328
25494
|
let states = bSettings === null || bSettings === void 0 ? void 0 : bSettings.states;
|
|
25329
25495
|
if (states == null) {
|
|
25330
|
-
states = (
|
|
25496
|
+
states = (_0 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _0 === void 0 ? void 0 : _0.states;
|
|
25331
25497
|
}
|
|
25332
25498
|
if (states != null) {
|
|
25333
25499
|
params.manager.VisualsRegister.OverrideStates(states);
|
|
@@ -25336,7 +25502,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25336
25502
|
else {
|
|
25337
25503
|
let selectedIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.selectedEntityIds;
|
|
25338
25504
|
if (selectedIds == null) {
|
|
25339
|
-
selectedIds = (
|
|
25505
|
+
selectedIds = (_1 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _1 === void 0 ? void 0 : _1.selectedEntityIds;
|
|
25340
25506
|
}
|
|
25341
25507
|
if (selectedIds != null) {
|
|
25342
25508
|
params.manager.VisualsRegister.ClearSelected();
|
|
@@ -25350,7 +25516,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25350
25516
|
params.manager.VisualsRegister.ClearHidden();
|
|
25351
25517
|
let hiddenIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.hiddenEntityIds;
|
|
25352
25518
|
if (hiddenIds == null) {
|
|
25353
|
-
hiddenIds = (
|
|
25519
|
+
hiddenIds = (_2 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _2 === void 0 ? void 0 : _2.hiddenEntityIds;
|
|
25354
25520
|
}
|
|
25355
25521
|
if (hiddenIds != null) {
|
|
25356
25522
|
params.manager.VisualsRegister.SetHidden({
|
|
@@ -25362,7 +25528,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25362
25528
|
params.manager.VisualsRegister.ClearIsolated();
|
|
25363
25529
|
let isolatedIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.isolatedEntityIds;
|
|
25364
25530
|
if (isolatedIds == null) {
|
|
25365
|
-
isolatedIds = (
|
|
25531
|
+
isolatedIds = (_3 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _3 === void 0 ? void 0 : _3.isolatedEntityIds;
|
|
25366
25532
|
}
|
|
25367
25533
|
if (isolatedIds != null) {
|
|
25368
25534
|
params.manager.VisualsRegister.SetIsolated({
|
|
@@ -25373,7 +25539,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25373
25539
|
}
|
|
25374
25540
|
let labelledIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.labelledEntityIds;
|
|
25375
25541
|
if (labelledIds == null) {
|
|
25376
|
-
labelledIds = (
|
|
25542
|
+
labelledIds = (_4 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _4 === void 0 ? void 0 : _4.labelledEntityIds;
|
|
25377
25543
|
}
|
|
25378
25544
|
if (!(labelledIds === null || labelledIds === void 0 ? void 0 : labelledIds.length)) {
|
|
25379
25545
|
params.manager.VisualsRegister.ClearLabelled({
|
|
@@ -25397,7 +25563,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25397
25563
|
params.manager.VisualsRegister.ClearOpacity();
|
|
25398
25564
|
let entityOpacityMap = bSettings === null || bSettings === void 0 ? void 0 : bSettings.entityOpacityMap;
|
|
25399
25565
|
if (entityOpacityMap == null) {
|
|
25400
|
-
entityOpacityMap = (
|
|
25566
|
+
entityOpacityMap = (_5 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _5 === void 0 ? void 0 : _5.entityOpacityMap;
|
|
25401
25567
|
}
|
|
25402
25568
|
if (entityOpacityMap != null) {
|
|
25403
25569
|
for (const entityId in entityOpacityMap) {
|
|
@@ -25412,7 +25578,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25412
25578
|
}
|
|
25413
25579
|
}
|
|
25414
25580
|
}
|
|
25415
|
-
let imagery = (bSettings === null || bSettings === void 0 ? void 0 : bSettings.imagery) != null ? bSettings.imagery : (
|
|
25581
|
+
let imagery = (bSettings === null || bSettings === void 0 ? void 0 : bSettings.imagery) != null ? bSettings.imagery : (_6 = defaults.settings) === null || _6 === void 0 ? void 0 : _6.imagery;
|
|
25416
25582
|
if (imagery == null) {
|
|
25417
25583
|
// TODO: Need global default.
|
|
25418
25584
|
imagery = [
|
|
@@ -25473,11 +25639,13 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25473
25639
|
relations = [];
|
|
25474
25640
|
}
|
|
25475
25641
|
viewer.scene.requestRender();
|
|
25642
|
+
// TODO: When in model-space we should remove all unsupported items.
|
|
25643
|
+
// This prevents junk settings causing problems.
|
|
25476
25644
|
// Only disable menu items we don't want.
|
|
25477
25645
|
// Otherwise we cause a flicker of rendered graphics.
|
|
25478
25646
|
// Maybe TODO to such a function for menu item manager.
|
|
25479
25647
|
const curEnabled = params.manager.GetEnabledItemIds();
|
|
25480
|
-
const newItemIds = (
|
|
25648
|
+
const newItemIds = (_7 = bSettings === null || bSettings === void 0 ? void 0 : bSettings.menuItemIds) !== null && _7 !== void 0 ? _7 : [];
|
|
25481
25649
|
for (const id of curEnabled) {
|
|
25482
25650
|
let shouldRemove;
|
|
25483
25651
|
if (id == RELATION_MENU_ITEM_ID) {
|
|
@@ -25548,7 +25716,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
|
|
|
25548
25716
|
}
|
|
25549
25717
|
let gOcclusion = bSettings === null || bSettings === void 0 ? void 0 : bSettings.groundOcclusion;
|
|
25550
25718
|
if (gOcclusion == null) {
|
|
25551
|
-
gOcclusion = (
|
|
25719
|
+
gOcclusion = (_8 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _8 === void 0 ? void 0 : _8.groundOcclusion;
|
|
25552
25720
|
}
|
|
25553
25721
|
if (gOcclusion == null) {
|
|
25554
25722
|
// TODO: Need global default.
|
|
@@ -31453,7 +31621,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
31453
31621
|
}
|
|
31454
31622
|
}
|
|
31455
31623
|
|
|
31456
|
-
const VERSION = "5.5.
|
|
31624
|
+
const VERSION = "5.5.8";
|
|
31457
31625
|
|
|
31458
31626
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isHistoricMetadataChanged, 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 };
|
|
31459
31627
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|