@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
@@ -164,7 +164,10 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
164
164
  function sceneFigure() {
165
165
  viewModel && viewModel.sceneFigure();
166
166
  }
167
- // 参数联动
167
+ /**
168
+ * @description 参数联动,根据 key 调用 viewModel 更新对应配置项
169
+ * @param {String} key 参数键名
170
+ */
168
171
  function paramsChanged(key) {
169
172
  if (!viewModel) return;
170
173
  switch (key) {
@@ -430,6 +433,11 @@ exports["default"] = void 0;
430
433
  //截图逻辑类
431
434
  class ScreenshotViewModel {
432
435
  //截图三维对象
436
+ /**
437
+ * @description 构造函数,初始化截图视图模型
438
+ * @param {Object} viewer Cesium 视图对象
439
+ * @param {Object} options 截图配置参数
440
+ */
433
441
  constructor(viewer, options) {
434
442
  this._viewer = null;
435
443
  //三维viewer对象
@@ -454,9 +462,10 @@ class ScreenshotViewModel {
454
462
  viewer: viewer,
455
463
  canvas: viewer.scene.canvas
456
464
  });
457
- let that = this;
465
+ const that = this;
466
+ // 延迟加载并应用倾斜模型的样式
458
467
  setTimeout(() => {
459
- let tileset = this.findLayerByName(this._options.tilesetName);
468
+ const tileset = this.findLayerByName(this._options.tilesetName);
460
469
  if (tileset) {
461
470
  if (tileset instanceof Array && tileset.length > 0) {
462
471
  tileset[0].readyPromise.then(function (tileset) {
@@ -473,7 +482,7 @@ class ScreenshotViewModel {
473
482
 
474
483
  // 查找所有3dtiles模型对象
475
484
  findLayers() {
476
- let tilesets = [];
485
+ const tilesets = [];
477
486
  const primitives = this._viewer.scene.primitives._primitives;
478
487
  for (let m = 0; m < primitives.length; m++) {
479
488
  if (primitives[m] instanceof Cesium.Cesium3DTileset) {
@@ -512,7 +521,11 @@ class ScreenshotViewModel {
512
521
  });
513
522
  return base64;
514
523
  }
515
- //根据id获取tileset对象
524
+ /**
525
+ * @description 根据id获取tileset对象
526
+ * @param {String} name tileset 名称
527
+ * @returns {Object} tileset 对象
528
+ */
516
529
  findLayerByName(name) {
517
530
  const primitives = this._viewer.scene.primitives._primitives;
518
531
  const tileset = primitives.find(function (item) {
@@ -520,29 +533,49 @@ class ScreenshotViewModel {
520
533
  });
521
534
  return tileset;
522
535
  }
523
- //根据宽度计算高度
536
+ /**
537
+ * @description 根据宽度计算高度
538
+ * @param {Number} width 图片宽度
539
+ * @returns {Number} 计算得到的高度
540
+ */
524
541
  calcWidthByWindowRatio(width) {
525
542
  var r = this._viewer.scene.canvas.width / this._viewer.scene.canvas.height;
526
543
  return parseInt(width * r);
527
544
  }
528
- //根据高度计算宽度
545
+ /**
546
+ * @description 根据高度计算宽度
547
+ * @param {Number} height 图片高度
548
+ * @returns {Number} 计算得到的宽度
549
+ */
529
550
  calcHeightByWindowRatio(height) {
530
551
  var r = this._viewer.scene.canvas.width / this._viewer.scene.canvas.height;
531
552
  return parseInt(height / r);
532
553
  }
533
- // 锁定图片宽高比
554
+ /**
555
+ * @description 锁定图片宽高比
556
+ * @param {*} val 是否锁定宽高比
557
+ */
534
558
  setImgAspectRatio(val) {
535
559
  this._options.fixedRatio = val;
536
560
  }
537
- // 设置图片宽度
561
+ /**
562
+ * @description 设置图片宽度
563
+ * @param {*} val 图片宽度值
564
+ */
538
565
  setImgWidth(val) {
539
566
  this._options.width = val;
540
567
  }
541
- // 设置图片高度
568
+ /**
569
+ * @description 设置图片高度
570
+ * @param {*} val 图片高度值
571
+ */
542
572
  setImgHeight(val) {
543
573
  this._options.height = val;
544
574
  }
545
- // 设置图片类型
575
+ /**
576
+ * @description 设置图片类型
577
+ * @param {*} val 图片类型值
578
+ */
546
579
  setImgType(val) {
547
580
  this._options.imageType = val;
548
581
  }
@@ -355,6 +355,12 @@ var _useGlobalConfig = __webpack_require__(22686);
355
355
  // 国际化
356
356
 
357
357
  class ShadowAnalysisViewModel {
358
+ // 是否为复盘模式
359
+ /**
360
+ * @description 构造函数,初始化阴影分析视图模型
361
+ * @param {Object} scenceView 场景视图对象,包含 _viewer 与 _drawManager
362
+ * @param {Object} viewModel 表单参数对象,包含高度、时间、体素等配置
363
+ */
358
364
  constructor(scenceView, viewModel) {
359
365
  this._shadowAnalysis = null;
360
366
  //阴影分析三维对象
@@ -364,6 +370,7 @@ class ShadowAnalysisViewModel {
364
370
  _drawManager: null
365
371
  };
366
372
  this._language = null;
373
+ // 国际化语言对象
367
374
  this._isReappear = false;
368
375
  const {
369
376
  locale
@@ -394,6 +401,7 @@ class ShadowAnalysisViewModel {
394
401
  this._globaOptions.viewer.shadowMap.maxmimumDistance = 10000.0;
395
402
  this._globaOptions._drawManager = scenceView._drawManager;
396
403
  if (this._isReappear) {
404
+ // 复盘模式:从 localStorage 读取历史绘制点并重建分析
397
405
  let options = localStorage.getItem('ShadowAnalysis');
398
406
  if (options) {
399
407
  this._globaOptions.viewModel.positions = JSON.parse(options).positions;
@@ -401,7 +409,11 @@ class ShadowAnalysisViewModel {
401
409
  }
402
410
  }
403
411
  }
404
- // 处理绘制坐标,转成二维坐标
412
+ /**
413
+ * @description 处理绘制坐标,转成二维坐标
414
+ * @param {Array} points 笛卡尔坐标点数组
415
+ * @returns {Array} 二维坐标数组
416
+ */
405
417
  coordinateTransform(points) {
406
418
  let cutPoints = points.map(function (point) {
407
419
  let cartesPh = Cesium.Cartographic.fromCartesian(point);
@@ -428,6 +440,7 @@ class ShadowAnalysisViewModel {
428
440
  }
429
441
  }
430
442
  if (flag) {
443
+ // 场景中存在模型:启动多边形绘制交互
431
444
  if (this._globaOptions._drawManager) {
432
445
  this._globaOptions._drawManager.startDraw("polygon", {
433
446
  clampToGround: true
@@ -444,6 +457,7 @@ class ShadowAnalysisViewModel {
444
457
  }, "ShadowAnalysisDraw");
445
458
  }
446
459
  } else {
460
+ // 场景中无模型:提示用户先添加模型
447
461
  (0, _message.default)({
448
462
  message: this._language?.value?.webgl?.["addModelAnalysisTips"],
449
463
  type: "warning"
@@ -457,12 +471,18 @@ class ShadowAnalysisViewModel {
457
471
  this._shadowAnalysis = new window.Cesium.Kq3dShadowAnalyse(this._globaOptions.viewModel);
458
472
  //this._globaOptions.viewer.scene.primitives.add(this._shadowAnalysis);
459
473
  }
460
- // 分析日期
474
+ /**
475
+ * @description 分析日期
476
+ * @param {*} newValue 日期值
477
+ */
461
478
  setCurrentDate(newValue) {
462
479
  this._globaOptions.viewModel.currentDate = new Date(newValue);
463
480
  if (this._shadowAnalysis) this._shadowAnalysis.currentDate = new Date(newValue);
464
481
  }
465
- //设置时间
482
+ /**
483
+ * @description 设置时间区间
484
+ * @param {Array} newValue 时间区间数组 [开始时刻, 结束时刻]
485
+ */
466
486
  setTime(newValue) {
467
487
  if (newValue && newValue.length && newValue.length > 1) {
468
488
  if (this._globaOptions.viewModel.startTime == newValue[0] && this._globaOptions.viewModel.endTime == newValue[1]) return;
@@ -474,41 +494,62 @@ class ShadowAnalysisViewModel {
474
494
  }
475
495
  }
476
496
  }
477
- // 开始时刻
497
+ /**
498
+ * @description 开始时刻
499
+ * @param {*} newValue 开始时刻值
500
+ */
478
501
  setStartTime(newValue) {
479
502
  if (this._globaOptions.viewModel.startTime == newValue) return;
480
503
  this._globaOptions.viewModel.startTime = newValue;
481
504
  if (this._shadowAnalysis) this._shadowAnalysis.startTime = Number(newValue);
482
505
  }
483
- // 结束时刻
506
+ /**
507
+ * @description 结束时刻
508
+ * @param {*} newValue 结束时刻值
509
+ */
484
510
  setEndTime(newValue) {
485
511
  if (this._globaOptions.viewModel.endTime == newValue) return;
486
512
  this._globaOptions.viewModel.endTime = newValue;
487
513
  if (this._shadowAnalysis) this._shadowAnalysis.endTime = Number(newValue);
488
514
  }
489
- // 分析间隔
515
+ /**
516
+ * @description 分析间隔
517
+ * @param {*} newValue 时间间隔值
518
+ */
490
519
  setTimeSpacing(newValue) {
491
520
  if (this._globaOptions.viewModel.timeSpacing == newValue) return;
492
521
  this._globaOptions.viewModel.timeSpacing = newValue;
493
522
  if (this._shadowAnalysis) this._shadowAnalysis.timeSpacing = Number(newValue);
494
523
  }
495
- // 基底高度
524
+ /**
525
+ * @description 基底高度
526
+ * @param {*} newValue 基底高度值
527
+ */
496
528
  setBaseHeight(newValue) {
497
529
  if (this._globaOptions.viewModel.baseHeight == newValue) return;
498
530
  this._globaOptions.viewModel.baseHeight = newValue;
499
531
  if (this._shadowAnalysis) this._shadowAnalysis.baseHeight = Number(newValue);
500
532
  }
501
- // 拉伸高度
533
+ /**
534
+ * @description 拉伸高度
535
+ * @param {*} newValue 拉伸高度值
536
+ */
502
537
  setExtrudeHeight(newValue) {
503
538
  if (this._globaOptions.viewModel.extrudeHeight == newValue) return;
504
539
  this._globaOptions.viewModel.extrudeHeight = newValue;
505
540
  if (this._shadowAnalysis) this._shadowAnalysis.extrudeHeight = Number(newValue);
506
541
  }
507
- // 是否显示体素
542
+ /**
543
+ * @description 是否显示体素
544
+ * @param {Boolean} checked 是否显示
545
+ */
508
546
  setShowVoxel(checked) {
509
547
  if (this._shadowAnalysis) this._shadowAnalysis.voxel.show = checked;
510
548
  }
511
- // 体素大小
549
+ /**
550
+ * @description 体素大小
551
+ * @param {*} newValue 体素宽度值
552
+ */
512
553
  setRadius(newValue) {
513
554
  if (this._globaOptions.viewModel.width == newValue) return;
514
555
  this._globaOptions.viewModel.width = newValue;
@@ -517,7 +558,10 @@ class ShadowAnalysisViewModel {
517
558
  this.setKq3dShadowAnalyse();
518
559
  }
519
560
  }
520
- // 体素间距
561
+ /**
562
+ * @description 体素间距
563
+ * @param {*} newValue 体素间距值
564
+ */
521
565
  setSpacing(newValue) {
522
566
  if (this._globaOptions.viewModel.spacing == newValue) return;
523
567
  this._globaOptions.viewModel.spacing = newValue;
@@ -526,12 +570,18 @@ class ShadowAnalysisViewModel {
526
570
  this.setKq3dShadowAnalyse();
527
571
  }
528
572
  }
529
- // 阴影率过滤
573
+ /**
574
+ * @description 阴影率过滤
575
+ * @param {*} newValue 过滤值
576
+ */
530
577
  setFilterValue(newValue) {
531
578
  this._globaOptions.viewModel.filterValue = newValue;
532
579
  if (this._shadowAnalysis) this._shadowAnalysis.filterValue = Number(newValue);
533
580
  }
534
- // 透明缩放
581
+ /**
582
+ * @description 透明缩放
583
+ * @param {*} newValue 透明缩放值
584
+ */
535
585
  setAlphaScale(newValue) {
536
586
  this._globaOptions.viewModel.alphaScale = newValue;
537
587
  if (this._shadowAnalysis) this._shadowAnalysis.alphaScale = Number(newValue);
@@ -570,6 +620,7 @@ class ShadowAnalysisViewModel {
570
620
  // 销毁
571
621
  destroy() {
572
622
  if (this._shadowAnalysis && this._isReappear) {
623
+ // 复盘模式:保存当前分析参数到 localStorage 以便下次复盘
573
624
  let options = {
574
625
  baseHeight: this._globaOptions.viewModel.baseHeight,
575
626
  extrudeHeight: this._globaOptions.viewModel.extrudeHeight,
@@ -2399,14 +2450,23 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
2399
2450
  console.log(y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d));
2400
2451
  return y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
2401
2452
  }
2402
- // 日期改变
2453
+ /**
2454
+ * @description 日期改变,调用 viewModel 更新当前日期
2455
+ * @param {*} val 日期值
2456
+ */
2403
2457
  function changeDate(val) {
2404
2458
  console.log(formItem.currentDate);
2405
2459
  if (viewModel.setCurrentDate) viewModel.setCurrentDate(formItem.currentDate);
2406
2460
  }
2407
- // 改变时刻
2461
+ /**
2462
+ * @description 改变时刻
2463
+ * @param {*} val 时刻值
2464
+ */
2408
2465
  function changeTime(val) {}
2409
- // 参数改变
2466
+ /**
2467
+ * @description 参数改变,根据 key 调用 viewModel 更新对应配置项
2468
+ * @param {String} key 参数键名
2469
+ */
2410
2470
  function paramsChanged(key) {
2411
2471
  switch (key) {
2412
2472
  case "currentDate":
@@ -2880,11 +2940,11 @@ Object.defineProperty(exports, "__esModule", ({
2880
2940
  value: true
2881
2941
  }));
2882
2942
  exports.kq_npm_client_leaflet_vue = exports.kq_npm_client_common_vue = exports.kq_npm_client3d_webgl_vue = void 0;
2883
- let kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
2943
+ const kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
2884
2944
  __webpack_require__.g.kq_npm_client_common_vue = kq_npm_client_common_vue;
2885
- let kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
2945
+ const kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
2886
2946
  __webpack_require__.g.kq_npm_client_leaflet_vue = kq_npm_client_leaflet_vue;
2887
- let kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
2947
+ const kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
2888
2948
  __webpack_require__.g.kq_npm_client3d_webgl_vue = kq_npm_client3d_webgl_vue;
2889
2949
 
2890
2950
  /***/ })
@@ -608,14 +608,20 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
608
608
  collapseValue: props?.settingParams?.collapseValue === '' ? '' : props?.settingParams?.collapseValue ?? "setting",
609
609
  // 默认展开属性设置
610
610
  lineWidth: props?.settingParams?.lineWidth ?? 5,
611
+ // 线宽
611
612
  visibleColor: props?.settingParams?.visibleColor ?? "#00ff00",
613
+ // 可视颜色
612
614
  invisibleColor: props?.settingParams?.invisibleColor ?? "#ff0000",
615
+ // 不可视颜色
613
616
  obstacleColor: props?.settingParams?.obstacleColor ?? "#e6a23c",
617
+ // 障碍物颜色
614
618
  obstaclePoint: props?.settingParams?.obstaclePoint ?? false,
619
+ // 是否显示障碍点
615
620
  highlightObstacle: props?.settingParams?.highlightObstacle ?? false,
616
- isLabel: props?.settingParams?.isLabel ?? true
621
+ // 是否高亮障碍物
622
+ isLabel: props?.settingParams?.isLabel ?? true // 是否显示标注
617
623
  });
618
- let viewModel = null;
624
+ let viewModel = null; // 通视分析视图模型实例
619
625
 
620
626
  // 组件容器Ref
621
627
  let boxRef = (0, _vue.ref)(null);
@@ -668,6 +674,11 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
668
674
  headerTemp.value = (0, _util.createHeaderTemp)(boxRef.value, (0, _vue.toRefs)(props), headerTempRef, 'webgl.sightlineAnalysis');
669
675
  }
670
676
  };
677
+
678
+ /**
679
+ * @description 参数改变,根据 key 调用 viewModel 更新对应配置项
680
+ * @param {String} key 参数键名
681
+ */
671
682
  function paramsChanged(key) {
672
683
  switch (key) {
673
684
  // case "lineWidth":
@@ -1666,6 +1677,12 @@ var _message = _interopRequireDefault(__webpack_require__(71323));
1666
1677
 
1667
1678
  //通视分析逻辑类
1668
1679
  class SightlineAnalysisViewModel {
1680
+ // 是否为复盘模式
1681
+ /**
1682
+ * @description 构造函数,初始化通视分析视图模型
1683
+ * @param {Object} scenceView 场景视图对象,包含 _viewer 与 _drawManager
1684
+ * @param {Object} options 配置参数对象,包含颜色、标注、复盘等配置
1685
+ */
1669
1686
  constructor(scenceView, options) {
1670
1687
  this._viewer = null;
1671
1688
  //三维viewer对象
@@ -1688,6 +1705,7 @@ class SightlineAnalysisViewModel {
1688
1705
  this._billboards = [];
1689
1706
  // 点位图标billboards集合
1690
1707
  this._language = null;
1708
+ // 国际化语言对象
1691
1709
  this._isReappear = false;
1692
1710
  const {
1693
1711
  locale
@@ -1712,6 +1730,7 @@ class SightlineAnalysisViewModel {
1712
1730
  this._sightlineAnalysis = new Cesium.Kq3dSightAnalysis(options);
1713
1731
  this._drawManager = scenceView._drawManager;
1714
1732
  if (this._isReappear) {
1733
+ // 复盘模式:从 localStorage 读取历史观察点和目标点并重建分析
1715
1734
  let options = localStorage.getItem('SightlineAnalysis');
1716
1735
  if (options) {
1717
1736
  options = JSON.parse(options);
@@ -1730,7 +1749,10 @@ class SightlineAnalysisViewModel {
1730
1749
  }
1731
1750
  }
1732
1751
  }
1733
- // 创建图标
1752
+ /**
1753
+ * @description 创建图标
1754
+ * @param {Object} pos 图标位置的笛卡尔坐标
1755
+ */
1734
1756
  createBillboard(pos) {
1735
1757
  if (this._addType == 1) this.clearBillboards("marker" + this._addType);
1736
1758
  this._billboards.push(this._viewer.entities.add({
@@ -1743,7 +1765,10 @@ class SightlineAnalysisViewModel {
1743
1765
  }
1744
1766
  }));
1745
1767
  }
1746
- //创建点位置
1768
+ /**
1769
+ * @description 创建点位置(HTML 标签)
1770
+ * @param {Object} position 地理坐标点(含 longitude/latitude/height)
1771
+ */
1747
1772
  createDivPoint(position) {
1748
1773
  if (position) {
1749
1774
  var longitude = Cesium.Math.toDegrees(position.longitude).toFixed(5);
@@ -1785,7 +1810,10 @@ class SightlineAnalysisViewModel {
1785
1810
  }
1786
1811
  }
1787
1812
 
1788
- //创建label标签
1813
+ /**
1814
+ * @description 创建label标签
1815
+ * @param {Array} positions 地理坐标点数组
1816
+ */
1789
1817
  createLabels(positions) {
1790
1818
  for (let i = 0; i < positions.length; i++) {
1791
1819
  let include = this._cartographicList.some(item => {
@@ -1800,7 +1828,11 @@ class SightlineAnalysisViewModel {
1800
1828
  this._cartographicList = [].concat(positions);
1801
1829
  }
1802
1830
 
1803
- //设置3DTileset颜色
1831
+ /**
1832
+ * @description 设置3DTileset颜色
1833
+ * @param {Object} color Cesium 颜色对象
1834
+ * @param {Array} ids 需要着色的要素 id 集合
1835
+ */
1804
1836
  set3DTilesetColor(color, ids) {
1805
1837
  if (!ids) ids = [];
1806
1838
  let primitives = this._viewer.scene.primitives._primitives;
@@ -1818,7 +1850,10 @@ class SightlineAnalysisViewModel {
1818
1850
  }
1819
1851
  }
1820
1852
 
1821
- //高亮障碍物
1853
+ /**
1854
+ * @description 高亮障碍物
1855
+ * @param {Array} ids 障碍物要素 id 集合
1856
+ */
1822
1857
  highlightObstacles(ids) {
1823
1858
  if (!ids || ids.length === 0) return;
1824
1859
  this._highlightIds = ids;
@@ -1901,7 +1936,10 @@ class SightlineAnalysisViewModel {
1901
1936
  }
1902
1937
  this._pointCollection = [];
1903
1938
  }
1904
- // 清楚billboards
1939
+ /**
1940
+ * @description 清除billboards
1941
+ * @param {String} val 指定名称的 billboard;不传则清除全部
1942
+ */
1905
1943
  clearBillboards(val) {
1906
1944
  for (var i = 0; i < this._billboards.length; i++) {
1907
1945
  if (val) {
@@ -1925,6 +1963,7 @@ class SightlineAnalysisViewModel {
1925
1963
  //销毁
1926
1964
  destroy() {
1927
1965
  if (this._sightlineAnalysis.seePoint && this._isReappear) {
1966
+ // 复盘模式:保存当前观察点/目标点参数到 localStorage 以便下次复盘
1928
1967
  let options = {
1929
1968
  visibleColor: this._sightlineAnalysis.visibleColor.toCssColorString(),
1930
1969
  invisibleColor: this._sightlineAnalysis.invisibleColor.toCssColorString(),
@@ -1945,22 +1984,34 @@ class SightlineAnalysisViewModel {
1945
1984
  // setLineWidth(lineWith) {
1946
1985
  // this._sightlineAnalysis.lineWith = Number(lineWith);
1947
1986
  // }
1948
- //设置可视颜色
1987
+ /**
1988
+ * @description 设置可视颜色
1989
+ * @param {String} visibleColor 可视颜色的 CSS 颜色字符串
1990
+ */
1949
1991
  setVisibleColor(visibleColor) {
1950
1992
  this._sightlineAnalysis.visibleColor = Cesium.Color.fromCssColorString(visibleColor);
1951
1993
  }
1952
- //设置不可视颜色
1994
+ /**
1995
+ * @description 设置不可视颜色
1996
+ * @param {String} invisibleColor 不可视颜色的 CSS 颜色字符串
1997
+ */
1953
1998
  setInvisibleColor(invisibleColor) {
1954
1999
  this._sightlineAnalysis.invisibleColor = Cesium.Color.fromCssColorString(invisibleColor);
1955
2000
  }
1956
- //设置障碍物颜色
2001
+ /**
2002
+ * @description 设置障碍物颜色
2003
+ * @param {String} obstacleColor 障碍物颜色的 CSS 颜色字符串
2004
+ */
1957
2005
  setObstacleColor(obstacleColor) {
1958
2006
  this._obstacleColor = Cesium.Color.fromCssColorString(obstacleColor);
1959
2007
  if (this._highlightIds.length > 0) {
1960
2008
  this.set3DTilesetColor(this._obstacleColor, this._highlightIds);
1961
2009
  }
1962
2010
  }
1963
- //显示/隐藏标注
2011
+ /**
2012
+ * @description 显示/隐藏标注
2013
+ * @param {Boolean} isLabel 是否显示标注
2014
+ */
1964
2015
  setShowLabel(isLabel) {
1965
2016
  this._isLabel = isLabel;
1966
2017
  for (var i = 0; i < this._pointCollection.length; i++) {
@@ -2872,11 +2923,11 @@ Object.defineProperty(exports, "__esModule", ({
2872
2923
  value: true
2873
2924
  }));
2874
2925
  exports.kq_npm_client_leaflet_vue = exports.kq_npm_client_common_vue = exports.kq_npm_client3d_webgl_vue = void 0;
2875
- let kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
2926
+ const kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
2876
2927
  __webpack_require__.g.kq_npm_client_common_vue = kq_npm_client_common_vue;
2877
- let kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
2928
+ const kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
2878
2929
  __webpack_require__.g.kq_npm_client_leaflet_vue = kq_npm_client_leaflet_vue;
2879
- let kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
2930
+ const kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
2880
2931
  __webpack_require__.g.kq_npm_client3d_webgl_vue = kq_npm_client3d_webgl_vue;
2881
2932
 
2882
2933
  /***/ })
@@ -377,6 +377,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
377
377
 
378
378
  // 生成组件默认header
379
379
  let headerTemp = (0, _vue.ref)();
380
+ // header组件Ref
380
381
  let headerTempRef = (0, _vue.ref)();
381
382
 
382
383
  // 国际化
@@ -413,10 +414,13 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
413
414
 
414
415
  // 配置要观察的目标节点及其属性
415
416
  const targetNode = document.querySelector("html");
417
+ // MutationObserver配置:观察属性变化
416
418
  const config = {
417
419
  attributes: true
418
420
  };
419
421
  observer.observe(targetNode, config);
422
+
423
+ // 配置Echarts颜色样式(根据主题返回对应颜色)
420
424
  const setEchartsColor = () => {
421
425
  let style = {};
422
426
  let themeStyle = window.getComputedStyle(document.documentElement).getPropertyValue("color-scheme");
@@ -2245,6 +2249,7 @@ var _useGlobalConfig = __webpack_require__(22686);
2245
2249
  // 国际化
2246
2250
 
2247
2251
  class SkylineAnalysisViewModel {
2252
+ // 是否已提取天际线
2248
2253
  /**
2249
2254
  * 天际线分析逻辑类构造函数
2250
2255
  * @param {*} viewer 三维对象
@@ -2263,8 +2268,11 @@ class SkylineAnalysisViewModel {
2263
2268
  this._options = null;
2264
2269
  this._showLimitHeightBody = null;
2265
2270
  this._chartStyle = null;
2271
+ // echarts图表样式
2266
2272
  this._language = null;
2273
+ // 当前语言对象
2267
2274
  this._numberTruncation = null;
2275
+ // 二维天际线小数点截取位数
2268
2276
  this.isPickSkyLine = false;
2269
2277
  const {
2270
2278
  locale
@@ -2405,7 +2413,8 @@ class SkylineAnalysisViewModel {
2405
2413
  }
2406
2414
 
2407
2415
  /**
2408
- * 设置echarts图表样式
2416
+ * @description 设置echarts图表样式
2417
+ * @param {Object} style 图表样式对象(包含textColor、backgroundColor)
2409
2418
  */
2410
2419
  setChartStyle(style) {
2411
2420
  this._chartStyle = style;
@@ -2418,6 +2427,11 @@ class SkylineAnalysisViewModel {
2418
2427
  this._skylineAnalysisChart.setOption(option);
2419
2428
  }
2420
2429
  }
2430
+
2431
+ /**
2432
+ * @description 设置echarts图表标题
2433
+ * @param {String} title 图表标题文本
2434
+ */
2421
2435
  setChartTitle(title) {
2422
2436
  if (this._skylineAnalysisChart) {
2423
2437
  let option = this._skylineAnalysisChart.getOption();
@@ -2465,7 +2479,9 @@ class SkylineAnalysisViewModel {
2465
2479
  if (!radius) return;
2466
2480
  this._options.radius = radius;
2467
2481
  if (this._skylineAnalysis) this._skylineAnalysis.destroy();
2482
+ // 若已提取天际线则重新提取
2468
2483
  if (this.isPickSkyLine) this.pickSkyLine();
2484
+ // 若限高体已显示则重新绘制
2469
2485
  if (this._showLimitHeightBody) this.drawLimitHeightBody();
2470
2486
  // if (this._skylineAnalysis) this._skylineAnalysis.radius = radius;
2471
2487
  }
@@ -2579,11 +2595,11 @@ Object.defineProperty(exports, "__esModule", ({
2579
2595
  value: true
2580
2596
  }));
2581
2597
  exports.kq_npm_client_leaflet_vue = exports.kq_npm_client_common_vue = exports.kq_npm_client3d_webgl_vue = void 0;
2582
- let kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
2598
+ const kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
2583
2599
  __webpack_require__.g.kq_npm_client_common_vue = kq_npm_client_common_vue;
2584
- let kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
2600
+ const kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
2585
2601
  __webpack_require__.g.kq_npm_client_leaflet_vue = kq_npm_client_leaflet_vue;
2586
- let kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
2602
+ const kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
2587
2603
  __webpack_require__.g.kq_npm_client3d_webgl_vue = kq_npm_client3d_webgl_vue;
2588
2604
 
2589
2605
  /***/ })