bruce-cesium 1.7.4 → 1.7.6
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 +41 -33
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +40 -32
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js +31 -26
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-google-photos-render-manager.js +9 -6
- package/dist/lib/rendering/render-managers/tilesets/tileset-google-photos-render-manager.js.map +1 -1
- 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, ProjectView, ProjectViewBookmark, ProjectViewTile, ProjectViewLegacyTile, ProgramKey, Camera } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartesian2, Cartographic, CallbackProperty, Cartesian3, Color, Rectangle, Math as Math$1, HeightReference, EllipsoidTerrainProvider, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, SceneMode,
|
|
3
|
+
import { Cartesian2, Cartographic, CallbackProperty, Cartesian3, Color, Rectangle, Math as Math$1, HeightReference, EllipsoidTerrainProvider, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, SceneMode, HeadingPitchRange, createOsmBuildings, Cesium3DTileStyle, KmlDataSource, OrthographicFrustum, JulianDate, createWorldTerrain, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, Cesium3DTileset, Matrix4, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, ColorMaterialProperty, Matrix3, EasingFunction, GeometryInstance, PolygonPipeline, Cesium3DTileColorBlendMode } from 'cesium';
|
|
4
4
|
|
|
5
5
|
var TIME_LAG = 300;
|
|
6
6
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -5509,48 +5509,53 @@ var TilesetCadRenderManager;
|
|
|
5509
5509
|
}
|
|
5510
5510
|
};
|
|
5511
5511
|
Manager.prototype.mapTilesetFeature = function (feature) {
|
|
5512
|
-
var _a, _b, _c, _d
|
|
5513
|
-
var version = (_c = (_b = (_a = feature === null || feature === void 0 ? void 0 : feature.tileset) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.modelTree) === null || _c === void 0 ? void 0 : _c.version;
|
|
5514
|
-
if (!version) {
|
|
5515
|
-
version = 1;
|
|
5516
|
-
}
|
|
5512
|
+
var _a, _b, _c, _d;
|
|
5517
5513
|
var rego = {
|
|
5518
5514
|
entityId: null,
|
|
5519
5515
|
entityTypeId: null,
|
|
5520
5516
|
menuItemId: this.item.id,
|
|
5521
5517
|
priority: 0,
|
|
5522
5518
|
visual: feature,
|
|
5523
|
-
accountId: (
|
|
5524
|
-
tilesetId: (
|
|
5519
|
+
accountId: (_b = (_a = this.item.tileset) === null || _a === void 0 ? void 0 : _a.ClientAccountID) !== null && _b !== void 0 ? _b : this.apiGetter.accountId,
|
|
5520
|
+
tilesetId: (_c = this.item.tileset) === null || _c === void 0 ? void 0 : _c.TilesetID
|
|
5525
5521
|
};
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
rego.entityId =
|
|
5522
|
+
var featureAny = feature;
|
|
5523
|
+
var propertyNames = featureAny.getPropertyNames ? featureAny.getPropertyNames() : featureAny.getPropertyIds();
|
|
5524
|
+
for (var i = 0; i < propertyNames.length; i++) {
|
|
5525
|
+
var prop = propertyNames[i];
|
|
5526
|
+
var name_1 = String(prop).toLocaleLowerCase();
|
|
5527
|
+
if (name_1 == "bruceid") {
|
|
5528
|
+
rego.entityId = feature.getProperty(prop);
|
|
5529
|
+
break;
|
|
5533
5530
|
}
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
rego.entityId =
|
|
5541
|
-
|
|
5531
|
+
else if (name_1 == "brucepath") {
|
|
5532
|
+
var pathStr = feature.getProperty(prop);
|
|
5533
|
+
if (pathStr != undefined) {
|
|
5534
|
+
var path = pathStr.split("|");
|
|
5535
|
+
var entityTypeId = this.getEntityTypeByPath(path);
|
|
5536
|
+
rego.entityTypeId = entityTypeId;
|
|
5537
|
+
rego.entityId = path[path.length - 1];
|
|
5538
|
+
break;
|
|
5539
|
+
}
|
|
5540
|
+
}
|
|
5541
|
+
else if (name_1 == "geomid") {
|
|
5542
|
+
var geomId = +feature.getProperty(prop);
|
|
5543
|
+
if (geomId != null && (!!geomId || geomId == 0)) {
|
|
5544
|
+
var meta = this.getMetaByGeomId(geomId, feature.tileset);
|
|
5545
|
+
if (meta) {
|
|
5546
|
+
rego.entityId = meta.id;
|
|
5547
|
+
rego.entityTypeId = meta.typeId;
|
|
5548
|
+
break;
|
|
5549
|
+
}
|
|
5542
5550
|
}
|
|
5543
5551
|
}
|
|
5544
|
-
}
|
|
5545
|
-
else {
|
|
5546
|
-
console.log("Unhandled tileset tree version = " + version);
|
|
5547
5552
|
}
|
|
5548
5553
|
if (!rego.entityId) {
|
|
5549
5554
|
return null;
|
|
5550
5555
|
}
|
|
5551
5556
|
// Optional menu item restriction.
|
|
5552
5557
|
// Allows only showing certain entities from a tileset.
|
|
5553
|
-
var onlyIds = (
|
|
5558
|
+
var onlyIds = (_d = this.item.BruceEntity) === null || _d === void 0 ? void 0 : _d.EntityIds;
|
|
5554
5559
|
if ((onlyIds === null || onlyIds === void 0 ? void 0 : onlyIds.length) && !onlyIds.includes(rego.entityId)) {
|
|
5555
5560
|
if (this.item.BruceEntity.Ghosts) {
|
|
5556
5561
|
feature.color = Color.WHITE.clone().withAlpha(0.5);
|
|
@@ -6919,15 +6924,18 @@ var TilesetGooglePhotosRenderManager;
|
|
|
6919
6924
|
}
|
|
6920
6925
|
};
|
|
6921
6926
|
Manager.prototype.Init = function () {
|
|
6927
|
+
var _a, _b;
|
|
6922
6928
|
return __awaiter(this, void 0, void 0, function () {
|
|
6923
|
-
var
|
|
6924
|
-
return __generator(this, function (
|
|
6925
|
-
switch (
|
|
6929
|
+
var _c;
|
|
6930
|
+
return __generator(this, function (_d) {
|
|
6931
|
+
switch (_d.label) {
|
|
6926
6932
|
case 0:
|
|
6927
|
-
|
|
6928
|
-
|
|
6933
|
+
// Using as any to be OK with older versions.
|
|
6934
|
+
_c = this;
|
|
6935
|
+
return [4 /*yield*/, ((_b = (_a = Cesium).createGooglePhotorealistic3DTileset) === null || _b === void 0 ? void 0 : _b.call(_a))];
|
|
6929
6936
|
case 1:
|
|
6930
|
-
|
|
6937
|
+
// Using as any to be OK with older versions.
|
|
6938
|
+
_c.cTileset = _d.sent();
|
|
6931
6939
|
if (this.disposed) {
|
|
6932
6940
|
return [2 /*return*/];
|
|
6933
6941
|
}
|