|
@@ -1310,13 +1310,15 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
for (Object floor : floors) {
|
|
|
JSONObject floorObj = (JSONObject)floor;
|
|
|
JSONArray lods = floorObj.getJSONArray("lods");
|
|
|
- for (int i = 0; i < lods.size(); i++) {
|
|
|
- JSONObject lodObj = (JSONObject) lods.get(i);
|
|
|
- String objPath = lodObj.getString("objPath");
|
|
|
- if(!objPath.contains("lod_0")){
|
|
|
- lods.remove(i);
|
|
|
+ List<Object> list = lods.stream().filter(v -> {
|
|
|
+ JSONObject lodObj = (JSONObject) v;
|
|
|
+ String name = lodObj.getString("name");
|
|
|
+ if ("lod_0".equals(name)) {
|
|
|
+ return true;
|
|
|
}
|
|
|
- }
|
|
|
+ return false;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ floorObj.put("lods", list);
|
|
|
}
|
|
|
FileUtil.writeUtf8String(meshJson.toJSONString(), meshJsonPath);
|
|
|
}
|