bruce-cesium 0.7.2 → 0.7.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 +62 -22
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +61 -21
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/rendering/menu-item-manager.js +3 -0
- package/dist/lib/rendering/menu-item-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js +7 -0
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-entities-render-manager.js +7 -0
- package/dist/lib/rendering/render-managers/tilesets/tileset-entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-osm-render-manager.js +7 -0
- package/dist/lib/rendering/render-managers/tilesets/tileset-osm-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-pointcloud-render-manager.js +7 -0
- package/dist/lib/rendering/render-managers/tilesets/tileset-pointcloud-render-manager.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/dist/types/rendering/menu-item-manager.d.ts +10 -0
- package/dist/types/rendering/render-managers/tilesets/tileset-cad-render-manager.d.ts +1 -0
- package/dist/types/rendering/render-managers/tilesets/tileset-entities-render-manager.d.ts +1 -0
- package/dist/types/rendering/render-managers/tilesets/tileset-osm-render-manager.d.ts +1 -0
- package/dist/types/rendering/render-managers/tilesets/tileset-pointcloud-render-manager.d.ts +1 -0
- 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,
|
|
2
|
+
import { Cartesian2, Cartographic, Math as Math$1, Color, HeightReference, Cartesian3, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, OrthographicFrustum, JulianDate, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, HeadingPitchRange, Matrix4, Cesium3DTileset, 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;
|
|
@@ -3178,6 +3178,13 @@ var TilesetCadRenderManager;
|
|
|
3178
3178
|
enumerable: false,
|
|
3179
3179
|
configurable: true
|
|
3180
3180
|
});
|
|
3181
|
+
Object.defineProperty(Manager.prototype, "Tileset", {
|
|
3182
|
+
get: function () {
|
|
3183
|
+
return this.cTileset;
|
|
3184
|
+
},
|
|
3185
|
+
enumerable: false,
|
|
3186
|
+
configurable: true
|
|
3187
|
+
});
|
|
3181
3188
|
Manager.prototype.Init = function () {
|
|
3182
3189
|
var _a;
|
|
3183
3190
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -3428,6 +3435,13 @@ var TilesetOsmRenderManager;
|
|
|
3428
3435
|
enumerable: false,
|
|
3429
3436
|
configurable: true
|
|
3430
3437
|
});
|
|
3438
|
+
Object.defineProperty(Manager.prototype, "Tileset", {
|
|
3439
|
+
get: function () {
|
|
3440
|
+
return this.cTileset;
|
|
3441
|
+
},
|
|
3442
|
+
enumerable: false,
|
|
3443
|
+
configurable: true
|
|
3444
|
+
});
|
|
3431
3445
|
Object.defineProperty(Manager.prototype, "count", {
|
|
3432
3446
|
get: function () {
|
|
3433
3447
|
return ++this.counter;
|
|
@@ -3708,6 +3722,13 @@ var TilesetEntitiesRenderManager;
|
|
|
3708
3722
|
enumerable: false,
|
|
3709
3723
|
configurable: true
|
|
3710
3724
|
});
|
|
3725
|
+
Object.defineProperty(Manager.prototype, "Tileset", {
|
|
3726
|
+
get: function () {
|
|
3727
|
+
return this.cTileset;
|
|
3728
|
+
},
|
|
3729
|
+
enumerable: false,
|
|
3730
|
+
configurable: true
|
|
3731
|
+
});
|
|
3711
3732
|
Manager.prototype.Init = function () {
|
|
3712
3733
|
var _a;
|
|
3713
3734
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -3817,6 +3838,13 @@ var TilesetPointcloudRenderManager;
|
|
|
3817
3838
|
enumerable: false,
|
|
3818
3839
|
configurable: true
|
|
3819
3840
|
});
|
|
3841
|
+
Object.defineProperty(Manager.prototype, "Tileset", {
|
|
3842
|
+
get: function () {
|
|
3843
|
+
return this.cTileset;
|
|
3844
|
+
},
|
|
3845
|
+
enumerable: false,
|
|
3846
|
+
configurable: true
|
|
3847
|
+
});
|
|
3820
3848
|
Manager.prototype.Init = function () {
|
|
3821
3849
|
var _a;
|
|
3822
3850
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -4133,6 +4161,9 @@ var MenuItemManager;
|
|
|
4133
4161
|
Manager.prototype.GetEnabledItemIds = function () {
|
|
4134
4162
|
return this.items.map(function (x) { return x.id; });
|
|
4135
4163
|
};
|
|
4164
|
+
Manager.prototype.GetEnabledItem = function (id) {
|
|
4165
|
+
return this.items.find(function (x) { return x.id === id; });
|
|
4166
|
+
};
|
|
4136
4167
|
return Manager;
|
|
4137
4168
|
}());
|
|
4138
4169
|
MenuItemManager.Manager = Manager;
|
|
@@ -5400,11 +5431,11 @@ function renderV1(params, bookmark, view) {
|
|
|
5400
5431
|
});
|
|
5401
5432
|
}
|
|
5402
5433
|
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;
|
|
5434
|
+
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
5435
|
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 (
|
|
5436
|
+
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;
|
|
5437
|
+
return __generator(this, function (_0) {
|
|
5438
|
+
switch (_0.label) {
|
|
5408
5439
|
case 0:
|
|
5409
5440
|
viewer = params.manager.Viewer;
|
|
5410
5441
|
scene = viewer.scene;
|
|
@@ -5465,9 +5496,18 @@ function renderV2(params, bookmark, view) {
|
|
|
5465
5496
|
gOcclusion = true;
|
|
5466
5497
|
}
|
|
5467
5498
|
scene.globe.depthTestAgainstTerrain = Boolean(gOcclusion);
|
|
5499
|
+
baseColor = bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeColor;
|
|
5500
|
+
if (baseColor == null) {
|
|
5501
|
+
baseColor = (_o = defaults.settings) === null || _o === void 0 ? void 0 : _o.globeColor;
|
|
5502
|
+
}
|
|
5503
|
+
if (baseColor == null) {
|
|
5504
|
+
// TODO: Need global default.
|
|
5505
|
+
baseColor = "#0326BE";
|
|
5506
|
+
}
|
|
5507
|
+
scene.globe.baseColor = Color.fromCssColorString(baseColor);
|
|
5468
5508
|
shadows = bSettings === null || bSettings === void 0 ? void 0 : bSettings.shadows;
|
|
5469
5509
|
if (shadows == null) {
|
|
5470
|
-
shadows = (
|
|
5510
|
+
shadows = (_p = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _p === void 0 ? void 0 : _p.shadows;
|
|
5471
5511
|
}
|
|
5472
5512
|
if (shadows == null) {
|
|
5473
5513
|
shadows = {
|
|
@@ -5493,7 +5533,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5493
5533
|
}
|
|
5494
5534
|
ambientOcclusion = bSettings === null || bSettings === void 0 ? void 0 : bSettings.ambientOcclusion;
|
|
5495
5535
|
if (ambientOcclusion == null) {
|
|
5496
|
-
ambientOcclusion = (
|
|
5536
|
+
ambientOcclusion = (_q = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _q === void 0 ? void 0 : _q.ambientOcclusion;
|
|
5497
5537
|
}
|
|
5498
5538
|
if (ambientOcclusion == null) {
|
|
5499
5539
|
ambientOcclusion = {
|
|
@@ -5514,7 +5554,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5514
5554
|
}
|
|
5515
5555
|
lighting = bSettings === null || bSettings === void 0 ? void 0 : bSettings.lighting;
|
|
5516
5556
|
if (lighting == null) {
|
|
5517
|
-
lighting = (
|
|
5557
|
+
lighting = (_r = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _r === void 0 ? void 0 : _r.lighting;
|
|
5518
5558
|
}
|
|
5519
5559
|
if (lighting == null) {
|
|
5520
5560
|
lighting = {
|
|
@@ -5529,7 +5569,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5529
5569
|
}
|
|
5530
5570
|
quality = bSettings === null || bSettings === void 0 ? void 0 : bSettings.quality;
|
|
5531
5571
|
if (quality == null) {
|
|
5532
|
-
quality = (
|
|
5572
|
+
quality = (_s = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _s === void 0 ? void 0 : _s.quality;
|
|
5533
5573
|
}
|
|
5534
5574
|
if (quality == null) {
|
|
5535
5575
|
quality = {
|
|
@@ -5540,13 +5580,13 @@ function renderV2(params, bookmark, view) {
|
|
|
5540
5580
|
fxaa.enabled = Boolean(quality.fxaa);
|
|
5541
5581
|
dateTime = bSettings === null || bSettings === void 0 ? void 0 : bSettings.dateTime;
|
|
5542
5582
|
if (dateTime == null) {
|
|
5543
|
-
dateTime = (
|
|
5583
|
+
dateTime = (_t = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _t === void 0 ? void 0 : _t.dateTime;
|
|
5544
5584
|
}
|
|
5545
5585
|
if (dateTime != null) {
|
|
5546
5586
|
clock = viewer.clock;
|
|
5547
5587
|
clock.currentTime = JulianDate.fromIso8601(dateTime);
|
|
5548
5588
|
}
|
|
5549
|
-
terrain = (
|
|
5589
|
+
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
5590
|
if (!terrain) return [3 /*break*/, 2];
|
|
5551
5591
|
return [4 /*yield*/, TileRenderEngine.Terrain.V2.Render({
|
|
5552
5592
|
apiGetter: params.apiGetter,
|
|
@@ -5554,12 +5594,12 @@ function renderV2(params, bookmark, view) {
|
|
|
5554
5594
|
viewer: params.manager.Viewer,
|
|
5555
5595
|
})];
|
|
5556
5596
|
case 1:
|
|
5557
|
-
|
|
5558
|
-
|
|
5597
|
+
_0.sent();
|
|
5598
|
+
_0.label = 2;
|
|
5559
5599
|
case 2:
|
|
5560
5600
|
selectedIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.selectedEntityIds;
|
|
5561
5601
|
if (selectedIds == null) {
|
|
5562
|
-
selectedIds = (
|
|
5602
|
+
selectedIds = (_w = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _w === void 0 ? void 0 : _w.selectedEntityIds;
|
|
5563
5603
|
}
|
|
5564
5604
|
if (selectedIds != null) {
|
|
5565
5605
|
params.manager.VisualsRegister.ClearSelected();
|
|
@@ -5568,7 +5608,7 @@ function renderV2(params, bookmark, view) {
|
|
|
5568
5608
|
params.manager.VisualsRegister.Select(id, false);
|
|
5569
5609
|
}
|
|
5570
5610
|
}
|
|
5571
|
-
imagery = (
|
|
5611
|
+
imagery = (_x = bSettings.imagery) !== null && _x !== void 0 ? _x : (_y = defaults.settings) === null || _y === void 0 ? void 0 : _y.imagery;
|
|
5572
5612
|
if (imagery == null) {
|
|
5573
5613
|
// TODO: Need global default.
|
|
5574
5614
|
imagery = [
|
|
@@ -5590,19 +5630,19 @@ function renderV2(params, bookmark, view) {
|
|
|
5590
5630
|
viewer: params.manager.Viewer,
|
|
5591
5631
|
})];
|
|
5592
5632
|
case 3:
|
|
5593
|
-
|
|
5633
|
+
_0.sent();
|
|
5594
5634
|
curEnabled = params.manager.GetEnabledItemIds();
|
|
5595
|
-
newItemIds = (
|
|
5635
|
+
newItemIds = (_z = bSettings === null || bSettings === void 0 ? void 0 : bSettings.menuItemIds) !== null && _z !== void 0 ? _z : [];
|
|
5596
5636
|
_i = 0, curEnabled_1 = curEnabled;
|
|
5597
|
-
|
|
5637
|
+
_0.label = 4;
|
|
5598
5638
|
case 4:
|
|
5599
5639
|
if (!(_i < curEnabled_1.length)) return [3 /*break*/, 7];
|
|
5600
5640
|
id = curEnabled_1[_i];
|
|
5601
5641
|
if (!(newItemIds.indexOf(id) === -1)) return [3 /*break*/, 6];
|
|
5602
5642
|
return [4 /*yield*/, params.manager.RemoveItemById(id)];
|
|
5603
5643
|
case 5:
|
|
5604
|
-
|
|
5605
|
-
|
|
5644
|
+
_0.sent();
|
|
5645
|
+
_0.label = 6;
|
|
5606
5646
|
case 6:
|
|
5607
5647
|
_i++;
|
|
5608
5648
|
return [3 /*break*/, 4];
|
|
@@ -5613,8 +5653,8 @@ function renderV2(params, bookmark, view) {
|
|
|
5613
5653
|
manager: params.manager,
|
|
5614
5654
|
}, params.viewId, params.bookmarkId)];
|
|
5615
5655
|
case 8:
|
|
5616
|
-
|
|
5617
|
-
|
|
5656
|
+
_0.sent();
|
|
5657
|
+
_0.label = 9;
|
|
5618
5658
|
case 9: return [2 /*return*/];
|
|
5619
5659
|
}
|
|
5620
5660
|
});
|