bruce-cesium 0.7.2 → 0.7.3
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 -22
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +30 -21
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/rendering/view-render-engine.js +30 -21
- package/dist/lib/rendering/view-render-engine.js.map +1 -1
- package/package.json +1 -1
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, createOsmBuildings, Cesium3DTileStyle, KmlDataSource } from 'cesium';
|
|
3
3
|
|
|
4
4
|
var TIME_LAG = 300;
|
|
5
5
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -5400,11 +5400,11 @@ function renderV1(params, bookmark, view) {
|
|
|
5400
5400
|
});
|
|
5401
5401
|
}
|
|
5402
5402
|
function renderV2(params, bookmark, view) {
|
|
5403
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
5403
|
+
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;
|
|
5404
5404
|
return __awaiter(this, void 0, void 0, function () {
|
|
5405
|
-
var viewer, scene, vSettings, bSettings, defaults, camera, newLens, curLens, transition, pos, gOcclusion, shadows, size, ambientOcclusion, AO, lighting, light, quality, fxaa, dateTime, clock, terrain, selectedIds, i, id, imagery, curEnabled, newItemIds, _i, curEnabled_1, id;
|
|
5406
|
-
return __generator(this, function (
|
|
5407
|
-
switch (
|
|
5405
|
+
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;
|
|
5406
|
+
return __generator(this, function (_0) {
|
|
5407
|
+
switch (_0.label) {
|
|
5408
5408
|
case 0:
|
|
5409
5409
|
viewer = params.manager.Viewer;
|
|
5410
5410
|
scene = viewer.scene;
|
|
@@ -5465,9 +5465,18 @@ function renderV2(params, bookmark, view) {
|
|
|
5465
5465
|
gOcclusion = true;
|
|
5466
5466
|
}
|
|
5467
5467
|
scene.globe.depthTestAgainstTerrain = Boolean(gOcclusion);
|
|
5468
|
+
baseColor = bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeColor;
|
|
5469
|
+
if (baseColor == null) {
|
|
5470
|
+
baseColor = (_o = defaults.settings) === null || _o === void 0 ? void 0 : _o.globeColor;
|
|
5471
|
+
}
|
|
5472
|
+
if (baseColor == null) {
|
|
5473
|
+
// TODO: Need global default.
|
|
5474
|
+
baseColor = "#0326BE";
|
|
5475
|
+
}
|
|
5476
|
+
scene.globe.baseColor = Color.fromCssColorString(baseColor);
|
|
5468
5477
|
shadows = bSettings === null || bSettings === void 0 ? void 0 : bSettings.shadows;
|
|
5469
5478
|
if (shadows == null) {
|
|
5470
|
-
shadows = (
|
|
5479
|
+
shadows = (_p = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _p === void 0 ? void 0 : _p.shadows;
|
|
5471
5480
|
}
|
|
5472
5481
|
if (shadows == null) {
|
|
5473
5482
|
shadows = {
|
|
@@ -5493,7 +5502,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5493
5502
|
}
|
|
5494
5503
|
ambientOcclusion = bSettings === null || bSettings === void 0 ? void 0 : bSettings.ambientOcclusion;
|
|
5495
5504
|
if (ambientOcclusion == null) {
|
|
5496
|
-
ambientOcclusion = (
|
|
5505
|
+
ambientOcclusion = (_q = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _q === void 0 ? void 0 : _q.ambientOcclusion;
|
|
5497
5506
|
}
|
|
5498
5507
|
if (ambientOcclusion == null) {
|
|
5499
5508
|
ambientOcclusion = {
|
|
@@ -5514,7 +5523,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5514
5523
|
}
|
|
5515
5524
|
lighting = bSettings === null || bSettings === void 0 ? void 0 : bSettings.lighting;
|
|
5516
5525
|
if (lighting == null) {
|
|
5517
|
-
lighting = (
|
|
5526
|
+
lighting = (_r = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _r === void 0 ? void 0 : _r.lighting;
|
|
5518
5527
|
}
|
|
5519
5528
|
if (lighting == null) {
|
|
5520
5529
|
lighting = {
|
|
@@ -5529,7 +5538,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5529
5538
|
}
|
|
5530
5539
|
quality = bSettings === null || bSettings === void 0 ? void 0 : bSettings.quality;
|
|
5531
5540
|
if (quality == null) {
|
|
5532
|
-
quality = (
|
|
5541
|
+
quality = (_s = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _s === void 0 ? void 0 : _s.quality;
|
|
5533
5542
|
}
|
|
5534
5543
|
if (quality == null) {
|
|
5535
5544
|
quality = {
|
|
@@ -5540,13 +5549,13 @@ function renderV2(params, bookmark, view) {
|
|
|
5540
5549
|
fxaa.enabled = Boolean(quality.fxaa);
|
|
5541
5550
|
dateTime = bSettings === null || bSettings === void 0 ? void 0 : bSettings.dateTime;
|
|
5542
5551
|
if (dateTime == null) {
|
|
5543
|
-
dateTime = (
|
|
5552
|
+
dateTime = (_t = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _t === void 0 ? void 0 : _t.dateTime;
|
|
5544
5553
|
}
|
|
5545
5554
|
if (dateTime != null) {
|
|
5546
5555
|
clock = viewer.clock;
|
|
5547
5556
|
clock.currentTime = JulianDate.fromIso8601(dateTime);
|
|
5548
5557
|
}
|
|
5549
|
-
terrain = (
|
|
5558
|
+
terrain = (_u = bSettings === null || bSettings === void 0 ? void 0 : bSettings.terrain) !== null && _u !== void 0 ? _u : (_v = defaults.settings) === null || _v === void 0 ? void 0 : _v.terrain;
|
|
5550
5559
|
if (!terrain) return [3 /*break*/, 2];
|
|
5551
5560
|
return [4 /*yield*/, TileRenderEngine.Terrain.V2.Render({
|
|
5552
5561
|
apiGetter: params.apiGetter,
|
|
@@ -5554,12 +5563,12 @@ function renderV2(params, bookmark, view) {
|
|
|
5554
5563
|
viewer: params.manager.Viewer,
|
|
5555
5564
|
})];
|
|
5556
5565
|
case 1:
|
|
5557
|
-
|
|
5558
|
-
|
|
5566
|
+
_0.sent();
|
|
5567
|
+
_0.label = 2;
|
|
5559
5568
|
case 2:
|
|
5560
5569
|
selectedIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.selectedEntityIds;
|
|
5561
5570
|
if (selectedIds == null) {
|
|
5562
|
-
selectedIds = (
|
|
5571
|
+
selectedIds = (_w = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _w === void 0 ? void 0 : _w.selectedEntityIds;
|
|
5563
5572
|
}
|
|
5564
5573
|
if (selectedIds != null) {
|
|
5565
5574
|
params.manager.VisualsRegister.ClearSelected();
|
|
@@ -5568,7 +5577,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5568
5577
|
params.manager.VisualsRegister.Select(id, false);
|
|
5569
5578
|
}
|
|
5570
5579
|
}
|
|
5571
|
-
imagery = (
|
|
5580
|
+
imagery = (_x = bSettings.imagery) !== null && _x !== void 0 ? _x : (_y = defaults.settings) === null || _y === void 0 ? void 0 : _y.imagery;
|
|
5572
5581
|
if (imagery == null) {
|
|
5573
5582
|
// TODO: Need global default.
|
|
5574
5583
|
imagery = [
|
|
@@ -5590,19 +5599,19 @@ function renderV2(params, bookmark, view) {
|
|
|
5590
5599
|
viewer: params.manager.Viewer,
|
|
5591
5600
|
})];
|
|
5592
5601
|
case 3:
|
|
5593
|
-
|
|
5602
|
+
_0.sent();
|
|
5594
5603
|
curEnabled = params.manager.GetEnabledItemIds();
|
|
5595
|
-
newItemIds = (
|
|
5604
|
+
newItemIds = (_z = bSettings === null || bSettings === void 0 ? void 0 : bSettings.menuItemIds) !== null && _z !== void 0 ? _z : [];
|
|
5596
5605
|
_i = 0, curEnabled_1 = curEnabled;
|
|
5597
|
-
|
|
5606
|
+
_0.label = 4;
|
|
5598
5607
|
case 4:
|
|
5599
5608
|
if (!(_i < curEnabled_1.length)) return [3 /*break*/, 7];
|
|
5600
5609
|
id = curEnabled_1[_i];
|
|
5601
5610
|
if (!(newItemIds.indexOf(id) === -1)) return [3 /*break*/, 6];
|
|
5602
5611
|
return [4 /*yield*/, params.manager.RemoveItemById(id)];
|
|
5603
5612
|
case 5:
|
|
5604
|
-
|
|
5605
|
-
|
|
5613
|
+
_0.sent();
|
|
5614
|
+
_0.label = 6;
|
|
5606
5615
|
case 6:
|
|
5607
5616
|
_i++;
|
|
5608
5617
|
return [3 /*break*/, 4];
|
|
@@ -5613,8 +5622,8 @@ function renderV2(params, bookmark, view) {
|
|
|
5613
5622
|
manager: params.manager,
|
|
5614
5623
|
}, params.viewId, params.bookmarkId)];
|
|
5615
5624
|
case 8:
|
|
5616
|
-
|
|
5617
|
-
|
|
5625
|
+
_0.sent();
|
|
5626
|
+
_0.label = 9;
|
|
5618
5627
|
case 9: return [2 /*return*/];
|
|
5619
5628
|
}
|
|
5620
5629
|
});
|