bruce-cesium 1.2.7 → 1.2.8
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 +22 -14
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +21 -13
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine.js +21 -13
- package/dist/lib/rendering/entity-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, EntityRelationType, ObjectUtils, Tileset, EntityCoords, EntityFilterGetter, EntitySource, EntityRelation, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewTile, ProjectViewLegacyTile, ProgramKey, Camera } from 'bruce-models';
|
|
2
|
-
import { Cartesian2, Cartographic, Math as Math$1, Color,
|
|
2
|
+
import { Cartesian2, Cartographic, Math as Math$1, Cartesian3, Entity, Primitive, Cesium3DTileFeature, Color, Cesium3DTileColorBlendMode, HeadingPitchRange, HeightReference, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, createOsmBuildings, Cesium3DTileStyle, Rectangle, KmlDataSource, OrthographicFrustum, JulianDate, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CallbackProperty, Matrix4, Cesium3DTileset, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, ColorMaterialProperty, Matrix3, EasingFunction, GeometryInstance } from 'cesium';
|
|
3
3
|
|
|
4
4
|
var TIME_LAG = 300;
|
|
5
5
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -1165,11 +1165,11 @@ function getRenderGroupId(zoomItem) {
|
|
|
1165
1165
|
var EntityRenderEngine;
|
|
1166
1166
|
(function (EntityRenderEngine) {
|
|
1167
1167
|
function Render(params) {
|
|
1168
|
-
var _a;
|
|
1168
|
+
var _a, _b;
|
|
1169
1169
|
return __awaiter(this, void 0, void 0, function () {
|
|
1170
|
-
var groupRenderParams, cEntities, models, polygons, polylines, points, i, entity, id, zoomItem, displayType, newRenderId, existingRego, oldRenderId, mParams, mEntities, i, entity, id, cEntity, pParams, pEntities, i, entity, cEntity, pParams, pEntities, i, entity, cEntity, pParams, pEntities, i, entity, cEntity;
|
|
1171
|
-
return __generator(this, function (
|
|
1172
|
-
switch (
|
|
1170
|
+
var groupRenderParams, i, entity, geometry, cEntities, models, polygons, polylines, points, i, entity, id, zoomItem, displayType, newRenderId, existingRego, oldRenderId, mParams, mEntities, i, entity, id, cEntity, pParams, pEntities, i, entity, cEntity, pParams, pEntities, i, entity, cEntity, pParams, pEntities, i, entity, cEntity;
|
|
1171
|
+
return __generator(this, function (_c) {
|
|
1172
|
+
switch (_c.label) {
|
|
1173
1173
|
case 0:
|
|
1174
1174
|
groupRenderParams = {
|
|
1175
1175
|
apiGetter: params.apiGetter,
|
|
@@ -1179,6 +1179,14 @@ var EntityRenderEngine;
|
|
|
1179
1179
|
menuItemId: params.menuItemId,
|
|
1180
1180
|
visualRegister: params.visualRegister
|
|
1181
1181
|
};
|
|
1182
|
+
// Flatten multi-geometry if it's only got 1 piece.
|
|
1183
|
+
for (i = 0; i < params.entities.length; i++) {
|
|
1184
|
+
entity = params.entities[i];
|
|
1185
|
+
geometry = entity.geometry;
|
|
1186
|
+
if (((_a = geometry === null || geometry === void 0 ? void 0 : geometry.MultiGeometry) === null || _a === void 0 ? void 0 : _a.length) == 1) {
|
|
1187
|
+
entity.geometry = __assign(__assign({}, entity.geometry), geometry.MultiGeometry[0]);
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1182
1190
|
cEntities = {};
|
|
1183
1191
|
models = [];
|
|
1184
1192
|
polygons = [];
|
|
@@ -1207,7 +1215,7 @@ var EntityRenderEngine;
|
|
|
1207
1215
|
entityId: id,
|
|
1208
1216
|
menuItemId: params.menuItemId
|
|
1209
1217
|
});
|
|
1210
|
-
oldRenderId = (
|
|
1218
|
+
oldRenderId = (_b = existingRego === null || existingRego === void 0 ? void 0 : existingRego.visual) === null || _b === void 0 ? void 0 : _b._renderGroup;
|
|
1211
1219
|
if (newRenderId == oldRenderId && !(existingRego === null || existingRego === void 0 ? void 0 : existingRego.stale)) {
|
|
1212
1220
|
cEntities[id] = existingRego.visual;
|
|
1213
1221
|
}
|
|
@@ -1229,7 +1237,7 @@ var EntityRenderEngine;
|
|
|
1229
1237
|
mParams = __assign(__assign({}, groupRenderParams), { entities: models });
|
|
1230
1238
|
return [4 /*yield*/, Model3d.RenderGroup(mParams)];
|
|
1231
1239
|
case 1:
|
|
1232
|
-
mEntities =
|
|
1240
|
+
mEntities = _c.sent();
|
|
1233
1241
|
for (i = 0; i < mParams.entities.length; i++) {
|
|
1234
1242
|
entity = mParams.entities[i];
|
|
1235
1243
|
id = entity.Bruce.ID;
|
|
@@ -1241,13 +1249,13 @@ var EntityRenderEngine;
|
|
|
1241
1249
|
polygons.push(entity);
|
|
1242
1250
|
}
|
|
1243
1251
|
}
|
|
1244
|
-
|
|
1252
|
+
_c.label = 2;
|
|
1245
1253
|
case 2:
|
|
1246
1254
|
if (!(polygons.length > 0)) return [3 /*break*/, 4];
|
|
1247
1255
|
pParams = __assign(__assign({}, groupRenderParams), { entities: polygons });
|
|
1248
1256
|
return [4 /*yield*/, Polygon.RenderGroup(pParams)];
|
|
1249
1257
|
case 3:
|
|
1250
|
-
pEntities =
|
|
1258
|
+
pEntities = _c.sent();
|
|
1251
1259
|
for (i = 0; i < pParams.entities.length; i++) {
|
|
1252
1260
|
entity = pParams.entities[i];
|
|
1253
1261
|
cEntity = pEntities[entity.Bruce.ID];
|
|
@@ -1258,13 +1266,13 @@ var EntityRenderEngine;
|
|
|
1258
1266
|
polylines.push(entity);
|
|
1259
1267
|
}
|
|
1260
1268
|
}
|
|
1261
|
-
|
|
1269
|
+
_c.label = 4;
|
|
1262
1270
|
case 4:
|
|
1263
1271
|
if (!(polylines.length > 0)) return [3 /*break*/, 6];
|
|
1264
1272
|
pParams = __assign(__assign({}, groupRenderParams), { entities: polylines });
|
|
1265
1273
|
return [4 /*yield*/, Polyline.RenderGroup(pParams)];
|
|
1266
1274
|
case 5:
|
|
1267
|
-
pEntities =
|
|
1275
|
+
pEntities = _c.sent();
|
|
1268
1276
|
for (i = 0; i < pParams.entities.length; i++) {
|
|
1269
1277
|
entity = pParams.entities[i];
|
|
1270
1278
|
cEntity = pEntities[entity.Bruce.ID];
|
|
@@ -1275,13 +1283,13 @@ var EntityRenderEngine;
|
|
|
1275
1283
|
points.push(entity);
|
|
1276
1284
|
}
|
|
1277
1285
|
}
|
|
1278
|
-
|
|
1286
|
+
_c.label = 6;
|
|
1279
1287
|
case 6:
|
|
1280
1288
|
if (!(points.length > 0)) return [3 /*break*/, 8];
|
|
1281
1289
|
pParams = __assign(__assign({}, groupRenderParams), { entities: points });
|
|
1282
1290
|
return [4 /*yield*/, Point.RenderGroup(pParams)];
|
|
1283
1291
|
case 7:
|
|
1284
|
-
pEntities =
|
|
1292
|
+
pEntities = _c.sent();
|
|
1285
1293
|
for (i = 0; i < pParams.entities.length; i++) {
|
|
1286
1294
|
entity = pParams.entities[i];
|
|
1287
1295
|
cEntity = pEntities[entity.Bruce.ID];
|
|
@@ -1289,7 +1297,7 @@ var EntityRenderEngine;
|
|
|
1289
1297
|
cEntities[entity.Bruce.ID] = cEntity;
|
|
1290
1298
|
}
|
|
1291
1299
|
}
|
|
1292
|
-
|
|
1300
|
+
_c.label = 8;
|
|
1293
1301
|
case 8: return [2 /*return*/, cEntities];
|
|
1294
1302
|
}
|
|
1295
1303
|
});
|