@kq_npm/client3d_webgl_vue 4.0.9-beta → 4.1.0-beta

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.
@@ -68,11 +68,14 @@ class VideoProjectViewModel {
68
68
  project() {
69
69
  this.clear();
70
70
  let position = Cesium.Cartesian3.clone(this._viewer.camera.positionWC);
71
+ this._options.heading = this._viewer.camera.heading;
72
+ this._options.pitch = this._viewer.camera.pitch;
73
+ this._options.roll = this._viewer.camera.roll;
71
74
  let options = {
72
75
  position: position,
73
- heading: Cesium.Math.toRadians(this._options.heading),
74
- pitch: Cesium.Math.toRadians(this._options.pitch),
75
- roll: Cesium.Math.toRadians(this._options.roll),
76
+ heading: this._options.heading,
77
+ pitch: this._options.pitch,
78
+ roll: this._options.roll,
76
79
  fov: Cesium.Math.toRadians(this._options.fov),
77
80
  aspectRatio: this._options.aspectRatio,
78
81
  far: this._options.far,
@@ -101,6 +104,15 @@ class VideoProjectViewModel {
101
104
  height: cartographic.height
102
105
  };
103
106
  }
107
+ } // 获取HeadingPitchRoll
108
+
109
+
110
+ getHeadingPitchRoll() {
111
+ return {
112
+ heading: Math.round(Cesium.Math.toDegrees(this._options.heading)),
113
+ pitch: Math.round(Cesium.Math.toDegrees(this._options.pitch)),
114
+ roll: Math.round(Cesium.Math.toDegrees(this._options.roll))
115
+ };
104
116
  } //飞入
105
117
 
106
118
 
@@ -109,9 +121,9 @@ class VideoProjectViewModel {
109
121
  this._viewer.camera.flyTo({
110
122
  destination: this._projectVideo.position,
111
123
  orientation: {
112
- heading: Cesium.Math.toRadians(this._options.heading),
113
- pitch: Cesium.Math.toRadians(this._options.pitch),
114
- roll: Cesium.Math.toRadians(this._options.roll)
124
+ heading: this._options.heading,
125
+ pitch: this._options.pitch,
126
+ roll: this._options.roll
115
127
  }
116
128
  });
117
129
  }
@@ -435,9 +447,6 @@ const __default__ = {
435
447
  expose
436
448
  }) {
437
449
  const props = __props;
438
- const {
439
- proxy
440
- } = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)();
441
450
  let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)({});
442
451
  let collapseValue = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(""); // 获取组件传参
443
452
 
@@ -453,18 +462,20 @@ const __default__ = {
453
462
  height: 0,
454
463
  minHeight: -heightOffset,
455
464
  maxHeight: heightOffset,
465
+ heading: 0,
466
+ pitch: 0,
467
+ roll: 0,
456
468
  videoPath: props.settingParams && props.settingParams.videoPath || "",
457
469
  projectType: props.settingParams && props.settingParams.projectType || 1,
458
470
  fov: props.settingParams && props.settingParams.fov || 20,
459
471
  aspectRatio: props.settingParams && props.settingParams.aspectRatio || 1.6,
460
472
  far: props.settingParams && props.settingParams.far || 50,
461
- heading: props.settingParams && props.settingParams.heading || 330,
462
- pitch: props.settingParams && props.settingParams.pitch || -12,
463
- roll: props.settingParams && props.settingParams.roll || 0,
464
473
  showHideLine: props.settingParams && props.settingParams.showHideLine !== undefined || true
465
474
  }); // 显示坐标
466
475
 
467
- let showCoordinate = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
476
+ let showCoordinate = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false); // 显示朝向角俯仰角翻转角
477
+
478
+ let showHpr = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
468
479
  let viewModel = null; // 组件容器Ref
469
480
 
470
481
  let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null); // 生成组件默认header
@@ -499,9 +510,6 @@ const __default__ = {
499
510
  fov: formItem.fov,
500
511
  aspectRatio: formItem.aspectRatio,
501
512
  far: formItem.far,
502
- heading: formItem.heading,
503
- pitch: formItem.pitch,
504
- roll: formItem.roll,
505
513
  showHideLine: formItem.showHideLine
506
514
  };
507
515
  viewModel = new VideoProjectViewModel/* default */.Z(scenceView, options);
@@ -586,9 +594,11 @@ const __default__ = {
586
594
  if (viewModel) {
587
595
  viewModel.project();
588
596
  setCoordinate();
597
+ serHpr();
589
598
  }
590
599
  }
591
- }
600
+ } // 设置坐标
601
+
592
602
 
593
603
  function setCoordinate() {
594
604
  let coordinate = viewModel.getProjectCoordinate();
@@ -605,6 +615,18 @@ const __default__ = {
605
615
  formItem.maxHeight = coordinate.height + heightOffset;
606
616
  showCoordinate.value = true;
607
617
  }
618
+ } // 设置朝向角俯仰角翻转角
619
+
620
+
621
+ function serHpr() {
622
+ let hpr = viewModel.getHeadingPitchRoll();
623
+
624
+ if (hpr) {
625
+ formItem.heading = hpr.heading;
626
+ formItem.pitch = hpr.pitch;
627
+ formItem.roll = hpr.roll;
628
+ showHpr.value = true;
629
+ }
608
630
  } // 飞入
609
631
 
610
632
 
@@ -615,6 +637,7 @@ const __default__ = {
615
637
 
616
638
  function clearResult() {
617
639
  showCoordinate.value = false;
640
+ showHpr.value = false;
618
641
  viewModel && viewModel.clear();
619
642
  } // 销毁
620
643
 
@@ -1136,7 +1159,7 @@ const __default__ = {
1136
1159
  _: 1
1137
1160
  /* STABLE */
1138
1161
 
1139
- }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, null, {
1162
+ }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, null, {
1140
1163
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_form_item, {
1141
1164
  label: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).heading
1142
1165
  }, {
@@ -1192,7 +1215,9 @@ const __default__ = {
1192
1215
  _: 1
1193
1216
  /* STABLE */
1194
1217
 
1195
- }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, null, {
1218
+ }, 512
1219
+ /* NEED_PATCH */
1220
+ ), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showHpr)]]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, null, {
1196
1221
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_form_item, {
1197
1222
  label: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).pitch
1198
1223
  }, {
@@ -1248,7 +1273,9 @@ const __default__ = {
1248
1273
  _: 1
1249
1274
  /* STABLE */
1250
1275
 
1251
- }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, null, {
1276
+ }, 512
1277
+ /* NEED_PATCH */
1278
+ ), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showHpr)]]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, null, {
1252
1279
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_form_item, {
1253
1280
  label: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).roll
1254
1281
  }, {
@@ -1304,7 +1331,9 @@ const __default__ = {
1304
1331
  _: 1
1305
1332
  /* STABLE */
1306
1333
 
1307
- }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, {
1334
+ }, 512
1335
+ /* NEED_PATCH */
1336
+ ), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showHpr)]]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, {
1308
1337
  style: {
1309
1338
  "margin-bottom": "8px"
1310
1339
  }