@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
@@ -102,11 +102,17 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
102
102
  lang,
103
103
  locale
104
104
  } = (0, _useGlobalConfig.useLocale)();
105
+ // 台风轨迹逻辑类
105
106
  let viewModel = null;
107
+ // 台风轨迹容器Ref
106
108
  let ref_box = (0, _vue.ref)();
109
+ // 当前选中台风行
107
110
  let currentRow = (0, _vue.ref)({});
111
+ // 当前播放台风行
108
112
  let currentPlay = (0, _vue.ref)({});
113
+ // 是否显示详情
109
114
  let showInfo = (0, _vue.ref)(false);
115
+ // 加载状态
110
116
  let loading = (0, _vue.ref)(false);
111
117
  // 获取组件传参
112
118
  const props = __props;
@@ -115,6 +121,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
115
121
 
116
122
  // 生成组件默认header
117
123
  let headerTemp = (0, _vue.ref)();
124
+ // header组件Ref
118
125
  let headerTempRef = (0, _vue.ref)();
119
126
  // 属性值
120
127
  let tableData = (0, _vue.ref)([]);
@@ -135,6 +142,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
135
142
  // 是否显示离线数据功能
136
143
  typhoonTracPath: props.settingParams?.typhoonTracPath ?? "" // 离线数据文件路径
137
144
  });
145
+
146
+ // 台风强度类型图例
138
147
  const strongType = [{
139
148
  name: t('webgl.tropicalPressure'),
140
149
  color: "#08F6A0, #00CF63"
@@ -154,6 +163,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
154
163
  name: t('webgl.superTyphoon'),
155
164
  color: "#FF636F, #FF0016"
156
165
  }];
166
+ // 台风路径线型图例(各国机构)
157
167
  const lineList = [{
158
168
  name: t('webgl.chinaTitle'),
159
169
  color: "#ff3c4e"
@@ -191,6 +201,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
191
201
  viewModel = new _TyphoonTracViewModel.default(scenceView);
192
202
  viewModel._language = locale;
193
203
  formItem.typhoonTracPath && getDataByPath();
204
+ // 存在外部接口时通过接口获取台风列表
194
205
  if (props.getTyphoonTracListByApi) {
195
206
  loading.value = true;
196
207
  props.getTyphoonTracListByApi(data => {
@@ -225,7 +236,10 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
225
236
  clear();
226
237
  }
227
238
  }
228
- // 选择文件
239
+ /**
240
+ * @description 选择文件
241
+ * @param {Object} file 文件对象
242
+ */
229
243
  function selectData(file) {
230
244
  let url = URL.createObjectURL(file.raw);
231
245
  formItem.typhoonTracPath = url;
@@ -234,15 +248,25 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
234
248
  currentPlay.value = {};
235
249
  formItem.collapseValue = "list";
236
250
  }
251
+ /**
252
+ * @description 表格时间列格式化
253
+ * @param {Object} row 行数据
254
+ * @returns {String} 格式化后的时间
255
+ */
237
256
  function formatterFun(row) {
238
257
  return formatDate(row.time);
239
258
  }
240
- // 显示台风
259
+ /**
260
+ * @description 显示/隐藏台风
261
+ * @param {Number} index 行索引
262
+ * @param {Object} row 行数据
263
+ */
241
264
  async function showTyphoon(index, row) {
242
265
  try {
243
266
  await getDataInfoByApi(row); // 等待回调完成
244
267
  row.show = !row.show;
245
268
  if (!row.show) {
269
+ // 隐藏时清除弹框并停止播放
246
270
  viewModel && viewModel.clearDivPoint(row.tfid);
247
271
  setTracStop(index, row);
248
272
  }
@@ -252,6 +276,11 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
252
276
  // 可以添加错误处理逻辑,例如显示错误提示
253
277
  }
254
278
  }
279
+ /**
280
+ * @description 设置台风详情信息
281
+ * @param {Number} index 行索引
282
+ * @param {Object} row 行数据
283
+ */
255
284
  async function setDatainfo(index, row) {
256
285
  try {
257
286
  await getDataInfoByApi(row);
@@ -264,6 +293,12 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
264
293
  // 可以添加错误处理逻辑,例如显示错误提示
265
294
  }
266
295
  }
296
+
297
+ /**
298
+ * @description 通过外部接口获取台风详情数据
299
+ * @param {Object} row 台风行数据
300
+ * @returns {Promise} Promise对象
301
+ */
267
302
  async function getDataInfoByApi(row) {
268
303
  // 条件判断提前返回
269
304
  if (!props.getDataInfoByApi || row.getInfoVis) {
@@ -312,6 +347,10 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
312
347
  };
313
348
  return dateFormats.MM + "-" + dateFormats.DD + " " + dateFormats.hh + "时";
314
349
  }
350
+ /**
351
+ * @description 表格单元格类名回调,给行列索引赋值
352
+ * @param {Object} param0 解构参数(row、column、rowIndex、columnIndex)
353
+ */
315
354
  function tableCellClassName({
316
355
  row,
317
356
  column,
@@ -323,13 +362,21 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
323
362
  row.index = rowIndex;
324
363
  column.index = columnIndex;
325
364
  }
365
+ /**
366
+ * @description 点击路径表格行
367
+ * @param {Object} row 行数据
368
+ */
326
369
  function rowClickPath(row) {
327
370
  viewModel && viewModel.clearDivPoint(currentRow.value.tfid);
328
371
  if (!currentRow.value.show) currentRow.value.show = true;
329
372
  if (currentRow.value.showPlayVis) setTracStop(row.index, currentRow.value);
330
373
  viewModel && viewModel.rowClickPath(row.index, currentRow.value);
331
374
  }
332
- // 播放
375
+ /**
376
+ * @description 播放台风轨迹
377
+ * @param {Number} index 行索引
378
+ * @param {Object} row 行数据
379
+ */
333
380
  async function setTracPlay(index, row) {
334
381
  try {
335
382
  await getDataInfoByApi(row); // 等待回调完成
@@ -342,7 +389,11 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
342
389
  // 可以添加错误处理逻辑,例如显示错误提示
343
390
  }
344
391
  }
345
- // 停止播放
392
+ /**
393
+ * @description 停止播放台风轨迹
394
+ * @param {Number} index 行索引
395
+ * @param {Object} row 行数据
396
+ */
346
397
  function setTracStop(index, row) {
347
398
  row.showPlayVis = false;
348
399
  viewModel && viewModel.stopPlayTyphoonTrac(row);
@@ -352,6 +403,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
352
403
  if (formItem && formItem.typhoonTracPath) {
353
404
  Cesium.Resource.fetchJson(formItem.typhoonTracPath).then(res => {
354
405
  if (res) {
406
+ // 数据为空时提示
355
407
  if (res.length === 0) {
356
408
  KqMessage({
357
409
  message: "features " + t('webgl.noDataMessage') + "!",
@@ -373,13 +425,17 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
373
425
  return;
374
426
  }
375
427
  }
376
- // 更新台风数据
428
+ /**
429
+ * @description 更新台风数据
430
+ * @param {Array} data 台风数据数组
431
+ */
377
432
  function setTyphoonTracData(data) {
378
433
  if (data && data.length && data.length > 0) {
379
434
  clear();
380
435
  tableData.value = data;
381
436
  }
382
437
  }
438
+ // 清除
383
439
  function clear() {
384
440
  viewModel && viewModel.clear();
385
441
  }
@@ -686,28 +742,44 @@ exports["default"] = void 0;
686
742
  */
687
743
  // 国际化
688
744
  class TyphoonTracViewModel {
745
+ // 播放事件监听器
746
+ /**
747
+ * @description 台风轨迹逻辑类构造函数
748
+ * @param {Object} scenceView 三维场景视图对象
749
+ */
689
750
  constructor(scenceView) {
690
751
  this._viewer = null;
691
752
  // 三维viewer对象
692
753
  this._language = null;
754
+ // 当前语言对象
693
755
  this._curTyphoon = [];
756
+ // 当前台风对象集合
694
757
  this.currentRow = null;
758
+ // 当前选中台风行
695
759
  this.divPoint = null;
760
+ // 浮动信息弹框
696
761
  this.eventListener = null;
762
+ // 悬停事件监听器
697
763
  this.eventListener2 = null;
698
764
  this._viewer = scenceView._viewer;
699
765
  this._viewer.postProcessStages.fxaa.enabled = true;
700
766
  // 开启深度检测
701
767
  this._viewer.scene.globe.depthTestAgainstTerrain = true;
702
768
  }
703
- // 控制台风显示
769
+ /**
770
+ * @description 控制台风显示
771
+ * @param {Object} row 台风行数据
772
+ * @param {Boolean} play 是否播放
773
+ */
704
774
  createTyphoonPath(row, play = false) {
705
775
  if (!this.warningLine_48) this.createWarningLine();
706
776
  let that = this;
707
777
  if (this._curTyphoon[row.tfid]) {
778
+ // 已存在台风对象则设置可见性
708
779
  this._curTyphoon[row.tfid].setVisible(row.show);
709
780
  row.show && this._curTyphoon[row.tfid].flyTo();
710
781
  } else {
782
+ // 不存在则创建台风对象并绑定事件
711
783
  let res = Object.assign({}, row);
712
784
  this._curTyphoon[row.tfid] = new Cesium.Kq3dTyphoon(this._viewer, {
713
785
  data: res
@@ -752,6 +824,7 @@ class TyphoonTracViewModel {
752
824
  }
753
825
  if (row.show) {
754
826
  if (play) {
827
+ // 播放前停止当前正在播放的台风
755
828
  if (this.currentRow && this.currentRow.tfid && this._curTyphoon[this.currentRow.tfid] && this._curTyphoon[this.currentRow.tfid].stop) {
756
829
  this._curTyphoon[this.currentRow.tfid].stop();
757
830
  }
@@ -760,14 +833,21 @@ class TyphoonTracViewModel {
760
833
  }
761
834
  this.currentRow = row;
762
835
  }
763
- // 获取
836
+ /**
837
+ * @description 获取弹框点数据(解析风圈半径)
838
+ * @param {Object} pointInfo 台风点信息
839
+ * @returns {Object} 处理后的点信息
840
+ */
764
841
  getDivPointData(pointInfo) {
765
842
  if (pointInfo.radius7) pointInfo.radius7Arr = pointInfo.radius7.split('|');
766
843
  if (pointInfo.radius10) pointInfo.radius10Arr = pointInfo.radius10.split('|');
767
844
  if (pointInfo.radius12) pointInfo.radius12Arr = pointInfo.radius12.split('|');
768
845
  return pointInfo;
769
846
  }
770
- // 创建台风属性弹框
847
+ /**
848
+ * @description 创建台风播放属性弹框
849
+ * @param {Object} data 台风点数据
850
+ */
771
851
  createInfoPlayDivPoint(data) {
772
852
  data = Object.assign(data, this.currentRow);
773
853
  if (this._curTyphoon[data.tfid].divPoint) {
@@ -782,7 +862,11 @@ class TyphoonTracViewModel {
782
862
  noEvent: false
783
863
  });
784
864
  }
785
- //点击展示详细信息
865
+ /**
866
+ * @description 点击展示详细信息
867
+ * @param {Number} index 点索引
868
+ * @param {Object} row 台风行数据
869
+ */
786
870
  rowClickPath(index, row) {
787
871
  if (!this._curTyphoon[row.tfid]) {
788
872
  row.show = true;
@@ -794,7 +878,10 @@ class TyphoonTracViewModel {
794
878
  this.createInfoDivPoint(this.getDivPointData(this._curTyphoon[row.tfid].positions[index]));
795
879
  }, 500);
796
880
  }
797
- // 创建浮动弹框属性
881
+ /**
882
+ * @description 创建浮动弹框属性
883
+ * @param {Object} data 台风点数据
884
+ */
798
885
  createInfoDivPoint(data) {
799
886
  if (this.divPoint) {
800
887
  this.divPoint.destroy();
@@ -816,7 +903,11 @@ class TyphoonTracViewModel {
816
903
  anchor: [-140, htmlObj.anchorY]
817
904
  });
818
905
  }
819
- // 创建html弹框内容
906
+ /**
907
+ * @description 创建html弹框内容
908
+ * @param {Object} data 台风点数据
909
+ * @returns {Object} html内容和锚点对象
910
+ */
820
911
  createHtml(data) {
821
912
  let anchorY = -215;
822
913
  let html = `<div class='kq3d-typhoon-trac-Info'>
@@ -874,12 +965,22 @@ class TyphoonTracViewModel {
874
965
  anchorY: anchorY
875
966
  };
876
967
  }
877
- // 动态插入时进行字符过滤
968
+ /**
969
+ * @description 动态插入时进行字符过滤
970
+ * @param {String} text 待过滤文本
971
+ * @returns {String} 过滤后的文本
972
+ */
878
973
  sanitize(text) {
879
974
  return text.replace(/[\u200B-\u200D\uFEFF]/g, "") // 清除零宽字符
880
975
  .replace(/[“”]/g, ""); // 主动过滤引号
881
976
  }
882
- // 日期矫正
977
+ /**
978
+ * @description 日期矫正格式化
979
+ * @param {Date|String|Number} date 日期
980
+ * @param {String} format 格式类型('date'/'datetime')
981
+ * @param {Boolean} isPad 是否补零
982
+ * @returns {String} 格式化后的日期字符串
983
+ */
883
984
  formatDate(date = new Date(), format = 'datetime', isPad = true) {
884
985
  if (!(date instanceof Date)) {
885
986
  date = new Date(date);
@@ -901,11 +1002,17 @@ class TyphoonTracViewModel {
901
1002
  };
902
1003
  return Object.keys(dateFormats).reduce((result, item) => result.replaceAll(item, dateFormats[item]), format);
903
1004
  }
904
- // 停止播放
1005
+ /**
1006
+ * @description 停止播放台风轨迹
1007
+ * @param {Object} row 台风行数据
1008
+ */
905
1009
  stopPlayTyphoonTrac(row) {
906
1010
  if (this._curTyphoon[row.tfid]) this._curTyphoon[row.tfid].stop();
907
1011
  }
908
- // 暂停播放
1012
+ /**
1013
+ * @description 暂停/继续播放台风轨迹
1014
+ * @param {Boolean} val 是否继续播放
1015
+ */
909
1016
  pausePlayTyphoonTrac(val) {
910
1017
  if (this._curTyphoon[this.currentRow.tfid]) this._curTyphoon[this.currentRow.tfid].flyTo();
911
1018
  if (val) {
@@ -914,7 +1021,10 @@ class TyphoonTracViewModel {
914
1021
  this._viewer.clock.shouldAnimate = false;
915
1022
  }
916
1023
  }
917
- // 设置时间流速
1024
+ /**
1025
+ * @description 设置时间流速
1026
+ * @param {Number} val 流速倍数
1027
+ */
918
1028
  setMultiplier(val) {
919
1029
  window.viewer.clock.multiplier = val || 1;
920
1030
  }
@@ -993,6 +1103,10 @@ class TyphoonTracViewModel {
993
1103
  }
994
1104
  });
995
1105
  }
1106
+ /**
1107
+ * @description 移除指定台风
1108
+ * @param {String} tfid 台风ID
1109
+ */
996
1110
  remove(tfid) {
997
1111
  if (this._curTyphoon[tfid] && this._curTyphoon[tfid].getHoverEvent) {
998
1112
  let hishoverEvent = this._curTyphoon[tfid].getHoverEvent();
@@ -1014,6 +1128,10 @@ class TyphoonTracViewModel {
1014
1128
  }
1015
1129
  this._curTyphoon[tfid] = null;
1016
1130
  }
1131
+ /**
1132
+ * @description 清除指定台风的弹框
1133
+ * @param {String} tfid 台风ID
1134
+ */
1017
1135
  clearDivPoint(tfid) {
1018
1136
  if (this._curTyphoon[tfid] && this._curTyphoon[tfid].divPoint) {
1019
1137
  this._curTyphoon[tfid].divPoint.destroy();
@@ -95,6 +95,10 @@ exports["default"] = void 0;
95
95
  */
96
96
  class UndergroundViewModel {
97
97
  // 地下模式三维管理对象
98
+ /**
99
+ * @description 构造函数,初始化地下模式管理对象
100
+ * @param {Object} viewer 三维viewer对象
101
+ */
98
102
  constructor(viewer) {
99
103
  this._viewer = null;
100
104
  // 三维viewer对象
@@ -102,6 +106,8 @@ class UndergroundViewModel {
102
106
  this._viewer = viewer;
103
107
  this._undergroundManager = new Cesium.Kq3dUndergroundManager(this._viewer.scene);
104
108
  }
109
+
110
+ // 开启地下模式
105
111
  open() {
106
112
  // this._viewer.scene.skyAtmosphere.show = false;
107
113
  // 关闭碰撞检测
@@ -184,8 +190,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
184
190
  const emit = __emit;
185
191
  //获取组件传参
186
192
  const props = __props;
187
- let isUndergroundMode = (0, _vue.ref)(false);
188
- let viewModel = null;
193
+ let isUndergroundMode = (0, _vue.ref)(false); // 地下模式开关状态
194
+ let viewModel = null; // 地下模式视图模型对象
189
195
 
190
196
  // 组件容器Ref
191
197
  let boxRef = (0, _vue.ref)(null);
@@ -98,8 +98,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
98
98
 
99
99
  // 获取组件传参
100
100
  const props = __props;
101
- const lonlatOffset = 0.00001;
102
- const heightOffset = 10.0;
101
+ const lonlatOffset = 0.00001; // 经纬度滑动条偏移量
102
+ const heightOffset = 10.0; // 高度滑动条偏移量
103
103
  let formItem = (0, _vue.reactive)({
104
104
  collapseValue: props?.settingParams?.collapseValue === "" ? "" : props?.settingParams?.collapseValue ?? "setting",
105
105
  // 默认展开属性设置
@@ -127,14 +127,15 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
127
127
  let showCoordinate = (0, _vue.ref)(false);
128
128
  // 显示朝向角俯仰角翻转角
129
129
  let showHpr = (0, _vue.ref)(false);
130
- let viewModel = null;
130
+ let viewModel = null; // 视频融合视图模型对象
131
131
 
132
132
  // 组件容器Ref
133
133
  let boxRef = (0, _vue.ref)(null);
134
134
 
135
135
  // 生成组件默认header
136
- let headerTemp = (0, _vue.ref)();
137
- let headerTempRef = (0, _vue.ref)();
136
+ let headerTemp = (0, _vue.ref)(); // 动态生成的Header组件
137
+ let headerTempRef = (0, _vue.ref)(); // Header组件Ref
138
+
138
139
  (0, _vue.onMounted)(() => {
139
140
  (0, _util.updatePosition)(boxRef.value, props);
140
141
  (0, _vue.watch)(() => props.position, (newVal, oldVal) => {
@@ -172,13 +173,21 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
172
173
  headerTemp.value = (0, _util.createHeaderTemp)(boxRef.value, (0, _vue.toRefs)(props), headerTempRef, "webgl.videoFusion");
173
174
  }
174
175
  };
176
+
177
+ /**
178
+ * @description 选择视频文件后获取本地访问URL并设置到视图模型
179
+ * @param {Object} file 上传的文件对象
180
+ */
175
181
  function selectVideo(file) {
176
182
  formItem.videoPath = file.name;
177
183
  let url = URL.createObjectURL(file.raw);
178
184
  viewModel.setVideoPath(url);
179
185
  }
180
186
 
181
- // 参数改变
187
+ /**
188
+ * @description 参数改变时根据类型调用对应的视图模型方法
189
+ * @param {String} key 改变的参数类型标识
190
+ */
182
191
  function paramsChanged(key) {
183
192
  switch (key) {
184
193
  case "videoPath":
@@ -211,6 +220,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
211
220
  case "longitude":
212
221
  case "latitude":
213
222
  case "height":
223
+ // 经纬度或高度变化时统一更新坐标
214
224
  viewModel.setPosition(formItem.longitude, formItem.latitude, formItem.height);
215
225
  break;
216
226
  default:
@@ -236,6 +246,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
236
246
  }
237
247
  }
238
248
  }
249
+
250
+ // 设置坐标滑动条范围
239
251
  function setCoordinate() {
240
252
  let coordinate = viewModel.getProjectCoordinate();
241
253
  if (coordinate) {
@@ -940,13 +952,19 @@ Object.defineProperty(exports, "__esModule", ({
940
952
  exports["default"] = void 0;
941
953
  var _message = _interopRequireDefault(__webpack_require__(71323));
942
954
  var _useGlobalConfig = __webpack_require__(22686);
943
- /*
944
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
945
- * All rights reserved.
955
+ /*
956
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
957
+ * All rights reserved.
946
958
  */
947
959
  //视频融合逻辑类
948
960
 
949
961
  class VideoFusiontViewModel {
962
+ //当前语言对象
963
+ /**
964
+ * @description 构造函数,初始化视频融合管理对象
965
+ * @param {Object} scenceView 场景视图对象,包含 _viewer 属性
966
+ * @param {Object} options 视频融合配置参数
967
+ */
950
968
  constructor(scenceView, options) {
951
969
  this._viewer = null;
952
970
  //三维viewer对象
@@ -955,6 +973,7 @@ class VideoFusiontViewModel {
955
973
  this._videoFusion = null;
956
974
  //视频融合对象
957
975
  this._videoFusionCollection = null;
976
+ //视频融合集合管理对象
958
977
  this._language = {};
959
978
  const {
960
979
  locale
@@ -965,7 +984,10 @@ class VideoFusiontViewModel {
965
984
  this._videoFusionCollection = new Cesium.Kq3dVideoFusionCollection(this._viewer);
966
985
  }
967
986
 
968
- // 融合
987
+ /**
988
+ * @description 执行视频融合,将视频投影到三维模型上
989
+ * @param {Function} cb 融合完成后的回调函数,接收布尔参数表示是否成功
990
+ */
969
991
  fusion(cb) {
970
992
  // 判断是否添加了模型
971
993
  var flag = false;
@@ -977,11 +999,12 @@ class VideoFusiontViewModel {
977
999
  }
978
1000
  if (flag) {
979
1001
  let type = 3;
980
- if (this._options.videoPath.indexOf('.m3u8') > 0) {
1002
+ // 判断视频流格式,m3u8使用类型5
1003
+ if (this._options.videoPath.indexOf('.m3u8') >= 0) {
981
1004
  type = 5;
982
1005
  }
983
1006
  this.clear();
984
- let cartographic = Cesium.Cartographic.fromCartesian(this._viewer.camera.positionWC);
1007
+ const cartographic = Cesium.Cartographic.fromCartesian(this._viewer.camera.positionWC);
985
1008
  this._options.heading = Cesium.Math.toDegrees(this._viewer.camera.heading);
986
1009
  this._options.pitch = Cesium.Math.toDegrees(this._viewer.camera.pitch);
987
1010
  this._options.roll = Cesium.Math.toDegrees(this._viewer.camera.roll);
@@ -1012,6 +1035,7 @@ class VideoFusiontViewModel {
1012
1035
  this._videoFusion = this._videoFusionCollection.addVideoTarget(param);
1013
1036
  typeof cb === "function" && cb(true);
1014
1037
  } else {
1038
+ // 未添加模型时给出提示
1015
1039
  (0, _message.default)({
1016
1040
  message: this._language.value.webgl["addModelFusionTips"],
1017
1041
  type: "warning"
@@ -1039,7 +1063,7 @@ class VideoFusiontViewModel {
1039
1063
  //飞入
1040
1064
  flyTo() {
1041
1065
  if (this._videoFusion) {
1042
- let position = Cesium.Cartesian3.fromDegrees(this._videoFusion.param.position.x, this._videoFusion.param.position.y, this._videoFusion.param.position.z);
1066
+ const position = Cesium.Cartesian3.fromDegrees(this._videoFusion.param.position.x, this._videoFusion.param.position.y, this._videoFusion.param.position.z);
1043
1067
  this._viewer.camera.flyTo({
1044
1068
  destination: position,
1045
1069
  orientation: {
@@ -1062,20 +1086,31 @@ class VideoFusiontViewModel {
1062
1086
  this._videoFusionCollection && this._videoFusionCollection.destroy();
1063
1087
  }
1064
1088
 
1065
- // 设置坐标
1089
+ /**
1090
+ * @description 设置视频融合的坐标位置
1091
+ * @param {Number} longitude 经度
1092
+ * @param {Number} latitude 纬度
1093
+ * @param {Number} height 高度
1094
+ */
1066
1095
  setPosition(longitude, latitude, height) {
1067
- let cameraPosition = Cesium.Cartesian3.fromDegrees(longitude, latitude, height);
1096
+ const cameraPosition = Cesium.Cartesian3.fromDegrees(longitude, latitude, height);
1068
1097
  this._videoFusion && this._videoFusionCollection.updateVideoTarget(this._videoFusion.id, {
1069
1098
  cameraPosition: cameraPosition
1070
1099
  });
1071
1100
  }
1072
1101
 
1073
- // 设置视频路径
1102
+ /**
1103
+ * @description 设置视频流路径
1104
+ * @param {String} val 视频流地址
1105
+ */
1074
1106
  setVideoPath(val) {
1075
1107
  this._options.videoPath = val;
1076
1108
  }
1077
1109
 
1078
- // 设置视场角度
1110
+ /**
1111
+ * @description 设置视场角度
1112
+ * @param {Number} val 视场角度值
1113
+ */
1079
1114
  setFov(val) {
1080
1115
  this._options.fov = Number(val);
1081
1116
  if (this._videoFusion) {
@@ -1085,17 +1120,23 @@ class VideoFusiontViewModel {
1085
1120
  }
1086
1121
  }
1087
1122
 
1088
- // 设置投影距离
1123
+ /**
1124
+ * @description 设置投影距离
1125
+ * @param {Number} val 投影距离值
1126
+ */
1089
1127
  setFar(val) {
1090
1128
  this._options.far = Number(val);
1091
1129
  if (this._videoFusion) this._videoFusion._changeFar(this._options.far);
1092
1130
  }
1093
1131
 
1094
- // 设置朝向角
1132
+ /**
1133
+ * @description 设置朝向角
1134
+ * @param {Number} val 朝向角度值
1135
+ */
1095
1136
  setHeading(val) {
1096
1137
  this._options.heading = Number(val);
1097
1138
  if (this._videoFusion) {
1098
- let param = this._videoFusion.param;
1139
+ const param = this._videoFusion.param;
1099
1140
  param.hpr.heading = this._options.heading;
1100
1141
  this._videoFusionCollection.updateVideoTarget(this._videoFusion.id, {
1101
1142
  position: param.position
@@ -1103,11 +1144,14 @@ class VideoFusiontViewModel {
1103
1144
  }
1104
1145
  }
1105
1146
 
1106
- // 设置俯仰角
1147
+ /**
1148
+ * @description 设置俯仰角
1149
+ * @param {Number} val 俯仰角度值
1150
+ */
1107
1151
  setPitch(val) {
1108
1152
  this._options.pitch = Number(val);
1109
1153
  if (this._videoFusion) {
1110
- let param = this._videoFusion.param;
1154
+ const param = this._videoFusion.param;
1111
1155
  param.hpr.pitch = this._options.pitch;
1112
1156
  this._videoFusionCollection.updateVideoTarget(this._videoFusion.id, {
1113
1157
  position: param.position
@@ -1115,11 +1159,14 @@ class VideoFusiontViewModel {
1115
1159
  }
1116
1160
  }
1117
1161
 
1118
- // 设置翻转角
1162
+ /**
1163
+ * @description 设置翻转角
1164
+ * @param {Number} val 翻转角度值
1165
+ */
1119
1166
  setRoll(val) {
1120
1167
  this._options.roll = Number(val);
1121
1168
  if (this._videoFusion) {
1122
- let param = this._videoFusion.param;
1169
+ const param = this._videoFusion.param;
1123
1170
  param.hpr.roll = this._options.roll;
1124
1171
  this._videoFusionCollection.updateVideoTarget(this._videoFusion.id, {
1125
1172
  position: param.position
@@ -1127,7 +1174,10 @@ class VideoFusiontViewModel {
1127
1174
  }
1128
1175
  }
1129
1176
 
1130
- // 设置透明度
1177
+ /**
1178
+ * @description 设置透明度
1179
+ * @param {Number} val 透明度值
1180
+ */
1131
1181
  setAlpha(val) {
1132
1182
  this._options.alpha = Number(val);
1133
1183
  if (this._videoFusion) {
@@ -1137,7 +1187,10 @@ class VideoFusiontViewModel {
1137
1187
  }
1138
1188
  }
1139
1189
 
1140
- // 设置羽化度
1190
+ /**
1191
+ * @description 设置羽化度
1192
+ * @param {Number} val 羽化度值
1193
+ */
1141
1194
  setEclosion(val) {
1142
1195
  this._options.eclosion = Number(val);
1143
1196
  if (this._videoFusion) {
@@ -1147,7 +1200,10 @@ class VideoFusiontViewModel {
1147
1200
  }
1148
1201
  }
1149
1202
 
1150
- // 显隐线框
1203
+ /**
1204
+ * @description 设置线框显隐
1205
+ * @param {Boolean} val 是否显示线框
1206
+ */
1151
1207
  showHideLine(val) {
1152
1208
  this._options.showHideLine = val;
1153
1209
  if (this._videoFusion) this._videoFusion.debugFrustum = val;
@@ -1166,11 +1222,11 @@ Object.defineProperty(exports, "__esModule", ({
1166
1222
  value: true
1167
1223
  }));
1168
1224
  exports.kq_npm_client_leaflet_vue = exports.kq_npm_client_common_vue = exports.kq_npm_client3d_webgl_vue = void 0;
1169
- let kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
1225
+ const kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
1170
1226
  __webpack_require__.g.kq_npm_client_common_vue = kq_npm_client_common_vue;
1171
- let kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
1227
+ const kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
1172
1228
  __webpack_require__.g.kq_npm_client_leaflet_vue = kq_npm_client_leaflet_vue;
1173
- let kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
1229
+ const kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
1174
1230
  __webpack_require__.g.kq_npm_client3d_webgl_vue = kq_npm_client3d_webgl_vue;
1175
1231
 
1176
1232
  /***/ })