fl-web-component 2.0.19-beta.0 → 2.0.19-beta.2

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.
@@ -2933,6 +2933,13 @@ Factory_1.Factory.addGetterSetter(Image, 'cropHeight', 0, (0, Validators_1.getNu
2933
2933
 
2934
2934
  /***/ }),
2935
2935
 
2936
+ /***/ "23ff":
2937
+ /***/ (function(module, exports, __webpack_require__) {
2938
+
2939
+ // extracted by mini-css-extract-plugin
2940
+
2941
+ /***/ }),
2942
+
2936
2943
  /***/ "26c8":
2937
2944
  /***/ (function(module, exports, __webpack_require__) {
2938
2945
 
@@ -13551,6 +13558,13 @@ module.exports = {
13551
13558
 
13552
13559
  /***/ }),
13553
13560
 
13561
+ /***/ "3ff9":
13562
+ /***/ (function(module, exports, __webpack_require__) {
13563
+
13564
+ // extracted by mini-css-extract-plugin
13565
+
13566
+ /***/ }),
13567
+
13554
13568
  /***/ "4010":
13555
13569
  /***/ (function(module, exports, __webpack_require__) {
13556
13570
 
@@ -43873,6 +43887,17 @@ Factory_1.Factory.addGetterSetter(Arc, 'outerRadius', 0, (0, Validators_1.getNum
43873
43887
  Factory_1.Factory.addGetterSetter(Arc, 'angle', 0, (0, Validators_1.getNumberValidator)());
43874
43888
  Factory_1.Factory.addGetterSetter(Arc, 'clockwise', false, (0, Validators_1.getBooleanValidator)());
43875
43889
 
43890
+ /***/ }),
43891
+
43892
+ /***/ "8673":
43893
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
43894
+
43895
+ "use strict";
43896
+ /* 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_1f8c13ba_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3ff9");
43897
+ /* 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_1f8c13ba_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_1f8c13ba_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
43898
+ /* unused harmony reexport * */
43899
+
43900
+
43876
43901
  /***/ }),
43877
43902
 
43878
43903
  /***/ "8875":
@@ -56170,13 +56195,6 @@ Factory_1.Factory.addGetterSetter(Path, 'data');
56170
56195
 
56171
56196
  /***/ }),
56172
56197
 
56173
- /***/ "8c5c":
56174
- /***/ (function(module, exports, __webpack_require__) {
56175
-
56176
- // extracted by mini-css-extract-plugin
56177
-
56178
- /***/ }),
56179
-
56180
56198
  /***/ "8e84":
56181
56199
  /***/ (function(module, exports, __webpack_require__) {
56182
56200
 
@@ -56496,7 +56514,7 @@ module.exports = document && document.documentElement;
56496
56514
  /***/ "9224":
56497
56515
  /***/ (function(module) {
56498
56516
 
56499
- module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.19-beta.0\",\"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:prod\",\"watch\":\"vue-cli-service build --watch --mode development --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"watch:prod\":\"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\"]}");
56517
+ module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.19-beta.2\",\"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:prod\",\"watch\":\"vue-cli-service build --watch --mode development --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"watch:prod\":\"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\"]}");
56500
56518
 
56501
56519
  /***/ }),
56502
56520
 
@@ -59302,13 +59320,6 @@ var isDefined = exports.isDefined = function isDefined(val) {
59302
59320
 
59303
59321
  /***/ }),
59304
59322
 
59305
- /***/ "a81d":
59306
- /***/ (function(module, exports, __webpack_require__) {
59307
-
59308
- // extracted by mini-css-extract-plugin
59309
-
59310
- /***/ }),
59311
-
59312
59323
  /***/ "ae26":
59313
59324
  /***/ (function(module, exports, __webpack_require__) {
59314
59325
 
@@ -59544,17 +59555,6 @@ module.exports = function () {
59544
59555
  };
59545
59556
  }();
59546
59557
 
59547
- /***/ }),
59548
-
59549
- /***/ "b606":
59550
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
59551
-
59552
- "use strict";
59553
- /* 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_a4813dca_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a81d");
59554
- /* 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_a4813dca_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_a4813dca_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
59555
- /* unused harmony reexport * */
59556
-
59557
-
59558
59558
  /***/ }),
59559
59559
 
59560
59560
  /***/ "b9c7":
@@ -72500,17 +72500,6 @@ Factory_1.Factory.addGetterSetter(Star, 'numPoints', 5, (0, Validators_1.getNumb
72500
72500
  Factory_1.Factory.addGetterSetter(Star, 'innerRadius', 0, (0, Validators_1.getNumberValidator)());
72501
72501
  Factory_1.Factory.addGetterSetter(Star, 'outerRadius', 0, (0, Validators_1.getNumberValidator)());
72502
72502
 
72503
- /***/ }),
72504
-
72505
- /***/ "e426":
72506
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
72507
-
72508
- "use strict";
72509
- /* 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_a4813dca_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8c5c");
72510
- /* 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_a4813dca_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_a4813dca_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
72511
- /* unused harmony reexport * */
72512
-
72513
-
72514
72503
  /***/ }),
72515
72504
 
72516
72505
  /***/ "e444":
@@ -73500,6 +73489,17 @@ $export($export.S + $export.F, 'Object', {
73500
73489
  assign: __webpack_require__("072d")
73501
73490
  });
73502
73491
 
73492
+ /***/ }),
73493
+
73494
+ /***/ "e573":
73495
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
73496
+
73497
+ "use strict";
73498
+ /* 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_1f8c13ba_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("23ff");
73499
+ /* 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_1f8c13ba_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_1f8c13ba_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
73500
+ /* unused harmony reexport * */
73501
+
73502
+
73503
73503
  /***/ }),
73504
73504
 
73505
73505
  /***/ "e62d":
@@ -78634,8 +78634,8 @@ if (typeof window !== 'undefined') {
78634
78634
  // Indicate to webpack that this file can be concatenated
78635
78635
  /* harmony default export */ var setPublicPath = (null);
78636
78636
 
78637
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5851e511-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=a4813dca&scoped=true
78638
- var com_graphicsvue_type_template_id_a4813dca_scoped_true_render = function render() {
78637
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1538a079-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=1f8c13ba&scoped=true
78638
+ var com_graphicsvue_type_template_id_1f8c13ba_scoped_true_render = function render() {
78639
78639
  var _vm = this,
78640
78640
  _c = _vm._self._c;
78641
78641
  return _c('div', {
@@ -78647,7 +78647,7 @@ var com_graphicsvue_type_template_id_a4813dca_scoped_true_render = function rend
78647
78647
  };
78648
78648
  var staticRenderFns = [];
78649
78649
 
78650
- // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=a4813dca&scoped=true
78650
+ // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=1f8c13ba&scoped=true
78651
78651
 
78652
78652
  // CONCATENATED MODULE: ./node_modules/camera-controls/dist/camera-controls.module.js
78653
78653
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
@@ -78924,7 +78924,7 @@ var camera_controls_module_THREE;
78924
78924
  var _ORIGIN;
78925
78925
  var _AXIS_Y;
78926
78926
  var _AXIS_Z;
78927
- var _v2;
78927
+ var camera_controls_module_v2;
78928
78928
  var _v3A;
78929
78929
  var _v3B;
78930
78930
  var _v3C;
@@ -79440,15 +79440,15 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
79440
79440
  };
79441
79441
  var startDragging = function startDragging(event) {
79442
79442
  if (!_this._enabled) return;
79443
- extractClientCoordFromEvent(_this._activePointers, _v2);
79443
+ extractClientCoordFromEvent(_this._activePointers, camera_controls_module_v2);
79444
79444
  _this._getClientRect(_this._elementRect);
79445
- dragStartPosition.copy(_v2);
79446
- lastDragPosition.copy(_v2);
79445
+ dragStartPosition.copy(camera_controls_module_v2);
79446
+ lastDragPosition.copy(camera_controls_module_v2);
79447
79447
  var isMultiTouch = _this._activePointers.length >= 2;
79448
79448
  if (isMultiTouch) {
79449
79449
  // 2 finger pinch
79450
- var dx = _v2.x - _this._activePointers[1].clientX;
79451
- var dy = _v2.y - _this._activePointers[1].clientY;
79450
+ var dx = camera_controls_module_v2.x - _this._activePointers[1].clientX;
79451
+ var dy = camera_controls_module_v2.y - _this._activePointers[1].clientY;
79452
79452
  var distance = Math.sqrt(dx * dx + dy * dy);
79453
79453
  dollyStart.set(0, distance);
79454
79454
  // center coords of 2 finger truck
@@ -79512,14 +79512,14 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
79512
79512
  var dragging = function dragging() {
79513
79513
  if (!_this._enabled || !_this._dragNeedsUpdate) return;
79514
79514
  _this._dragNeedsUpdate = false;
79515
- extractClientCoordFromEvent(_this._activePointers, _v2);
79515
+ extractClientCoordFromEvent(_this._activePointers, camera_controls_module_v2);
79516
79516
  // When pointer lock is enabled clientX, clientY, screenX, and screenY remain 0.
79517
79517
  // If pointer lock is enabled, use the Delta directory, and assume active-pointer is not multiple.
79518
79518
  var isPointerLockActive = _this._domElement && _this._domElement.ownerDocument.pointerLockElement === _this._domElement;
79519
79519
  var lockedPointer = isPointerLockActive ? _this._lockedPointer || _this._activePointers[0] : null;
79520
- var deltaX = lockedPointer ? -lockedPointer.deltaX : lastDragPosition.x - _v2.x;
79521
- var deltaY = lockedPointer ? -lockedPointer.deltaY : lastDragPosition.y - _v2.y;
79522
- lastDragPosition.copy(_v2);
79520
+ var deltaX = lockedPointer ? -lockedPointer.deltaX : lastDragPosition.x - camera_controls_module_v2.x;
79521
+ var deltaY = lockedPointer ? -lockedPointer.deltaY : lastDragPosition.y - camera_controls_module_v2.y;
79522
+ lastDragPosition.copy(camera_controls_module_v2);
79523
79523
  if ((_this._state & ACTION.ROTATE) === ACTION.ROTATE || (_this._state & ACTION.TOUCH_ROTATE) === ACTION.TOUCH_ROTATE || (_this._state & ACTION.TOUCH_DOLLY_ROTATE) === ACTION.TOUCH_DOLLY_ROTATE || (_this._state & ACTION.TOUCH_ZOOM_ROTATE) === ACTION.TOUCH_ZOOM_ROTATE) {
79524
79524
  _this._rotateInternal(deltaX, deltaY);
79525
79525
  _this._isUserControllingRotate = true;
@@ -79537,8 +79537,8 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
79537
79537
  }
79538
79538
  }
79539
79539
  if ((_this._state & ACTION.TOUCH_DOLLY) === ACTION.TOUCH_DOLLY || (_this._state & ACTION.TOUCH_ZOOM) === ACTION.TOUCH_ZOOM || (_this._state & ACTION.TOUCH_DOLLY_TRUCK) === ACTION.TOUCH_DOLLY_TRUCK || (_this._state & ACTION.TOUCH_ZOOM_TRUCK) === ACTION.TOUCH_ZOOM_TRUCK || (_this._state & ACTION.TOUCH_DOLLY_OFFSET) === ACTION.TOUCH_DOLLY_OFFSET || (_this._state & ACTION.TOUCH_ZOOM_OFFSET) === ACTION.TOUCH_ZOOM_OFFSET || (_this._state & ACTION.TOUCH_DOLLY_ROTATE) === ACTION.TOUCH_DOLLY_ROTATE || (_this._state & ACTION.TOUCH_ZOOM_ROTATE) === ACTION.TOUCH_ZOOM_ROTATE) {
79540
- var dx = _v2.x - _this._activePointers[1].clientX;
79541
- var dy = _v2.y - _this._activePointers[1].clientY;
79540
+ var dx = camera_controls_module_v2.x - _this._activePointers[1].clientX;
79541
+ var dy = camera_controls_module_v2.y - _this._activePointers[1].clientY;
79542
79542
  var distance = Math.sqrt(dx * dx + dy * dy);
79543
79543
  var dollyDelta = dollyStart.y - distance;
79544
79544
  dollyStart.set(0, distance);
@@ -79565,8 +79565,8 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
79565
79565
  });
79566
79566
  };
79567
79567
  var endDragging = function endDragging() {
79568
- extractClientCoordFromEvent(_this._activePointers, _v2);
79569
- lastDragPosition.copy(_v2);
79568
+ extractClientCoordFromEvent(_this._activePointers, camera_controls_module_v2);
79569
+ lastDragPosition.copy(camera_controls_module_v2);
79570
79570
  _this._dragNeedsUpdate = false;
79571
79571
  if (_this._activePointers.length === 0 || _this._activePointers.length === 1 && _this._activePointers[0] === _this._lockedPointer) {
79572
79572
  _this._isDragging = false;
@@ -81190,7 +81190,7 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
81190
81190
  _ORIGIN = Object.freeze(new camera_controls_module_THREE.Vector3(0, 0, 0));
81191
81191
  _AXIS_Y = Object.freeze(new camera_controls_module_THREE.Vector3(0, 1, 0));
81192
81192
  _AXIS_Z = Object.freeze(new camera_controls_module_THREE.Vector3(0, 0, 1));
81193
- _v2 = new camera_controls_module_THREE.Vector2();
81193
+ camera_controls_module_v2 = new camera_controls_module_THREE.Vector2();
81194
81194
  _v3A = new camera_controls_module_THREE.Vector3();
81195
81195
  _v3B = new camera_controls_module_THREE.Vector3();
81196
81196
  _v3C = new camera_controls_module_THREE.Vector3();
@@ -108606,12 +108606,8 @@ measure_height_MeasureHeight.prototype = {
108606
108606
  });
108607
108607
  // CONCATENATED MODULE: ./src/utils/threejs/measure-clear-distance.js
108608
108608
  function measure_clear_distance_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = measure_clear_distance_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
108609
- function measure_clear_distance_slicedToArray(r, e) { return measure_clear_distance_arrayWithHoles(r) || measure_clear_distance_iterableToArrayLimit(r, e) || measure_clear_distance_unsupportedIterableToArray(r, e) || measure_clear_distance_nonIterableRest(); }
108610
- function measure_clear_distance_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
108611
108609
  function measure_clear_distance_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return measure_clear_distance_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? measure_clear_distance_arrayLikeToArray(r, a) : void 0; } }
108612
108610
  function measure_clear_distance_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
108613
- function measure_clear_distance_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
108614
- function measure_clear_distance_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
108615
108611
 
108616
108612
 
108617
108613
 
@@ -108655,10 +108651,17 @@ measure_clear_distance_MeasureClearDistance.prototype = {
108655
108651
  mouse.y = -(canvasY / elRect.height) * 2.0 + 1.0;
108656
108652
  measure_clear_distance_this.raycaster.setFromCamera(mouse, this.camera);
108657
108653
  var intersects = measure_clear_distance_this.raycaster.intersectObjects(measure_clear_distance_this.scene.children, true);
108658
- if (intersects.length > 0) {
108659
- return intersects[0];
108654
+ var l = intersects.length;
108655
+ var obj = null;
108656
+ if (l > 0) {
108657
+ for (var index = 0; index < l; index++) {
108658
+ if (intersects[index].object.type === 'Mesh') {
108659
+ obj = intersects[index];
108660
+ break;
108661
+ }
108662
+ }
108660
108663
  }
108661
- return null;
108664
+ return obj;
108662
108665
  },
108663
108666
  createLine: function createLine(p1, p2) {
108664
108667
  var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
@@ -108703,8 +108706,15 @@ measure_clear_distance_MeasureClearDistance.prototype = {
108703
108706
  var lastTime = new Date().getTime();
108704
108707
  if (lastTime - this.firstTime < 300) {
108705
108708
  var measureObj = measure_clear_distance_this.getPosition(e);
108709
+ console.log(measureObj);
108706
108710
  if (measureObj) {
108707
108711
  measure_clear_distance_this.selectedObjects.push(measureObj);
108712
+ // 高亮选中的
108713
+ // const instanceInfo = measureObj.object.userData?.instancesMap?.get(measureObj.object.name);
108714
+ // const { instanceIndex } = instanceInfo;
108715
+ var instanceIndex = measureObj.instanceId;
108716
+ measureObj.object.setColorAt(instanceIndex, new Color(0x53a8ff));
108717
+ measureObj.object.instanceColor.needsUpdate = true;
108708
108718
  if (measure_clear_distance_this.selectedObjects.length % 2 === 0) {
108709
108719
  measure_clear_distance_this.calculateClearDistance();
108710
108720
  }
@@ -108719,13 +108729,35 @@ measure_clear_distance_MeasureClearDistance.prototype = {
108719
108729
  var obj1 = this.selectedObjects[l - 2];
108720
108730
  var obj2 = this.selectedObjects[l - 1];
108721
108731
  var isParallel = this.checkParallelism(obj1.object, obj1.instanceId, obj2.object, obj2.instanceId);
108722
- console.log(isParallel);
108723
- var pts1 = this.getInstanceSurfacePoints(obj1.object, obj1.instanceId, 600);
108724
- var pts2 = this.getInstanceSurfacePoints(obj2.object, obj2.instanceId, 600);
108725
- if (pts1.length === 0 || pts2.length === 0) {
108732
+ if (!isParallel) {
108733
+ element_ui_common["Message"].warning('请选择两个平行的物体');
108726
108734
  return;
108727
108735
  }
108728
- var closestPair = this.findClosestPair(pts1, pts2);
108736
+ // 全局采样
108737
+ var localPts1 = this.sampleGlobal(obj1.object.geometry, 1000);
108738
+ var localPts2 = this.sampleGlobal(obj2.object.geometry, 1000);
108739
+ var wm1 = this.getInstanceWorldMatrix(obj1.object, obj1.instanceId);
108740
+ var wm2 = this.getInstanceWorldMatrix(obj2.object, obj2.instanceId);
108741
+ var worldPts1 = localPts1.map(function (p) {
108742
+ return p.clone().applyMatrix4(wm1);
108743
+ });
108744
+ var worldPts2 = localPts2.map(function (p) {
108745
+ return p.clone().applyMatrix4(wm2);
108746
+ });
108747
+ var closestPair = this.findClosestPair(worldPts1, worldPts2);
108748
+ // 局部精细搜索
108749
+ var radius = closestPair.distance * 2 + 0.1;
108750
+ var localPts1Fine = this.sampleLocal(obj1.object, obj1.instanceId, closestPair.point1, radius, 1000);
108751
+ var localPts2Fine = this.sampleLocal(obj2.object, obj2.instanceId, closestPair.point2, radius, 1000);
108752
+ var combined1 = worldPts1.filter(function (p) {
108753
+ return p.distanceTo(closestPair.point1) < radius;
108754
+ }).concat(localPts1Fine);
108755
+ var combined2 = worldPts2.filter(function (p) {
108756
+ return p.distanceTo(closestPair.point2) < radius;
108757
+ }).concat(localPts2Fine);
108758
+ if (combined1.length > 0 && combined2.length > 0) {
108759
+ closestPair = this.findClosestPair(combined1, combined2, true);
108760
+ }
108729
108761
  var position = new Vector3((closestPair.point1.x + closestPair.point2.x) / 2, (closestPair.point1.y + closestPair.point2.y) / 2, (closestPair.point1.z + closestPair.point2.z) / 2);
108730
108762
  // 将测量结果显示在页面中
108731
108763
  var circleTag1 = this.createLabel('circle-tag', '', closestPair.point1);
@@ -108741,153 +108773,154 @@ measure_clear_distance_MeasureClearDistance.prototype = {
108741
108773
  this.scene.add(line);
108742
108774
  this.scene.add(label);
108743
108775
  },
108744
- getInstanceSurfacePoints: function getInstanceSurfacePoints(instancedMesh, instanceId) {
108745
- var maxPoints = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1000;
108746
- var geometry = instancedMesh.geometry;
108747
- // let localPoints = this.generateGenericLocalPoints(geometry, maxPoints);
108748
- var localPoints = this.sampleGeometrySurface(geometry, maxPoints);
108749
- var worldMatrix = this.getInstanceWorldMatrix(instancedMesh, instanceId);
108750
- var worldPoints = localPoints.map(function (p) {
108751
- return p.clone().applyMatrix4(worldMatrix);
108752
- });
108753
- return worldPoints.slice(0, maxPoints);
108754
- },
108755
- sampleGeometrySurface: function sampleGeometrySurface(geometry) {
108776
+ // 全部采样
108777
+ sampleGlobal: function sampleGlobal(geometry) {
108756
108778
  var maxPoints = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 600;
108757
- var positions = geometry.getAttribute('position');
108758
- if (!positions) return [];
108759
-
108760
- // 获取三角形(优先使用索引)
108761
- var triangles = [];
108762
- if (geometry.index) {
108763
- var index = geometry.index.array;
108764
- for (var i = 0; i < index.length; i += 3) {
108765
- var a = new Vector3(positions.getX(index[i]), positions.getY(index[i]), positions.getZ(index[i]));
108766
- var b = new Vector3(positions.getX(index[i + 1]), positions.getY(index[i + 1]), positions.getZ(index[i + 1]));
108767
- var c = new Vector3(positions.getX(index[i + 2]), positions.getY(index[i + 2]), positions.getZ(index[i + 2]));
108768
- triangles.push([a, b, c]);
108769
- }
108770
- } else {
108771
- // 无索引时,每三个顶点组成一个三角形
108772
- for (var _i = 0; _i < positions.count; _i += 3) {
108773
- var _a = new Vector3(positions.getX(_i), positions.getY(_i), positions.getZ(_i));
108774
- var _b = new Vector3(positions.getX(_i + 1), positions.getY(_i + 1), positions.getZ(_i + 1));
108775
- var _c = new Vector3(positions.getX(_i + 2), positions.getY(_i + 2), positions.getZ(_i + 2));
108776
- triangles.push([_a, _b, _c]);
108777
- }
108778
- }
108779
+ var triangles = this.extractTriangles(geometry);
108779
108780
  if (triangles.length === 0) return [];
108780
-
108781
- // 计算每个三角形的面积
108782
- var areas = triangles.map(function (_ref) {
108783
- var _ref2 = measure_clear_distance_slicedToArray(_ref, 3),
108784
- a = _ref2[0],
108785
- b = _ref2[1],
108786
- c = _ref2[2];
108787
- var ab = new Vector3().subVectors(b, a);
108788
- var ac = new Vector3().subVectors(c, a);
108781
+ var areas = triangles.map(function (t) {
108782
+ var ab = new Vector3().subVectors(t.b, t.a);
108783
+ var ac = new Vector3().subVectors(t.c, t.a);
108789
108784
  return new Vector3().crossVectors(ab, ac).length() * 0.5;
108790
108785
  });
108791
- var totalArea = areas.reduce(function (sum, a) {
108792
- return sum + a;
108786
+ var totalArea = areas.reduce(function (s, a) {
108787
+ return s + a;
108793
108788
  }, 0);
108794
-
108795
- // 按面积比例分配采样点数
108796
108789
  var points = [];
108797
- for (var _i2 = 0; _i2 < triangles.length; _i2++) {
108798
- var _triangles$_i = measure_clear_distance_slicedToArray(triangles[_i2], 3),
108799
- _a2 = _triangles$_i[0],
108800
- _b2 = _triangles$_i[1],
108801
- _c2 = _triangles$_i[2];
108802
- var area = areas[_i2];
108803
- var samplesForFace = Math.round(area / totalArea * maxPoints);
108804
- if (samplesForFace < 1 && points.length < maxPoints) samplesForFace = 1; // 确保每个面至少一个点
108805
-
108806
- for (var j = 0; j < samplesForFace; j++) {
108807
- // 重心坐标随机采样
108808
- var u = Math.random();
108809
- var v = Math.random() * (1 - u);
108810
- var w = 1 - u - v;
108811
- var point = new Vector3().addScaledVector(_a2, u).addScaledVector(_b2, v).addScaledVector(_c2, w);
108812
- points.push(point);
108813
- }
108814
- }
108815
-
108816
- // 如果点数不够,随机补充
108790
+ for (var i = 0; i < triangles.length; i++) {
108791
+ var _triangles$i = triangles[i],
108792
+ a = _triangles$i.a,
108793
+ b = _triangles$i.b,
108794
+ c = _triangles$i.c;
108795
+ var count = Math.max(1, Math.round(areas[i] / totalArea * maxPoints));
108796
+ for (var j = 0; j < count; j++) {
108797
+ var u = Math.random(),
108798
+ v = Math.random() * (1 - u),
108799
+ w = 1 - u - v;
108800
+ points.push(new Vector3().addScaledVector(a, u).addScaledVector(b, v).addScaledVector(c, w));
108801
+ }
108802
+ }
108817
108803
  while (points.length < maxPoints) {
108818
- var triIdx = Math.floor(Math.random() * triangles.length);
108819
- var _triangles$triIdx = measure_clear_distance_slicedToArray(triangles[triIdx], 3),
108820
- _a3 = _triangles$triIdx[0],
108821
- _b3 = _triangles$triIdx[1],
108822
- _c3 = _triangles$triIdx[2];
108823
- var _u = Math.random();
108824
- var _v = Math.random() * (1 - _u);
108825
- var _w = 1 - _u - _v;
108826
- points.push(new Vector3().addScaledVector(_a3, _u).addScaledVector(_b3, _v).addScaledVector(_c3, _w));
108804
+ var t = triangles[Math.floor(Math.random() * triangles.length)];
108805
+ var _u = Math.random(),
108806
+ _v = Math.random() * (1 - _u),
108807
+ _w = 1 - _u - _v;
108808
+ points.push(new Vector3().addScaledVector(t.a, _u).addScaledVector(t.b, _v).addScaledVector(t.c, _w));
108827
108809
  }
108828
108810
  return points.slice(0, maxPoints);
108829
108811
  },
108830
- generateGenericLocalPoints: function generateGenericLocalPoints(geometry) {
108831
- var maxPoints = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;
108812
+ // 局部采样
108813
+ sampleLocal: function sampleLocal(instancedMesh, instanceId, centerWorld, radius) {
108814
+ var pointsCount = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 300;
108815
+ var worldMatrix = this.getInstanceWorldMatrix(instancedMesh, instanceId);
108816
+ var invMatrix = new Matrix4().copy(worldMatrix).invert();
108817
+ var centerLocal = centerWorld.clone().applyMatrix4(invMatrix);
108818
+ var triangles = this.extractTriangles(instancedMesh.geometry);
108819
+ if (triangles.length === 0) return [];
108820
+ var relevantTris = triangles.filter(function (t) {
108821
+ var box = new Box3().setFromPoints([t.a, t.b, t.c]);
108822
+ return box.distanceToPoint(centerLocal) <= radius;
108823
+ });
108824
+ if (relevantTris.length === 0) return [];
108825
+ var localPoints = [];
108826
+ var perTri = Math.ceil(pointsCount / relevantTris.length);
108827
+ var _iterator = measure_clear_distance_createForOfIteratorHelper(relevantTris),
108828
+ _step;
108829
+ try {
108830
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
108831
+ var _step$value = _step.value,
108832
+ _a = _step$value.a,
108833
+ _b = _step$value.b,
108834
+ _c = _step$value.c;
108835
+ for (var j = 0; j < perTri; j++) {
108836
+ var _u2 = Math.random(),
108837
+ _v2 = Math.random() * (1 - _u2),
108838
+ _w2 = 1 - _u2 - _v2;
108839
+ var _pt = new Vector3().addScaledVector(_a, _u2).addScaledVector(_b, _v2).addScaledVector(_c, _w2);
108840
+ if (_pt.distanceTo(centerLocal) <= radius) localPoints.push(_pt);
108841
+ }
108842
+ }
108843
+ } catch (err) {
108844
+ _iterator.e(err);
108845
+ } finally {
108846
+ _iterator.f();
108847
+ }
108848
+ while (localPoints.length < pointsCount && relevantTris.length > 0) {
108849
+ var _relevantTris$Math$fl = relevantTris[Math.floor(Math.random() * relevantTris.length)],
108850
+ a = _relevantTris$Math$fl.a,
108851
+ b = _relevantTris$Math$fl.b,
108852
+ c = _relevantTris$Math$fl.c;
108853
+ var u = Math.random(),
108854
+ v = Math.random() * (1 - u),
108855
+ w = 1 - u - v;
108856
+ var pt = new Vector3().addScaledVector(a, u).addScaledVector(b, v).addScaledVector(c, w);
108857
+ if (pt.distanceTo(centerLocal) <= radius) localPoints.push(pt);
108858
+ }
108859
+ return localPoints.map(function (p) {
108860
+ return p.clone().applyMatrix4(worldMatrix);
108861
+ });
108862
+ },
108863
+ extractTriangles: function extractTriangles(geometry) {
108832
108864
  var pos = geometry.getAttribute('position');
108833
108865
  if (!pos) return [];
108834
- var allVerts = [];
108835
- for (var i = 0; i < pos.count; i++) {
108836
- allVerts.push(new Vector3(pos.getX(i), pos.getY(i), pos.getZ(i)));
108837
- }
108838
- var sourceVerts = allVerts;
108866
+ var triangles = [];
108839
108867
  if (geometry.index) {
108840
- var indexArr = geometry.index.array;
108841
- var seen = new Set();
108842
- sourceVerts = [];
108843
- for (var _i3 = 0; _i3 < indexArr.length; _i3++) {
108844
- var v = allVerts[indexArr[_i3]];
108845
- var key = "".concat(v.x.toFixed(4), ",").concat(v.y.toFixed(4), ",").concat(v.z.toFixed(4));
108846
- if (!seen.has(key)) {
108847
- seen.add(key);
108848
- sourceVerts.push(v.clone());
108849
- }
108868
+ var idx = geometry.index.array;
108869
+ for (var i = 0; i < idx.length; i += 3) {
108870
+ var a = new Vector3(pos.getX(idx[i]), pos.getY(idx[i]), pos.getZ(idx[i]));
108871
+ var b = new Vector3(pos.getX(idx[i + 1]), pos.getY(idx[i + 1]), pos.getZ(idx[i + 1]));
108872
+ var c = new Vector3(pos.getX(idx[i + 2]), pos.getY(idx[i + 2]), pos.getZ(idx[i + 2]));
108873
+ triangles.push({
108874
+ a: a,
108875
+ b: b,
108876
+ c: c
108877
+ });
108878
+ }
108879
+ } else {
108880
+ for (var _i = 0; _i < pos.count; _i += 3) {
108881
+ var _a2 = new Vector3(pos.getX(_i), pos.getY(_i), pos.getZ(_i));
108882
+ var _b2 = new Vector3(pos.getX(_i + 1), pos.getY(_i + 1), pos.getZ(_i + 1));
108883
+ var _c2 = new Vector3(pos.getX(_i + 2), pos.getY(_i + 2), pos.getZ(_i + 2));
108884
+ triangles.push({
108885
+ a: _a2,
108886
+ b: _b2,
108887
+ c: _c2
108888
+ });
108850
108889
  }
108851
108890
  }
108852
- if (sourceVerts.length > maxPoints) {
108853
- var step = Math.ceil(sourceVerts.length / maxPoints);
108854
- var sampled = [];
108855
- for (var _i4 = 0; _i4 < sourceVerts.length; _i4 += step) sampled.push(sourceVerts[_i4]);
108856
- sourceVerts = sampled;
108857
- }
108858
- return sourceVerts;
108891
+ return triangles;
108859
108892
  },
108860
108893
  findClosestPair: function findClosestPair(points1, points2) {
108861
108894
  var minDist = Infinity;
108862
108895
  var c1 = new Vector3();
108863
108896
  var c2 = new Vector3();
108864
- var _iterator = measure_clear_distance_createForOfIteratorHelper(points1),
108865
- _step;
108897
+ var _iterator2 = measure_clear_distance_createForOfIteratorHelper(points1),
108898
+ _step2;
108866
108899
  try {
108867
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
108868
- var p1 = _step.value;
108869
- var _iterator2 = measure_clear_distance_createForOfIteratorHelper(points2),
108870
- _step2;
108900
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
108901
+ var p1 = _step2.value;
108902
+ var _iterator3 = measure_clear_distance_createForOfIteratorHelper(points2),
108903
+ _step3;
108871
108904
  try {
108872
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
108873
- var p2 = _step2.value;
108874
- var d = p1.distanceTo(p2);
108875
- if (d < minDist) {
108905
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
108906
+ var p2 = _step3.value;
108907
+ var d = Number(p1.distanceTo(p2).toFixed(2));
108908
+ if (d <= minDist) {
108876
108909
  minDist = d;
108877
108910
  c1.copy(p1);
108878
108911
  c2.copy(p2);
108879
108912
  }
108880
108913
  }
108881
108914
  } catch (err) {
108882
- _iterator2.e(err);
108915
+ _iterator3.e(err);
108883
108916
  } finally {
108884
- _iterator2.f();
108917
+ _iterator3.f();
108885
108918
  }
108886
108919
  }
108887
108920
  } catch (err) {
108888
- _iterator.e(err);
108921
+ _iterator2.e(err);
108889
108922
  } finally {
108890
- _iterator.f();
108923
+ _iterator2.f();
108891
108924
  }
108892
108925
  return {
108893
108926
  point1: c1,
@@ -108895,34 +108928,55 @@ measure_clear_distance_MeasureClearDistance.prototype = {
108895
108928
  distance: minDist
108896
108929
  };
108897
108930
  },
108898
- // 平行判断 (基于包围盒主轴方向)
108899
108931
  checkParallelism: function checkParallelism(inst1, id1, inst2, id2) {
108932
+ // 1. 获取世界矩阵
108900
108933
  var mat1 = this.getInstanceWorldMatrix(inst1, id1);
108901
108934
  var mat2 = this.getInstanceWorldMatrix(inst2, id2);
108902
- var box1 = new Box3();
108903
- var box2 = new Box3();
108904
-
108905
- // 确保包围盒存在
108906
- if (!inst1.geometry.boundingBox) inst1.geometry.computeBoundingBox();
108907
- if (!inst2.geometry.boundingBox) inst2.geometry.computeBoundingBox();
108908
- box1.copy(inst1.geometry.boundingBox).applyMatrix4(mat1);
108909
- box2.copy(inst2.geometry.boundingBox).applyMatrix4(mat2);
108910
- var size1 = new Vector3();
108911
- box1.getSize(size1);
108912
- var size2 = new Vector3();
108913
- box2.getSize(size2);
108914
- var getMainDir = function getMainDir(s) {
108915
- if (s.x >= s.y && s.x >= s.z) return new Vector3(1, 0, 0);
108916
- if (s.y >= s.x && s.y >= s.z) return new Vector3(0, 1, 0);
108917
- return new Vector3(0, 0, 1);
108935
+
108936
+ // 2. 提取纯旋转部分(消除缩放和位移)
108937
+ var rotMat1 = new Matrix4().extractRotation(mat1);
108938
+ var rotMat2 = new Matrix4().extractRotation(mat2);
108939
+
108940
+ // 如果物体可能有非均匀缩放,extractRotation 可能会出错,
108941
+ // 更稳健的方法是手动归一化列向量
108942
+ var normalizeMatrix = function normalizeMatrix(m) {
108943
+ var col0 = new Vector3().setFromMatrixColumn(m, 0).normalize();
108944
+ var col1 = new Vector3().setFromMatrixColumn(m, 1).normalize();
108945
+ var col2 = new Vector3().setFromMatrixColumn(m, 2).normalize();
108946
+ var normMat = new Matrix4();
108947
+ normMat.makeBasis(col0, col1, col2);
108948
+ return normMat;
108918
108949
  };
108919
- var d1 = getMainDir(size1);
108920
- var d2 = getMainDir(size2);
108921
- var rot1 = new Quaternion().setFromRotationMatrix(new Matrix4().extractRotation(mat1));
108922
- var rot2 = new Quaternion().setFromRotationMatrix(new Matrix4().extractRotation(mat2));
108923
- d1.applyQuaternion(rot1);
108924
- d2.applyQuaternion(rot2);
108925
- return Math.abs(d1.dot(d2)) > 0.95;
108950
+ var cleanRot1 = normalizeMatrix(rotMat1);
108951
+ var cleanRot2 = normalizeMatrix(rotMat2);
108952
+
108953
+ // 3. 定义三个基向量(局部坐标系的X, Y, Z轴)
108954
+ var axes = [new Vector3(1, 0, 0), new Vector3(0, 1, 0), new Vector3(0, 0, 1)];
108955
+
108956
+ // 4. 检查是否有任意一对基向量在世界空间中平行
108957
+ var threshold = 0.99; // 提高阈值,更严格
108958
+ for (var _i2 = 0, _axes = axes; _i2 < _axes.length; _i2++) {
108959
+ var axis1 = _axes[_i2];
108960
+ // 将局部基向量转换到世界方向
108961
+ var worldDir1 = axis1.clone().applyMatrix4(cleanRot1).normalize();
108962
+ var _iterator4 = measure_clear_distance_createForOfIteratorHelper(axes),
108963
+ _step4;
108964
+ try {
108965
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
108966
+ var axis2 = _step4.value;
108967
+ var worldDir2 = axis2.clone().applyMatrix4(cleanRot2).normalize();
108968
+ var dot = Math.abs(worldDir1.dot(worldDir2));
108969
+ if (dot > threshold) {
108970
+ return true; // 只要有一对方向平行即判为平行
108971
+ }
108972
+ }
108973
+ } catch (err) {
108974
+ _iterator4.e(err);
108975
+ } finally {
108976
+ _iterator4.f();
108977
+ }
108978
+ }
108979
+ return false;
108926
108980
  },
108927
108981
  getInstanceWorldMatrix: function getInstanceWorldMatrix(instancedMesh, instanceId) {
108928
108982
  var matrix = new Matrix4();
@@ -108943,10 +108997,22 @@ measure_clear_distance_MeasureClearDistance.prototype = {
108943
108997
  this.polyline.splice(0);
108944
108998
  this.labels.splice(0);
108945
108999
  this.firstTime = 0;
109000
+ this.selectedObjects.forEach(function (item) {
109001
+ var instanceIndex = item.instanceId;
109002
+ item.object.setColorAt(instanceIndex, item.object.material.userData.nColor);
109003
+ item.object.instanceColor.needsUpdate = true;
109004
+ });
109005
+ this.selectedObjects.splice(0);
108946
109006
  }
108947
109007
  this.renderer.domElement.style.cursor = 'pointer';
108948
109008
  },
108949
109009
  clear: function clear() {
109010
+ this.selectedObjects.forEach(function (item) {
109011
+ var instanceIndex = item.instanceId;
109012
+ item.object.setColorAt(instanceIndex, item.object.material.userData.nColor);
109013
+ item.object.instanceColor.needsUpdate = true;
109014
+ });
109015
+ this.selectedObjects.splice(0);
108950
109016
  this.remove(this.points);
108951
109017
  this.remove(this.polyline);
108952
109018
  this.remove(this.labels);
@@ -120930,7 +120996,7 @@ var LOG_INTERVAL = 30;
120930
120996
 
120931
120997
  var isDebug = false || false === true;
120932
120998
  // const isDebug = false;
120933
-
120999
+ var COLLISION_PENETRATION_EPSILON = 0.1;
120934
121000
  /* harmony default export */ var com_graphicsvue_type_script_lang_js = ({
120935
121001
  name: 'FlModel',
120936
121002
  props: {
@@ -122479,6 +122545,81 @@ var isDebug = false || false === true;
122479
122545
  box: box
122480
122546
  });
122481
122547
  },
122548
+ _isCollisionBoxAvailable: function _isCollisionBoxAvailable(box) {
122549
+ if (!box || !box.isBox3 || box.isEmpty()) return false;
122550
+ if (box.userData && box.userData.visible === false) return false;
122551
+ return true;
122552
+ },
122553
+ _formatCollisionPairId: function _formatCollisionPairId(id) {
122554
+ var value = String(id);
122555
+ var numberValue = Number(value);
122556
+ return Number.isFinite(numberValue) ? numberValue : id;
122557
+ },
122558
+ _getBoxMinPenetration: function _getBoxMinPenetration(boxA, boxB) {
122559
+ var x = Math.min(boxA.max.x - boxB.min.x, boxB.max.x - boxA.min.x);
122560
+ var y = Math.min(boxA.max.y - boxB.min.y, boxB.max.y - boxA.min.y);
122561
+ var z = Math.min(boxA.max.z - boxB.min.z, boxB.max.z - boxA.min.z);
122562
+ return Math.min(x, y, z);
122563
+ },
122564
+ _isCollisionBoxMatched: function _isCollisionBoxMatched(boxA, boxB) {
122565
+ if (!this._isCollisionBoxAvailable(boxA) || !this._isCollisionBoxAvailable(boxB)) return false;
122566
+ if (!boxA.intersectsBox(boxB)) return false;
122567
+ return this._getBoxMinPenetration(boxA, boxB) > COLLISION_PENETRATION_EPSILON;
122568
+ },
122569
+ _queryOctreeByBox: function _queryOctreeByBox(box) {
122570
+ var results = [];
122571
+ var root = this._octree;
122572
+ if (!root || !this._isCollisionBoxAvailable(box)) return results;
122573
+ var stack = [root];
122574
+ while (stack.length) {
122575
+ var node = stack.pop();
122576
+ if (!node || !node.box || !this._isCollisionBoxMatched(node.box, box)) continue;
122577
+ if (node.children) {
122578
+ for (var i = 0; i < 8; i++) {
122579
+ stack.push(node.children[i]);
122580
+ }
122581
+ }
122582
+ if (node.items && node.items.length) {
122583
+ for (var _i = 0; _i < node.items.length; _i++) {
122584
+ var item = node.items[_i];
122585
+ if (item && this._isCollisionBoxMatched(item.box, box)) {
122586
+ results.push(item);
122587
+ }
122588
+ }
122589
+ }
122590
+ }
122591
+ return results;
122592
+ },
122593
+ getOctreeCollisionPairs: function getOctreeCollisionPairs() {
122594
+ var _this10 = this;
122595
+ var pairs = [];
122596
+ if (!this._boxIndex || this._boxIndex.size === 0) return {
122597
+ pairs: pairs
122598
+ };
122599
+ if (!this._octree) {
122600
+ this.buildOctreeFromBoxIndex();
122601
+ }
122602
+ if (!this._octree) return {
122603
+ pairs: pairs
122604
+ };
122605
+ this._boxIndex.forEach(function (boxA, idA) {
122606
+ if (!_this10._isCollisionBoxAvailable(boxA)) return;
122607
+ var hits = _this10._queryOctreeByBox(boxA);
122608
+ for (var i = 0; i < hits.length; i++) {
122609
+ var item = hits[i];
122610
+ if (!item || String(item.id) === String(idA)) continue;
122611
+ var boxB = item.box;
122612
+ if (!_this10._isCollisionBoxMatched(boxA, boxB)) continue;
122613
+ pairs.push({
122614
+ idA: _this10._formatCollisionPairId(idA),
122615
+ idB: _this10._formatCollisionPairId(item.id)
122616
+ });
122617
+ }
122618
+ });
122619
+ return {
122620
+ pairs: pairs
122621
+ };
122622
+ },
122482
122623
  _getCurrentFrustum: function _getCurrentFrustum() {
122483
122624
  // 确保相机矩阵是最新的
122484
122625
  if (this.camera) {
@@ -122577,8 +122718,8 @@ var isDebug = false || false === true;
122577
122718
 
122578
122719
  // 计算到最远顶点的距离
122579
122720
  var maxDistance = 0;
122580
- for (var _i = 0, _vertices = vertices; _i < _vertices.length; _i++) {
122581
- var v = _vertices[_i];
122721
+ for (var _i2 = 0, _vertices = vertices; _i2 < _vertices.length; _i2++) {
122722
+ var v = _vertices[_i2];
122582
122723
  var dist = camPos.distanceTo(v);
122583
122724
  if (dist > maxDistance) maxDistance = dist;
122584
122725
  }
@@ -122608,7 +122749,7 @@ var isDebug = false || false === true;
122608
122749
  * @returns {Object|null} { planeBox: THREE.Box3|null, frustumBox: THREE.Box3, frustumY: {min, max} } 或 null(当没有平面交点且未请求 frustumY)
122609
122750
  */
122610
122751
  getScreenPlaneBounds: function getScreenPlaneBounds(camera, width, height, plane) {
122611
- var _this10 = this;
122752
+ var _this11 = this;
122612
122753
  var opts = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
122613
122754
  var _opts$includeFrustumY = opts.includeFrustumY,
122614
122755
  includeFrustumY = _opts$includeFrustumY === void 0 ? false : _opts$includeFrustumY;
@@ -122625,8 +122766,8 @@ var isDebug = false || false === true;
122625
122766
 
122626
122767
  // 计算视椎体 8 个角点(near/far 的四角)
122627
122768
  var frustumPoints = [];
122628
- for (var _i2 = 0, _screenCorners = screenCorners; _i2 < _screenCorners.length; _i2++) {
122629
- var _screenCorners$_i = com_graphicsvue_type_script_lang_js_slicedToArray(_screenCorners[_i2], 2),
122769
+ for (var _i3 = 0, _screenCorners = screenCorners; _i3 < _screenCorners.length; _i3++) {
122770
+ var _screenCorners$_i = com_graphicsvue_type_script_lang_js_slicedToArray(_screenCorners[_i3], 2),
122630
122771
  x = _screenCorners$_i[0],
122631
122772
  y = _screenCorners$_i[1];
122632
122773
  var ndcBase = new this.THREE.Vector3(x / width * 2 - 1, -(y / height) * 2 + 1, undefined);
@@ -122653,7 +122794,7 @@ var isDebug = false || false === true;
122653
122794
  var volumeCorners = nearCorners.concat(farCorners);
122654
122795
  var projectedPoints = volumeCorners.map(function (p) {
122655
122796
  var yProj = -(a * p.x + c * p.z + d) / b;
122656
- return new _this10.THREE.Vector3(p.x, yProj, p.z);
122797
+ return new _this11.THREE.Vector3(p.x, yProj, p.z);
122657
122798
  });
122658
122799
  planeBox = new this.THREE.Box3().setFromPoints(projectedPoints);
122659
122800
  }
@@ -122883,14 +123024,14 @@ var isDebug = false || false === true;
122883
123024
  * 执行视椎体裁切,清理视椎体外的InstancedMesh实例
122884
123025
  */
122885
123026
  performFrustumCulling: function performFrustumCulling() {
122886
- var _this11 = this;
123027
+ var _this12 = this;
122887
123028
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee3() {
122888
- var modelState, now, globalFrustum, globalVpMatrix, toUnload, bypassList, visibleIds, candidates, visibleIdSet, frustum, exclude, hits, i, occlusionState, occlusionEnabled, state, w, h, aspectRatio, sw, sh, rt, t0, opaqueCandidates, transparentCandidates, _i3, totalInstances, transparentTotal, activeIdIndexArr, transparentIdIndexArr, occObjs, asyncBuildEnabled, _occBuild, asyncState, token, opaqueSnapshot, transparentMesh, transparentCapacity, nextCap, geometry, material, tempMatrix, tempScale, tempObj, tempColor, tIdx, _i8, c, idx, r, g, b, _c$box$userData$obb, matrix, halfSize, tMaxIdx, prevToneMapping, prevTarget, prevClearColorHex, prevClearAlpha, _c3, cvs, cssW, cssH, dst, src, row, srcRow, dstRow, idIndexArr, maxIdx, totalPixels, targetSamples, baseStride, extraStride, stride, minSampleCount, scanResult, indices, _i9, id, transparentMaxIdx, tIdIndexArr, tScanResult, tIndices, _i0, _id, _i1, _i10, toLoadSet, parentsToCheck, _i13, _toUnload, _toUnload$_i, modelId, child, _t2;
123029
+ var modelState, now, globalFrustum, globalVpMatrix, toUnload, bypassList, visibleIds, candidates, visibleIdSet, frustum, exclude, hits, i, occlusionState, occlusionEnabled, state, w, h, aspectRatio, sw, sh, rt, t0, opaqueCandidates, transparentCandidates, _i4, totalInstances, transparentTotal, activeIdIndexArr, transparentIdIndexArr, occObjs, asyncBuildEnabled, _occBuild, asyncState, token, opaqueSnapshot, transparentMesh, transparentCapacity, nextCap, geometry, material, tempMatrix, tempScale, tempObj, tempColor, tIdx, _i9, c, idx, r, g, b, _c$box$userData$obb, matrix, halfSize, tMaxIdx, prevToneMapping, prevTarget, prevClearColorHex, prevClearAlpha, _c3, cvs, cssW, cssH, dst, src, row, srcRow, dstRow, idIndexArr, maxIdx, totalPixels, targetSamples, baseStride, extraStride, stride, minSampleCount, scanResult, indices, _i0, id, transparentMaxIdx, tIdIndexArr, tScanResult, tIndices, _i1, _id, _i10, _i11, toLoadSet, parentsToCheck, _i14, _toUnload, _toUnload$_i, modelId, child, _t2;
122889
123030
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context3) {
122890
123031
  while (1) switch (_context3.p = _context3.n) {
122891
123032
  case 0:
122892
- modelState = _this11.noObserver ? _this11.noObserver.modelStateManager : _this11.modelStateManager;
122893
- if (!(!_this11.modelStateManager.frustumCheckEnabled || !_this11.scene)) {
123033
+ modelState = _this12.noObserver ? _this12.noObserver.modelStateManager : _this12.modelStateManager;
123034
+ if (!(!_this12.modelStateManager.frustumCheckEnabled || !_this12.scene)) {
122894
123035
  _context3.n = 1;
122895
123036
  break;
122896
123037
  }
@@ -122906,10 +123047,10 @@ var isDebug = false || false === true;
122906
123047
  modelState.lastCullingTime = now;
122907
123048
 
122908
123049
  // 预先创建视椎体,供后续遍历复用
122909
- if (!_this11._frustum) _this11._frustum = new _this11.THREE.Frustum();
122910
- if (!_this11._vpMatrix) _this11._vpMatrix = new _this11.THREE.Matrix4();
122911
- globalFrustum = _this11._frustum;
122912
- globalVpMatrix = _this11._vpMatrix.multiplyMatrices(_this11.camera.projectionMatrix, _this11.camera.matrixWorldInverse);
123050
+ if (!_this12._frustum) _this12._frustum = new _this12.THREE.Frustum();
123051
+ if (!_this12._vpMatrix) _this12._vpMatrix = new _this12.THREE.Matrix4();
123052
+ globalFrustum = _this12._frustum;
123053
+ globalVpMatrix = _this12._vpMatrix.multiplyMatrices(_this12.camera.projectionMatrix, _this12.camera.matrixWorldInverse);
122913
123054
  globalFrustum.setFromProjectionMatrix(globalVpMatrix);
122914
123055
 
122915
123056
  // 使用局部变量收集 ID,最后一次性赋值
@@ -122923,13 +123064,13 @@ var isDebug = false || false === true;
122923
123064
  });
122924
123065
  }
122925
123066
  visibleIdSet = new Set(visibleIds);
122926
- if (!_this11._octree) {
123067
+ if (!_this12._octree) {
122927
123068
  _context3.n = 8;
122928
123069
  break;
122929
123070
  }
122930
- frustum = _this11._getCurrentFrustum();
123071
+ frustum = _this12._getCurrentFrustum();
122931
123072
  exclude = bypassList || new Set();
122932
- hits = _this11.queryOctreeByFrustum(frustum, exclude);
123073
+ hits = _this12.queryOctreeByFrustum(frustum, exclude);
122933
123074
  i = 0;
122934
123075
  case 3:
122935
123076
  if (!(i < hits.length)) {
@@ -122942,11 +123083,11 @@ var isDebug = false || false === true;
122942
123083
  }
122943
123084
  return _context3.a(3, 6);
122944
123085
  case 4:
122945
- if (_this11.shouldApplyOcclusionByBox(hits[i].box)) {
123086
+ if (_this12.shouldApplyOcclusionByBox(hits[i].box)) {
122946
123087
  _context3.n = 5;
122947
123088
  break;
122948
123089
  }
122949
- visibleIdSet.add(_this11.formatModelId(hits[i].modelId));
123090
+ visibleIdSet.add(_this12.formatModelId(hits[i].modelId));
122950
123091
  return _context3.a(3, 6);
122951
123092
  case 5:
122952
123093
  candidates.push(hits[i]);
@@ -122958,13 +123099,13 @@ var isDebug = false || false === true;
122958
123099
  _context3.n = 9;
122959
123100
  break;
122960
123101
  case 8:
122961
- if (_this11._boxIndex && _this11._boxIndex.size > 0) {
122962
- _this11._boxIndex.forEach(function (box, modelId) {
123102
+ if (_this12._boxIndex && _this12._boxIndex.size > 0) {
123103
+ _this12._boxIndex.forEach(function (box, modelId) {
122963
123104
  if (bypassList && bypassList.size > 0 && bypassList.has(modelId)) return;
122964
123105
  if (box.userData && box.userData.visible === false) return;
122965
- if (_this11.isBoxInFrustum(box)) {
122966
- if (!_this11.shouldApplyOcclusionByBox(box)) {
122967
- visibleIdSet.add(_this11.formatModelId(modelId));
123106
+ if (_this12.isBoxInFrustum(box)) {
123107
+ if (!_this12.shouldApplyOcclusionByBox(box)) {
123108
+ visibleIdSet.add(_this12.formatModelId(modelId));
122968
123109
  return;
122969
123110
  }
122970
123111
  candidates.push({
@@ -122975,18 +123116,18 @@ var isDebug = false || false === true;
122975
123116
  });
122976
123117
  }
122977
123118
  case 9:
122978
- occlusionState = _this11.noObserver ? _this11.noObserver.occlusionState : _this11.occlusionState; // 从响应式对象获取开关状态
122979
- occlusionEnabled = _this11.occlusionState && _this11.occlusionState.enabled;
123119
+ occlusionState = _this12.noObserver ? _this12.noObserver.occlusionState : _this12.occlusionState; // 从响应式对象获取开关状态
123120
+ occlusionEnabled = _this12.occlusionState && _this12.occlusionState.enabled;
122980
123121
  if (!occlusionEnabled) {
122981
123122
  _context3.n = 16;
122982
123123
  break;
122983
123124
  }
122984
123125
  state = occlusionState;
122985
- w = _this11.renderer && _this11.renderer.domElement ? _this11.renderer.domElement.clientWidth || _this11.renderer.domElement.width || 0 : 0;
122986
- h = _this11.renderer && _this11.renderer.domElement ? _this11.renderer.domElement.clientHeight || _this11.renderer.domElement.height || 0 : 0; // bufferWidth/Height 仍从响应式对象读取以支持动态修改
123126
+ w = _this12.renderer && _this12.renderer.domElement ? _this12.renderer.domElement.clientWidth || _this12.renderer.domElement.width || 0 : 0;
123127
+ h = _this12.renderer && _this12.renderer.domElement ? _this12.renderer.domElement.clientHeight || _this12.renderer.domElement.height || 0 : 0; // bufferWidth/Height 仍从响应式对象读取以支持动态修改
122987
123128
  // 性能优化:使用降采样缓冲区进行遮挡剔除,大幅减少 readPixels 耗时 (从全屏降至约 256px 宽)
122988
123129
  aspectRatio = h > 0 ? w / h : 1;
122989
- sw = _this11.occlusionState.bufferWidth || 256;
123130
+ sw = _this12.occlusionState.bufferWidth || 256;
122990
123131
  sh = Math.floor(sw / aspectRatio);
122991
123132
  sw = Math.max(1, sw);
122992
123133
  sh = Math.max(1, sh);
@@ -122995,16 +123136,16 @@ var isDebug = false || false === true;
122995
123136
  _context3.p = 10;
122996
123137
  if (!rt || state._rtW !== sw || state._rtH !== sh) {
122997
123138
  if (rt && typeof rt.dispose === 'function') rt.dispose();
122998
- rt = new _this11.THREE.WebGLRenderTarget(sw, sh, {
123139
+ rt = new _this12.THREE.WebGLRenderTarget(sw, sh, {
122999
123140
  depthBuffer: true,
123000
123141
  stencilBuffer: false,
123001
123142
  samples: 0
123002
123143
  });
123003
- rt.texture.minFilter = _this11.THREE.NearestFilter;
123004
- rt.texture.magFilter = _this11.THREE.NearestFilter;
123144
+ rt.texture.minFilter = _this12.THREE.NearestFilter;
123145
+ rt.texture.magFilter = _this12.THREE.NearestFilter;
123005
123146
  rt.texture.generateMipmaps = false;
123006
- rt.texture.type = _this11.THREE.UnsignedByteType;
123007
- rt.texture.format = _this11.THREE.RGBAFormat;
123147
+ rt.texture.type = _this12.THREE.UnsignedByteType;
123148
+ rt.texture.format = _this12.THREE.RGBAFormat;
123008
123149
  rt.samples = 0;
123009
123150
  state._colorRT = rt;
123010
123151
  state._rtW = sw;
@@ -123013,7 +123154,7 @@ var isDebug = false || false === true;
123013
123154
  } else if (!state._colorBuffer || state._colorBuffer.length !== sw * sh * 4) {
123014
123155
  state._colorBuffer = new Uint8Array(sw * sh * 4);
123015
123156
  }
123016
- if (!state._occScene) state._occScene = new _this11.THREE.Scene();
123157
+ if (!state._occScene) state._occScene = new _this12.THREE.Scene();
123017
123158
  // if (!state._occPerfStats) state._occPerfStats = Object.create(null);
123018
123159
  // const _occRecordPerf = (name, ms, meta) => {
123019
123160
  // const this.stats = state._occPerfStats;
@@ -123030,11 +123171,11 @@ var isDebug = false || false === true;
123030
123171
  // 过滤掉透明物体
123031
123172
  opaqueCandidates = [];
123032
123173
  transparentCandidates = [];
123033
- for (_i3 = 0; _i3 < candidates.length; _i3++) {
123034
- if (candidates[_i3].box.userData && candidates[_i3].box.userData.transparent) {
123035
- transparentCandidates.push(candidates[_i3]);
123174
+ for (_i4 = 0; _i4 < candidates.length; _i4++) {
123175
+ if (candidates[_i4].box.userData && candidates[_i4].box.userData.transparent) {
123176
+ transparentCandidates.push(candidates[_i4]);
123036
123177
  } else {
123037
- opaqueCandidates.push(candidates[_i3]);
123178
+ opaqueCandidates.push(candidates[_i4]);
123038
123179
  }
123039
123180
  }
123040
123181
  totalInstances = opaqueCandidates.length;
@@ -123062,18 +123203,18 @@ var isDebug = false || false === true;
123062
123203
  // child.parent = null;
123063
123204
  // // child.dispatchEvent({ type: 'removed' }); // 保持轻量,暂不触发事件
123064
123205
  // }
123065
- asyncBuildEnabled = _this11.occlusionState && _this11.occlusionState.asyncBuildEnabled && !!window.requestAnimationFrame;
123206
+ asyncBuildEnabled = _this12.occlusionState && _this12.occlusionState.asyncBuildEnabled && !!window.requestAnimationFrame;
123066
123207
  _occBuild = function _occBuild(opaqueList) {
123067
123208
  var tBuild0 = performance.now();
123068
123209
  var flag1Items = [];
123069
123210
  var flag3Items = [];
123070
123211
  var globalIdx = 1;
123071
- for (var _i4 = 0; _i4 < opaqueList.length; _i4++) {
123072
- var c = opaqueList[_i4];
123212
+ for (var _i5 = 0; _i5 < opaqueList.length; _i5++) {
123213
+ var c = opaqueList[_i5];
123073
123214
  var obbData = c.box && c.box.userData ? c.box.userData.obbData : null;
123074
123215
  if (!obbData || !obbData.length) continue;
123075
123216
  var idx = globalIdx++;
123076
- activeIdIndexArr[idx] = _this11.formatModelId(c.modelId);
123217
+ activeIdIndexArr[idx] = _this12.formatModelId(c.modelId);
123077
123218
  var flag = c.box.userData && c.box.userData.flag || 1;
123078
123219
  if (flag === 3 && c.box.userData && c.box.userData.obb) {
123079
123220
  flag3Items.push({
@@ -123089,11 +123230,11 @@ var isDebug = false || false === true;
123089
123230
  }
123090
123231
  var maxIdx = globalIdx - 1;
123091
123232
  activeIdIndexArr.length = maxIdx + 1;
123092
- var _tempMatrix = occObjs._tempMatrix || (occObjs._tempMatrix = new _this11.THREE.Matrix4());
123093
- var _tempColor = occObjs._tempColor || (occObjs._tempColor = new _this11.THREE.Color());
123094
- var _tempScale = occObjs._tempScale || (occObjs._tempScale = new _this11.THREE.Vector3());
123095
- var _tempVec3 = occObjs._tempVec3 || (occObjs._tempVec3 = new _this11.THREE.Vector3());
123096
- var _tempMatA = occObjs._tempMatA || (occObjs._tempMatA = new _this11.THREE.Matrix4());
123233
+ var _tempMatrix = occObjs._tempMatrix || (occObjs._tempMatrix = new _this12.THREE.Matrix4());
123234
+ var _tempColor = occObjs._tempColor || (occObjs._tempColor = new _this12.THREE.Color());
123235
+ var _tempScale = occObjs._tempScale || (occObjs._tempScale = new _this12.THREE.Vector3());
123236
+ var _tempVec3 = occObjs._tempVec3 || (occObjs._tempVec3 = new _this12.THREE.Vector3());
123237
+ var _tempMatA = occObjs._tempMatA || (occObjs._tempMatA = new _this12.THREE.Matrix4());
123097
123238
  var boxes = occObjs.boxes;
123098
123239
  var boxCount = flag3Items.length;
123099
123240
  if (boxCount > 0) {
@@ -123106,16 +123247,16 @@ var isDebug = false || false === true;
123106
123247
  if (boxes.mesh.material) boxes.mesh.material.dispose();
123107
123248
  }
123108
123249
  var nextCap = Math.max(needCapacity, capacity > 0 ? capacity * 2 : 256);
123109
- var geometry = new _this11.THREE.BoxGeometry(1, 1, 1);
123110
- var mat = new _this11.THREE.MeshBasicMaterial({
123250
+ var geometry = new _this12.THREE.BoxGeometry(1, 1, 1);
123251
+ var mat = new _this12.THREE.MeshBasicMaterial({
123111
123252
  color: 0xffffff,
123112
- side: _this11.THREE.DoubleSide,
123113
- blending: _this11.THREE.NoBlending,
123253
+ side: _this12.THREE.DoubleSide,
123254
+ blending: _this12.THREE.NoBlending,
123114
123255
  depthTest: true,
123115
123256
  depthWrite: true,
123116
123257
  toneMapped: false
123117
123258
  });
123118
- var mesh = new _this11.THREE.InstancedMesh(geometry, mat, nextCap);
123259
+ var mesh = new _this12.THREE.InstancedMesh(geometry, mat, nextCap);
123119
123260
  mesh.frustumCulled = false;
123120
123261
  mesh.matrixAutoUpdate = false;
123121
123262
  state._occScene.add(mesh);
@@ -123127,8 +123268,8 @@ var isDebug = false || false === true;
123127
123268
  state._occScene.add(boxes.mesh);
123128
123269
  }
123129
123270
  boxes.mesh.count = boxCount;
123130
- for (var _i5 = 0; _i5 < boxCount; _i5++) {
123131
- var item = flag3Items[_i5];
123271
+ for (var _i6 = 0; _i6 < boxCount; _i6++) {
123272
+ var item = flag3Items[_i6];
123132
123273
  var _item$c$box$userData$ = item.c.box.userData.obb,
123133
123274
  matrix = _item$c$box$userData$.matrix,
123134
123275
  halfSize = _item$c$box$userData$.halfSize;
@@ -123140,11 +123281,11 @@ var isDebug = false || false === true;
123140
123281
  _tempScale.copy(halfSize).multiplyScalar(2);
123141
123282
  _tempMatrix.copy(matrix);
123142
123283
  _tempMatrix.scale(_tempScale);
123143
- if (typeof _this11.bizToThreeMatrix !== 'undefined' && _this11.bizToThreeMatrix) {
123144
- _tempMatrix.premultiply(_this11.bizToThreeMatrix);
123284
+ if (typeof _this12.bizToThreeMatrix !== 'undefined' && _this12.bizToThreeMatrix) {
123285
+ _tempMatrix.premultiply(_this12.bizToThreeMatrix);
123145
123286
  }
123146
- boxes.mesh.setMatrixAt(_i5, _tempMatrix);
123147
- boxes.mesh.setColorAt(_i5, _tempColor);
123287
+ boxes.mesh.setMatrixAt(_i6, _tempMatrix);
123288
+ boxes.mesh.setColorAt(_i6, _tempColor);
123148
123289
  }
123149
123290
  boxes.mesh.instanceMatrix.needsUpdate = true;
123150
123291
  if (boxes.mesh.instanceColor) boxes.mesh.instanceColor.needsUpdate = true;
@@ -123158,8 +123299,8 @@ var isDebug = false || false === true;
123158
123299
  if (flag1Count > 0) {
123159
123300
  var totalVerts = 0;
123160
123301
  var totalIdx = 0;
123161
- for (var _i6 = 0; _i6 < flag1Count; _i6++) {
123162
- var _c = flag1Items[_i6].c;
123302
+ for (var _i7 = 0; _i7 < flag1Count; _i7++) {
123303
+ var _c = flag1Items[_i7].c;
123163
123304
  var _obbData = _c.box.userData.obbData;
123164
123305
  var v = _obbData.length / 3 | 0;
123165
123306
  totalVerts += v;
@@ -123170,16 +123311,16 @@ var isDebug = false || false === true;
123170
123311
  var needIdx = totalIdx;
123171
123312
  var ensureBatch1 = function ensureBatch1() {
123172
123313
  if (batch1 && batch1.mesh && batch1.geometry && batch1.material) return;
123173
- var geometry = new _this11.THREE.BufferGeometry();
123174
- var material = new _this11.THREE.MeshBasicMaterial({
123314
+ var geometry = new _this12.THREE.BufferGeometry();
123315
+ var material = new _this12.THREE.MeshBasicMaterial({
123175
123316
  vertexColors: true,
123176
- side: _this11.THREE.DoubleSide,
123177
- blending: _this11.THREE.NoBlending,
123317
+ side: _this12.THREE.DoubleSide,
123318
+ blending: _this12.THREE.NoBlending,
123178
123319
  depthTest: true,
123179
123320
  depthWrite: true,
123180
123321
  toneMapped: false
123181
123322
  });
123182
- var mesh = new _this11.THREE.Mesh(geometry, material);
123323
+ var mesh = new _this12.THREE.Mesh(geometry, material);
123183
123324
  mesh.frustumCulled = false;
123184
123325
  batch1 = occObjs.batch1 = {
123185
123326
  mesh: mesh,
@@ -123203,14 +123344,14 @@ var isDebug = false || false === true;
123203
123344
  batch1.positions = _positions;
123204
123345
  batch1.colors = _colors;
123205
123346
  batch1.indices = _indices2;
123206
- var _posAttr = new _this11.THREE.BufferAttribute(_positions, 3);
123207
- var _colAttr = new _this11.THREE.BufferAttribute(_colors, 3);
123208
- _posAttr.setUsage(_this11.THREE.DynamicDrawUsage);
123209
- _colAttr.setUsage(_this11.THREE.DynamicDrawUsage);
123347
+ var _posAttr = new _this12.THREE.BufferAttribute(_positions, 3);
123348
+ var _colAttr = new _this12.THREE.BufferAttribute(_colors, 3);
123349
+ _posAttr.setUsage(_this12.THREE.DynamicDrawUsage);
123350
+ _colAttr.setUsage(_this12.THREE.DynamicDrawUsage);
123210
123351
  batch1.geometry.setAttribute('position', _posAttr);
123211
123352
  batch1.geometry.setAttribute('color', _colAttr);
123212
- var _idxAttr = new _this11.THREE.BufferAttribute(_indices2, 1);
123213
- _idxAttr.setUsage(_this11.THREE.DynamicDrawUsage);
123353
+ var _idxAttr = new _this12.THREE.BufferAttribute(_indices2, 1);
123354
+ _idxAttr.setUsage(_this12.THREE.DynamicDrawUsage);
123214
123355
  batch1.geometry.setIndex(_idxAttr);
123215
123356
  }
123216
123357
  var positions = batch1.positions;
@@ -123219,8 +123360,8 @@ var isDebug = false || false === true;
123219
123360
  var posPtr = 0;
123220
123361
  var idxPtr = 0;
123221
123362
  var vertBase = 0;
123222
- for (var _i7 = 0; _i7 < flag1Count; _i7++) {
123223
- var _flag1Items$_i = flag1Items[_i7],
123363
+ for (var _i8 = 0; _i8 < flag1Count; _i8++) {
123364
+ var _flag1Items$_i = flag1Items[_i8],
123224
123365
  _c2 = _flag1Items$_i.c,
123225
123366
  _idx2 = _flag1Items$_i.idx;
123226
123367
  var _obbData2 = _c2.box.userData.obbData;
@@ -123230,15 +123371,15 @@ var isDebug = false || false === true;
123230
123371
  var _g = (_idx2 >> 8 & 255) / 255;
123231
123372
  var _b = (_idx2 >> 16 & 255) / 255;
123232
123373
  var vertexCount = _obbData2.length / 3 | 0;
123233
- var needTransform = matrixArr && matrixArr.length >= 16 || typeof _this11.bizToThreeMatrix !== 'undefined' && _this11.bizToThreeMatrix;
123374
+ var needTransform = matrixArr && matrixArr.length >= 16 || typeof _this12.bizToThreeMatrix !== 'undefined' && _this12.bizToThreeMatrix;
123234
123375
  if (needTransform) {
123235
123376
  if (matrixArr && matrixArr.length >= 16) {
123236
123377
  _tempMatA.fromArray(matrixArr);
123237
123378
  } else {
123238
123379
  _tempMatA.identity();
123239
123380
  }
123240
- if (typeof _this11.bizToThreeMatrix !== 'undefined' && _this11.bizToThreeMatrix) {
123241
- _tempMatA.premultiply(_this11.bizToThreeMatrix);
123381
+ if (typeof _this12.bizToThreeMatrix !== 'undefined' && _this12.bizToThreeMatrix) {
123382
+ _tempMatA.premultiply(_this12.bizToThreeMatrix);
123242
123383
  }
123243
123384
  }
123244
123385
  if (!needTransform && ArrayBuffer.isView(_obbData2)) {
@@ -123338,7 +123479,7 @@ var isDebug = false || false === true;
123338
123479
  state._occMaxIdx = 0;
123339
123480
  activeIdIndexArr.length = 0;
123340
123481
  }
123341
- if (!state._occTransparentScene) state._occTransparentScene = new _this11.THREE.Scene();
123482
+ if (!state._occTransparentScene) state._occTransparentScene = new _this12.THREE.Scene();
123342
123483
  transparentMesh = state._occTransparentMesh;
123343
123484
  transparentCapacity = transparentMesh && transparentMesh.userData && typeof transparentMesh.userData.capacity === 'number' ? transparentMesh.userData.capacity : 0;
123344
123485
  if (!transparentMesh || transparentCapacity < transparentTotal) {
@@ -123348,16 +123489,16 @@ var isDebug = false || false === true;
123348
123489
  state._occTransparentScene.remove(transparentMesh);
123349
123490
  }
123350
123491
  nextCap = Math.max(transparentTotal, transparentCapacity > 0 ? transparentCapacity * 2 : 256);
123351
- geometry = new _this11.THREE.BoxGeometry(1, 1, 1);
123352
- material = new _this11.THREE.MeshBasicMaterial({
123492
+ geometry = new _this12.THREE.BoxGeometry(1, 1, 1);
123493
+ material = new _this12.THREE.MeshBasicMaterial({
123353
123494
  color: 0xffffff,
123354
- side: _this11.THREE.DoubleSide,
123355
- blending: _this11.THREE.NoBlending,
123495
+ side: _this12.THREE.DoubleSide,
123496
+ blending: _this12.THREE.NoBlending,
123356
123497
  depthTest: true,
123357
123498
  depthWrite: false,
123358
123499
  toneMapped: false
123359
123500
  });
123360
- transparentMesh = new _this11.THREE.InstancedMesh(geometry, material, nextCap);
123501
+ transparentMesh = new _this12.THREE.InstancedMesh(geometry, material, nextCap);
123361
123502
  transparentMesh.frustumCulled = false;
123362
123503
  transparentMesh.matrixAutoUpdate = false;
123363
123504
  transparentMesh.userData.capacity = nextCap;
@@ -123367,15 +123508,15 @@ var isDebug = false || false === true;
123367
123508
  state._occTransparentScene.add(transparentMesh);
123368
123509
  }
123369
123510
  if (transparentTotal > 0) {
123370
- tempMatrix = new _this11.THREE.Matrix4();
123371
- tempScale = new _this11.THREE.Vector3();
123372
- tempObj = new _this11.THREE.Object3D();
123373
- tempColor = new _this11.THREE.Color();
123511
+ tempMatrix = new _this12.THREE.Matrix4();
123512
+ tempScale = new _this12.THREE.Vector3();
123513
+ tempObj = new _this12.THREE.Object3D();
123514
+ tempColor = new _this12.THREE.Color();
123374
123515
  tIdx = 1;
123375
- for (_i8 = 0; _i8 < transparentTotal; _i8++) {
123376
- c = transparentCandidates[_i8];
123516
+ for (_i9 = 0; _i9 < transparentTotal; _i9++) {
123517
+ c = transparentCandidates[_i9];
123377
123518
  idx = tIdx++;
123378
- transparentIdIndexArr[idx] = _this11.formatModelId(c.modelId);
123519
+ transparentIdIndexArr[idx] = _this12.formatModelId(c.modelId);
123379
123520
  r = (idx & 255) / 255;
123380
123521
  g = (idx >> 8 & 255) / 255;
123381
123522
  b = (idx >> 16 & 255) / 255;
@@ -123385,8 +123526,8 @@ var isDebug = false || false === true;
123385
123526
  tempMatrix.copy(matrix);
123386
123527
  tempScale.copy(halfSize).multiplyScalar(2);
123387
123528
  tempMatrix.scale(tempScale);
123388
- if (typeof _this11.bizToThreeMatrix !== 'undefined' && _this11.bizToThreeMatrix) {
123389
- tempMatrix.premultiply(_this11.bizToThreeMatrix);
123529
+ if (typeof _this12.bizToThreeMatrix !== 'undefined' && _this12.bizToThreeMatrix) {
123530
+ tempMatrix.premultiply(_this12.bizToThreeMatrix);
123390
123531
  }
123391
123532
  } else {
123392
123533
  c.box.getSize(tempScale);
@@ -123396,8 +123537,8 @@ var isDebug = false || false === true;
123396
123537
  tempObj.updateMatrix();
123397
123538
  tempMatrix.copy(tempObj.matrix);
123398
123539
  }
123399
- transparentMesh.setMatrixAt(_i8, tempMatrix);
123400
- transparentMesh.setColorAt(_i8, tempColor);
123540
+ transparentMesh.setMatrixAt(_i9, tempMatrix);
123541
+ transparentMesh.setColorAt(_i9, tempColor);
123401
123542
  }
123402
123543
  transparentMesh.count = transparentTotal;
123403
123544
  transparentMesh.visible = true;
@@ -123414,28 +123555,28 @@ var isDebug = false || false === true;
123414
123555
  }
123415
123556
 
123416
123557
  // console.log('this.renderer', this.renderer)
123417
- prevToneMapping = _this11.renderer.toneMapping;
123418
- prevTarget = _this11.renderer.getRenderTarget ? _this11.renderer.getRenderTarget() : null;
123558
+ prevToneMapping = _this12.renderer.toneMapping;
123559
+ prevTarget = _this12.renderer.getRenderTarget ? _this12.renderer.getRenderTarget() : null;
123419
123560
  prevClearColorHex = 0x000000;
123420
123561
  prevClearAlpha = 0;
123421
123562
  try {
123422
- _c3 = _this11.renderer.getClearColor ? _this11.renderer.getClearColor() : null;
123563
+ _c3 = _this12.renderer.getClearColor ? _this12.renderer.getClearColor() : null;
123423
123564
  if (_c3 && _c3.isColor) prevClearColorHex = _c3.getHex();
123424
- prevClearAlpha = typeof _this11.renderer.getClearAlpha === 'function' ? _this11.renderer.getClearAlpha() : 0;
123565
+ prevClearAlpha = typeof _this12.renderer.getClearAlpha === 'function' ? _this12.renderer.getClearAlpha() : 0;
123425
123566
  } catch (_) {}
123426
- _this11.renderer.toneMapping = _this11.THREE.NoToneMapping;
123427
- _this11.renderer.setRenderTarget(rt);
123428
- _this11.renderer.setClearColor(new _this11.THREE.Color(0, 0, 0), 0);
123429
- _this11.renderer.clear(true, true, false);
123430
- _this11.camera.updateMatrixWorld(true);
123431
- _this11.renderer.render(state._occScene, _this11.camera);
123432
- _this11.updateGlobalSceneBoundingBox();
123567
+ _this12.renderer.toneMapping = _this12.THREE.NoToneMapping;
123568
+ _this12.renderer.setRenderTarget(rt);
123569
+ _this12.renderer.setClearColor(new _this12.THREE.Color(0, 0, 0), 0);
123570
+ _this12.renderer.clear(true, true, false);
123571
+ _this12.camera.updateMatrixWorld(true);
123572
+ _this12.renderer.render(state._occScene, _this12.camera);
123573
+ _this12.updateGlobalSceneBoundingBox();
123433
123574
  // const t1 = performance.now();
123434
123575
  // 从响应式对象读取 previewEnabled
123435
- _this11.$emit('updateBoundingBox');
123576
+ _this12.$emit('updateBoundingBox');
123436
123577
 
123437
123578
  // const tPreview0 = performance.now();
123438
- if (_this11.occlusionState.previewEnabled) {
123579
+ if (_this12.occlusionState.previewEnabled) {
123439
123580
  if (!state._previewCanvas) {
123440
123581
  cvs = document.createElement('canvas');
123441
123582
  cvs.style.position = 'fixed';
@@ -123453,11 +123594,11 @@ var isDebug = false || false === true;
123453
123594
  }
123454
123595
  state._previewCanvas.width = sw;
123455
123596
  state._previewCanvas.height = sh;
123456
- cssW = Math.min(_this11.renderer.domElement.width / 5);
123457
- cssH = Math.min(_this11.renderer.domElement.height / 5);
123597
+ cssW = Math.min(_this12.renderer.domElement.width / 5);
123598
+ cssH = Math.min(_this12.renderer.domElement.height / 5);
123458
123599
  state._previewCanvas.style.width = cssW + 'px';
123459
123600
  state._previewCanvas.style.height = cssH + 'px';
123460
- _this11.renderer.readRenderTargetPixels(rt, 0, 0, sw, sh, state._previewBuffer);
123601
+ _this12.renderer.readRenderTargetPixels(rt, 0, 0, sw, sh, state._previewBuffer);
123461
123602
  if (!state._previewImageData || state._previewImageData.width !== sw || state._previewImageData.height !== sh) {
123462
123603
  state._previewImageData = state._previewCtx.createImageData(sw, sh);
123463
123604
  }
@@ -123480,25 +123621,25 @@ var isDebug = false || false === true;
123480
123621
  }
123481
123622
  // const tPreview1 = performance.now();
123482
123623
  // _occRecordPerf('occ_preview_ms', tPreview1 - tPreview0, { sw, sh });
123483
- _this11.renderer.readRenderTargetPixels(rt, 0, 0, sw, sh, state._colorBuffer);
123624
+ _this12.renderer.readRenderTargetPixels(rt, 0, 0, sw, sh, state._colorBuffer);
123484
123625
  idIndexArr = activeIdIndexArr;
123485
123626
  maxIdx = typeof state._occMaxIdx === 'number' ? state._occMaxIdx : 0;
123486
123627
  totalPixels = sw * sh;
123487
123628
  targetSamples = totalPixels;
123488
123629
  baseStride = Math.max(1, Math.floor(Math.sqrt(totalPixels / Math.max(1, targetSamples))));
123489
- extraStride = _this11.occlusionState && _this11.occlusionState.sampleStride ? _this11.occlusionState.sampleStride : 1;
123630
+ extraStride = _this12.occlusionState && _this12.occlusionState.sampleStride ? _this12.occlusionState.sampleStride : 1;
123490
123631
  stride = Math.max(1, baseStride * Math.max(1, extraStride));
123491
- minSampleCount = _this11.occlusionState && _this11.occlusionState.minSampleCount ? _this11.occlusionState.minSampleCount : 1;
123632
+ minSampleCount = _this12.occlusionState && _this12.occlusionState.minSampleCount ? _this12.occlusionState.minSampleCount : 1;
123492
123633
  _context3.n = 11;
123493
- return _this11.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, maxIdx, minSampleCount);
123634
+ return _this12.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, maxIdx, minSampleCount);
123494
123635
  case 11:
123495
123636
  scanResult = _context3.v;
123496
123637
  if (scanResult && scanResult.buffer) {
123497
123638
  state._colorBuffer = new Uint8Array(scanResult.buffer);
123498
123639
  }
123499
123640
  indices = scanResult && scanResult.indices ? scanResult.indices : [];
123500
- for (_i9 = 0; _i9 < indices.length; _i9++) {
123501
- id = idIndexArr[indices[_i9]];
123641
+ for (_i0 = 0; _i0 < indices.length; _i0++) {
123642
+ id = idIndexArr[indices[_i0]];
123502
123643
  if (typeof id !== 'undefined') {
123503
123644
  visibleIdSet.add(id);
123504
123645
  }
@@ -123508,43 +123649,43 @@ var isDebug = false || false === true;
123508
123649
  _context3.n = 13;
123509
123650
  break;
123510
123651
  }
123511
- _this11.renderer.setClearColor(new _this11.THREE.Color(0, 0, 0), 0);
123512
- _this11.renderer.clear(true, false, false);
123513
- _this11.renderer.render(state._occTransparentScene, _this11.camera);
123514
- _this11.renderer.readRenderTargetPixels(rt, 0, 0, sw, sh, state._colorBuffer);
123652
+ _this12.renderer.setClearColor(new _this12.THREE.Color(0, 0, 0), 0);
123653
+ _this12.renderer.clear(true, false, false);
123654
+ _this12.renderer.render(state._occTransparentScene, _this12.camera);
123655
+ _this12.renderer.readRenderTargetPixels(rt, 0, 0, sw, sh, state._colorBuffer);
123515
123656
  tIdIndexArr = transparentIdIndexArr;
123516
123657
  _context3.n = 12;
123517
- return _this11.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, transparentMaxIdx, minSampleCount);
123658
+ return _this12.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, transparentMaxIdx, minSampleCount);
123518
123659
  case 12:
123519
123660
  tScanResult = _context3.v;
123520
123661
  if (tScanResult && tScanResult.buffer) {
123521
123662
  state._colorBuffer = new Uint8Array(tScanResult.buffer);
123522
123663
  }
123523
123664
  tIndices = tScanResult && tScanResult.indices ? tScanResult.indices : [];
123524
- for (_i0 = 0; _i0 < tIndices.length; _i0++) {
123525
- _id = tIdIndexArr[tIndices[_i0]];
123665
+ for (_i1 = 0; _i1 < tIndices.length; _i1++) {
123666
+ _id = tIdIndexArr[tIndices[_i1]];
123526
123667
  if (typeof _id !== 'undefined') {
123527
123668
  visibleIdSet.add(_id);
123528
123669
  }
123529
123670
  }
123530
123671
  case 13:
123531
- _this11.renderer.setRenderTarget(prevTarget);
123532
- _this11.renderer.setClearColor(prevClearColorHex, prevClearAlpha);
123533
- _this11.renderer.toneMapping = prevToneMapping;
123672
+ _this12.renderer.setRenderTarget(prevTarget);
123673
+ _this12.renderer.setClearColor(prevClearColorHex, prevClearAlpha);
123674
+ _this12.renderer.toneMapping = prevToneMapping;
123534
123675
  _context3.n = 15;
123535
123676
  break;
123536
123677
  case 14:
123537
123678
  _context3.p = 14;
123538
123679
  _t2 = _context3.v;
123539
- for (_i1 = 0; _i1 < candidates.length; _i1++) {
123540
- visibleIdSet.add(candidates[_i1].modelId);
123680
+ for (_i10 = 0; _i10 < candidates.length; _i10++) {
123681
+ visibleIdSet.add(candidates[_i10].modelId);
123541
123682
  }
123542
123683
  case 15:
123543
123684
  _context3.n = 17;
123544
123685
  break;
123545
123686
  case 16:
123546
- for (_i10 = 0; _i10 < candidates.length; _i10++) {
123547
- visibleIdSet.add(candidates[_i10].modelId);
123687
+ for (_i11 = 0; _i11 < candidates.length; _i11++) {
123688
+ visibleIdSet.add(candidates[_i11].modelId);
123548
123689
  }
123549
123690
  case 17:
123550
123691
  visibleIds.length = 0;
@@ -123553,7 +123694,7 @@ var isDebug = false || false === true;
123553
123694
  });
123554
123695
  toLoadSet = new Set(visibleIdSet);
123555
123696
  parentsToCheck = new Set();
123556
- _this11.scene.traverse(function (child) {
123697
+ _this12.scene.traverse(function (child) {
123557
123698
  if (!child.isInstancedMesh) return;
123558
123699
  // 如果复用数量等于大于2个,则跳过裁剪和剔除处理(始终保留)
123559
123700
  if (child.count >= 2) {
@@ -123563,11 +123704,11 @@ var isDebug = false || false === true;
123563
123704
  var modelIds = Array.from(instancesMap.keys());
123564
123705
 
123565
123706
  // 第一遍遍历:检查是否有任何一个实例处于活跃状态(在视锥体内且可见)
123566
- for (var _i11 = 0, _modelIds2 = modelIds; _i11 < _modelIds2.length; _i11++) {
123567
- var _modelId = _modelIds2[_i11];
123707
+ for (var _i12 = 0, _modelIds2 = modelIds; _i12 < _modelIds2.length; _i12++) {
123708
+ var _modelId = _modelIds2[_i12];
123568
123709
  // 检查已取消勾选模型进行卸载
123569
123710
  var documentId = _modelId.split(':')[1];
123570
- if (!_this11.noObserver.documentModelIds.get(documentId)) {
123711
+ if (!_this12.noObserver.documentModelIds.get(documentId)) {
123571
123712
  toUnload.push({
123572
123713
  modelId: _modelId,
123573
123714
  child: child
@@ -123577,12 +123718,12 @@ var isDebug = false || false === true;
123577
123718
  if (bypassList && bypassList.size > 0 && bypassList.has(_modelId)) return;
123578
123719
  var instanceInfo = instancesMap.get(_modelId);
123579
123720
  var instanceIndex = instanceInfo && typeof instanceInfo.instanceIndex === 'number' ? instanceInfo.instanceIndex : null;
123580
- var _box = _this11._boxIndex && _this11._boxIndex.has(String(_modelId)) ? _this11._boxIndex.get(String(_modelId)) : _this11._boxIndex && _this11._boxIndex.has(_modelId) ? _this11._boxIndex.get(_modelId) : null;
123581
- if (!_this11.shouldApplyOcclusionByBox(_box)) {
123721
+ var _box = _this12._boxIndex && _this12._boxIndex.has(String(_modelId)) ? _this12._boxIndex.get(String(_modelId)) : _this12._boxIndex && _this12._boxIndex.has(_modelId) ? _this12._boxIndex.get(_modelId) : null;
123722
+ if (!_this12.shouldApplyOcclusionByBox(_box)) {
123582
123723
  allInactive = false;
123583
123724
  continue;
123584
123725
  }
123585
- var _inFrustum = _this11.isModelInFrustum(child, instanceIndex, globalFrustum);
123726
+ var _inFrustum = _this12.isModelInFrustum(child, instanceIndex, globalFrustum);
123586
123727
  var _modelInVisible = toLoadSet.has(_modelId);
123587
123728
  // console.log('modelId', modelId, 'inFrustum', inFrustum, 'modelInVisible', modelInVisible)
123588
123729
 
@@ -123593,10 +123734,10 @@ var isDebug = false || false === true;
123593
123734
  }
123594
123735
 
123595
123736
  // 第二遍遍历:同步状态并决定是否卸载
123596
- for (var _i12 = 0, _modelIds3 = modelIds; _i12 < _modelIds3.length; _i12++) {
123597
- var _modelId2 = _modelIds3[_i12];
123598
- var _box2 = _this11._boxIndex && _this11._boxIndex.has(String(_modelId2)) ? _this11._boxIndex.get(String(_modelId2)) : _this11._boxIndex && _this11._boxIndex.has(_modelId2) ? _this11._boxIndex.get(_modelId2) : null;
123599
- if (!_this11.shouldApplyOcclusionByBox(_box2)) {
123737
+ for (var _i13 = 0, _modelIds3 = modelIds; _i13 < _modelIds3.length; _i13++) {
123738
+ var _modelId2 = _modelIds3[_i13];
123739
+ var _box2 = _this12._boxIndex && _this12._boxIndex.has(String(_modelId2)) ? _this12._boxIndex.get(String(_modelId2)) : _this12._boxIndex && _this12._boxIndex.has(_modelId2) ? _this12._boxIndex.get(_modelId2) : null;
123740
+ if (!_this12.shouldApplyOcclusionByBox(_box2)) {
123600
123741
  if (toLoadSet.has(_modelId2)) {
123601
123742
  toLoadSet.delete(_modelId2);
123602
123743
  }
@@ -123608,7 +123749,7 @@ var isDebug = false || false === true;
123608
123749
  }
123609
123750
 
123610
123751
  // 仅当所有实例都不活跃时,才执行卸载
123611
- if (!_this11.firstPerSign && !_this11.roaming && allInactive) {
123752
+ if (!_this12.firstPerSign && !_this12.roaming && allInactive) {
123612
123753
  toUnload.push({
123613
123754
  modelId: _modelId2,
123614
123755
  child: child
@@ -123623,38 +123764,38 @@ var isDebug = false || false === true;
123623
123764
  }
123624
123765
  var modelId = child.parent && child.parent.userData && child.parent.userData.instanceId ? child.parent.userData.instanceId : child.uuid;
123625
123766
  if (bypassList && bypassList.size > 0 && bypassList.has(modelId)) return;
123626
- var box = _this11._boxIndex && _this11._boxIndex.has(String(modelId)) ? _this11._boxIndex.get(String(modelId)) : _this11._boxIndex && _this11._boxIndex.has(modelId) ? _this11._boxIndex.get(modelId) : null;
123627
- if (!_this11.shouldApplyOcclusionByBox(box)) {
123767
+ var box = _this12._boxIndex && _this12._boxIndex.has(String(modelId)) ? _this12._boxIndex.get(String(modelId)) : _this12._boxIndex && _this12._boxIndex.has(modelId) ? _this12._boxIndex.get(modelId) : null;
123768
+ if (!_this12.shouldApplyOcclusionByBox(box)) {
123628
123769
  if (toLoadSet.has(modelId)) {
123629
123770
  toLoadSet.delete(modelId);
123630
123771
  }
123631
123772
  return;
123632
123773
  }
123633
- var inFrustum = _this11.isModelInFrustum(child, null, globalFrustum);
123774
+ var inFrustum = _this12.isModelInFrustum(child, null, globalFrustum);
123634
123775
  var modelInVisible = toLoadSet.has(modelId);
123635
123776
  if (modelInVisible) {
123636
123777
  toLoadSet.delete(modelId);
123637
123778
  }
123638
- if (!_this11.firstPerSign && !_this11.roaming && (!inFrustum || !modelInVisible)) {
123779
+ if (!_this12.firstPerSign && !_this12.roaming && (!inFrustum || !modelInVisible)) {
123639
123780
  toUnload.push({
123640
123781
  modelId: modelId,
123641
123782
  child: child
123642
123783
  });
123643
123784
  }
123644
123785
  });
123645
- for (_i13 = 0, _toUnload = toUnload; _i13 < _toUnload.length; _i13++) {
123646
- _toUnload$_i = _toUnload[_i13], modelId = _toUnload$_i.modelId, child = _toUnload$_i.child;
123786
+ for (_i14 = 0, _toUnload = toUnload; _i14 < _toUnload.length; _i14++) {
123787
+ _toUnload$_i = _toUnload[_i14], modelId = _toUnload$_i.modelId, child = _toUnload$_i.child;
123647
123788
  if (child && child.parent) parentsToCheck.add(child.parent);
123648
- _this11.unloadInstancedModel(modelId, child);
123789
+ _this12.unloadInstancedModel(modelId, child);
123649
123790
  }
123650
- if (_this11.scene) {
123791
+ if (_this12.scene) {
123651
123792
  parentsToCheck.forEach(function (group) {
123652
123793
  if (group && group.children && group.children.length === 0) {
123653
123794
  group.removeFromParent();
123654
123795
  }
123655
123796
  });
123656
123797
  }
123657
- _this11.modelStateManager.isloadedModelsIds = Object.freeze(Array.from(toLoadSet));
123798
+ _this12.modelStateManager.isloadedModelsIds = Object.freeze(Array.from(toLoadSet));
123658
123799
  case 18:
123659
123800
  return _context3.a(2);
123660
123801
  }
@@ -123762,7 +123903,7 @@ var isDebug = false || false === true;
123762
123903
  * @param {string} [config.projectId] - 项目ID
123763
123904
  */
123764
123905
  initStreamLoader: function initStreamLoader(modelApi) {
123765
- var _this12 = this;
123906
+ var _this13 = this;
123766
123907
  var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
123767
123908
  var _ref2 = config || {},
123768
123909
  projectId = _ref2.projectId,
@@ -123778,7 +123919,7 @@ var isDebug = false || false === true;
123778
123919
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context4) {
123779
123920
  while (1) switch (_context4.n) {
123780
123921
  case 0:
123781
- if (!(_this12.userInteracting || _this12.noObserver.batchLoadingState.interactionState.isInteracting)) {
123922
+ if (!(_this13.userInteracting || _this13.noObserver.batchLoadingState.interactionState.isInteracting)) {
123782
123923
  _context4.n = 1;
123783
123924
  break;
123784
123925
  }
@@ -123828,9 +123969,9 @@ var isDebug = false || false === true;
123828
123969
  this.noObserver.occlusionWorkerRequestMap = new Map();
123829
123970
  streamLoader.worker.addEventListener('message', function (e) {
123830
123971
  var payload = e.data || {};
123831
- var pending = _this12.noObserver.occlusionWorkerRequestMap.get(payload.id);
123972
+ var pending = _this13.noObserver.occlusionWorkerRequestMap.get(payload.id);
123832
123973
  if (!pending) return;
123833
- _this12.noObserver.occlusionWorkerRequestMap.delete(payload.id);
123974
+ _this13.noObserver.occlusionWorkerRequestMap.delete(payload.id);
123834
123975
  pending.resolve(payload);
123835
123976
  });
123836
123977
  }
@@ -123841,13 +123982,13 @@ var isDebug = false || false === true;
123841
123982
  * @param {Object} materialData - 材质数据
123842
123983
  */
123843
123984
  setStreamModel: function setStreamModel(item, materialData) {
123844
- var _this13 = this;
123985
+ var _this14 = this;
123845
123986
  if (this.noObserver.streamLoader) {
123846
123987
  this.noObserver.streamLoader.setCurrentModel(item, materialData);
123847
123988
  // 设置完模型后,尝试触发一次范围加载以渲染初始视图
123848
123989
  // 使用 setTimeout 确保在下一帧执行,避免当前栈还在初始化中
123849
123990
  setTimeout(function () {
123850
- _this13.getRangeStream();
123991
+ _this14.getRangeStream();
123851
123992
  }, 0);
123852
123993
  } else {}
123853
123994
  },
@@ -123855,17 +123996,17 @@ var isDebug = false || false === true;
123855
123996
  * 批量加载区域(供外部调用)
123856
123997
  */
123857
123998
  batchLoadRegions: function batchLoadRegions(item, divideData, materialData) {
123858
- var _this14 = this;
123999
+ var _this15 = this;
123859
124000
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee6() {
123860
124001
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context6) {
123861
124002
  while (1) switch (_context6.n) {
123862
124003
  case 0:
123863
- if (!_this14.noObserver.streamLoader) {
124004
+ if (!_this15.noObserver.streamLoader) {
123864
124005
  _context6.n = 1;
123865
124006
  break;
123866
124007
  }
123867
124008
  _context6.n = 1;
123868
- return _this14.noObserver.streamLoader.batchLoadRegions(item, divideData, materialData);
124009
+ return _this15.noObserver.streamLoader.batchLoadRegions(item, divideData, materialData);
123869
124010
  case 1:
123870
124011
  return _context6.a(2);
123871
124012
  }
@@ -123876,7 +124017,7 @@ var isDebug = false || false === true;
123876
124017
  * 获取批量加载详情(供外部调用)
123877
124018
  */
123878
124019
  loadModelByIds: function loadModelByIds(options) {
123879
- var _this15 = this;
124020
+ var _this16 = this;
123880
124021
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee7() {
123881
124022
  var _ref3, ids;
123882
124023
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context7) {
@@ -123884,13 +124025,13 @@ var isDebug = false || false === true;
123884
124025
  case 0:
123885
124026
  // 绕过剔除模型
123886
124027
  _ref3 = options.params || {}, ids = _ref3.ids;
123887
- _this15.addBypassCullingModelIds(ids);
123888
- if (!_this15.noObserver.streamLoader) {
124028
+ _this16.addBypassCullingModelIds(ids);
124029
+ if (!_this16.noObserver.streamLoader) {
123889
124030
  _context7.n = 2;
123890
124031
  break;
123891
124032
  }
123892
124033
  _context7.n = 1;
123893
- return _this15.noObserver.streamLoader.loadModelByIds(options);
124034
+ return _this16.noObserver.streamLoader.loadModelByIds(options);
123894
124035
  case 1:
123895
124036
  return _context7.a(2, _context7.v);
123896
124037
  case 2:
@@ -123904,7 +124045,7 @@ var isDebug = false || false === true;
123904
124045
  */
123905
124046
  processModelItem: function processModelItem(item) {
123906
124047
  var _arguments = arguments,
123907
- _this16 = this;
124048
+ _this17 = this;
123908
124049
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee8() {
123909
124050
  var _options$onComplete;
123910
124051
  var options, res;
@@ -123913,22 +124054,22 @@ var isDebug = false || false === true;
123913
124054
  case 0:
123914
124055
  options = _arguments.length > 1 && _arguments[1] !== undefined ? _arguments[1] : {};
123915
124056
  _context8.n = 1;
123916
- return _this16.noObserver.streamLoader.processModelItem(item, options);
124057
+ return _this17.noObserver.streamLoader.processModelItem(item, options);
123917
124058
  case 1:
123918
124059
  res = _context8.v;
123919
124060
  // item.id is the documentId
123920
124061
  if (item && item.id) {
123921
124062
  if (res && res.sceneBox) {
123922
- _this16.setSceneBox(res.sceneBox, item.id, true);
124063
+ _this17.setSceneBox(res.sceneBox, item.id, true);
123923
124064
  }
123924
124065
  if (res && res.boxIndex) {
123925
- _this16.setBoxIndex(res.boxIndex, item.id, true);
124066
+ _this17.setBoxIndex(res.boxIndex, item.id, true);
123926
124067
  }
123927
- _this16.tryInitialCenterAfterBoundsReady();
124068
+ _this17.tryInitialCenterAfterBoundsReady();
123928
124069
  // this.setBoxIndex(boxJson.data, item.id, true);
123929
124070
  }
123930
124071
  (_options$onComplete = options.onComplete) === null || _options$onComplete === void 0 || _options$onComplete.call(options);
123931
- _this16.notifyCameraChange(); // 触发场景更新
124072
+ _this17.notifyCameraChange(); // 触发场景更新
123932
124073
  case 2:
123933
124074
  return _context8.a(2);
123934
124075
  }
@@ -123982,7 +124123,7 @@ var isDebug = false || false === true;
123982
124123
  * 内部渲染流式数据方法
123983
124124
  */
123984
124125
  renderModelData: function renderModelData(meshes, primitives, list, range, onComplete, immediateUpdate) {
123985
- var _this17 = this;
124126
+ var _this18 = this;
123986
124127
  var renderOptions = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
123987
124128
  // 构造 drawModel 需要的数据格式
123988
124129
  var modelRegistry = this.noObserver.streamLoader.modelRegistry;
@@ -124036,8 +124177,8 @@ var isDebug = false || false === true;
124036
124177
  resolve(result || {});
124037
124178
  };
124038
124179
  options.onComplete = function (complete) {
124039
- if (_this17.sceneCommandService && typeof _this17.sceneCommandService.retryPendingOriginalModelSaveChanges === 'function') {
124040
- _this17.sceneCommandService.retryPendingOriginalModelSaveChanges();
124180
+ if (_this18.sceneCommandService && typeof _this18.sceneCommandService.retryPendingOriginalModelSaveChanges === 'function') {
124181
+ _this18.sceneCommandService.retryPendingOriginalModelSaveChanges();
124041
124182
  }
124042
124183
  onComplete === null || onComplete === void 0 || onComplete(complete);
124043
124184
  finish(complete);
@@ -124047,7 +124188,7 @@ var isDebug = false || false === true;
124047
124188
  canceled: true
124048
124189
  }, cancelInfo || {}));
124049
124190
  };
124050
- _this17.drawModel(regionModelData, '', meshNameConfig, options);
124191
+ _this18.drawModel(regionModelData, '', meshNameConfig, options);
124051
124192
  });
124052
124193
  },
124053
124194
  waitNextRenderFrame: function waitNextRenderFrame() {
@@ -124063,7 +124204,7 @@ var isDebug = false || false === true;
124063
124204
  },
124064
124205
  handleRangeStreamComplete: function handleRangeStreamComplete() {
124065
124206
  var _arguments2 = arguments,
124066
- _this18 = this;
124207
+ _this19 = this;
124067
124208
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee9() {
124068
124209
  var payload;
124069
124210
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context9) {
@@ -124071,9 +124212,9 @@ var isDebug = false || false === true;
124071
124212
  case 0:
124072
124213
  payload = _arguments2.length > 0 && _arguments2[0] !== undefined ? _arguments2[0] : {};
124073
124214
  _context9.n = 1;
124074
- return _this18.waitNextRenderFrame();
124215
+ return _this19.waitNextRenderFrame();
124075
124216
  case 1:
124076
- _this18.$emit('loadComplete', com_graphicsvue_type_script_lang_js_objectSpread({
124217
+ _this19.$emit('loadComplete', com_graphicsvue_type_script_lang_js_objectSpread({
124077
124218
  source: 'inRangeDis2'
124078
124219
  }, payload));
124079
124220
  case 2:
@@ -124242,7 +124383,7 @@ var isDebug = false || false === true;
124242
124383
  * 统一监听:用户交互(Wheel/Control)、程序化动画、API调用
124243
124384
  */
124244
124385
  initCameraChangeObserver: function initCameraChangeObserver() {
124245
- var _this19 = this;
124386
+ var _this20 = this;
124246
124387
  // 初始化 control 状态标志
124247
124388
  this.noObserver.isControlActive = false;
124248
124389
  var _this = this;
@@ -124252,28 +124393,28 @@ var isDebug = false || false === true;
124252
124393
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context0) {
124253
124394
  while (1) switch (_context0.n) {
124254
124395
  case 0:
124255
- if (_this19.noObserver.isObserverEnabled) {
124396
+ if (_this20.noObserver.isObserverEnabled) {
124256
124397
  _context0.n = 1;
124257
124398
  break;
124258
124399
  }
124259
124400
  return _context0.a(2);
124260
124401
  case 1:
124261
- if (!(source === 'rest' && _this19.noObserver.isControlActive)) {
124402
+ if (!(source === 'rest' && _this20.noObserver.isControlActive)) {
124262
124403
  _context0.n = 2;
124263
124404
  break;
124264
124405
  }
124265
124406
  return _context0.a(2);
124266
124407
  case 2:
124267
- if (!_this19.modelStateManager.frustumCheckEnabled) {
124408
+ if (!_this20.modelStateManager.frustumCheckEnabled) {
124268
124409
  _context0.n = 3;
124269
124410
  break;
124270
124411
  }
124271
124412
  _context0.n = 3;
124272
- return _this19.performFrustumCulling();
124413
+ return _this20.performFrustumCulling();
124273
124414
  case 3:
124274
124415
  // 执行流式加载请求
124275
- if (_this19.modelStateManager.isloadedModelsIds && _this19.modelStateManager.isloadedModelsIds.length > 0) {
124276
- _this19.getRangeStream(false);
124416
+ if (_this20.modelStateManager.isloadedModelsIds && _this20.modelStateManager.isloadedModelsIds.length > 0) {
124417
+ _this20.getRangeStream(false);
124277
124418
  }
124278
124419
  case 4:
124279
124420
  return _context0.a(2);
@@ -124298,18 +124439,18 @@ var isDebug = false || false === true;
124298
124439
  // 2. 公开API:允许外部或业务逻辑手动触发更新
124299
124440
  this.notifyCameraChange = function () {
124300
124441
  var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'api';
124301
- _this19._cameraChangeObserver(source);
124442
+ _this20._cameraChangeObserver(source);
124302
124443
  };
124303
124444
 
124304
124445
  // 3. 监听器 - Wheel (用户滚轮)
124305
124446
  this._wheelHandler = function (res) {
124306
- _this19.$emit('wheelStart', res);
124447
+ _this20.$emit('wheelStart', res);
124307
124448
 
124308
124449
  // 统一交互开始处理
124309
- _this19.beginInteraction('wheel');
124450
+ _this20.beginInteraction('wheel');
124310
124451
 
124311
124452
  // 设置滚轮交互的结束检测
124312
- _this19.scheduleWheelInteractionEnd(res, 100);
124453
+ _this20.scheduleWheelInteractionEnd(res, 100);
124313
124454
 
124314
124455
  // 滚轮逻辑:infinityDolly 与 maxDollyDistance 控制
124315
124456
  var event = res;
@@ -124325,10 +124466,10 @@ var isDebug = false || false === true;
124325
124466
 
124326
124467
  // dolly最大距离限制
124327
124468
  try {
124328
- if (_this19.sceneBoundingBox && isFinite(maxDollyDistance)) {
124469
+ if (_this20.sceneBoundingBox && isFinite(maxDollyDistance)) {
124329
124470
  if (isZoomOut) {
124330
- _this19.camera.updateMatrixWorld(true);
124331
- var currentDistance = _this19.camera.position.distanceTo(_this19.cameraControls._target);
124471
+ _this20.camera.updateMatrixWorld(true);
124472
+ var currentDistance = _this20.camera.position.distanceTo(_this20.cameraControls._target);
124332
124473
  if (currentDistance >= maxDollyDistance) {
124333
124474
  event.preventDefault && event.preventDefault();
124334
124475
  event.stopImmediatePropagation && event.stopImmediatePropagation();
@@ -124341,17 +124482,17 @@ var isDebug = false || false === true;
124341
124482
  }
124342
124483
 
124343
124484
  // 触发观察者
124344
- _this19._cameraChangeObserver('wheel');
124485
+ _this20._cameraChangeObserver('wheel');
124345
124486
  };
124346
124487
  this.renderer.domElement.addEventListener('wheel', this._wheelHandler);
124347
124488
 
124348
124489
  // 4. 监听器 - Controls (用户拖拽/操作)
124349
124490
  this._onControlStart = function (res) {
124350
- _this19.noObserver.isControlActive = true;
124491
+ _this20.noObserver.isControlActive = true;
124351
124492
 
124352
124493
  // 统一交互开始处理(相机)
124353
- _this19.beginInteraction('this.camera');
124354
- _this19.$emit('controlStart', res);
124494
+ _this20.beginInteraction('this.camera');
124495
+ _this20.$emit('controlStart', res);
124355
124496
 
124356
124497
  // 记录鼠标按下时的位置
124357
124498
  var event = res.originalEvent || window.event;
@@ -124363,10 +124504,10 @@ var isDebug = false || false === true;
124363
124504
  };
124364
124505
  this._onControlEnd = function (res) {
124365
124506
  _this.noObserver.isControlActive = false;
124366
- _this19.$emit('controlEnd', res);
124507
+ _this20.$emit('controlEnd', res);
124367
124508
 
124368
124509
  // 统一交互结束处理(相机)
124369
- _this19.endInteraction('this.camera', res, {
124510
+ _this20.endInteraction('this.camera', res, {
124370
124511
  immediateResume: false
124371
124512
  });
124372
124513
 
@@ -124395,7 +124536,7 @@ var isDebug = false || false === true;
124395
124536
  // }
124396
124537
 
124397
124538
  // 触发观察者
124398
- _this19._cameraChangeObserver('control');
124539
+ _this20._cameraChangeObserver('control');
124399
124540
  }
124400
124541
  };
124401
124542
  this.cameraControls.addEventListener('controlstart', this._onControlStart);
@@ -124405,7 +124546,7 @@ var isDebug = false || false === true;
124405
124546
  // 监听 rest 事件,捕获 this.cameraControls.setLookAt(..., true) 等动画结束(以及阻尼停止)
124406
124547
  // 注意:rest 事件在用户交互完全静止时也会触发,与 controlEnd 有部分重叠,但 Observer 有防抖,影响不大
124407
124548
  this._onRest = function () {
124408
- _this19._cameraChangeObserver('rest');
124549
+ _this20._cameraChangeObserver('rest');
124409
124550
  };
124410
124551
  this.cameraControls.addEventListener('rest', this._onRest);
124411
124552
  },
@@ -124432,7 +124573,7 @@ var isDebug = false || false === true;
124432
124573
  meshNameConfig: {}
124433
124574
  */
124434
124575
  drawModel: function drawModel(data) {
124435
- var _this20 = this;
124576
+ var _this21 = this;
124436
124577
  var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
124437
124578
  var meshNameConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
124438
124579
  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
@@ -124441,14 +124582,14 @@ var isDebug = false || false === true;
124441
124582
  // 使用新的分帧加载方法,提供进度回调
124442
124583
  return this.drawModelWithBatchLoading(data, color, meshNameConfig, options, function (progress) {
124443
124584
  // 触发原有的进度事件
124444
- _this20.$emit('loadProgress', _this20.progress);
124585
+ _this21.$emit('loadProgress', _this21.progress);
124445
124586
  }, function (complete) {
124446
124587
  var _options$onComplete2;
124447
124588
  options === null || options === void 0 || (_options$onComplete2 = options.onComplete) === null || _options$onComplete2 === void 0 || _options$onComplete2.call(options, complete);
124448
124589
  console.log('加载完成');
124449
124590
  // 触发原有的完成事件
124450
124591
  if (!(options !== null && options !== void 0 && options.suppressLoadComplete)) {
124451
- _this20.$emit('loadComplete');
124592
+ _this21.$emit('loadComplete');
124452
124593
  }
124453
124594
  });
124454
124595
  },
@@ -124475,13 +124616,14 @@ var isDebug = false || false === true;
124475
124616
  };
124476
124617
  },
124477
124618
  mouseDown: function mouseDown(event) {
124478
- var _this21 = this;
124619
+ var _this22 = this;
124479
124620
  // 在鼠标按下时启用渲染中断以提升响应性
124480
124621
  this.forceSkipRendering = true;
124481
124622
  this.skipNextRenderFrame = true;
124482
124623
  var intersects = this.getRaycasterObjects(event);
124624
+ console.log(intersects);
124483
124625
  var shouldBlockCamera = intersects.some(function (item) {
124484
- return _this21.isActiveTransformControlIntersection(item);
124626
+ return _this22.isActiveTransformControlIntersection(item);
124485
124627
  });
124486
124628
  if (shouldBlockCamera) {
124487
124629
  this.setPointerCameraGuard(true);
@@ -124513,7 +124655,13 @@ var isDebug = false || false === true;
124513
124655
  this.mouse.x = x / rect.width * 2 - 1;
124514
124656
  this.mouse.y = -(y / rect.height) * 2 + 1;
124515
124657
  this.raycaster.setFromCamera(this.mouse, this.camera);
124516
- return this.scene && this.scene.children ? this.raycaster.intersectObjects(this.scene.children, true) : [];
124658
+ if (this.scene && this.scene.children) {
124659
+ var intersects = this.raycaster.intersectObjects(this.scene.children, true);
124660
+ return intersects.filter(function (item) {
124661
+ return item.object.type === 'Mesh';
124662
+ });
124663
+ }
124664
+ return [];
124517
124665
  },
124518
124666
  isTransformControlIntersection: function isTransformControlIntersection(intersection) {
124519
124667
  var current = intersection && intersection.object ? intersection.object : null;
@@ -124535,19 +124683,19 @@ var isDebug = false || false === true;
124535
124683
  return this.isTransformControlIntersection(intersection);
124536
124684
  },
124537
124685
  getPrimaryIntersection: function getPrimaryIntersection() {
124538
- var _this22 = this;
124686
+ var _this23 = this;
124539
124687
  var intersects = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
124540
124688
  if (!Array.isArray(intersects) || intersects.length === 0) {
124541
124689
  return null;
124542
124690
  }
124543
124691
  var validIntersects = intersects.filter(function (item) {
124544
- return item && item.object && !_this22.isTransformControlIntersection(item);
124692
+ return item && item.object && !_this23.isTransformControlIntersection(item);
124545
124693
  });
124546
124694
  if (validIntersects.length === 0) {
124547
124695
  return null;
124548
124696
  }
124549
124697
  var selectableIntersect = validIntersects.find(function (item) {
124550
- return _this22.getSelectableSceneObject(item.object);
124698
+ return _this23.getSelectableSceneObject(item.object);
124551
124699
  });
124552
124700
  return selectableIntersect || validIntersects[0] || null;
124553
124701
  },
@@ -124619,13 +124767,13 @@ var isDebug = false || false === true;
124619
124767
  }
124620
124768
  },
124621
124769
  mouseClick: function mouseClick(event) {
124622
- var _this23 = this;
124770
+ var _this24 = this;
124623
124771
  // 鼠标抬起时重置渲染中断标记
124624
124772
  setTimeout(function () {
124625
- _this23.forceSkipRendering = false;
124773
+ _this24.forceSkipRendering = false;
124626
124774
  // interactionFrameCount = 0;
124627
124775
  // 恢复批次加载操作
124628
- _this23.resumeBatchLoading();
124776
+ _this24.resumeBatchLoading();
124629
124777
  }, 50); // 短暂延迟确保交互完成
124630
124778
 
124631
124779
  // 在测量模式下,不进行事件暴露
@@ -124684,21 +124832,21 @@ var isDebug = false || false === true;
124684
124832
  this.setPointerCameraGuard(false);
124685
124833
  this.$emit('rightClick', params);
124686
124834
  onContextHandle(event, 'fl-model', '隐藏', this.isolateMode ? '取消隔离' : '隔离', function () {
124687
- _this23.updateProperty([{
124835
+ _this24.updateProperty([{
124688
124836
  name: params.instanceId,
124689
124837
  attr: {
124690
124838
  visible: false
124691
124839
  }
124692
124840
  }]);
124693
124841
  }, function () {
124694
- _this23.setAllModelVisible(_this23.isolateMode);
124695
- _this23.updateProperty([{
124842
+ _this24.setAllModelVisible(_this24.isolateMode);
124843
+ _this24.updateProperty([{
124696
124844
  name: params.instanceId,
124697
124845
  attr: {
124698
124846
  visible: true
124699
124847
  }
124700
124848
  }]);
124701
- _this23.isolateMode = !_this23.isolateMode;
124849
+ _this24.isolateMode = !_this24.isolateMode;
124702
124850
  });
124703
124851
  }
124704
124852
  } else if (event.button === 2) {
@@ -124706,21 +124854,21 @@ var isDebug = false || false === true;
124706
124854
  this.setPointerCameraGuard(false);
124707
124855
  this.$emit('rightClick', params);
124708
124856
  onContextHandle(event, 'fl-model', '隐藏', this.isolateMode ? '取消隔离' : '隔离', function () {
124709
- _this23.updateProperty([{
124857
+ _this24.updateProperty([{
124710
124858
  name: params.instanceId,
124711
124859
  attr: {
124712
124860
  visible: false
124713
124861
  }
124714
124862
  }]);
124715
124863
  }, function () {
124716
- _this23.setAllModelVisible(_this23.isolateMode);
124717
- _this23.updateProperty([{
124864
+ _this24.setAllModelVisible(_this24.isolateMode);
124865
+ _this24.updateProperty([{
124718
124866
  name: params.instanceId,
124719
124867
  attr: {
124720
124868
  visible: true
124721
124869
  }
124722
124870
  }]);
124723
- _this23.isolateMode = !_this23.isolateMode;
124871
+ _this24.isolateMode = !_this24.isolateMode;
124724
124872
  });
124725
124873
  }
124726
124874
  }
@@ -124800,7 +124948,7 @@ var isDebug = false || false === true;
124800
124948
  },
124801
124949
  // 带防抖和用户交互检测的智能居中方法
124802
124950
  smartModelCenter: function smartModelCenter(mesh) {
124803
- var _this24 = this;
124951
+ var _this25 = this;
124804
124952
  var debounceDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
124805
124953
  // if (this.hasExecutedCentering) {
124806
124954
  // return;
@@ -124820,13 +124968,13 @@ var isDebug = false || false === true;
124820
124968
  // 设置新的防抖定时器
124821
124969
  this.centeringDebounceTimer = setTimeout(function () {
124822
124970
  // 如果已经执行过居中操作,则不再执行
124823
- if (!_this24.userInteracting && !_this24.hasExecutedCentering && _this24.noObserver.documentModelIds.size > 0) {
124824
- _this24.setModelCenter(mesh, {
124971
+ if (!_this25.userInteracting && !_this25.hasExecutedCentering && _this25.noObserver.documentModelIds.size > 0) {
124972
+ _this25.setModelCenter(mesh, {
124825
124973
  enableTransition: false
124826
124974
  });
124827
- _this24.hasExecutedCentering = true;
124975
+ _this25.hasExecutedCentering = true;
124828
124976
  // 触发场景更新
124829
- _this24.notifyCameraChange();
124977
+ _this25.notifyCameraChange();
124830
124978
  }
124831
124979
  }, debounceDelay);
124832
124980
  },
@@ -124850,14 +124998,14 @@ var isDebug = false || false === true;
124850
124998
  * }
124851
124999
  */
124852
125000
  updateProperty: function updateProperty(list) {
124853
- var _this25 = this;
125001
+ var _this26 = this;
124854
125002
  var hasOutline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
124855
125003
  var isUpdate = false;
124856
125004
  var _loop = function _loop() {
124857
125005
  var ele = list[index];
124858
125006
  var type = ele.type || 'mesh';
124859
125007
  var instanceId = ele.name;
124860
- var targetObj = _this25.getObjectByName(instanceId);
125008
+ var targetObj = _this26.getObjectByName(instanceId);
124861
125009
  var _loop2 = function _loop2(key) {
124862
125010
  switch (key) {
124863
125011
  case 'color':
@@ -124867,19 +125015,19 @@ var isDebug = false || false === true;
124867
125015
  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);
124868
125016
  if (!instanceInfo) return;
124869
125017
  var instanceIndex = instanceInfo.instanceIndex;
124870
- children.setColorAt(instanceIndex, new _this25.THREE.Color(ele.attr[key]));
125018
+ children.setColorAt(instanceIndex, new _this26.THREE.Color(ele.attr[key]));
124871
125019
  children.instanceColor.needsUpdate = true;
124872
- if (!_this25.isCurrentVisible(instanceId, children)) {
124873
- _this25.removeOutlineObject(children, instanceIndex);
125020
+ if (!_this26.isCurrentVisible(instanceId, children)) {
125021
+ _this26.removeOutlineObject(children, instanceIndex);
124874
125022
  return;
124875
125023
  }
124876
125024
  if (hasOutline) {
124877
- if (_this25.outlinePass) {
125025
+ if (_this26.outlinePass) {
124878
125026
  if (children.isInstancedMesh) {
124879
- var proxy = _this25.ensureOutlineInstanceProxy(children, instanceIndex);
124880
- _this25.pushOutlineTarget(proxy);
124881
- } else if (!_this25.isSourceHiddenInstance(children, instanceId)) {
124882
- _this25.pushOutlineTarget(children);
125027
+ var proxy = _this26.ensureOutlineInstanceProxy(children, instanceIndex);
125028
+ _this26.pushOutlineTarget(proxy);
125029
+ } else if (!_this26.isSourceHiddenInstance(children, instanceId)) {
125030
+ _this26.pushOutlineTarget(children);
124883
125031
  }
124884
125032
  }
124885
125033
  }
@@ -124892,10 +125040,10 @@ var isDebug = false || false === true;
124892
125040
  isUpdate = true;
124893
125041
  }
124894
125042
  var requestedVisible = Boolean(ele.attr[key]);
124895
- var nextBoxVisible = requestedVisible && _this25.isSourceVisible(instanceId);
124896
- var boxKey = _this25._boxIndex && _this25._boxIndex.has(String(instanceId)) ? String(instanceId) : instanceId;
124897
- if (_this25._boxIndex && _this25._boxIndex.has(boxKey)) {
124898
- var boxData = _this25._boxIndex.get(boxKey);
125043
+ var nextBoxVisible = requestedVisible && _this26.isSourceVisible(instanceId);
125044
+ var boxKey = _this26._boxIndex && _this26._boxIndex.has(String(instanceId)) ? String(instanceId) : instanceId;
125045
+ if (_this26._boxIndex && _this26._boxIndex.has(boxKey)) {
125046
+ var boxData = _this26._boxIndex.get(boxKey);
124899
125047
  if (boxData && boxData.userData) {
124900
125048
  boxData.userData.visible = nextBoxVisible;
124901
125049
  }
@@ -124905,21 +125053,21 @@ var isDebug = false || false === true;
124905
125053
  if (!instanceInfo) return;
124906
125054
  var instanceIndex = instanceInfo.instanceIndex,
124907
125055
  copyMatrix = instanceInfo.copyMatrix;
124908
- var nextVisible = requestedVisible && _this25.isSourceVisible(instanceId, children);
125056
+ var nextVisible = requestedVisible && _this26.isSourceVisible(instanceId, children);
124909
125057
  instanceInfo.visible = nextVisible;
124910
125058
  if (nextVisible) {
124911
- var restoreMatrix = new _this25.THREE.Matrix4().copy(copyMatrix || children.userData.copyMatrix);
125059
+ var restoreMatrix = new _this26.THREE.Matrix4().copy(copyMatrix || children.userData.copyMatrix);
124912
125060
  children.setMatrixAt(instanceIndex, restoreMatrix);
124913
125061
  } else {
124914
- var _copyMatrix = _this25.getInstanceCopyMatrix(children, instanceId);
125062
+ var _copyMatrix = _this26.getInstanceCopyMatrix(children, instanceId);
124915
125063
  if (!_copyMatrix) return;
124916
- var offsetMatrix = new _this25.THREE.Matrix4().copy(_copyMatrix || children.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
125064
+ var offsetMatrix = new _this26.THREE.Matrix4().copy(_copyMatrix || children.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
124917
125065
  children.setMatrixAt(instanceIndex, offsetMatrix);
124918
- _this25.removeOutlineObject(children, instanceIndex);
125066
+ _this26.removeOutlineObject(children, instanceIndex);
124919
125067
  }
124920
125068
  children.instanceMatrix.needsUpdate = true;
124921
125069
  });
124922
- _this25.notifyCameraChange(); // 触发场景更新
125070
+ _this26.notifyCameraChange(); // 触发场景更新
124923
125071
  break;
124924
125072
  }
124925
125073
  case 'opacity':
@@ -124956,13 +125104,13 @@ var isDebug = false || false === true;
124956
125104
  }
124957
125105
  },
124958
125106
  setAllModelVisible: function setAllModelVisible(visible) {
124959
- var _this26 = this;
125107
+ var _this27 = this;
124960
125108
  var isVisible = Boolean(visible);
124961
125109
  var matrixCache = new this.THREE.Matrix4();
124962
125110
  if (this._boxIndex && this._boxIndex.size > 0) {
124963
125111
  this._boxIndex.forEach(function (box, modelId) {
124964
125112
  if (!box || !box.userData) return;
124965
- box.userData.visible = isVisible && _this26.isSourceVisible(modelId);
125113
+ box.userData.visible = isVisible && _this27.isSourceVisible(modelId);
124966
125114
  });
124967
125115
  }
124968
125116
  if (this.scene) {
@@ -124975,7 +125123,7 @@ var isDebug = false || false === true;
124975
125123
  var instanceIndex = instanceInfo && typeof instanceInfo.instanceIndex === 'number' ? instanceInfo.instanceIndex : null;
124976
125124
  if (instanceIndex === null) return;
124977
125125
  var copyMatrix = instanceInfo.copyMatrix || userData.copyMatrix;
124978
- if (isVisible && _this26.isSourceVisible(instanceId, child)) {
125126
+ if (isVisible && _this27.isSourceVisible(instanceId, child)) {
124979
125127
  instanceInfo.visible = true;
124980
125128
  matrixCache.copy(copyMatrix);
124981
125129
  child.setMatrixAt(instanceIndex, matrixCache);
@@ -124983,7 +125131,7 @@ var isDebug = false || false === true;
124983
125131
  instanceInfo.visible = false;
124984
125132
  matrixCache.copy(copyMatrix).makeTranslation(9999999, 9999999, 9999999);
124985
125133
  child.setMatrixAt(instanceIndex, matrixCache);
124986
- _this26.removeOutlineObject(child, instanceIndex);
125134
+ _this27.removeOutlineObject(child, instanceIndex);
124987
125135
  }
124988
125136
  });
124989
125137
  child.instanceMatrix.needsUpdate = true;
@@ -125007,7 +125155,7 @@ var isDebug = false || false === true;
125007
125155
  }
125008
125156
  },
125009
125157
  showOutlinePass: function showOutlinePass(instanceId) {
125010
- var _this27 = this;
125158
+ var _this28 = this;
125011
125159
  var targetObj = this.getObjectByName(instanceId);
125012
125160
  targetObj.forEach(function (children) {
125013
125161
  if (children.isMesh) {
@@ -125015,27 +125163,27 @@ var isDebug = false || false === true;
125015
125163
  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);
125016
125164
  if (!instanceInfo) return;
125017
125165
  var instanceIndex = instanceInfo.instanceIndex;
125018
- if (!_this27.isSourceVisible(instanceId, children)) {
125019
- _this27.removeOutlineObject(children, instanceIndex);
125166
+ if (!_this28.isSourceVisible(instanceId, children)) {
125167
+ _this28.removeOutlineObject(children, instanceIndex);
125020
125168
  return;
125021
125169
  }
125022
- if (!_this27.isCurrentVisible(instanceId, children)) {
125023
- _this27.removeOutlineObject(children, instanceIndex);
125170
+ if (!_this28.isCurrentVisible(instanceId, children)) {
125171
+ _this28.removeOutlineObject(children, instanceIndex);
125024
125172
  return;
125025
125173
  }
125026
- if (_this27.outlinePass) {
125174
+ if (_this28.outlinePass) {
125027
125175
  if (children.isInstancedMesh) {
125028
- var proxy = _this27.ensureOutlineInstanceProxy(children, instanceIndex);
125029
- _this27.pushOutlineTarget(proxy);
125176
+ var proxy = _this28.ensureOutlineInstanceProxy(children, instanceIndex);
125177
+ _this28.pushOutlineTarget(proxy);
125030
125178
  } else {
125031
- _this27.pushOutlineTarget(children);
125179
+ _this28.pushOutlineTarget(children);
125032
125180
  }
125033
125181
  }
125034
125182
  }
125035
125183
  });
125036
125184
  },
125037
125185
  hideOutlinePass: function hideOutlinePass(instanceId) {
125038
- var _this28 = this;
125186
+ var _this29 = this;
125039
125187
  var targetObj = this.getObjectByName(instanceId);
125040
125188
  targetObj.forEach(function (children) {
125041
125189
  if (children.isMesh) {
@@ -125043,7 +125191,7 @@ var isDebug = false || false === true;
125043
125191
  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);
125044
125192
  if (!instanceInfo) return;
125045
125193
  var instanceIndex = instanceInfo.instanceIndex;
125046
- _this28.removeOutlineObject(children, instanceIndex);
125194
+ _this29.removeOutlineObject(children, instanceIndex);
125047
125195
  }
125048
125196
  });
125049
125197
  },
@@ -125066,17 +125214,17 @@ var isDebug = false || false === true;
125066
125214
  },
125067
125215
  // 修改材质的自定义数据
125068
125216
  updateMaterialUserData: function updateMaterialUserData(list) {
125069
- var _this29 = this;
125217
+ var _this30 = this;
125070
125218
  var _loop3 = function _loop3() {
125071
125219
  var ele = list[index];
125072
125220
  var instanceId = ele.name;
125073
- var targetObj = _this29.getObjectByName(instanceId);
125221
+ var targetObj = _this30.getObjectByName(instanceId);
125074
125222
  var _loop4 = function _loop4(key) {
125075
125223
  switch (key) {
125076
125224
  case 'nColor':
125077
125225
  targetObj.forEach(function (children) {
125078
125226
  if (children.isMesh) {
125079
- children.material.userData[key] = new _this29.THREE.Color(ele.attr[key]);
125227
+ children.material.userData[key] = new _this30.THREE.Color(ele.attr[key]);
125080
125228
  }
125081
125229
  });
125082
125230
  break;
@@ -125092,12 +125240,12 @@ var isDebug = false || false === true;
125092
125240
  },
125093
125241
  // 重置
125094
125242
  resetMaterialUserData: function resetMaterialUserData(list) {
125095
- var _this30 = this;
125243
+ var _this31 = this;
125096
125244
  console.log('resetMaterialUserData');
125097
125245
  var _loop5 = function _loop5() {
125098
125246
  var ele = list[index];
125099
125247
  var instanceId = ele.name;
125100
- var targetObj = _this30.getObjectByName(instanceId);
125248
+ var targetObj = _this31.getObjectByName(instanceId);
125101
125249
  var _loop6 = function _loop6(key) {
125102
125250
  switch (key) {
125103
125251
  case 'nColor':
@@ -125125,11 +125273,11 @@ var isDebug = false || false === true;
125125
125273
  },
125126
125274
  // 清除上一次的属性修改操作 为了方便业务平台参数跟updateProperty方法的参数一样
125127
125275
  resetProperty: function resetProperty(list) {
125128
- var _this31 = this;
125276
+ var _this32 = this;
125129
125277
  var _loop7 = function _loop7() {
125130
125278
  var ele = list[index];
125131
125279
  var instanceId = ele.name;
125132
- var obj = _this31.getObjectByName(instanceId);
125280
+ var obj = _this32.getObjectByName(instanceId);
125133
125281
  if (obj) {
125134
125282
  for (var key in ele.attr) {
125135
125283
  switch (key) {
@@ -125142,12 +125290,12 @@ var isDebug = false || false === true;
125142
125290
  var instanceIndex = instanceInfo.instanceIndex;
125143
125291
  children.setColorAt(instanceIndex, children.material.userData.nColor);
125144
125292
  children.instanceColor.needsUpdate = true;
125145
- if (_this31.outlinePass) {
125293
+ if (_this32.outlinePass) {
125146
125294
  if (children.isInstancedMesh) {
125147
- _this31.removeOutlineInstanceProxy(children, instanceIndex);
125295
+ _this32.removeOutlineInstanceProxy(children, instanceIndex);
125148
125296
  } else {
125149
- var idx = _this31.outlinePass.selectedObjects.indexOf(children);
125150
- if (idx !== -1) _this31.outlinePass.selectedObjects.splice(idx, 1);
125297
+ var idx = _this32.outlinePass.selectedObjects.indexOf(children);
125298
+ if (idx !== -1) _this32.outlinePass.selectedObjects.splice(idx, 1);
125151
125299
  }
125152
125300
  }
125153
125301
  }
@@ -125160,15 +125308,15 @@ var isDebug = false || false === true;
125160
125308
  if (!instanceInfo) return;
125161
125309
  var instanceIndex = instanceInfo.instanceIndex,
125162
125310
  copyMatrix = instanceInfo.copyMatrix;
125163
- if (_this31.isSourceVisible(instanceId, children)) {
125311
+ if (_this32.isSourceVisible(instanceId, children)) {
125164
125312
  instanceInfo.visible = true;
125165
- var restoreMatrix = new _this31.THREE.Matrix4().copy(copyMatrix);
125313
+ var restoreMatrix = new _this32.THREE.Matrix4().copy(copyMatrix);
125166
125314
  children.setMatrixAt(instanceIndex, restoreMatrix);
125167
125315
  } else {
125168
125316
  instanceInfo.visible = false;
125169
- var offsetMatrix = new _this31.THREE.Matrix4().copy(copyMatrix).makeTranslation(9999999, 9999999, 9999999);
125317
+ var offsetMatrix = new _this32.THREE.Matrix4().copy(copyMatrix).makeTranslation(9999999, 9999999, 9999999);
125170
125318
  children.setMatrixAt(instanceIndex, offsetMatrix);
125171
- _this31.removeOutlineObject(children, instanceIndex);
125319
+ _this32.removeOutlineObject(children, instanceIndex);
125172
125320
  }
125173
125321
  children.instanceMatrix.needsUpdate = true;
125174
125322
  });
@@ -125220,19 +125368,19 @@ var isDebug = false || false === true;
125220
125368
  // 定位到模型
125221
125369
  // name 模型名称或运行态 uuid,可以是数组
125222
125370
  locateModel: function locateModel(name) {
125223
- var _this32 = this;
125371
+ var _this33 = this;
125224
125372
  if (!this.scene) return false;
125225
125373
  if (Array.isArray(name)) {
125226
125374
  var box3 = new this.THREE.Box3();
125227
125375
  name.forEach(function (n) {
125228
- var objectByUuid = _this32.getObjectByUuid(n);
125376
+ var objectByUuid = _this33.getObjectByUuid(n);
125229
125377
  if (objectByUuid) {
125230
- _this32.expandLocateBoxByObject(box3, objectByUuid);
125378
+ _this33.expandLocateBoxByObject(box3, objectByUuid);
125231
125379
  return;
125232
125380
  }
125233
- var arr = _this32.getObjectByName(n);
125381
+ var arr = _this33.getObjectByName(n);
125234
125382
  arr.forEach(function (o) {
125235
- _this32.expandLocateBoxByObject(box3, o);
125383
+ _this33.expandLocateBoxByObject(box3, o);
125236
125384
  });
125237
125385
  });
125238
125386
  if (!box3.isEmpty()) {
@@ -125277,14 +125425,14 @@ var isDebug = false || false === true;
125277
125425
  }
125278
125426
  */
125279
125427
  updatePropertyByCustom: function updatePropertyByCustom(params) {
125280
- var _this33 = this;
125428
+ var _this34 = this;
125281
125429
  if (!this.scene) return;
125282
125430
  this.scene.traverse(function (child) {
125283
125431
  if (child.isMesh && child.userData[params.customName] === params.customValue) {
125284
125432
  for (var key in params.attr) {
125285
125433
  switch (key) {
125286
125434
  case 'color':
125287
- child.setColorAt(obj.userData.instanceIndex, new _this33.THREE.Color(params.attr[key]));
125435
+ child.setColorAt(obj.userData.instanceIndex, new _this34.THREE.Color(params.attr[key]));
125288
125436
  child.instanceColor.needsUpdate = true;
125289
125437
  break;
125290
125438
  case 'visible':
@@ -125358,14 +125506,14 @@ var isDebug = false || false === true;
125358
125506
  passType: 要过滤的类型,默认是group,不返回group类型的实体
125359
125507
  */
125360
125508
  getObjectByName: function getObjectByName(name) {
125361
- var _this34 = this;
125509
+ var _this35 = this;
125362
125510
  var passType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'group';
125363
125511
  if (!this.scene) return [];
125364
125512
  if (Array.isArray(name)) {
125365
125513
  var result = [];
125366
125514
  var exist = new Set();
125367
125515
  name.forEach(function (item) {
125368
- _this34.getObjectByName(item, passType).forEach(function (obj) {
125516
+ _this35.getObjectByName(item, passType).forEach(function (obj) {
125369
125517
  if (!obj || exist.has(obj.uuid)) return;
125370
125518
  exist.add(obj.uuid);
125371
125519
  result.push(obj);
@@ -125403,12 +125551,12 @@ var isDebug = false || false === true;
125403
125551
  return modelState.colorConfig;
125404
125552
  },
125405
125553
  addBypassCullingModelIds: function addBypassCullingModelIds(modelIds) {
125406
- var _this35 = this;
125554
+ var _this36 = this;
125407
125555
  var modelState = this.noObserver ? this.noObserver.modelStateManager : this.modelStateManager;
125408
125556
  if (!modelIds) return;
125409
125557
  if (Array.isArray(modelIds)) {
125410
125558
  modelIds.forEach(function (id) {
125411
- var modelId = _this35.formatModelId(id);
125559
+ var modelId = _this36.formatModelId(id);
125412
125560
  modelState.bypassCullingModelIds.add(modelId);
125413
125561
  });
125414
125562
  } else {
@@ -125421,12 +125569,12 @@ var isDebug = false || false === true;
125421
125569
  return com_graphicsvue_type_script_lang_js_toConsumableArray(modelState.bypassCullingModelIds);
125422
125570
  },
125423
125571
  removeBypassCullingModelIds: function removeBypassCullingModelIds(modelIds) {
125424
- var _this36 = this;
125572
+ var _this37 = this;
125425
125573
  var modelState = this.noObserver ? this.noObserver.modelStateManager : this.modelStateManager;
125426
125574
  if (!modelIds) return;
125427
125575
  if (Array.isArray(modelIds)) {
125428
125576
  modelIds.forEach(function (id) {
125429
- var modelId = _this36.formatModelId(id);
125577
+ var modelId = _this37.formatModelId(id);
125430
125578
  modelState.bypassCullingModelIds.delete(modelId);
125431
125579
  });
125432
125580
  } else {
@@ -125440,7 +125588,7 @@ var isDebug = false || false === true;
125440
125588
  },
125441
125589
  // 通过id删除对象
125442
125590
  removeObjectById: function removeObjectById(id) {
125443
- var _this37 = this;
125591
+ var _this38 = this;
125444
125592
  if (!this.scene) return;
125445
125593
  var array = this.getObjectByName(id);
125446
125594
  array.forEach(function (item) {
@@ -125450,13 +125598,13 @@ var isDebug = false || false === true;
125450
125598
  if (item.isMesh) {
125451
125599
  item.clear();
125452
125600
  }
125453
- _this37.scene.remove(item);
125601
+ _this38.scene.remove(item);
125454
125602
  }
125455
125603
  });
125456
125604
  },
125457
125605
  // 通过名称删除对象
125458
125606
  removeObjectByName: function removeObjectByName(name) {
125459
- var _this38 = this;
125607
+ var _this39 = this;
125460
125608
  if (!this.scene) return;
125461
125609
  var array = this.getObjectByName(name);
125462
125610
  array.forEach(function (item) {
@@ -125465,17 +125613,17 @@ var isDebug = false || false === true;
125465
125613
  if (item.isMesh) {
125466
125614
  item.clear();
125467
125615
  }
125468
- if (_this38.scene) _this38.scene.remove(item);
125616
+ if (_this39.scene) _this39.scene.remove(item);
125469
125617
  });
125470
125618
  },
125471
125619
  // 删除场景中所有的实体
125472
125620
  removeAll: function removeAll() {
125473
- var _this39 = this;
125621
+ var _this40 = this;
125474
125622
  return new Promise(function (resolve) {
125475
- if (_this39.scene) {
125476
- _this39.removeAllCustomElements();
125477
- _this39.removeTraverse();
125478
- _this39.removeModelByDocumentId();
125623
+ if (_this40.scene) {
125624
+ _this40.removeAllCustomElements();
125625
+ _this40.removeTraverse();
125626
+ _this40.removeModelByDocumentId();
125479
125627
  resolve();
125480
125628
  } else {
125481
125629
  resolve();
@@ -125483,7 +125631,7 @@ var isDebug = false || false === true;
125483
125631
  });
125484
125632
  },
125485
125633
  removeTraverse: function removeTraverse() {
125486
- var _this40 = this;
125634
+ var _this41 = this;
125487
125635
  if (!this.modelGroup) return;
125488
125636
  var length = this.modelGroup.children.length;
125489
125637
  if (length > 0) {
@@ -125496,7 +125644,7 @@ var isDebug = false || false === true;
125496
125644
  item.clear();
125497
125645
  item.material = null;
125498
125646
  item.geometry = null;
125499
- _this40.modelGroup && _this40.modelGroup.remove(item);
125647
+ _this41.modelGroup && _this41.modelGroup.remove(item);
125500
125648
  item = null;
125501
125649
  }
125502
125650
  });
@@ -125513,7 +125661,7 @@ var isDebug = false || false === true;
125513
125661
  },
125514
125662
  // 销毁场景 释放内存
125515
125663
  destroyScene: function destroyScene() {
125516
- var _this41 = this;
125664
+ var _this42 = this;
125517
125665
  cancelAnimationFrame(this.animateId);
125518
125666
  this.disposeTransformControls();
125519
125667
  if (this.sceneCommandEventDisposers.length > 0) {
@@ -125528,11 +125676,11 @@ var isDebug = false || false === true;
125528
125676
  }
125529
125677
  if (this.noObserver && this.noObserver.outlineInstanceProxyMap) {
125530
125678
  this.noObserver.outlineInstanceProxyMap.forEach(function (proxy) {
125531
- if (_this41.outlinePass) {
125532
- var idx = _this41.outlinePass.selectedObjects.indexOf(proxy);
125533
- if (idx !== -1) _this41.outlinePass.selectedObjects.splice(idx, 1);
125679
+ if (_this42.outlinePass) {
125680
+ var idx = _this42.outlinePass.selectedObjects.indexOf(proxy);
125681
+ if (idx !== -1) _this42.outlinePass.selectedObjects.splice(idx, 1);
125534
125682
  }
125535
- if (_this41.scene) _this41.scene.remove(proxy);
125683
+ if (_this42.scene) _this42.scene.remove(proxy);
125536
125684
  if (proxy && proxy.material && proxy.material.dispose) proxy.material.dispose();
125537
125685
  });
125538
125686
  this.noObserver.outlineInstanceProxyMap.clear();
@@ -125646,11 +125794,11 @@ var isDebug = false || false === true;
125646
125794
  }
125647
125795
  */
125648
125796
  drawCurve: function drawCurve(params) {
125649
- var _this42 = this;
125797
+ var _this43 = this;
125650
125798
  this.removeObjectByName(params.name);
125651
125799
  var route = [];
125652
125800
  params.path.forEach(function (element) {
125653
- route.push(new _this42.THREE.Vector3(element.x, element.y, element.z));
125801
+ route.push(new _this43.THREE.Vector3(element.x, element.y, element.z));
125654
125802
  });
125655
125803
  if (route.length > 1) {
125656
125804
  this.curve = new this.THREE.CatmullRomCurve3(route);
@@ -125674,11 +125822,11 @@ var isDebug = false || false === true;
125674
125822
  }
125675
125823
  */
125676
125824
  drawTextureCurve: function drawTextureCurve(params) {
125677
- var _this43 = this;
125825
+ var _this44 = this;
125678
125826
  this.removeObjectByName(params.name);
125679
125827
  var route = [];
125680
125828
  params.path.forEach(function (element) {
125681
- route.push(new _this43.THREE.Vector3(element.x, element.y, element.z));
125829
+ route.push(new _this44.THREE.Vector3(element.x, element.y, element.z));
125682
125830
  });
125683
125831
  // 画曲线
125684
125832
  if (route.length > 1) {
@@ -125783,14 +125931,14 @@ var isDebug = false || false === true;
125783
125931
  * 参数val: 爆炸的值
125784
125932
  */
125785
125933
  globalBomb: function globalBomb(val) {
125786
- var _this44 = this;
125934
+ var _this45 = this;
125787
125935
  if (this.scene.children.length === 0) return;
125788
125936
  for (var i = 0; i < this.scene.children.length; i++) {
125789
125937
  console.log('this.scene', this.scene);
125790
125938
  this.scene.children[i].traverse(function (item) {
125791
125939
  if (!item.isMesh || !item.worldDir) return;
125792
125940
  // 爆炸公式
125793
- _this44.computedBomb(item, val);
125941
+ _this45.computedBomb(item, val);
125794
125942
  });
125795
125943
  }
125796
125944
  // this.timeRender();
@@ -125832,13 +125980,13 @@ var isDebug = false || false === true;
125832
125980
  return object.type === 'CSS2DObject' || object.type === 'TransformControlsRoot';
125833
125981
  },
125834
125982
  getGlobalClippingRoots: function getGlobalClippingRoots() {
125835
- var _this45 = this;
125983
+ var _this46 = this;
125836
125984
  if (this.modelGroup && this.modelGroup.children && this.modelGroup.children.length) {
125837
125985
  return [this.modelGroup];
125838
125986
  }
125839
125987
  if (!this.scene || !this.scene.children || this.scene.children.length === 0) return [];
125840
125988
  return this.scene.children.filter(function (child) {
125841
- return !_this45.isGlobalClippingExcludedNode(child);
125989
+ return !_this46.isGlobalClippingExcludedNode(child);
125842
125990
  });
125843
125991
  },
125844
125992
  getGlobalClippingBox: function getGlobalClippingBox() {
@@ -126087,71 +126235,71 @@ var isDebug = false || false === true;
126087
126235
  },
126088
126236
  // 页面是否锁定
126089
126237
  initPointerLock: function initPointerLock() {
126090
- var _this46 = this;
126238
+ var _this47 = this;
126091
126239
  this.home();
126092
126240
  setTimeout(function () {
126093
126241
  // 开启第一视角时,将相机与水平面保持水平
126094
- _this46.camera.rotation.x = 0;
126095
- _this46.camera.rotation.z = 0;
126096
- _this46.pointControls = new PointerLockControls(_this46.camera, _this46.renderer.domElement);
126097
- _this46.pointControls.lock();
126098
- if (!_this46._onFirstPersonChange) {
126099
- _this46._onFirstPersonChange = function () {
126100
- if (typeof _this46._cameraChangeObserver === 'function') {
126101
- _this46._cameraChangeObserver('firstPerson');
126242
+ _this47.camera.rotation.x = 0;
126243
+ _this47.camera.rotation.z = 0;
126244
+ _this47.pointControls = new PointerLockControls(_this47.camera, _this47.renderer.domElement);
126245
+ _this47.pointControls.lock();
126246
+ if (!_this47._onFirstPersonChange) {
126247
+ _this47._onFirstPersonChange = function () {
126248
+ if (typeof _this47._cameraChangeObserver === 'function') {
126249
+ _this47._cameraChangeObserver('firstPerson');
126102
126250
  }
126103
126251
  };
126104
126252
  }
126105
126253
  try {
126106
- _this46.pointControls.addEventListener('change', _this46._onFirstPersonChange);
126254
+ _this47.pointControls.addEventListener('change', _this47._onFirstPersonChange);
126107
126255
  } catch (e) {}
126108
126256
  // 锁定
126109
- _this46.pointControls.addEventListener('lock', function () {
126110
- _this46.detachTransformControls();
126111
- if (_this46.cameraControls) {
126112
- _this46.cameraControls.enabled = false;
126257
+ _this47.pointControls.addEventListener('lock', function () {
126258
+ _this47.detachTransformControls();
126259
+ if (_this47.cameraControls) {
126260
+ _this47.cameraControls.enabled = false;
126113
126261
  }
126114
- window.addEventListener('keydown', _this46.onKeyDown, false);
126115
- window.addEventListener('keyup', _this46.onKeyUp, false);
126116
- _this46.unbindScenePointerEvents();
126117
- if (typeof _this46._cameraChangeObserver === 'function') {
126118
- _this46._cameraChangeObserver('firstPersonLock');
126262
+ window.addEventListener('keydown', _this47.onKeyDown, false);
126263
+ window.addEventListener('keyup', _this47.onKeyUp, false);
126264
+ _this47.unbindScenePointerEvents();
126265
+ if (typeof _this47._cameraChangeObserver === 'function') {
126266
+ _this47._cameraChangeObserver('firstPersonLock');
126119
126267
  }
126120
126268
  });
126121
126269
  // 解锁
126122
- _this46.pointControls.addEventListener('unlock', function () {
126123
- _this46.firstPerSign = false;
126124
- if (_this46.cameraControls) {
126125
- _this46.cameraControls.enabled = true;
126270
+ _this47.pointControls.addEventListener('unlock', function () {
126271
+ _this47.firstPerSign = false;
126272
+ if (_this47.cameraControls) {
126273
+ _this47.cameraControls.enabled = true;
126126
126274
  }
126127
126275
  // 返回初始视角
126128
- if (_this46.cameraControls && _this46.camera && _this46.sceneBoundingBox) {
126129
- _this46.home();
126276
+ if (_this47.cameraControls && _this47.camera && _this47.sceneBoundingBox) {
126277
+ _this47.home();
126130
126278
  }
126131
126279
  try {
126132
- if (_this46._onFirstPersonChange && _this46.pointControls) {
126133
- _this46.pointControls.removeEventListener('change', _this46._onFirstPersonChange);
126280
+ if (_this47._onFirstPersonChange && _this47.pointControls) {
126281
+ _this47.pointControls.removeEventListener('change', _this47._onFirstPersonChange);
126134
126282
  }
126135
126283
  } catch (e) {}
126136
- if (_this46.noObserver) {
126137
- _this46.noObserver._firstPersonLastPos = null;
126284
+ if (_this47.noObserver) {
126285
+ _this47.noObserver._firstPersonLastPos = null;
126138
126286
  }
126139
126287
  setTimeout(function () {
126140
- window.removeEventListener('keydown', _this46.onKeyDown);
126141
- window.removeEventListener('keyup', _this46.onKeyUp);
126142
- if (_this46.renderer && _this46.renderer.domElement) {
126143
- _this46.bindScenePointerEvents();
126288
+ window.removeEventListener('keydown', _this47.onKeyDown);
126289
+ window.removeEventListener('keyup', _this47.onKeyUp);
126290
+ if (_this47.renderer && _this47.renderer.domElement) {
126291
+ _this47.bindScenePointerEvents();
126144
126292
  }
126145
- if (_this46.scene) {
126146
- _this46.ensureTransformSelectionValid();
126293
+ if (_this47.scene) {
126294
+ _this47.ensureTransformSelectionValid();
126147
126295
  }
126148
126296
  // this.timeRender()
126149
126297
  }, 0);
126150
- if (typeof _this46._cameraChangeObserver === 'function') {
126151
- _this46._cameraChangeObserver('firstPersonUnlock');
126298
+ if (typeof _this47._cameraChangeObserver === 'function') {
126299
+ _this47._cameraChangeObserver('firstPersonUnlock');
126152
126300
  }
126153
126301
  });
126154
- if (_this46.scene) _this46.scene.add(_this46.pointControls.object);
126302
+ if (_this47.scene) _this47.scene.add(_this47.pointControls.object);
126155
126303
  }, 10);
126156
126304
  },
126157
126305
  // 第一视角运动
@@ -126306,7 +126454,7 @@ var isDebug = false || false === true;
126306
126454
  return this.scene && this.scene.children ? this.scene.children : [];
126307
126455
  },
126308
126456
  openMeasure: function openMeasure(type) {
126309
- var _this47 = this;
126457
+ var _this48 = this;
126310
126458
  var isClear = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
126311
126459
  if (this.threeMeasure) {
126312
126460
  this.threeMeasure.close(isClear);
@@ -126318,7 +126466,7 @@ var isDebug = false || false === true;
126318
126466
  case 'distance':
126319
126467
  this.threeMeasure = new measure_distance.MeasureDistance(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
126320
126468
  pickRoots: function pickRoots() {
126321
- return _this47.getMeasurePickRoots();
126469
+ return _this48.getMeasurePickRoots();
126322
126470
  }
126323
126471
  });
126324
126472
  this.threeMeasure.start();
@@ -126326,7 +126474,7 @@ var isDebug = false || false === true;
126326
126474
  case 'area':
126327
126475
  this.threeMeasure = new measure_area.MeasureArea(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
126328
126476
  pickRoots: function pickRoots() {
126329
- return _this47.getMeasurePickRoots();
126477
+ return _this48.getMeasurePickRoots();
126330
126478
  }
126331
126479
  });
126332
126480
  this.threeMeasure.start();
@@ -126334,7 +126482,7 @@ var isDebug = false || false === true;
126334
126482
  case 'angle':
126335
126483
  this.threeMeasure = new measure_angle.MeasureAngle(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
126336
126484
  pickRoots: function pickRoots() {
126337
- return _this47.getMeasurePickRoots();
126485
+ return _this48.getMeasurePickRoots();
126338
126486
  }
126339
126487
  });
126340
126488
  this.threeMeasure.start();
@@ -126342,7 +126490,7 @@ var isDebug = false || false === true;
126342
126490
  case 'height':
126343
126491
  this.threeMeasure = new measure_height.MeasureHeight(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
126344
126492
  pickRoots: function pickRoots() {
126345
- return _this47.getMeasurePickRoots();
126493
+ return _this48.getMeasurePickRoots();
126346
126494
  }
126347
126495
  });
126348
126496
  this.threeMeasure.start();
@@ -126388,11 +126536,11 @@ var isDebug = false || false === true;
126388
126536
  return object.name === 'measureObj' || userData.isMeasureObject === true;
126389
126537
  },
126390
126538
  removeMeasureObjectsFromScene: function removeMeasureObjectsFromScene() {
126391
- var _this48 = this;
126539
+ var _this49 = this;
126392
126540
  if (!this.scene) return;
126393
126541
  var measureObjects = [];
126394
126542
  this.scene.traverse(function (object) {
126395
- if (_this48.isMeasureObject(object)) {
126543
+ if (_this49.isMeasureObject(object)) {
126396
126544
  measureObjects.push(object);
126397
126545
  }
126398
126546
  });
@@ -126400,9 +126548,9 @@ var isDebug = false || false === true;
126400
126548
  if (object.parent) {
126401
126549
  object.parent.remove(object);
126402
126550
  } else {
126403
- _this48.scene.remove(object);
126551
+ _this49.scene.remove(object);
126404
126552
  }
126405
- _this48.disposeMeasureObject(object);
126553
+ _this49.disposeMeasureObject(object);
126406
126554
  });
126407
126555
  },
126408
126556
  // 增加一个清除所有测量结果的方法,清理历史测量实例遗留的对象
@@ -126475,12 +126623,12 @@ var isDebug = false || false === true;
126475
126623
  参数: object, 目标实体,
126476
126624
  */
126477
126625
  isolate: function isolate(object) {
126478
- var _this49 = this;
126626
+ var _this50 = this;
126479
126627
  if (!this.scene) return;
126480
126628
  // 隔离 将目标实体以外的实体隐藏掉
126481
126629
  this.scene.traverse(function (item) {
126482
126630
  if (item.isMesh && item.name !== object.name) {
126483
- var offsetMatrix = new _this49.THREE.Matrix4().copy(item.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
126631
+ var offsetMatrix = new _this50.THREE.Matrix4().copy(item.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
126484
126632
  item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
126485
126633
  item.instanceMatrix.needsUpdate = true;
126486
126634
  }
@@ -126488,7 +126636,7 @@ var isDebug = false || false === true;
126488
126636
  },
126489
126637
  // 还原操作 将修改过的实体进行恢复
126490
126638
  restore: function restore() {
126491
- var _this50 = this;
126639
+ var _this51 = this;
126492
126640
  if (!this.scene) return;
126493
126641
  this.scene.traverse(function (item) {
126494
126642
  if (item.isMesh) {
@@ -126510,20 +126658,20 @@ var isDebug = false || false === true;
126510
126658
  item.userData.translateMatrixInvert = null;
126511
126659
  }
126512
126660
  if (item.userData.combineMatrixInvert) {
126513
- _this50.rotateMesh(item, {
126661
+ _this51.rotateMesh(item, {
126514
126662
  x: 0,
126515
126663
  y: 0,
126516
126664
  z: 0
126517
126665
  });
126518
126666
  item.userData.combineMatrixInvert = null;
126519
126667
  }
126520
- var copyMatrix = _this50.getInstanceCopyMatrix(item, instanceId);
126668
+ var copyMatrix = _this51.getInstanceCopyMatrix(item, instanceId);
126521
126669
  if (!copyMatrix) return;
126522
- var sourceHidden = _this50.isSourceHiddenInstance(item, instanceId);
126523
- var offsetMatrix = new _this50.THREE.Matrix4().copy(copyMatrix);
126670
+ var sourceHidden = _this51.isSourceHiddenInstance(item, instanceId);
126671
+ var offsetMatrix = new _this51.THREE.Matrix4().copy(copyMatrix);
126524
126672
  if (sourceHidden) {
126525
126673
  offsetMatrix.makeTranslation(9999999, 9999999, 9999999);
126526
- _this50.removeOutlineInstanceProxy(item, item.userData.instanceIndex);
126674
+ _this51.removeOutlineInstanceProxy(item, item.userData.instanceIndex);
126527
126675
  }
126528
126676
  item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
126529
126677
  item.instanceMatrix.needsUpdate = true;
@@ -126532,7 +126680,7 @@ var isDebug = false || false === true;
126532
126680
  },
126533
126681
  // 添加自定义模型, 暂时只支持glb、gltf格式
126534
126682
  addCustomModel: function addCustomModel(name, position, url) {
126535
- var _this51 = this;
126683
+ var _this52 = this;
126536
126684
  var scale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
126537
126685
  var immediately = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
126538
126686
  var callback = arguments.length > 5 ? arguments[5] : undefined;
@@ -126543,41 +126691,41 @@ var isDebug = false || false === true;
126543
126691
  locationModel.scale.set(scale, scale, scale);
126544
126692
  locationModel.updateMatrixWorld();
126545
126693
  if (immediately) {
126546
- _this51.cameraControls.fitToSphere(gltf.this.scene, true);
126694
+ _this52.cameraControls.fitToSphere(gltf.this.scene, true);
126547
126695
  }
126548
126696
  // 动画混合器
126549
126697
  // 不参与裁剪
126550
126698
  locationModel.userData.cull = false;
126551
126699
  locationModel.name = name;
126552
- if (_this51.scene) _this51.scene.add(locationModel);
126553
- locationModel.position.copy(new _this51.THREE.Vector3(position.x, position.y, position.z));
126700
+ if (_this52.scene) _this52.scene.add(locationModel);
126701
+ locationModel.position.copy(new _this52.THREE.Vector3(position.x, position.y, position.z));
126554
126702
  if (gltf.animations.length > 0) {
126555
- var actionMixer = new _this51.THREE.AnimationMixer(gltf.this.scene);
126703
+ var actionMixer = new _this52.THREE.AnimationMixer(gltf.this.scene);
126556
126704
  var walkActive = actionMixer.clipAction(gltf.animations[0]);
126557
126705
  walkActive.play();
126558
- _this51.modelActive.push(walkActive);
126559
- _this51.modelActions.push(actionMixer);
126706
+ _this52.modelActive.push(walkActive);
126707
+ _this52.modelActions.push(actionMixer);
126560
126708
  }
126561
126709
  callback && callback();
126562
126710
  });
126563
126711
  },
126564
126712
  // 删除添加的自定义模型
126565
126713
  removeCustomModel: function removeCustomModel(name) {
126566
- var _this52 = this;
126714
+ var _this53 = this;
126567
126715
  var obj = this.getObjectByName(name);
126568
126716
  obj.forEach(function (item, index) {
126569
126717
  if (item.animations > 0) {
126570
126718
  item.removeFromParent();
126571
- _this52.modelActions[index].uncacheRoot(item);
126572
- _this52.modelActions[index].uncacheRoot(_this52.modelActive[index]);
126719
+ _this53.modelActions[index].uncacheRoot(item);
126720
+ _this53.modelActions[index].uncacheRoot(_this53.modelActive[index]);
126573
126721
  }
126574
126722
  item.traverse(function (child) {
126575
- if (child instanceof _this52.THREE.Mesh) {
126723
+ if (child instanceof _this53.THREE.Mesh) {
126576
126724
  child.geometry.dispose();
126577
126725
  child.material.dispose();
126578
126726
  }
126579
126727
  });
126580
- if (_this52.scene) _this52.scene.remove(item);
126728
+ if (_this53.scene) _this53.scene.remove(item);
126581
126729
  });
126582
126730
  this.modelActions.splice(0);
126583
126731
  this.modelActive.splice(0);
@@ -126639,7 +126787,7 @@ var isDebug = false || false === true;
126639
126787
  return size;
126640
126788
  },
126641
126789
  animate: function animate() {
126642
- var _this53 = this;
126790
+ var _this54 = this;
126643
126791
  if (isDebug) {
126644
126792
  this.stats && this.stats.begin(); // 开始帧率统计
126645
126793
  }
@@ -126653,7 +126801,7 @@ var isDebug = false || false === true;
126653
126801
  if (this.timeStamp > singleFrameTime) {
126654
126802
  if (this.modelActions.length > 0) {
126655
126803
  this.modelActions.forEach(function (item) {
126656
- item.update(_this53.timeStamp);
126804
+ item.update(_this54.timeStamp);
126657
126805
  });
126658
126806
  }
126659
126807
  this.cameraControls.enabled && this.cameraControls.update(this.timeStamp);
@@ -127011,25 +127159,25 @@ var isDebug = false || false === true;
127011
127159
  * 加载下一批数据
127012
127160
  */
127013
127161
  loadNextBatch: function loadNextBatch() {
127014
- var _this54 = this;
127162
+ var _this55 = this;
127015
127163
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee1() {
127016
127164
  var loadingState, batch, _t3;
127017
127165
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context1) {
127018
127166
  while (1) switch (_context1.p = _context1.n) {
127019
127167
  case 0:
127020
- loadingState = _this54.noObserver ? _this54.noObserver.batchLoadingState : _this54.batchLoadingState;
127021
- if (_this54.isBatchLoadingSceneReady()) {
127168
+ loadingState = _this55.noObserver ? _this55.noObserver.batchLoadingState : _this55.batchLoadingState;
127169
+ if (_this55.isBatchLoadingSceneReady()) {
127022
127170
  _context1.n = 1;
127023
127171
  break;
127024
127172
  }
127025
- _this54.stopBatchLoading('scene_unavailable');
127173
+ _this55.stopBatchLoading('scene_unavailable');
127026
127174
  return _context1.a(2);
127027
127175
  case 1:
127028
127176
  if (!(!loadingState.isLoading || loadingState.currentBatch >= loadingState.pendingData.length)) {
127029
127177
  _context1.n = 2;
127030
127178
  break;
127031
127179
  }
127032
- _this54.completeBatchLoading();
127180
+ _this55.completeBatchLoading();
127033
127181
  return _context1.a(2);
127034
127182
  case 2:
127035
127183
  if (!loadingState.isPaused) {
@@ -127038,7 +127186,7 @@ var isDebug = false || false === true;
127038
127186
  }
127039
127187
  // 如果暂停,延迟一段时间后再次检查
127040
127188
  loadingState.animationFrameId = requestAnimationFrame(function () {
127041
- _this54.loadNextBatch();
127189
+ _this55.loadNextBatch();
127042
127190
  });
127043
127191
  return _context1.a(2);
127044
127192
  case 3:
@@ -127048,7 +127196,7 @@ var isDebug = false || false === true;
127048
127196
  }
127049
127197
  // 如果正在交互,延迟一段时间后再次检查
127050
127198
  loadingState.animationFrameId = requestAnimationFrame(function () {
127051
- _this54.loadNextBatch();
127199
+ _this55.loadNextBatch();
127052
127200
  });
127053
127201
  return _context1.a(2);
127054
127202
  case 4:
@@ -127057,13 +127205,13 @@ var isDebug = false || false === true;
127057
127205
  _context1.n = 5;
127058
127206
  break;
127059
127207
  }
127060
- _this54.completeBatchLoading();
127208
+ _this55.completeBatchLoading();
127061
127209
  return _context1.a(2);
127062
127210
  case 5:
127063
127211
  _context1.p = 5;
127064
127212
  console.log('加载批次:', loadingState.currentBatch);
127065
127213
  _context1.n = 6;
127066
- return _this54.processWithMainThread(batch);
127214
+ return _this55.processWithMainThread(batch);
127067
127215
  case 6:
127068
127216
  if (loadingState.isLoading) {
127069
127217
  _context1.n = 7;
@@ -127071,11 +127219,11 @@ var isDebug = false || false === true;
127071
127219
  }
127072
127220
  return _context1.a(2);
127073
127221
  case 7:
127074
- if (_this54.isBatchLoadingSceneReady()) {
127222
+ if (_this55.isBatchLoadingSceneReady()) {
127075
127223
  _context1.n = 8;
127076
127224
  break;
127077
127225
  }
127078
- _this54.stopBatchLoading('scene_unavailable');
127226
+ _this55.stopBatchLoading('scene_unavailable');
127079
127227
  return _context1.a(2);
127080
127228
  case 8:
127081
127229
  // 更新进度
@@ -127083,8 +127231,8 @@ var isDebug = false || false === true;
127083
127231
  loadingState.currentBatch++;
127084
127232
 
127085
127233
  // 同步到响应式状态
127086
- _this54.batchLoadingState.loadedCount = loadingState.loadedCount;
127087
- _this54.batchLoadingState.currentBatch = loadingState.currentBatch;
127234
+ _this55.batchLoadingState.loadedCount = loadingState.loadedCount;
127235
+ _this55.batchLoadingState.currentBatch = loadingState.currentBatch;
127088
127236
 
127089
127237
  // 调用进度回调
127090
127238
  if (loadingState.onProgress) {
@@ -127098,7 +127246,7 @@ var isDebug = false || false === true;
127098
127246
 
127099
127247
  // 使用 requestAnimationFrame 在下一帧继续加载
127100
127248
  loadingState.animationFrameId = requestAnimationFrame(function () {
127101
- _this54.loadNextBatch();
127249
+ _this55.loadNextBatch();
127102
127250
  });
127103
127251
  _context1.n = 10;
127104
127252
  break;
@@ -127109,7 +127257,7 @@ var isDebug = false || false === true;
127109
127257
 
127110
127258
  // 继续下一批次
127111
127259
  loadingState.animationFrameId = requestAnimationFrame(function () {
127112
- _this54.loadNextBatch();
127260
+ _this55.loadNextBatch();
127113
127261
  });
127114
127262
  case 10:
127115
127263
  return _context1.a(2);
@@ -127121,20 +127269,20 @@ var isDebug = false || false === true;
127121
127269
  * 使用主线程处理批次数据
127122
127270
  */
127123
127271
  processWithMainThread: function processWithMainThread(batch) {
127124
- var _this55 = this;
127272
+ var _this56 = this;
127125
127273
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee10() {
127126
127274
  var loadingState;
127127
127275
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context10) {
127128
127276
  while (1) switch (_context10.n) {
127129
127277
  case 0:
127130
- loadingState = _this55.noObserver ? _this55.noObserver.batchLoadingState : _this55.batchLoadingState;
127278
+ loadingState = _this56.noObserver ? _this56.noObserver.batchLoadingState : _this56.batchLoadingState;
127131
127279
  loadingState.options.batchSize = loadingState.batchSize;
127132
127280
  loadingState.options.resetState = loadingState.currentBatch === 0;
127133
127281
  // 使用原始的handleInstancedMeshModel方法
127134
127282
 
127135
127283
  isDebug && performance.mark('handleInstancedMeshModel-start');
127136
127284
  _context10.n = 1;
127137
- return handleInstancedMeshModel(_this55.modelGroup, batch.instances, batch.drawObjs, '', _this55.scene, loadingState.color, loadingState.meshNameConfig, '', loadingState.options);
127285
+ return handleInstancedMeshModel(_this56.modelGroup, batch.instances, batch.drawObjs, '', _this56.scene, loadingState.color, loadingState.meshNameConfig, '', loadingState.options);
127138
127286
  case 1:
127139
127287
  isDebug && performance.mark('handleInstancedMeshModel-end');
127140
127288
  isDebug && performance.measure('handleInstancedMeshModel', 'handleInstancedMeshModel-start', 'handleInstancedMeshModel-end');
@@ -127148,7 +127296,7 @@ var isDebug = false || false === true;
127148
127296
  * 完成批量加载
127149
127297
  */
127150
127298
  completeBatchLoading: function completeBatchLoading() {
127151
- var _this56 = this;
127299
+ var _this57 = this;
127152
127300
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
127153
127301
  if (!loadingState.isLoading) return;
127154
127302
  if (!this.isBatchLoadingSceneReady()) {
@@ -127181,17 +127329,17 @@ var isDebug = false || false === true;
127181
127329
  this.modelGroup.traverse(function (child) {
127182
127330
  if (child.isMesh && !child.userData.batchInitDone) {
127183
127331
  markRendered(child);
127184
- var json = _this56.getMeshCenterAndVolume(child);
127185
- var meshBox3 = new _this56.THREE.Box3();
127332
+ var json = _this57.getMeshCenterAndVolume(child);
127333
+ var meshBox3 = new _this57.THREE.Box3();
127186
127334
  meshBox3.setFromObject(child);
127187
- var worldPs = new _this56.THREE.Vector3().addVectors(meshBox3.max, meshBox3.min).multiplyScalar(0.5);
127335
+ var worldPs = new _this57.THREE.Vector3().addVectors(meshBox3.max, meshBox3.min).multiplyScalar(0.5);
127188
127336
  if (isNaN(worldPs.x)) return;
127189
- child.worldDir = new _this56.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
127337
+ child.worldDir = new _this57.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
127190
127338
  child.userData.center = json.center;
127191
127339
  child.userData.worldPs = worldPs;
127192
- child.userData.oldPs = child.getWorldPosition(new _this56.THREE.Vector3());
127340
+ child.userData.oldPs = child.getWorldPosition(new _this57.THREE.Vector3());
127193
127341
  child.userData.box = json.box;
127194
- child.userData.position = new _this56.THREE.Vector3().copy(child.position);
127342
+ child.userData.position = new _this57.THREE.Vector3().copy(child.position);
127195
127343
  child.userData.translate = {
127196
127344
  x: 0,
127197
127345
  y: 0,
@@ -127283,7 +127431,7 @@ var isDebug = false || false === true;
127283
127431
  * @param {Object} options - 配置项 { immediate: boolean }
127284
127432
  */
127285
127433
  setSystemInterruption: function setSystemInterruption(active) {
127286
- var _this57 = this;
127434
+ var _this58 = this;
127287
127435
  var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'user_interaction';
127288
127436
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
127289
127437
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
@@ -127349,7 +127497,7 @@ var isDebug = false || false === true;
127349
127497
  if (loadingState.interactionState.wheelTimeout) return;
127350
127498
 
127351
127499
  // 2. 如果是 wheel 结束,但 this.userInteracting (this.camera) 还在进行,则不恢复
127352
- if (reason === 'wheel' && _this57.userInteracting) return;
127500
+ if (reason === 'wheel' && _this58.userInteracting) return;
127353
127501
 
127354
127502
  // 3. 检查是否有强制跳过标记 (可能由其他逻辑触发)
127355
127503
  // if (this.forceSkipRendering && reason !== 'user_interaction') return; // 视情况而定
@@ -127360,15 +127508,15 @@ var isDebug = false || false === true;
127360
127508
  loadingState.pauseReason = '';
127361
127509
  loadingState.interactionState.isInteracting = false;
127362
127510
  loadingState.interactionState.interactionType = '';
127363
- _this57.forceSkipRendering = false;
127511
+ _this58.forceSkipRendering = false;
127364
127512
 
127365
127513
  // 恢复本地批量加载 (如果未完成)
127366
127514
  if (loadingState.isLoading && loadingState.currentBatch < loadingState.totalBatches) {
127367
- _this57.loadNextBatch();
127515
+ _this58.loadNextBatch();
127368
127516
  }
127369
127517
 
127370
127518
  // 恢复 StreamLoader
127371
- var streamLoader = _this57.noObserver.streamLoader;
127519
+ var streamLoader = _this58.noObserver.streamLoader;
127372
127520
  if (streamLoader && typeof streamLoader.handleControlEnd === 'function') {
127373
127521
  // StreamLoader 内部通常有防抖或延迟,这里直接通知结束即可
127374
127522
  streamLoader.handleControlEnd();
@@ -127421,7 +127569,7 @@ var isDebug = false || false === true;
127421
127569
  * 滚轮交互结束的定时检测
127422
127570
  */
127423
127571
  scheduleWheelInteractionEnd: function scheduleWheelInteractionEnd(event) {
127424
- var _this58 = this;
127572
+ var _this59 = this;
127425
127573
  var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
127426
127574
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
127427
127575
  if (loadingState.interactionState.wheelTimeout) {
@@ -127429,8 +127577,8 @@ var isDebug = false || false === true;
127429
127577
  loadingState.interactionState.wheelTimeout = null;
127430
127578
  }
127431
127579
  loadingState.interactionState.wheelTimeout = setTimeout(function () {
127432
- _this58.$emit('wheelEnd', event);
127433
- _this58.endInteraction('wheel', event, {
127580
+ _this59.$emit('wheelEnd', event);
127581
+ _this59.endInteraction('wheel', event, {
127434
127582
  immediateResume: false
127435
127583
  });
127436
127584
  loadingState.interactionState.wheelTimeout = null;
@@ -127483,11 +127631,11 @@ var isDebug = false || false === true;
127483
127631
  });
127484
127632
  // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=script&lang=js
127485
127633
  /* harmony default export */ var components_com_graphicsvue_type_script_lang_js = (com_graphicsvue_type_script_lang_js);
127486
- // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=a4813dca&prod&lang=scss&scoped=true
127487
- var com_graphicsvue_type_style_index_0_id_a4813dca_prod_lang_scss_scoped_true = __webpack_require__("e426");
127634
+ // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=1f8c13ba&prod&lang=scss&scoped=true
127635
+ var com_graphicsvue_type_style_index_0_id_1f8c13ba_prod_lang_scss_scoped_true = __webpack_require__("e573");
127488
127636
 
127489
- // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=a4813dca&prod&lang=css
127490
- var com_graphicsvue_type_style_index_1_id_a4813dca_prod_lang_css = __webpack_require__("b606");
127637
+ // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=1f8c13ba&prod&lang=css
127638
+ var com_graphicsvue_type_style_index_1_id_1f8c13ba_prod_lang_css = __webpack_require__("8673");
127491
127639
 
127492
127640
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
127493
127641
  /* globals __VUE_SSR_CONTEXT__ */
@@ -127599,17 +127747,17 @@ function normalizeComponent(
127599
127747
 
127600
127748
  var component = normalizeComponent(
127601
127749
  components_com_graphicsvue_type_script_lang_js,
127602
- com_graphicsvue_type_template_id_a4813dca_scoped_true_render,
127750
+ com_graphicsvue_type_template_id_1f8c13ba_scoped_true_render,
127603
127751
  staticRenderFns,
127604
127752
  false,
127605
127753
  null,
127606
- "a4813dca",
127754
+ "1f8c13ba",
127607
127755
  null
127608
127756
 
127609
127757
  )
127610
127758
 
127611
127759
  /* harmony default export */ var com_graphics = (component.exports);
127612
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5851e511-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=b313ab6c&scoped=true
127760
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1538a079-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=b313ab6c&scoped=true
127613
127761
  var com_flcanvasvue_type_template_id_b313ab6c_scoped_true_render = function render() {
127614
127762
  var _vm = this,
127615
127763
  _c = _vm._self._c;
@@ -131662,7 +131810,7 @@ var com_flcanvas_component = normalizeComponent(
131662
131810
  )
131663
131811
 
131664
131812
  /* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
131665
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5851e511-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
131813
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1538a079-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
131666
131814
  var per_controlvue_type_template_id_f547d5c6_scoped_true_render = function render() {
131667
131815
  var _vm = this,
131668
131816
  _c = _vm._self._c;
@@ -131770,7 +131918,7 @@ var per_control_component = normalizeComponent(
131770
131918
  )
131771
131919
 
131772
131920
  /* harmony default export */ var per_control = (per_control_component.exports);
131773
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5851e511-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
131921
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1538a079-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
131774
131922
  var pidvue_type_template_id_2572c0e2_scoped_true_render = function render() {
131775
131923
  var _vm = this,
131776
131924
  _c = _vm._self._c;
@@ -131817,7 +131965,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
131817
131965
  var html2canvas = __webpack_require__("c0e9");
131818
131966
  var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
131819
131967
 
131820
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5851e511-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
131968
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1538a079-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
131821
131969
  var ann_toolvue_type_template_id_4b17bce0_scoped_true_render = function render() {
131822
131970
  var _vm = this,
131823
131971
  _c = _vm._self._c;