bruce-cesium 2.5.2 → 2.5.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 +304 -162
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +303 -161
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine.js +142 -119
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/menu-item-manager.js +1 -1
- package/dist/lib/rendering/menu-item-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js +17 -0
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-loaded-render-manager.js +17 -0
- package/dist/lib/rendering/render-managers/entities/entities-loaded-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +63 -34
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entity-render-manager.js +17 -0
- package/dist/lib/rendering/render-managers/entities/entity-render-manager.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js +17 -6
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/lib/viewer/viewer-utils.js +29 -0
- package/dist/lib/viewer/viewer-utils.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/render-managers/entities/entities-ids-render-manager.d.ts +5 -1
- package/dist/types/rendering/render-managers/entities/entities-loaded-render-manager.d.ts +5 -1
- package/dist/types/rendering/render-managers/entities/entities-render-manager.d.ts +7 -1
- package/dist/types/rendering/render-managers/entities/entity-render-manager.d.ts +5 -1
- package/package.json +2 -2
package/dist/lib/bruce-cesium.js
CHANGED
|
@@ -45,5 +45,5 @@ __exportStar(require("./utils/measure-utils"), exports);
|
|
|
45
45
|
__exportStar(require("./utils/entity-utils"), exports);
|
|
46
46
|
__exportStar(require("./widgets/common/draw-3d-polygon"), exports);
|
|
47
47
|
__exportStar(require("./widgets/common/draw-3d-polyline"), exports);
|
|
48
|
-
exports.VERSION = "2.5.
|
|
48
|
+
exports.VERSION = "2.5.4";
|
|
49
49
|
//# sourceMappingURL=bruce-cesium.js.map
|
|
@@ -498,7 +498,6 @@ var EntityRenderEngine;
|
|
|
498
498
|
rendered = rendered.filter(function (x) { return x != null; });
|
|
499
499
|
if (rendered.length) {
|
|
500
500
|
rootEntity_1 = new Cesium.Entity({});
|
|
501
|
-
params.viewer.entities.add(rootEntity_1);
|
|
502
501
|
rootEntity_1._siblingGraphics = [];
|
|
503
502
|
rootEntity_1._renderGroup = getRenderGroupId(zoomItem, (_h = params.viewer) === null || _h === void 0 ? void 0 : _h.terrainProvider);
|
|
504
503
|
rootEntity_1._siblingGraphics = rootEntity_1._siblingGraphics.concat(rendered);
|
|
@@ -702,7 +701,7 @@ var EntityRenderEngine;
|
|
|
702
701
|
recordHeightRef: heightRef,
|
|
703
702
|
returnHeightRef: heightRef
|
|
704
703
|
}),
|
|
705
|
-
show:
|
|
704
|
+
show: true
|
|
706
705
|
});
|
|
707
706
|
}
|
|
708
707
|
}
|
|
@@ -749,7 +748,7 @@ var EntityRenderEngine;
|
|
|
749
748
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
750
749
|
},
|
|
751
750
|
position: pos === null || pos === void 0 ? void 0 : pos.clone(),
|
|
752
|
-
show:
|
|
751
|
+
show: true
|
|
753
752
|
});
|
|
754
753
|
if (outline && outlineWidth > 0) {
|
|
755
754
|
if (!exHeightRef && outlineHeight > 0) {
|
|
@@ -798,16 +797,10 @@ var EntityRenderEngine;
|
|
|
798
797
|
recordHeightRef: heightRef,
|
|
799
798
|
returnHeightRef: heightRef
|
|
800
799
|
}),
|
|
801
|
-
show:
|
|
800
|
+
show: true
|
|
802
801
|
});
|
|
803
802
|
}
|
|
804
803
|
if (cEntity) {
|
|
805
|
-
params.viewer.entities.add(cEntity);
|
|
806
|
-
if (siblings) {
|
|
807
|
-
siblings.forEach(function (sibling) {
|
|
808
|
-
params.viewer.entities.add(sibling);
|
|
809
|
-
});
|
|
810
|
-
}
|
|
811
804
|
cEntity._siblingGraphics = siblings;
|
|
812
805
|
}
|
|
813
806
|
return [2 /*return*/, cEntity];
|
|
@@ -819,33 +812,40 @@ var EntityRenderEngine;
|
|
|
819
812
|
function RenderGroup(params) {
|
|
820
813
|
var _a, _b, _c;
|
|
821
814
|
return __awaiter(this, void 0, void 0, function () {
|
|
822
|
-
var api, cEntities, i, entity, zoomItem, style, tagIds, tags, pStyle, cEntity, name_2;
|
|
823
|
-
return __generator(this, function (
|
|
824
|
-
switch (
|
|
815
|
+
var api, cEntities, i, entity, zoomItem, style, _d, tagIds, tags, pStyle, cEntity, name_2;
|
|
816
|
+
return __generator(this, function (_e) {
|
|
817
|
+
switch (_e.label) {
|
|
825
818
|
case 0:
|
|
826
819
|
api = params.apiGetter.getApi();
|
|
827
820
|
cEntities = {};
|
|
828
821
|
i = 0;
|
|
829
|
-
|
|
822
|
+
_e.label = 1;
|
|
830
823
|
case 1:
|
|
831
|
-
if (!(i < params.entities.length)) return [3 /*break*/,
|
|
824
|
+
if (!(i < params.entities.length)) return [3 /*break*/, 11];
|
|
832
825
|
entity = params.entities[i];
|
|
833
826
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
827
|
+
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 3];
|
|
834
828
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
835
829
|
case 2:
|
|
836
|
-
|
|
830
|
+
_d = (_a = (_e.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
831
|
+
return [3 /*break*/, 4];
|
|
832
|
+
case 3:
|
|
833
|
+
_d = zoomItem.Style;
|
|
834
|
+
_e.label = 4;
|
|
835
|
+
case 4:
|
|
836
|
+
style = _d;
|
|
837
837
|
tagIds = entity.Bruce["Layer.ID"];
|
|
838
838
|
tags = [];
|
|
839
|
-
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/,
|
|
839
|
+
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 6];
|
|
840
840
|
return [4 /*yield*/, bruce_models_1.EntityTag.GetListByIds({
|
|
841
841
|
api: api,
|
|
842
842
|
tagIds: tagIds
|
|
843
843
|
})];
|
|
844
|
-
case
|
|
845
|
-
tags = (
|
|
846
|
-
|
|
847
|
-
case
|
|
848
|
-
pStyle = (_b =
|
|
844
|
+
case 5:
|
|
845
|
+
tags = (_e.sent()).tags;
|
|
846
|
+
_e.label = 6;
|
|
847
|
+
case 6:
|
|
848
|
+
pStyle = (_b = style === null || style === void 0 ? void 0 : style.pointStyle) !== null && _b !== void 0 ? _b : {};
|
|
849
849
|
return [4 /*yield*/, Render({
|
|
850
850
|
entity: entity,
|
|
851
851
|
style: pStyle,
|
|
@@ -855,22 +855,22 @@ var EntityRenderEngine;
|
|
|
855
855
|
maxDistance: zoomItem.MaxZoom,
|
|
856
856
|
minDistance: zoomItem.MinZoom
|
|
857
857
|
})];
|
|
858
|
-
case
|
|
859
|
-
cEntity =
|
|
860
|
-
if (!cEntity) return [3 /*break*/,
|
|
858
|
+
case 7:
|
|
859
|
+
cEntity = _e.sent();
|
|
860
|
+
if (!cEntity) return [3 /*break*/, 9];
|
|
861
861
|
return [4 /*yield*/, getName(api, entity)];
|
|
862
|
-
case
|
|
863
|
-
name_2 =
|
|
862
|
+
case 8:
|
|
863
|
+
name_2 = _e.sent();
|
|
864
864
|
cEntity.name = name_2;
|
|
865
865
|
cEntity._renderGroup = getRenderGroupId(zoomItem, (_c = params.viewer) === null || _c === void 0 ? void 0 : _c.terrainProvider);
|
|
866
|
-
|
|
867
|
-
case
|
|
866
|
+
_e.label = 9;
|
|
867
|
+
case 9:
|
|
868
868
|
cEntities[entity.Bruce.ID] = cEntity;
|
|
869
|
-
|
|
870
|
-
case
|
|
869
|
+
_e.label = 10;
|
|
870
|
+
case 10:
|
|
871
871
|
i++;
|
|
872
872
|
return [3 /*break*/, 1];
|
|
873
|
-
case
|
|
873
|
+
case 11: return [2 /*return*/, cEntities];
|
|
874
874
|
}
|
|
875
875
|
});
|
|
876
876
|
});
|
|
@@ -975,42 +975,48 @@ var EntityRenderEngine;
|
|
|
975
975
|
recordHeightRef: heightRef,
|
|
976
976
|
returnHeightRef: heightRef
|
|
977
977
|
}),
|
|
978
|
-
show:
|
|
978
|
+
show: true
|
|
979
979
|
});
|
|
980
|
-
params.viewer.entities.add(cEntity);
|
|
981
980
|
return cEntity;
|
|
982
981
|
}
|
|
983
982
|
Polyline.Render = Render;
|
|
984
983
|
function RenderGroup(params) {
|
|
985
984
|
var _a, _b, _c;
|
|
986
985
|
return __awaiter(this, void 0, void 0, function () {
|
|
987
|
-
var api, cEntities, i, entity, zoomItem, style, tagIds, tags, lStyle, cEntity, name_3;
|
|
988
|
-
return __generator(this, function (
|
|
989
|
-
switch (
|
|
986
|
+
var api, cEntities, i, entity, zoomItem, style, _d, tagIds, tags, lStyle, cEntity, name_3;
|
|
987
|
+
return __generator(this, function (_e) {
|
|
988
|
+
switch (_e.label) {
|
|
990
989
|
case 0:
|
|
991
990
|
api = params.apiGetter.getApi();
|
|
992
991
|
cEntities = {};
|
|
993
992
|
i = 0;
|
|
994
|
-
|
|
993
|
+
_e.label = 1;
|
|
995
994
|
case 1:
|
|
996
|
-
if (!(i < params.entities.length)) return [3 /*break*/,
|
|
995
|
+
if (!(i < params.entities.length)) return [3 /*break*/, 9];
|
|
997
996
|
entity = params.entities[i];
|
|
998
997
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
998
|
+
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 3];
|
|
999
999
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
1000
1000
|
case 2:
|
|
1001
|
-
|
|
1001
|
+
_d = (_a = (_e.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
1002
|
+
return [3 /*break*/, 4];
|
|
1003
|
+
case 3:
|
|
1004
|
+
_d = zoomItem.Style;
|
|
1005
|
+
_e.label = 4;
|
|
1006
|
+
case 4:
|
|
1007
|
+
style = _d;
|
|
1002
1008
|
tagIds = entity.Bruce["Layer.ID"];
|
|
1003
1009
|
tags = [];
|
|
1004
|
-
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/,
|
|
1010
|
+
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 6];
|
|
1005
1011
|
return [4 /*yield*/, bruce_models_1.EntityTag.GetListByIds({
|
|
1006
1012
|
api: api,
|
|
1007
1013
|
tagIds: tagIds
|
|
1008
1014
|
})];
|
|
1009
|
-
case
|
|
1010
|
-
tags = (
|
|
1011
|
-
|
|
1012
|
-
case
|
|
1013
|
-
lStyle = (_b =
|
|
1015
|
+
case 5:
|
|
1016
|
+
tags = (_e.sent()).tags;
|
|
1017
|
+
_e.label = 6;
|
|
1018
|
+
case 6:
|
|
1019
|
+
lStyle = (_b = style === null || style === void 0 ? void 0 : style.polylineStyle) !== null && _b !== void 0 ? _b : {};
|
|
1014
1020
|
cEntity = Render({
|
|
1015
1021
|
entity: entity,
|
|
1016
1022
|
style: lStyle,
|
|
@@ -1019,18 +1025,18 @@ var EntityRenderEngine;
|
|
|
1019
1025
|
maxDistance: zoomItem.MaxZoom,
|
|
1020
1026
|
minDistance: zoomItem.MinZoom
|
|
1021
1027
|
});
|
|
1022
|
-
if (!cEntity) return [3 /*break*/,
|
|
1028
|
+
if (!cEntity) return [3 /*break*/, 8];
|
|
1023
1029
|
return [4 /*yield*/, getName(api, entity)];
|
|
1024
|
-
case
|
|
1025
|
-
name_3 =
|
|
1030
|
+
case 7:
|
|
1031
|
+
name_3 = _e.sent();
|
|
1026
1032
|
cEntity.name = name_3;
|
|
1027
1033
|
cEntity._renderGroup = getRenderGroupId(zoomItem, (_c = params.viewer) === null || _c === void 0 ? void 0 : _c.terrainProvider);
|
|
1028
1034
|
cEntities[entity.Bruce.ID] = cEntity;
|
|
1029
|
-
|
|
1030
|
-
case
|
|
1035
|
+
_e.label = 8;
|
|
1036
|
+
case 8:
|
|
1031
1037
|
i++;
|
|
1032
1038
|
return [3 /*break*/, 1];
|
|
1033
|
-
case
|
|
1039
|
+
case 9: return [2 /*return*/, cEntities];
|
|
1034
1040
|
}
|
|
1035
1041
|
});
|
|
1036
1042
|
});
|
|
@@ -1102,7 +1108,7 @@ var EntityRenderEngine;
|
|
|
1102
1108
|
recordHeightRef: heightRef,
|
|
1103
1109
|
returnHeightRef: heightRef
|
|
1104
1110
|
}),
|
|
1105
|
-
show:
|
|
1111
|
+
show: true
|
|
1106
1112
|
});
|
|
1107
1113
|
cEntity._siblingGraphics = [];
|
|
1108
1114
|
if (width > 0 && cLineColor) {
|
|
@@ -1153,9 +1159,8 @@ var EntityRenderEngine;
|
|
|
1153
1159
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance, width),
|
|
1154
1160
|
shadows: Cesium.ShadowMode.ENABLED
|
|
1155
1161
|
},
|
|
1156
|
-
show:
|
|
1162
|
+
show: true
|
|
1157
1163
|
});
|
|
1158
|
-
params.viewer.entities.add(cEntityBorder);
|
|
1159
1164
|
cEntityBorder._parentEntity = cEntity;
|
|
1160
1165
|
cEntity._siblingGraphics.push(cEntityBorder);
|
|
1161
1166
|
for (var i = 0; i < holePosses.length; i++) {
|
|
@@ -1185,47 +1190,52 @@ var EntityRenderEngine;
|
|
|
1185
1190
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance, width),
|
|
1186
1191
|
shadows: Cesium.ShadowMode.ENABLED,
|
|
1187
1192
|
},
|
|
1188
|
-
show:
|
|
1193
|
+
show: true
|
|
1189
1194
|
});
|
|
1190
1195
|
cEntity._siblingGraphics.push(cEntityHole);
|
|
1191
1196
|
cEntityHole._parentEntity = cEntity;
|
|
1192
|
-
params.viewer.entities.add(cEntityHole);
|
|
1193
1197
|
}
|
|
1194
1198
|
}
|
|
1195
|
-
params.viewer.entities.add(cEntity);
|
|
1196
1199
|
return cEntity;
|
|
1197
1200
|
}
|
|
1198
1201
|
Polygon.Render = Render;
|
|
1199
1202
|
function RenderGroup(params) {
|
|
1200
1203
|
var _a, _b, _c;
|
|
1201
1204
|
return __awaiter(this, void 0, void 0, function () {
|
|
1202
|
-
var api, cEntities, i, entity, zoomItem, style, tagIds, tags, pStyle, cEntity, name_4;
|
|
1203
|
-
return __generator(this, function (
|
|
1204
|
-
switch (
|
|
1205
|
+
var api, cEntities, i, entity, zoomItem, style, _d, tagIds, tags, pStyle, cEntity, name_4;
|
|
1206
|
+
return __generator(this, function (_e) {
|
|
1207
|
+
switch (_e.label) {
|
|
1205
1208
|
case 0:
|
|
1206
1209
|
api = params.apiGetter.getApi();
|
|
1207
1210
|
cEntities = {};
|
|
1208
1211
|
i = 0;
|
|
1209
|
-
|
|
1212
|
+
_e.label = 1;
|
|
1210
1213
|
case 1:
|
|
1211
|
-
if (!(i < params.entities.length)) return [3 /*break*/,
|
|
1214
|
+
if (!(i < params.entities.length)) return [3 /*break*/, 9];
|
|
1212
1215
|
entity = params.entities[i];
|
|
1213
1216
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
1217
|
+
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 3];
|
|
1214
1218
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
1215
1219
|
case 2:
|
|
1216
|
-
|
|
1220
|
+
_d = (_a = (_e.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
1221
|
+
return [3 /*break*/, 4];
|
|
1222
|
+
case 3:
|
|
1223
|
+
_d = zoomItem.Style;
|
|
1224
|
+
_e.label = 4;
|
|
1225
|
+
case 4:
|
|
1226
|
+
style = _d;
|
|
1217
1227
|
tagIds = entity.Bruce["Layer.ID"];
|
|
1218
1228
|
tags = [];
|
|
1219
|
-
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/,
|
|
1229
|
+
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 6];
|
|
1220
1230
|
return [4 /*yield*/, bruce_models_1.EntityTag.GetListByIds({
|
|
1221
1231
|
api: api,
|
|
1222
1232
|
tagIds: tagIds
|
|
1223
1233
|
})];
|
|
1224
|
-
case
|
|
1225
|
-
tags = (
|
|
1226
|
-
|
|
1227
|
-
case
|
|
1228
|
-
pStyle = (_b =
|
|
1234
|
+
case 5:
|
|
1235
|
+
tags = (_e.sent()).tags;
|
|
1236
|
+
_e.label = 6;
|
|
1237
|
+
case 6:
|
|
1238
|
+
pStyle = (_b = style === null || style === void 0 ? void 0 : style.polygonStyle) !== null && _b !== void 0 ? _b : {};
|
|
1229
1239
|
cEntity = Render({
|
|
1230
1240
|
entity: entity,
|
|
1231
1241
|
style: pStyle,
|
|
@@ -1234,18 +1244,18 @@ var EntityRenderEngine;
|
|
|
1234
1244
|
maxDistance: zoomItem.MaxZoom,
|
|
1235
1245
|
minDistance: zoomItem.MinZoom
|
|
1236
1246
|
});
|
|
1237
|
-
if (!cEntity) return [3 /*break*/,
|
|
1247
|
+
if (!cEntity) return [3 /*break*/, 8];
|
|
1238
1248
|
return [4 /*yield*/, getName(api, entity)];
|
|
1239
|
-
case
|
|
1240
|
-
name_4 =
|
|
1249
|
+
case 7:
|
|
1250
|
+
name_4 = _e.sent();
|
|
1241
1251
|
cEntity.name = name_4;
|
|
1242
1252
|
cEntity._renderGroup = getRenderGroupId(zoomItem, (_c = params.viewer) === null || _c === void 0 ? void 0 : _c.terrainProvider);
|
|
1243
1253
|
cEntities[entity.Bruce.ID] = cEntity;
|
|
1244
|
-
|
|
1245
|
-
case
|
|
1254
|
+
_e.label = 8;
|
|
1255
|
+
case 8:
|
|
1246
1256
|
i++;
|
|
1247
1257
|
return [3 /*break*/, 1];
|
|
1248
|
-
case
|
|
1258
|
+
case 9: return [2 /*return*/, cEntities];
|
|
1249
1259
|
}
|
|
1250
1260
|
});
|
|
1251
1261
|
});
|
|
@@ -1317,7 +1327,7 @@ var EntityRenderEngine;
|
|
|
1317
1327
|
},
|
|
1318
1328
|
orientation: orientation,
|
|
1319
1329
|
position: pos,
|
|
1320
|
-
show:
|
|
1330
|
+
show: true
|
|
1321
1331
|
});
|
|
1322
1332
|
var model = cEntity.model;
|
|
1323
1333
|
model._clientFileId = params.lodClientFileId;
|
|
@@ -1325,16 +1335,15 @@ var EntityRenderEngine;
|
|
|
1325
1335
|
record: scale,
|
|
1326
1336
|
style: styleScale
|
|
1327
1337
|
};
|
|
1328
|
-
params.viewer.entities.add(cEntity);
|
|
1329
1338
|
return cEntity;
|
|
1330
1339
|
}
|
|
1331
1340
|
Model3d.Render = Render;
|
|
1332
1341
|
function RenderGroup(params) {
|
|
1333
1342
|
var _a, _b, _c, _d, _e;
|
|
1334
1343
|
return __awaiter(this, void 0, void 0, function () {
|
|
1335
|
-
var api, cEntities, reqBody, i, entity, zoomItem, style, tagIds, tags, mStyle, group, level, catId, lodData, _loop_2, i;
|
|
1336
|
-
return __generator(this, function (
|
|
1337
|
-
switch (
|
|
1344
|
+
var api, cEntities, reqBody, i, entity, zoomItem, style, _f, tagIds, tags, mStyle, group, level, catId, lodData, _loop_2, i;
|
|
1345
|
+
return __generator(this, function (_g) {
|
|
1346
|
+
switch (_g.label) {
|
|
1338
1347
|
case 0:
|
|
1339
1348
|
api = params.apiGetter.getApi();
|
|
1340
1349
|
cEntities = {};
|
|
@@ -1344,26 +1353,33 @@ var EntityRenderEngine;
|
|
|
1344
1353
|
"Items": []
|
|
1345
1354
|
};
|
|
1346
1355
|
i = 0;
|
|
1347
|
-
|
|
1356
|
+
_g.label = 1;
|
|
1348
1357
|
case 1:
|
|
1349
|
-
if (!(i < params.entities.length)) return [3 /*break*/,
|
|
1358
|
+
if (!(i < params.entities.length)) return [3 /*break*/, 8];
|
|
1350
1359
|
entity = params.entities[i];
|
|
1351
1360
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
1361
|
+
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 3];
|
|
1352
1362
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
1353
1363
|
case 2:
|
|
1354
|
-
|
|
1364
|
+
_f = (_a = (_g.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
1365
|
+
return [3 /*break*/, 4];
|
|
1366
|
+
case 3:
|
|
1367
|
+
_f = zoomItem.Style;
|
|
1368
|
+
_g.label = 4;
|
|
1369
|
+
case 4:
|
|
1370
|
+
style = _f;
|
|
1355
1371
|
tagIds = entity.Bruce["Layer.ID"];
|
|
1356
1372
|
tags = [];
|
|
1357
|
-
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/,
|
|
1373
|
+
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 6];
|
|
1358
1374
|
return [4 /*yield*/, bruce_models_1.EntityTag.GetListByIds({
|
|
1359
1375
|
api: api,
|
|
1360
1376
|
tagIds: tagIds
|
|
1361
1377
|
})];
|
|
1362
|
-
case
|
|
1363
|
-
tags = (
|
|
1364
|
-
|
|
1365
|
-
case
|
|
1366
|
-
mStyle = (_b =
|
|
1378
|
+
case 5:
|
|
1379
|
+
tags = (_g.sent()).tags;
|
|
1380
|
+
_g.label = 6;
|
|
1381
|
+
case 6:
|
|
1382
|
+
mStyle = (_b = style === null || style === void 0 ? void 0 : style.modelStyle) !== null && _b !== void 0 ? _b : {};
|
|
1367
1383
|
group = mStyle.lodGroup ? bruce_models_1.Calculator.GetString(mStyle.lodGroup, entity, tags) : null;
|
|
1368
1384
|
if (!group) {
|
|
1369
1385
|
group = "DEFAULT";
|
|
@@ -1382,42 +1398,49 @@ var EntityRenderEngine;
|
|
|
1382
1398
|
"group": group,
|
|
1383
1399
|
"level": level
|
|
1384
1400
|
});
|
|
1385
|
-
|
|
1386
|
-
case
|
|
1401
|
+
_g.label = 7;
|
|
1402
|
+
case 7:
|
|
1387
1403
|
i++;
|
|
1388
1404
|
return [3 /*break*/, 1];
|
|
1389
|
-
case
|
|
1405
|
+
case 8: return [4 /*yield*/, bruce_models_1.EntityLod.GetLods({
|
|
1390
1406
|
api: api,
|
|
1391
1407
|
filter: reqBody
|
|
1392
1408
|
})];
|
|
1393
|
-
case
|
|
1394
|
-
lodData = (
|
|
1409
|
+
case 9:
|
|
1410
|
+
lodData = (_g.sent()).lods;
|
|
1395
1411
|
_loop_2 = function (i) {
|
|
1396
|
-
var entity, zoomItem, style, tagIds, tags, lod, mStyle, cEntity, name_5;
|
|
1397
|
-
return __generator(this, function (
|
|
1398
|
-
switch (
|
|
1412
|
+
var entity, zoomItem, style, _h, tagIds, tags, lod, mStyle, cEntity, name_5;
|
|
1413
|
+
return __generator(this, function (_j) {
|
|
1414
|
+
switch (_j.label) {
|
|
1399
1415
|
case 0:
|
|
1400
1416
|
entity = params.entities[i];
|
|
1401
1417
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
1418
|
+
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 2];
|
|
1402
1419
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
1403
1420
|
case 1:
|
|
1404
|
-
|
|
1421
|
+
_h = (_c = (_j.sent())) === null || _c === void 0 ? void 0 : _c.Settings;
|
|
1422
|
+
return [3 /*break*/, 3];
|
|
1423
|
+
case 2:
|
|
1424
|
+
_h = zoomItem.Style;
|
|
1425
|
+
_j.label = 3;
|
|
1426
|
+
case 3:
|
|
1427
|
+
style = _h;
|
|
1405
1428
|
tagIds = entity.Bruce["Layer.ID"];
|
|
1406
1429
|
tags = [];
|
|
1407
|
-
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/,
|
|
1430
|
+
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 5];
|
|
1408
1431
|
return [4 /*yield*/, bruce_models_1.EntityTag.GetListByIds({
|
|
1409
1432
|
api: api,
|
|
1410
1433
|
tagIds: tagIds
|
|
1411
1434
|
})];
|
|
1412
|
-
case
|
|
1413
|
-
tags = (
|
|
1414
|
-
|
|
1415
|
-
case
|
|
1435
|
+
case 4:
|
|
1436
|
+
tags = (_j.sent()).tags;
|
|
1437
|
+
_j.label = 5;
|
|
1438
|
+
case 5:
|
|
1416
1439
|
lod = lodData.find(function (x) { return x.entityId == entity.Bruce.ID; });
|
|
1417
1440
|
if (!(lod === null || lod === void 0 ? void 0 : lod.clientFileId)) {
|
|
1418
1441
|
return [2 /*return*/, "continue"];
|
|
1419
1442
|
}
|
|
1420
|
-
mStyle = (_d =
|
|
1443
|
+
mStyle = (_d = style === null || style === void 0 ? void 0 : style.modelStyle) !== null && _d !== void 0 ? _d : {};
|
|
1421
1444
|
cEntity = Render({
|
|
1422
1445
|
entity: entity,
|
|
1423
1446
|
style: mStyle,
|
|
@@ -1431,30 +1454,30 @@ var EntityRenderEngine;
|
|
|
1431
1454
|
maxDistance: zoomItem.MaxZoom,
|
|
1432
1455
|
minDistance: zoomItem.MinZoom
|
|
1433
1456
|
});
|
|
1434
|
-
if (!cEntity) return [3 /*break*/,
|
|
1457
|
+
if (!cEntity) return [3 /*break*/, 7];
|
|
1435
1458
|
return [4 /*yield*/, getName(api, entity)];
|
|
1436
|
-
case
|
|
1437
|
-
name_5 =
|
|
1459
|
+
case 6:
|
|
1460
|
+
name_5 = _j.sent();
|
|
1438
1461
|
cEntity.name = name_5;
|
|
1439
1462
|
cEntity._renderGroup = getRenderGroupId(zoomItem, (_e = params.viewer) === null || _e === void 0 ? void 0 : _e.terrainProvider);
|
|
1440
1463
|
cEntities[entity.Bruce.ID] = cEntity;
|
|
1441
|
-
|
|
1442
|
-
case
|
|
1464
|
+
_j.label = 7;
|
|
1465
|
+
case 7: return [2 /*return*/];
|
|
1443
1466
|
}
|
|
1444
1467
|
});
|
|
1445
1468
|
};
|
|
1446
1469
|
i = 0;
|
|
1447
|
-
|
|
1448
|
-
case 8:
|
|
1449
|
-
if (!(i < params.entities.length)) return [3 /*break*/, 11];
|
|
1450
|
-
return [5 /*yield**/, _loop_2(i)];
|
|
1451
|
-
case 9:
|
|
1452
|
-
_f.sent();
|
|
1453
|
-
_f.label = 10;
|
|
1470
|
+
_g.label = 10;
|
|
1454
1471
|
case 10:
|
|
1472
|
+
if (!(i < params.entities.length)) return [3 /*break*/, 13];
|
|
1473
|
+
return [5 /*yield**/, _loop_2(i)];
|
|
1474
|
+
case 11:
|
|
1475
|
+
_g.sent();
|
|
1476
|
+
_g.label = 12;
|
|
1477
|
+
case 12:
|
|
1455
1478
|
i++;
|
|
1456
|
-
return [3 /*break*/,
|
|
1457
|
-
case
|
|
1479
|
+
return [3 /*break*/, 10];
|
|
1480
|
+
case 13: return [2 /*return*/, cEntities];
|
|
1458
1481
|
}
|
|
1459
1482
|
});
|
|
1460
1483
|
});
|