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.
@@ -5356,11 +5356,11 @@
5356
5356
  });
5357
5357
  }
5358
5358
  function renderV2(params, bookmark, view) {
5359
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
5359
+ 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;
5360
5360
  return __awaiter(this, void 0, void 0, function () {
5361
- 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;
5362
- return __generator(this, function (_z) {
5363
- switch (_z.label) {
5361
+ 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;
5362
+ return __generator(this, function (_0) {
5363
+ switch (_0.label) {
5364
5364
  case 0:
5365
5365
  viewer = params.manager.Viewer;
5366
5366
  scene = viewer.scene;
@@ -5421,9 +5421,18 @@
5421
5421
  gOcclusion = true;
5422
5422
  }
5423
5423
  scene.globe.depthTestAgainstTerrain = Boolean(gOcclusion);
5424
+ baseColor = bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeColor;
5425
+ if (baseColor == null) {
5426
+ baseColor = (_o = defaults.settings) === null || _o === void 0 ? void 0 : _o.globeColor;
5427
+ }
5428
+ if (baseColor == null) {
5429
+ // TODO: Need global default.
5430
+ baseColor = "#0326BE";
5431
+ }
5432
+ scene.globe.baseColor = Cesium.Color.fromCssColorString(baseColor);
5424
5433
  shadows = bSettings === null || bSettings === void 0 ? void 0 : bSettings.shadows;
5425
5434
  if (shadows == null) {
5426
- shadows = (_o = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _o === void 0 ? void 0 : _o.shadows;
5435
+ shadows = (_p = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _p === void 0 ? void 0 : _p.shadows;
5427
5436
  }
5428
5437
  if (shadows == null) {
5429
5438
  shadows = {
@@ -5449,7 +5458,7 @@
5449
5458
  }
5450
5459
  ambientOcclusion = bSettings === null || bSettings === void 0 ? void 0 : bSettings.ambientOcclusion;
5451
5460
  if (ambientOcclusion == null) {
5452
- ambientOcclusion = (_p = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _p === void 0 ? void 0 : _p.ambientOcclusion;
5461
+ ambientOcclusion = (_q = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _q === void 0 ? void 0 : _q.ambientOcclusion;
5453
5462
  }
5454
5463
  if (ambientOcclusion == null) {
5455
5464
  ambientOcclusion = {
@@ -5470,7 +5479,7 @@
5470
5479
  }
5471
5480
  lighting = bSettings === null || bSettings === void 0 ? void 0 : bSettings.lighting;
5472
5481
  if (lighting == null) {
5473
- lighting = (_q = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _q === void 0 ? void 0 : _q.lighting;
5482
+ lighting = (_r = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _r === void 0 ? void 0 : _r.lighting;
5474
5483
  }
5475
5484
  if (lighting == null) {
5476
5485
  lighting = {
@@ -5485,7 +5494,7 @@
5485
5494
  }
5486
5495
  quality = bSettings === null || bSettings === void 0 ? void 0 : bSettings.quality;
5487
5496
  if (quality == null) {
5488
- quality = (_r = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _r === void 0 ? void 0 : _r.quality;
5497
+ quality = (_s = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _s === void 0 ? void 0 : _s.quality;
5489
5498
  }
5490
5499
  if (quality == null) {
5491
5500
  quality = {
@@ -5496,13 +5505,13 @@
5496
5505
  fxaa.enabled = Boolean(quality.fxaa);
5497
5506
  dateTime = bSettings === null || bSettings === void 0 ? void 0 : bSettings.dateTime;
5498
5507
  if (dateTime == null) {
5499
- dateTime = (_s = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _s === void 0 ? void 0 : _s.dateTime;
5508
+ dateTime = (_t = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _t === void 0 ? void 0 : _t.dateTime;
5500
5509
  }
5501
5510
  if (dateTime != null) {
5502
5511
  clock = viewer.clock;
5503
5512
  clock.currentTime = Cesium.JulianDate.fromIso8601(dateTime);
5504
5513
  }
5505
- terrain = (_t = bSettings === null || bSettings === void 0 ? void 0 : bSettings.terrain) !== null && _t !== void 0 ? _t : (_u = defaults.settings) === null || _u === void 0 ? void 0 : _u.terrain;
5514
+ 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;
5506
5515
  if (!terrain) return [3 /*break*/, 2];
5507
5516
  return [4 /*yield*/, exports.TileRenderEngine.Terrain.V2.Render({
5508
5517
  apiGetter: params.apiGetter,
@@ -5510,12 +5519,12 @@
5510
5519
  viewer: params.manager.Viewer,
5511
5520
  })];
5512
5521
  case 1:
5513
- _z.sent();
5514
- _z.label = 2;
5522
+ _0.sent();
5523
+ _0.label = 2;
5515
5524
  case 2:
5516
5525
  selectedIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.selectedEntityIds;
5517
5526
  if (selectedIds == null) {
5518
- selectedIds = (_v = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _v === void 0 ? void 0 : _v.selectedEntityIds;
5527
+ selectedIds = (_w = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _w === void 0 ? void 0 : _w.selectedEntityIds;
5519
5528
  }
5520
5529
  if (selectedIds != null) {
5521
5530
  params.manager.VisualsRegister.ClearSelected();
@@ -5524,7 +5533,7 @@
5524
5533
  params.manager.VisualsRegister.Select(id, false);
5525
5534
  }
5526
5535
  }
5527
- imagery = (_w = bSettings.imagery) !== null && _w !== void 0 ? _w : (_x = defaults.settings) === null || _x === void 0 ? void 0 : _x.imagery;
5536
+ imagery = (_x = bSettings.imagery) !== null && _x !== void 0 ? _x : (_y = defaults.settings) === null || _y === void 0 ? void 0 : _y.imagery;
5528
5537
  if (imagery == null) {
5529
5538
  // TODO: Need global default.
5530
5539
  imagery = [
@@ -5546,19 +5555,19 @@
5546
5555
  viewer: params.manager.Viewer,
5547
5556
  })];
5548
5557
  case 3:
5549
- _z.sent();
5558
+ _0.sent();
5550
5559
  curEnabled = params.manager.GetEnabledItemIds();
5551
- newItemIds = (_y = bSettings === null || bSettings === void 0 ? void 0 : bSettings.menuItemIds) !== null && _y !== void 0 ? _y : [];
5560
+ newItemIds = (_z = bSettings === null || bSettings === void 0 ? void 0 : bSettings.menuItemIds) !== null && _z !== void 0 ? _z : [];
5552
5561
  _i = 0, curEnabled_1 = curEnabled;
5553
- _z.label = 4;
5562
+ _0.label = 4;
5554
5563
  case 4:
5555
5564
  if (!(_i < curEnabled_1.length)) return [3 /*break*/, 7];
5556
5565
  id = curEnabled_1[_i];
5557
5566
  if (!(newItemIds.indexOf(id) === -1)) return [3 /*break*/, 6];
5558
5567
  return [4 /*yield*/, params.manager.RemoveItemById(id)];
5559
5568
  case 5:
5560
- _z.sent();
5561
- _z.label = 6;
5569
+ _0.sent();
5570
+ _0.label = 6;
5562
5571
  case 6:
5563
5572
  _i++;
5564
5573
  return [3 /*break*/, 4];
@@ -5569,8 +5578,8 @@
5569
5578
  manager: params.manager,
5570
5579
  }, params.viewId, params.bookmarkId)];
5571
5580
  case 8:
5572
- _z.sent();
5573
- _z.label = 9;
5581
+ _0.sent();
5582
+ _0.label = 9;
5574
5583
  case 9: return [2 /*return*/];
5575
5584
  }
5576
5585
  });