bruce-cesium 6.5.8 → 6.6.0
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 +268 -3
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +266 -1
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-arb-render-manager.js +54 -0
- package/dist/lib/rendering/render-managers/tilesets/tileset-arb-render-manager.js.map +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +176 -0
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/lib/rendering/xgrids-render-engine.js +36 -0
- package/dist/lib/rendering/xgrids-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/render-managers/tilesets/tileset-arb-render-manager.d.ts +2 -0
- package/dist/types/rendering/tileset-render-engine.d.ts +33 -0
- package/dist/types/rendering/xgrids-render-engine.d.ts +16 -1
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Cartes, Entity as Entity$1, Calculator, EntityRelationType, EntityType, Style, ENVIRONMENT, ProjectViewTile, DelayQueue, LRUCache, BruceEvent, ObjectUtils, Geometry, EntityHistoricData, EntityLod, ZoomControl, EntityTag, Tileset, Api, EntityCoords, DataLab, EntitySource, ClientFile, MenuItem, EntityRelation, ProgramKey, Bounds, Carto, ProjectView, ProjectViewBookmark,
|
|
1
|
+
import { Cartes, Entity as Entity$1, Calculator, EntityRelationType, EntityType, Style, ENVIRONMENT, ProjectViewTile, DelayQueue, LRUCache, BruceEvent, ObjectUtils, Geometry, EntityHistoricData, EntityLod, ZoomControl, EntityTag, Tileset, Api, EntityCoords, DataLab, EntitySource, ClientFile, MenuItem, EntityRelation, ProgramKey, Bounds, Carto, ProjectView, ProjectViewBookmark, ProjectViewLegacyTile, Camera, AbstractApi, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, Session } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature,
|
|
3
|
+
import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, Math as Math$1, Cartesian3, JulianDate, Quaternion, Transforms, HeadingPitchRoll, Matrix4, DistanceDisplayCondition, HeightReference, HorizontalOrigin, VerticalOrigin, ClassificationType, ConstantPositionProperty, PolygonHierarchy, ShadowMode, PolylineGraphics, ArcType, CornerType, ColorBlendMode, Model, Cartesian2, SceneTransforms, NearFarScalar, Matrix3, Rectangle, KmlDataSource, GeoJsonDataSource, SceneMode, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, IonResource, Cesium3DTileset, OrthographicFrustum, EasingFunction, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, BoundingSphere, GeometryInstance, PolygonPipeline, CesiumInspector, ClockRange, ScreenSpaceEventHandler, ScreenSpaceEventType, Intersect, CzmlDataSource, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Ensures a number is returned from a given value.
|
|
@@ -11926,6 +11926,66 @@ function isAlive$2(viewer, cTileset) {
|
|
|
11926
11926
|
}
|
|
11927
11927
|
const VIEWER_WATCH_KEY = "bruce-viewer-watch";
|
|
11928
11928
|
const WATCH_KEY = "bruce-tileset-watch";
|
|
11929
|
+
const VIEWER_DATE_RANGE_WATCH_KEY = "bruce-viewer-date-range-watch";
|
|
11930
|
+
const DATE_RANGE_WATCH_KEY = "bruce-tileset-date-range-watch";
|
|
11931
|
+
function parseDate(value) {
|
|
11932
|
+
if (!value) {
|
|
11933
|
+
return null;
|
|
11934
|
+
}
|
|
11935
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
11936
|
+
if (isNaN(date.getTime())) {
|
|
11937
|
+
return null;
|
|
11938
|
+
}
|
|
11939
|
+
return date;
|
|
11940
|
+
}
|
|
11941
|
+
function getTilesetDateRange(tileset) {
|
|
11942
|
+
var _a, _b, _c;
|
|
11943
|
+
const settings = (_a = tileset === null || tileset === void 0 ? void 0 : tileset.settings) !== null && _a !== void 0 ? _a : tileset === null || tileset === void 0 ? void 0 : tileset.Settings;
|
|
11944
|
+
const visual = (settings === null || settings === void 0 ? void 0 : settings.visual) || (settings === null || settings === void 0 ? void 0 : settings.Visual);
|
|
11945
|
+
const start = parseDate((_b = settings === null || settings === void 0 ? void 0 : settings.dateStart) !== null && _b !== void 0 ? _b : visual === null || visual === void 0 ? void 0 : visual.dateStart);
|
|
11946
|
+
const end = parseDate((_c = settings === null || settings === void 0 ? void 0 : settings.dateEnd) !== null && _c !== void 0 ? _c : visual === null || visual === void 0 ? void 0 : visual.dateEnd);
|
|
11947
|
+
if ((!start && !end) || (start && end && end < start)) {
|
|
11948
|
+
return null;
|
|
11949
|
+
}
|
|
11950
|
+
return { start, end };
|
|
11951
|
+
}
|
|
11952
|
+
function isDateInRange(date, range) {
|
|
11953
|
+
const time = date.getTime();
|
|
11954
|
+
if (range.start && time < range.start.getTime()) {
|
|
11955
|
+
return false;
|
|
11956
|
+
}
|
|
11957
|
+
if (range.end && time > range.end.getTime()) {
|
|
11958
|
+
return false;
|
|
11959
|
+
}
|
|
11960
|
+
return true;
|
|
11961
|
+
}
|
|
11962
|
+
function watchTilesetDateRange(viewer, cTileset, tileset) {
|
|
11963
|
+
TilesetRenderEngine.WatchDateRange(viewer, cTileset, tileset);
|
|
11964
|
+
}
|
|
11965
|
+
function isDateRangeWatchAlive(viewer, renderObject) {
|
|
11966
|
+
if (!viewer || viewer.isDestroyed() || !renderObject) {
|
|
11967
|
+
return false;
|
|
11968
|
+
}
|
|
11969
|
+
if (typeof renderObject.isDestroyed === "function" && renderObject.isDestroyed()) {
|
|
11970
|
+
return false;
|
|
11971
|
+
}
|
|
11972
|
+
if (typeof renderObject.setVisible === "function") {
|
|
11973
|
+
return true;
|
|
11974
|
+
}
|
|
11975
|
+
if (typeof renderObject.isDestroyed !== "function") {
|
|
11976
|
+
return true;
|
|
11977
|
+
}
|
|
11978
|
+
return isAlive$2(viewer, renderObject);
|
|
11979
|
+
}
|
|
11980
|
+
function setDateRangeVisible(renderObject, visible) {
|
|
11981
|
+
if (typeof renderObject.setVisible === "function") {
|
|
11982
|
+
renderObject.setVisible(visible);
|
|
11983
|
+
}
|
|
11984
|
+
else {
|
|
11985
|
+
renderObject.show = visible;
|
|
11986
|
+
}
|
|
11987
|
+
renderObject._bruceDateRangeVisible = visible;
|
|
11988
|
+
}
|
|
11929
11989
|
/**
|
|
11930
11990
|
* Creates and returns a tileset instance from a given url.
|
|
11931
11991
|
* This is made to handle the difference between old and new cesium versions.
|
|
@@ -12197,6 +12257,7 @@ var TilesetRenderEngine;
|
|
|
12197
12257
|
}
|
|
12198
12258
|
const cTileset = await createTileset(loadUrl, null, params.noMemoryLimit);
|
|
12199
12259
|
params.viewer.scene.primitives.add(cTileset);
|
|
12260
|
+
watchTilesetDateRange(params.viewer, cTileset, params.tileset);
|
|
12200
12261
|
OnTilesetReady(cTileset).then(() => {
|
|
12201
12262
|
var _a, _b, _c, _d;
|
|
12202
12263
|
try {
|
|
@@ -12243,6 +12304,7 @@ var TilesetRenderEngine;
|
|
|
12243
12304
|
}
|
|
12244
12305
|
const cTileset = await createTileset(loadUrl, null, params.noMemoryLimit);
|
|
12245
12306
|
params.viewer.scene.primitives.add(cTileset);
|
|
12307
|
+
watchTilesetDateRange(params.viewer, cTileset, params.tileset);
|
|
12246
12308
|
return cTileset;
|
|
12247
12309
|
}
|
|
12248
12310
|
else if (params.tileset.type == Tileset.EType.PointCloud) {
|
|
@@ -12258,6 +12320,7 @@ var TilesetRenderEngine;
|
|
|
12258
12320
|
}
|
|
12259
12321
|
const cTileset = await createTileset(loadUrl, null, params.noMemoryLimit);
|
|
12260
12322
|
params.viewer.scene.primitives.add(cTileset);
|
|
12323
|
+
watchTilesetDateRange(params.viewer, cTileset, params.tileset);
|
|
12261
12324
|
OnTilesetReady(cTileset).then(() => {
|
|
12262
12325
|
var _a;
|
|
12263
12326
|
try {
|
|
@@ -12346,6 +12409,7 @@ var TilesetRenderEngine;
|
|
|
12346
12409
|
backFaceCulling: backFaceCulling === true
|
|
12347
12410
|
}, noMemoryLimit);
|
|
12348
12411
|
viewer.scene.primitives.add(cTileset);
|
|
12412
|
+
watchTilesetDateRange(viewer, cTileset, tileset);
|
|
12349
12413
|
OnTilesetReady(cTileset).then(() => {
|
|
12350
12414
|
var _a;
|
|
12351
12415
|
try {
|
|
@@ -12422,11 +12486,110 @@ var TilesetRenderEngine;
|
|
|
12422
12486
|
class Styler extends TilesetStyler {
|
|
12423
12487
|
}
|
|
12424
12488
|
TilesetRenderEngine.Styler = Styler;
|
|
12489
|
+
function GetTilesetDateRange(tileset) {
|
|
12490
|
+
return getTilesetDateRange(tileset);
|
|
12491
|
+
}
|
|
12492
|
+
TilesetRenderEngine.GetTilesetDateRange = GetTilesetDateRange;
|
|
12493
|
+
function WatchDateRange(viewer, renderObject, tileset) {
|
|
12494
|
+
var _a;
|
|
12495
|
+
const range = getTilesetDateRange(tileset);
|
|
12496
|
+
if (!range) {
|
|
12497
|
+
return;
|
|
12498
|
+
}
|
|
12499
|
+
(_a = GetDateRangeWatcher(viewer)) === null || _a === void 0 ? void 0 : _a.Watch(renderObject, range);
|
|
12500
|
+
}
|
|
12501
|
+
TilesetRenderEngine.WatchDateRange = WatchDateRange;
|
|
12502
|
+
function UnwatchDateRange(viewer, renderObject) {
|
|
12503
|
+
var _a;
|
|
12504
|
+
(_a = viewer === null || viewer === void 0 ? void 0 : viewer[VIEWER_DATE_RANGE_WATCH_KEY]) === null || _a === void 0 ? void 0 : _a.Unwatch(renderObject);
|
|
12505
|
+
}
|
|
12506
|
+
TilesetRenderEngine.UnwatchDateRange = UnwatchDateRange;
|
|
12425
12507
|
/**
|
|
12426
12508
|
* The maximum memory in MB that can be used by all tilesets.
|
|
12427
12509
|
* This is distributed evenly between all loaded tilesets.
|
|
12428
12510
|
*/
|
|
12429
12511
|
TilesetRenderEngine.MAX_TILESET_MEMORY = 1024;
|
|
12512
|
+
/**
|
|
12513
|
+
* Watches tileset date cutoffs and toggles their primitive visibility based on the viewer clock.
|
|
12514
|
+
*/
|
|
12515
|
+
class DateRangeWatcher {
|
|
12516
|
+
constructor(viewer) {
|
|
12517
|
+
this.watched = [];
|
|
12518
|
+
this.clockRemoval = null;
|
|
12519
|
+
this.viewer = viewer;
|
|
12520
|
+
this.clockRemoval = viewer.clock.onTick.addEventListener(() => {
|
|
12521
|
+
this.update();
|
|
12522
|
+
});
|
|
12523
|
+
}
|
|
12524
|
+
clean() {
|
|
12525
|
+
this.watched = this.watched.filter(x => isDateRangeWatchAlive(this.viewer, x));
|
|
12526
|
+
if (!this.viewer || this.viewer.isDestroyed()) {
|
|
12527
|
+
this.destroy();
|
|
12528
|
+
}
|
|
12529
|
+
}
|
|
12530
|
+
updateTileset(tileset) {
|
|
12531
|
+
if (!(tileset === null || tileset === void 0 ? void 0 : tileset._bruceDateRange) || !isDateRangeWatchAlive(this.viewer, tileset)) {
|
|
12532
|
+
return false;
|
|
12533
|
+
}
|
|
12534
|
+
const currentDate = JulianDate.toDate(this.viewer.clock.currentTime);
|
|
12535
|
+
const shouldShow = isDateInRange(currentDate, tileset._bruceDateRange);
|
|
12536
|
+
if (tileset._bruceDateRangeVisible === shouldShow && (typeof tileset.setVisible === "function" || tileset.show === shouldShow)) {
|
|
12537
|
+
return false;
|
|
12538
|
+
}
|
|
12539
|
+
setDateRangeVisible(tileset, shouldShow);
|
|
12540
|
+
return true;
|
|
12541
|
+
}
|
|
12542
|
+
update() {
|
|
12543
|
+
this.clean();
|
|
12544
|
+
let changed = false;
|
|
12545
|
+
this.watched.forEach(x => {
|
|
12546
|
+
changed = this.updateTileset(x) || changed;
|
|
12547
|
+
});
|
|
12548
|
+
if (changed) {
|
|
12549
|
+
this.viewer.scene.requestRender();
|
|
12550
|
+
}
|
|
12551
|
+
}
|
|
12552
|
+
destroy() {
|
|
12553
|
+
var _a;
|
|
12554
|
+
(_a = this.clockRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
12555
|
+
this.clockRemoval = null;
|
|
12556
|
+
this.watched = [];
|
|
12557
|
+
}
|
|
12558
|
+
Watch(tileset, range) {
|
|
12559
|
+
if (!tileset) {
|
|
12560
|
+
return;
|
|
12561
|
+
}
|
|
12562
|
+
if (!(range === null || range === void 0 ? void 0 : range.start) && !(range === null || range === void 0 ? void 0 : range.end)) {
|
|
12563
|
+
this.Unwatch(tileset);
|
|
12564
|
+
return;
|
|
12565
|
+
}
|
|
12566
|
+
if (!tileset[DATE_RANGE_WATCH_KEY]) {
|
|
12567
|
+
tileset[DATE_RANGE_WATCH_KEY] = ObjectUtils.UId();
|
|
12568
|
+
}
|
|
12569
|
+
tileset._bruceDateRange = range;
|
|
12570
|
+
const index = this.watched.findIndex(x => x[DATE_RANGE_WATCH_KEY] === tileset[DATE_RANGE_WATCH_KEY]);
|
|
12571
|
+
if (index < 0) {
|
|
12572
|
+
this.watched.push(tileset);
|
|
12573
|
+
}
|
|
12574
|
+
if (this.updateTileset(tileset)) {
|
|
12575
|
+
this.viewer.scene.requestRender();
|
|
12576
|
+
}
|
|
12577
|
+
}
|
|
12578
|
+
Unwatch(tileset) {
|
|
12579
|
+
if (!tileset) {
|
|
12580
|
+
return;
|
|
12581
|
+
}
|
|
12582
|
+
if (!tileset[DATE_RANGE_WATCH_KEY]) {
|
|
12583
|
+
tileset[DATE_RANGE_WATCH_KEY] = ObjectUtils.UId();
|
|
12584
|
+
}
|
|
12585
|
+
const index = this.watched.findIndex(x => (x === null || x === void 0 ? void 0 : x[DATE_RANGE_WATCH_KEY]) === tileset[DATE_RANGE_WATCH_KEY]);
|
|
12586
|
+
if (index > -1) {
|
|
12587
|
+
this.watched.splice(index, 1);
|
|
12588
|
+
}
|
|
12589
|
+
tileset._bruceDateRange = null;
|
|
12590
|
+
}
|
|
12591
|
+
}
|
|
12592
|
+
TilesetRenderEngine.DateRangeWatcher = DateRangeWatcher;
|
|
12430
12593
|
/**
|
|
12431
12594
|
* Watches tilesets in the viewer.
|
|
12432
12595
|
* This will regulate their max memory param.
|
|
@@ -12480,9 +12643,11 @@ var TilesetRenderEngine;
|
|
|
12480
12643
|
this.distributeMemory();
|
|
12481
12644
|
}
|
|
12482
12645
|
Unwatch(tileset) {
|
|
12646
|
+
var _a, _b;
|
|
12483
12647
|
if (!tileset) {
|
|
12484
12648
|
return;
|
|
12485
12649
|
}
|
|
12650
|
+
(_b = (_a = this.viewer) === null || _a === void 0 ? void 0 : _a[VIEWER_DATE_RANGE_WATCH_KEY]) === null || _b === void 0 ? void 0 : _b.Unwatch(tileset);
|
|
12486
12651
|
if (!tileset[WATCH_KEY]) {
|
|
12487
12652
|
tileset[WATCH_KEY] = ObjectUtils.UId();
|
|
12488
12653
|
}
|
|
@@ -12505,6 +12670,17 @@ var TilesetRenderEngine;
|
|
|
12505
12670
|
return viewer[VIEWER_WATCH_KEY];
|
|
12506
12671
|
}
|
|
12507
12672
|
TilesetRenderEngine.GetMemoryWatcher = GetMemoryWatcher;
|
|
12673
|
+
function GetDateRangeWatcher(viewer) {
|
|
12674
|
+
// If viewer is dead return nothing.
|
|
12675
|
+
if (!viewer || viewer.isDestroyed()) {
|
|
12676
|
+
return null;
|
|
12677
|
+
}
|
|
12678
|
+
if (!viewer[VIEWER_DATE_RANGE_WATCH_KEY]) {
|
|
12679
|
+
viewer[VIEWER_DATE_RANGE_WATCH_KEY] = new DateRangeWatcher(viewer);
|
|
12680
|
+
}
|
|
12681
|
+
return viewer[VIEWER_DATE_RANGE_WATCH_KEY];
|
|
12682
|
+
}
|
|
12683
|
+
TilesetRenderEngine.GetDateRangeWatcher = GetDateRangeWatcher;
|
|
12508
12684
|
})(TilesetRenderEngine || (TilesetRenderEngine = {}));
|
|
12509
12685
|
|
|
12510
12686
|
/**
|
|
@@ -16342,6 +16518,10 @@ var XGridsRenderEngine;
|
|
|
16342
16518
|
}
|
|
16343
16519
|
}
|
|
16344
16520
|
});
|
|
16521
|
+
if (typeof (obj === null || obj === void 0 ? void 0 : obj.setVisible) === "function") {
|
|
16522
|
+
obj.setVisible(true);
|
|
16523
|
+
}
|
|
16524
|
+
TilesetRenderEngine.WatchDateRange(viewer, obj, tileset);
|
|
16345
16525
|
// Highest LOD.
|
|
16346
16526
|
obj.setStartLod(0);
|
|
16347
16527
|
// Max distance for rendering.
|
|
@@ -16361,9 +16541,40 @@ var XGridsRenderEngine;
|
|
|
16361
16541
|
console.warn("[XGridsRenderEngine] Remove() LCCRender library not available.");
|
|
16362
16542
|
return;
|
|
16363
16543
|
}
|
|
16544
|
+
TilesetRenderEngine.UnwatchDateRange(viewer, renderObject);
|
|
16364
16545
|
LCCRender.unload(renderObject);
|
|
16365
16546
|
}
|
|
16366
16547
|
XGridsRenderEngine.Remove = Remove;
|
|
16548
|
+
/**
|
|
16549
|
+
* Applies position, rotation, and scale to a live XGrids render object.
|
|
16550
|
+
*/
|
|
16551
|
+
function ApplyPosition(params) {
|
|
16552
|
+
const { renderObject, origin, rotation, dontRotate, dontTransform } = params;
|
|
16553
|
+
if (!renderObject) {
|
|
16554
|
+
return;
|
|
16555
|
+
}
|
|
16556
|
+
const lat = EnsureNumber(origin === null || origin === void 0 ? void 0 : origin.latitude, 0);
|
|
16557
|
+
const lon = EnsureNumber(origin === null || origin === void 0 ? void 0 : origin.longitude, 0);
|
|
16558
|
+
const alt = EnsureNumber(origin === null || origin === void 0 ? void 0 : origin.altitude, 0);
|
|
16559
|
+
const scale = EnsureNumber((origin === null || origin === void 0 ? void 0 : origin.scale) || 1, 1);
|
|
16560
|
+
if (!dontTransform) {
|
|
16561
|
+
const pos = Cartesian3.fromDegrees(lon, lat, alt);
|
|
16562
|
+
if (typeof renderObject.setTranslation === 'function') {
|
|
16563
|
+
renderObject.setTranslation(pos);
|
|
16564
|
+
}
|
|
16565
|
+
}
|
|
16566
|
+
if (!dontRotate && !dontTransform) {
|
|
16567
|
+
const hpr = HeadingPitchRoll.fromDegrees(EnsureNumber(rotation === null || rotation === void 0 ? void 0 : rotation.z), EnsureNumber(rotation === null || rotation === void 0 ? void 0 : rotation.x), EnsureNumber(rotation === null || rotation === void 0 ? void 0 : rotation.y), new HeadingPitchRoll());
|
|
16568
|
+
const rotMatrix = Matrix3.fromHeadingPitchRoll(hpr);
|
|
16569
|
+
if (typeof renderObject.setRotation === 'function') {
|
|
16570
|
+
renderObject.setRotation(rotMatrix);
|
|
16571
|
+
}
|
|
16572
|
+
if (typeof renderObject.setScale === 'function') {
|
|
16573
|
+
renderObject.setScale(new Cartesian3(scale, scale, scale));
|
|
16574
|
+
}
|
|
16575
|
+
}
|
|
16576
|
+
}
|
|
16577
|
+
XGridsRenderEngine.ApplyPosition = ApplyPosition;
|
|
16367
16578
|
})(XGridsRenderEngine || (XGridsRenderEngine = {}));
|
|
16368
16579
|
|
|
16369
16580
|
async function getLegacyTileset(params) {
|
|
@@ -16422,6 +16633,9 @@ var TilesetArbRenderManager;
|
|
|
16422
16633
|
get RenderTypeChanged() {
|
|
16423
16634
|
return this.renderTypeChanged;
|
|
16424
16635
|
}
|
|
16636
|
+
get LccObject() {
|
|
16637
|
+
return this.lccObject;
|
|
16638
|
+
}
|
|
16425
16639
|
constructor(params) {
|
|
16426
16640
|
this.disposed = false;
|
|
16427
16641
|
this.cTileset = null;
|
|
@@ -16547,6 +16761,57 @@ var TilesetArbRenderManager;
|
|
|
16547
16761
|
tileset: tileset,
|
|
16548
16762
|
flyTo: this.item.FlyTo
|
|
16549
16763
|
});
|
|
16764
|
+
if (this.lccObject) {
|
|
16765
|
+
const lccSettings = tileset.settings;
|
|
16766
|
+
const origin = lccSettings === null || lccSettings === void 0 ? void 0 : lccSettings.origin;
|
|
16767
|
+
const rotation = lccSettings === null || lccSettings === void 0 ? void 0 : lccSettings.rotation;
|
|
16768
|
+
this.lccObject._isXGridsLCC = true;
|
|
16769
|
+
this.lccObject._bruceCoords = {
|
|
16770
|
+
location: {
|
|
16771
|
+
latitude: +(origin === null || origin === void 0 ? void 0 : origin.latitude) || 0,
|
|
16772
|
+
longitude: +(origin === null || origin === void 0 ? void 0 : origin.longitude) || 0,
|
|
16773
|
+
altitude: +(origin === null || origin === void 0 ? void 0 : origin.altitude) || 0
|
|
16774
|
+
},
|
|
16775
|
+
transform: {
|
|
16776
|
+
heading: +(rotation === null || rotation === void 0 ? void 0 : rotation.z) || 0,
|
|
16777
|
+
pitch: +(rotation === null || rotation === void 0 ? void 0 : rotation.x) || 0,
|
|
16778
|
+
roll: +(rotation === null || rotation === void 0 ? void 0 : rotation.y) || 0,
|
|
16779
|
+
scale: +(origin === null || origin === void 0 ? void 0 : origin.scale) || 1
|
|
16780
|
+
},
|
|
16781
|
+
isLegacy: true,
|
|
16782
|
+
legacyProps: {
|
|
16783
|
+
rotate: !(lccSettings === null || lccSettings === void 0 ? void 0 : lccSettings.dontRotate),
|
|
16784
|
+
transform: !(lccSettings === null || lccSettings === void 0 ? void 0 : lccSettings.dontTransform),
|
|
16785
|
+
usingBoundingBox: true
|
|
16786
|
+
}
|
|
16787
|
+
};
|
|
16788
|
+
// Attach a position-update callback so app-editors can update easier.
|
|
16789
|
+
const capturedSettings = lccSettings;
|
|
16790
|
+
const capturedObj = this.lccObject;
|
|
16791
|
+
this.lccObject._applyPosition = (coords) => {
|
|
16792
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
16793
|
+
if (!capturedObj) {
|
|
16794
|
+
return;
|
|
16795
|
+
}
|
|
16796
|
+
const loc = (_b = (_a = coords === null || coords === void 0 ? void 0 : coords.ucs) === null || _a === void 0 ? void 0 : _a.location) !== null && _b !== void 0 ? _b : coords === null || coords === void 0 ? void 0 : coords.location;
|
|
16797
|
+
XGridsRenderEngine.ApplyPosition({
|
|
16798
|
+
renderObject: capturedObj,
|
|
16799
|
+
origin: {
|
|
16800
|
+
latitude: loc === null || loc === void 0 ? void 0 : loc.latitude,
|
|
16801
|
+
longitude: loc === null || loc === void 0 ? void 0 : loc.longitude,
|
|
16802
|
+
altitude: loc === null || loc === void 0 ? void 0 : loc.altitude,
|
|
16803
|
+
scale: (_d = (_c = coords === null || coords === void 0 ? void 0 : coords.transform) === null || _c === void 0 ? void 0 : _c.scale) !== null && _d !== void 0 ? _d : 1
|
|
16804
|
+
},
|
|
16805
|
+
rotation: {
|
|
16806
|
+
z: (_f = (_e = coords === null || coords === void 0 ? void 0 : coords.transform) === null || _e === void 0 ? void 0 : _e.heading) !== null && _f !== void 0 ? _f : 0,
|
|
16807
|
+
x: (_h = (_g = coords === null || coords === void 0 ? void 0 : coords.transform) === null || _g === void 0 ? void 0 : _g.pitch) !== null && _h !== void 0 ? _h : 0,
|
|
16808
|
+
y: (_k = (_j = coords === null || coords === void 0 ? void 0 : coords.transform) === null || _j === void 0 ? void 0 : _j.roll) !== null && _k !== void 0 ? _k : 0
|
|
16809
|
+
},
|
|
16810
|
+
dontRotate: capturedSettings === null || capturedSettings === void 0 ? void 0 : capturedSettings.dontRotate,
|
|
16811
|
+
dontTransform: capturedSettings === null || capturedSettings === void 0 ? void 0 : capturedSettings.dontTransform
|
|
16812
|
+
});
|
|
16813
|
+
};
|
|
16814
|
+
}
|
|
16550
16815
|
// Disposed while it was loading so we'll remove it now.
|
|
16551
16816
|
if (this.Disposed && this.lccObject) {
|
|
16552
16817
|
XGridsRenderEngine.Remove(this.viewer, this.lccObject);
|
|
@@ -35276,7 +35541,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
35276
35541
|
}
|
|
35277
35542
|
}
|
|
35278
35543
|
|
|
35279
|
-
const VERSION = "6.
|
|
35544
|
+
const VERSION = "6.6.0";
|
|
35280
35545
|
/**
|
|
35281
35546
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
35282
35547
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|