@kq_npm/client3d_webgl_vue 4.5.56 → 4.5.57

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.
Files changed (73) hide show
  1. package/adddata/index.js +189 -21
  2. package/airspacegridoccupancyquery/index.js +108 -7
  3. package/airspaceprofileanalysis/index.js +99 -7
  4. package/aspectanalysis/index.js +25 -7
  5. package/baseterraingallery/index.js +16 -4
  6. package/boxclip/index.js +58 -16
  7. package/buildpointmodel/index.js +3441 -544
  8. package/buildpointmodel/style/buildpointmodel.css +1 -1
  9. package/buildpolygonmodel/index.js +205 -81
  10. package/buildpolylinemodel/index.js +346 -70
  11. package/clientPrint/index.js +10524 -3041
  12. package/comparemap/index.js +132 -60
  13. package/compass/index.js +16 -6
  14. package/excavatefillanalysis/index.js +51 -7
  15. package/fixedzoomin/index.js +24 -7
  16. package/fixedzoomout/index.js +25 -7
  17. package/flight/index.js +113 -26
  18. package/floodanalysis/index.js +79 -14
  19. package/geologicalbodyanalysis/index.js +41 -5
  20. package/gpuspatialquery/index.js +59 -11
  21. package/gridoccupancyquery/index.js +78 -12
  22. package/hawkeye/index.js +20 -2
  23. package/headertemp/index.js +7 -2
  24. package/heatmap3d/index.js +282 -158
  25. package/index.js +10524 -3041
  26. package/isolineanalysis/index.js +113 -38
  27. package/light/index.js +80 -22
  28. package/limitheightanalysis/index.js +30 -10
  29. package/lowaltitudefeature/index.js +292 -119
  30. package/measure/index.js +60 -19
  31. package/modelFlat/index.js +48 -8
  32. package/modeledit/index.js +38 -4
  33. package/modelexcavate/index.js +48 -7
  34. package/modelfilter/index.js +51 -8
  35. package/modelmaterialedit/index.js +127 -25
  36. package/modelprofileanalysis/index.js +50 -14
  37. package/modelselect/index.js +33 -3
  38. package/modelstyleedit/index.js +39 -3
  39. package/modeltransform/index.js +79 -14
  40. package/package.json +1 -1
  41. package/particleeffect/index.js +83 -17
  42. package/planeclip/index.js +66 -17
  43. package/pointcloudrender/index.js +134 -15
  44. package/radarscananalysis/index.js +35 -3
  45. package/resetview/index.js +14 -6
  46. package/roller/index.js +55 -18
  47. package/scaneffect/index.js +98 -29
  48. package/sceneadvancedtoimage/index.js +32 -6
  49. package/sceneapp/index.js +10524 -3041
  50. package/sceneset/index.js +141 -71
  51. package/scenetohdimage/index.js +23 -3
  52. package/sceneview/index.js +10524 -3041
  53. package/screenshot/index.js +44 -11
  54. package/shadowanalysis/index.js +79 -19
  55. package/sightlineanalysis/index.js +66 -15
  56. package/skylineanalysis/index.js +20 -4
  57. package/slopeanalysis/index.js +75 -16
  58. package/slopeaspectanalysis/index.js +128 -26
  59. package/statusbar/index.js +80 -67
  60. package/style.css +1 -1
  61. package/terrainoperation/index.js +39 -7
  62. package/terrainprofileanalysis/index.js +43 -5
  63. package/toolbarapp/index.js +10524 -3041
  64. package/toolboxapp/index.js +10524 -3041
  65. package/typhoontrac/index.js +134 -16
  66. package/underground/index.js +8 -2
  67. package/videofusion/index.js +86 -30
  68. package/videoproject/index.js +77 -23
  69. package/viewshedanalysis/index.js +58 -13
  70. package/weathereffect/index.js +73 -18
  71. package/webgl.es.js +263 -264
  72. package/windyslicing/index.js +233 -45
  73. package/wireframesketch/index.js +25 -8
@@ -156,8 +156,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
156
156
  const {
157
157
  t
158
158
  } = (0, _useGlobalConfig.useLocale)();
159
- let viewModel = null;
160
- let tiles = (0, _vue.ref)([]);
159
+ let viewModel = null; // 点云渲染视图模型实例
160
+ let tiles = (0, _vue.ref)([]); // 所有点云图层对象列表
161
161
  // 获取组件传参
162
162
  const props = __props;
163
163
  // 组件容器Ref
@@ -174,7 +174,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
174
174
  value: "2",
175
175
  src: _constImage.GREEN_TO_BLUE_URL
176
176
  }];
177
- let renderList = (0, _vue.ref)([]);
177
+ let renderList = (0, _vue.ref)([]); // 分类渲染颜色列表
178
178
 
179
179
  //模型滤镜参数
180
180
  let formItem = (0, _vue.reactive)({
@@ -214,7 +214,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
214
214
 
215
215
  // 生成组件默认header
216
216
  let headerTemp = (0, _vue.ref)();
217
- let headerTempRef = (0, _vue.ref)();
217
+ let headerTempRef = (0, _vue.ref)(); // headerTemp组件Ref
218
+
218
219
  (0, _vue.onMounted)(() => {
219
220
  (0, _util.updatePosition)(boxRef.value, props);
220
221
  (0, _vue.watch)(() => props.position, (newVal, oldVal) => {
@@ -257,6 +258,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
257
258
  headerTemp.value = (0, _util.createHeaderTemp)(boxRef.value, (0, _vue.toRefs)(props), headerTempRef, "webgl.pointCloudStyleSettings");
258
259
  }
259
260
  };
261
+
262
+ // 获取分类渲染列表的初始默认配置
260
263
  function getInitRenderList() {
261
264
  return [{
262
265
  value: 0,
@@ -353,7 +356,11 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
353
356
  }];
354
357
  }
355
358
 
356
- //获取图片
359
+ /**
360
+ * @description 获取指定色带值对应的图片地址
361
+ * @param {String} value 色带值("0"/"1"/"2")
362
+ * @returns {String} 图片地址
363
+ */
357
364
  function getColorImage(value) {
358
365
  var imagePath = "";
359
366
  var image = colorImages.find(item => item.value === value);
@@ -362,7 +369,13 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
362
369
  }
363
370
  return imagePath;
364
371
  }
372
+
373
+ /**
374
+ * @description 表单参数变化处理
375
+ * @param {String} value 变化的字段名(layer/density/classificationRender/color/ribbonRender/minHeight/maxHeight/colorImage/colorOpacity/EDL/radius/strength)
376
+ */
365
377
  function paramsChanged(value) {
378
+ // 切换图层时重置表单参数
366
379
  if (value == "layer") reset();
367
380
  if (formItem.layerId || props.layerId) {
368
381
  switch (value) {
@@ -373,6 +386,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
373
386
  viewModel.setDensity(formItem.density);
374
387
  break;
375
388
  case "classificationRender":
389
+ // 开启分类渲染时关闭色带渲染(互斥)
376
390
  if (formItem.isClassificationRender && formItem.isRibbonRender) {
377
391
  formItem.isRibbonRender = false;
378
392
  viewModel.setRibbonRender(false);
@@ -383,6 +397,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
383
397
  viewModel.setClassificationRenderColor(renderList.value);
384
398
  break;
385
399
  case "ribbonRender":
400
+ // 开启色带渲染时关闭分类渲染(互斥)
386
401
  if (formItem.isRibbonRender && formItem.isClassificationRender) {
387
402
  formItem.isClassificationRender = false;
388
403
  viewModel.setClassificationRender(false);
@@ -390,6 +405,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
390
405
  viewModel.setRibbonRender(formItem.isRibbonRender);
391
406
  break;
392
407
  case "minHeight":
408
+ // 最小高度大于最大高度时同步调整最大高度
393
409
  if (formItem.minHeight > formItem.maxHeight) {
394
410
  formItem.maxHeight = formItem.minHeight;
395
411
  viewModel.setMaxHeight(formItem.maxHeight);
@@ -397,6 +413,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
397
413
  viewModel.setMinHeight(formItem.minHeight);
398
414
  break;
399
415
  case "maxHeight":
416
+ // 最小高度大于最大高度时同步调整最小高度
400
417
  if (formItem.minHeight > formItem.maxHeight) {
401
418
  formItem.minHeight = formItem.maxHeight;
402
419
  viewModel.setMinHeight(formItem.minHeight);
@@ -421,6 +438,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
421
438
  default:
422
439
  break;
423
440
  }
441
+
442
+ // 触发外部样式变化回调
424
443
  if (props.styleChanged) {
425
444
  let style = {
426
445
  density: 51 - formItem.density,
@@ -429,18 +448,21 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
429
448
  isEDL: formItem.isEDL
430
449
  };
431
450
  if (style.isClassificationRender) {
451
+ // 分类渲染:附带渲染列表和条件
432
452
  style.renderList = JSON.parse(JSON.stringify(renderList.value));
433
453
  if (viewModel?._tileset?.style?.color) {
434
454
  style.conditions = JSON.parse(JSON.stringify(viewModel._tileset.style.color._conditions));
435
455
  }
436
456
  }
437
457
  if (style.isRibbonRender) {
458
+ // 色带渲染:附带高度范围和颜色配置
438
459
  style.minHeight = formItem.minHeight;
439
460
  style.maxHeight = formItem.maxHeight;
440
461
  style.color = formItem.color;
441
462
  style.colorOpacity = formItem.colorOpacity;
442
463
  }
443
464
  if (style.isEDL) {
465
+ // EDL照明:附带半径和强度
444
466
  style.radius = formItem.radius;
445
467
  style.strength = formItem.strength;
446
468
  }
@@ -448,6 +470,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
448
470
  }
449
471
  }
450
472
  }
473
+
474
+ // 重置表单参数为默认值
451
475
  function reset() {
452
476
  formItem.density = 35;
453
477
  formItem.isClassificationRender = false;
@@ -461,6 +485,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
461
485
  formItem.radius = 1;
462
486
  formItem.strength = 1;
463
487
  }
488
+
489
+ // 清除选中图层样式
464
490
  function clear() {
465
491
  // reset();
466
492
  viewModel.clear();
@@ -938,6 +964,12 @@ var _constImage = __webpack_require__(4822);
938
964
 
939
965
  //点云样式设置逻辑类
940
966
  class PointCloudRenderViewModel {
967
+ // 当前选中的点云图层对象
968
+ /**
969
+ * @description 构造函数:初始化点云渲染视图模型
970
+ * @param {Object} scenceView 场景视图对象
971
+ * @param {Object} defaultOptions 默认参数对象
972
+ */
941
973
  constructor(scenceView, defaultOptions) {
942
974
  this._viewer = null;
943
975
  //三维viewer对象
@@ -948,9 +980,9 @@ class PointCloudRenderViewModel {
948
980
 
949
981
  // 查找所有3dtiles模型对象
950
982
  findLayers() {
951
- let tilesets = [];
983
+ const tilesets = [];
952
984
  const primitives = this._viewer.scene.primitives._primitives;
953
- let that = this;
985
+ const that = this;
954
986
  for (let m = 0; m < primitives.length; m++) {
955
987
  if (primitives[m] instanceof Cesium.Cesium3DTileset) {
956
988
  // 判断是否点云数据
@@ -967,15 +999,23 @@ class PointCloudRenderViewModel {
967
999
  }
968
1000
  return tilesets;
969
1001
  }
1002
+
1003
+ /**
1004
+ * @description 判断tileset是否为点云图层
1005
+ * @param {Object} tileset tileset对象
1006
+ * @returns {Boolean} 是否为点云图层
1007
+ */
970
1008
  isPointCloudLayer(tileset) {
971
1009
  let isPointCloud = false;
972
1010
  if (tileset.root) {
973
1011
  if (tileset.root._contentHeader) {
974
- let uri = tileset.root._contentHeader.uri;
1012
+ // 通过内容uri判断是否为.pnts点云文件
1013
+ const uri = tileset.root._contentHeader.uri;
975
1014
  if (uri && uri.indexOf('.pnts') > -1) {
976
1015
  isPointCloud = true;
977
1016
  }
978
1017
  } else if (tileset.root.content) {
1018
+ // 通过内容类型判断是否为空内容(视作点云)
979
1019
  if (tileset.root.content instanceof Cesium.Empty3DTileContent) {
980
1020
  isPointCloud = true;
981
1021
  }
@@ -984,30 +1024,44 @@ class PointCloudRenderViewModel {
984
1024
  return isPointCloud;
985
1025
  }
986
1026
 
1027
+ /**
1028
+ * @description 选择点云图层并同步表单参数
1029
+ * @param {String} layerId 图层guid
1030
+ * @param {Object} formItem 表单参数对象
1031
+ * @param {Object} renderList 分类渲染列表ref
1032
+ * @param {Boolean} isFly 是否飞行定位到图层
1033
+ */
987
1034
  // 选择点云图层
988
1035
  setLayer(layerId, formItem, renderList, isFly) {
989
1036
  this._tileset = this.findLayerById(layerId);
990
1037
  if (this._tileset) {
991
1038
  if (isFly) {
992
- let that = this;
1039
+ // 飞行定位到点云图层
1040
+ const that = this;
993
1041
  this._tileset.readyPromise.then(function (tileset) {
994
1042
  that._viewer.camera.flyToBoundingSphere(tileset.boundingSphere, {
995
1043
  offset: new Cesium.HeadingPitchRange(0.0, Cesium.Math.toRadians(-90.0), tileset.boundingSphere.radius * 2)
996
1044
  });
997
1045
  });
998
1046
  }
1047
+ // 同步密度参数
999
1048
  formItem.density = 51 - this._tileset.maximumScreenSpaceError;
1049
+
1050
+ // 已存在分类渲染列表时同步分类渲染状态
1000
1051
  if (this._tileset.classificationRenderList) {
1001
1052
  formItem.isClassificationRender = true;
1002
1053
  renderList.value = this._tileset.classificationRenderList;
1003
1054
  }
1055
+
1056
+ // 已存在色带渲染配置时同步色带渲染状态
1004
1057
  if (this._tileset.coloringPointCloud) {
1005
1058
  if (this._tileset.coloringPointCloud.enableColoring) {
1006
1059
  formItem.isRibbonRender = true;
1007
1060
  formItem.minHeight = this._tileset.coloringPointCloud.minHeight;
1008
1061
  formItem.maxHeight = this._tileset.coloringPointCloud.maxHeight;
1009
1062
  formItem.colorOpacity = this._tileset.coloringPointCloud.alpha;
1010
- let colorImage = this._tileset.coloringPointCloud.colorImage;
1063
+ // 根据色带图片url反推色带值
1064
+ const colorImage = this._tileset.coloringPointCloud.colorImage;
1011
1065
  if (colorImage == _constImage.RED_TO_PURPLE_URL) {
1012
1066
  formItem.color = '0';
1013
1067
  } else if (colorImage == _constImage.PURPLE_TO_YELLOW_URL) {
@@ -1017,13 +1071,19 @@ class PointCloudRenderViewModel {
1017
1071
  }
1018
1072
  }
1019
1073
  }
1074
+
1075
+ // 同步EDL照明参数
1020
1076
  formItem.isEDL = this._tileset.pointCloudShading.attenuation;
1021
1077
  formItem.radius = this._tileset.pointCloudShading.eyeDomeLightingRadius;
1022
1078
  formItem.strength = this._tileset.pointCloudShading.eyeDomeLightingStrength;
1023
1079
  }
1024
1080
  }
1025
1081
 
1026
- //根据id获取tileset对象
1082
+ /**
1083
+ * @description 根据id获取tileset对象
1084
+ * @param {String} id 图层guid
1085
+ * @returns {Object} tileset对象
1086
+ */
1027
1087
  findLayerById(id) {
1028
1088
  const primitives = this._viewer.scene.primitives._primitives;
1029
1089
  const tileset = primitives.find(function (item) {
@@ -1031,14 +1091,26 @@ class PointCloudRenderViewModel {
1031
1091
  });
1032
1092
  return tileset;
1033
1093
  }
1094
+
1095
+ /**
1096
+ * @description 设置点云密度
1097
+ * @param {Number} value 密度值
1098
+ */
1034
1099
  setDensity(value) {
1035
1100
  if (this._tileset) this._tileset.maximumScreenSpaceError = 51 - Number(value);
1036
1101
  }
1102
+
1103
+ /**
1104
+ * @description 设置是否启用分类渲染
1105
+ * @param {Boolean} value 是否启用分类渲染
1106
+ * @param {Array} renderList 分类渲染列表
1107
+ */
1037
1108
  setClassificationRender(value, renderList) {
1038
1109
  if (this._tileset) {
1039
1110
  if (value) {
1040
- let renderListCopy = JSON.parse(JSON.stringify(renderList));
1041
- let conditions = [];
1111
+ // 开启分类渲染:根据渲染列表构建3DTileStyle条件
1112
+ const renderListCopy = JSON.parse(JSON.stringify(renderList));
1113
+ const conditions = [];
1042
1114
  renderListCopy.forEach(render => {
1043
1115
  if (render.color) conditions.unshift(['${' + this._defaultOptions.renderField + '} ===' + render.value, 'color("' + render.color + '")']);
1044
1116
  });
@@ -1049,15 +1121,21 @@ class PointCloudRenderViewModel {
1049
1121
  });
1050
1122
  this._tileset.classificationRenderList = renderListCopy;
1051
1123
  } else {
1124
+ // 关闭分类渲染:清除样式
1052
1125
  this._tileset.style = null;
1053
1126
  this._tileset.classificationRenderList = null;
1054
1127
  }
1055
1128
  }
1056
1129
  }
1130
+
1131
+ /**
1132
+ * @description 设置分类渲染颜色
1133
+ * @param {Array} value 分类渲染列表
1134
+ */
1057
1135
  setClassificationRenderColor(value) {
1058
1136
  if (this._tileset) {
1059
- let renderList = JSON.parse(JSON.stringify(value));
1060
- let conditions = [];
1137
+ const renderList = JSON.parse(JSON.stringify(value));
1138
+ const conditions = [];
1061
1139
  renderList.forEach(render => {
1062
1140
  if (render.color) conditions.unshift(['${' + this._defaultOptions.renderField + '} ===' + render.value, 'color("' + render.color + '")']);
1063
1141
  });
@@ -1069,8 +1147,14 @@ class PointCloudRenderViewModel {
1069
1147
  this._tileset.classificationRenderList = renderList;
1070
1148
  }
1071
1149
  }
1150
+
1151
+ /**
1152
+ * @description 设置是否启用色带渲染(懒加载色带渲染对象)
1153
+ * @param {Boolean} value 是否启用色带渲染
1154
+ */
1072
1155
  setRibbonRender(value) {
1073
1156
  if (this._tileset) {
1157
+ // 不存在色带渲染对象时创建一个
1074
1158
  if (!this._tileset.coloringPointCloud) {
1075
1159
  this._tileset.coloringPointCloud = new Cesium.Kq3dColoringPointCloud({
1076
1160
  viewer: this._viewer,
@@ -1086,32 +1170,67 @@ class PointCloudRenderViewModel {
1086
1170
  this._tileset.coloringPointCloud.enableColoring = value;
1087
1171
  }
1088
1172
  }
1173
+
1174
+ /**
1175
+ * @description 设置色带渲染最小高度
1176
+ * @param {Number} value 最小高度
1177
+ */
1089
1178
  setMinHeight(value) {
1090
1179
  if (this._tileset && this._tileset.coloringPointCloud) {
1091
1180
  this._tileset.coloringPointCloud.minHeight = Number(value);
1092
1181
  }
1093
1182
  }
1183
+
1184
+ /**
1185
+ * @description 设置色带渲染最大高度
1186
+ * @param {Number} value 最大高度
1187
+ */
1094
1188
  setMaxHeight(value) {
1095
1189
  if (this._tileset && this._tileset.coloringPointCloud) {
1096
1190
  this._tileset.coloringPointCloud.maxHeight = Number(value);
1097
1191
  }
1098
1192
  }
1193
+
1194
+ /**
1195
+ * @description 设置色带渲染图片
1196
+ * @param {String} value 色带图片地址
1197
+ */
1099
1198
  setColorImage(value) {
1100
1199
  if (this._tileset && this._tileset.coloringPointCloud) {
1101
1200
  this._tileset.coloringPointCloud.colorImage = value;
1102
1201
  }
1103
1202
  }
1203
+
1204
+ /**
1205
+ * @description 设置色带渲染不透明度
1206
+ * @param {Number} value 不透明度(0-1)
1207
+ */
1104
1208
  setColorOpacity(value) {
1105
1209
  if (this._tileset && this._tileset.coloringPointCloud) {
1106
1210
  this._tileset.coloringPointCloud.alpha = Number(value);
1107
1211
  }
1108
1212
  }
1213
+
1214
+ /**
1215
+ * @description 设置是否启用EDL照明
1216
+ * @param {Boolean} value 是否启用EDL照明
1217
+ */
1109
1218
  setEDL(value) {
1110
1219
  if (this._tileset) this._tileset.pointCloudShading.attenuation = value;
1111
1220
  }
1221
+
1222
+ /**
1223
+ * @description 设置EDL照明半径
1224
+ * @param {Number} value 半径值
1225
+ */
1112
1226
  setRadius(value) {
1113
1227
  if (this._tileset) this._tileset.pointCloudShading.eyeDomeLightingRadius = Number(value);
1114
1228
  }
1229
+
1230
+ /**
1231
+ * @description 设置EDL照明强度
1232
+ * @param {Number} value 强度值
1233
+ */
1115
1234
  setStrength(value) {
1116
1235
  if (this._tileset) this._tileset.pointCloudShading.eyeDomeLightingStrength = Number(value);
1117
1236
  }
@@ -49,8 +49,14 @@ Object.defineProperty(exports, "__esModule", ({
49
49
  exports["default"] = void 0;
50
50
  class RadarScanAnalysisViewModel {
51
51
  // 扫描对象
52
+ /**
53
+ * @description 构造函数:初始化雷达扫描分析视图模型
54
+ * @param {Object} scenceView 场景视图对象
55
+ * @param {Object} option 表单参数对象
56
+ */
52
57
  constructor(scenceView, option) {
53
58
  this._viewer = null;
59
+ //三维viewer对象
54
60
  //参数
55
61
  this._options = {
56
62
  heading: 0,
@@ -82,6 +88,11 @@ class RadarScanAnalysisViewModel {
82
88
  Object.assign(this._options, option);
83
89
  this._drawManager = scenceView._drawManager;
84
90
  }
91
+ /**
92
+ * @description 获取颜色rgba值
93
+ * @param {Object} color Cesium.Color对象
94
+ * @returns {String} rgba颜色字符串
95
+ */
85
96
  //获取颜色rgba值
86
97
  getRgba(color) {
87
98
  var red = color.red * 255;
@@ -90,6 +101,12 @@ class RadarScanAnalysisViewModel {
90
101
  var alpha = color.alpha;
91
102
  return 'rgba(' + red + ',' + green + ',' + blue + ',' + alpha + ')';
92
103
  }
104
+ /**
105
+ * @description 渐变纹理
106
+ * @param {Array} values 渐变停止点位置数组
107
+ * @param {Boolean} isVertical 是否为垂直渐变
108
+ * @returns {HTMLCanvasElement} 渐变纹理canvas
109
+ */
93
110
  //渐变纹理
94
111
  getColorRamp(values, isVertical) {
95
112
  var sectorColor0 = Cesium.Color.fromCssColorString(this._options.sectorColor).withAlpha(.6);
@@ -104,9 +121,15 @@ class RadarScanAnalysisViewModel {
104
121
  grd.addColorStop(values[0], color0);
105
122
  grd.addColorStop(values[1], color1);
106
123
  ctx.fillStyle = grd;
124
+
125
+ // 垂直方向填充1x100,水平方向填充100x1
107
126
  if (isVertical) ctx.fillRect(0, 0, 1, 100);else ctx.fillRect(0, 0, 100, 1);
108
127
  return ramp;
109
128
  }
129
+ /**
130
+ * @description 参数切换
131
+ * @param {String} key 变化的字段名
132
+ */
110
133
  // 参数切换
111
134
  paramsChanged(key) {
112
135
  if (!this._radarScan) return;
@@ -136,6 +159,7 @@ class RadarScanAnalysisViewModel {
136
159
  this._radarScan.sectorOutlineColor = Cesium.Color.fromCssColorString(this._options.sectorOutlineColor).withAlpha(Number(this._options[key]));
137
160
  break;
138
161
  default:
162
+ // 默认:直接以数值形式赋值(如radius等)
139
163
  this._radarScan[key] = Number(this._options[key]);
140
164
  break;
141
165
  }
@@ -160,6 +184,7 @@ class RadarScanAnalysisViewModel {
160
184
  });
161
185
  //实例化
162
186
  if (!that._radarScan) {
187
+ // 不存在扫描对象时:创建新的RadarScan
163
188
  that._radarScan = new RadarScan({
164
189
  viewer: that._viewer,
165
190
  longitude: that._options.longitude,
@@ -175,6 +200,7 @@ class RadarScanAnalysisViewModel {
175
200
  sectorOutlineColor: Cesium.Color.fromCssColorString(that._options.sectorOutlineColor).withAlpha(that._options.sectorOutlineColorAlpha)
176
201
  });
177
202
  } else {
203
+ // 已存在扫描对象时:仅更新位置
178
204
  Object.assign(that._radarScan, {
179
205
  longitude: that._options.longitude,
180
206
  latitude: that._options.latitude
@@ -299,6 +325,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
299
325
  } = (0, _useGlobalConfig.useLocale)();
300
326
  // 获取组件传参
301
327
  const props = __props;
328
+
329
+ //雷达扫描分析表单参数
302
330
  let formItem = (0, _vue.reactive)({
303
331
  collapseValue: props?.settingParams?.collapseValue ?? "setting",
304
332
  // 默认展开属性设置
@@ -324,14 +352,15 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
324
352
  // 扇形颜色边框颜色
325
353
  sectorOutlineColorAlpha: props?.settingParams?.sectorOutlineColorAlpha ?? 0.9 // 扇形颜色边框透明度
326
354
  });
327
- let viewModel = null;
355
+ let viewModel = null; // 雷达扫描分析视图模型实例
328
356
 
329
357
  // 组件容器Ref
330
358
  let boxRef = (0, _vue.ref)(null);
331
359
 
332
360
  // 生成组件默认header
333
361
  let headerTemp = (0, _vue.ref)();
334
- let headerTempRef = (0, _vue.ref)();
362
+ let headerTempRef = (0, _vue.ref)(); // headerTemp组件Ref
363
+
335
364
  (0, _vue.onMounted)(() => {
336
365
  (0, _util.updatePosition)(boxRef.value, props);
337
366
  (0, _vue.watch)(() => props.position, (newVal, oldVal) => {
@@ -359,7 +388,10 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
359
388
  headerTemp.value = (0, _util.createHeaderTemp)(boxRef.value, (0, _vue.toRefs)(props), headerTempRef, "webgl.radarScanAnalysisTitle");
360
389
  }
361
390
  };
362
- // 切换参数
391
+ /**
392
+ * @description 切换参数处理
393
+ * @param {String} key 变化的字段名(radius/ellipsoidColor/ellipsoidColorAlpha/ellipsoidOutlineColor/ellipsoidOutlineColorAlpha/sectorColor/sectorColorAlpha/sectorOutlineColor/sectorOutlineColorAlpha)
394
+ */
363
395
  function paramsChanged(key) {
364
396
  if (!viewModel) return;
365
397
  viewModel._options[key] = formItem[key];
@@ -201,6 +201,10 @@ exports["default"] = void 0;
201
201
  // 重置视图
202
202
  class ResetViewViewModel {
203
203
  //三维viewer对象
204
+ /**
205
+ * @description 构造函数:初始化重置视图视图模型
206
+ * @param {Object} viewer 三维viewer对象
207
+ */
204
208
  constructor(viewer) {
205
209
  this._viewer = null;
206
210
  this._viewer = viewer;
@@ -309,8 +313,9 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
309
313
  locale
310
314
  } = (0, _useGlobalConfig.useLocale)();
311
315
  const props = __props;
312
- let viewModel = null;
313
- let btn = (0, _vue.ref)(null);
316
+ let viewModel = null; // 重置视图视图模型实例
317
+ let btn = (0, _vue.ref)(null); // 按钮Ref
318
+
314
319
  (0, _vue.onMounted)(() => {
315
320
  _gisUtils.utils.getWebMap(props.mapTarget, scenceView => {
316
321
  if (scenceView) {
@@ -318,7 +323,10 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
318
323
  }
319
324
  });
320
325
  });
321
- // 按钮点击事件
326
+ /**
327
+ * @description 按钮点击事件:失焦按钮并重置视角
328
+ * @param {Object} e 事件对象
329
+ */
322
330
  function btnClick(e) {
323
331
  btn.value.$el.blur();
324
332
  viewModel && viewModel.resetView();
@@ -440,11 +448,11 @@ Object.defineProperty(exports, "__esModule", ({
440
448
  value: true
441
449
  }));
442
450
  exports.kq_npm_client_leaflet_vue = exports.kq_npm_client_common_vue = exports.kq_npm_client3d_webgl_vue = void 0;
443
- let kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
451
+ const kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
444
452
  __webpack_require__.g.kq_npm_client_common_vue = kq_npm_client_common_vue;
445
- let kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
453
+ const kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
446
454
  __webpack_require__.g.kq_npm_client_leaflet_vue = kq_npm_client_leaflet_vue;
447
- let kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
455
+ const kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
448
456
  __webpack_require__.g.kq_npm_client3d_webgl_vue = kq_npm_client3d_webgl_vue;
449
457
 
450
458
  /***/ })