bruce-cesium 2.2.2 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bruce-cesium.es5.js +35 -31
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +34 -30
- 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-cad-render-manager.js +3 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/lib/rendering/view-render-engine.js +30 -28
- package/dist/lib/rendering/view-render-engine.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/render-managers/tilesets/tileset-cad-render-manager.d.ts +1 -0
- package/dist/types/rendering/visuals-register.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, DelayQueue, BatchedDataGetter, EntityRelationType, EntityCoords, EntityFilterGetter, EntitySource, MenuItem, EntityRelation, ENVIRONMENT, ProjectView, ProjectViewBookmark, ProjectViewTile, ProjectViewLegacyTile, ProgramKey, Camera } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import {
|
|
3
|
+
import { Entity, Primitive, Cesium3DTileFeature, Color, Cartesian2, Cartesian3, SceneMode, Math as Math$1, Cartographic, CallbackProperty, Rectangle, HeightReference, DistanceDisplayCondition, NearFarScalar, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Cesium3DTileColorBlendMode, HeadingPitchRange, createOsmBuildings, Cesium3DTileStyle, KmlDataSource, OrthographicFrustum, JulianDate, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumInspector, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, Matrix4, Matrix3, IonResource, ColorMaterialProperty, EasingFunction, GeometryInstance, PolygonPipeline } from 'cesium';
|
|
4
4
|
|
|
5
5
|
var TIME_LAG = 300;
|
|
6
6
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -6639,6 +6639,7 @@ var TilesetCadRenderManager;
|
|
|
6639
6639
|
}
|
|
6640
6640
|
settings = tileset.settings;
|
|
6641
6641
|
rootId = settings.rootEntityId;
|
|
6642
|
+
this.rootId = rootId;
|
|
6642
6643
|
return [4 /*yield*/, EntityCoords.GetEntityCoords({
|
|
6643
6644
|
api: api,
|
|
6644
6645
|
rootEntityId: rootId
|
|
@@ -6721,7 +6722,8 @@ var TilesetCadRenderManager;
|
|
|
6721
6722
|
priority: 0,
|
|
6722
6723
|
visual: feature,
|
|
6723
6724
|
accountId: (_b = (_a = this.item.tileset) === null || _a === void 0 ? void 0 : _a.ClientAccountID) !== null && _b !== void 0 ? _b : this.apiGetter.accountId,
|
|
6724
|
-
tilesetId: (_c = this.item.tileset) === null || _c === void 0 ? void 0 : _c.TilesetID
|
|
6725
|
+
tilesetId: (_c = this.item.tileset) === null || _c === void 0 ? void 0 : _c.TilesetID,
|
|
6726
|
+
rootId: this.rootId
|
|
6725
6727
|
};
|
|
6726
6728
|
var featureAny = feature;
|
|
6727
6729
|
var propertyNames = featureAny.getPropertyNames ? featureAny.getPropertyNames() : (_d = featureAny.getPropertyIds) === null || _d === void 0 ? void 0 : _d.call(featureAny);
|
|
@@ -10468,7 +10470,7 @@ function renderLegacyNavigator(params, bookmark, view) {
|
|
|
10468
10470
|
function renderNavigator(params, bookmark, view) {
|
|
10469
10471
|
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;
|
|
10470
10472
|
return __awaiter(this, void 0, void 0, function () {
|
|
10471
|
-
var viewer, scene, vSettings, bSettings, defaults, camera, newLens, modePicker, is2d, curLens, modePicker_1, transition, pos, terrain,
|
|
10473
|
+
var viewer, scene, vSettings, bSettings, defaults, camera, newLens, modePicker, is2d, curLens, modePicker_1, transition, pos, terrain, hillShades, baseColor, globeHidden, terrainWireframe, globeAlpha, shadows, size, ambientOcclusion, AO, lighting, light, quality, fxaa, dateTime, clock, selectedIds, hiddenIds, isolatedIds, entityOpacityMap, entityId, opacity, imagery, renderedRelationEntityIds, curEnabled, newItemIds, _i, curEnabled_1, id, menuItem, gOcclusion;
|
|
10472
10474
|
return __generator(this, function (_7) {
|
|
10473
10475
|
switch (_7.label) {
|
|
10474
10476
|
case 0:
|
|
@@ -10537,18 +10539,9 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10537
10539
|
_7.sent();
|
|
10538
10540
|
_7.label = 2;
|
|
10539
10541
|
case 2:
|
|
10540
|
-
|
|
10541
|
-
if (gOcclusion == null) {
|
|
10542
|
-
gOcclusion = (_p = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _p === void 0 ? void 0 : _p.groundOcclusion;
|
|
10543
|
-
}
|
|
10544
|
-
if (gOcclusion == null) {
|
|
10545
|
-
// TODO: Need global default.
|
|
10546
|
-
gOcclusion = true;
|
|
10547
|
-
}
|
|
10548
|
-
scene.globe.depthTestAgainstTerrain = Boolean(gOcclusion);
|
|
10549
|
-
hillShades = (_q = bookmark === null || bookmark === void 0 ? void 0 : bookmark.Settings) === null || _q === void 0 ? void 0 : _q.hillShades;
|
|
10542
|
+
hillShades = (_p = bookmark === null || bookmark === void 0 ? void 0 : bookmark.Settings) === null || _p === void 0 ? void 0 : _p.hillShades;
|
|
10550
10543
|
if (hillShades == null) {
|
|
10551
|
-
hillShades = (
|
|
10544
|
+
hillShades = (_q = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _q === void 0 ? void 0 : _q.hillShades;
|
|
10552
10545
|
}
|
|
10553
10546
|
if (hillShades == null) {
|
|
10554
10547
|
hillShades = true;
|
|
@@ -10556,7 +10549,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10556
10549
|
scene.globe.enableLighting = Boolean(hillShades);
|
|
10557
10550
|
baseColor = bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeColor;
|
|
10558
10551
|
if (baseColor == null) {
|
|
10559
|
-
baseColor = (
|
|
10552
|
+
baseColor = (_r = defaults.settings) === null || _r === void 0 ? void 0 : _r.globeColor;
|
|
10560
10553
|
}
|
|
10561
10554
|
if (baseColor == null) {
|
|
10562
10555
|
// TODO: Need global default.
|
|
@@ -10565,7 +10558,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10565
10558
|
scene.globe.baseColor = Color.fromCssColorString(baseColor);
|
|
10566
10559
|
globeHidden = bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeHidden;
|
|
10567
10560
|
if (globeHidden == null) {
|
|
10568
|
-
globeHidden = (
|
|
10561
|
+
globeHidden = (_s = defaults.settings) === null || _s === void 0 ? void 0 : _s.globeHidden;
|
|
10569
10562
|
}
|
|
10570
10563
|
if (globeHidden == null) {
|
|
10571
10564
|
globeHidden = false;
|
|
@@ -10573,7 +10566,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10573
10566
|
scene.globe.show = !globeHidden;
|
|
10574
10567
|
terrainWireframe = bSettings === null || bSettings === void 0 ? void 0 : bSettings.terrainWireframe;
|
|
10575
10568
|
if (terrainWireframe == null) {
|
|
10576
|
-
terrainWireframe = (
|
|
10569
|
+
terrainWireframe = (_t = defaults.settings) === null || _t === void 0 ? void 0 : _t.terrainWireframe;
|
|
10577
10570
|
}
|
|
10578
10571
|
if (terrainWireframe == null) {
|
|
10579
10572
|
terrainWireframe = false;
|
|
@@ -10584,7 +10577,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10584
10577
|
});
|
|
10585
10578
|
globeAlpha = +(bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeAlpha);
|
|
10586
10579
|
if (isNaN(globeAlpha)) {
|
|
10587
|
-
globeAlpha = +((
|
|
10580
|
+
globeAlpha = +((_u = defaults.settings) === null || _u === void 0 ? void 0 : _u.globeAlpha);
|
|
10588
10581
|
}
|
|
10589
10582
|
if (!scene.globe.translucency.enabled) {
|
|
10590
10583
|
scene.globe.translucency.enabled = true;
|
|
@@ -10594,7 +10587,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10594
10587
|
scene.globe.translucency.frontFaceAlphaByDistance.nearValue = EnsureNumber(globeAlpha, 1);
|
|
10595
10588
|
shadows = bSettings === null || bSettings === void 0 ? void 0 : bSettings.shadows;
|
|
10596
10589
|
if (shadows == null) {
|
|
10597
|
-
shadows = (
|
|
10590
|
+
shadows = (_v = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _v === void 0 ? void 0 : _v.shadows;
|
|
10598
10591
|
}
|
|
10599
10592
|
if (shadows == null) {
|
|
10600
10593
|
// Experimenting with default on.
|
|
@@ -10622,7 +10615,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10622
10615
|
}
|
|
10623
10616
|
ambientOcclusion = bSettings === null || bSettings === void 0 ? void 0 : bSettings.ambientOcclusion;
|
|
10624
10617
|
if (ambientOcclusion == null) {
|
|
10625
|
-
ambientOcclusion = (
|
|
10618
|
+
ambientOcclusion = (_w = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _w === void 0 ? void 0 : _w.ambientOcclusion;
|
|
10626
10619
|
}
|
|
10627
10620
|
if (ambientOcclusion == null) {
|
|
10628
10621
|
ambientOcclusion = {
|
|
@@ -10645,7 +10638,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10645
10638
|
}
|
|
10646
10639
|
lighting = bSettings === null || bSettings === void 0 ? void 0 : bSettings.lighting;
|
|
10647
10640
|
if (lighting == null) {
|
|
10648
|
-
lighting = (
|
|
10641
|
+
lighting = (_x = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _x === void 0 ? void 0 : _x.lighting;
|
|
10649
10642
|
}
|
|
10650
10643
|
if (lighting == null) {
|
|
10651
10644
|
lighting = {
|
|
@@ -10660,7 +10653,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10660
10653
|
}
|
|
10661
10654
|
quality = bSettings === null || bSettings === void 0 ? void 0 : bSettings.quality;
|
|
10662
10655
|
if (quality == null) {
|
|
10663
|
-
quality = (
|
|
10656
|
+
quality = (_y = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _y === void 0 ? void 0 : _y.quality;
|
|
10664
10657
|
}
|
|
10665
10658
|
if (quality == null) {
|
|
10666
10659
|
quality = {
|
|
@@ -10671,7 +10664,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10671
10664
|
fxaa.enabled = Boolean(quality.fxaa);
|
|
10672
10665
|
dateTime = bSettings === null || bSettings === void 0 ? void 0 : bSettings.dateTime;
|
|
10673
10666
|
if (dateTime == null) {
|
|
10674
|
-
dateTime = (
|
|
10667
|
+
dateTime = (_z = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _z === void 0 ? void 0 : _z.dateTime;
|
|
10675
10668
|
}
|
|
10676
10669
|
if (dateTime != null) {
|
|
10677
10670
|
clock = viewer.clock;
|
|
@@ -10679,7 +10672,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10679
10672
|
}
|
|
10680
10673
|
selectedIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.selectedEntityIds;
|
|
10681
10674
|
if (selectedIds == null) {
|
|
10682
|
-
selectedIds = (
|
|
10675
|
+
selectedIds = (_0 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _0 === void 0 ? void 0 : _0.selectedEntityIds;
|
|
10683
10676
|
}
|
|
10684
10677
|
if (selectedIds != null) {
|
|
10685
10678
|
params.manager.VisualsRegister.ClearSelected();
|
|
@@ -10692,7 +10685,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10692
10685
|
params.manager.VisualsRegister.ClearHidden();
|
|
10693
10686
|
hiddenIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.hiddenEntityIds;
|
|
10694
10687
|
if (hiddenIds == null) {
|
|
10695
|
-
hiddenIds = (
|
|
10688
|
+
hiddenIds = (_1 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _1 === void 0 ? void 0 : _1.hiddenEntityIds;
|
|
10696
10689
|
}
|
|
10697
10690
|
if (hiddenIds != null) {
|
|
10698
10691
|
params.manager.VisualsRegister.SetHidden({
|
|
@@ -10703,7 +10696,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10703
10696
|
params.manager.VisualsRegister.ClearIsolated();
|
|
10704
10697
|
isolatedIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.isolatedEntityIds;
|
|
10705
10698
|
if (isolatedIds == null) {
|
|
10706
|
-
isolatedIds = (
|
|
10699
|
+
isolatedIds = (_2 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _2 === void 0 ? void 0 : _2.isolatedEntityIds;
|
|
10707
10700
|
}
|
|
10708
10701
|
if (isolatedIds != null) {
|
|
10709
10702
|
params.manager.VisualsRegister.SetIsolated({
|
|
@@ -10714,7 +10707,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10714
10707
|
params.manager.VisualsRegister.ClearOpacity();
|
|
10715
10708
|
entityOpacityMap = bSettings === null || bSettings === void 0 ? void 0 : bSettings.entityOpacityMap;
|
|
10716
10709
|
if (entityOpacityMap == null) {
|
|
10717
|
-
entityOpacityMap = (
|
|
10710
|
+
entityOpacityMap = (_3 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _3 === void 0 ? void 0 : _3.entityOpacityMap;
|
|
10718
10711
|
}
|
|
10719
10712
|
if (entityOpacityMap != null) {
|
|
10720
10713
|
for (entityId in entityOpacityMap) {
|
|
@@ -10727,7 +10720,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10727
10720
|
}
|
|
10728
10721
|
}
|
|
10729
10722
|
}
|
|
10730
|
-
imagery = (bSettings === null || bSettings === void 0 ? void 0 : bSettings.imagery) != null ? bSettings.imagery : (
|
|
10723
|
+
imagery = (bSettings === null || bSettings === void 0 ? void 0 : bSettings.imagery) != null ? bSettings.imagery : (_4 = defaults.settings) === null || _4 === void 0 ? void 0 : _4.imagery;
|
|
10731
10724
|
if (imagery == null) {
|
|
10732
10725
|
// TODO: Need global default.
|
|
10733
10726
|
imagery = [
|
|
@@ -10755,7 +10748,7 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10755
10748
|
renderedRelationEntityIds = [];
|
|
10756
10749
|
}
|
|
10757
10750
|
curEnabled = params.manager.GetEnabledItemIds();
|
|
10758
|
-
newItemIds = (
|
|
10751
|
+
newItemIds = (_5 = bSettings === null || bSettings === void 0 ? void 0 : bSettings.menuItemIds) !== null && _5 !== void 0 ? _5 : [];
|
|
10759
10752
|
for (_i = 0, curEnabled_1 = curEnabled; _i < curEnabled_1.length; _i++) {
|
|
10760
10753
|
id = curEnabled_1[_i];
|
|
10761
10754
|
if (newItemIds.indexOf(id) === -1 ||
|
|
@@ -10792,7 +10785,18 @@ function renderNavigator(params, bookmark, view) {
|
|
|
10792
10785
|
case 6:
|
|
10793
10786
|
_7.sent();
|
|
10794
10787
|
_7.label = 7;
|
|
10795
|
-
case 7:
|
|
10788
|
+
case 7:
|
|
10789
|
+
gOcclusion = bSettings === null || bSettings === void 0 ? void 0 : bSettings.groundOcclusion;
|
|
10790
|
+
if (gOcclusion == null) {
|
|
10791
|
+
gOcclusion = (_6 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _6 === void 0 ? void 0 : _6.groundOcclusion;
|
|
10792
|
+
}
|
|
10793
|
+
if (gOcclusion == null) {
|
|
10794
|
+
// TODO: Need global default.
|
|
10795
|
+
gOcclusion = true;
|
|
10796
|
+
}
|
|
10797
|
+
console.log("Applying Ground Occlusion", Boolean(gOcclusion));
|
|
10798
|
+
scene.globe.depthTestAgainstTerrain = Boolean(gOcclusion);
|
|
10799
|
+
return [2 /*return*/];
|
|
10796
10800
|
}
|
|
10797
10801
|
});
|
|
10798
10802
|
});
|
|
@@ -10870,7 +10874,7 @@ var ViewRenderEngine;
|
|
|
10870
10874
|
ViewRenderEngine.Render = Render;
|
|
10871
10875
|
})(ViewRenderEngine || (ViewRenderEngine = {}));
|
|
10872
10876
|
|
|
10873
|
-
var VERSION = "2.2.
|
|
10877
|
+
var VERSION = "2.2.4";
|
|
10874
10878
|
|
|
10875
10879
|
export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, RelationsRenderManager, SharedGetters, CesiumParabola, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils };
|
|
10876
10880
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|