fl-web-component 2.0.9 → 2.0.10

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.
@@ -41877,13 +41877,6 @@ exports.Solarize = Solarize;
41877
41877
 
41878
41878
  /***/ }),
41879
41879
 
41880
- /***/ "7d26":
41881
- /***/ (function(module, exports, __webpack_require__) {
41882
-
41883
- // extracted by mini-css-extract-plugin
41884
-
41885
- /***/ }),
41886
-
41887
41880
  /***/ "7d2a":
41888
41881
  /***/ (function(module, exports, __webpack_require__) {
41889
41882
 
@@ -42564,13 +42557,6 @@ var isMac = exports.isMac = function isMac() {
42564
42557
 
42565
42558
  /***/ }),
42566
42559
 
42567
- /***/ "8292":
42568
- /***/ (function(module, exports, __webpack_require__) {
42569
-
42570
- // extracted by mini-css-extract-plugin
42571
-
42572
- /***/ }),
42573
-
42574
42560
  /***/ "83bc":
42575
42561
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
42576
42562
 
@@ -56503,7 +56489,7 @@ module.exports = document && document.documentElement;
56503
56489
  /***/ "9224":
56504
56490
  /***/ (function(module) {
56505
56491
 
56506
- module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.9\",\"scripts\":{\"postinstall\":\"patch-package\",\"tip1\":\"仅调试本组件不涉及业务组件,请执行dev\",\"dev\":\"vue-cli-service serve\",\"lint\":\"eslint \\\"{src,packages}/**/*.{vue,js}\\\" --fix\",\"prettier\":\"prettier --write \\\"packages/**/*.{js,css,less,scss,vue,html}\\\"\",\"=\":\"=============================================================\",\"tip2\":\"同时调试本组件与业务组件,请执行watch\",\"watch\":\"vue-cli-service build --watch --mode production --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build\":\"npm run lint && vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build:test\":\"vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"publish:base\":\"npm run build && npm publish --registry https://registry.npmjs.org/\",\"publish:beta:base\":\"npm run build && npm publish --tag beta --registry https://registry.npmjs.org/\",\"==\":\"=============================================================\",\"tip3\":\"发版注意: 【测试版执行publish:beta】【修改bug执行publish:fix】【新增功能执行publish:feat】【新特性执行publish:perf】\",\"publish:beta\":\"npm version prerelease --preid=beta && npm run publish:beta:base\",\"publish:fix\":\"npm version patch && npm run publish:base\",\"publish:feat\":\"npm version minor && npm run publish:base\",\"publish:perf\":\"npm version major && npm run publish:base\"},\"files\":[\"dist\",\"packages\",\"src\"],\"main\":\"dist/fl-web-component.common.js\",\"dependencies\":{\"camera-controls\":\"2.9.0\",\"core-js\":\"^3.42.0\",\"dxf-parser\":\"^1.1.2\",\"element-ui\":\"2.15.14\",\"fflate\":\"^0.8.2\",\"html2canvas\":\"^1.4.1\",\"jspdf\":\"^3.0.1\",\"konva\":\"^9.3.12\",\"lodash\":\"^4.17.21\",\"meshline\":\"^3.3.1\",\"regenerator-runtime\":\"^0.14.1\",\"svg-pan-zoom\":\"^3.6.2\",\"three\":\"^0.176.0\",\"three.path\":\"^1.0.1\",\"vue\":\"^2.6.11\"},\"devDependencies\":{\"@babel/core\":\"^7.12.16\",\"@babel/plugin-proposal-nullish-coalescing-operator\":\"^7.18.6\",\"@babel/plugin-proposal-optional-chaining\":\"^7.21.0\",\"@babel/preset-env\":\"^7.0.0\",\"@babel/runtime-corejs3\":\"^7.27.1\",\"@vue/cli-plugin-babel\":\"~4.4.0\",\"@vue/cli-plugin-eslint\":\"~4.4.0\",\"@vue/cli-service\":\"~4.4.0\",\"babel-eslint\":\"^10.1.0\",\"babel-loader\":\"^8.0.0\",\"copy-webpack-plugin\":\"^4.0.1\",\"eslint\":\"^6.7.2\",\"eslint-config-prettier\":\"^6.15.0\",\"eslint-plugin-prettier\":\"^3.4.1\",\"eslint-plugin-vue\":\"^6.2.2\",\"patch-package\":\"^6.4.7\",\"prettier\":\"^2.8.8\",\"sass\":\"1.32.13\",\"sass-loader\":\"10.1.1\",\"vue-template-compiler\":\"^2.6.11\",\"worker-loader\":\"^3.0.8\"},\"browserslist\":[\"> 1%\",\"last 2 versions\"]}");
56492
+ module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.10\",\"scripts\":{\"postinstall\":\"patch-package\",\"tip1\":\"仅调试本组件不涉及业务组件,请执行dev\",\"dev\":\"vue-cli-service serve\",\"lint\":\"eslint \\\"{src,packages}/**/*.{vue,js}\\\" --fix\",\"prettier\":\"prettier --write \\\"packages/**/*.{js,css,less,scss,vue,html}\\\"\",\"=\":\"=============================================================\",\"tip2\":\"同时调试本组件与业务组件,请执行watch\",\"watch\":\"vue-cli-service build --watch --mode production --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build\":\"npm run lint && vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build:test\":\"vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"publish:base\":\"npm run build && npm publish --registry https://registry.npmjs.org/\",\"publish:beta:base\":\"npm run build && npm publish --tag beta --registry https://registry.npmjs.org/\",\"==\":\"=============================================================\",\"tip3\":\"发版注意: 【测试版执行publish:beta】【修改bug执行publish:fix】【新增功能执行publish:feat】【新特性执行publish:perf】\",\"publish:beta\":\"npm version prerelease --preid=beta && npm run publish:beta:base\",\"publish:fix\":\"npm version patch && npm run publish:base\",\"publish:feat\":\"npm version minor && npm run publish:base\",\"publish:perf\":\"npm version major && npm run publish:base\"},\"files\":[\"dist\",\"packages\",\"src\"],\"main\":\"dist/fl-web-component.common.js\",\"dependencies\":{\"camera-controls\":\"2.9.0\",\"core-js\":\"^3.42.0\",\"dxf-parser\":\"^1.1.2\",\"element-ui\":\"2.15.14\",\"fflate\":\"^0.8.2\",\"html2canvas\":\"^1.4.1\",\"jspdf\":\"^3.0.1\",\"konva\":\"^9.3.12\",\"lodash\":\"^4.17.21\",\"meshline\":\"^3.3.1\",\"regenerator-runtime\":\"^0.14.1\",\"svg-pan-zoom\":\"^3.6.2\",\"three\":\"^0.176.0\",\"three.path\":\"^1.0.1\",\"vue\":\"^2.6.11\"},\"devDependencies\":{\"@babel/core\":\"^7.12.16\",\"@babel/plugin-proposal-nullish-coalescing-operator\":\"^7.18.6\",\"@babel/plugin-proposal-optional-chaining\":\"^7.21.0\",\"@babel/preset-env\":\"^7.0.0\",\"@babel/runtime-corejs3\":\"^7.27.1\",\"@vue/cli-plugin-babel\":\"~4.4.0\",\"@vue/cli-plugin-eslint\":\"~4.4.0\",\"@vue/cli-service\":\"~4.4.0\",\"babel-eslint\":\"^10.1.0\",\"babel-loader\":\"^8.0.0\",\"copy-webpack-plugin\":\"^4.0.1\",\"eslint\":\"^6.7.2\",\"eslint-config-prettier\":\"^6.15.0\",\"eslint-plugin-prettier\":\"^3.4.1\",\"eslint-plugin-vue\":\"^6.2.2\",\"patch-package\":\"^6.4.7\",\"prettier\":\"^2.8.8\",\"sass\":\"1.32.13\",\"sass-loader\":\"10.1.1\",\"vue-template-compiler\":\"^2.6.11\",\"worker-loader\":\"^3.0.8\"},\"browserslist\":[\"> 1%\",\"last 2 versions\"]}");
56507
56493
 
56508
56494
  /***/ }),
56509
56495
 
@@ -72061,17 +72047,6 @@ module.exports = /******/function (modules) {
72061
72047
  /******/
72062
72048
  });
72063
72049
 
72064
- /***/ }),
72065
-
72066
- /***/ "dd3d":
72067
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
72068
-
72069
- "use strict";
72070
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_1_id_a7768a4e_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7d26");
72071
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_1_id_a7768a4e_prod_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_1_id_a7768a4e_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
72072
- /* unused harmony reexport * */
72073
-
72074
-
72075
72050
  /***/ }),
72076
72051
 
72077
72052
  /***/ "df93":
@@ -72361,6 +72336,13 @@ module.exports = function (name) {
72361
72336
 
72362
72337
  /***/ }),
72363
72338
 
72339
+ /***/ "e2af":
72340
+ /***/ (function(module, exports, __webpack_require__) {
72341
+
72342
+ // extracted by mini-css-extract-plugin
72343
+
72344
+ /***/ }),
72345
+
72364
72346
  /***/ "e34a":
72365
72347
  /***/ (function(module, exports, __webpack_require__) {
72366
72348
 
@@ -76081,6 +76063,13 @@ if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
76081
76063
 
76082
76064
  /***/ }),
76083
76065
 
76066
+ /***/ "efb3":
76067
+ /***/ (function(module, exports, __webpack_require__) {
76068
+
76069
+ // extracted by mini-css-extract-plugin
76070
+
76071
+ /***/ }),
76072
+
76084
76073
  /***/ "f0b4":
76085
76074
  /***/ (function(module, exports, __webpack_require__) {
76086
76075
 
@@ -76347,6 +76336,17 @@ exports.default = {
76347
76336
  }
76348
76337
  };
76349
76338
 
76339
+ /***/ }),
76340
+
76341
+ /***/ "f2c8":
76342
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
76343
+
76344
+ "use strict";
76345
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_482a990d_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("efb3");
76346
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_482a990d_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_482a990d_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
76347
+ /* unused harmony reexport * */
76348
+
76349
+
76350
76350
  /***/ }),
76351
76351
 
76352
76352
  /***/ "f35c":
@@ -77279,6 +77279,17 @@ module.exports = /******/function (modules) {
77279
77279
  /******/
77280
77280
  });
77281
77281
 
77282
+ /***/ }),
77283
+
77284
+ /***/ "f478":
77285
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
77286
+
77287
+ "use strict";
77288
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_1_id_482a990d_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("e2af");
77289
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_1_id_482a990d_prod_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_1_id_482a990d_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
77290
+ /* unused harmony reexport * */
77291
+
77292
+
77282
77293
  /***/ }),
77283
77294
 
77284
77295
  /***/ "f494":
@@ -78630,8 +78641,8 @@ if (typeof window !== 'undefined') {
78630
78641
  // Indicate to webpack that this file can be concatenated
78631
78642
  /* harmony default export */ var setPublicPath = (null);
78632
78643
 
78633
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0c827d9c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/index.vue?vue&type=template&id=a7768a4e&scoped=true
78634
- var com_graphicsvue_type_template_id_a7768a4e_scoped_true_render = function render() {
78644
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"25a2ae8c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/index.vue?vue&type=template&id=482a990d&scoped=true
78645
+ var com_graphicsvue_type_template_id_482a990d_scoped_true_render = function render() {
78635
78646
  var _vm = this,
78636
78647
  _c = _vm._self._c;
78637
78648
  return _c('div', {
@@ -78643,7 +78654,7 @@ var com_graphicsvue_type_template_id_a7768a4e_scoped_true_render = function rend
78643
78654
  };
78644
78655
  var staticRenderFns = [];
78645
78656
 
78646
- // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=a7768a4e&scoped=true
78657
+ // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=482a990d&scoped=true
78647
78658
 
78648
78659
  // CONCATENATED MODULE: ./node_modules/camera-controls/dist/camera-controls.module.js
78649
78660
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
@@ -107044,7 +107055,7 @@ var measure_distance_MeasureDistance = function MeasureDistance(renderer, scene,
107044
107055
  this.width = width;
107045
107056
  this.height = height;
107046
107057
  this.firstTime = 0;
107047
-
107058
+ this.measureName = 'measureObj';
107048
107059
  // 创建一个辅助平面来捕获鼠标事件
107049
107060
  this.plane = new Plane(new Vector3(0, 0, 1), 0);
107050
107061
  };
@@ -107120,6 +107131,7 @@ measure_distance_MeasureDistance.prototype = {
107120
107131
  });
107121
107132
  var lineGeometry = new BufferGeometry().setFromPoints([p1, p2]);
107122
107133
  var line = new three_core_Line(lineGeometry, lineMaterial);
107134
+ line.name = this.measureName;
107123
107135
  line.renderOrder = 999;
107124
107136
  line.frustumCulled = false;
107125
107137
  return line;
@@ -107129,6 +107141,7 @@ measure_distance_MeasureDistance.prototype = {
107129
107141
  div.className = name;
107130
107142
  div.textContent = text;
107131
107143
  var divLabel = new CSS2DRenderer_CSS2DObject(div);
107144
+ divLabel.name = this.measureName;
107132
107145
  divLabel.position.set(position.x, position.y, position.z);
107133
107146
  return divLabel;
107134
107147
  },
@@ -107174,6 +107187,7 @@ measure_distance_MeasureDistance.prototype = {
107174
107187
  div.className = 'tips-label';
107175
107188
  div.textContent = label;
107176
107189
  var tipsLabel = new CSS2DRenderer_CSS2DObject(div);
107190
+ tipsLabel.name = this.measureName;
107177
107191
  tipsLabel.position.set(position.x + 0.1, position.y, position.z + 0.05);
107178
107192
  return tipsLabel;
107179
107193
  },
@@ -107181,6 +107195,7 @@ measure_distance_MeasureDistance.prototype = {
107181
107195
  this.firstTime = new Date().getTime();
107182
107196
  },
107183
107197
  click: function click(e) {
107198
+ console.log(measure_distance_this.points);
107184
107199
  var lastTime = new Date().getTime();
107185
107200
  if (lastTime - this.firstTime < 300) {
107186
107201
  if (measure_distance_this.isCompleted) {
@@ -107258,6 +107273,21 @@ measure_distance_MeasureDistance.prototype = {
107258
107273
  }
107259
107274
  this.renderer.domElement.style.cursor = 'pointer';
107260
107275
  },
107276
+ clear: function clear() {
107277
+ this.remove(this.points);
107278
+ this.remove(this.polyline);
107279
+ this.remove(this.labels);
107280
+ this.pointArray.splice(0);
107281
+ this.points.splice(0);
107282
+ this.polyline.splice(0);
107283
+ this.labels.splice(0);
107284
+ this.tempPoints = undefined;
107285
+ this.tempLabel = undefined;
107286
+ this.tempLine = undefined;
107287
+ this.scene.remove(this.tipsLabel);
107288
+ this.tipsLabel = undefined;
107289
+ this.firstTime = 0;
107290
+ },
107261
107291
  remove: function remove(array) {
107262
107292
  for (var index = 0; index < array.length; index++) {
107263
107293
  var element = array[index];
@@ -107311,7 +107341,7 @@ var measure_area_MeasureArea = function MeasureArea(renderer, scene, camera, wid
107311
107341
  this.width = width;
107312
107342
  this.height = height;
107313
107343
  this.firstTime = 0;
107314
-
107344
+ this.measureName = 'measureObj';
107315
107345
  // 创建一个辅助平面来捕获鼠标事件
107316
107346
  this.plane = new Plane(new Vector3(0, 0, 1), 0);
107317
107347
  };
@@ -107387,6 +107417,7 @@ measure_area_MeasureArea.prototype = {
107387
107417
  });
107388
107418
  var lineGeometry = new BufferGeometry().setFromPoints([p1, p2]);
107389
107419
  var line = new three_core_Line(lineGeometry, lineMaterial);
107420
+ line.name = this.measureName;
107390
107421
  line.renderOrder = 999;
107391
107422
  line.frustumCulled = false;
107392
107423
  return line;
@@ -107396,6 +107427,7 @@ measure_area_MeasureArea.prototype = {
107396
107427
  div.className = name;
107397
107428
  div.textContent = text;
107398
107429
  var divLabel = new CSS2DRenderer_CSS2DObject(div);
107430
+ divLabel.name = this.measureName;
107399
107431
  divLabel.position.set(position.x, position.y, position.z);
107400
107432
  return divLabel;
107401
107433
  },
@@ -107448,6 +107480,7 @@ measure_area_MeasureArea.prototype = {
107448
107480
  div.className = 'tips-label';
107449
107481
  div.textContent = label;
107450
107482
  var tipsLabel = new CSS2DRenderer_CSS2DObject(div);
107483
+ tipsLabel.name = this.measureName;
107451
107484
  tipsLabel.position.set(position.x + 0.1, position.y, position.z + 0.05);
107452
107485
  return tipsLabel;
107453
107486
  },
@@ -107535,6 +107568,21 @@ measure_area_MeasureArea.prototype = {
107535
107568
  }
107536
107569
  this.renderer.domElement.style.cursor = 'pointer';
107537
107570
  },
107571
+ clear: function clear() {
107572
+ this.remove(this.points);
107573
+ this.remove(this.polyline);
107574
+ this.remove(this.labels);
107575
+ this.remove(this.polygons);
107576
+ this.pointArray.splice(0);
107577
+ this.points.splice(0);
107578
+ this.polyline.splice(0);
107579
+ this.labels.splice(0);
107580
+ this.tempPoints = undefined;
107581
+ this.tempLabel = undefined;
107582
+ this.tempLine = undefined;
107583
+ this.scene.remove(this.tipsLabel);
107584
+ this.tipsLabel = undefined;
107585
+ },
107538
107586
  remove: function remove(array) {
107539
107587
  for (var index = 0; index < array.length; index++) {
107540
107588
  var element = array[index];
@@ -107585,11 +107633,13 @@ measure_area_MeasureArea.prototype = {
107585
107633
  color: 0xffffff,
107586
107634
  transparent: true,
107587
107635
  opacity: 0.5,
107588
- side: DoubleSide
107636
+ side: DoubleSide,
107637
+ name: this.measureName
107589
107638
  });
107590
107639
  var mesh = new Mesh(geom, material);
107591
107640
  mesh.frustumCulled = false;
107592
- mesh.name = 'polygonMesh';
107641
+ // mesh.name = 'polygonMesh';
107642
+ mesh.name = measure_area_this.measureName;
107593
107643
  measure_area_this.polygonMesh = mesh;
107594
107644
  measure_area_this.scene.add(mesh);
107595
107645
  measure_area_this.polygons.push(mesh);
@@ -107630,7 +107680,7 @@ var measure_angle_MeasureAngle = function MeasureAngle(renderer, scene, camera,
107630
107680
  this.firstTime = 0;
107631
107681
  // 创建一个辅助平面来捕获鼠标事件
107632
107682
  this.plane = new Plane(new Vector3(0, 0, 1), 0);
107633
-
107683
+ this.measureName = 'measureObj';
107634
107684
  // this.POINT_MATERIAL = new THREE.PointsMaterial({ color: 0xff5000, size: 1, opacity: 0.6, transparent: true, depthWrite: false, depthTest: false })
107635
107685
  // this.LINE_MATERIAL = new THREE.LineBasicMaterial({ color: 0xff0000, linewidth: 3, opacity: 0.8, transparent: true, side: THREE.DoubleSide, depthWrite: false, depthTest: false })
107636
107686
  };
@@ -107704,6 +107754,7 @@ measure_angle_MeasureAngle.prototype = {
107704
107754
  var geom = new SphereGeometry(config.size || 0.3, 28, 28);
107705
107755
  var sphere = new Mesh(geom, mesh);
107706
107756
  sphere.frustumCulled = false;
107757
+ sphere.name = this.measureName;
107707
107758
  sphere.position.set(pos.x, pos.y, pos.z);
107708
107759
  return sphere;
107709
107760
  },
@@ -107720,6 +107771,7 @@ measure_angle_MeasureAngle.prototype = {
107720
107771
  });
107721
107772
  var lineGeometry = new BufferGeometry().setFromPoints([p1, p2]);
107722
107773
  var line = new three_core_Line(lineGeometry, lineMaterial);
107774
+ line.name = this.measureName;
107723
107775
  line.renderOrder = 999;
107724
107776
  line.frustumCulled = false;
107725
107777
  return line;
@@ -107729,6 +107781,7 @@ measure_angle_MeasureAngle.prototype = {
107729
107781
  div.className = name;
107730
107782
  div.textContent = text;
107731
107783
  var divLabel = new CSS2DRenderer_CSS2DObject(div);
107784
+ divLabel.name = this.measureName;
107732
107785
  divLabel.position.set(position.x, position.y, position.z);
107733
107786
  return divLabel;
107734
107787
  },
@@ -107787,6 +107840,7 @@ measure_angle_MeasureAngle.prototype = {
107787
107840
  div.className = 'tips-label';
107788
107841
  div.textContent = label;
107789
107842
  var tipsLabel = new CSS2DRenderer_CSS2DObject(div);
107843
+ tipsLabel.name = this.measureName;
107790
107844
  tipsLabel.position.set(position.x + 0.1, position.y, position.z + 0.05);
107791
107845
  return tipsLabel;
107792
107846
  },
@@ -107871,6 +107925,22 @@ measure_angle_MeasureAngle.prototype = {
107871
107925
  }
107872
107926
  this.renderer.domElement.style.cursor = 'pointer';
107873
107927
  },
107928
+ clear: function clear() {
107929
+ this.remove(this.points);
107930
+ this.remove(this.polyline);
107931
+ this.remove(this.labels);
107932
+ this.remove(this.curves);
107933
+ this.pointArray.splice(0);
107934
+ this.points.splice(0);
107935
+ this.polyline.splice(0);
107936
+ this.labels.splice(0);
107937
+ this.curves.splice(0);
107938
+ this.tempPoints = undefined;
107939
+ this.tempLabel = undefined;
107940
+ this.tempLine = undefined;
107941
+ this.scene.remove(this.tipsLabel);
107942
+ this.tipsLabel = undefined;
107943
+ },
107874
107944
  remove: function remove(array) {
107875
107945
  for (var index = 0; index < array.length; index++) {
107876
107946
  var element = array[index];
@@ -107946,6 +108016,7 @@ var measure_height_MeasureHeight = function MeasureHeight(renderer, scene, camer
107946
108016
  this.height = height;
107947
108017
  this.firstTime = 0;
107948
108018
  this.plane = new Plane(new Vector3(0, 0, 1), 0);
108019
+ this.measureName = 'measureObj';
107949
108020
  };
107950
108021
  measure_height_MeasureHeight.prototype = {
107951
108022
  start: function start() {
@@ -108014,6 +108085,7 @@ measure_height_MeasureHeight.prototype = {
108014
108085
  });
108015
108086
  var lineGeometry = new BufferGeometry().setFromPoints([p1, p2]);
108016
108087
  var line = new three_core_Line(lineGeometry, lineMaterial);
108088
+ line.name = this.measureName;
108017
108089
  line.renderOrder = 999;
108018
108090
  line.frustumCulled = false;
108019
108091
  return line;
@@ -108023,6 +108095,7 @@ measure_height_MeasureHeight.prototype = {
108023
108095
  div.className = name;
108024
108096
  div.textContent = text;
108025
108097
  var divLabel = new CSS2DRenderer_CSS2DObject(div);
108098
+ divLabel.name = this.measureName;
108026
108099
  divLabel.position.set(position.x, position.y, position.z);
108027
108100
  return divLabel;
108028
108101
  },
@@ -108048,6 +108121,7 @@ measure_height_MeasureHeight.prototype = {
108048
108121
  div.className = 'tips-label';
108049
108122
  div.textContent = label;
108050
108123
  var tipsLabel = new CSS2DRenderer_CSS2DObject(div);
108124
+ tipsLabel.name = this.measureName;
108051
108125
  tipsLabel.position.set(position.x + 0.1, position.y, position.z + 0.05);
108052
108126
  return tipsLabel;
108053
108127
  },
@@ -108109,6 +108183,17 @@ measure_height_MeasureHeight.prototype = {
108109
108183
  this.firstTime = 0;
108110
108184
  }
108111
108185
  },
108186
+ clear: function clear() {
108187
+ this.remove(this.points);
108188
+ this.remove(this.polyline);
108189
+ this.remove(this.labels);
108190
+ this.pointArray.splice(0);
108191
+ this.points.splice(0);
108192
+ this.polyline.splice(0);
108193
+ this.labels.splice(0);
108194
+ this.scene.remove(this.tipsLabel);
108195
+ this.tipsLabel = undefined;
108196
+ },
108112
108197
  remove: function remove(array) {
108113
108198
  for (var index = 0; index < array.length; index++) {
108114
108199
  var element = array[index];
@@ -123817,8 +123902,10 @@ var isDebug = false || false === true;
123817
123902
  case 'color':
123818
123903
  targetObj.forEach(function (children) {
123819
123904
  if (children.isMesh) {
123820
- var _children$userData$in = children.userData.instancesMap.get(instanceId),
123821
- instanceIndex = _children$userData$in.instanceIndex;
123905
+ var _children$userData;
123906
+ var instanceInfo = (_children$userData = children.userData) === null || _children$userData === void 0 || (_children$userData = _children$userData.instancesMap) === null || _children$userData === void 0 ? void 0 : _children$userData.get(instanceId);
123907
+ if (!instanceInfo) return;
123908
+ var instanceIndex = instanceInfo.instanceIndex;
123822
123909
  children.setColorAt(instanceIndex, new _this25.THREE.Color(ele.attr[key]));
123823
123910
  children.instanceColor.needsUpdate = true;
123824
123911
  if (!_this25.isCurrentVisible(instanceId, children)) {
@@ -123854,6 +123941,7 @@ var isDebug = false || false === true;
123854
123941
  }
123855
123942
  targetObj.forEach(function (children) {
123856
123943
  var instanceInfo = children.userData.instancesMap.get(instanceId);
123944
+ if (!instanceInfo) return;
123857
123945
  var instanceIndex = instanceInfo.instanceIndex,
123858
123946
  copyMatrix = instanceInfo.copyMatrix;
123859
123947
  var nextVisible = requestedVisible && _this25.isSourceVisible(instanceId, children);
@@ -123876,9 +123964,11 @@ var isDebug = false || false === true;
123876
123964
  case 'opacity':
123877
123965
  targetObj.forEach(function (children) {
123878
123966
  if (children.isMesh) {
123967
+ var _children$userData2;
123879
123968
  var opacity = children.geometry.attributes.opacity.array;
123880
- var _children$userData$in2 = children.userData.instancesMap.get(instanceId),
123881
- instanceIndex = _children$userData$in2.instanceIndex;
123969
+ var instanceInfo = (_children$userData2 = children.userData) === null || _children$userData2 === void 0 || (_children$userData2 = _children$userData2.instancesMap) === null || _children$userData2 === void 0 ? void 0 : _children$userData2.get(instanceId);
123970
+ if (!instanceInfo) return;
123971
+ var instanceIndex = instanceInfo.instanceIndex;
123882
123972
  opacity[instanceIndex] = ele.attr[key];
123883
123973
  children.geometry.attributes.opacity.needsUpdate = true;
123884
123974
  }
@@ -123948,8 +124038,10 @@ var isDebug = false || false === true;
123948
124038
  var targetObj = this.getObjectByName(instanceId);
123949
124039
  targetObj.forEach(function (children) {
123950
124040
  if (children.isMesh) {
123951
- var _children$userData$in3 = children.userData.instancesMap.get(instanceId),
123952
- instanceIndex = _children$userData$in3.instanceIndex;
124041
+ var _children$userData3;
124042
+ var instanceInfo = (_children$userData3 = children.userData) === null || _children$userData3 === void 0 || (_children$userData3 = _children$userData3.instancesMap) === null || _children$userData3 === void 0 ? void 0 : _children$userData3.get(instanceId);
124043
+ if (!instanceInfo) return;
124044
+ var instanceIndex = instanceInfo.instanceIndex;
123953
124045
  if (!_this27.isSourceVisible(instanceId, children)) {
123954
124046
  _this27.removeOutlineObject(children, instanceIndex);
123955
124047
  return;
@@ -123974,8 +124066,10 @@ var isDebug = false || false === true;
123974
124066
  var targetObj = this.getObjectByName(instanceId);
123975
124067
  targetObj.forEach(function (children) {
123976
124068
  if (children.isMesh) {
123977
- var _children$userData$in4 = children.userData.instancesMap.get(instanceId),
123978
- instanceIndex = _children$userData$in4.instanceIndex;
124069
+ var _children$userData4;
124070
+ var instanceInfo = (_children$userData4 = children.userData) === null || _children$userData4 === void 0 || (_children$userData4 = _children$userData4.instancesMap) === null || _children$userData4 === void 0 ? void 0 : _children$userData4.get(instanceId);
124071
+ if (!instanceInfo) return;
124072
+ var instanceIndex = instanceInfo.instanceIndex;
123979
124073
  _this28.removeOutlineObject(children, instanceIndex);
123980
124074
  }
123981
124075
  });
@@ -124036,8 +124130,10 @@ var isDebug = false || false === true;
124036
124130
  case 'nColor':
124037
124131
  targetObj.forEach(function (children) {
124038
124132
  if (children.isMesh) {
124039
- var _children$userData$in5 = children.userData.instancesMap.get(instanceId),
124040
- instanceIndex = _children$userData$in5.instanceIndex;
124133
+ var _children$userData5;
124134
+ var instanceInfo = (_children$userData5 = children.userData) === null || _children$userData5 === void 0 || (_children$userData5 = _children$userData5.instancesMap) === null || _children$userData5 === void 0 ? void 0 : _children$userData5.get(instanceId);
124135
+ if (!instanceInfo) return;
124136
+ var instanceIndex = instanceInfo.instanceIndex;
124041
124137
  children.setColorAt(instanceIndex, children.material.userData['oColor']);
124042
124138
  children.instanceColor.needsUpdate = true;
124043
124139
  children.material.userData[key] = children.material.userData['oColor'];
@@ -124067,8 +124163,10 @@ var isDebug = false || false === true;
124067
124163
  case 'color':
124068
124164
  obj.forEach(function (children) {
124069
124165
  if (children.isMesh) {
124070
- var _children$userData$in6 = children.userData.instancesMap.get(instanceId),
124071
- instanceIndex = _children$userData$in6.instanceIndex;
124166
+ var _children$userData6;
124167
+ var instanceInfo = (_children$userData6 = children.userData) === null || _children$userData6 === void 0 || (_children$userData6 = _children$userData6.instancesMap) === null || _children$userData6 === void 0 ? void 0 : _children$userData6.get(instanceId);
124168
+ if (!instanceInfo) return;
124169
+ var instanceIndex = instanceInfo.instanceIndex;
124072
124170
  children.setColorAt(instanceIndex, children.material.userData.nColor);
124073
124171
  children.instanceColor.needsUpdate = true;
124074
124172
  if (_this31.outlinePass) {
@@ -124086,6 +124184,7 @@ var isDebug = false || false === true;
124086
124184
  {
124087
124185
  obj.forEach(function (children) {
124088
124186
  var instanceInfo = children.userData.instancesMap.get(instanceId);
124187
+ if (!instanceInfo) return;
124089
124188
  var instanceIndex = instanceInfo.instanceIndex,
124090
124189
  copyMatrix = instanceInfo.copyMatrix;
124091
124190
  if (_this31.isSourceVisible(instanceId, children)) {
@@ -124105,8 +124204,10 @@ var isDebug = false || false === true;
124105
124204
  case 'opacity':
124106
124205
  obj.forEach(function (children) {
124107
124206
  if (children.isMesh) {
124108
- var _children$userData$in7 = children.userData.instancesMap.get(instanceId),
124109
- instanceIndex = _children$userData$in7.instanceIndex;
124207
+ var _children$userData7;
124208
+ var instanceInfo = (_children$userData7 = children.userData) === null || _children$userData7 === void 0 || (_children$userData7 = _children$userData7.instancesMap) === null || _children$userData7 === void 0 ? void 0 : _children$userData7.get(instanceId);
124209
+ if (!instanceInfo) return;
124210
+ var instanceIndex = instanceInfo.instanceIndex;
124110
124211
  var opacity = children.geometry.attributes.opacity.array;
124111
124212
  opacity[instanceIndex] = children.material.userData.nOpacity;
124112
124213
  children.geometry.attributes.opacity.needsUpdate = true;
@@ -124284,13 +124385,31 @@ var isDebug = false || false === true;
124284
124385
  passType: 要过滤的类型,默认是group,不返回group类型的实体
124285
124386
  */
124286
124387
  getObjectByName: function getObjectByName(name) {
124388
+ var _this34 = this;
124287
124389
  var passType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'group';
124288
124390
  if (!this.scene) return [];
124391
+ if (Array.isArray(name)) {
124392
+ var result = [];
124393
+ var exist = new Set();
124394
+ name.forEach(function (item) {
124395
+ _this34.getObjectByName(item, passType).forEach(function (obj) {
124396
+ if (!obj || exist.has(obj.uuid)) return;
124397
+ exist.add(obj.uuid);
124398
+ result.push(obj);
124399
+ });
124400
+ });
124401
+ return result;
124402
+ }
124289
124403
  var object = [];
124404
+ var added = new Set();
124290
124405
  var instancedMeshProps = instanceToInstancedMeshMap.get(name);
124291
124406
  this.scene.traverse(function (item) {
124292
124407
  var tempName = instancedMeshProps ? instancedMeshProps.drawObjectId : name;
124293
- if (item.name == tempName && item.type.toLowerCase() != passType.toLowerCase()) {
124408
+ var itemType = item.type ? item.type.toLowerCase() : '';
124409
+ var isPassType = itemType == passType.toLowerCase();
124410
+ var hasTargetInstance = item.userData && item.userData.instancesMap instanceof Map && item.userData.instancesMap.has(name);
124411
+ if (!isPassType && (item.name == tempName || hasTargetInstance) && !added.has(item.uuid)) {
124412
+ added.add(item.uuid);
124294
124413
  object.push(item);
124295
124414
  }
124296
124415
  });
@@ -124311,12 +124430,12 @@ var isDebug = false || false === true;
124311
124430
  return modelState.colorConfig;
124312
124431
  },
124313
124432
  addBypassCullingModelIds: function addBypassCullingModelIds(modelIds) {
124314
- var _this34 = this;
124433
+ var _this35 = this;
124315
124434
  var modelState = this.noObserver ? this.noObserver.modelStateManager : this.modelStateManager;
124316
124435
  if (!modelIds) return;
124317
124436
  if (Array.isArray(modelIds)) {
124318
124437
  modelIds.forEach(function (id) {
124319
- var modelId = _this34.formatModelId(id);
124438
+ var modelId = _this35.formatModelId(id);
124320
124439
  modelState.bypassCullingModelIds.add(modelId);
124321
124440
  });
124322
124441
  } else {
@@ -124329,12 +124448,12 @@ var isDebug = false || false === true;
124329
124448
  return com_graphicsvue_type_script_lang_js_toConsumableArray(modelState.bypassCullingModelIds);
124330
124449
  },
124331
124450
  removeBypassCullingModelIds: function removeBypassCullingModelIds(modelIds) {
124332
- var _this35 = this;
124451
+ var _this36 = this;
124333
124452
  var modelState = this.noObserver ? this.noObserver.modelStateManager : this.modelStateManager;
124334
124453
  if (!modelIds) return;
124335
124454
  if (Array.isArray(modelIds)) {
124336
124455
  modelIds.forEach(function (id) {
124337
- var modelId = _this35.formatModelId(id);
124456
+ var modelId = _this36.formatModelId(id);
124338
124457
  modelState.bypassCullingModelIds.delete(modelId);
124339
124458
  });
124340
124459
  } else {
@@ -124348,7 +124467,7 @@ var isDebug = false || false === true;
124348
124467
  },
124349
124468
  // 通过id删除对象
124350
124469
  removeObjectById: function removeObjectById(id) {
124351
- var _this36 = this;
124470
+ var _this37 = this;
124352
124471
  if (!this.scene) return;
124353
124472
  var array = this.getObjectByName(id);
124354
124473
  array.forEach(function (item) {
@@ -124358,13 +124477,13 @@ var isDebug = false || false === true;
124358
124477
  if (item.isMesh) {
124359
124478
  item.clear();
124360
124479
  }
124361
- _this36.scene.remove(item);
124480
+ _this37.scene.remove(item);
124362
124481
  }
124363
124482
  });
124364
124483
  },
124365
124484
  // 通过名称删除对象
124366
124485
  removeObjectByName: function removeObjectByName(name) {
124367
- var _this37 = this;
124486
+ var _this38 = this;
124368
124487
  if (!this.scene) return;
124369
124488
  var array = this.getObjectByName(name);
124370
124489
  array.forEach(function (item) {
@@ -124373,17 +124492,17 @@ var isDebug = false || false === true;
124373
124492
  if (item.isMesh) {
124374
124493
  item.clear();
124375
124494
  }
124376
- if (_this37.scene) _this37.scene.remove(item);
124495
+ if (_this38.scene) _this38.scene.remove(item);
124377
124496
  });
124378
124497
  },
124379
124498
  // 删除场景中所有的实体
124380
124499
  removeAll: function removeAll() {
124381
- var _this38 = this;
124500
+ var _this39 = this;
124382
124501
  return new Promise(function (resolve) {
124383
- if (_this38.scene) {
124384
- _this38.removeAllCustomElements();
124385
- _this38.removeTraverse();
124386
- _this38.removeModelByDocumentId();
124502
+ if (_this39.scene) {
124503
+ _this39.removeAllCustomElements();
124504
+ _this39.removeTraverse();
124505
+ _this39.removeModelByDocumentId();
124387
124506
  resolve();
124388
124507
  } else {
124389
124508
  resolve();
@@ -124391,7 +124510,7 @@ var isDebug = false || false === true;
124391
124510
  });
124392
124511
  },
124393
124512
  removeTraverse: function removeTraverse() {
124394
- var _this39 = this;
124513
+ var _this40 = this;
124395
124514
  if (!this.modelGroup) return;
124396
124515
  var length = this.modelGroup.children.length;
124397
124516
  if (length > 0) {
@@ -124404,7 +124523,7 @@ var isDebug = false || false === true;
124404
124523
  item.clear();
124405
124524
  item.material = null;
124406
124525
  item.geometry = null;
124407
- _this39.modelGroup && _this39.modelGroup.remove(item);
124526
+ _this40.modelGroup && _this40.modelGroup.remove(item);
124408
124527
  item = null;
124409
124528
  }
124410
124529
  });
@@ -124421,7 +124540,7 @@ var isDebug = false || false === true;
124421
124540
  },
124422
124541
  // 销毁场景 释放内存
124423
124542
  destroyScene: function destroyScene() {
124424
- var _this40 = this;
124543
+ var _this41 = this;
124425
124544
  cancelAnimationFrame(this.animateId);
124426
124545
  this.disposeTransformControls();
124427
124546
  if (this.sceneCommandEventDisposers.length > 0) {
@@ -124436,11 +124555,11 @@ var isDebug = false || false === true;
124436
124555
  }
124437
124556
  if (this.noObserver && this.noObserver.outlineInstanceProxyMap) {
124438
124557
  this.noObserver.outlineInstanceProxyMap.forEach(function (proxy) {
124439
- if (_this40.outlinePass) {
124440
- var idx = _this40.outlinePass.selectedObjects.indexOf(proxy);
124441
- if (idx !== -1) _this40.outlinePass.selectedObjects.splice(idx, 1);
124558
+ if (_this41.outlinePass) {
124559
+ var idx = _this41.outlinePass.selectedObjects.indexOf(proxy);
124560
+ if (idx !== -1) _this41.outlinePass.selectedObjects.splice(idx, 1);
124442
124561
  }
124443
- if (_this40.scene) _this40.scene.remove(proxy);
124562
+ if (_this41.scene) _this41.scene.remove(proxy);
124444
124563
  if (proxy && proxy.material && proxy.material.dispose) proxy.material.dispose();
124445
124564
  });
124446
124565
  this.noObserver.outlineInstanceProxyMap.clear();
@@ -124552,11 +124671,11 @@ var isDebug = false || false === true;
124552
124671
  }
124553
124672
  */
124554
124673
  drawCurve: function drawCurve(params) {
124555
- var _this41 = this;
124674
+ var _this42 = this;
124556
124675
  this.removeObjectByName(params.name);
124557
124676
  var route = [];
124558
124677
  params.path.forEach(function (element) {
124559
- route.push(new _this41.THREE.Vector3(element.x, element.y, element.z));
124678
+ route.push(new _this42.THREE.Vector3(element.x, element.y, element.z));
124560
124679
  });
124561
124680
  if (route.length > 1) {
124562
124681
  this.curve = new this.THREE.CatmullRomCurve3(route);
@@ -124580,11 +124699,11 @@ var isDebug = false || false === true;
124580
124699
  }
124581
124700
  */
124582
124701
  drawTextureCurve: function drawTextureCurve(params) {
124583
- var _this42 = this;
124702
+ var _this43 = this;
124584
124703
  this.removeObjectByName(params.name);
124585
124704
  var route = [];
124586
124705
  params.path.forEach(function (element) {
124587
- route.push(new _this42.THREE.Vector3(element.x, element.y, element.z));
124706
+ route.push(new _this43.THREE.Vector3(element.x, element.y, element.z));
124588
124707
  });
124589
124708
  // 画曲线
124590
124709
  if (route.length > 1) {
@@ -124689,14 +124808,14 @@ var isDebug = false || false === true;
124689
124808
  * 参数val: 爆炸的值
124690
124809
  */
124691
124810
  globalBomb: function globalBomb(val) {
124692
- var _this43 = this;
124811
+ var _this44 = this;
124693
124812
  if (this.scene.children.length === 0) return;
124694
124813
  for (var i = 0; i < this.scene.children.length; i++) {
124695
124814
  console.log('this.scene', this.scene);
124696
124815
  this.scene.children[i].traverse(function (item) {
124697
124816
  if (!item.isMesh || !item.worldDir) return;
124698
124817
  // 爆炸公式
124699
- _this43.computedBomb(item, val);
124818
+ _this44.computedBomb(item, val);
124700
124819
  });
124701
124820
  }
124702
124821
  // this.timeRender();
@@ -124738,13 +124857,13 @@ var isDebug = false || false === true;
124738
124857
  return object.type === 'CSS2DObject' || object.type === 'TransformControlsRoot';
124739
124858
  },
124740
124859
  getGlobalClippingRoots: function getGlobalClippingRoots() {
124741
- var _this44 = this;
124860
+ var _this45 = this;
124742
124861
  if (this.modelGroup && this.modelGroup.children && this.modelGroup.children.length) {
124743
124862
  return [this.modelGroup];
124744
124863
  }
124745
124864
  if (!this.scene || !this.scene.children || this.scene.children.length === 0) return [];
124746
124865
  return this.scene.children.filter(function (child) {
124747
- return !_this44.isGlobalClippingExcludedNode(child);
124866
+ return !_this45.isGlobalClippingExcludedNode(child);
124748
124867
  });
124749
124868
  },
124750
124869
  getGlobalClippingBox: function getGlobalClippingBox() {
@@ -124932,6 +125051,22 @@ var isDebug = false || false === true;
124932
125051
  objClipp2 && (objClipp2[4].constant = -d);
124933
125052
  });
124934
125053
  },
125054
+ getFirstPersonMoveSpeed: function getFirstPersonMoveSpeed(customMoveSpeed) {
125055
+ var defaultMoveSpeed = 800;
125056
+ var minMoveSpeed = 300;
125057
+ var maxMoveSpeed = 2500;
125058
+ var optionMoveSpeed = Number.isFinite(customMoveSpeed) && customMoveSpeed > 0 ? customMoveSpeed : defaultMoveSpeed;
125059
+ var nextMoveSpeed = defaultMoveSpeed;
125060
+ if (this.sceneBoundingBox && this.sceneBoundingBox.isBox3 && !this.sceneBoundingBox.isEmpty()) {
125061
+ var size = this.sceneBoundingBox.getSize(new this.THREE.Vector3());
125062
+ var horizontalSpan = Math.max(size.x, size.z);
125063
+ if (Number.isFinite(horizontalSpan) && horizontalSpan > 0) {
125064
+ // 第一视角主要在水平面移动,优先使用场景水平范围估算移动速度
125065
+ nextMoveSpeed = horizontalSpan * 0.8;
125066
+ }
125067
+ }
125068
+ return Math.min(Math.max(nextMoveSpeed, minMoveSpeed), Math.min(maxMoveSpeed, optionMoveSpeed));
125069
+ },
124935
125070
  // 开启第一视角
124936
125071
  startFirstPer: function startFirstPer(options) {
124937
125072
  var _ref5 = options || {},
@@ -124939,7 +125074,7 @@ var isDebug = false || false === true;
124939
125074
  moveSpeed = _ref5$moveSpeed === void 0 ? 200 : _ref5$moveSpeed,
124940
125075
  _ref5$jumpSpeed = _ref5.jumpSpeed,
124941
125076
  jumpSpeed = _ref5$jumpSpeed === void 0 ? 200 : _ref5$jumpSpeed;
124942
- this.removeSpeed = moveSpeed;
125077
+ this.removeSpeed = this.getFirstPersonMoveSpeed(moveSpeed);
124943
125078
  this.upSpeed = jumpSpeed;
124944
125079
  this.clock = new this.THREE.Clock();
124945
125080
  this.downRaycaster = new this.THREE.Raycaster(new this.THREE.Vector3(), new this.THREE.Vector3(0, -1, 0), 0, 10);
@@ -124950,61 +125085,62 @@ var isDebug = false || false === true;
124950
125085
  },
124951
125086
  // 页面是否锁定
124952
125087
  initPointerLock: function initPointerLock() {
124953
- var _this45 = this;
125088
+ var _this46 = this;
124954
125089
  this.home();
124955
125090
  setTimeout(function () {
124956
125091
  // 开启第一视角时,将相机与水平面保持水平
124957
- _this45.camera.rotation.x = 0;
124958
- _this45.camera.rotation.z = 0;
124959
- _this45.pointControls = new PointerLockControls(_this45.camera, _this45.renderer.domElement);
124960
- _this45.pointControls.lock();
124961
- if (!_this45._onFirstPersonChange) {
124962
- _this45._onFirstPersonChange = function () {
124963
- if (typeof _this45._cameraChangeObserver === 'function') {
124964
- _this45._cameraChangeObserver('firstPerson');
125092
+ _this46.camera.rotation.x = 0;
125093
+ _this46.camera.rotation.z = 0;
125094
+ _this46.pointControls = new PointerLockControls(_this46.camera, _this46.renderer.domElement);
125095
+ _this46.pointControls.lock();
125096
+ if (!_this46._onFirstPersonChange) {
125097
+ _this46._onFirstPersonChange = function () {
125098
+ if (typeof _this46._cameraChangeObserver === 'function') {
125099
+ _this46._cameraChangeObserver('firstPerson');
124965
125100
  }
124966
125101
  };
124967
125102
  }
124968
125103
  try {
124969
- _this45.pointControls.addEventListener('change', _this45._onFirstPersonChange);
125104
+ _this46.pointControls.addEventListener('change', _this46._onFirstPersonChange);
124970
125105
  } catch (e) {}
124971
125106
  // 锁定
124972
- _this45.pointControls.addEventListener('lock', function () {
124973
- _this45.detachTransformControls();
124974
- _this45.cameraControls.enabled = false;
124975
- window.addEventListener('keydown', _this45.onKeyDown, false);
124976
- window.addEventListener('keyup', _this45.onKeyUp, false);
124977
- _this45.unbindScenePointerEvents();
124978
- if (typeof _this45._cameraChangeObserver === 'function') {
124979
- _this45._cameraChangeObserver('firstPersonLock');
125107
+ _this46.pointControls.addEventListener('lock', function () {
125108
+ _this46.detachTransformControls();
125109
+ _this46.cameraControls.enabled = false;
125110
+ window.addEventListener('keydown', _this46.onKeyDown, false);
125111
+ window.addEventListener('keyup', _this46.onKeyUp, false);
125112
+ _this46.unbindScenePointerEvents();
125113
+ if (typeof _this46._cameraChangeObserver === 'function') {
125114
+ _this46._cameraChangeObserver('firstPersonLock');
124980
125115
  }
124981
125116
  });
124982
125117
  // 解锁
124983
- _this45.pointControls.addEventListener('unlock', function () {
124984
- _this45.firstPerSign = false;
124985
- _this45.cameraControls.enabled = true;
125118
+ _this46.pointControls.addEventListener('unlock', function () {
125119
+ _this46.firstPerSign = false;
125120
+ _this46.cameraControls.enabled = true;
125121
+ console.log(_this46.cameraControls);
124986
125122
  // 返回初始视角
124987
- _this45.home();
125123
+ _this46.home();
124988
125124
  try {
124989
- if (_this45._onFirstPersonChange && _this45.pointControls) {
124990
- _this45.pointControls.removeEventListener('change', _this45._onFirstPersonChange);
125125
+ if (_this46._onFirstPersonChange && _this46.pointControls) {
125126
+ _this46.pointControls.removeEventListener('change', _this46._onFirstPersonChange);
124991
125127
  }
124992
125128
  } catch (e) {}
124993
- if (_this45.noObserver) {
124994
- _this45.noObserver._firstPersonLastPos = null;
125129
+ if (_this46.noObserver) {
125130
+ _this46.noObserver._firstPersonLastPos = null;
124995
125131
  }
124996
125132
  setTimeout(function () {
124997
- window.removeEventListener('keydown', _this45.onKeyDown);
124998
- window.removeEventListener('keyup', _this45.onKeyUp);
124999
- _this45.bindScenePointerEvents();
125000
- _this45.ensureTransformSelectionValid();
125133
+ window.removeEventListener('keydown', _this46.onKeyDown);
125134
+ window.removeEventListener('keyup', _this46.onKeyUp);
125135
+ _this46.bindScenePointerEvents();
125136
+ _this46.ensureTransformSelectionValid();
125001
125137
  // this.timeRender()
125002
125138
  }, 0);
125003
- if (typeof _this45._cameraChangeObserver === 'function') {
125004
- _this45._cameraChangeObserver('firstPersonUnlock');
125139
+ if (typeof _this46._cameraChangeObserver === 'function') {
125140
+ _this46._cameraChangeObserver('firstPersonUnlock');
125005
125141
  }
125006
125142
  });
125007
- if (_this45.scene) _this45.scene.add(_this45.pointControls.object);
125143
+ if (_this46.scene) _this46.scene.add(_this46.pointControls.object);
125008
125144
  }, 10);
125009
125145
  },
125010
125146
  // 第一视角运动
@@ -125038,8 +125174,8 @@ var isDebug = false || false === true;
125038
125174
  this.canJump = true;
125039
125175
  }
125040
125176
  // 根据速度值移动控制器
125041
- this.pointControls.this.moveRight(-this.velocity.x * delta);
125042
- this.pointControls.this.moveForward(-this.velocity.z * delta);
125177
+ this.pointControls.moveRight(-this.velocity.x * delta);
125178
+ this.pointControls.moveForward(-this.velocity.z * delta);
125043
125179
  control.position.y += this.velocity.y * delta;
125044
125180
  // 保证控制器的y轴在平面上
125045
125181
  if (control.position.y < 3 - 0 / 10) {
@@ -125089,9 +125225,9 @@ var isDebug = false || false === true;
125089
125225
  break;
125090
125226
  // 跳跃
125091
125227
  case 32:
125092
- if (this.canJump && spaceUp) this.velocity.y += this.upSpeed;
125228
+ if (this.canJump && this.spaceUp) this.velocity.y += this.upSpeed;
125093
125229
  this.canJump = false;
125094
- spaceUp = false;
125230
+ this.spaceUp = false;
125095
125231
  break;
125096
125232
  }
125097
125233
  },
@@ -125121,7 +125257,7 @@ var isDebug = false || false === true;
125121
125257
  break;
125122
125258
  // 跳跃
125123
125259
  case 32:
125124
- spaceUp = true;
125260
+ this.spaceUp = true;
125125
125261
  break;
125126
125262
  }
125127
125263
  },
@@ -125152,8 +125288,9 @@ var isDebug = false || false === true;
125152
125288
  参数: type: '', distance、area、angle、height, 暂时只提供距离、面积、角度、高度这四种方式
125153
125289
  */
125154
125290
  openMeasure: function openMeasure(type) {
125291
+ var isClear = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
125155
125292
  if (this.threeMeasure) {
125156
- this.threeMeasure.close(false);
125293
+ this.threeMeasure.close(isClear);
125157
125294
  this.threeMeasure = null;
125158
125295
  }
125159
125296
  this.measureFlag = true;
@@ -125190,6 +125327,21 @@ var isDebug = false || false === true;
125190
125327
  // 移除键盘事件监听器
125191
125328
  document.removeEventListener('keydown', this.handleMeasureKeyDown, false);
125192
125329
  },
125330
+ // 增加一个清除所有测量结果的方法 使用统一名字的
125331
+ clearMeasureByName: function clearMeasureByName() {
125332
+ var _this47 = this;
125333
+ var list = this.getObjectByName('measureObj');
125334
+ list.forEach(function (item) {
125335
+ if (item.geometry) {
125336
+ item.geometry.dispose();
125337
+ item.material.dispose();
125338
+ }
125339
+ if (_this47.scene) _this47.scene.remove(item);
125340
+ });
125341
+ if (this.threeMeasure) {
125342
+ this.threeMeasure.clear();
125343
+ }
125344
+ },
125193
125345
  handleMeasureKeyDown: function handleMeasureKeyDown(event) {
125194
125346
  // 检查是否按下了ESC键
125195
125347
  var keyParam = {
@@ -125251,12 +125403,12 @@ var isDebug = false || false === true;
125251
125403
  参数: object, 目标实体,
125252
125404
  */
125253
125405
  isolate: function isolate(object) {
125254
- var _this46 = this;
125406
+ var _this48 = this;
125255
125407
  if (!this.scene) return;
125256
125408
  // 隔离 将目标实体以外的实体隐藏掉
125257
125409
  this.scene.traverse(function (item) {
125258
125410
  if (item.isMesh && item.name !== object.name) {
125259
- var offsetMatrix = new _this46.THREE.Matrix4().copy(item.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
125411
+ var offsetMatrix = new _this48.THREE.Matrix4().copy(item.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
125260
125412
  item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
125261
125413
  item.instanceMatrix.needsUpdate = true;
125262
125414
  }
@@ -125264,7 +125416,7 @@ var isDebug = false || false === true;
125264
125416
  },
125265
125417
  // 还原操作 将修改过的实体进行恢复
125266
125418
  restore: function restore() {
125267
- var _this47 = this;
125419
+ var _this49 = this;
125268
125420
  if (!this.scene) return;
125269
125421
  this.scene.traverse(function (item) {
125270
125422
  if (item.isMesh) {
@@ -125286,20 +125438,20 @@ var isDebug = false || false === true;
125286
125438
  item.userData.translateMatrixInvert = null;
125287
125439
  }
125288
125440
  if (item.userData.combineMatrixInvert) {
125289
- _this47.rotateMesh(item, {
125441
+ _this49.rotateMesh(item, {
125290
125442
  x: 0,
125291
125443
  y: 0,
125292
125444
  z: 0
125293
125445
  });
125294
125446
  item.userData.combineMatrixInvert = null;
125295
125447
  }
125296
- var copyMatrix = _this47.getInstanceCopyMatrix(item, instanceId);
125448
+ var copyMatrix = _this49.getInstanceCopyMatrix(item, instanceId);
125297
125449
  if (!copyMatrix) return;
125298
- var sourceHidden = _this47.isSourceHiddenInstance(item, instanceId);
125299
- var offsetMatrix = new _this47.THREE.Matrix4().copy(copyMatrix);
125450
+ var sourceHidden = _this49.isSourceHiddenInstance(item, instanceId);
125451
+ var offsetMatrix = new _this49.THREE.Matrix4().copy(copyMatrix);
125300
125452
  if (sourceHidden) {
125301
125453
  offsetMatrix.makeTranslation(9999999, 9999999, 9999999);
125302
- _this47.removeOutlineInstanceProxy(item, item.userData.instanceIndex);
125454
+ _this49.removeOutlineInstanceProxy(item, item.userData.instanceIndex);
125303
125455
  }
125304
125456
  item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
125305
125457
  item.instanceMatrix.needsUpdate = true;
@@ -125308,7 +125460,7 @@ var isDebug = false || false === true;
125308
125460
  },
125309
125461
  // 添加自定义模型, 暂时只支持glb、gltf格式
125310
125462
  addCustomModel: function addCustomModel(name, position, url) {
125311
- var _this48 = this;
125463
+ var _this50 = this;
125312
125464
  var scale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
125313
125465
  var immediately = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
125314
125466
  var callback = arguments.length > 5 ? arguments[5] : undefined;
@@ -125319,41 +125471,41 @@ var isDebug = false || false === true;
125319
125471
  locationModel.scale.set(scale, scale, scale);
125320
125472
  locationModel.updateMatrixWorld();
125321
125473
  if (immediately) {
125322
- _this48.cameraControls.fitToSphere(gltf.this.scene, true);
125474
+ _this50.cameraControls.fitToSphere(gltf.this.scene, true);
125323
125475
  }
125324
125476
  // 动画混合器
125325
125477
  // 不参与裁剪
125326
125478
  locationModel.userData.cull = false;
125327
125479
  locationModel.name = name;
125328
- if (_this48.scene) _this48.scene.add(locationModel);
125329
- locationModel.position.copy(new _this48.THREE.Vector3(position.x, position.y, position.z));
125480
+ if (_this50.scene) _this50.scene.add(locationModel);
125481
+ locationModel.position.copy(new _this50.THREE.Vector3(position.x, position.y, position.z));
125330
125482
  if (gltf.animations.length > 0) {
125331
- var actionMixer = new _this48.THREE.AnimationMixer(gltf.this.scene);
125483
+ var actionMixer = new _this50.THREE.AnimationMixer(gltf.this.scene);
125332
125484
  var walkActive = actionMixer.clipAction(gltf.animations[0]);
125333
125485
  walkActive.play();
125334
- _this48.modelActive.push(walkActive);
125335
- _this48.modelActions.push(actionMixer);
125486
+ _this50.modelActive.push(walkActive);
125487
+ _this50.modelActions.push(actionMixer);
125336
125488
  }
125337
125489
  callback && callback();
125338
125490
  });
125339
125491
  },
125340
125492
  // 删除添加的自定义模型
125341
125493
  removeCustomModel: function removeCustomModel(name) {
125342
- var _this49 = this;
125494
+ var _this51 = this;
125343
125495
  var obj = this.getObjectByName(name);
125344
125496
  obj.forEach(function (item, index) {
125345
125497
  if (item.animations > 0) {
125346
125498
  item.removeFromParent();
125347
- _this49.modelActions[index].uncacheRoot(item);
125348
- _this49.modelActions[index].uncacheRoot(_this49.modelActive[index]);
125499
+ _this51.modelActions[index].uncacheRoot(item);
125500
+ _this51.modelActions[index].uncacheRoot(_this51.modelActive[index]);
125349
125501
  }
125350
125502
  item.traverse(function (child) {
125351
- if (child instanceof _this49.THREE.Mesh) {
125503
+ if (child instanceof _this51.THREE.Mesh) {
125352
125504
  child.geometry.dispose();
125353
125505
  child.material.dispose();
125354
125506
  }
125355
125507
  });
125356
- if (_this49.scene) _this49.scene.remove(item);
125508
+ if (_this51.scene) _this51.scene.remove(item);
125357
125509
  });
125358
125510
  this.modelActions.splice(0);
125359
125511
  this.modelActive.splice(0);
@@ -125415,7 +125567,7 @@ var isDebug = false || false === true;
125415
125567
  return size;
125416
125568
  },
125417
125569
  animate: function animate() {
125418
- var _this50 = this;
125570
+ var _this52 = this;
125419
125571
  if (isDebug) {
125420
125572
  this.stats && this.stats.begin(); // 开始帧率统计
125421
125573
  }
@@ -125429,7 +125581,7 @@ var isDebug = false || false === true;
125429
125581
  if (this.timeStamp > singleFrameTime) {
125430
125582
  if (this.modelActions.length > 0) {
125431
125583
  this.modelActions.forEach(function (item) {
125432
- item.update(_this50.timeStamp);
125584
+ item.update(_this52.timeStamp);
125433
125585
  });
125434
125586
  }
125435
125587
  this.cameraControls.enabled && this.cameraControls.update(this.timeStamp);
@@ -125784,18 +125936,18 @@ var isDebug = false || false === true;
125784
125936
  * 加载下一批数据
125785
125937
  */
125786
125938
  loadNextBatch: function loadNextBatch() {
125787
- var _this51 = this;
125939
+ var _this53 = this;
125788
125940
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee1() {
125789
125941
  var loadingState, batch, _t3;
125790
125942
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context1) {
125791
125943
  while (1) switch (_context1.p = _context1.n) {
125792
125944
  case 0:
125793
- loadingState = _this51.noObserver ? _this51.noObserver.batchLoadingState : _this51.batchLoadingState;
125945
+ loadingState = _this53.noObserver ? _this53.noObserver.batchLoadingState : _this53.batchLoadingState;
125794
125946
  if (!(!loadingState.isLoading || loadingState.currentBatch >= loadingState.pendingData.length)) {
125795
125947
  _context1.n = 1;
125796
125948
  break;
125797
125949
  }
125798
- _this51.completeBatchLoading();
125950
+ _this53.completeBatchLoading();
125799
125951
  return _context1.a(2);
125800
125952
  case 1:
125801
125953
  if (!loadingState.isPaused) {
@@ -125804,7 +125956,7 @@ var isDebug = false || false === true;
125804
125956
  }
125805
125957
  // 如果暂停,延迟一段时间后再次检查
125806
125958
  loadingState.animationFrameId = requestAnimationFrame(function () {
125807
- _this51.loadNextBatch();
125959
+ _this53.loadNextBatch();
125808
125960
  });
125809
125961
  return _context1.a(2);
125810
125962
  case 2:
@@ -125814,7 +125966,7 @@ var isDebug = false || false === true;
125814
125966
  }
125815
125967
  // 如果正在交互,延迟一段时间后再次检查
125816
125968
  loadingState.animationFrameId = requestAnimationFrame(function () {
125817
- _this51.loadNextBatch();
125969
+ _this53.loadNextBatch();
125818
125970
  });
125819
125971
  return _context1.a(2);
125820
125972
  case 3:
@@ -125822,15 +125974,15 @@ var isDebug = false || false === true;
125822
125974
  _context1.p = 4;
125823
125975
  console.log('加载批次:', loadingState.currentBatch);
125824
125976
  _context1.n = 5;
125825
- return _this51.processWithMainThread(batch);
125977
+ return _this53.processWithMainThread(batch);
125826
125978
  case 5:
125827
125979
  // 更新进度
125828
125980
  loadingState.loadedCount += batch.instances.length;
125829
125981
  loadingState.currentBatch++;
125830
125982
 
125831
125983
  // 同步到响应式状态
125832
- _this51.batchLoadingState.loadedCount = loadingState.loadedCount;
125833
- _this51.batchLoadingState.currentBatch = loadingState.currentBatch;
125984
+ _this53.batchLoadingState.loadedCount = loadingState.loadedCount;
125985
+ _this53.batchLoadingState.currentBatch = loadingState.currentBatch;
125834
125986
 
125835
125987
  // 调用进度回调
125836
125988
  if (loadingState.onProgress) {
@@ -125844,7 +125996,7 @@ var isDebug = false || false === true;
125844
125996
 
125845
125997
  // 使用 requestAnimationFrame 在下一帧继续加载
125846
125998
  loadingState.animationFrameId = requestAnimationFrame(function () {
125847
- _this51.loadNextBatch();
125999
+ _this53.loadNextBatch();
125848
126000
  });
125849
126001
  _context1.n = 7;
125850
126002
  break;
@@ -125855,7 +126007,7 @@ var isDebug = false || false === true;
125855
126007
 
125856
126008
  // 继续下一批次
125857
126009
  loadingState.animationFrameId = requestAnimationFrame(function () {
125858
- _this51.loadNextBatch();
126010
+ _this53.loadNextBatch();
125859
126011
  });
125860
126012
  case 7:
125861
126013
  return _context1.a(2);
@@ -125867,20 +126019,20 @@ var isDebug = false || false === true;
125867
126019
  * 使用主线程处理批次数据
125868
126020
  */
125869
126021
  processWithMainThread: function processWithMainThread(batch) {
125870
- var _this52 = this;
126022
+ var _this54 = this;
125871
126023
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee10() {
125872
126024
  var loadingState;
125873
126025
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context10) {
125874
126026
  while (1) switch (_context10.n) {
125875
126027
  case 0:
125876
- loadingState = _this52.noObserver ? _this52.noObserver.batchLoadingState : _this52.batchLoadingState;
126028
+ loadingState = _this54.noObserver ? _this54.noObserver.batchLoadingState : _this54.batchLoadingState;
125877
126029
  loadingState.options.batchSize = loadingState.batchSize;
125878
126030
  loadingState.options.resetState = loadingState.currentBatch === 0;
125879
126031
  // 使用原始的handleInstancedMeshModel方法
125880
126032
 
125881
126033
  isDebug && performance.mark('handleInstancedMeshModel-start');
125882
126034
  _context10.n = 1;
125883
- return handleInstancedMeshModel(_this52.modelGroup, batch.instances, batch.drawObjs, '', _this52.scene, loadingState.color, loadingState.meshNameConfig, '', loadingState.options);
126035
+ return handleInstancedMeshModel(_this54.modelGroup, batch.instances, batch.drawObjs, '', _this54.scene, loadingState.color, loadingState.meshNameConfig, '', loadingState.options);
125884
126036
  case 1:
125885
126037
  isDebug && performance.mark('handleInstancedMeshModel-end');
125886
126038
  isDebug && performance.measure('handleInstancedMeshModel', 'handleInstancedMeshModel-start', 'handleInstancedMeshModel-end');
@@ -125894,7 +126046,7 @@ var isDebug = false || false === true;
125894
126046
  * 完成批量加载
125895
126047
  */
125896
126048
  completeBatchLoading: function completeBatchLoading() {
125897
- var _this53 = this;
126049
+ var _this55 = this;
125898
126050
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
125899
126051
  if (!loadingState.isLoading) return;
125900
126052
 
@@ -125923,17 +126075,17 @@ var isDebug = false || false === true;
125923
126075
  this.modelGroup.traverse(function (child) {
125924
126076
  if (child.isMesh && !child.userData.batchInitDone) {
125925
126077
  markRendered(child);
125926
- var json = _this53.getMeshCenterAndVolume(child);
125927
- var meshBox3 = new _this53.THREE.Box3();
126078
+ var json = _this55.getMeshCenterAndVolume(child);
126079
+ var meshBox3 = new _this55.THREE.Box3();
125928
126080
  meshBox3.setFromObject(child);
125929
- var worldPs = new _this53.THREE.Vector3().addVectors(meshBox3.max, meshBox3.min).multiplyScalar(0.5);
126081
+ var worldPs = new _this55.THREE.Vector3().addVectors(meshBox3.max, meshBox3.min).multiplyScalar(0.5);
125930
126082
  if (isNaN(worldPs.x)) return;
125931
- child.worldDir = new _this53.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
126083
+ child.worldDir = new _this55.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
125932
126084
  child.userData.center = json.center;
125933
126085
  child.userData.worldPs = worldPs;
125934
- child.userData.oldPs = child.getWorldPosition(new _this53.THREE.Vector3());
126086
+ child.userData.oldPs = child.getWorldPosition(new _this55.THREE.Vector3());
125935
126087
  child.userData.box = json.box;
125936
- child.userData.position = new _this53.THREE.Vector3().copy(child.position);
126088
+ child.userData.position = new _this55.THREE.Vector3().copy(child.position);
125937
126089
  child.userData.translate = {
125938
126090
  x: 0,
125939
126091
  y: 0,
@@ -126025,7 +126177,7 @@ var isDebug = false || false === true;
126025
126177
  * @param {Object} options - 配置项 { immediate: boolean }
126026
126178
  */
126027
126179
  setSystemInterruption: function setSystemInterruption(active) {
126028
- var _this54 = this;
126180
+ var _this56 = this;
126029
126181
  var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'user_interaction';
126030
126182
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
126031
126183
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
@@ -126091,7 +126243,7 @@ var isDebug = false || false === true;
126091
126243
  if (loadingState.interactionState.wheelTimeout) return;
126092
126244
 
126093
126245
  // 2. 如果是 wheel 结束,但 this.userInteracting (this.camera) 还在进行,则不恢复
126094
- if (reason === 'wheel' && _this54.userInteracting) return;
126246
+ if (reason === 'wheel' && _this56.userInteracting) return;
126095
126247
 
126096
126248
  // 3. 检查是否有强制跳过标记 (可能由其他逻辑触发)
126097
126249
  // if (this.forceSkipRendering && reason !== 'user_interaction') return; // 视情况而定
@@ -126102,15 +126254,15 @@ var isDebug = false || false === true;
126102
126254
  loadingState.pauseReason = '';
126103
126255
  loadingState.interactionState.isInteracting = false;
126104
126256
  loadingState.interactionState.interactionType = '';
126105
- _this54.forceSkipRendering = false;
126257
+ _this56.forceSkipRendering = false;
126106
126258
 
126107
126259
  // 恢复本地批量加载 (如果未完成)
126108
126260
  if (loadingState.isLoading && loadingState.currentBatch < loadingState.totalBatches) {
126109
- _this54.loadNextBatch();
126261
+ _this56.loadNextBatch();
126110
126262
  }
126111
126263
 
126112
126264
  // 恢复 StreamLoader
126113
- var streamLoader = _this54.noObserver.streamLoader;
126265
+ var streamLoader = _this56.noObserver.streamLoader;
126114
126266
  if (streamLoader && typeof streamLoader.handleControlEnd === 'function') {
126115
126267
  // StreamLoader 内部通常有防抖或延迟,这里直接通知结束即可
126116
126268
  streamLoader.handleControlEnd();
@@ -126163,7 +126315,7 @@ var isDebug = false || false === true;
126163
126315
  * 滚轮交互结束的定时检测
126164
126316
  */
126165
126317
  scheduleWheelInteractionEnd: function scheduleWheelInteractionEnd(event) {
126166
- var _this55 = this;
126318
+ var _this57 = this;
126167
126319
  var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
126168
126320
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
126169
126321
  if (loadingState.interactionState.wheelTimeout) {
@@ -126171,8 +126323,8 @@ var isDebug = false || false === true;
126171
126323
  loadingState.interactionState.wheelTimeout = null;
126172
126324
  }
126173
126325
  loadingState.interactionState.wheelTimeout = setTimeout(function () {
126174
- _this55.$emit('wheelEnd', event);
126175
- _this55.endInteraction('wheel', event, {
126326
+ _this57.$emit('wheelEnd', event);
126327
+ _this57.endInteraction('wheel', event, {
126176
126328
  immediateResume: false
126177
126329
  });
126178
126330
  loadingState.interactionState.wheelTimeout = null;
@@ -126225,11 +126377,11 @@ var isDebug = false || false === true;
126225
126377
  });
126226
126378
  // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=script&lang=js
126227
126379
  /* harmony default export */ var components_com_graphicsvue_type_script_lang_js = (com_graphicsvue_type_script_lang_js);
126228
- // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=a7768a4e&prod&lang=scss&scoped=true
126229
- var com_graphicsvue_type_style_index_0_id_a7768a4e_prod_lang_scss_scoped_true = __webpack_require__("ff78");
126380
+ // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=482a990d&prod&lang=scss&scoped=true
126381
+ var com_graphicsvue_type_style_index_0_id_482a990d_prod_lang_scss_scoped_true = __webpack_require__("f2c8");
126230
126382
 
126231
- // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=a7768a4e&prod&lang=css
126232
- var com_graphicsvue_type_style_index_1_id_a7768a4e_prod_lang_css = __webpack_require__("dd3d");
126383
+ // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=482a990d&prod&lang=css
126384
+ var com_graphicsvue_type_style_index_1_id_482a990d_prod_lang_css = __webpack_require__("f478");
126233
126385
 
126234
126386
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
126235
126387
  /* globals __VUE_SSR_CONTEXT__ */
@@ -126341,17 +126493,17 @@ function normalizeComponent(
126341
126493
 
126342
126494
  var component = normalizeComponent(
126343
126495
  components_com_graphicsvue_type_script_lang_js,
126344
- com_graphicsvue_type_template_id_a7768a4e_scoped_true_render,
126496
+ com_graphicsvue_type_template_id_482a990d_scoped_true_render,
126345
126497
  staticRenderFns,
126346
126498
  false,
126347
126499
  null,
126348
- "a7768a4e",
126500
+ "482a990d",
126349
126501
  null
126350
126502
 
126351
126503
  )
126352
126504
 
126353
126505
  /* harmony default export */ var com_graphics = (component.exports);
126354
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0c827d9c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-flcanvas/index.vue?vue&type=template&id=21bcf2d9&scoped=true
126506
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"25a2ae8c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-flcanvas/index.vue?vue&type=template&id=21bcf2d9&scoped=true
126355
126507
  var com_flcanvasvue_type_template_id_21bcf2d9_scoped_true_render = function render() {
126356
126508
  var _vm = this,
126357
126509
  _c = _vm._self._c;
@@ -130271,7 +130423,7 @@ var com_flcanvas_component = normalizeComponent(
130271
130423
  )
130272
130424
 
130273
130425
  /* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
130274
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0c827d9c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/per-control.vue?vue&type=template&id=f547d5c6&scoped=true
130426
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"25a2ae8c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/per-control.vue?vue&type=template&id=f547d5c6&scoped=true
130275
130427
  var per_controlvue_type_template_id_f547d5c6_scoped_true_render = function render() {
130276
130428
  var _vm = this,
130277
130429
  _c = _vm._self._c;
@@ -130379,7 +130531,7 @@ var per_control_component = normalizeComponent(
130379
130531
  )
130380
130532
 
130381
130533
  /* harmony default export */ var per_control = (per_control_component.exports);
130382
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0c827d9c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/pid.vue?vue&type=template&id=2572c0e2&scoped=true
130534
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"25a2ae8c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/pid.vue?vue&type=template&id=2572c0e2&scoped=true
130383
130535
  var pidvue_type_template_id_2572c0e2_scoped_true_render = function render() {
130384
130536
  var _vm = this,
130385
130537
  _c = _vm._self._c;
@@ -130426,7 +130578,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
130426
130578
  var html2canvas = __webpack_require__("c0e9");
130427
130579
  var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
130428
130580
 
130429
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0c827d9c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/component/ann-tool.vue?vue&type=template&id=4b17bce0&scoped=true
130581
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"25a2ae8c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/component/ann-tool.vue?vue&type=template&id=4b17bce0&scoped=true
130430
130582
  var ann_toolvue_type_template_id_4b17bce0_scoped_true_render = function render() {
130431
130583
  var _vm = this,
130432
130584
  _c = _vm._self._c;
@@ -132146,17 +132298,6 @@ exports.Konva = _CoreInternals_1.Konva.Util._assign(_CoreInternals_1.Konva, {
132146
132298
 
132147
132299
  exports.f = Object.getOwnPropertySymbols;
132148
132300
 
132149
- /***/ }),
132150
-
132151
- /***/ "ff78":
132152
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
132153
-
132154
- "use strict";
132155
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_a7768a4e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8292");
132156
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_a7768a4e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_a7768a4e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
132157
- /* unused harmony reexport * */
132158
-
132159
-
132160
132301
  /***/ })
132161
132302
 
132162
132303
  /******/ });