bruce-cesium 0.7.5 → 0.7.7
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 +31 -23
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +30 -22
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/rendering/view-render-engine.js +30 -22
- package/dist/lib/rendering/view-render-engine.js.map +1 -1
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Carto, Geometry, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, DelayQueue, Entity as Entity$1, BatchedDataGetter, ObjectUtils, Tileset, EntityCoords, EntityFilterGetter, EntitySource, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewTile, ProjectViewLegacyTile, TilesetExtMapTiles, ProgramKey, Camera } from 'bruce-models';
|
|
2
|
-
import { Cartesian2, Cartographic, Math as Math$1, Color, HeightReference, Cartesian3, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, HeadingPitchRange, OrthographicFrustum, JulianDate, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider,
|
|
2
|
+
import { Cartesian2, Cartographic, Math as Math$1, Color, HeightReference, Cartesian3, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, HeadingPitchRange, OrthographicFrustum, JulianDate, Matrix4, Cesium3DTileset, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, EllipsoidGeodesic, ColorMaterialProperty, Rectangle, Matrix3, EasingFunction, GeometryInstance, KmlDataSource, createOsmBuildings, Cesium3DTileStyle } from 'cesium';
|
|
3
3
|
|
|
4
4
|
var TIME_LAG = 300;
|
|
5
5
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -5432,11 +5432,11 @@ function renderV1(params, bookmark, view) {
|
|
|
5432
5432
|
});
|
|
5433
5433
|
}
|
|
5434
5434
|
function renderV2(params, bookmark, view) {
|
|
5435
|
-
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;
|
|
5435
|
+
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;
|
|
5436
5436
|
return __awaiter(this, void 0, void 0, function () {
|
|
5437
|
-
var viewer, scene, vSettings, bSettings, defaults, camera, newLens, curLens, transition, pos, gOcclusion, baseColor, shadows, size, ambientOcclusion, AO, lighting, light, quality, fxaa, dateTime, clock, terrain, selectedIds, i, id, imagery, curEnabled, newItemIds, _i, curEnabled_1, id;
|
|
5438
|
-
return __generator(this, function (
|
|
5439
|
-
switch (
|
|
5437
|
+
var viewer, scene, vSettings, bSettings, defaults, camera, newLens, curLens, transition, pos, gOcclusion, hillShades, baseColor, shadows, size, ambientOcclusion, AO, lighting, light, quality, fxaa, dateTime, clock, terrain, selectedIds, i, id, imagery, curEnabled, newItemIds, _i, curEnabled_1, id;
|
|
5438
|
+
return __generator(this, function (_2) {
|
|
5439
|
+
switch (_2.label) {
|
|
5440
5440
|
case 0:
|
|
5441
5441
|
viewer = params.manager.Viewer;
|
|
5442
5442
|
scene = viewer.scene;
|
|
@@ -5497,9 +5497,17 @@ function renderV2(params, bookmark, view) {
|
|
|
5497
5497
|
gOcclusion = true;
|
|
5498
5498
|
}
|
|
5499
5499
|
scene.globe.depthTestAgainstTerrain = Boolean(gOcclusion);
|
|
5500
|
+
hillShades = (_o = bookmark === null || bookmark === void 0 ? void 0 : bookmark.Settings) === null || _o === void 0 ? void 0 : _o.hillShades;
|
|
5501
|
+
if (hillShades == null) {
|
|
5502
|
+
hillShades = (_p = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _p === void 0 ? void 0 : _p.hillShades;
|
|
5503
|
+
}
|
|
5504
|
+
if (hillShades == null) {
|
|
5505
|
+
hillShades = false;
|
|
5506
|
+
}
|
|
5507
|
+
scene.globe.enableLighting = Boolean(hillShades);
|
|
5500
5508
|
baseColor = bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeColor;
|
|
5501
5509
|
if (baseColor == null) {
|
|
5502
|
-
baseColor = (
|
|
5510
|
+
baseColor = (_q = defaults.settings) === null || _q === void 0 ? void 0 : _q.globeColor;
|
|
5503
5511
|
}
|
|
5504
5512
|
if (baseColor == null) {
|
|
5505
5513
|
// TODO: Need global default.
|
|
@@ -5508,7 +5516,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5508
5516
|
scene.globe.baseColor = Color.fromCssColorString(baseColor);
|
|
5509
5517
|
shadows = bSettings === null || bSettings === void 0 ? void 0 : bSettings.shadows;
|
|
5510
5518
|
if (shadows == null) {
|
|
5511
|
-
shadows = (
|
|
5519
|
+
shadows = (_r = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _r === void 0 ? void 0 : _r.shadows;
|
|
5512
5520
|
}
|
|
5513
5521
|
if (shadows == null) {
|
|
5514
5522
|
shadows = {
|
|
@@ -5534,7 +5542,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5534
5542
|
}
|
|
5535
5543
|
ambientOcclusion = bSettings === null || bSettings === void 0 ? void 0 : bSettings.ambientOcclusion;
|
|
5536
5544
|
if (ambientOcclusion == null) {
|
|
5537
|
-
ambientOcclusion = (
|
|
5545
|
+
ambientOcclusion = (_s = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _s === void 0 ? void 0 : _s.ambientOcclusion;
|
|
5538
5546
|
}
|
|
5539
5547
|
if (ambientOcclusion == null) {
|
|
5540
5548
|
ambientOcclusion = {
|
|
@@ -5555,7 +5563,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5555
5563
|
}
|
|
5556
5564
|
lighting = bSettings === null || bSettings === void 0 ? void 0 : bSettings.lighting;
|
|
5557
5565
|
if (lighting == null) {
|
|
5558
|
-
lighting = (
|
|
5566
|
+
lighting = (_t = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _t === void 0 ? void 0 : _t.lighting;
|
|
5559
5567
|
}
|
|
5560
5568
|
if (lighting == null) {
|
|
5561
5569
|
lighting = {
|
|
@@ -5570,7 +5578,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5570
5578
|
}
|
|
5571
5579
|
quality = bSettings === null || bSettings === void 0 ? void 0 : bSettings.quality;
|
|
5572
5580
|
if (quality == null) {
|
|
5573
|
-
quality = (
|
|
5581
|
+
quality = (_u = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _u === void 0 ? void 0 : _u.quality;
|
|
5574
5582
|
}
|
|
5575
5583
|
if (quality == null) {
|
|
5576
5584
|
quality = {
|
|
@@ -5581,13 +5589,13 @@ function renderV2(params, bookmark, view) {
|
|
|
5581
5589
|
fxaa.enabled = Boolean(quality.fxaa);
|
|
5582
5590
|
dateTime = bSettings === null || bSettings === void 0 ? void 0 : bSettings.dateTime;
|
|
5583
5591
|
if (dateTime == null) {
|
|
5584
|
-
dateTime = (
|
|
5592
|
+
dateTime = (_v = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _v === void 0 ? void 0 : _v.dateTime;
|
|
5585
5593
|
}
|
|
5586
5594
|
if (dateTime != null) {
|
|
5587
5595
|
clock = viewer.clock;
|
|
5588
5596
|
clock.currentTime = JulianDate.fromIso8601(dateTime);
|
|
5589
5597
|
}
|
|
5590
|
-
terrain = (
|
|
5598
|
+
terrain = (_w = bSettings === null || bSettings === void 0 ? void 0 : bSettings.terrain) !== null && _w !== void 0 ? _w : (_x = defaults.settings) === null || _x === void 0 ? void 0 : _x.terrain;
|
|
5591
5599
|
if (!terrain) return [3 /*break*/, 2];
|
|
5592
5600
|
return [4 /*yield*/, TileRenderEngine.Terrain.V2.Render({
|
|
5593
5601
|
apiGetter: params.apiGetter,
|
|
@@ -5595,12 +5603,12 @@ function renderV2(params, bookmark, view) {
|
|
|
5595
5603
|
viewer: params.manager.Viewer,
|
|
5596
5604
|
})];
|
|
5597
5605
|
case 1:
|
|
5598
|
-
|
|
5599
|
-
|
|
5606
|
+
_2.sent();
|
|
5607
|
+
_2.label = 2;
|
|
5600
5608
|
case 2:
|
|
5601
5609
|
selectedIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.selectedEntityIds;
|
|
5602
5610
|
if (selectedIds == null) {
|
|
5603
|
-
selectedIds = (
|
|
5611
|
+
selectedIds = (_y = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _y === void 0 ? void 0 : _y.selectedEntityIds;
|
|
5604
5612
|
}
|
|
5605
5613
|
if (selectedIds != null) {
|
|
5606
5614
|
params.manager.VisualsRegister.ClearSelected();
|
|
@@ -5609,7 +5617,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5609
5617
|
params.manager.VisualsRegister.Select(id, false);
|
|
5610
5618
|
}
|
|
5611
5619
|
}
|
|
5612
|
-
imagery = (
|
|
5620
|
+
imagery = (_z = bSettings.imagery) !== null && _z !== void 0 ? _z : (_0 = defaults.settings) === null || _0 === void 0 ? void 0 : _0.imagery;
|
|
5613
5621
|
if (imagery == null) {
|
|
5614
5622
|
// TODO: Need global default.
|
|
5615
5623
|
imagery = [
|
|
@@ -5631,19 +5639,19 @@ function renderV2(params, bookmark, view) {
|
|
|
5631
5639
|
viewer: params.manager.Viewer,
|
|
5632
5640
|
})];
|
|
5633
5641
|
case 3:
|
|
5634
|
-
|
|
5642
|
+
_2.sent();
|
|
5635
5643
|
curEnabled = params.manager.GetEnabledItemIds();
|
|
5636
|
-
newItemIds = (
|
|
5644
|
+
newItemIds = (_1 = bSettings === null || bSettings === void 0 ? void 0 : bSettings.menuItemIds) !== null && _1 !== void 0 ? _1 : [];
|
|
5637
5645
|
_i = 0, curEnabled_1 = curEnabled;
|
|
5638
|
-
|
|
5646
|
+
_2.label = 4;
|
|
5639
5647
|
case 4:
|
|
5640
5648
|
if (!(_i < curEnabled_1.length)) return [3 /*break*/, 7];
|
|
5641
5649
|
id = curEnabled_1[_i];
|
|
5642
5650
|
if (!(newItemIds.indexOf(id) === -1)) return [3 /*break*/, 6];
|
|
5643
5651
|
return [4 /*yield*/, params.manager.RemoveItemById(id)];
|
|
5644
5652
|
case 5:
|
|
5645
|
-
|
|
5646
|
-
|
|
5653
|
+
_2.sent();
|
|
5654
|
+
_2.label = 6;
|
|
5647
5655
|
case 6:
|
|
5648
5656
|
_i++;
|
|
5649
5657
|
return [3 /*break*/, 4];
|
|
@@ -5654,8 +5662,8 @@ function renderV2(params, bookmark, view) {
|
|
|
5654
5662
|
manager: params.manager,
|
|
5655
5663
|
}, params.viewId, params.bookmarkId)];
|
|
5656
5664
|
case 8:
|
|
5657
|
-
|
|
5658
|
-
|
|
5665
|
+
_2.sent();
|
|
5666
|
+
_2.label = 9;
|
|
5659
5667
|
case 9: return [2 /*return*/];
|
|
5660
5668
|
}
|
|
5661
5669
|
});
|