fl-web-component 2.0.0-beta.4 → 2.0.0-beta.6

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.
@@ -2138,13 +2138,6 @@ Factory_1.Factory.addGetterSetter(Image, 'cropHeight', 0, (0, Validators_1.getNu
2138
2138
 
2139
2139
  /***/ }),
2140
2140
 
2141
- /***/ "24f5":
2142
- /***/ (function(module, exports, __webpack_require__) {
2143
-
2144
- // extracted by mini-css-extract-plugin
2145
-
2146
- /***/ }),
2147
-
2148
2141
  /***/ "26c8":
2149
2142
  /***/ (function(module, exports, __webpack_require__) {
2150
2143
 
@@ -14760,17 +14753,6 @@ Factory_1.Factory.addGetterSetter(Text, 'letterSpacing', 0, (0, Validators_1.get
14760
14753
  Factory_1.Factory.addGetterSetter(Text, 'text', '', (0, Validators_1.getStringValidator)());
14761
14754
  Factory_1.Factory.addGetterSetter(Text, 'textDecoration', '');
14762
14755
 
14763
- /***/ }),
14764
-
14765
- /***/ "5792":
14766
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
14767
-
14768
- "use strict";
14769
- /* 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_fdf6eb9e_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a1a2");
14770
- /* 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_fdf6eb9e_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_fdf6eb9e_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
14771
- /* unused harmony reexport * */
14772
-
14773
-
14774
14756
  /***/ }),
14775
14757
 
14776
14758
  /***/ "5a43":
@@ -14783,17 +14765,6 @@ function _arrayLikeToArray(r, a) {
14783
14765
  }
14784
14766
  module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
14785
14767
 
14786
- /***/ }),
14787
-
14788
- /***/ "5c64":
14789
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
14790
-
14791
- "use strict";
14792
- /* 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_fdf6eb9e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("24f5");
14793
- /* 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_fdf6eb9e_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_fdf6eb9e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
14794
- /* unused harmony reexport * */
14795
-
14796
-
14797
14768
  /***/ }),
14798
14769
 
14799
14770
  /***/ "5c7d":
@@ -18924,6 +18895,17 @@ var svgPanZoom = function svgPanZoom(elementOrSelector, options) {
18924
18895
  };
18925
18896
  module.exports = svgPanZoom;
18926
18897
 
18898
+ /***/ }),
18899
+
18900
+ /***/ "85db":
18901
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
18902
+
18903
+ "use strict";
18904
+ /* 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_1241ca06_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a5bb");
18905
+ /* 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_1241ca06_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_1241ca06_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
18906
+ /* unused harmony reexport * */
18907
+
18908
+
18927
18909
  /***/ }),
18928
18910
 
18929
18911
  /***/ "8603":
@@ -30979,7 +30961,7 @@ Factory_1.Factory.addGetterSetter(Node_1.Node, 'blue', 0, Validators_1.RGBCompon
30979
30961
  /***/ "9224":
30980
30962
  /***/ (function(module) {
30981
30963
 
30982
- module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.0-beta.4\",\"scripts\":{\"postinstall\":\"patch-package\",\"tip1\":\"仅调试本组件不涉及业务组件,请执行dev\",\"dev\":\"vue-cli-service serve\",\"lint\":\"eslint \\\"{src,packages}/**/*.{vue,js}\\\" --fix\",\"prettier\":\"prettier --write \\\"packages/**/*.{js,css,less,scss,vue,html}\\\"\",\"=\":\"=============================================================\",\"tip2\":\"同时调试本组件与业务组件,请执行watch\",\"watch\":\"vue-cli-service build --watch --mode production --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build\":\"npm run lint && vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build:test\":\"vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"publish:base\":\"npm run build && npm publish --registry https://registry.npmjs.org/\",\"publish:beta:base\":\"npm run build && npm publish --tag beta --registry https://registry.npmjs.org/\",\"==\":\"=============================================================\",\"tip3\":\"发版注意: 【测试版执行publish:beta】【修改bug执行publish:fix】【新增功能执行publish:feat】【新特性执行publish:perf】\",\"publish:beta\":\"npm version prerelease --preid=beta && npm run publish:beta:base\",\"publish:fix\":\"npm version patch && npm run publish:base\",\"publish:feat\":\"npm version minor && npm run publish:base\",\"publish:perf\":\"npm version major && npm run publish:base\"},\"files\":[\"dist\",\"packages\",\"src\"],\"main\":\"dist/fl-web-component.common.js\",\"dependencies\":{\"3d-tiles-renderer\":\"^0.4.14\",\"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-plugin-vue\":\"^6.2.2\",\"patch-package\":\"^6.4.7\",\"sass\":\"1.32.13\",\"sass-loader\":\"10.1.1\",\"vue-template-compiler\":\"^2.6.11\",\"worker-loader\":\"^3.0.8\"},\"eslintConfig\":{\"root\":true,\"env\":{\"node\":true},\"extends\":[\"plugin:vue/essential\",\"eslint:recommended\"],\"parserOptions\":{\"parser\":\"babel-eslint\"},\"rules\":{}},\"browserslist\":[\"> 1%\",\"last 2 versions\"]}");
30964
+ module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.0-beta.6\",\"scripts\":{\"postinstall\":\"patch-package\",\"tip1\":\"仅调试本组件不涉及业务组件,请执行dev\",\"dev\":\"vue-cli-service serve\",\"lint\":\"eslint \\\"{src,packages}/**/*.{vue,js}\\\" --fix\",\"prettier\":\"prettier --write \\\"packages/**/*.{js,css,less,scss,vue,html}\\\"\",\"=\":\"=============================================================\",\"tip2\":\"同时调试本组件与业务组件,请执行watch\",\"watch\":\"vue-cli-service build --watch --mode production --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build\":\"npm run lint && vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build:test\":\"vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"publish:base\":\"npm run build && npm publish --registry https://registry.npmjs.org/\",\"publish:beta:base\":\"npm run build && npm publish --tag beta --registry https://registry.npmjs.org/\",\"==\":\"=============================================================\",\"tip3\":\"发版注意: 【测试版执行publish:beta】【修改bug执行publish:fix】【新增功能执行publish:feat】【新特性执行publish:perf】\",\"publish:beta\":\"npm version prerelease --preid=beta && npm run publish:beta:base\",\"publish:fix\":\"npm version patch && npm run publish:base\",\"publish:feat\":\"npm version minor && npm run publish:base\",\"publish:perf\":\"npm version major && npm run publish:base\"},\"files\":[\"dist\",\"packages\",\"src\"],\"main\":\"dist/fl-web-component.common.js\",\"dependencies\":{\"3d-tiles-renderer\":\"^0.4.14\",\"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-plugin-vue\":\"^6.2.2\",\"patch-package\":\"^6.4.7\",\"sass\":\"1.32.13\",\"sass-loader\":\"10.1.1\",\"vue-template-compiler\":\"^2.6.11\",\"worker-loader\":\"^3.0.8\"},\"eslintConfig\":{\"root\":true,\"env\":{\"node\":true},\"extends\":[\"plugin:vue/essential\",\"eslint:recommended\"],\"parserOptions\":{\"parser\":\"babel-eslint\"},\"rules\":{}},\"browserslist\":[\"> 1%\",\"last 2 versions\"]}");
30983
30965
 
30984
30966
  /***/ }),
30985
30967
 
@@ -32136,13 +32118,6 @@ exports.Util = {
32136
32118
 
32137
32119
  /***/ }),
32138
32120
 
32139
- /***/ "a1a2":
32140
- /***/ (function(module, exports, __webpack_require__) {
32141
-
32142
- // extracted by mini-css-extract-plugin
32143
-
32144
- /***/ }),
32145
-
32146
32121
  /***/ "a34e":
32147
32122
  /***/ (function(module, exports, __webpack_require__) {
32148
32123
 
@@ -32319,6 +32294,13 @@ Factory_1.Factory.backCompat(Sprite, {
32319
32294
 
32320
32295
  /***/ }),
32321
32296
 
32297
+ /***/ "a5bb":
32298
+ /***/ (function(module, exports, __webpack_require__) {
32299
+
32300
+ // extracted by mini-css-extract-plugin
32301
+
32302
+ /***/ }),
32303
+
32322
32304
  /***/ "aea4":
32323
32305
  /***/ (function(module, exports) {
32324
32306
 
@@ -32530,6 +32512,17 @@ module.exports = function () {
32530
32512
  };
32531
32513
  }();
32532
32514
 
32515
+ /***/ }),
32516
+
32517
+ /***/ "bb41":
32518
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
32519
+
32520
+ "use strict";
32521
+ /* 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_1241ca06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d9ee");
32522
+ /* 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_1241ca06_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_1241ca06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
32523
+ /* unused harmony reexport * */
32524
+
32525
+
32533
32526
  /***/ }),
32534
32527
 
32535
32528
  /***/ "bbce":
@@ -42628,6 +42621,13 @@ exports.Konva._injectGlobal(exports.Konva);
42628
42621
 
42629
42622
  /***/ }),
42630
42623
 
42624
+ /***/ "d9ee":
42625
+ /***/ (function(module, exports, __webpack_require__) {
42626
+
42627
+ // extracted by mini-css-extract-plugin
42628
+
42629
+ /***/ }),
42630
+
42631
42631
  /***/ "da04":
42632
42632
  /***/ (function(module, exports, __webpack_require__) {
42633
42633
 
@@ -45827,8 +45827,8 @@ if (typeof window !== 'undefined') {
45827
45827
  // Indicate to webpack that this file can be concatenated
45828
45828
  /* harmony default export */ var setPublicPath = (null);
45829
45829
 
45830
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"2a27fb16-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=fdf6eb9e&scoped=true
45831
- var com_graphicsvue_type_template_id_fdf6eb9e_scoped_true_render = function render() {
45830
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"88fd7c18-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=1241ca06&scoped=true
45831
+ var com_graphicsvue_type_template_id_1241ca06_scoped_true_render = function render() {
45832
45832
  var _vm = this,
45833
45833
  _c = _vm._self._c;
45834
45834
  return _c('div', {
@@ -45839,7 +45839,7 @@ var com_graphicsvue_type_template_id_fdf6eb9e_scoped_true_render = function rend
45839
45839
  };
45840
45840
  var staticRenderFns = [];
45841
45841
 
45842
- // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=fdf6eb9e&scoped=true
45842
+ // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=1241ca06&scoped=true
45843
45843
 
45844
45844
  // CONCATENATED MODULE: ./node_modules/camera-controls/dist/camera-controls.module.js
45845
45845
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
@@ -81384,7 +81384,6 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
81384
81384
  value: function () {
81385
81385
  var _processModelItem = StreamLoader_asyncToGenerator(/*#__PURE__*/StreamLoader_regenerator().m(function _callee21(item) {
81386
81386
  var options,
81387
- _options$onComplete,
81388
81387
  materialData,
81389
81388
  sceneBox,
81390
81389
  boxIndex,
@@ -81435,15 +81434,6 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
81435
81434
  }; // 设置当前模型到注册表
81436
81435
  this.updateModelRegistry(item, materialData, sceneBox, boxIndex);
81437
81436
  console.log('modelRegistry', this.modelRegistry);
81438
-
81439
- // 获取区域划分数据
81440
- // const divideData = await this.getPrimitivesByDivide(item.id);
81441
-
81442
- // if (divideData && divideData.length > 0) {
81443
- // await this.batchLoadRegions(item, divideData, options);
81444
- (_options$onComplete = options.onComplete) === null || _options$onComplete === void 0 || _options$onComplete.call(options);
81445
- // } else {
81446
- // }
81447
81437
  return _context21.a(2, {
81448
81438
  modelResourceMap: modelResourceMapObj,
81449
81439
  sceneBox: sceneBox,
@@ -81585,7 +81575,7 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
81585
81575
  }]);
81586
81576
  }();
81587
81577
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./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=script&lang=js
81588
- var _excluded = ["projectId", "pbsId", "version"];
81578
+ var _excluded = ["projectId"];
81589
81579
  function com_graphicsvue_type_script_lang_js_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = com_graphicsvue_type_script_lang_js_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; } } }; }
81590
81580
  function com_graphicsvue_type_script_lang_js_construct(t, e, r) { if (com_graphicsvue_type_script_lang_js_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && com_graphicsvue_type_script_lang_js_setPrototypeOf(p, r.prototype), p; }
81591
81581
  function com_graphicsvue_type_script_lang_js_setPrototypeOf(t, e) { return com_graphicsvue_type_script_lang_js_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, com_graphicsvue_type_script_lang_js_setPrototypeOf(t, e); }
@@ -81927,7 +81917,6 @@ var isDebug = false || false === true;
81927
81917
  occlusionWorkerRequestMap: new Map(),
81928
81918
  occlusionWorkerRequestId: 0
81929
81919
  };
81930
- this.initOcclusionWorker();
81931
81920
  CameraControls.install({
81932
81921
  THREE: this.THREE
81933
81922
  });
@@ -82123,28 +82112,6 @@ var isDebug = false || false === true;
82123
82112
  }
82124
82113
  };
82125
82114
  },
82126
- initOcclusionWorker: function initOcclusionWorker() {
82127
- var _this2 = this;
82128
- if (!this.noObserver) return;
82129
- var worker = null;
82130
- try {
82131
- worker = new Worker_fn();
82132
- } catch (e) {
82133
- worker = null;
82134
- }
82135
- this.noObserver.occlusionWorker = worker;
82136
- this.noObserver.occlusionWorkerRequestId = 0;
82137
- this.noObserver.occlusionWorkerRequestMap = new Map();
82138
- if (worker) {
82139
- worker.addEventListener('message', function (e) {
82140
- var payload = e.data || {};
82141
- var pending = _this2.noObserver.occlusionWorkerRequestMap.get(payload.id);
82142
- if (!pending) return;
82143
- _this2.noObserver.occlusionWorkerRequestMap.delete(payload.id);
82144
- pending.resolve(payload);
82145
- });
82146
- }
82147
- },
82148
82115
  occlusionWorkerRequest: function occlusionWorkerRequest(type, data) {
82149
82116
  var transferable = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
82150
82117
  var state = this.noObserver;
@@ -82194,20 +82161,20 @@ var isDebug = false || false === true;
82194
82161
  };
82195
82162
  },
82196
82163
  scanOcclusionIndices: function scanOcclusionIndices(buffer, sw, sh, stride, maxIdx, minSampleCount) {
82197
- var _this3 = this;
82164
+ var _this2 = this;
82198
82165
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee5() {
82199
82166
  var state, canWorker, response, restored, _syncRes, syncRes;
82200
82167
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context5) {
82201
82168
  while (1) switch (_context5.n) {
82202
82169
  case 0:
82203
- state = _this3.noObserver;
82170
+ state = _this2.noObserver;
82204
82171
  canWorker = state && state.occlusionWorker && buffer && buffer.buffer;
82205
82172
  if (!canWorker) {
82206
82173
  _context5.n = 3;
82207
82174
  break;
82208
82175
  }
82209
82176
  _context5.n = 1;
82210
- return _this3.occlusionWorkerRequest('occlusionScan', {
82177
+ return _this2.occlusionWorkerRequest('occlusionScan', {
82211
82178
  buffer: buffer.buffer,
82212
82179
  sw: sw,
82213
82180
  sh: sh,
@@ -82227,13 +82194,13 @@ var isDebug = false || false === true;
82227
82194
  buffer: restored.buffer
82228
82195
  });
82229
82196
  case 2:
82230
- _syncRes = _this3.scanOcclusionBufferSync(restored, sw, sh, stride, maxIdx, minSampleCount);
82197
+ _syncRes = _this2.scanOcclusionBufferSync(restored, sw, sh, stride, maxIdx, minSampleCount);
82231
82198
  return _context5.a(2, {
82232
82199
  indices: _syncRes.indices,
82233
82200
  buffer: restored.buffer
82234
82201
  });
82235
82202
  case 3:
82236
- syncRes = _this3.scanOcclusionBufferSync(buffer, sw, sh, stride, maxIdx, minSampleCount);
82203
+ syncRes = _this2.scanOcclusionBufferSync(buffer, sw, sh, stride, maxIdx, minSampleCount);
82237
82204
  return _context5.a(2, {
82238
82205
  indices: syncRes.indices,
82239
82206
  buffer: buffer && buffer.buffer ? buffer.buffer : null
@@ -82275,7 +82242,7 @@ var isDebug = false || false === true;
82275
82242
  }
82276
82243
  },
82277
82244
  setBoxIndex: function setBoxIndex(boxJson, documentId) {
82278
- var _this4 = this;
82245
+ var _this3 = this;
82279
82246
  var isAdd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
82280
82247
  if (!this._boxIndex) this._boxIndex = new Map();
82281
82248
  if (!documentId) {
@@ -82299,16 +82266,25 @@ var isDebug = false || false === true;
82299
82266
 
82300
82267
  // 构造 AABB
82301
82268
  var boxThree = new this.THREE.Box3(min, max);
82302
-
82303
- // 应用坐标系转换 (Biz -> Three)
82304
- // 注意:applyMatrix4 会重新计算 AABB
82305
- boxThree.applyMatrix4(bizToThreeMatrix);
82269
+ var hasMatrix = Array.isArray(it.matrix);
82270
+ if (hasMatrix && it.matrix.length >= 16) {
82271
+ var matrix = new this.THREE.Matrix4().fromArray(it.matrix);
82272
+ var worldMatrix = matrix.clone();
82273
+ if (bizToThreeMatrix) {
82274
+ worldMatrix.premultiply(bizToThreeMatrix);
82275
+ }
82276
+ boxThree.applyMatrix4(worldMatrix);
82277
+ } else if (bizToThreeMatrix) {
82278
+ // 注意:applyMatrix4 会重新计算 AABB
82279
+ boxThree.applyMatrix4(bizToThreeMatrix);
82280
+ }
82306
82281
  var userData = {
82307
82282
  flag: it.flag || 1,
82308
82283
  // 默认为 1
82309
82284
  obbData: it.obb,
82310
82285
  // 存储原始 OBB 数据
82311
- transparent: it.transp > 0
82286
+ transparent: it.transp > 0,
82287
+ visible: true // 默认显示
82312
82288
  };
82313
82289
  if (it.flag === 1) {
82314
82290
  userData.indices = it.indices;
@@ -82357,7 +82333,7 @@ var isDebug = false || false === true;
82357
82333
  var _modelIds = this.noObserver.documentModelIds.get(documentId);
82358
82334
  if (_modelIds) {
82359
82335
  _modelIds.forEach(function (id) {
82360
- _this4._boxIndex.delete(id);
82336
+ _this3._boxIndex.delete(id);
82361
82337
  });
82362
82338
  this.noObserver.documentModelIds.delete(documentId);
82363
82339
 
@@ -82371,7 +82347,7 @@ var isDebug = false || false === true;
82371
82347
  console.log('time end', Date.now());
82372
82348
  },
82373
82349
  buildOctreeFromBoxIndex: function buildOctreeFromBoxIndex() {
82374
- var _this5 = this;
82350
+ var _this4 = this;
82375
82351
  if (!this._boxIndex || this._boxIndex.size === 0) {
82376
82352
  this._octree = null;
82377
82353
  return;
@@ -82403,7 +82379,7 @@ var isDebug = false || false === true;
82403
82379
  depth: 0
82404
82380
  };
82405
82381
  this._boxIndex.forEach(function (box, id) {
82406
- _this5._octreeInsert(_this5._octree, String(id), box);
82382
+ _this4._octreeInsert(_this4._octree, String(id), box);
82407
82383
  });
82408
82384
  },
82409
82385
  _octreeSubdivide: function _octreeSubdivide(node) {
@@ -82599,7 +82575,7 @@ var isDebug = false || false === true;
82599
82575
  * @returns {Object|null} { planeBox: THREE.Box3|null, frustumBox: THREE.Box3, frustumY: {min, max} } 或 null(当没有平面交点且未请求 frustumY)
82600
82576
  */
82601
82577
  getScreenPlaneBounds: function getScreenPlaneBounds(camera, width, height, plane) {
82602
- var _this6 = this;
82578
+ var _this5 = this;
82603
82579
  var opts = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
82604
82580
  var _opts$includeFrustumY = opts.includeFrustumY,
82605
82581
  includeFrustumY = _opts$includeFrustumY === void 0 ? false : _opts$includeFrustumY;
@@ -82644,7 +82620,7 @@ var isDebug = false || false === true;
82644
82620
  var volumeCorners = nearCorners.concat(farCorners);
82645
82621
  var projectedPoints = volumeCorners.map(function (p) {
82646
82622
  var yProj = -(a * p.x + c * p.z + d) / b;
82647
- return new _this6.THREE.Vector3(p.x, yProj, p.z);
82623
+ return new _this5.THREE.Vector3(p.x, yProj, p.z);
82648
82624
  });
82649
82625
  planeBox = new this.THREE.Box3().setFromPoints(projectedPoints);
82650
82626
  }
@@ -82874,14 +82850,14 @@ var isDebug = false || false === true;
82874
82850
  * 执行视椎体裁切,清理视椎体外的InstancedMesh实例
82875
82851
  */
82876
82852
  performFrustumCulling: function performFrustumCulling() {
82877
- var _this7 = this;
82853
+ var _this6 = this;
82878
82854
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee6() {
82879
82855
  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, _t;
82880
82856
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context6) {
82881
82857
  while (1) switch (_context6.p = _context6.n) {
82882
82858
  case 0:
82883
- modelState = _this7.noObserver ? _this7.noObserver.modelStateManager : _this7.modelStateManager;
82884
- if (!(!_this7.modelStateManager.frustumCheckEnabled || !com_graphicsvue_type_script_lang_js_scene)) {
82859
+ modelState = _this6.noObserver ? _this6.noObserver.modelStateManager : _this6.modelStateManager;
82860
+ if (!(!_this6.modelStateManager.frustumCheckEnabled || !com_graphicsvue_type_script_lang_js_scene)) {
82885
82861
  _context6.n = 1;
82886
82862
  break;
82887
82863
  }
@@ -82897,10 +82873,10 @@ var isDebug = false || false === true;
82897
82873
  modelState.lastCullingTime = now;
82898
82874
 
82899
82875
  // 预先创建视椎体,供后续遍历复用
82900
- if (!_this7._frustum) _this7._frustum = new _this7.THREE.Frustum();
82901
- if (!_this7._vpMatrix) _this7._vpMatrix = new _this7.THREE.Matrix4();
82902
- globalFrustum = _this7._frustum;
82903
- globalVpMatrix = _this7._vpMatrix.multiplyMatrices(com_graphicsvue_type_script_lang_js_camera.projectionMatrix, com_graphicsvue_type_script_lang_js_camera.matrixWorldInverse);
82876
+ if (!_this6._frustum) _this6._frustum = new _this6.THREE.Frustum();
82877
+ if (!_this6._vpMatrix) _this6._vpMatrix = new _this6.THREE.Matrix4();
82878
+ globalFrustum = _this6._frustum;
82879
+ globalVpMatrix = _this6._vpMatrix.multiplyMatrices(com_graphicsvue_type_script_lang_js_camera.projectionMatrix, com_graphicsvue_type_script_lang_js_camera.matrixWorldInverse);
82904
82880
  globalFrustum.setFromProjectionMatrix(globalVpMatrix);
82905
82881
 
82906
82882
  // 使用局部变量收集 ID,最后一次性赋值
@@ -82914,17 +82890,39 @@ var isDebug = false || false === true;
82914
82890
  });
82915
82891
  }
82916
82892
  visibleIdSet = new Set(visibleIds);
82917
- if (_this7._octree) {
82918
- frustum = _this7._getCurrentFrustum();
82919
- exclude = bypassList || new Set();
82920
- hits = _this7.queryOctreeByFrustum(frustum, exclude);
82921
- for (i = 0; i < hits.length; i++) {
82922
- candidates.push(hits[i]);
82923
- }
82924
- } else if (_this7._boxIndex && _this7._boxIndex.size > 0) {
82925
- _this7._boxIndex.forEach(function (box, modelId) {
82893
+ if (!_this6._octree) {
82894
+ _context6.n = 7;
82895
+ break;
82896
+ }
82897
+ frustum = _this6._getCurrentFrustum();
82898
+ exclude = bypassList || new Set();
82899
+ hits = _this6.queryOctreeByFrustum(frustum, exclude);
82900
+ i = 0;
82901
+ case 3:
82902
+ if (!(i < hits.length)) {
82903
+ _context6.n = 6;
82904
+ break;
82905
+ }
82906
+ if (!(hits[i].box && hits[i].box.userData && hits[i].box.userData.visible === false)) {
82907
+ _context6.n = 4;
82908
+ break;
82909
+ }
82910
+ return _context6.a(3, 5);
82911
+ case 4:
82912
+ candidates.push(hits[i]);
82913
+ case 5:
82914
+ i++;
82915
+ _context6.n = 3;
82916
+ break;
82917
+ case 6:
82918
+ _context6.n = 8;
82919
+ break;
82920
+ case 7:
82921
+ if (_this6._boxIndex && _this6._boxIndex.size > 0) {
82922
+ _this6._boxIndex.forEach(function (box, modelId) {
82926
82923
  if (bypassList && bypassList.size > 0 && bypassList.has(modelId)) return;
82927
- if (_this7.isBoxInFrustum(box)) {
82924
+ if (box.userData && box.userData.visible === false) return;
82925
+ if (_this6.isBoxInFrustum(box)) {
82928
82926
  candidates.push({
82929
82927
  modelId: modelId,
82930
82928
  box: box
@@ -82932,10 +82930,11 @@ var isDebug = false || false === true;
82932
82930
  }
82933
82931
  });
82934
82932
  }
82935
- occlusionState = _this7.noObserver ? _this7.noObserver.occlusionState : _this7.occlusionState; // 从响应式对象获取开关状态
82936
- occlusionEnabled = _this7.occlusionState && _this7.occlusionState.enabled;
82933
+ case 8:
82934
+ occlusionState = _this6.noObserver ? _this6.noObserver.occlusionState : _this6.occlusionState; // 从响应式对象获取开关状态
82935
+ occlusionEnabled = _this6.occlusionState && _this6.occlusionState.enabled;
82937
82936
  if (!occlusionEnabled) {
82938
- _context6.n = 9;
82937
+ _context6.n = 15;
82939
82938
  break;
82940
82939
  }
82941
82940
  state = occlusionState;
@@ -82943,25 +82942,25 @@ var isDebug = false || false === true;
82943
82942
  h = com_graphicsvue_type_script_lang_js_renderer && com_graphicsvue_type_script_lang_js_renderer.domElement ? com_graphicsvue_type_script_lang_js_renderer.domElement.clientHeight || com_graphicsvue_type_script_lang_js_renderer.domElement.height || 0 : 0; // bufferWidth/Height 仍从响应式对象读取以支持动态修改
82944
82943
  // 性能优化:使用降采样缓冲区进行遮挡剔除,大幅减少 readPixels 耗时 (从全屏降至约 256px 宽)
82945
82944
  aspectRatio = h > 0 ? w / h : 1;
82946
- sw = _this7.occlusionState.bufferWidth || 256;
82945
+ sw = _this6.occlusionState.bufferWidth || 256;
82947
82946
  sh = Math.floor(sw / aspectRatio);
82948
82947
  sw = Math.max(1, sw);
82949
82948
  sh = Math.max(1, sh);
82950
82949
  rt = state._colorRT;
82951
82950
  t0 = performance.now();
82952
- _context6.p = 3;
82951
+ _context6.p = 9;
82953
82952
  if (!rt || state._rtW !== sw || state._rtH !== sh) {
82954
82953
  if (rt && typeof rt.dispose === 'function') rt.dispose();
82955
- rt = new _this7.THREE.WebGLRenderTarget(sw, sh, {
82954
+ rt = new _this6.THREE.WebGLRenderTarget(sw, sh, {
82956
82955
  depthBuffer: true,
82957
82956
  stencilBuffer: false,
82958
82957
  samples: 0
82959
82958
  });
82960
- rt.texture.minFilter = _this7.THREE.NearestFilter;
82961
- rt.texture.magFilter = _this7.THREE.NearestFilter;
82959
+ rt.texture.minFilter = _this6.THREE.NearestFilter;
82960
+ rt.texture.magFilter = _this6.THREE.NearestFilter;
82962
82961
  rt.texture.generateMipmaps = false;
82963
- rt.texture.type = _this7.THREE.UnsignedByteType;
82964
- rt.texture.format = _this7.THREE.RGBAFormat;
82962
+ rt.texture.type = _this6.THREE.UnsignedByteType;
82963
+ rt.texture.format = _this6.THREE.RGBAFormat;
82965
82964
  rt.samples = 0;
82966
82965
  state._colorRT = rt;
82967
82966
  state._rtW = sw;
@@ -82970,7 +82969,7 @@ var isDebug = false || false === true;
82970
82969
  } else if (!state._colorBuffer || state._colorBuffer.length !== sw * sh * 4) {
82971
82970
  state._colorBuffer = new Uint8Array(sw * sh * 4);
82972
82971
  }
82973
- if (!state._occScene) state._occScene = new _this7.THREE.Scene();
82972
+ if (!state._occScene) state._occScene = new _this6.THREE.Scene();
82974
82973
  // if (!state._occPerfStats) state._occPerfStats = Object.create(null);
82975
82974
  // const _occRecordPerf = (name, ms, meta) => {
82976
82975
  // const stats = state._occPerfStats;
@@ -83019,7 +83018,7 @@ var isDebug = false || false === true;
83019
83018
  // child.parent = null;
83020
83019
  // // child.dispatchEvent({ type: 'removed' }); // 保持轻量,暂不触发事件
83021
83020
  // }
83022
- asyncBuildEnabled = _this7.occlusionState && _this7.occlusionState.asyncBuildEnabled && !!window.requestAnimationFrame;
83021
+ asyncBuildEnabled = _this6.occlusionState && _this6.occlusionState.asyncBuildEnabled && !!window.requestAnimationFrame;
83023
83022
  _occBuild = function _occBuild(opaqueList) {
83024
83023
  var tBuild0 = performance.now();
83025
83024
  var flag1Items = [];
@@ -83030,7 +83029,7 @@ var isDebug = false || false === true;
83030
83029
  var obbData = c.box && c.box.userData ? c.box.userData.obbData : null;
83031
83030
  if (!obbData || !obbData.length) continue;
83032
83031
  var idx = globalIdx++;
83033
- activeIdIndexArr[idx] = _this7.formatModelId(c.modelId);
83032
+ activeIdIndexArr[idx] = _this6.formatModelId(c.modelId);
83034
83033
  var flag = c.box.userData && c.box.userData.flag || 1;
83035
83034
  if (flag === 3 && c.box.userData && c.box.userData.obb) {
83036
83035
  flag3Items.push({
@@ -83046,11 +83045,11 @@ var isDebug = false || false === true;
83046
83045
  }
83047
83046
  var maxIdx = globalIdx - 1;
83048
83047
  activeIdIndexArr.length = maxIdx + 1;
83049
- var _tempMatrix = occObjs._tempMatrix || (occObjs._tempMatrix = new _this7.THREE.Matrix4());
83050
- var _tempColor = occObjs._tempColor || (occObjs._tempColor = new _this7.THREE.Color());
83051
- var _tempScale = occObjs._tempScale || (occObjs._tempScale = new _this7.THREE.Vector3());
83052
- var _tempVec3 = occObjs._tempVec3 || (occObjs._tempVec3 = new _this7.THREE.Vector3());
83053
- var _tempMatA = occObjs._tempMatA || (occObjs._tempMatA = new _this7.THREE.Matrix4());
83048
+ var _tempMatrix = occObjs._tempMatrix || (occObjs._tempMatrix = new _this6.THREE.Matrix4());
83049
+ var _tempColor = occObjs._tempColor || (occObjs._tempColor = new _this6.THREE.Color());
83050
+ var _tempScale = occObjs._tempScale || (occObjs._tempScale = new _this6.THREE.Vector3());
83051
+ var _tempVec3 = occObjs._tempVec3 || (occObjs._tempVec3 = new _this6.THREE.Vector3());
83052
+ var _tempMatA = occObjs._tempMatA || (occObjs._tempMatA = new _this6.THREE.Matrix4());
83054
83053
  var boxes = occObjs.boxes;
83055
83054
  var boxCount = flag3Items.length;
83056
83055
  if (boxCount > 0) {
@@ -83063,16 +83062,16 @@ var isDebug = false || false === true;
83063
83062
  if (boxes.mesh.material) boxes.mesh.material.dispose();
83064
83063
  }
83065
83064
  var nextCap = Math.max(needCapacity, capacity > 0 ? capacity * 2 : 256);
83066
- var geometry = new _this7.THREE.BoxGeometry(1, 1, 1);
83067
- var mat = new _this7.THREE.MeshBasicMaterial({
83065
+ var geometry = new _this6.THREE.BoxGeometry(1, 1, 1);
83066
+ var mat = new _this6.THREE.MeshBasicMaterial({
83068
83067
  color: 0xffffff,
83069
- side: _this7.THREE.DoubleSide,
83070
- blending: _this7.THREE.NoBlending,
83068
+ side: _this6.THREE.DoubleSide,
83069
+ blending: _this6.THREE.NoBlending,
83071
83070
  depthTest: true,
83072
83071
  depthWrite: true,
83073
83072
  toneMapped: false
83074
83073
  });
83075
- var mesh = new _this7.THREE.InstancedMesh(geometry, mat, nextCap);
83074
+ var mesh = new _this6.THREE.InstancedMesh(geometry, mat, nextCap);
83076
83075
  mesh.frustumCulled = false;
83077
83076
  mesh.matrixAutoUpdate = false;
83078
83077
  state._occScene.add(mesh);
@@ -83127,16 +83126,16 @@ var isDebug = false || false === true;
83127
83126
  var needIdx = totalIdx;
83128
83127
  var ensureBatch1 = function ensureBatch1() {
83129
83128
  if (batch1 && batch1.mesh && batch1.geometry && batch1.material) return;
83130
- var geometry = new _this7.THREE.BufferGeometry();
83131
- var material = new _this7.THREE.MeshBasicMaterial({
83129
+ var geometry = new _this6.THREE.BufferGeometry();
83130
+ var material = new _this6.THREE.MeshBasicMaterial({
83132
83131
  vertexColors: true,
83133
- side: _this7.THREE.DoubleSide,
83134
- blending: _this7.THREE.NoBlending,
83132
+ side: _this6.THREE.DoubleSide,
83133
+ blending: _this6.THREE.NoBlending,
83135
83134
  depthTest: true,
83136
83135
  depthWrite: true,
83137
83136
  toneMapped: false
83138
83137
  });
83139
- var mesh = new _this7.THREE.Mesh(geometry, material);
83138
+ var mesh = new _this6.THREE.Mesh(geometry, material);
83140
83139
  mesh.frustumCulled = false;
83141
83140
  batch1 = occObjs.batch1 = {
83142
83141
  mesh: mesh,
@@ -83160,14 +83159,14 @@ var isDebug = false || false === true;
83160
83159
  batch1.positions = _positions;
83161
83160
  batch1.colors = _colors;
83162
83161
  batch1.indices = _indices2;
83163
- var _posAttr = new _this7.THREE.BufferAttribute(_positions, 3);
83164
- var _colAttr = new _this7.THREE.BufferAttribute(_colors, 3);
83165
- _posAttr.setUsage(_this7.THREE.DynamicDrawUsage);
83166
- _colAttr.setUsage(_this7.THREE.DynamicDrawUsage);
83162
+ var _posAttr = new _this6.THREE.BufferAttribute(_positions, 3);
83163
+ var _colAttr = new _this6.THREE.BufferAttribute(_colors, 3);
83164
+ _posAttr.setUsage(_this6.THREE.DynamicDrawUsage);
83165
+ _colAttr.setUsage(_this6.THREE.DynamicDrawUsage);
83167
83166
  batch1.geometry.setAttribute('position', _posAttr);
83168
83167
  batch1.geometry.setAttribute('color', _colAttr);
83169
- var _idxAttr = new _this7.THREE.BufferAttribute(_indices2, 1);
83170
- _idxAttr.setUsage(_this7.THREE.DynamicDrawUsage);
83168
+ var _idxAttr = new _this6.THREE.BufferAttribute(_indices2, 1);
83169
+ _idxAttr.setUsage(_this6.THREE.DynamicDrawUsage);
83171
83170
  batch1.geometry.setIndex(_idxAttr);
83172
83171
  }
83173
83172
  var positions = batch1.positions;
@@ -83295,7 +83294,7 @@ var isDebug = false || false === true;
83295
83294
  state._occMaxIdx = 0;
83296
83295
  activeIdIndexArr.length = 0;
83297
83296
  }
83298
- if (!state._occTransparentScene) state._occTransparentScene = new _this7.THREE.Scene();
83297
+ if (!state._occTransparentScene) state._occTransparentScene = new _this6.THREE.Scene();
83299
83298
  transparentMesh = state._occTransparentMesh;
83300
83299
  transparentCapacity = transparentMesh && transparentMesh.userData && typeof transparentMesh.userData.capacity === 'number' ? transparentMesh.userData.capacity : 0;
83301
83300
  if (!transparentMesh || transparentCapacity < transparentTotal) {
@@ -83305,16 +83304,16 @@ var isDebug = false || false === true;
83305
83304
  state._occTransparentScene.remove(transparentMesh);
83306
83305
  }
83307
83306
  nextCap = Math.max(transparentTotal, transparentCapacity > 0 ? transparentCapacity * 2 : 256);
83308
- geometry = new _this7.THREE.BoxGeometry(1, 1, 1);
83309
- material = new _this7.THREE.MeshBasicMaterial({
83307
+ geometry = new _this6.THREE.BoxGeometry(1, 1, 1);
83308
+ material = new _this6.THREE.MeshBasicMaterial({
83310
83309
  color: 0xffffff,
83311
- side: _this7.THREE.DoubleSide,
83312
- blending: _this7.THREE.NoBlending,
83310
+ side: _this6.THREE.DoubleSide,
83311
+ blending: _this6.THREE.NoBlending,
83313
83312
  depthTest: true,
83314
83313
  depthWrite: false,
83315
83314
  toneMapped: false
83316
83315
  });
83317
- transparentMesh = new _this7.THREE.InstancedMesh(geometry, material, nextCap);
83316
+ transparentMesh = new _this6.THREE.InstancedMesh(geometry, material, nextCap);
83318
83317
  transparentMesh.frustumCulled = false;
83319
83318
  transparentMesh.matrixAutoUpdate = false;
83320
83319
  transparentMesh.userData.capacity = nextCap;
@@ -83324,15 +83323,15 @@ var isDebug = false || false === true;
83324
83323
  state._occTransparentScene.add(transparentMesh);
83325
83324
  }
83326
83325
  if (transparentTotal > 0) {
83327
- tempMatrix = new _this7.THREE.Matrix4();
83328
- tempScale = new _this7.THREE.Vector3();
83329
- tempObj = new _this7.THREE.Object3D();
83330
- tempColor = new _this7.THREE.Color();
83326
+ tempMatrix = new _this6.THREE.Matrix4();
83327
+ tempScale = new _this6.THREE.Vector3();
83328
+ tempObj = new _this6.THREE.Object3D();
83329
+ tempColor = new _this6.THREE.Color();
83331
83330
  tIdx = 1;
83332
83331
  for (_i8 = 0; _i8 < transparentTotal; _i8++) {
83333
83332
  c = transparentCandidates[_i8];
83334
83333
  idx = tIdx++;
83335
- transparentIdIndexArr[idx] = _this7.formatModelId(c.modelId);
83334
+ transparentIdIndexArr[idx] = _this6.formatModelId(c.modelId);
83336
83335
  r = (idx & 255) / 255;
83337
83336
  g = (idx >> 8 & 255) / 255;
83338
83337
  b = (idx >> 16 & 255) / 255;
@@ -83380,19 +83379,19 @@ var isDebug = false || false === true;
83380
83379
  if (_c3 && _c3.isColor) prevClearColorHex = _c3.getHex();
83381
83380
  prevClearAlpha = typeof com_graphicsvue_type_script_lang_js_renderer.getClearAlpha === 'function' ? com_graphicsvue_type_script_lang_js_renderer.getClearAlpha() : 0;
83382
83381
  } catch (_) {}
83383
- com_graphicsvue_type_script_lang_js_renderer.toneMapping = _this7.THREE.NoToneMapping;
83382
+ com_graphicsvue_type_script_lang_js_renderer.toneMapping = _this6.THREE.NoToneMapping;
83384
83383
  com_graphicsvue_type_script_lang_js_renderer.setRenderTarget(rt);
83385
- com_graphicsvue_type_script_lang_js_renderer.setClearColor(new _this7.THREE.Color(0, 0, 0), 0);
83384
+ com_graphicsvue_type_script_lang_js_renderer.setClearColor(new _this6.THREE.Color(0, 0, 0), 0);
83386
83385
  com_graphicsvue_type_script_lang_js_renderer.clear(true, true, false);
83387
83386
  com_graphicsvue_type_script_lang_js_camera.updateMatrixWorld(true);
83388
83387
  com_graphicsvue_type_script_lang_js_renderer.render(state._occScene, com_graphicsvue_type_script_lang_js_camera);
83389
- sceneBoundingBox = new _this7.THREE.Box3().setFromObject(state._occScene);
83388
+ sceneBoundingBox = new _this6.THREE.Box3().setFromObject(state._occScene);
83390
83389
  // const t1 = performance.now();
83391
83390
  // 从响应式对象读取 previewEnabled
83392
- _this7.$emit('updateBoundingBox');
83391
+ _this6.$emit('updateBoundingBox');
83393
83392
 
83394
83393
  // const tPreview0 = performance.now();
83395
- if (_this7.occlusionState.previewEnabled) {
83394
+ if (_this6.occlusionState.previewEnabled) {
83396
83395
  if (!state._previewCanvas) {
83397
83396
  cvs = document.createElement('canvas');
83398
83397
  cvs.style.position = 'fixed';
@@ -83443,12 +83442,12 @@ var isDebug = false || false === true;
83443
83442
  totalPixels = sw * sh;
83444
83443
  targetSamples = totalPixels;
83445
83444
  baseStride = Math.max(1, Math.floor(Math.sqrt(totalPixels / Math.max(1, targetSamples))));
83446
- extraStride = _this7.occlusionState && _this7.occlusionState.sampleStride ? _this7.occlusionState.sampleStride : 1;
83445
+ extraStride = _this6.occlusionState && _this6.occlusionState.sampleStride ? _this6.occlusionState.sampleStride : 1;
83447
83446
  stride = Math.max(1, baseStride * Math.max(1, extraStride));
83448
- minSampleCount = _this7.occlusionState && _this7.occlusionState.minSampleCount ? _this7.occlusionState.minSampleCount : 1;
83449
- _context6.n = 4;
83450
- return _this7.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, maxIdx, minSampleCount);
83451
- case 4:
83447
+ minSampleCount = _this6.occlusionState && _this6.occlusionState.minSampleCount ? _this6.occlusionState.minSampleCount : 1;
83448
+ _context6.n = 10;
83449
+ return _this6.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, maxIdx, minSampleCount);
83450
+ case 10:
83452
83451
  scanResult = _context6.v;
83453
83452
  if (scanResult && scanResult.buffer) {
83454
83453
  state._colorBuffer = new Uint8Array(scanResult.buffer);
@@ -83462,17 +83461,17 @@ var isDebug = false || false === true;
83462
83461
  }
83463
83462
  transparentMaxIdx = typeof state._occTransparentMaxIdx === 'number' ? state._occTransparentMaxIdx : 0;
83464
83463
  if (!(transparentMaxIdx > 0 && transparentMesh && transparentMesh.visible)) {
83465
- _context6.n = 6;
83464
+ _context6.n = 12;
83466
83465
  break;
83467
83466
  }
83468
- com_graphicsvue_type_script_lang_js_renderer.setClearColor(new _this7.THREE.Color(0, 0, 0), 0);
83467
+ com_graphicsvue_type_script_lang_js_renderer.setClearColor(new _this6.THREE.Color(0, 0, 0), 0);
83469
83468
  com_graphicsvue_type_script_lang_js_renderer.clear(true, false, false);
83470
83469
  com_graphicsvue_type_script_lang_js_renderer.render(state._occTransparentScene, com_graphicsvue_type_script_lang_js_camera);
83471
83470
  com_graphicsvue_type_script_lang_js_renderer.readRenderTargetPixels(rt, 0, 0, sw, sh, state._colorBuffer);
83472
83471
  tIdIndexArr = transparentIdIndexArr;
83473
- _context6.n = 5;
83474
- return _this7.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, transparentMaxIdx, minSampleCount);
83475
- case 5:
83472
+ _context6.n = 11;
83473
+ return _this6.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, transparentMaxIdx, minSampleCount);
83474
+ case 11:
83476
83475
  tScanResult = _context6.v;
83477
83476
  if (tScanResult && tScanResult.buffer) {
83478
83477
  state._colorBuffer = new Uint8Array(tScanResult.buffer);
@@ -83484,26 +83483,26 @@ var isDebug = false || false === true;
83484
83483
  visibleIdSet.add(_id);
83485
83484
  }
83486
83485
  }
83487
- case 6:
83486
+ case 12:
83488
83487
  com_graphicsvue_type_script_lang_js_renderer.setRenderTarget(prevTarget);
83489
83488
  com_graphicsvue_type_script_lang_js_renderer.setClearColor(prevClearColorHex, prevClearAlpha);
83490
83489
  com_graphicsvue_type_script_lang_js_renderer.toneMapping = prevToneMapping;
83491
- _context6.n = 8;
83490
+ _context6.n = 14;
83492
83491
  break;
83493
- case 7:
83494
- _context6.p = 7;
83492
+ case 13:
83493
+ _context6.p = 13;
83495
83494
  _t = _context6.v;
83496
83495
  for (_i1 = 0; _i1 < candidates.length; _i1++) {
83497
83496
  visibleIdSet.add(candidates[_i1].modelId);
83498
83497
  }
83499
- case 8:
83500
- _context6.n = 10;
83498
+ case 14:
83499
+ _context6.n = 16;
83501
83500
  break;
83502
- case 9:
83501
+ case 15:
83503
83502
  for (_i10 = 0; _i10 < candidates.length; _i10++) {
83504
83503
  visibleIdSet.add(candidates[_i10].modelId);
83505
83504
  }
83506
- case 10:
83505
+ case 16:
83507
83506
  visibleIds.length = 0;
83508
83507
  visibleIdSet.forEach(function (id) {
83509
83508
  return visibleIds.push(id);
@@ -83524,7 +83523,7 @@ var isDebug = false || false === true;
83524
83523
  var _modelId = _modelIds2[_i11];
83525
83524
  // 检查已取消勾选模型进行卸载
83526
83525
  var documentId = _modelId.split(':')[1];
83527
- if (!_this7.noObserver.documentModelIds.get(documentId)) {
83526
+ if (!_this6.noObserver.documentModelIds.get(documentId)) {
83528
83527
  toUnload.push({
83529
83528
  modelId: _modelId,
83530
83529
  child: child
@@ -83534,7 +83533,7 @@ var isDebug = false || false === true;
83534
83533
  if (bypassList && bypassList.size > 0 && bypassList.has(_modelId)) return;
83535
83534
  var instanceInfo = instancesMap.get(_modelId);
83536
83535
  var instanceIndex = instanceInfo && typeof instanceInfo.instanceIndex === 'number' ? instanceInfo.instanceIndex : null;
83537
- var _inFrustum = _this7.isModelInFrustum(child, instanceIndex, globalFrustum);
83536
+ var _inFrustum = _this6.isModelInFrustum(child, instanceIndex, globalFrustum);
83538
83537
  var _modelInVisible = toLoadSet.has(_modelId);
83539
83538
  // console.log('modelId', modelId, 'inFrustum', inFrustum, 'modelInVisible', modelInVisible)
83540
83539
 
@@ -83568,7 +83567,7 @@ var isDebug = false || false === true;
83568
83567
  }
83569
83568
  var modelId = child.parent && child.parent.userData && child.parent.userData.instanceId ? child.parent.userData.instanceId : child.uuid;
83570
83569
  if (bypassList && bypassList.size > 0 && bypassList.has(modelId)) return;
83571
- var inFrustum = _this7.isModelInFrustum(child, null, globalFrustum);
83570
+ var inFrustum = _this6.isModelInFrustum(child, null, globalFrustum);
83572
83571
  var modelInVisible = toLoadSet.has(modelId);
83573
83572
  if (modelInVisible) {
83574
83573
  toLoadSet.delete(modelId);
@@ -83583,7 +83582,7 @@ var isDebug = false || false === true;
83583
83582
  for (_i13 = 0, _toUnload = toUnload; _i13 < _toUnload.length; _i13++) {
83584
83583
  _toUnload$_i = _toUnload[_i13], modelId = _toUnload$_i.modelId, child = _toUnload$_i.child;
83585
83584
  if (child && child.parent) parentsToCheck.add(child.parent);
83586
- _this7.unloadInstancedModel(modelId, child);
83585
+ _this6.unloadInstancedModel(modelId, child);
83587
83586
  }
83588
83587
  if (com_graphicsvue_type_script_lang_js_scene) {
83589
83588
  parentsToCheck.forEach(function (group) {
@@ -83592,11 +83591,11 @@ var isDebug = false || false === true;
83592
83591
  }
83593
83592
  });
83594
83593
  }
83595
- _this7.modelStateManager.isloadedModelsIds = Object.freeze(Array.from(toLoadSet));
83596
- case 11:
83594
+ _this6.modelStateManager.isloadedModelsIds = Object.freeze(Array.from(toLoadSet));
83595
+ case 17:
83597
83596
  return _context6.a(2);
83598
83597
  }
83599
- }, _callee6, null, [[3, 7]]);
83598
+ }, _callee6, null, [[9, 13]]);
83600
83599
  }))();
83601
83600
  },
83602
83601
  isBoxInFrustum: function isBoxInFrustum(box) {
@@ -83682,18 +83681,24 @@ var isDebug = false || false === true;
83682
83681
  // 移除重新加载逻辑实现
83683
83682
  return;
83684
83683
  },
83684
+ /**
83685
+ * 初始化流式加载器(别名 init)
83686
+ * @param {Object} config - 其他配置
83687
+ */
83688
+ init: function init() {
83689
+ var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
83690
+ this.initStreamLoader(config.modelApi, config);
83691
+ },
83685
83692
  /**
83686
83693
  * 初始化流式加载器
83687
83694
  * @param {Object} modelApi - 模型API接口
83688
83695
  * @param {Object} config - 其他配置
83689
83696
  */
83690
83697
  initStreamLoader: function initStreamLoader(modelApi) {
83691
- var _this8 = this;
83698
+ var _this7 = this;
83692
83699
  var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
83693
83700
  var _ref0 = config || {},
83694
83701
  projectId = _ref0.projectId,
83695
- pbsId = _ref0.pbsId,
83696
- version = _ref0.version,
83697
83702
  restConfig = _objectWithoutProperties(_ref0, _excluded);
83698
83703
  var streamLoader = new StreamLoader_StreamLoader(com_graphicsvue_type_script_lang_js_objectSpread({
83699
83704
  modelApi: modelApi,
@@ -83705,7 +83710,7 @@ var isDebug = false || false === true;
83705
83710
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context7) {
83706
83711
  while (1) switch (_context7.n) {
83707
83712
  case 0:
83708
- if (!(userInteracting || _this8.noObserver.batchLoadingState.interactionState.isInteracting)) {
83713
+ if (!(userInteracting || _this7.noObserver.batchLoadingState.interactionState.isInteracting)) {
83709
83714
  _context7.n = 1;
83710
83715
  break;
83711
83716
  }
@@ -83749,6 +83754,18 @@ var isDebug = false || false === true;
83749
83754
  }()
83750
83755
  }, restConfig));
83751
83756
  this.noObserver.streamLoader = streamLoader;
83757
+ if (streamLoader.worker) {
83758
+ this.noObserver.occlusionWorker = streamLoader.worker;
83759
+ this.noObserver.occlusionWorkerRequestId = 0;
83760
+ this.noObserver.occlusionWorkerRequestMap = new Map();
83761
+ streamLoader.worker.addEventListener('message', function (e) {
83762
+ var payload = e.data || {};
83763
+ var pending = _this7.noObserver.occlusionWorkerRequestMap.get(payload.id);
83764
+ if (!pending) return;
83765
+ _this7.noObserver.occlusionWorkerRequestMap.delete(payload.id);
83766
+ pending.resolve(payload);
83767
+ });
83768
+ }
83752
83769
  },
83753
83770
  /**
83754
83771
  * 设置当前流式加载的模型数据
@@ -83756,13 +83773,13 @@ var isDebug = false || false === true;
83756
83773
  * @param {Object} materialData - 材质数据
83757
83774
  */
83758
83775
  setStreamModel: function setStreamModel(item, materialData) {
83759
- var _this9 = this;
83776
+ var _this8 = this;
83760
83777
  if (this.noObserver.streamLoader) {
83761
83778
  this.noObserver.streamLoader.setCurrentModel(item, materialData);
83762
83779
  // 设置完模型后,尝试触发一次范围加载以渲染初始视图
83763
83780
  // 使用 setTimeout 确保在下一帧执行,避免当前栈还在初始化中
83764
83781
  setTimeout(function () {
83765
- _this9.getRangeStream();
83782
+ _this8.getRangeStream();
83766
83783
  }, 0);
83767
83784
  } else {}
83768
83785
  },
@@ -83770,17 +83787,17 @@ var isDebug = false || false === true;
83770
83787
  * 批量加载区域(供外部调用)
83771
83788
  */
83772
83789
  batchLoadRegions: function batchLoadRegions(item, divideData, materialData) {
83773
- var _this0 = this;
83790
+ var _this9 = this;
83774
83791
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee9() {
83775
83792
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context9) {
83776
83793
  while (1) switch (_context9.n) {
83777
83794
  case 0:
83778
- if (!_this0.noObserver.streamLoader) {
83795
+ if (!_this9.noObserver.streamLoader) {
83779
83796
  _context9.n = 1;
83780
83797
  break;
83781
83798
  }
83782
83799
  _context9.n = 1;
83783
- return _this0.noObserver.streamLoader.batchLoadRegions(item, divideData, materialData);
83800
+ return _this9.noObserver.streamLoader.batchLoadRegions(item, divideData, materialData);
83784
83801
  case 1:
83785
83802
  return _context9.a(2);
83786
83803
  }
@@ -83791,7 +83808,7 @@ var isDebug = false || false === true;
83791
83808
  * 获取批量加载详情(供外部调用)
83792
83809
  */
83793
83810
  loadModelByIds: function loadModelByIds(options) {
83794
- var _this1 = this;
83811
+ var _this0 = this;
83795
83812
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee0() {
83796
83813
  var _ref1, ids;
83797
83814
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context0) {
@@ -83799,13 +83816,13 @@ var isDebug = false || false === true;
83799
83816
  case 0:
83800
83817
  // 绕过剔除模型
83801
83818
  _ref1 = options.params || {}, ids = _ref1.ids;
83802
- _this1.addBypassCullingModelIds(ids);
83803
- if (!_this1.noObserver.streamLoader) {
83819
+ _this0.addBypassCullingModelIds(ids);
83820
+ if (!_this0.noObserver.streamLoader) {
83804
83821
  _context0.n = 2;
83805
83822
  break;
83806
83823
  }
83807
83824
  _context0.n = 1;
83808
- return _this1.noObserver.streamLoader.loadModelByIds(options);
83825
+ return _this0.noObserver.streamLoader.loadModelByIds(options);
83809
83826
  case 1:
83810
83827
  return _context0.a(2, _context0.v);
83811
83828
  case 2:
@@ -83817,40 +83834,47 @@ var isDebug = false || false === true;
83817
83834
  /**
83818
83835
  * 处理单个模型项加载(供外部调用)
83819
83836
  */
83820
- processModelItem: function processModelItem(item, todoFunc) {
83821
- var _this10 = this;
83837
+ processModelItem: function processModelItem(item) {
83838
+ var _arguments = arguments,
83839
+ _this1 = this;
83822
83840
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee1() {
83823
- var res;
83841
+ var _options$onComplete;
83842
+ var options, res;
83824
83843
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context1) {
83825
83844
  while (1) switch (_context1.n) {
83826
83845
  case 0:
83827
- if (!_this10.noObserver.streamLoader) {
83828
- _context1.n = 2;
83829
- break;
83830
- }
83846
+ options = _arguments.length > 1 && _arguments[1] !== undefined ? _arguments[1] : {};
83831
83847
  _context1.n = 1;
83832
- return _this10.noObserver.streamLoader.processModelItem(item, todoFunc);
83848
+ return _this1.noObserver.streamLoader.processModelItem(item, options);
83833
83849
  case 1:
83834
83850
  res = _context1.v;
83835
83851
  // item.id is the documentId
83836
83852
  if (item && item.id) {
83837
83853
  if (res && res.sceneBox) {
83838
- _this10.setSceneBox(res.sceneBox, item.id, true);
83854
+ _this1.setSceneBox(res.sceneBox, item.id, true);
83839
83855
  }
83840
83856
  if (res && res.boxIndex) {
83841
- _this10.setBoxIndex(res.boxIndex, item.id, true);
83857
+ _this1.setBoxIndex(res.boxIndex, item.id, true);
83842
83858
  }
83843
83859
  // this.setBoxIndex(boxJson.data, item.id, true);
83844
83860
  }
83845
- return _context1.a(2, res);
83861
+ (_options$onComplete = options.onComplete) === null || _options$onComplete === void 0 || _options$onComplete.call(options);
83862
+ _this1.notifyCameraChange(); // 触发场景更新
83846
83863
  case 2:
83847
- return _context1.a(2, null);
83848
- case 3:
83849
83864
  return _context1.a(2);
83850
83865
  }
83851
83866
  }, _callee1);
83852
83867
  }))();
83853
83868
  },
83869
+ /**
83870
+ * 渲染模型项
83871
+ * @param {Object} item - 模型项信息
83872
+ */
83873
+ render: function render(item) {
83874
+ return this.processModelItem(item, {
83875
+ onComplete: item.onComplete
83876
+ });
83877
+ },
83854
83878
  removeModelByDocumentId: function removeModelByDocumentId(documentId) {
83855
83879
  this.setSceneBox(null, documentId, false);
83856
83880
  this.setBoxIndex(null, documentId, false);
@@ -84050,7 +84074,7 @@ var isDebug = false || false === true;
84050
84074
  * 统一监听:用户交互(Wheel/Control)、程序化动画、API调用
84051
84075
  */
84052
84076
  initCameraChangeObserver: function initCameraChangeObserver() {
84053
- var _this11 = this;
84077
+ var _this10 = this;
84054
84078
  // 初始化 control 状态标志
84055
84079
  this.noObserver.isControlActive = false;
84056
84080
 
@@ -84060,28 +84084,28 @@ var isDebug = false || false === true;
84060
84084
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context10) {
84061
84085
  while (1) switch (_context10.n) {
84062
84086
  case 0:
84063
- if (_this11.noObserver.isObserverEnabled) {
84087
+ if (_this10.noObserver.isObserverEnabled) {
84064
84088
  _context10.n = 1;
84065
84089
  break;
84066
84090
  }
84067
84091
  return _context10.a(2);
84068
84092
  case 1:
84069
- if (!(source === 'rest' && _this11.noObserver.isControlActive)) {
84093
+ if (!(source === 'rest' && _this10.noObserver.isControlActive)) {
84070
84094
  _context10.n = 2;
84071
84095
  break;
84072
84096
  }
84073
84097
  return _context10.a(2);
84074
84098
  case 2:
84075
- if (!_this11.modelStateManager.frustumCheckEnabled) {
84099
+ if (!_this10.modelStateManager.frustumCheckEnabled) {
84076
84100
  _context10.n = 3;
84077
84101
  break;
84078
84102
  }
84079
84103
  _context10.n = 3;
84080
- return _this11.performFrustumCulling();
84104
+ return _this10.performFrustumCulling();
84081
84105
  case 3:
84082
84106
  // 执行流式加载请求
84083
- if (_this11.modelStateManager.isloadedModelsIds && _this11.modelStateManager.isloadedModelsIds.length > 0) {
84084
- _this11.getRangeStream(false);
84107
+ if (_this10.modelStateManager.isloadedModelsIds && _this10.modelStateManager.isloadedModelsIds.length > 0) {
84108
+ _this10.getRangeStream(false);
84085
84109
  }
84086
84110
  case 4:
84087
84111
  return _context10.a(2);
@@ -84106,18 +84130,18 @@ var isDebug = false || false === true;
84106
84130
  // 2. 公开API:允许外部或业务逻辑手动触发更新
84107
84131
  this.notifyCameraChange = function () {
84108
84132
  var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'api';
84109
- _this11._cameraChangeObserver(source);
84133
+ _this10._cameraChangeObserver(source);
84110
84134
  };
84111
84135
 
84112
84136
  // 3. 监听器 - Wheel (用户滚轮)
84113
84137
  this._wheelHandler = function (res) {
84114
- _this11.$emit('wheelStart', res);
84138
+ _this10.$emit('wheelStart', res);
84115
84139
 
84116
84140
  // 统一交互开始处理
84117
- _this11.beginInteraction('wheel');
84141
+ _this10.beginInteraction('wheel');
84118
84142
 
84119
84143
  // 设置滚轮交互的结束检测
84120
- _this11.scheduleWheelInteractionEnd(res, 100);
84144
+ _this10.scheduleWheelInteractionEnd(res, 100);
84121
84145
 
84122
84146
  // 滚轮逻辑:infinityDolly 与 maxDollyDistance 控制
84123
84147
  var event = res;
@@ -84149,17 +84173,17 @@ var isDebug = false || false === true;
84149
84173
  }
84150
84174
 
84151
84175
  // 触发观察者
84152
- _this11._cameraChangeObserver('wheel');
84176
+ _this10._cameraChangeObserver('wheel');
84153
84177
  };
84154
84178
  com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('wheel', this._wheelHandler);
84155
84179
 
84156
84180
  // 4. 监听器 - Controls (用户拖拽/操作)
84157
84181
  this._onControlStart = function (res) {
84158
- _this11.noObserver.isControlActive = true;
84182
+ _this10.noObserver.isControlActive = true;
84159
84183
 
84160
84184
  // 统一交互开始处理(相机)
84161
- _this11.beginInteraction('camera');
84162
- _this11.$emit('controlStart', res);
84185
+ _this10.beginInteraction('camera');
84186
+ _this10.$emit('controlStart', res);
84163
84187
 
84164
84188
  // 记录鼠标按下时的位置
84165
84189
  var event = res.originalEvent || window.event;
@@ -84170,11 +84194,11 @@ var isDebug = false || false === true;
84170
84194
  }
84171
84195
  };
84172
84196
  this._onControlEnd = function (res) {
84173
- _this11.noObserver.isControlActive = false;
84174
- _this11.$emit('controlEnd', res);
84197
+ _this10.noObserver.isControlActive = false;
84198
+ _this10.$emit('controlEnd', res);
84175
84199
 
84176
84200
  // 统一交互结束处理(相机)
84177
- _this11.endInteraction('camera', res, {
84201
+ _this10.endInteraction('camera', res, {
84178
84202
  immediateResume: false
84179
84203
  });
84180
84204
 
@@ -84203,7 +84227,7 @@ var isDebug = false || false === true;
84203
84227
  // }
84204
84228
 
84205
84229
  // 触发观察者
84206
- _this11._cameraChangeObserver('control');
84230
+ _this10._cameraChangeObserver('control');
84207
84231
  }
84208
84232
  };
84209
84233
  cameraControls.addEventListener('controlstart', this._onControlStart);
@@ -84213,7 +84237,7 @@ var isDebug = false || false === true;
84213
84237
  // 监听 rest 事件,捕获 cameraControls.setLookAt(..., true) 等动画结束(以及阻尼停止)
84214
84238
  // 注意:rest 事件在用户交互完全静止时也会触发,与 controlEnd 有部分重叠,但 Observer 有防抖,影响不大
84215
84239
  this._onRest = function () {
84216
- _this11._cameraChangeObserver('rest');
84240
+ _this10._cameraChangeObserver('rest');
84217
84241
  };
84218
84242
  cameraControls.addEventListener('rest', this._onRest);
84219
84243
  },
@@ -84234,12 +84258,12 @@ var isDebug = false || false === true;
84234
84258
  },
84235
84259
  // 根据模型数据绘制模型实体 业务平台可调用此方法加载模型
84236
84260
  /*
84237
- 参数:data 模型数据
84238
- color: '' 初始化模型的颜色 在业务方 有这个需求
84239
- meshNameConfig: {}
84240
- */
84261
+ 参数:data 模型数据
84262
+ color: '' 初始化模型的颜色 在业务方 有这个需求
84263
+ meshNameConfig: {}
84264
+ */
84241
84265
  drawModel: function drawModel(data) {
84242
- var _this12 = this;
84266
+ var _this11 = this;
84243
84267
  var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
84244
84268
  var meshNameConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
84245
84269
  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
@@ -84247,13 +84271,13 @@ var isDebug = false || false === true;
84247
84271
  // 使用新的分帧加载方法,提供进度回调
84248
84272
  return this.drawModelWithBatchLoading(data, color, meshNameConfig, options, function (progress) {
84249
84273
  // 触发原有的进度事件
84250
- _this12.$emit('loadProgress', progress);
84274
+ _this11.$emit('loadProgress', progress);
84251
84275
  }, function (complete) {
84252
- var _options$onComplete;
84253
- options === null || options === void 0 || (_options$onComplete = options.onComplete) === null || _options$onComplete === void 0 || _options$onComplete.call(options, complete);
84276
+ var _options$onComplete2;
84277
+ options === null || options === void 0 || (_options$onComplete2 = options.onComplete) === null || _options$onComplete2 === void 0 || _options$onComplete2.call(options, complete);
84254
84278
  console.log('加载完成');
84255
84279
  // 触发原有的完成事件
84256
- _this12.$emit('loadComplete');
84280
+ _this11.$emit('loadComplete');
84257
84281
  });
84258
84282
  },
84259
84283
  // 动态设置视角滚轮的距离
@@ -84331,13 +84355,13 @@ var isDebug = false || false === true;
84331
84355
  }
84332
84356
  },
84333
84357
  mouseClick: function mouseClick(event) {
84334
- var _this13 = this;
84358
+ var _this12 = this;
84335
84359
  // 鼠标抬起时重置渲染中断标记
84336
84360
  setTimeout(function () {
84337
84361
  forceSkipRendering = false;
84338
84362
  // interactionFrameCount = 0;
84339
84363
  // 恢复批次加载操作
84340
- _this13.resumeBatchLoading();
84364
+ _this12.resumeBatchLoading();
84341
84365
  }, 50); // 短暂延迟确保交互完成
84342
84366
 
84343
84367
  // 在测量模式下,不进行事件暴露
@@ -84472,7 +84496,7 @@ var isDebug = false || false === true;
84472
84496
  },
84473
84497
  // 带防抖和用户交互检测的智能居中方法
84474
84498
  smartModelCenter: function smartModelCenter(mesh) {
84475
- var _this14 = this;
84499
+ var _this13 = this;
84476
84500
  var debounceDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
84477
84501
  // if (hasExecutedCentering) {
84478
84502
  // return;
@@ -84492,13 +84516,13 @@ var isDebug = false || false === true;
84492
84516
  // 设置新的防抖定时器
84493
84517
  centeringDebounceTimer = setTimeout(function () {
84494
84518
  // 如果已经执行过居中操作,则不再执行
84495
- if (!userInteracting && !hasExecutedCentering && _this14.noObserver.documentModelIds.size > 0) {
84496
- _this14.setModelCenter(mesh, {
84519
+ if (!userInteracting && !hasExecutedCentering && _this13.noObserver.documentModelIds.size > 0) {
84520
+ _this13.setModelCenter(mesh, {
84497
84521
  enableTransition: false
84498
84522
  });
84499
84523
  hasExecutedCentering = true;
84500
84524
  // 触发场景更新
84501
- _this14.notifyCameraChange();
84525
+ _this13.notifyCameraChange();
84502
84526
  }
84503
84527
  }, debounceDelay);
84504
84528
  },
@@ -84521,12 +84545,12 @@ var isDebug = false || false === true;
84521
84545
  * }
84522
84546
  */
84523
84547
  updateProperty: function updateProperty(list) {
84524
- var _this15 = this;
84548
+ var _this14 = this;
84525
84549
  var _loop = function _loop() {
84526
84550
  var ele = list[index];
84527
84551
  var type = ele.type || 'mesh';
84528
84552
  var instanceId = ele.name;
84529
- var targetObj = _this15.getObjectByName(instanceId);
84553
+ var targetObj = _this14.getObjectByName(instanceId);
84530
84554
  var _loop2 = function _loop2(key) {
84531
84555
  switch (key) {
84532
84556
  case 'color':
@@ -84534,11 +84558,11 @@ var isDebug = false || false === true;
84534
84558
  if (children.isMesh) {
84535
84559
  var _children$userData$in = children.userData.instancesMap.get(instanceId),
84536
84560
  instanceIndex = _children$userData$in.instanceIndex;
84537
- children.setColorAt(instanceIndex, new _this15.THREE.Color(ele.attr[key]));
84561
+ children.setColorAt(instanceIndex, new _this14.THREE.Color(ele.attr[key]));
84538
84562
  children.instanceColor.needsUpdate = true;
84539
84563
  if (outlinePass) {
84540
84564
  if (children.isInstancedMesh) {
84541
- var proxy = _this15.ensureOutlineInstanceProxy(children, instanceIndex);
84565
+ var proxy = _this14.ensureOutlineInstanceProxy(children, instanceIndex);
84542
84566
  if (proxy && !outlinePass.selectedObjects.includes(proxy)) {
84543
84567
  outlinePass.selectedObjects.push(proxy);
84544
84568
  }
@@ -84550,11 +84574,17 @@ var isDebug = false || false === true;
84550
84574
  });
84551
84575
  break;
84552
84576
  case 'visible':
84577
+ if (_this14._boxIndex && _this14._boxIndex.has(instanceId)) {
84578
+ var boxData = _this14._boxIndex.get(instanceId);
84579
+ if (boxData && boxData.userData) {
84580
+ boxData.userData.visible = ele.attr[key];
84581
+ }
84582
+ }
84553
84583
  targetObj.forEach(function (children) {
84554
84584
  var _children$userData$in2 = children.userData.instancesMap.get(instanceId),
84555
84585
  instanceIndex = _children$userData$in2.instanceIndex;
84556
84586
  if (ele.attr[key]) {
84557
- var restoreMatrix = new _this15.THREE.Matrix4().copy(children.userData.copyMatrix);
84587
+ var restoreMatrix = new _this14.THREE.Matrix4().copy(children.userData.copyMatrix);
84558
84588
  children.setMatrixAt(instanceIndex, restoreMatrix);
84559
84589
  // if (outlinePass) {
84560
84590
  // if (children.isInstancedMesh) {
@@ -84567,11 +84597,11 @@ var isDebug = false || false === true;
84567
84597
  // }
84568
84598
  // }
84569
84599
  } else {
84570
- var offsetMatrix = new _this15.THREE.Matrix4().copy(children.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
84600
+ var offsetMatrix = new _this14.THREE.Matrix4().copy(children.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
84571
84601
  children.setMatrixAt(instanceIndex, offsetMatrix);
84572
84602
  if (outlinePass) {
84573
84603
  if (children.isInstancedMesh) {
84574
- _this15.removeOutlineInstanceProxy(children, instanceIndex);
84604
+ _this14.removeOutlineInstanceProxy(children, instanceIndex);
84575
84605
  } else {
84576
84606
  var idx = outlinePass.selectedObjects.indexOf(children);
84577
84607
  if (idx !== -1) outlinePass.selectedObjects.splice(idx, 1);
@@ -84580,6 +84610,7 @@ var isDebug = false || false === true;
84580
84610
  }
84581
84611
  children.instanceMatrix.needsUpdate = true;
84582
84612
  });
84613
+ _this14.notifyCameraChange(); // 触发场景更新
84583
84614
  break;
84584
84615
  case 'opacity':
84585
84616
  targetObj.forEach(function (children) {
@@ -84609,7 +84640,7 @@ var isDebug = false || false === true;
84609
84640
  }
84610
84641
  },
84611
84642
  showOutlinePass: function showOutlinePass(instanceId) {
84612
- var _this16 = this;
84643
+ var _this15 = this;
84613
84644
  var targetObj = this.getObjectByName(instanceId);
84614
84645
  targetObj.forEach(function (children) {
84615
84646
  if (children.isMesh) {
@@ -84617,7 +84648,7 @@ var isDebug = false || false === true;
84617
84648
  instanceIndex = _children$userData$in4.instanceIndex;
84618
84649
  if (outlinePass) {
84619
84650
  if (children.isInstancedMesh) {
84620
- var proxy = _this16.ensureOutlineInstanceProxy(children, instanceIndex);
84651
+ var proxy = _this15.ensureOutlineInstanceProxy(children, instanceIndex);
84621
84652
  if (proxy && !outlinePass.selectedObjects.includes(proxy)) {
84622
84653
  outlinePass.selectedObjects.push(proxy);
84623
84654
  }
@@ -84629,7 +84660,7 @@ var isDebug = false || false === true;
84629
84660
  });
84630
84661
  },
84631
84662
  hideOutlinePass: function hideOutlinePass(instanceId) {
84632
- var _this17 = this;
84663
+ var _this16 = this;
84633
84664
  var targetObj = this.getObjectByName(instanceId);
84634
84665
  targetObj.forEach(function (children) {
84635
84666
  if (children.isMesh) {
@@ -84637,7 +84668,7 @@ var isDebug = false || false === true;
84637
84668
  instanceIndex = _children$userData$in5.instanceIndex;
84638
84669
  if (outlinePass) {
84639
84670
  if (children.isInstancedMesh) {
84640
- _this17.removeOutlineInstanceProxy(children, instanceIndex);
84671
+ _this16.removeOutlineInstanceProxy(children, instanceIndex);
84641
84672
  } else {
84642
84673
  var idx = outlinePass.selectedObjects.indexOf(children);
84643
84674
  if (idx !== -1) outlinePass.selectedObjects.splice(idx, 1);
@@ -84665,17 +84696,17 @@ var isDebug = false || false === true;
84665
84696
  },
84666
84697
  // 修改材质的自定义数据
84667
84698
  updateMaterialUserData: function updateMaterialUserData(list) {
84668
- var _this18 = this;
84699
+ var _this17 = this;
84669
84700
  var _loop3 = function _loop3() {
84670
84701
  var ele = list[index];
84671
84702
  var instanceId = ele.name;
84672
- var targetObj = _this18.getObjectByName(instanceId);
84703
+ var targetObj = _this17.getObjectByName(instanceId);
84673
84704
  var _loop4 = function _loop4(key) {
84674
84705
  switch (key) {
84675
84706
  case 'nColor':
84676
84707
  targetObj.forEach(function (children) {
84677
84708
  if (children.isMesh) {
84678
- children.material.userData[key] = new _this18.THREE.Color(ele.attr[key]);
84709
+ children.material.userData[key] = new _this17.THREE.Color(ele.attr[key]);
84679
84710
  }
84680
84711
  });
84681
84712
  break;
@@ -84691,12 +84722,12 @@ var isDebug = false || false === true;
84691
84722
  },
84692
84723
  // 重置
84693
84724
  resetMaterialUserData: function resetMaterialUserData(list) {
84694
- var _this19 = this;
84725
+ var _this18 = this;
84695
84726
  console.log('resetMaterialUserData');
84696
84727
  var _loop5 = function _loop5() {
84697
84728
  var ele = list[index];
84698
84729
  var instanceId = ele.name;
84699
- var targetObj = _this19.getObjectByName(instanceId);
84730
+ var targetObj = _this18.getObjectByName(instanceId);
84700
84731
  var _loop6 = function _loop6(key) {
84701
84732
  switch (key) {
84702
84733
  case 'nColor':
@@ -84722,11 +84753,11 @@ var isDebug = false || false === true;
84722
84753
  },
84723
84754
  // 清除上一次的属性修改操作 为了方便业务平台参数跟updateProperty方法的参数一样
84724
84755
  resetProperty: function resetProperty(list) {
84725
- var _this20 = this;
84756
+ var _this19 = this;
84726
84757
  var _loop7 = function _loop7() {
84727
84758
  var ele = list[index];
84728
84759
  var instanceId = ele.name;
84729
- var obj = _this20.getObjectByName(instanceId);
84760
+ var obj = _this19.getObjectByName(instanceId);
84730
84761
  if (obj) {
84731
84762
  for (var key in ele.attr) {
84732
84763
  switch (key) {
@@ -84739,7 +84770,7 @@ var isDebug = false || false === true;
84739
84770
  children.instanceColor.needsUpdate = true;
84740
84771
  if (outlinePass) {
84741
84772
  if (children.isInstancedMesh) {
84742
- _this20.removeOutlineInstanceProxy(children, instanceIndex);
84773
+ _this19.removeOutlineInstanceProxy(children, instanceIndex);
84743
84774
  } else {
84744
84775
  var idx = outlinePass.selectedObjects.indexOf(children);
84745
84776
  if (idx !== -1) outlinePass.selectedObjects.splice(idx, 1);
@@ -84753,7 +84784,7 @@ var isDebug = false || false === true;
84753
84784
  var _children$userData$in8 = children.userData.instancesMap.get(instanceId),
84754
84785
  instanceIndex = _children$userData$in8.instanceIndex,
84755
84786
  copyMatrix = _children$userData$in8.copyMatrix;
84756
- var restoreMatrix = new _this20.THREE.Matrix4().copy(copyMatrix);
84787
+ var restoreMatrix = new _this19.THREE.Matrix4().copy(copyMatrix);
84757
84788
  children.setMatrixAt(instanceIndex, restoreMatrix);
84758
84789
  children.instanceMatrix.needsUpdate = true;
84759
84790
  });
@@ -84779,12 +84810,12 @@ var isDebug = false || false === true;
84779
84810
  // 定位到模型
84780
84811
  // name 模型名称 可以是数组
84781
84812
  locateModel: function locateModel(name) {
84782
- var _this21 = this;
84813
+ var _this20 = this;
84783
84814
  if (!com_graphicsvue_type_script_lang_js_scene) return;
84784
84815
  if (Array.isArray(name)) {
84785
84816
  var box3 = new this.THREE.Box3();
84786
84817
  name.forEach(function (n) {
84787
- var arr = _this21.getObjectByName(n);
84818
+ var arr = _this20.getObjectByName(n);
84788
84819
  arr.forEach(function (o) {
84789
84820
  box3.expandByObject(o);
84790
84821
  });
@@ -84812,26 +84843,26 @@ var isDebug = false || false === true;
84812
84843
  },
84813
84844
  // 根据自定义参数修改模型
84814
84845
  /*
84815
- 自定义参数指的是在调用drawModel时配置的meshNameConfig里面的字段来修改某一类模型实体的属性
84816
- {
84817
- customName: '', 自定义字段名称
84818
- customValue: '' 自定义字段的值
84819
- attr: {
84820
- color: '',
84821
- opacity: 0 -1,
84822
- visiable: true/false
84846
+ 自定义参数指的是在调用drawModel时配置的meshNameConfig里面的字段来修改某一类模型实体的属性
84847
+ {
84848
+ customName: '', 自定义字段名称
84849
+ customValue: '' 自定义字段的值
84850
+ attr: {
84851
+ color: '',
84852
+ opacity: 0 -1,
84853
+ visiable: true/false
84854
+ }
84823
84855
  }
84824
- }
84825
- */
84856
+ */
84826
84857
  updatePropertyByCustom: function updatePropertyByCustom(params) {
84827
- var _this22 = this;
84858
+ var _this21 = this;
84828
84859
  if (!com_graphicsvue_type_script_lang_js_scene) return;
84829
84860
  com_graphicsvue_type_script_lang_js_scene.traverse(function (child) {
84830
84861
  if (child.isMesh && child.userData[params.customName] === params.customValue) {
84831
84862
  for (var key in params.attr) {
84832
84863
  switch (key) {
84833
84864
  case 'color':
84834
- child.setColorAt(obj.userData.instanceIndex, new _this22.THREE.Color(params.attr[key]));
84865
+ child.setColorAt(obj.userData.instanceIndex, new _this21.THREE.Color(params.attr[key]));
84835
84866
  child.instanceColor.needsUpdate = true;
84836
84867
  break;
84837
84868
  case 'visible':
@@ -84849,10 +84880,10 @@ var isDebug = false || false === true;
84849
84880
  },
84850
84881
  // 相机定位
84851
84882
  /*
84852
- 定位参数:x: 相机的x位置, y: 相机的y位置, z: 相机的z位置
84853
- heading, pitch, roll
84854
- 视点定位可直接使用此方法
84855
- */
84883
+ 定位参数:x: 相机的x位置, y: 相机的y位置, z: 相机的z位置
84884
+ heading, pitch, roll
84885
+ 视点定位可直接使用此方法
84886
+ */
84856
84887
  cameraLocation: function cameraLocation(params) {
84857
84888
  var _params$enableTransit = params.enableTransition,
84858
84889
  enableTransition = _params$enableTransit === void 0 ? true : _params$enableTransit;
@@ -84861,12 +84892,12 @@ var isDebug = false || false === true;
84861
84892
  },
84862
84893
  // 使用中心点和实体的长宽高进行定位
84863
84894
  /*
84864
- center: {x: 0, y: 0, z: 0},
84865
- box: {x: 0, y: 0, z: 0}
84866
- options: {
84867
- viewAll: true/false
84868
- }
84869
- */
84895
+ center: {x: 0, y: 0, z: 0},
84896
+ box: {x: 0, y: 0, z: 0}
84897
+ options: {
84898
+ viewAll: true/false
84899
+ }
84900
+ */
84870
84901
  locateByCenterBox: function locateByCenterBox(center, size, options) {
84871
84902
  var viewAll = options && options.viewAll || false;
84872
84903
  var maxDim = Math.max(size.x, size.y, size.z);
@@ -84884,13 +84915,13 @@ var isDebug = false || false === true;
84884
84915
  },
84885
84916
  // 添加广告牌
84886
84917
  /*
84887
- 参数:
84888
- {
84889
- billboard: DOM节点
84890
- name: 2d广告牌的名字,用来做清除用的
84891
- x、y、z为广告牌的位置
84892
- }
84893
- */
84918
+ 参数:
84919
+ {
84920
+ billboard: DOM节点
84921
+ name: 2d广告牌的名字,用来做清除用的
84922
+ x、y、z为广告牌的位置
84923
+ }
84924
+ */
84894
84925
  billboard: function billboard(data) {
84895
84926
  if (!com_graphicsvue_type_script_lang_js_scene) return null;
84896
84927
  var divLabel = new CSS2DRenderer_CSS2DObject(data.billboard);
@@ -84901,9 +84932,9 @@ var isDebug = false || false === true;
84901
84932
  },
84902
84933
  // 通过名字获取实体对象, 返回数组
84903
84934
  /*
84904
- name: 实体的名字
84905
- passType: 要过滤的类型,默认是group,不返回group类型的实体
84906
- */
84935
+ name: 实体的名字
84936
+ passType: 要过滤的类型,默认是group,不返回group类型的实体
84937
+ */
84907
84938
  getObjectByName: function getObjectByName(name) {
84908
84939
  var passType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'group';
84909
84940
  if (!com_graphicsvue_type_script_lang_js_scene) return [];
@@ -84927,12 +84958,12 @@ var isDebug = false || false === true;
84927
84958
  return modelState.colorConfig;
84928
84959
  },
84929
84960
  addBypassCullingModelIds: function addBypassCullingModelIds(modelIds) {
84930
- var _this23 = this;
84961
+ var _this22 = this;
84931
84962
  var modelState = this.noObserver ? this.noObserver.modelStateManager : this.modelStateManager;
84932
84963
  if (!modelIds) return;
84933
84964
  if (Array.isArray(modelIds)) {
84934
84965
  modelIds.forEach(function (id) {
84935
- var modelId = _this23.formatModelId(id);
84966
+ var modelId = _this22.formatModelId(id);
84936
84967
  modelState.bypassCullingModelIds.add(modelId);
84937
84968
  });
84938
84969
  } else {
@@ -84945,12 +84976,12 @@ var isDebug = false || false === true;
84945
84976
  return com_graphicsvue_type_script_lang_js_toConsumableArray(modelState.bypassCullingModelIds);
84946
84977
  },
84947
84978
  removeBypassCullingModelIds: function removeBypassCullingModelIds(modelIds) {
84948
- var _this24 = this;
84979
+ var _this23 = this;
84949
84980
  var modelState = this.noObserver ? this.noObserver.modelStateManager : this.modelStateManager;
84950
84981
  if (!modelIds) return;
84951
84982
  if (Array.isArray(modelIds)) {
84952
84983
  modelIds.forEach(function (id) {
84953
- var modelId = _this24.formatModelId(id);
84984
+ var modelId = _this23.formatModelId(id);
84954
84985
  modelState.bypassCullingModelIds.delete(modelId);
84955
84986
  });
84956
84987
  } else {
@@ -84992,11 +85023,11 @@ var isDebug = false || false === true;
84992
85023
  },
84993
85024
  // 删除场景中所有的实体
84994
85025
  removeAll: function removeAll() {
84995
- var _this25 = this;
85026
+ var _this24 = this;
84996
85027
  return new Promise(function (resolve) {
84997
85028
  if (com_graphicsvue_type_script_lang_js_scene) {
84998
- _this25.removeTraverse();
84999
- _this25.removeModelByDocumentId();
85029
+ _this24.removeTraverse();
85030
+ _this24.removeModelByDocumentId();
85000
85031
  resolve();
85001
85032
  } else {
85002
85033
  resolve();
@@ -85149,19 +85180,19 @@ var isDebug = false || false === true;
85149
85180
  },
85150
85181
  // 绘制曲线
85151
85182
  /*
85152
- 参数声明:Object
85153
- {
85154
- path: [{x:0, y: 0, z: 0}], 坐标点信息
85155
- color: '', // 线条的颜色
85156
- name: '', // 线条的名字, 用来清除时使用的
85157
- }
85158
- */
85183
+ 参数声明:Object
85184
+ {
85185
+ path: [{x:0, y: 0, z: 0}], 坐标点信息
85186
+ color: '', // 线条的颜色
85187
+ name: '', // 线条的名字, 用来清除时使用的
85188
+ }
85189
+ */
85159
85190
  drawCurve: function drawCurve(params) {
85160
- var _this26 = this;
85191
+ var _this25 = this;
85161
85192
  this.removeObjectByName(params.name);
85162
85193
  var route = [];
85163
85194
  params.path.forEach(function (element) {
85164
- route.push(new _this26.THREE.Vector3(element.x, element.y, element.z));
85195
+ route.push(new _this25.THREE.Vector3(element.x, element.y, element.z));
85165
85196
  });
85166
85197
  if (route.length > 1) {
85167
85198
  com_graphicsvue_type_script_lang_js_curve = new this.THREE.CatmullRomCurve3(route);
@@ -85178,18 +85209,18 @@ var isDebug = false || false === true;
85178
85209
  },
85179
85210
  // 绘制贴图曲线
85180
85211
  /*
85181
- 参数声明:Object
85182
- {
85183
- path: [{x:0, y: 0, z: 0}], 坐标点信息
85184
- name: '', // 线条的名字, 用来清除时使用的
85185
- }
85186
- */
85212
+ 参数声明:Object
85213
+ {
85214
+ path: [{x:0, y: 0, z: 0}], 坐标点信息
85215
+ name: '', // 线条的名字, 用来清除时使用的
85216
+ }
85217
+ */
85187
85218
  drawTextureCurve: function drawTextureCurve(params) {
85188
- var _this27 = this;
85219
+ var _this26 = this;
85189
85220
  this.removeObjectByName(params.name);
85190
85221
  var route = [];
85191
85222
  params.path.forEach(function (element) {
85192
- route.push(new _this27.THREE.Vector3(element.x, element.y, element.z));
85223
+ route.push(new _this26.THREE.Vector3(element.x, element.y, element.z));
85193
85224
  });
85194
85225
  // 画曲线
85195
85226
  if (route.length > 1) {
@@ -85218,12 +85249,12 @@ var isDebug = false || false === true;
85218
85249
  //
85219
85250
  // 开启漫游
85220
85251
  /*
85221
- 参数为Object
85222
- loop: true / false是否进行循环模型 默认是false
85223
- speed: number 漫游的速度,
85224
- path: [{x: 0, y: 0, z: 0}] 漫游的坐标位置点,
85225
- name: '', 路径的名称,用来清除用的
85226
- */
85252
+ 参数为Object
85253
+ loop: true / false是否进行循环模型 默认是false
85254
+ speed: number 漫游的速度,
85255
+ path: [{x: 0, y: 0, z: 0}] 漫游的坐标位置点,
85256
+ name: '', 路径的名称,用来清除用的
85257
+ */
85227
85258
  startRoam: function startRoam(params) {
85228
85259
  progress = 0;
85229
85260
  roamConfig = {
@@ -85238,8 +85269,8 @@ var isDebug = false || false === true;
85238
85269
  },
85239
85270
  // 更新漫游的配置
85240
85271
  /*
85241
- 参数为Object
85242
- */
85272
+ 参数为Object
85273
+ */
85243
85274
  updateRoamConfig: function updateRoamConfig(params) {
85244
85275
  for (var key in params) {
85245
85276
  roamConfig[key] = params[key];
@@ -85294,24 +85325,24 @@ var isDebug = false || false === true;
85294
85325
  * 参数val: 爆炸的值
85295
85326
  */
85296
85327
  globalBomb: function globalBomb(val) {
85297
- var _this28 = this;
85328
+ var _this27 = this;
85298
85329
  if (com_graphicsvue_type_script_lang_js_scene.children.length === 0) return;
85299
85330
  for (var i = 0; i < com_graphicsvue_type_script_lang_js_scene.children.length; i++) {
85300
85331
  console.log('scene', com_graphicsvue_type_script_lang_js_scene);
85301
85332
  com_graphicsvue_type_script_lang_js_scene.children[i].traverse(function (item) {
85302
85333
  if (!item.isMesh || !item.worldDir) return;
85303
85334
  // 爆炸公式
85304
- _this28.computedBomb(item, val);
85335
+ _this27.computedBomb(item, val);
85305
85336
  });
85306
85337
  }
85307
85338
  // this.timeRender();
85308
85339
  },
85309
85340
  // 单个实体模型炸开
85310
85341
  /*
85311
- 参数:
85312
- name: '',当前选中的实体对象的id
85313
- value: 0 - 100 整数
85314
- */
85342
+ 参数:
85343
+ name: '',当前选中的实体对象的id
85344
+ value: 0 - 100 整数
85345
+ */
85315
85346
  localBomb: function localBomb(name, value) {
85316
85347
  var target = this.getObjectByName(name)[0];
85317
85348
  if (target) {
@@ -85334,9 +85365,9 @@ var isDebug = false || false === true;
85334
85365
  },
85335
85366
  // 设置全局整体剖切
85336
85367
  /*
85337
- 先开启模型全局剖切模式, 会返回剖切值的最大最小值
85338
- 剖切值变换时, 使用
85339
- */
85368
+ 先开启模型全局剖切模式, 会返回剖切值的最大最小值
85369
+ 剖切值变换时, 使用
85370
+ */
85340
85371
  setGlobalClipping: function setGlobalClipping() {
85341
85372
  var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
85342
85373
  var box3 = new this.THREE.Box3().setFromObject(com_graphicsvue_type_script_lang_js_scene.children[0]);
@@ -85374,9 +85405,9 @@ var isDebug = false || false === true;
85374
85405
  },
85375
85406
  // 更新全局剖切的值
85376
85407
  /*
85377
- 参数:Object
85378
- {x: 1, y: 0, z: 0} 可以传一个也可以传多个
85379
- */
85408
+ 参数:Object
85409
+ {x: 1, y: 0, z: 0} 可以传一个也可以传多个
85410
+ */
85380
85411
  updateGlobalCliValue: function updateGlobalCliValue(params) {
85381
85412
  var axis = {
85382
85413
  x: 0,
@@ -85438,9 +85469,9 @@ var isDebug = false || false === true;
85438
85469
  },
85439
85470
  // 更新局部剖切的值
85440
85471
  /*
85441
- 参数:Object
85442
- {x: 1, y: 0, z: 0} 可以传一个也可以传多个
85443
- */
85472
+ 参数:Object
85473
+ {x: 1, y: 0, z: 0} 可以传一个也可以传多个
85474
+ */
85444
85475
  updateLocalCliValue: function updateLocalCliValue(params) {
85445
85476
  var axis = {
85446
85477
  x: 0,
@@ -85519,7 +85550,7 @@ var isDebug = false || false === true;
85519
85550
  },
85520
85551
  // 页面是否锁定
85521
85552
  initPointerLock: function initPointerLock() {
85522
- var _this29 = this;
85553
+ var _this28 = this;
85523
85554
  this.home();
85524
85555
  setTimeout(function () {
85525
85556
  // 开启第一视角时,将相机与水平面保持水平
@@ -85527,25 +85558,25 @@ var isDebug = false || false === true;
85527
85558
  com_graphicsvue_type_script_lang_js_camera.rotation.z = 0;
85528
85559
  pointControls = new PointerLockControls(com_graphicsvue_type_script_lang_js_camera, com_graphicsvue_type_script_lang_js_renderer.domElement);
85529
85560
  pointControls.lock();
85530
- if (!_this29._onFirstPersonChange) {
85531
- _this29._onFirstPersonChange = function () {
85532
- if (typeof _this29._cameraChangeObserver === 'function') {
85533
- _this29._cameraChangeObserver('firstPerson');
85561
+ if (!_this28._onFirstPersonChange) {
85562
+ _this28._onFirstPersonChange = function () {
85563
+ if (typeof _this28._cameraChangeObserver === 'function') {
85564
+ _this28._cameraChangeObserver('firstPerson');
85534
85565
  }
85535
85566
  };
85536
85567
  }
85537
85568
  try {
85538
- pointControls.addEventListener('change', _this29._onFirstPersonChange);
85569
+ pointControls.addEventListener('change', _this28._onFirstPersonChange);
85539
85570
  } catch (e) {}
85540
85571
  // 锁定
85541
85572
  pointControls.addEventListener('lock', function () {
85542
85573
  cameraControls.enabled = false;
85543
- window.addEventListener('keydown', _this29.onKeyDown, false);
85544
- window.addEventListener('keyup', _this29.onKeyUp, false);
85545
- com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mouseup', _this29.mouseClick, false);
85546
- com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mousedown', _this29.mouseDown, false);
85547
- if (typeof _this29._cameraChangeObserver === 'function') {
85548
- _this29._cameraChangeObserver('firstPersonLock');
85574
+ window.addEventListener('keydown', _this28.onKeyDown, false);
85575
+ window.addEventListener('keyup', _this28.onKeyUp, false);
85576
+ com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mouseup', _this28.mouseClick, false);
85577
+ com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mousedown', _this28.mouseDown, false);
85578
+ if (typeof _this28._cameraChangeObserver === 'function') {
85579
+ _this28._cameraChangeObserver('firstPersonLock');
85549
85580
  }
85550
85581
  });
85551
85582
  // 解锁
@@ -85553,24 +85584,24 @@ var isDebug = false || false === true;
85553
85584
  firstPerSign = false;
85554
85585
  cameraControls.enabled = true;
85555
85586
  // 返回初始视角
85556
- _this29.home();
85587
+ _this28.home();
85557
85588
  try {
85558
- if (_this29._onFirstPersonChange && pointControls) {
85559
- pointControls.removeEventListener('change', _this29._onFirstPersonChange);
85589
+ if (_this28._onFirstPersonChange && pointControls) {
85590
+ pointControls.removeEventListener('change', _this28._onFirstPersonChange);
85560
85591
  }
85561
85592
  } catch (e) {}
85562
- if (_this29.noObserver) {
85563
- _this29.noObserver._firstPersonLastPos = null;
85593
+ if (_this28.noObserver) {
85594
+ _this28.noObserver._firstPersonLastPos = null;
85564
85595
  }
85565
85596
  setTimeout(function () {
85566
- window.removeEventListener('keydown', _this29.onKeyDown);
85567
- window.removeEventListener('keyup', _this29.onKeyUp);
85568
- com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mouseup', _this29.mouseClick, false);
85569
- com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mousedown', _this29.mouseDown, false);
85597
+ window.removeEventListener('keydown', _this28.onKeyDown);
85598
+ window.removeEventListener('keyup', _this28.onKeyUp);
85599
+ com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mouseup', _this28.mouseClick, false);
85600
+ com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mousedown', _this28.mouseDown, false);
85570
85601
  // this.timeRender()
85571
85602
  }, 0);
85572
- if (typeof _this29._cameraChangeObserver === 'function') {
85573
- _this29._cameraChangeObserver('firstPersonUnlock');
85603
+ if (typeof _this28._cameraChangeObserver === 'function') {
85604
+ _this28._cameraChangeObserver('firstPersonUnlock');
85574
85605
  }
85575
85606
  });
85576
85607
  if (com_graphicsvue_type_script_lang_js_scene) com_graphicsvue_type_script_lang_js_scene.add(pointControls.object);
@@ -85718,8 +85749,8 @@ var isDebug = false || false === true;
85718
85749
  },
85719
85750
  // 测量
85720
85751
  /*
85721
- 参数: type: '', distance、area、angle, 暂时只提供距离、面积、角度这三种方式
85722
- */
85752
+ 参数: type: '', distance、area、angle, 暂时只提供距离、面积、角度这三种方式
85753
+ */
85723
85754
  openMeasure: function openMeasure(type) {
85724
85755
  if (threeMeasure) {
85725
85756
  threeMeasure.close();
@@ -85770,8 +85801,8 @@ var isDebug = false || false === true;
85770
85801
  },
85771
85802
  // 开启平移
85772
85803
  /*
85773
- 参数: object, 当前选中的对象, distance: {x: 0, y: 0, z: 0}, 平移的距离
85774
- */
85804
+ 参数: object, 当前选中的对象, distance: {x: 0, y: 0, z: 0}, 平移的距离
85805
+ */
85775
85806
  translateMesh: function translateMesh(object, distance) {
85776
85807
  var translateMatrix = new this.THREE.Matrix4().makeTranslation(distance.x, distance.y, distance.z);
85777
85808
  var translateMatrixInvert = new this.THREE.Matrix4().copy(translateMatrix).invert();
@@ -85785,8 +85816,8 @@ var isDebug = false || false === true;
85785
85816
  },
85786
85817
  // 单个模型对象旋转
85787
85818
  /*
85788
- 参数: object, 目标实体, degrees: {x: 0, y: 0, z: 0}, 旋转的数值(0-360)
85789
- */
85819
+ 参数: object, 目标实体, degrees: {x: 0, y: 0, z: 0}, 旋转的数值(0-360)
85820
+ */
85790
85821
  rotateMesh: function rotateMesh(object, degrees) {
85791
85822
  // 在矩阵的计算里 完成撤销操作是向量去乘以一个矩阵的逆矩阵
85792
85823
  // 变化后的向量 = 原始向量 * 变化矩阵
@@ -85813,15 +85844,15 @@ var isDebug = false || false === true;
85813
85844
  },
85814
85845
  // 隔离
85815
85846
  /*
85816
- 参数: object, 目标实体,
85817
- */
85847
+ 参数: object, 目标实体,
85848
+ */
85818
85849
  isolate: function isolate(object) {
85819
- var _this30 = this;
85850
+ var _this29 = this;
85820
85851
  if (!com_graphicsvue_type_script_lang_js_scene) return;
85821
85852
  // 隔离 将目标实体以外的实体隐藏掉
85822
85853
  com_graphicsvue_type_script_lang_js_scene.traverse(function (item) {
85823
85854
  if (item.isMesh && item.name !== object.name) {
85824
- var offsetMatrix = new _this30.THREE.Matrix4().copy(item.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
85855
+ var offsetMatrix = new _this29.THREE.Matrix4().copy(item.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
85825
85856
  item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
85826
85857
  item.instanceMatrix.needsUpdate = true;
85827
85858
  }
@@ -85829,7 +85860,7 @@ var isDebug = false || false === true;
85829
85860
  },
85830
85861
  // 还原操作 将修改过的实体进行恢复
85831
85862
  restore: function restore() {
85832
- var _this31 = this;
85863
+ var _this30 = this;
85833
85864
  if (!com_graphicsvue_type_script_lang_js_scene) return;
85834
85865
  com_graphicsvue_type_script_lang_js_scene.traverse(function (item) {
85835
85866
  if (item.isMesh) {
@@ -85850,14 +85881,14 @@ var isDebug = false || false === true;
85850
85881
  item.userData.translateMatrixInvert = null;
85851
85882
  }
85852
85883
  if (item.userData.combineMatrixInvert) {
85853
- _this31.rotateMesh(item, {
85884
+ _this30.rotateMesh(item, {
85854
85885
  x: 0,
85855
85886
  y: 0,
85856
85887
  z: 0
85857
85888
  });
85858
85889
  item.userData.combineMatrixInvert = null;
85859
85890
  }
85860
- var offsetMatrix = new _this31.THREE.Matrix4().copy(item.userData.copyMatrix);
85891
+ var offsetMatrix = new _this30.THREE.Matrix4().copy(item.userData.copyMatrix);
85861
85892
  item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
85862
85893
  item.instanceMatrix.needsUpdate = true;
85863
85894
  }
@@ -85865,7 +85896,7 @@ var isDebug = false || false === true;
85865
85896
  },
85866
85897
  // 添加自定义模型, 暂时只支持glb、gltf格式
85867
85898
  addCustomModel: function addCustomModel(name, position, url) {
85868
- var _this32 = this;
85899
+ var _this31 = this;
85869
85900
  var scale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
85870
85901
  var immediately = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
85871
85902
  var callback = arguments.length > 5 ? arguments[5] : undefined;
@@ -85883,9 +85914,9 @@ var isDebug = false || false === true;
85883
85914
  locationModel.userData.cull = false;
85884
85915
  locationModel.name = name;
85885
85916
  if (com_graphicsvue_type_script_lang_js_scene) com_graphicsvue_type_script_lang_js_scene.add(locationModel);
85886
- locationModel.position.copy(new _this32.THREE.Vector3(position.x, position.y, position.z));
85917
+ locationModel.position.copy(new _this31.THREE.Vector3(position.x, position.y, position.z));
85887
85918
  if (gltf.animations.length > 0) {
85888
- var actionMixer = new _this32.THREE.AnimationMixer(gltf.scene);
85919
+ var actionMixer = new _this31.THREE.AnimationMixer(gltf.scene);
85889
85920
  var walkActive = actionMixer.clipAction(gltf.animations[0]);
85890
85921
  walkActive.play();
85891
85922
  modelActive.push(walkActive);
@@ -85896,7 +85927,7 @@ var isDebug = false || false === true;
85896
85927
  },
85897
85928
  // 删除添加的自定义模型
85898
85929
  removeCustomModel: function removeCustomModel(name) {
85899
- var _this33 = this;
85930
+ var _this32 = this;
85900
85931
  var obj = this.getObjectByName(name);
85901
85932
  obj.forEach(function (item, index) {
85902
85933
  if (item.animations > 0) {
@@ -85905,7 +85936,7 @@ var isDebug = false || false === true;
85905
85936
  modelActions[index].uncacheRoot(modelActive[index]);
85906
85937
  }
85907
85938
  item.traverse(function (child) {
85908
- if (child instanceof _this33.THREE.Mesh) {
85939
+ if (child instanceof _this32.THREE.Mesh) {
85909
85940
  child.geometry.dispose();
85910
85941
  child.material.dispose();
85911
85942
  }
@@ -86315,18 +86346,18 @@ var isDebug = false || false === true;
86315
86346
  * 加载下一批数据
86316
86347
  */
86317
86348
  loadNextBatch: function loadNextBatch() {
86318
- var _this34 = this;
86349
+ var _this33 = this;
86319
86350
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee11() {
86320
86351
  var loadingState, batch, _t2;
86321
86352
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context11) {
86322
86353
  while (1) switch (_context11.p = _context11.n) {
86323
86354
  case 0:
86324
- loadingState = _this34.noObserver ? _this34.noObserver.batchLoadingState : _this34.batchLoadingState;
86355
+ loadingState = _this33.noObserver ? _this33.noObserver.batchLoadingState : _this33.batchLoadingState;
86325
86356
  if (!(!loadingState.isLoading || loadingState.currentBatch >= loadingState.pendingData.length)) {
86326
86357
  _context11.n = 1;
86327
86358
  break;
86328
86359
  }
86329
- _this34.completeBatchLoading();
86360
+ _this33.completeBatchLoading();
86330
86361
  return _context11.a(2);
86331
86362
  case 1:
86332
86363
  if (!loadingState.isPaused) {
@@ -86335,7 +86366,7 @@ var isDebug = false || false === true;
86335
86366
  }
86336
86367
  // 如果暂停,延迟一段时间后再次检查
86337
86368
  loadingState.animationFrameId = requestAnimationFrame(function () {
86338
- _this34.loadNextBatch();
86369
+ _this33.loadNextBatch();
86339
86370
  });
86340
86371
  return _context11.a(2);
86341
86372
  case 2:
@@ -86345,7 +86376,7 @@ var isDebug = false || false === true;
86345
86376
  }
86346
86377
  // 如果正在交互,延迟一段时间后再次检查
86347
86378
  loadingState.animationFrameId = requestAnimationFrame(function () {
86348
- _this34.loadNextBatch();
86379
+ _this33.loadNextBatch();
86349
86380
  });
86350
86381
  return _context11.a(2);
86351
86382
  case 3:
@@ -86353,15 +86384,15 @@ var isDebug = false || false === true;
86353
86384
  _context11.p = 4;
86354
86385
  console.log('加载批次:', loadingState.currentBatch);
86355
86386
  _context11.n = 5;
86356
- return _this34.processWithMainThread(batch);
86387
+ return _this33.processWithMainThread(batch);
86357
86388
  case 5:
86358
86389
  // 更新进度
86359
86390
  loadingState.loadedCount += batch.instances.length;
86360
86391
  loadingState.currentBatch++;
86361
86392
 
86362
86393
  // 同步到响应式状态
86363
- _this34.batchLoadingState.loadedCount = loadingState.loadedCount;
86364
- _this34.batchLoadingState.currentBatch = loadingState.currentBatch;
86394
+ _this33.batchLoadingState.loadedCount = loadingState.loadedCount;
86395
+ _this33.batchLoadingState.currentBatch = loadingState.currentBatch;
86365
86396
 
86366
86397
  // 调用进度回调
86367
86398
  if (loadingState.onProgress) {
@@ -86375,7 +86406,7 @@ var isDebug = false || false === true;
86375
86406
 
86376
86407
  // 使用 requestAnimationFrame 在下一帧继续加载
86377
86408
  loadingState.animationFrameId = requestAnimationFrame(function () {
86378
- _this34.loadNextBatch();
86409
+ _this33.loadNextBatch();
86379
86410
  });
86380
86411
  _context11.n = 7;
86381
86412
  break;
@@ -86386,7 +86417,7 @@ var isDebug = false || false === true;
86386
86417
 
86387
86418
  // 继续下一批次
86388
86419
  loadingState.animationFrameId = requestAnimationFrame(function () {
86389
- _this34.loadNextBatch();
86420
+ _this33.loadNextBatch();
86390
86421
  });
86391
86422
  case 7:
86392
86423
  return _context11.a(2);
@@ -86398,13 +86429,13 @@ var isDebug = false || false === true;
86398
86429
  * 使用主线程处理批次数据
86399
86430
  */
86400
86431
  processWithMainThread: function processWithMainThread(batch) {
86401
- var _this35 = this;
86432
+ var _this34 = this;
86402
86433
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee12() {
86403
86434
  var loadingState;
86404
86435
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context12) {
86405
86436
  while (1) switch (_context12.n) {
86406
86437
  case 0:
86407
- loadingState = _this35.noObserver ? _this35.noObserver.batchLoadingState : _this35.batchLoadingState;
86438
+ loadingState = _this34.noObserver ? _this34.noObserver.batchLoadingState : _this34.batchLoadingState;
86408
86439
  loadingState.options.batchSize = loadingState.batchSize;
86409
86440
  loadingState.options.resetState = loadingState.currentBatch === 0;
86410
86441
  // 使用原始的handleInstancedMeshModel方法
@@ -86425,7 +86456,7 @@ var isDebug = false || false === true;
86425
86456
  * 完成批量加载
86426
86457
  */
86427
86458
  completeBatchLoading: function completeBatchLoading() {
86428
- var _this36 = this;
86459
+ var _this35 = this;
86429
86460
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
86430
86461
  if (!loadingState.isLoading) return;
86431
86462
 
@@ -86454,17 +86485,17 @@ var isDebug = false || false === true;
86454
86485
  modelGroup.traverse(function (child) {
86455
86486
  if (child.isMesh && !child.userData.batchInitDone) {
86456
86487
  markRendered(child);
86457
- var json = _this36.getMeshCenterAndVolume(child);
86458
- var meshBox3 = new _this36.THREE.Box3();
86488
+ var json = _this35.getMeshCenterAndVolume(child);
86489
+ var meshBox3 = new _this35.THREE.Box3();
86459
86490
  meshBox3.setFromObject(child);
86460
- var worldPs = new _this36.THREE.Vector3().addVectors(meshBox3.max, meshBox3.min).multiplyScalar(0.5);
86491
+ var worldPs = new _this35.THREE.Vector3().addVectors(meshBox3.max, meshBox3.min).multiplyScalar(0.5);
86461
86492
  if (isNaN(worldPs.x)) return;
86462
- child.worldDir = new _this36.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
86493
+ child.worldDir = new _this35.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
86463
86494
  child.userData.center = json.center;
86464
86495
  child.userData.worldPs = worldPs;
86465
- child.userData.oldPs = child.getWorldPosition(new _this36.THREE.Vector3());
86496
+ child.userData.oldPs = child.getWorldPosition(new _this35.THREE.Vector3());
86466
86497
  child.userData.box = json.box;
86467
- child.userData.position = new _this36.THREE.Vector3().copy(child.position);
86498
+ child.userData.position = new _this35.THREE.Vector3().copy(child.position);
86468
86499
  child.userData.translate = {
86469
86500
  x: 0,
86470
86501
  y: 0,
@@ -86498,9 +86529,10 @@ var isDebug = false || false === true;
86498
86529
  totalLoaded: loadingState.loadedCount,
86499
86530
  totalBatches: loadingState.totalBatches
86500
86531
  });
86501
-
86502
- // var axesHelper = new this.THREE.AxesHelper(10000);
86503
- // scene.add(axesHelper);
86532
+ if (isDebug) {
86533
+ var axesHelper = new this.THREE.AxesHelper(10000);
86534
+ com_graphicsvue_type_script_lang_js_scene.add(axesHelper);
86535
+ }
86504
86536
  // this.showSceneBoundingBox();
86505
86537
  }
86506
86538
 
@@ -86548,7 +86580,7 @@ var isDebug = false || false === true;
86548
86580
  * @param {Object} options - 配置项 { immediate: boolean }
86549
86581
  */
86550
86582
  setSystemInterruption: function setSystemInterruption(active) {
86551
- var _this37 = this;
86583
+ var _this36 = this;
86552
86584
  var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'user_interaction';
86553
86585
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
86554
86586
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
@@ -86629,11 +86661,11 @@ var isDebug = false || false === true;
86629
86661
 
86630
86662
  // 恢复本地批量加载 (如果未完成)
86631
86663
  if (loadingState.isLoading && loadingState.currentBatch < loadingState.totalBatches) {
86632
- _this37.loadNextBatch();
86664
+ _this36.loadNextBatch();
86633
86665
  }
86634
86666
 
86635
86667
  // 恢复 StreamLoader
86636
- var streamLoader = _this37.noObserver.streamLoader;
86668
+ var streamLoader = _this36.noObserver.streamLoader;
86637
86669
  if (streamLoader && typeof streamLoader.handleControlEnd === 'function') {
86638
86670
  // StreamLoader 内部通常有防抖或延迟,这里直接通知结束即可
86639
86671
  streamLoader.handleControlEnd();
@@ -86686,7 +86718,7 @@ var isDebug = false || false === true;
86686
86718
  * 滚轮交互结束的定时检测
86687
86719
  */
86688
86720
  scheduleWheelInteractionEnd: function scheduleWheelInteractionEnd(event) {
86689
- var _this38 = this;
86721
+ var _this37 = this;
86690
86722
  var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
86691
86723
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
86692
86724
  if (loadingState.interactionState.wheelTimeout) {
@@ -86694,8 +86726,8 @@ var isDebug = false || false === true;
86694
86726
  loadingState.interactionState.wheelTimeout = null;
86695
86727
  }
86696
86728
  loadingState.interactionState.wheelTimeout = setTimeout(function () {
86697
- _this38.$emit('wheelEnd', event);
86698
- _this38.endInteraction('wheel', event, {
86729
+ _this37.$emit('wheelEnd', event);
86730
+ _this37.endInteraction('wheel', event, {
86699
86731
  immediateResume: false
86700
86732
  });
86701
86733
  loadingState.interactionState.wheelTimeout = null;
@@ -86748,11 +86780,11 @@ var isDebug = false || false === true;
86748
86780
  });
86749
86781
  // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=script&lang=js
86750
86782
  /* harmony default export */ var components_com_graphicsvue_type_script_lang_js = (com_graphicsvue_type_script_lang_js);
86751
- // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=fdf6eb9e&prod&lang=scss&scoped=true
86752
- var com_graphicsvue_type_style_index_0_id_fdf6eb9e_prod_lang_scss_scoped_true = __webpack_require__("5c64");
86783
+ // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=1241ca06&prod&lang=scss&scoped=true
86784
+ var com_graphicsvue_type_style_index_0_id_1241ca06_prod_lang_scss_scoped_true = __webpack_require__("bb41");
86753
86785
 
86754
- // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=fdf6eb9e&prod&lang=css
86755
- var com_graphicsvue_type_style_index_1_id_fdf6eb9e_prod_lang_css = __webpack_require__("5792");
86786
+ // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=1241ca06&prod&lang=css
86787
+ var com_graphicsvue_type_style_index_1_id_1241ca06_prod_lang_css = __webpack_require__("85db");
86756
86788
 
86757
86789
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
86758
86790
  /* globals __VUE_SSR_CONTEXT__ */
@@ -86864,17 +86896,17 @@ function normalizeComponent(
86864
86896
 
86865
86897
  var component = normalizeComponent(
86866
86898
  components_com_graphicsvue_type_script_lang_js,
86867
- com_graphicsvue_type_template_id_fdf6eb9e_scoped_true_render,
86899
+ com_graphicsvue_type_template_id_1241ca06_scoped_true_render,
86868
86900
  staticRenderFns,
86869
86901
  false,
86870
86902
  null,
86871
- "fdf6eb9e",
86903
+ "1241ca06",
86872
86904
  null
86873
86905
 
86874
86906
  )
86875
86907
 
86876
86908
  /* harmony default export */ var com_graphics = (component.exports);
86877
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"2a27fb16-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=459d4d3b&scoped=true
86909
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"88fd7c18-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=459d4d3b&scoped=true
86878
86910
  var com_flcanvasvue_type_template_id_459d4d3b_scoped_true_render = function render() {
86879
86911
  var _vm = this,
86880
86912
  _c = _vm._self._c;
@@ -90651,7 +90683,7 @@ var com_flcanvas_component = normalizeComponent(
90651
90683
  )
90652
90684
 
90653
90685
  /* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
90654
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"2a27fb16-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
90686
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"88fd7c18-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
90655
90687
  var per_controlvue_type_template_id_f547d5c6_scoped_true_render = function render() {
90656
90688
  var _vm = this,
90657
90689
  _c = _vm._self._c;
@@ -90759,7 +90791,7 @@ var per_control_component = normalizeComponent(
90759
90791
  )
90760
90792
 
90761
90793
  /* harmony default export */ var per_control = (per_control_component.exports);
90762
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"2a27fb16-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=6e1600cc&scoped=true
90794
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"88fd7c18-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=6e1600cc&scoped=true
90763
90795
  var pidvue_type_template_id_6e1600cc_scoped_true_render = function render() {
90764
90796
  var _vm = this,
90765
90797
  _c = _vm._self._c;
@@ -90806,7 +90838,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
90806
90838
  var html2canvas = __webpack_require__("c0e9");
90807
90839
  var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
90808
90840
 
90809
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"2a27fb16-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=5f081c10&scoped=true
90841
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"88fd7c18-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=5f081c10&scoped=true
90810
90842
  var ann_toolvue_type_template_id_5f081c10_scoped_true_render = function render() {
90811
90843
  var _vm = this,
90812
90844
  _c = _vm._self._c;
@@ -91777,7 +91809,7 @@ var pid_component = normalizeComponent(
91777
91809
  )
91778
91810
 
91779
91811
  /* harmony default export */ var pid = (pid_component.exports);
91780
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"2a27fb16-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-tiles/index.vue?vue&type=template&id=5504c19e&scoped=true
91812
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"88fd7c18-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-tiles/index.vue?vue&type=template&id=5504c19e&scoped=true
91781
91813
  var com_tilesvue_type_template_id_5504c19e_scoped_true_render = function render() {
91782
91814
  var _vm = this,
91783
91815
  _c = _vm._self._c;