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

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
 
@@ -11909,6 +11902,13 @@ Factory_1.Factory.addGetterSetter(Ellipse, 'radiusY', 0, (0, Validators_1.getNum
11909
11902
 
11910
11903
  /***/ }),
11911
11904
 
11905
+ /***/ "3f2b":
11906
+ /***/ (function(module, exports, __webpack_require__) {
11907
+
11908
+ // extracted by mini-css-extract-plugin
11909
+
11910
+ /***/ }),
11911
+
11912
11912
  /***/ "405a":
11913
11913
  /***/ (function(module, exports, __webpack_require__) {
11914
11914
 
@@ -14760,17 +14760,6 @@ Factory_1.Factory.addGetterSetter(Text, 'letterSpacing', 0, (0, Validators_1.get
14760
14760
  Factory_1.Factory.addGetterSetter(Text, 'text', '', (0, Validators_1.getStringValidator)());
14761
14761
  Factory_1.Factory.addGetterSetter(Text, 'textDecoration', '');
14762
14762
 
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
14763
  /***/ }),
14775
14764
 
14776
14765
  /***/ "5a43":
@@ -14783,17 +14772,6 @@ function _arrayLikeToArray(r, a) {
14783
14772
  }
14784
14773
  module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
14785
14774
 
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
14775
  /***/ }),
14798
14776
 
14799
14777
  /***/ "5c7d":
@@ -30922,6 +30900,17 @@ Factory_1.Factory.addGetterSetter(Path, 'data');
30922
30900
  /* unused harmony reexport * */
30923
30901
 
30924
30902
 
30903
+ /***/ }),
30904
+
30905
+ /***/ "8dab":
30906
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
30907
+
30908
+ "use strict";
30909
+ /* 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_03e2a393_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("972d");
30910
+ /* 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_03e2a393_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_03e2a393_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
30911
+ /* unused harmony reexport * */
30912
+
30913
+
30925
30914
  /***/ }),
30926
30915
 
30927
30916
  /***/ "8e84":
@@ -30979,7 +30968,7 @@ Factory_1.Factory.addGetterSetter(Node_1.Node, 'blue', 0, Validators_1.RGBCompon
30979
30968
  /***/ "9224":
30980
30969
  /***/ (function(module) {
30981
30970
 
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\"]}");
30971
+ module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.0-beta.5\",\"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
30972
 
30984
30973
  /***/ }),
30985
30974
 
@@ -31260,6 +31249,13 @@ Factory_1.Factory.backCompat(Wedge, {
31260
31249
 
31261
31250
  /***/ }),
31262
31251
 
31252
+ /***/ "972d":
31253
+ /***/ (function(module, exports, __webpack_require__) {
31254
+
31255
+ // extracted by mini-css-extract-plugin
31256
+
31257
+ /***/ }),
31258
+
31263
31259
  /***/ "9b42":
31264
31260
  /***/ (function(module, exports) {
31265
31261
 
@@ -32136,13 +32132,6 @@ exports.Util = {
32136
32132
 
32137
32133
  /***/ }),
32138
32134
 
32139
- /***/ "a1a2":
32140
- /***/ (function(module, exports, __webpack_require__) {
32141
-
32142
- // extracted by mini-css-extract-plugin
32143
-
32144
- /***/ }),
32145
-
32146
32135
  /***/ "a34e":
32147
32136
  /***/ (function(module, exports, __webpack_require__) {
32148
32137
 
@@ -44990,6 +44979,17 @@ exports.Group = Group;
44990
44979
  Group.prototype.nodeType = 'Group';
44991
44980
  (0, Global_1._registerNode)(Group);
44992
44981
 
44982
+ /***/ }),
44983
+
44984
+ /***/ "f36e":
44985
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
44986
+
44987
+ "use strict";
44988
+ /* 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_03e2a393_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3f2b");
44989
+ /* 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_03e2a393_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_03e2a393_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
44990
+ /* unused harmony reexport * */
44991
+
44992
+
44993
44993
  /***/ }),
44994
44994
 
44995
44995
  /***/ "f655":
@@ -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":"c784c1fe-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=03e2a393&scoped=true
45831
+ var com_graphicsvue_type_template_id_03e2a393_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=03e2a393&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)); }
@@ -81585,7 +81585,7 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
81585
81585
  }]);
81586
81586
  }();
81587
81587
  // 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"];
81588
+ var _excluded = ["projectId"];
81589
81589
  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
81590
  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
81591
  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 +81927,6 @@ var isDebug = false || false === true;
81927
81927
  occlusionWorkerRequestMap: new Map(),
81928
81928
  occlusionWorkerRequestId: 0
81929
81929
  };
81930
- this.initOcclusionWorker();
81931
81930
  CameraControls.install({
81932
81931
  THREE: this.THREE
81933
81932
  });
@@ -82123,28 +82122,6 @@ var isDebug = false || false === true;
82123
82122
  }
82124
82123
  };
82125
82124
  },
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
82125
  occlusionWorkerRequest: function occlusionWorkerRequest(type, data) {
82149
82126
  var transferable = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
82150
82127
  var state = this.noObserver;
@@ -82194,20 +82171,20 @@ var isDebug = false || false === true;
82194
82171
  };
82195
82172
  },
82196
82173
  scanOcclusionIndices: function scanOcclusionIndices(buffer, sw, sh, stride, maxIdx, minSampleCount) {
82197
- var _this3 = this;
82174
+ var _this2 = this;
82198
82175
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee5() {
82199
82176
  var state, canWorker, response, restored, _syncRes, syncRes;
82200
82177
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context5) {
82201
82178
  while (1) switch (_context5.n) {
82202
82179
  case 0:
82203
- state = _this3.noObserver;
82180
+ state = _this2.noObserver;
82204
82181
  canWorker = state && state.occlusionWorker && buffer && buffer.buffer;
82205
82182
  if (!canWorker) {
82206
82183
  _context5.n = 3;
82207
82184
  break;
82208
82185
  }
82209
82186
  _context5.n = 1;
82210
- return _this3.occlusionWorkerRequest('occlusionScan', {
82187
+ return _this2.occlusionWorkerRequest('occlusionScan', {
82211
82188
  buffer: buffer.buffer,
82212
82189
  sw: sw,
82213
82190
  sh: sh,
@@ -82227,13 +82204,13 @@ var isDebug = false || false === true;
82227
82204
  buffer: restored.buffer
82228
82205
  });
82229
82206
  case 2:
82230
- _syncRes = _this3.scanOcclusionBufferSync(restored, sw, sh, stride, maxIdx, minSampleCount);
82207
+ _syncRes = _this2.scanOcclusionBufferSync(restored, sw, sh, stride, maxIdx, minSampleCount);
82231
82208
  return _context5.a(2, {
82232
82209
  indices: _syncRes.indices,
82233
82210
  buffer: restored.buffer
82234
82211
  });
82235
82212
  case 3:
82236
- syncRes = _this3.scanOcclusionBufferSync(buffer, sw, sh, stride, maxIdx, minSampleCount);
82213
+ syncRes = _this2.scanOcclusionBufferSync(buffer, sw, sh, stride, maxIdx, minSampleCount);
82237
82214
  return _context5.a(2, {
82238
82215
  indices: syncRes.indices,
82239
82216
  buffer: buffer && buffer.buffer ? buffer.buffer : null
@@ -82275,7 +82252,7 @@ var isDebug = false || false === true;
82275
82252
  }
82276
82253
  },
82277
82254
  setBoxIndex: function setBoxIndex(boxJson, documentId) {
82278
- var _this4 = this;
82255
+ var _this3 = this;
82279
82256
  var isAdd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
82280
82257
  if (!this._boxIndex) this._boxIndex = new Map();
82281
82258
  if (!documentId) {
@@ -82299,16 +82276,25 @@ var isDebug = false || false === true;
82299
82276
 
82300
82277
  // 构造 AABB
82301
82278
  var boxThree = new this.THREE.Box3(min, max);
82302
-
82303
- // 应用坐标系转换 (Biz -> Three)
82304
- // 注意:applyMatrix4 会重新计算 AABB
82305
- boxThree.applyMatrix4(bizToThreeMatrix);
82279
+ var hasMatrix = Array.isArray(it.matrix);
82280
+ if (hasMatrix && it.matrix.length >= 16) {
82281
+ var matrix = new this.THREE.Matrix4().fromArray(it.matrix);
82282
+ var worldMatrix = matrix.clone();
82283
+ if (bizToThreeMatrix) {
82284
+ worldMatrix.premultiply(bizToThreeMatrix);
82285
+ }
82286
+ boxThree.applyMatrix4(worldMatrix);
82287
+ } else if (bizToThreeMatrix) {
82288
+ // 注意:applyMatrix4 会重新计算 AABB
82289
+ boxThree.applyMatrix4(bizToThreeMatrix);
82290
+ }
82306
82291
  var userData = {
82307
82292
  flag: it.flag || 1,
82308
82293
  // 默认为 1
82309
82294
  obbData: it.obb,
82310
82295
  // 存储原始 OBB 数据
82311
- transparent: it.transp > 0
82296
+ transparent: it.transp > 0,
82297
+ visible: true // 默认显示
82312
82298
  };
82313
82299
  if (it.flag === 1) {
82314
82300
  userData.indices = it.indices;
@@ -82357,7 +82343,7 @@ var isDebug = false || false === true;
82357
82343
  var _modelIds = this.noObserver.documentModelIds.get(documentId);
82358
82344
  if (_modelIds) {
82359
82345
  _modelIds.forEach(function (id) {
82360
- _this4._boxIndex.delete(id);
82346
+ _this3._boxIndex.delete(id);
82361
82347
  });
82362
82348
  this.noObserver.documentModelIds.delete(documentId);
82363
82349
 
@@ -82371,7 +82357,7 @@ var isDebug = false || false === true;
82371
82357
  console.log('time end', Date.now());
82372
82358
  },
82373
82359
  buildOctreeFromBoxIndex: function buildOctreeFromBoxIndex() {
82374
- var _this5 = this;
82360
+ var _this4 = this;
82375
82361
  if (!this._boxIndex || this._boxIndex.size === 0) {
82376
82362
  this._octree = null;
82377
82363
  return;
@@ -82403,7 +82389,7 @@ var isDebug = false || false === true;
82403
82389
  depth: 0
82404
82390
  };
82405
82391
  this._boxIndex.forEach(function (box, id) {
82406
- _this5._octreeInsert(_this5._octree, String(id), box);
82392
+ _this4._octreeInsert(_this4._octree, String(id), box);
82407
82393
  });
82408
82394
  },
82409
82395
  _octreeSubdivide: function _octreeSubdivide(node) {
@@ -82599,7 +82585,7 @@ var isDebug = false || false === true;
82599
82585
  * @returns {Object|null} { planeBox: THREE.Box3|null, frustumBox: THREE.Box3, frustumY: {min, max} } 或 null(当没有平面交点且未请求 frustumY)
82600
82586
  */
82601
82587
  getScreenPlaneBounds: function getScreenPlaneBounds(camera, width, height, plane) {
82602
- var _this6 = this;
82588
+ var _this5 = this;
82603
82589
  var opts = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
82604
82590
  var _opts$includeFrustumY = opts.includeFrustumY,
82605
82591
  includeFrustumY = _opts$includeFrustumY === void 0 ? false : _opts$includeFrustumY;
@@ -82644,7 +82630,7 @@ var isDebug = false || false === true;
82644
82630
  var volumeCorners = nearCorners.concat(farCorners);
82645
82631
  var projectedPoints = volumeCorners.map(function (p) {
82646
82632
  var yProj = -(a * p.x + c * p.z + d) / b;
82647
- return new _this6.THREE.Vector3(p.x, yProj, p.z);
82633
+ return new _this5.THREE.Vector3(p.x, yProj, p.z);
82648
82634
  });
82649
82635
  planeBox = new this.THREE.Box3().setFromPoints(projectedPoints);
82650
82636
  }
@@ -82874,14 +82860,14 @@ var isDebug = false || false === true;
82874
82860
  * 执行视椎体裁切,清理视椎体外的InstancedMesh实例
82875
82861
  */
82876
82862
  performFrustumCulling: function performFrustumCulling() {
82877
- var _this7 = this;
82863
+ var _this6 = this;
82878
82864
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee6() {
82879
82865
  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
82866
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context6) {
82881
82867
  while (1) switch (_context6.p = _context6.n) {
82882
82868
  case 0:
82883
- modelState = _this7.noObserver ? _this7.noObserver.modelStateManager : _this7.modelStateManager;
82884
- if (!(!_this7.modelStateManager.frustumCheckEnabled || !com_graphicsvue_type_script_lang_js_scene)) {
82869
+ modelState = _this6.noObserver ? _this6.noObserver.modelStateManager : _this6.modelStateManager;
82870
+ if (!(!_this6.modelStateManager.frustumCheckEnabled || !com_graphicsvue_type_script_lang_js_scene)) {
82885
82871
  _context6.n = 1;
82886
82872
  break;
82887
82873
  }
@@ -82897,10 +82883,10 @@ var isDebug = false || false === true;
82897
82883
  modelState.lastCullingTime = now;
82898
82884
 
82899
82885
  // 预先创建视椎体,供后续遍历复用
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);
82886
+ if (!_this6._frustum) _this6._frustum = new _this6.THREE.Frustum();
82887
+ if (!_this6._vpMatrix) _this6._vpMatrix = new _this6.THREE.Matrix4();
82888
+ globalFrustum = _this6._frustum;
82889
+ globalVpMatrix = _this6._vpMatrix.multiplyMatrices(com_graphicsvue_type_script_lang_js_camera.projectionMatrix, com_graphicsvue_type_script_lang_js_camera.matrixWorldInverse);
82904
82890
  globalFrustum.setFromProjectionMatrix(globalVpMatrix);
82905
82891
 
82906
82892
  // 使用局部变量收集 ID,最后一次性赋值
@@ -82914,17 +82900,39 @@ var isDebug = false || false === true;
82914
82900
  });
82915
82901
  }
82916
82902
  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) {
82903
+ if (!_this6._octree) {
82904
+ _context6.n = 7;
82905
+ break;
82906
+ }
82907
+ frustum = _this6._getCurrentFrustum();
82908
+ exclude = bypassList || new Set();
82909
+ hits = _this6.queryOctreeByFrustum(frustum, exclude);
82910
+ i = 0;
82911
+ case 3:
82912
+ if (!(i < hits.length)) {
82913
+ _context6.n = 6;
82914
+ break;
82915
+ }
82916
+ if (!(hits[i].box && hits[i].box.userData && hits[i].box.userData.visible === false)) {
82917
+ _context6.n = 4;
82918
+ break;
82919
+ }
82920
+ return _context6.a(3, 5);
82921
+ case 4:
82922
+ candidates.push(hits[i]);
82923
+ case 5:
82924
+ i++;
82925
+ _context6.n = 3;
82926
+ break;
82927
+ case 6:
82928
+ _context6.n = 8;
82929
+ break;
82930
+ case 7:
82931
+ if (_this6._boxIndex && _this6._boxIndex.size > 0) {
82932
+ _this6._boxIndex.forEach(function (box, modelId) {
82926
82933
  if (bypassList && bypassList.size > 0 && bypassList.has(modelId)) return;
82927
- if (_this7.isBoxInFrustum(box)) {
82934
+ if (box.userData && box.userData.visible === false) return;
82935
+ if (_this6.isBoxInFrustum(box)) {
82928
82936
  candidates.push({
82929
82937
  modelId: modelId,
82930
82938
  box: box
@@ -82932,10 +82940,11 @@ var isDebug = false || false === true;
82932
82940
  }
82933
82941
  });
82934
82942
  }
82935
- occlusionState = _this7.noObserver ? _this7.noObserver.occlusionState : _this7.occlusionState; // 从响应式对象获取开关状态
82936
- occlusionEnabled = _this7.occlusionState && _this7.occlusionState.enabled;
82943
+ case 8:
82944
+ occlusionState = _this6.noObserver ? _this6.noObserver.occlusionState : _this6.occlusionState; // 从响应式对象获取开关状态
82945
+ occlusionEnabled = _this6.occlusionState && _this6.occlusionState.enabled;
82937
82946
  if (!occlusionEnabled) {
82938
- _context6.n = 9;
82947
+ _context6.n = 15;
82939
82948
  break;
82940
82949
  }
82941
82950
  state = occlusionState;
@@ -82943,25 +82952,25 @@ var isDebug = false || false === true;
82943
82952
  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
82953
  // 性能优化:使用降采样缓冲区进行遮挡剔除,大幅减少 readPixels 耗时 (从全屏降至约 256px 宽)
82945
82954
  aspectRatio = h > 0 ? w / h : 1;
82946
- sw = _this7.occlusionState.bufferWidth || 256;
82955
+ sw = _this6.occlusionState.bufferWidth || 256;
82947
82956
  sh = Math.floor(sw / aspectRatio);
82948
82957
  sw = Math.max(1, sw);
82949
82958
  sh = Math.max(1, sh);
82950
82959
  rt = state._colorRT;
82951
82960
  t0 = performance.now();
82952
- _context6.p = 3;
82961
+ _context6.p = 9;
82953
82962
  if (!rt || state._rtW !== sw || state._rtH !== sh) {
82954
82963
  if (rt && typeof rt.dispose === 'function') rt.dispose();
82955
- rt = new _this7.THREE.WebGLRenderTarget(sw, sh, {
82964
+ rt = new _this6.THREE.WebGLRenderTarget(sw, sh, {
82956
82965
  depthBuffer: true,
82957
82966
  stencilBuffer: false,
82958
82967
  samples: 0
82959
82968
  });
82960
- rt.texture.minFilter = _this7.THREE.NearestFilter;
82961
- rt.texture.magFilter = _this7.THREE.NearestFilter;
82969
+ rt.texture.minFilter = _this6.THREE.NearestFilter;
82970
+ rt.texture.magFilter = _this6.THREE.NearestFilter;
82962
82971
  rt.texture.generateMipmaps = false;
82963
- rt.texture.type = _this7.THREE.UnsignedByteType;
82964
- rt.texture.format = _this7.THREE.RGBAFormat;
82972
+ rt.texture.type = _this6.THREE.UnsignedByteType;
82973
+ rt.texture.format = _this6.THREE.RGBAFormat;
82965
82974
  rt.samples = 0;
82966
82975
  state._colorRT = rt;
82967
82976
  state._rtW = sw;
@@ -82970,7 +82979,7 @@ var isDebug = false || false === true;
82970
82979
  } else if (!state._colorBuffer || state._colorBuffer.length !== sw * sh * 4) {
82971
82980
  state._colorBuffer = new Uint8Array(sw * sh * 4);
82972
82981
  }
82973
- if (!state._occScene) state._occScene = new _this7.THREE.Scene();
82982
+ if (!state._occScene) state._occScene = new _this6.THREE.Scene();
82974
82983
  // if (!state._occPerfStats) state._occPerfStats = Object.create(null);
82975
82984
  // const _occRecordPerf = (name, ms, meta) => {
82976
82985
  // const stats = state._occPerfStats;
@@ -83019,7 +83028,7 @@ var isDebug = false || false === true;
83019
83028
  // child.parent = null;
83020
83029
  // // child.dispatchEvent({ type: 'removed' }); // 保持轻量,暂不触发事件
83021
83030
  // }
83022
- asyncBuildEnabled = _this7.occlusionState && _this7.occlusionState.asyncBuildEnabled && !!window.requestAnimationFrame;
83031
+ asyncBuildEnabled = _this6.occlusionState && _this6.occlusionState.asyncBuildEnabled && !!window.requestAnimationFrame;
83023
83032
  _occBuild = function _occBuild(opaqueList) {
83024
83033
  var tBuild0 = performance.now();
83025
83034
  var flag1Items = [];
@@ -83030,7 +83039,7 @@ var isDebug = false || false === true;
83030
83039
  var obbData = c.box && c.box.userData ? c.box.userData.obbData : null;
83031
83040
  if (!obbData || !obbData.length) continue;
83032
83041
  var idx = globalIdx++;
83033
- activeIdIndexArr[idx] = _this7.formatModelId(c.modelId);
83042
+ activeIdIndexArr[idx] = _this6.formatModelId(c.modelId);
83034
83043
  var flag = c.box.userData && c.box.userData.flag || 1;
83035
83044
  if (flag === 3 && c.box.userData && c.box.userData.obb) {
83036
83045
  flag3Items.push({
@@ -83046,11 +83055,11 @@ var isDebug = false || false === true;
83046
83055
  }
83047
83056
  var maxIdx = globalIdx - 1;
83048
83057
  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());
83058
+ var _tempMatrix = occObjs._tempMatrix || (occObjs._tempMatrix = new _this6.THREE.Matrix4());
83059
+ var _tempColor = occObjs._tempColor || (occObjs._tempColor = new _this6.THREE.Color());
83060
+ var _tempScale = occObjs._tempScale || (occObjs._tempScale = new _this6.THREE.Vector3());
83061
+ var _tempVec3 = occObjs._tempVec3 || (occObjs._tempVec3 = new _this6.THREE.Vector3());
83062
+ var _tempMatA = occObjs._tempMatA || (occObjs._tempMatA = new _this6.THREE.Matrix4());
83054
83063
  var boxes = occObjs.boxes;
83055
83064
  var boxCount = flag3Items.length;
83056
83065
  if (boxCount > 0) {
@@ -83063,16 +83072,16 @@ var isDebug = false || false === true;
83063
83072
  if (boxes.mesh.material) boxes.mesh.material.dispose();
83064
83073
  }
83065
83074
  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({
83075
+ var geometry = new _this6.THREE.BoxGeometry(1, 1, 1);
83076
+ var mat = new _this6.THREE.MeshBasicMaterial({
83068
83077
  color: 0xffffff,
83069
- side: _this7.THREE.DoubleSide,
83070
- blending: _this7.THREE.NoBlending,
83078
+ side: _this6.THREE.DoubleSide,
83079
+ blending: _this6.THREE.NoBlending,
83071
83080
  depthTest: true,
83072
83081
  depthWrite: true,
83073
83082
  toneMapped: false
83074
83083
  });
83075
- var mesh = new _this7.THREE.InstancedMesh(geometry, mat, nextCap);
83084
+ var mesh = new _this6.THREE.InstancedMesh(geometry, mat, nextCap);
83076
83085
  mesh.frustumCulled = false;
83077
83086
  mesh.matrixAutoUpdate = false;
83078
83087
  state._occScene.add(mesh);
@@ -83127,16 +83136,16 @@ var isDebug = false || false === true;
83127
83136
  var needIdx = totalIdx;
83128
83137
  var ensureBatch1 = function ensureBatch1() {
83129
83138
  if (batch1 && batch1.mesh && batch1.geometry && batch1.material) return;
83130
- var geometry = new _this7.THREE.BufferGeometry();
83131
- var material = new _this7.THREE.MeshBasicMaterial({
83139
+ var geometry = new _this6.THREE.BufferGeometry();
83140
+ var material = new _this6.THREE.MeshBasicMaterial({
83132
83141
  vertexColors: true,
83133
- side: _this7.THREE.DoubleSide,
83134
- blending: _this7.THREE.NoBlending,
83142
+ side: _this6.THREE.DoubleSide,
83143
+ blending: _this6.THREE.NoBlending,
83135
83144
  depthTest: true,
83136
83145
  depthWrite: true,
83137
83146
  toneMapped: false
83138
83147
  });
83139
- var mesh = new _this7.THREE.Mesh(geometry, material);
83148
+ var mesh = new _this6.THREE.Mesh(geometry, material);
83140
83149
  mesh.frustumCulled = false;
83141
83150
  batch1 = occObjs.batch1 = {
83142
83151
  mesh: mesh,
@@ -83160,14 +83169,14 @@ var isDebug = false || false === true;
83160
83169
  batch1.positions = _positions;
83161
83170
  batch1.colors = _colors;
83162
83171
  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);
83172
+ var _posAttr = new _this6.THREE.BufferAttribute(_positions, 3);
83173
+ var _colAttr = new _this6.THREE.BufferAttribute(_colors, 3);
83174
+ _posAttr.setUsage(_this6.THREE.DynamicDrawUsage);
83175
+ _colAttr.setUsage(_this6.THREE.DynamicDrawUsage);
83167
83176
  batch1.geometry.setAttribute('position', _posAttr);
83168
83177
  batch1.geometry.setAttribute('color', _colAttr);
83169
- var _idxAttr = new _this7.THREE.BufferAttribute(_indices2, 1);
83170
- _idxAttr.setUsage(_this7.THREE.DynamicDrawUsage);
83178
+ var _idxAttr = new _this6.THREE.BufferAttribute(_indices2, 1);
83179
+ _idxAttr.setUsage(_this6.THREE.DynamicDrawUsage);
83171
83180
  batch1.geometry.setIndex(_idxAttr);
83172
83181
  }
83173
83182
  var positions = batch1.positions;
@@ -83295,7 +83304,7 @@ var isDebug = false || false === true;
83295
83304
  state._occMaxIdx = 0;
83296
83305
  activeIdIndexArr.length = 0;
83297
83306
  }
83298
- if (!state._occTransparentScene) state._occTransparentScene = new _this7.THREE.Scene();
83307
+ if (!state._occTransparentScene) state._occTransparentScene = new _this6.THREE.Scene();
83299
83308
  transparentMesh = state._occTransparentMesh;
83300
83309
  transparentCapacity = transparentMesh && transparentMesh.userData && typeof transparentMesh.userData.capacity === 'number' ? transparentMesh.userData.capacity : 0;
83301
83310
  if (!transparentMesh || transparentCapacity < transparentTotal) {
@@ -83305,16 +83314,16 @@ var isDebug = false || false === true;
83305
83314
  state._occTransparentScene.remove(transparentMesh);
83306
83315
  }
83307
83316
  nextCap = Math.max(transparentTotal, transparentCapacity > 0 ? transparentCapacity * 2 : 256);
83308
- geometry = new _this7.THREE.BoxGeometry(1, 1, 1);
83309
- material = new _this7.THREE.MeshBasicMaterial({
83317
+ geometry = new _this6.THREE.BoxGeometry(1, 1, 1);
83318
+ material = new _this6.THREE.MeshBasicMaterial({
83310
83319
  color: 0xffffff,
83311
- side: _this7.THREE.DoubleSide,
83312
- blending: _this7.THREE.NoBlending,
83320
+ side: _this6.THREE.DoubleSide,
83321
+ blending: _this6.THREE.NoBlending,
83313
83322
  depthTest: true,
83314
83323
  depthWrite: false,
83315
83324
  toneMapped: false
83316
83325
  });
83317
- transparentMesh = new _this7.THREE.InstancedMesh(geometry, material, nextCap);
83326
+ transparentMesh = new _this6.THREE.InstancedMesh(geometry, material, nextCap);
83318
83327
  transparentMesh.frustumCulled = false;
83319
83328
  transparentMesh.matrixAutoUpdate = false;
83320
83329
  transparentMesh.userData.capacity = nextCap;
@@ -83324,15 +83333,15 @@ var isDebug = false || false === true;
83324
83333
  state._occTransparentScene.add(transparentMesh);
83325
83334
  }
83326
83335
  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();
83336
+ tempMatrix = new _this6.THREE.Matrix4();
83337
+ tempScale = new _this6.THREE.Vector3();
83338
+ tempObj = new _this6.THREE.Object3D();
83339
+ tempColor = new _this6.THREE.Color();
83331
83340
  tIdx = 1;
83332
83341
  for (_i8 = 0; _i8 < transparentTotal; _i8++) {
83333
83342
  c = transparentCandidates[_i8];
83334
83343
  idx = tIdx++;
83335
- transparentIdIndexArr[idx] = _this7.formatModelId(c.modelId);
83344
+ transparentIdIndexArr[idx] = _this6.formatModelId(c.modelId);
83336
83345
  r = (idx & 255) / 255;
83337
83346
  g = (idx >> 8 & 255) / 255;
83338
83347
  b = (idx >> 16 & 255) / 255;
@@ -83380,19 +83389,19 @@ var isDebug = false || false === true;
83380
83389
  if (_c3 && _c3.isColor) prevClearColorHex = _c3.getHex();
83381
83390
  prevClearAlpha = typeof com_graphicsvue_type_script_lang_js_renderer.getClearAlpha === 'function' ? com_graphicsvue_type_script_lang_js_renderer.getClearAlpha() : 0;
83382
83391
  } catch (_) {}
83383
- com_graphicsvue_type_script_lang_js_renderer.toneMapping = _this7.THREE.NoToneMapping;
83392
+ com_graphicsvue_type_script_lang_js_renderer.toneMapping = _this6.THREE.NoToneMapping;
83384
83393
  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);
83394
+ com_graphicsvue_type_script_lang_js_renderer.setClearColor(new _this6.THREE.Color(0, 0, 0), 0);
83386
83395
  com_graphicsvue_type_script_lang_js_renderer.clear(true, true, false);
83387
83396
  com_graphicsvue_type_script_lang_js_camera.updateMatrixWorld(true);
83388
83397
  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);
83398
+ sceneBoundingBox = new _this6.THREE.Box3().setFromObject(state._occScene);
83390
83399
  // const t1 = performance.now();
83391
83400
  // 从响应式对象读取 previewEnabled
83392
- _this7.$emit('updateBoundingBox');
83401
+ _this6.$emit('updateBoundingBox');
83393
83402
 
83394
83403
  // const tPreview0 = performance.now();
83395
- if (_this7.occlusionState.previewEnabled) {
83404
+ if (_this6.occlusionState.previewEnabled) {
83396
83405
  if (!state._previewCanvas) {
83397
83406
  cvs = document.createElement('canvas');
83398
83407
  cvs.style.position = 'fixed';
@@ -83443,12 +83452,12 @@ var isDebug = false || false === true;
83443
83452
  totalPixels = sw * sh;
83444
83453
  targetSamples = totalPixels;
83445
83454
  baseStride = Math.max(1, Math.floor(Math.sqrt(totalPixels / Math.max(1, targetSamples))));
83446
- extraStride = _this7.occlusionState && _this7.occlusionState.sampleStride ? _this7.occlusionState.sampleStride : 1;
83455
+ extraStride = _this6.occlusionState && _this6.occlusionState.sampleStride ? _this6.occlusionState.sampleStride : 1;
83447
83456
  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:
83457
+ minSampleCount = _this6.occlusionState && _this6.occlusionState.minSampleCount ? _this6.occlusionState.minSampleCount : 1;
83458
+ _context6.n = 10;
83459
+ return _this6.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, maxIdx, minSampleCount);
83460
+ case 10:
83452
83461
  scanResult = _context6.v;
83453
83462
  if (scanResult && scanResult.buffer) {
83454
83463
  state._colorBuffer = new Uint8Array(scanResult.buffer);
@@ -83462,17 +83471,17 @@ var isDebug = false || false === true;
83462
83471
  }
83463
83472
  transparentMaxIdx = typeof state._occTransparentMaxIdx === 'number' ? state._occTransparentMaxIdx : 0;
83464
83473
  if (!(transparentMaxIdx > 0 && transparentMesh && transparentMesh.visible)) {
83465
- _context6.n = 6;
83474
+ _context6.n = 12;
83466
83475
  break;
83467
83476
  }
83468
- com_graphicsvue_type_script_lang_js_renderer.setClearColor(new _this7.THREE.Color(0, 0, 0), 0);
83477
+ com_graphicsvue_type_script_lang_js_renderer.setClearColor(new _this6.THREE.Color(0, 0, 0), 0);
83469
83478
  com_graphicsvue_type_script_lang_js_renderer.clear(true, false, false);
83470
83479
  com_graphicsvue_type_script_lang_js_renderer.render(state._occTransparentScene, com_graphicsvue_type_script_lang_js_camera);
83471
83480
  com_graphicsvue_type_script_lang_js_renderer.readRenderTargetPixels(rt, 0, 0, sw, sh, state._colorBuffer);
83472
83481
  tIdIndexArr = transparentIdIndexArr;
83473
- _context6.n = 5;
83474
- return _this7.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, transparentMaxIdx, minSampleCount);
83475
- case 5:
83482
+ _context6.n = 11;
83483
+ return _this6.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, transparentMaxIdx, minSampleCount);
83484
+ case 11:
83476
83485
  tScanResult = _context6.v;
83477
83486
  if (tScanResult && tScanResult.buffer) {
83478
83487
  state._colorBuffer = new Uint8Array(tScanResult.buffer);
@@ -83484,26 +83493,26 @@ var isDebug = false || false === true;
83484
83493
  visibleIdSet.add(_id);
83485
83494
  }
83486
83495
  }
83487
- case 6:
83496
+ case 12:
83488
83497
  com_graphicsvue_type_script_lang_js_renderer.setRenderTarget(prevTarget);
83489
83498
  com_graphicsvue_type_script_lang_js_renderer.setClearColor(prevClearColorHex, prevClearAlpha);
83490
83499
  com_graphicsvue_type_script_lang_js_renderer.toneMapping = prevToneMapping;
83491
- _context6.n = 8;
83500
+ _context6.n = 14;
83492
83501
  break;
83493
- case 7:
83494
- _context6.p = 7;
83502
+ case 13:
83503
+ _context6.p = 13;
83495
83504
  _t = _context6.v;
83496
83505
  for (_i1 = 0; _i1 < candidates.length; _i1++) {
83497
83506
  visibleIdSet.add(candidates[_i1].modelId);
83498
83507
  }
83499
- case 8:
83500
- _context6.n = 10;
83508
+ case 14:
83509
+ _context6.n = 16;
83501
83510
  break;
83502
- case 9:
83511
+ case 15:
83503
83512
  for (_i10 = 0; _i10 < candidates.length; _i10++) {
83504
83513
  visibleIdSet.add(candidates[_i10].modelId);
83505
83514
  }
83506
- case 10:
83515
+ case 16:
83507
83516
  visibleIds.length = 0;
83508
83517
  visibleIdSet.forEach(function (id) {
83509
83518
  return visibleIds.push(id);
@@ -83524,7 +83533,7 @@ var isDebug = false || false === true;
83524
83533
  var _modelId = _modelIds2[_i11];
83525
83534
  // 检查已取消勾选模型进行卸载
83526
83535
  var documentId = _modelId.split(':')[1];
83527
- if (!_this7.noObserver.documentModelIds.get(documentId)) {
83536
+ if (!_this6.noObserver.documentModelIds.get(documentId)) {
83528
83537
  toUnload.push({
83529
83538
  modelId: _modelId,
83530
83539
  child: child
@@ -83534,7 +83543,7 @@ var isDebug = false || false === true;
83534
83543
  if (bypassList && bypassList.size > 0 && bypassList.has(_modelId)) return;
83535
83544
  var instanceInfo = instancesMap.get(_modelId);
83536
83545
  var instanceIndex = instanceInfo && typeof instanceInfo.instanceIndex === 'number' ? instanceInfo.instanceIndex : null;
83537
- var _inFrustum = _this7.isModelInFrustum(child, instanceIndex, globalFrustum);
83546
+ var _inFrustum = _this6.isModelInFrustum(child, instanceIndex, globalFrustum);
83538
83547
  var _modelInVisible = toLoadSet.has(_modelId);
83539
83548
  // console.log('modelId', modelId, 'inFrustum', inFrustum, 'modelInVisible', modelInVisible)
83540
83549
 
@@ -83568,7 +83577,7 @@ var isDebug = false || false === true;
83568
83577
  }
83569
83578
  var modelId = child.parent && child.parent.userData && child.parent.userData.instanceId ? child.parent.userData.instanceId : child.uuid;
83570
83579
  if (bypassList && bypassList.size > 0 && bypassList.has(modelId)) return;
83571
- var inFrustum = _this7.isModelInFrustum(child, null, globalFrustum);
83580
+ var inFrustum = _this6.isModelInFrustum(child, null, globalFrustum);
83572
83581
  var modelInVisible = toLoadSet.has(modelId);
83573
83582
  if (modelInVisible) {
83574
83583
  toLoadSet.delete(modelId);
@@ -83583,7 +83592,7 @@ var isDebug = false || false === true;
83583
83592
  for (_i13 = 0, _toUnload = toUnload; _i13 < _toUnload.length; _i13++) {
83584
83593
  _toUnload$_i = _toUnload[_i13], modelId = _toUnload$_i.modelId, child = _toUnload$_i.child;
83585
83594
  if (child && child.parent) parentsToCheck.add(child.parent);
83586
- _this7.unloadInstancedModel(modelId, child);
83595
+ _this6.unloadInstancedModel(modelId, child);
83587
83596
  }
83588
83597
  if (com_graphicsvue_type_script_lang_js_scene) {
83589
83598
  parentsToCheck.forEach(function (group) {
@@ -83592,11 +83601,11 @@ var isDebug = false || false === true;
83592
83601
  }
83593
83602
  });
83594
83603
  }
83595
- _this7.modelStateManager.isloadedModelsIds = Object.freeze(Array.from(toLoadSet));
83596
- case 11:
83604
+ _this6.modelStateManager.isloadedModelsIds = Object.freeze(Array.from(toLoadSet));
83605
+ case 17:
83597
83606
  return _context6.a(2);
83598
83607
  }
83599
- }, _callee6, null, [[3, 7]]);
83608
+ }, _callee6, null, [[9, 13]]);
83600
83609
  }))();
83601
83610
  },
83602
83611
  isBoxInFrustum: function isBoxInFrustum(box) {
@@ -83682,18 +83691,24 @@ var isDebug = false || false === true;
83682
83691
  // 移除重新加载逻辑实现
83683
83692
  return;
83684
83693
  },
83694
+ /**
83695
+ * 初始化流式加载器(别名 init)
83696
+ * @param {Object} config - 其他配置
83697
+ */
83698
+ init: function init() {
83699
+ var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
83700
+ this.initStreamLoader(config.modelApi, config);
83701
+ },
83685
83702
  /**
83686
83703
  * 初始化流式加载器
83687
83704
  * @param {Object} modelApi - 模型API接口
83688
83705
  * @param {Object} config - 其他配置
83689
83706
  */
83690
83707
  initStreamLoader: function initStreamLoader(modelApi) {
83691
- var _this8 = this;
83708
+ var _this7 = this;
83692
83709
  var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
83693
83710
  var _ref0 = config || {},
83694
83711
  projectId = _ref0.projectId,
83695
- pbsId = _ref0.pbsId,
83696
- version = _ref0.version,
83697
83712
  restConfig = _objectWithoutProperties(_ref0, _excluded);
83698
83713
  var streamLoader = new StreamLoader_StreamLoader(com_graphicsvue_type_script_lang_js_objectSpread({
83699
83714
  modelApi: modelApi,
@@ -83705,7 +83720,7 @@ var isDebug = false || false === true;
83705
83720
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context7) {
83706
83721
  while (1) switch (_context7.n) {
83707
83722
  case 0:
83708
- if (!(userInteracting || _this8.noObserver.batchLoadingState.interactionState.isInteracting)) {
83723
+ if (!(userInteracting || _this7.noObserver.batchLoadingState.interactionState.isInteracting)) {
83709
83724
  _context7.n = 1;
83710
83725
  break;
83711
83726
  }
@@ -83749,6 +83764,18 @@ var isDebug = false || false === true;
83749
83764
  }()
83750
83765
  }, restConfig));
83751
83766
  this.noObserver.streamLoader = streamLoader;
83767
+ if (streamLoader.worker) {
83768
+ this.noObserver.occlusionWorker = streamLoader.worker;
83769
+ this.noObserver.occlusionWorkerRequestId = 0;
83770
+ this.noObserver.occlusionWorkerRequestMap = new Map();
83771
+ streamLoader.worker.addEventListener('message', function (e) {
83772
+ var payload = e.data || {};
83773
+ var pending = _this7.noObserver.occlusionWorkerRequestMap.get(payload.id);
83774
+ if (!pending) return;
83775
+ _this7.noObserver.occlusionWorkerRequestMap.delete(payload.id);
83776
+ pending.resolve(payload);
83777
+ });
83778
+ }
83752
83779
  },
83753
83780
  /**
83754
83781
  * 设置当前流式加载的模型数据
@@ -83756,13 +83783,13 @@ var isDebug = false || false === true;
83756
83783
  * @param {Object} materialData - 材质数据
83757
83784
  */
83758
83785
  setStreamModel: function setStreamModel(item, materialData) {
83759
- var _this9 = this;
83786
+ var _this8 = this;
83760
83787
  if (this.noObserver.streamLoader) {
83761
83788
  this.noObserver.streamLoader.setCurrentModel(item, materialData);
83762
83789
  // 设置完模型后,尝试触发一次范围加载以渲染初始视图
83763
83790
  // 使用 setTimeout 确保在下一帧执行,避免当前栈还在初始化中
83764
83791
  setTimeout(function () {
83765
- _this9.getRangeStream();
83792
+ _this8.getRangeStream();
83766
83793
  }, 0);
83767
83794
  } else {}
83768
83795
  },
@@ -83770,17 +83797,17 @@ var isDebug = false || false === true;
83770
83797
  * 批量加载区域(供外部调用)
83771
83798
  */
83772
83799
  batchLoadRegions: function batchLoadRegions(item, divideData, materialData) {
83773
- var _this0 = this;
83800
+ var _this9 = this;
83774
83801
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee9() {
83775
83802
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context9) {
83776
83803
  while (1) switch (_context9.n) {
83777
83804
  case 0:
83778
- if (!_this0.noObserver.streamLoader) {
83805
+ if (!_this9.noObserver.streamLoader) {
83779
83806
  _context9.n = 1;
83780
83807
  break;
83781
83808
  }
83782
83809
  _context9.n = 1;
83783
- return _this0.noObserver.streamLoader.batchLoadRegions(item, divideData, materialData);
83810
+ return _this9.noObserver.streamLoader.batchLoadRegions(item, divideData, materialData);
83784
83811
  case 1:
83785
83812
  return _context9.a(2);
83786
83813
  }
@@ -83791,7 +83818,7 @@ var isDebug = false || false === true;
83791
83818
  * 获取批量加载详情(供外部调用)
83792
83819
  */
83793
83820
  loadModelByIds: function loadModelByIds(options) {
83794
- var _this1 = this;
83821
+ var _this0 = this;
83795
83822
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee0() {
83796
83823
  var _ref1, ids;
83797
83824
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context0) {
@@ -83799,13 +83826,13 @@ var isDebug = false || false === true;
83799
83826
  case 0:
83800
83827
  // 绕过剔除模型
83801
83828
  _ref1 = options.params || {}, ids = _ref1.ids;
83802
- _this1.addBypassCullingModelIds(ids);
83803
- if (!_this1.noObserver.streamLoader) {
83829
+ _this0.addBypassCullingModelIds(ids);
83830
+ if (!_this0.noObserver.streamLoader) {
83804
83831
  _context0.n = 2;
83805
83832
  break;
83806
83833
  }
83807
83834
  _context0.n = 1;
83808
- return _this1.noObserver.streamLoader.loadModelByIds(options);
83835
+ return _this0.noObserver.streamLoader.loadModelByIds(options);
83809
83836
  case 1:
83810
83837
  return _context0.a(2, _context0.v);
83811
83838
  case 2:
@@ -83818,39 +83845,41 @@ var isDebug = false || false === true;
83818
83845
  * 处理单个模型项加载(供外部调用)
83819
83846
  */
83820
83847
  processModelItem: function processModelItem(item, todoFunc) {
83821
- var _this10 = this;
83848
+ var _this1 = this;
83822
83849
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee1() {
83823
83850
  var res;
83824
83851
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context1) {
83825
83852
  while (1) switch (_context1.n) {
83826
83853
  case 0:
83827
- if (!_this10.noObserver.streamLoader) {
83828
- _context1.n = 2;
83829
- break;
83830
- }
83831
83854
  _context1.n = 1;
83832
- return _this10.noObserver.streamLoader.processModelItem(item, todoFunc);
83855
+ return _this1.noObserver.streamLoader.processModelItem(item, todoFunc);
83833
83856
  case 1:
83834
83857
  res = _context1.v;
83835
83858
  // item.id is the documentId
83836
83859
  if (item && item.id) {
83837
83860
  if (res && res.sceneBox) {
83838
- _this10.setSceneBox(res.sceneBox, item.id, true);
83861
+ _this1.setSceneBox(res.sceneBox, item.id, true);
83839
83862
  }
83840
83863
  if (res && res.boxIndex) {
83841
- _this10.setBoxIndex(res.boxIndex, item.id, true);
83864
+ _this1.setBoxIndex(res.boxIndex, item.id, true);
83842
83865
  }
83843
83866
  // this.setBoxIndex(boxJson.data, item.id, true);
83844
83867
  }
83845
- return _context1.a(2, res);
83868
+ _this1.notifyCameraChange(); // 触发场景更新
83846
83869
  case 2:
83847
- return _context1.a(2, null);
83848
- case 3:
83849
83870
  return _context1.a(2);
83850
83871
  }
83851
83872
  }, _callee1);
83852
83873
  }))();
83853
83874
  },
83875
+ /**
83876
+ * 渲染模型项
83877
+ * @param {Object} item - 模型项信息
83878
+ * @param {Function} todoFunc - 加载完成后调用的函数
83879
+ */
83880
+ render: function render(item, todoFunc) {
83881
+ return this.processModelItem(item, todoFunc);
83882
+ },
83854
83883
  removeModelByDocumentId: function removeModelByDocumentId(documentId) {
83855
83884
  this.setSceneBox(null, documentId, false);
83856
83885
  this.setBoxIndex(null, documentId, false);
@@ -84050,7 +84079,7 @@ var isDebug = false || false === true;
84050
84079
  * 统一监听:用户交互(Wheel/Control)、程序化动画、API调用
84051
84080
  */
84052
84081
  initCameraChangeObserver: function initCameraChangeObserver() {
84053
- var _this11 = this;
84082
+ var _this10 = this;
84054
84083
  // 初始化 control 状态标志
84055
84084
  this.noObserver.isControlActive = false;
84056
84085
 
@@ -84060,28 +84089,28 @@ var isDebug = false || false === true;
84060
84089
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context10) {
84061
84090
  while (1) switch (_context10.n) {
84062
84091
  case 0:
84063
- if (_this11.noObserver.isObserverEnabled) {
84092
+ if (_this10.noObserver.isObserverEnabled) {
84064
84093
  _context10.n = 1;
84065
84094
  break;
84066
84095
  }
84067
84096
  return _context10.a(2);
84068
84097
  case 1:
84069
- if (!(source === 'rest' && _this11.noObserver.isControlActive)) {
84098
+ if (!(source === 'rest' && _this10.noObserver.isControlActive)) {
84070
84099
  _context10.n = 2;
84071
84100
  break;
84072
84101
  }
84073
84102
  return _context10.a(2);
84074
84103
  case 2:
84075
- if (!_this11.modelStateManager.frustumCheckEnabled) {
84104
+ if (!_this10.modelStateManager.frustumCheckEnabled) {
84076
84105
  _context10.n = 3;
84077
84106
  break;
84078
84107
  }
84079
84108
  _context10.n = 3;
84080
- return _this11.performFrustumCulling();
84109
+ return _this10.performFrustumCulling();
84081
84110
  case 3:
84082
84111
  // 执行流式加载请求
84083
- if (_this11.modelStateManager.isloadedModelsIds && _this11.modelStateManager.isloadedModelsIds.length > 0) {
84084
- _this11.getRangeStream(false);
84112
+ if (_this10.modelStateManager.isloadedModelsIds && _this10.modelStateManager.isloadedModelsIds.length > 0) {
84113
+ _this10.getRangeStream(false);
84085
84114
  }
84086
84115
  case 4:
84087
84116
  return _context10.a(2);
@@ -84106,18 +84135,18 @@ var isDebug = false || false === true;
84106
84135
  // 2. 公开API:允许外部或业务逻辑手动触发更新
84107
84136
  this.notifyCameraChange = function () {
84108
84137
  var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'api';
84109
- _this11._cameraChangeObserver(source);
84138
+ _this10._cameraChangeObserver(source);
84110
84139
  };
84111
84140
 
84112
84141
  // 3. 监听器 - Wheel (用户滚轮)
84113
84142
  this._wheelHandler = function (res) {
84114
- _this11.$emit('wheelStart', res);
84143
+ _this10.$emit('wheelStart', res);
84115
84144
 
84116
84145
  // 统一交互开始处理
84117
- _this11.beginInteraction('wheel');
84146
+ _this10.beginInteraction('wheel');
84118
84147
 
84119
84148
  // 设置滚轮交互的结束检测
84120
- _this11.scheduleWheelInteractionEnd(res, 100);
84149
+ _this10.scheduleWheelInteractionEnd(res, 100);
84121
84150
 
84122
84151
  // 滚轮逻辑:infinityDolly 与 maxDollyDistance 控制
84123
84152
  var event = res;
@@ -84149,17 +84178,17 @@ var isDebug = false || false === true;
84149
84178
  }
84150
84179
 
84151
84180
  // 触发观察者
84152
- _this11._cameraChangeObserver('wheel');
84181
+ _this10._cameraChangeObserver('wheel');
84153
84182
  };
84154
84183
  com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('wheel', this._wheelHandler);
84155
84184
 
84156
84185
  // 4. 监听器 - Controls (用户拖拽/操作)
84157
84186
  this._onControlStart = function (res) {
84158
- _this11.noObserver.isControlActive = true;
84187
+ _this10.noObserver.isControlActive = true;
84159
84188
 
84160
84189
  // 统一交互开始处理(相机)
84161
- _this11.beginInteraction('camera');
84162
- _this11.$emit('controlStart', res);
84190
+ _this10.beginInteraction('camera');
84191
+ _this10.$emit('controlStart', res);
84163
84192
 
84164
84193
  // 记录鼠标按下时的位置
84165
84194
  var event = res.originalEvent || window.event;
@@ -84170,11 +84199,11 @@ var isDebug = false || false === true;
84170
84199
  }
84171
84200
  };
84172
84201
  this._onControlEnd = function (res) {
84173
- _this11.noObserver.isControlActive = false;
84174
- _this11.$emit('controlEnd', res);
84202
+ _this10.noObserver.isControlActive = false;
84203
+ _this10.$emit('controlEnd', res);
84175
84204
 
84176
84205
  // 统一交互结束处理(相机)
84177
- _this11.endInteraction('camera', res, {
84206
+ _this10.endInteraction('camera', res, {
84178
84207
  immediateResume: false
84179
84208
  });
84180
84209
 
@@ -84203,7 +84232,7 @@ var isDebug = false || false === true;
84203
84232
  // }
84204
84233
 
84205
84234
  // 触发观察者
84206
- _this11._cameraChangeObserver('control');
84235
+ _this10._cameraChangeObserver('control');
84207
84236
  }
84208
84237
  };
84209
84238
  cameraControls.addEventListener('controlstart', this._onControlStart);
@@ -84213,7 +84242,7 @@ var isDebug = false || false === true;
84213
84242
  // 监听 rest 事件,捕获 cameraControls.setLookAt(..., true) 等动画结束(以及阻尼停止)
84214
84243
  // 注意:rest 事件在用户交互完全静止时也会触发,与 controlEnd 有部分重叠,但 Observer 有防抖,影响不大
84215
84244
  this._onRest = function () {
84216
- _this11._cameraChangeObserver('rest');
84245
+ _this10._cameraChangeObserver('rest');
84217
84246
  };
84218
84247
  cameraControls.addEventListener('rest', this._onRest);
84219
84248
  },
@@ -84234,12 +84263,12 @@ var isDebug = false || false === true;
84234
84263
  },
84235
84264
  // 根据模型数据绘制模型实体 业务平台可调用此方法加载模型
84236
84265
  /*
84237
- 参数:data 模型数据
84238
- color: '' 初始化模型的颜色 在业务方 有这个需求
84239
- meshNameConfig: {}
84240
- */
84266
+ 参数:data 模型数据
84267
+ color: '' 初始化模型的颜色 在业务方 有这个需求
84268
+ meshNameConfig: {}
84269
+ */
84241
84270
  drawModel: function drawModel(data) {
84242
- var _this12 = this;
84271
+ var _this11 = this;
84243
84272
  var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
84244
84273
  var meshNameConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
84245
84274
  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
@@ -84247,13 +84276,13 @@ var isDebug = false || false === true;
84247
84276
  // 使用新的分帧加载方法,提供进度回调
84248
84277
  return this.drawModelWithBatchLoading(data, color, meshNameConfig, options, function (progress) {
84249
84278
  // 触发原有的进度事件
84250
- _this12.$emit('loadProgress', progress);
84279
+ _this11.$emit('loadProgress', progress);
84251
84280
  }, function (complete) {
84252
84281
  var _options$onComplete;
84253
84282
  options === null || options === void 0 || (_options$onComplete = options.onComplete) === null || _options$onComplete === void 0 || _options$onComplete.call(options, complete);
84254
84283
  console.log('加载完成');
84255
84284
  // 触发原有的完成事件
84256
- _this12.$emit('loadComplete');
84285
+ _this11.$emit('loadComplete');
84257
84286
  });
84258
84287
  },
84259
84288
  // 动态设置视角滚轮的距离
@@ -84331,13 +84360,13 @@ var isDebug = false || false === true;
84331
84360
  }
84332
84361
  },
84333
84362
  mouseClick: function mouseClick(event) {
84334
- var _this13 = this;
84363
+ var _this12 = this;
84335
84364
  // 鼠标抬起时重置渲染中断标记
84336
84365
  setTimeout(function () {
84337
84366
  forceSkipRendering = false;
84338
84367
  // interactionFrameCount = 0;
84339
84368
  // 恢复批次加载操作
84340
- _this13.resumeBatchLoading();
84369
+ _this12.resumeBatchLoading();
84341
84370
  }, 50); // 短暂延迟确保交互完成
84342
84371
 
84343
84372
  // 在测量模式下,不进行事件暴露
@@ -84472,7 +84501,7 @@ var isDebug = false || false === true;
84472
84501
  },
84473
84502
  // 带防抖和用户交互检测的智能居中方法
84474
84503
  smartModelCenter: function smartModelCenter(mesh) {
84475
- var _this14 = this;
84504
+ var _this13 = this;
84476
84505
  var debounceDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
84477
84506
  // if (hasExecutedCentering) {
84478
84507
  // return;
@@ -84492,13 +84521,13 @@ var isDebug = false || false === true;
84492
84521
  // 设置新的防抖定时器
84493
84522
  centeringDebounceTimer = setTimeout(function () {
84494
84523
  // 如果已经执行过居中操作,则不再执行
84495
- if (!userInteracting && !hasExecutedCentering && _this14.noObserver.documentModelIds.size > 0) {
84496
- _this14.setModelCenter(mesh, {
84524
+ if (!userInteracting && !hasExecutedCentering && _this13.noObserver.documentModelIds.size > 0) {
84525
+ _this13.setModelCenter(mesh, {
84497
84526
  enableTransition: false
84498
84527
  });
84499
84528
  hasExecutedCentering = true;
84500
84529
  // 触发场景更新
84501
- _this14.notifyCameraChange();
84530
+ _this13.notifyCameraChange();
84502
84531
  }
84503
84532
  }, debounceDelay);
84504
84533
  },
@@ -84521,12 +84550,12 @@ var isDebug = false || false === true;
84521
84550
  * }
84522
84551
  */
84523
84552
  updateProperty: function updateProperty(list) {
84524
- var _this15 = this;
84553
+ var _this14 = this;
84525
84554
  var _loop = function _loop() {
84526
84555
  var ele = list[index];
84527
84556
  var type = ele.type || 'mesh';
84528
84557
  var instanceId = ele.name;
84529
- var targetObj = _this15.getObjectByName(instanceId);
84558
+ var targetObj = _this14.getObjectByName(instanceId);
84530
84559
  var _loop2 = function _loop2(key) {
84531
84560
  switch (key) {
84532
84561
  case 'color':
@@ -84534,11 +84563,11 @@ var isDebug = false || false === true;
84534
84563
  if (children.isMesh) {
84535
84564
  var _children$userData$in = children.userData.instancesMap.get(instanceId),
84536
84565
  instanceIndex = _children$userData$in.instanceIndex;
84537
- children.setColorAt(instanceIndex, new _this15.THREE.Color(ele.attr[key]));
84566
+ children.setColorAt(instanceIndex, new _this14.THREE.Color(ele.attr[key]));
84538
84567
  children.instanceColor.needsUpdate = true;
84539
84568
  if (outlinePass) {
84540
84569
  if (children.isInstancedMesh) {
84541
- var proxy = _this15.ensureOutlineInstanceProxy(children, instanceIndex);
84570
+ var proxy = _this14.ensureOutlineInstanceProxy(children, instanceIndex);
84542
84571
  if (proxy && !outlinePass.selectedObjects.includes(proxy)) {
84543
84572
  outlinePass.selectedObjects.push(proxy);
84544
84573
  }
@@ -84550,11 +84579,17 @@ var isDebug = false || false === true;
84550
84579
  });
84551
84580
  break;
84552
84581
  case 'visible':
84582
+ if (_this14._boxIndex && _this14._boxIndex.has(instanceId)) {
84583
+ var boxData = _this14._boxIndex.get(instanceId);
84584
+ if (boxData && boxData.userData) {
84585
+ boxData.userData.visible = ele.attr[key];
84586
+ }
84587
+ }
84553
84588
  targetObj.forEach(function (children) {
84554
84589
  var _children$userData$in2 = children.userData.instancesMap.get(instanceId),
84555
84590
  instanceIndex = _children$userData$in2.instanceIndex;
84556
84591
  if (ele.attr[key]) {
84557
- var restoreMatrix = new _this15.THREE.Matrix4().copy(children.userData.copyMatrix);
84592
+ var restoreMatrix = new _this14.THREE.Matrix4().copy(children.userData.copyMatrix);
84558
84593
  children.setMatrixAt(instanceIndex, restoreMatrix);
84559
84594
  // if (outlinePass) {
84560
84595
  // if (children.isInstancedMesh) {
@@ -84567,11 +84602,11 @@ var isDebug = false || false === true;
84567
84602
  // }
84568
84603
  // }
84569
84604
  } else {
84570
- var offsetMatrix = new _this15.THREE.Matrix4().copy(children.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
84605
+ var offsetMatrix = new _this14.THREE.Matrix4().copy(children.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
84571
84606
  children.setMatrixAt(instanceIndex, offsetMatrix);
84572
84607
  if (outlinePass) {
84573
84608
  if (children.isInstancedMesh) {
84574
- _this15.removeOutlineInstanceProxy(children, instanceIndex);
84609
+ _this14.removeOutlineInstanceProxy(children, instanceIndex);
84575
84610
  } else {
84576
84611
  var idx = outlinePass.selectedObjects.indexOf(children);
84577
84612
  if (idx !== -1) outlinePass.selectedObjects.splice(idx, 1);
@@ -84580,6 +84615,7 @@ var isDebug = false || false === true;
84580
84615
  }
84581
84616
  children.instanceMatrix.needsUpdate = true;
84582
84617
  });
84618
+ _this14.notifyCameraChange(); // 触发场景更新
84583
84619
  break;
84584
84620
  case 'opacity':
84585
84621
  targetObj.forEach(function (children) {
@@ -84609,7 +84645,7 @@ var isDebug = false || false === true;
84609
84645
  }
84610
84646
  },
84611
84647
  showOutlinePass: function showOutlinePass(instanceId) {
84612
- var _this16 = this;
84648
+ var _this15 = this;
84613
84649
  var targetObj = this.getObjectByName(instanceId);
84614
84650
  targetObj.forEach(function (children) {
84615
84651
  if (children.isMesh) {
@@ -84617,7 +84653,7 @@ var isDebug = false || false === true;
84617
84653
  instanceIndex = _children$userData$in4.instanceIndex;
84618
84654
  if (outlinePass) {
84619
84655
  if (children.isInstancedMesh) {
84620
- var proxy = _this16.ensureOutlineInstanceProxy(children, instanceIndex);
84656
+ var proxy = _this15.ensureOutlineInstanceProxy(children, instanceIndex);
84621
84657
  if (proxy && !outlinePass.selectedObjects.includes(proxy)) {
84622
84658
  outlinePass.selectedObjects.push(proxy);
84623
84659
  }
@@ -84629,7 +84665,7 @@ var isDebug = false || false === true;
84629
84665
  });
84630
84666
  },
84631
84667
  hideOutlinePass: function hideOutlinePass(instanceId) {
84632
- var _this17 = this;
84668
+ var _this16 = this;
84633
84669
  var targetObj = this.getObjectByName(instanceId);
84634
84670
  targetObj.forEach(function (children) {
84635
84671
  if (children.isMesh) {
@@ -84637,7 +84673,7 @@ var isDebug = false || false === true;
84637
84673
  instanceIndex = _children$userData$in5.instanceIndex;
84638
84674
  if (outlinePass) {
84639
84675
  if (children.isInstancedMesh) {
84640
- _this17.removeOutlineInstanceProxy(children, instanceIndex);
84676
+ _this16.removeOutlineInstanceProxy(children, instanceIndex);
84641
84677
  } else {
84642
84678
  var idx = outlinePass.selectedObjects.indexOf(children);
84643
84679
  if (idx !== -1) outlinePass.selectedObjects.splice(idx, 1);
@@ -84665,17 +84701,17 @@ var isDebug = false || false === true;
84665
84701
  },
84666
84702
  // 修改材质的自定义数据
84667
84703
  updateMaterialUserData: function updateMaterialUserData(list) {
84668
- var _this18 = this;
84704
+ var _this17 = this;
84669
84705
  var _loop3 = function _loop3() {
84670
84706
  var ele = list[index];
84671
84707
  var instanceId = ele.name;
84672
- var targetObj = _this18.getObjectByName(instanceId);
84708
+ var targetObj = _this17.getObjectByName(instanceId);
84673
84709
  var _loop4 = function _loop4(key) {
84674
84710
  switch (key) {
84675
84711
  case 'nColor':
84676
84712
  targetObj.forEach(function (children) {
84677
84713
  if (children.isMesh) {
84678
- children.material.userData[key] = new _this18.THREE.Color(ele.attr[key]);
84714
+ children.material.userData[key] = new _this17.THREE.Color(ele.attr[key]);
84679
84715
  }
84680
84716
  });
84681
84717
  break;
@@ -84691,12 +84727,12 @@ var isDebug = false || false === true;
84691
84727
  },
84692
84728
  // 重置
84693
84729
  resetMaterialUserData: function resetMaterialUserData(list) {
84694
- var _this19 = this;
84730
+ var _this18 = this;
84695
84731
  console.log('resetMaterialUserData');
84696
84732
  var _loop5 = function _loop5() {
84697
84733
  var ele = list[index];
84698
84734
  var instanceId = ele.name;
84699
- var targetObj = _this19.getObjectByName(instanceId);
84735
+ var targetObj = _this18.getObjectByName(instanceId);
84700
84736
  var _loop6 = function _loop6(key) {
84701
84737
  switch (key) {
84702
84738
  case 'nColor':
@@ -84722,11 +84758,11 @@ var isDebug = false || false === true;
84722
84758
  },
84723
84759
  // 清除上一次的属性修改操作 为了方便业务平台参数跟updateProperty方法的参数一样
84724
84760
  resetProperty: function resetProperty(list) {
84725
- var _this20 = this;
84761
+ var _this19 = this;
84726
84762
  var _loop7 = function _loop7() {
84727
84763
  var ele = list[index];
84728
84764
  var instanceId = ele.name;
84729
- var obj = _this20.getObjectByName(instanceId);
84765
+ var obj = _this19.getObjectByName(instanceId);
84730
84766
  if (obj) {
84731
84767
  for (var key in ele.attr) {
84732
84768
  switch (key) {
@@ -84739,7 +84775,7 @@ var isDebug = false || false === true;
84739
84775
  children.instanceColor.needsUpdate = true;
84740
84776
  if (outlinePass) {
84741
84777
  if (children.isInstancedMesh) {
84742
- _this20.removeOutlineInstanceProxy(children, instanceIndex);
84778
+ _this19.removeOutlineInstanceProxy(children, instanceIndex);
84743
84779
  } else {
84744
84780
  var idx = outlinePass.selectedObjects.indexOf(children);
84745
84781
  if (idx !== -1) outlinePass.selectedObjects.splice(idx, 1);
@@ -84753,7 +84789,7 @@ var isDebug = false || false === true;
84753
84789
  var _children$userData$in8 = children.userData.instancesMap.get(instanceId),
84754
84790
  instanceIndex = _children$userData$in8.instanceIndex,
84755
84791
  copyMatrix = _children$userData$in8.copyMatrix;
84756
- var restoreMatrix = new _this20.THREE.Matrix4().copy(copyMatrix);
84792
+ var restoreMatrix = new _this19.THREE.Matrix4().copy(copyMatrix);
84757
84793
  children.setMatrixAt(instanceIndex, restoreMatrix);
84758
84794
  children.instanceMatrix.needsUpdate = true;
84759
84795
  });
@@ -84779,12 +84815,12 @@ var isDebug = false || false === true;
84779
84815
  // 定位到模型
84780
84816
  // name 模型名称 可以是数组
84781
84817
  locateModel: function locateModel(name) {
84782
- var _this21 = this;
84818
+ var _this20 = this;
84783
84819
  if (!com_graphicsvue_type_script_lang_js_scene) return;
84784
84820
  if (Array.isArray(name)) {
84785
84821
  var box3 = new this.THREE.Box3();
84786
84822
  name.forEach(function (n) {
84787
- var arr = _this21.getObjectByName(n);
84823
+ var arr = _this20.getObjectByName(n);
84788
84824
  arr.forEach(function (o) {
84789
84825
  box3.expandByObject(o);
84790
84826
  });
@@ -84812,26 +84848,26 @@ var isDebug = false || false === true;
84812
84848
  },
84813
84849
  // 根据自定义参数修改模型
84814
84850
  /*
84815
- 自定义参数指的是在调用drawModel时配置的meshNameConfig里面的字段来修改某一类模型实体的属性
84816
- {
84817
- customName: '', 自定义字段名称
84818
- customValue: '' 自定义字段的值
84819
- attr: {
84820
- color: '',
84821
- opacity: 0 -1,
84822
- visiable: true/false
84851
+ 自定义参数指的是在调用drawModel时配置的meshNameConfig里面的字段来修改某一类模型实体的属性
84852
+ {
84853
+ customName: '', 自定义字段名称
84854
+ customValue: '' 自定义字段的值
84855
+ attr: {
84856
+ color: '',
84857
+ opacity: 0 -1,
84858
+ visiable: true/false
84859
+ }
84823
84860
  }
84824
- }
84825
- */
84861
+ */
84826
84862
  updatePropertyByCustom: function updatePropertyByCustom(params) {
84827
- var _this22 = this;
84863
+ var _this21 = this;
84828
84864
  if (!com_graphicsvue_type_script_lang_js_scene) return;
84829
84865
  com_graphicsvue_type_script_lang_js_scene.traverse(function (child) {
84830
84866
  if (child.isMesh && child.userData[params.customName] === params.customValue) {
84831
84867
  for (var key in params.attr) {
84832
84868
  switch (key) {
84833
84869
  case 'color':
84834
- child.setColorAt(obj.userData.instanceIndex, new _this22.THREE.Color(params.attr[key]));
84870
+ child.setColorAt(obj.userData.instanceIndex, new _this21.THREE.Color(params.attr[key]));
84835
84871
  child.instanceColor.needsUpdate = true;
84836
84872
  break;
84837
84873
  case 'visible':
@@ -84849,10 +84885,10 @@ var isDebug = false || false === true;
84849
84885
  },
84850
84886
  // 相机定位
84851
84887
  /*
84852
- 定位参数:x: 相机的x位置, y: 相机的y位置, z: 相机的z位置
84853
- heading, pitch, roll
84854
- 视点定位可直接使用此方法
84855
- */
84888
+ 定位参数:x: 相机的x位置, y: 相机的y位置, z: 相机的z位置
84889
+ heading, pitch, roll
84890
+ 视点定位可直接使用此方法
84891
+ */
84856
84892
  cameraLocation: function cameraLocation(params) {
84857
84893
  var _params$enableTransit = params.enableTransition,
84858
84894
  enableTransition = _params$enableTransit === void 0 ? true : _params$enableTransit;
@@ -84861,12 +84897,12 @@ var isDebug = false || false === true;
84861
84897
  },
84862
84898
  // 使用中心点和实体的长宽高进行定位
84863
84899
  /*
84864
- center: {x: 0, y: 0, z: 0},
84865
- box: {x: 0, y: 0, z: 0}
84866
- options: {
84867
- viewAll: true/false
84868
- }
84869
- */
84900
+ center: {x: 0, y: 0, z: 0},
84901
+ box: {x: 0, y: 0, z: 0}
84902
+ options: {
84903
+ viewAll: true/false
84904
+ }
84905
+ */
84870
84906
  locateByCenterBox: function locateByCenterBox(center, size, options) {
84871
84907
  var viewAll = options && options.viewAll || false;
84872
84908
  var maxDim = Math.max(size.x, size.y, size.z);
@@ -84884,13 +84920,13 @@ var isDebug = false || false === true;
84884
84920
  },
84885
84921
  // 添加广告牌
84886
84922
  /*
84887
- 参数:
84888
- {
84889
- billboard: DOM节点
84890
- name: 2d广告牌的名字,用来做清除用的
84891
- x、y、z为广告牌的位置
84892
- }
84893
- */
84923
+ 参数:
84924
+ {
84925
+ billboard: DOM节点
84926
+ name: 2d广告牌的名字,用来做清除用的
84927
+ x、y、z为广告牌的位置
84928
+ }
84929
+ */
84894
84930
  billboard: function billboard(data) {
84895
84931
  if (!com_graphicsvue_type_script_lang_js_scene) return null;
84896
84932
  var divLabel = new CSS2DRenderer_CSS2DObject(data.billboard);
@@ -84901,9 +84937,9 @@ var isDebug = false || false === true;
84901
84937
  },
84902
84938
  // 通过名字获取实体对象, 返回数组
84903
84939
  /*
84904
- name: 实体的名字
84905
- passType: 要过滤的类型,默认是group,不返回group类型的实体
84906
- */
84940
+ name: 实体的名字
84941
+ passType: 要过滤的类型,默认是group,不返回group类型的实体
84942
+ */
84907
84943
  getObjectByName: function getObjectByName(name) {
84908
84944
  var passType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'group';
84909
84945
  if (!com_graphicsvue_type_script_lang_js_scene) return [];
@@ -84927,12 +84963,12 @@ var isDebug = false || false === true;
84927
84963
  return modelState.colorConfig;
84928
84964
  },
84929
84965
  addBypassCullingModelIds: function addBypassCullingModelIds(modelIds) {
84930
- var _this23 = this;
84966
+ var _this22 = this;
84931
84967
  var modelState = this.noObserver ? this.noObserver.modelStateManager : this.modelStateManager;
84932
84968
  if (!modelIds) return;
84933
84969
  if (Array.isArray(modelIds)) {
84934
84970
  modelIds.forEach(function (id) {
84935
- var modelId = _this23.formatModelId(id);
84971
+ var modelId = _this22.formatModelId(id);
84936
84972
  modelState.bypassCullingModelIds.add(modelId);
84937
84973
  });
84938
84974
  } else {
@@ -84945,12 +84981,12 @@ var isDebug = false || false === true;
84945
84981
  return com_graphicsvue_type_script_lang_js_toConsumableArray(modelState.bypassCullingModelIds);
84946
84982
  },
84947
84983
  removeBypassCullingModelIds: function removeBypassCullingModelIds(modelIds) {
84948
- var _this24 = this;
84984
+ var _this23 = this;
84949
84985
  var modelState = this.noObserver ? this.noObserver.modelStateManager : this.modelStateManager;
84950
84986
  if (!modelIds) return;
84951
84987
  if (Array.isArray(modelIds)) {
84952
84988
  modelIds.forEach(function (id) {
84953
- var modelId = _this24.formatModelId(id);
84989
+ var modelId = _this23.formatModelId(id);
84954
84990
  modelState.bypassCullingModelIds.delete(modelId);
84955
84991
  });
84956
84992
  } else {
@@ -84992,11 +85028,11 @@ var isDebug = false || false === true;
84992
85028
  },
84993
85029
  // 删除场景中所有的实体
84994
85030
  removeAll: function removeAll() {
84995
- var _this25 = this;
85031
+ var _this24 = this;
84996
85032
  return new Promise(function (resolve) {
84997
85033
  if (com_graphicsvue_type_script_lang_js_scene) {
84998
- _this25.removeTraverse();
84999
- _this25.removeModelByDocumentId();
85034
+ _this24.removeTraverse();
85035
+ _this24.removeModelByDocumentId();
85000
85036
  resolve();
85001
85037
  } else {
85002
85038
  resolve();
@@ -85149,19 +85185,19 @@ var isDebug = false || false === true;
85149
85185
  },
85150
85186
  // 绘制曲线
85151
85187
  /*
85152
- 参数声明:Object
85153
- {
85154
- path: [{x:0, y: 0, z: 0}], 坐标点信息
85155
- color: '', // 线条的颜色
85156
- name: '', // 线条的名字, 用来清除时使用的
85157
- }
85158
- */
85188
+ 参数声明:Object
85189
+ {
85190
+ path: [{x:0, y: 0, z: 0}], 坐标点信息
85191
+ color: '', // 线条的颜色
85192
+ name: '', // 线条的名字, 用来清除时使用的
85193
+ }
85194
+ */
85159
85195
  drawCurve: function drawCurve(params) {
85160
- var _this26 = this;
85196
+ var _this25 = this;
85161
85197
  this.removeObjectByName(params.name);
85162
85198
  var route = [];
85163
85199
  params.path.forEach(function (element) {
85164
- route.push(new _this26.THREE.Vector3(element.x, element.y, element.z));
85200
+ route.push(new _this25.THREE.Vector3(element.x, element.y, element.z));
85165
85201
  });
85166
85202
  if (route.length > 1) {
85167
85203
  com_graphicsvue_type_script_lang_js_curve = new this.THREE.CatmullRomCurve3(route);
@@ -85178,18 +85214,18 @@ var isDebug = false || false === true;
85178
85214
  },
85179
85215
  // 绘制贴图曲线
85180
85216
  /*
85181
- 参数声明:Object
85182
- {
85183
- path: [{x:0, y: 0, z: 0}], 坐标点信息
85184
- name: '', // 线条的名字, 用来清除时使用的
85185
- }
85186
- */
85217
+ 参数声明:Object
85218
+ {
85219
+ path: [{x:0, y: 0, z: 0}], 坐标点信息
85220
+ name: '', // 线条的名字, 用来清除时使用的
85221
+ }
85222
+ */
85187
85223
  drawTextureCurve: function drawTextureCurve(params) {
85188
- var _this27 = this;
85224
+ var _this26 = this;
85189
85225
  this.removeObjectByName(params.name);
85190
85226
  var route = [];
85191
85227
  params.path.forEach(function (element) {
85192
- route.push(new _this27.THREE.Vector3(element.x, element.y, element.z));
85228
+ route.push(new _this26.THREE.Vector3(element.x, element.y, element.z));
85193
85229
  });
85194
85230
  // 画曲线
85195
85231
  if (route.length > 1) {
@@ -85218,12 +85254,12 @@ var isDebug = false || false === true;
85218
85254
  //
85219
85255
  // 开启漫游
85220
85256
  /*
85221
- 参数为Object
85222
- loop: true / false是否进行循环模型 默认是false
85223
- speed: number 漫游的速度,
85224
- path: [{x: 0, y: 0, z: 0}] 漫游的坐标位置点,
85225
- name: '', 路径的名称,用来清除用的
85226
- */
85257
+ 参数为Object
85258
+ loop: true / false是否进行循环模型 默认是false
85259
+ speed: number 漫游的速度,
85260
+ path: [{x: 0, y: 0, z: 0}] 漫游的坐标位置点,
85261
+ name: '', 路径的名称,用来清除用的
85262
+ */
85227
85263
  startRoam: function startRoam(params) {
85228
85264
  progress = 0;
85229
85265
  roamConfig = {
@@ -85238,8 +85274,8 @@ var isDebug = false || false === true;
85238
85274
  },
85239
85275
  // 更新漫游的配置
85240
85276
  /*
85241
- 参数为Object
85242
- */
85277
+ 参数为Object
85278
+ */
85243
85279
  updateRoamConfig: function updateRoamConfig(params) {
85244
85280
  for (var key in params) {
85245
85281
  roamConfig[key] = params[key];
@@ -85294,24 +85330,24 @@ var isDebug = false || false === true;
85294
85330
  * 参数val: 爆炸的值
85295
85331
  */
85296
85332
  globalBomb: function globalBomb(val) {
85297
- var _this28 = this;
85333
+ var _this27 = this;
85298
85334
  if (com_graphicsvue_type_script_lang_js_scene.children.length === 0) return;
85299
85335
  for (var i = 0; i < com_graphicsvue_type_script_lang_js_scene.children.length; i++) {
85300
85336
  console.log('scene', com_graphicsvue_type_script_lang_js_scene);
85301
85337
  com_graphicsvue_type_script_lang_js_scene.children[i].traverse(function (item) {
85302
85338
  if (!item.isMesh || !item.worldDir) return;
85303
85339
  // 爆炸公式
85304
- _this28.computedBomb(item, val);
85340
+ _this27.computedBomb(item, val);
85305
85341
  });
85306
85342
  }
85307
85343
  // this.timeRender();
85308
85344
  },
85309
85345
  // 单个实体模型炸开
85310
85346
  /*
85311
- 参数:
85312
- name: '',当前选中的实体对象的id
85313
- value: 0 - 100 整数
85314
- */
85347
+ 参数:
85348
+ name: '',当前选中的实体对象的id
85349
+ value: 0 - 100 整数
85350
+ */
85315
85351
  localBomb: function localBomb(name, value) {
85316
85352
  var target = this.getObjectByName(name)[0];
85317
85353
  if (target) {
@@ -85334,9 +85370,9 @@ var isDebug = false || false === true;
85334
85370
  },
85335
85371
  // 设置全局整体剖切
85336
85372
  /*
85337
- 先开启模型全局剖切模式, 会返回剖切值的最大最小值
85338
- 剖切值变换时, 使用
85339
- */
85373
+ 先开启模型全局剖切模式, 会返回剖切值的最大最小值
85374
+ 剖切值变换时, 使用
85375
+ */
85340
85376
  setGlobalClipping: function setGlobalClipping() {
85341
85377
  var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
85342
85378
  var box3 = new this.THREE.Box3().setFromObject(com_graphicsvue_type_script_lang_js_scene.children[0]);
@@ -85374,9 +85410,9 @@ var isDebug = false || false === true;
85374
85410
  },
85375
85411
  // 更新全局剖切的值
85376
85412
  /*
85377
- 参数:Object
85378
- {x: 1, y: 0, z: 0} 可以传一个也可以传多个
85379
- */
85413
+ 参数:Object
85414
+ {x: 1, y: 0, z: 0} 可以传一个也可以传多个
85415
+ */
85380
85416
  updateGlobalCliValue: function updateGlobalCliValue(params) {
85381
85417
  var axis = {
85382
85418
  x: 0,
@@ -85438,9 +85474,9 @@ var isDebug = false || false === true;
85438
85474
  },
85439
85475
  // 更新局部剖切的值
85440
85476
  /*
85441
- 参数:Object
85442
- {x: 1, y: 0, z: 0} 可以传一个也可以传多个
85443
- */
85477
+ 参数:Object
85478
+ {x: 1, y: 0, z: 0} 可以传一个也可以传多个
85479
+ */
85444
85480
  updateLocalCliValue: function updateLocalCliValue(params) {
85445
85481
  var axis = {
85446
85482
  x: 0,
@@ -85519,7 +85555,7 @@ var isDebug = false || false === true;
85519
85555
  },
85520
85556
  // 页面是否锁定
85521
85557
  initPointerLock: function initPointerLock() {
85522
- var _this29 = this;
85558
+ var _this28 = this;
85523
85559
  this.home();
85524
85560
  setTimeout(function () {
85525
85561
  // 开启第一视角时,将相机与水平面保持水平
@@ -85527,25 +85563,25 @@ var isDebug = false || false === true;
85527
85563
  com_graphicsvue_type_script_lang_js_camera.rotation.z = 0;
85528
85564
  pointControls = new PointerLockControls(com_graphicsvue_type_script_lang_js_camera, com_graphicsvue_type_script_lang_js_renderer.domElement);
85529
85565
  pointControls.lock();
85530
- if (!_this29._onFirstPersonChange) {
85531
- _this29._onFirstPersonChange = function () {
85532
- if (typeof _this29._cameraChangeObserver === 'function') {
85533
- _this29._cameraChangeObserver('firstPerson');
85566
+ if (!_this28._onFirstPersonChange) {
85567
+ _this28._onFirstPersonChange = function () {
85568
+ if (typeof _this28._cameraChangeObserver === 'function') {
85569
+ _this28._cameraChangeObserver('firstPerson');
85534
85570
  }
85535
85571
  };
85536
85572
  }
85537
85573
  try {
85538
- pointControls.addEventListener('change', _this29._onFirstPersonChange);
85574
+ pointControls.addEventListener('change', _this28._onFirstPersonChange);
85539
85575
  } catch (e) {}
85540
85576
  // 锁定
85541
85577
  pointControls.addEventListener('lock', function () {
85542
85578
  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');
85579
+ window.addEventListener('keydown', _this28.onKeyDown, false);
85580
+ window.addEventListener('keyup', _this28.onKeyUp, false);
85581
+ com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mouseup', _this28.mouseClick, false);
85582
+ com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mousedown', _this28.mouseDown, false);
85583
+ if (typeof _this28._cameraChangeObserver === 'function') {
85584
+ _this28._cameraChangeObserver('firstPersonLock');
85549
85585
  }
85550
85586
  });
85551
85587
  // 解锁
@@ -85553,24 +85589,24 @@ var isDebug = false || false === true;
85553
85589
  firstPerSign = false;
85554
85590
  cameraControls.enabled = true;
85555
85591
  // 返回初始视角
85556
- _this29.home();
85592
+ _this28.home();
85557
85593
  try {
85558
- if (_this29._onFirstPersonChange && pointControls) {
85559
- pointControls.removeEventListener('change', _this29._onFirstPersonChange);
85594
+ if (_this28._onFirstPersonChange && pointControls) {
85595
+ pointControls.removeEventListener('change', _this28._onFirstPersonChange);
85560
85596
  }
85561
85597
  } catch (e) {}
85562
- if (_this29.noObserver) {
85563
- _this29.noObserver._firstPersonLastPos = null;
85598
+ if (_this28.noObserver) {
85599
+ _this28.noObserver._firstPersonLastPos = null;
85564
85600
  }
85565
85601
  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);
85602
+ window.removeEventListener('keydown', _this28.onKeyDown);
85603
+ window.removeEventListener('keyup', _this28.onKeyUp);
85604
+ com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mouseup', _this28.mouseClick, false);
85605
+ com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mousedown', _this28.mouseDown, false);
85570
85606
  // this.timeRender()
85571
85607
  }, 0);
85572
- if (typeof _this29._cameraChangeObserver === 'function') {
85573
- _this29._cameraChangeObserver('firstPersonUnlock');
85608
+ if (typeof _this28._cameraChangeObserver === 'function') {
85609
+ _this28._cameraChangeObserver('firstPersonUnlock');
85574
85610
  }
85575
85611
  });
85576
85612
  if (com_graphicsvue_type_script_lang_js_scene) com_graphicsvue_type_script_lang_js_scene.add(pointControls.object);
@@ -85718,8 +85754,8 @@ var isDebug = false || false === true;
85718
85754
  },
85719
85755
  // 测量
85720
85756
  /*
85721
- 参数: type: '', distance、area、angle, 暂时只提供距离、面积、角度这三种方式
85722
- */
85757
+ 参数: type: '', distance、area、angle, 暂时只提供距离、面积、角度这三种方式
85758
+ */
85723
85759
  openMeasure: function openMeasure(type) {
85724
85760
  if (threeMeasure) {
85725
85761
  threeMeasure.close();
@@ -85770,8 +85806,8 @@ var isDebug = false || false === true;
85770
85806
  },
85771
85807
  // 开启平移
85772
85808
  /*
85773
- 参数: object, 当前选中的对象, distance: {x: 0, y: 0, z: 0}, 平移的距离
85774
- */
85809
+ 参数: object, 当前选中的对象, distance: {x: 0, y: 0, z: 0}, 平移的距离
85810
+ */
85775
85811
  translateMesh: function translateMesh(object, distance) {
85776
85812
  var translateMatrix = new this.THREE.Matrix4().makeTranslation(distance.x, distance.y, distance.z);
85777
85813
  var translateMatrixInvert = new this.THREE.Matrix4().copy(translateMatrix).invert();
@@ -85785,8 +85821,8 @@ var isDebug = false || false === true;
85785
85821
  },
85786
85822
  // 单个模型对象旋转
85787
85823
  /*
85788
- 参数: object, 目标实体, degrees: {x: 0, y: 0, z: 0}, 旋转的数值(0-360)
85789
- */
85824
+ 参数: object, 目标实体, degrees: {x: 0, y: 0, z: 0}, 旋转的数值(0-360)
85825
+ */
85790
85826
  rotateMesh: function rotateMesh(object, degrees) {
85791
85827
  // 在矩阵的计算里 完成撤销操作是向量去乘以一个矩阵的逆矩阵
85792
85828
  // 变化后的向量 = 原始向量 * 变化矩阵
@@ -85813,15 +85849,15 @@ var isDebug = false || false === true;
85813
85849
  },
85814
85850
  // 隔离
85815
85851
  /*
85816
- 参数: object, 目标实体,
85817
- */
85852
+ 参数: object, 目标实体,
85853
+ */
85818
85854
  isolate: function isolate(object) {
85819
- var _this30 = this;
85855
+ var _this29 = this;
85820
85856
  if (!com_graphicsvue_type_script_lang_js_scene) return;
85821
85857
  // 隔离 将目标实体以外的实体隐藏掉
85822
85858
  com_graphicsvue_type_script_lang_js_scene.traverse(function (item) {
85823
85859
  if (item.isMesh && item.name !== object.name) {
85824
- var offsetMatrix = new _this30.THREE.Matrix4().copy(item.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
85860
+ var offsetMatrix = new _this29.THREE.Matrix4().copy(item.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
85825
85861
  item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
85826
85862
  item.instanceMatrix.needsUpdate = true;
85827
85863
  }
@@ -85829,7 +85865,7 @@ var isDebug = false || false === true;
85829
85865
  },
85830
85866
  // 还原操作 将修改过的实体进行恢复
85831
85867
  restore: function restore() {
85832
- var _this31 = this;
85868
+ var _this30 = this;
85833
85869
  if (!com_graphicsvue_type_script_lang_js_scene) return;
85834
85870
  com_graphicsvue_type_script_lang_js_scene.traverse(function (item) {
85835
85871
  if (item.isMesh) {
@@ -85850,14 +85886,14 @@ var isDebug = false || false === true;
85850
85886
  item.userData.translateMatrixInvert = null;
85851
85887
  }
85852
85888
  if (item.userData.combineMatrixInvert) {
85853
- _this31.rotateMesh(item, {
85889
+ _this30.rotateMesh(item, {
85854
85890
  x: 0,
85855
85891
  y: 0,
85856
85892
  z: 0
85857
85893
  });
85858
85894
  item.userData.combineMatrixInvert = null;
85859
85895
  }
85860
- var offsetMatrix = new _this31.THREE.Matrix4().copy(item.userData.copyMatrix);
85896
+ var offsetMatrix = new _this30.THREE.Matrix4().copy(item.userData.copyMatrix);
85861
85897
  item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
85862
85898
  item.instanceMatrix.needsUpdate = true;
85863
85899
  }
@@ -85865,7 +85901,7 @@ var isDebug = false || false === true;
85865
85901
  },
85866
85902
  // 添加自定义模型, 暂时只支持glb、gltf格式
85867
85903
  addCustomModel: function addCustomModel(name, position, url) {
85868
- var _this32 = this;
85904
+ var _this31 = this;
85869
85905
  var scale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
85870
85906
  var immediately = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
85871
85907
  var callback = arguments.length > 5 ? arguments[5] : undefined;
@@ -85883,9 +85919,9 @@ var isDebug = false || false === true;
85883
85919
  locationModel.userData.cull = false;
85884
85920
  locationModel.name = name;
85885
85921
  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));
85922
+ locationModel.position.copy(new _this31.THREE.Vector3(position.x, position.y, position.z));
85887
85923
  if (gltf.animations.length > 0) {
85888
- var actionMixer = new _this32.THREE.AnimationMixer(gltf.scene);
85924
+ var actionMixer = new _this31.THREE.AnimationMixer(gltf.scene);
85889
85925
  var walkActive = actionMixer.clipAction(gltf.animations[0]);
85890
85926
  walkActive.play();
85891
85927
  modelActive.push(walkActive);
@@ -85896,7 +85932,7 @@ var isDebug = false || false === true;
85896
85932
  },
85897
85933
  // 删除添加的自定义模型
85898
85934
  removeCustomModel: function removeCustomModel(name) {
85899
- var _this33 = this;
85935
+ var _this32 = this;
85900
85936
  var obj = this.getObjectByName(name);
85901
85937
  obj.forEach(function (item, index) {
85902
85938
  if (item.animations > 0) {
@@ -85905,7 +85941,7 @@ var isDebug = false || false === true;
85905
85941
  modelActions[index].uncacheRoot(modelActive[index]);
85906
85942
  }
85907
85943
  item.traverse(function (child) {
85908
- if (child instanceof _this33.THREE.Mesh) {
85944
+ if (child instanceof _this32.THREE.Mesh) {
85909
85945
  child.geometry.dispose();
85910
85946
  child.material.dispose();
85911
85947
  }
@@ -86315,18 +86351,18 @@ var isDebug = false || false === true;
86315
86351
  * 加载下一批数据
86316
86352
  */
86317
86353
  loadNextBatch: function loadNextBatch() {
86318
- var _this34 = this;
86354
+ var _this33 = this;
86319
86355
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee11() {
86320
86356
  var loadingState, batch, _t2;
86321
86357
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context11) {
86322
86358
  while (1) switch (_context11.p = _context11.n) {
86323
86359
  case 0:
86324
- loadingState = _this34.noObserver ? _this34.noObserver.batchLoadingState : _this34.batchLoadingState;
86360
+ loadingState = _this33.noObserver ? _this33.noObserver.batchLoadingState : _this33.batchLoadingState;
86325
86361
  if (!(!loadingState.isLoading || loadingState.currentBatch >= loadingState.pendingData.length)) {
86326
86362
  _context11.n = 1;
86327
86363
  break;
86328
86364
  }
86329
- _this34.completeBatchLoading();
86365
+ _this33.completeBatchLoading();
86330
86366
  return _context11.a(2);
86331
86367
  case 1:
86332
86368
  if (!loadingState.isPaused) {
@@ -86335,7 +86371,7 @@ var isDebug = false || false === true;
86335
86371
  }
86336
86372
  // 如果暂停,延迟一段时间后再次检查
86337
86373
  loadingState.animationFrameId = requestAnimationFrame(function () {
86338
- _this34.loadNextBatch();
86374
+ _this33.loadNextBatch();
86339
86375
  });
86340
86376
  return _context11.a(2);
86341
86377
  case 2:
@@ -86345,7 +86381,7 @@ var isDebug = false || false === true;
86345
86381
  }
86346
86382
  // 如果正在交互,延迟一段时间后再次检查
86347
86383
  loadingState.animationFrameId = requestAnimationFrame(function () {
86348
- _this34.loadNextBatch();
86384
+ _this33.loadNextBatch();
86349
86385
  });
86350
86386
  return _context11.a(2);
86351
86387
  case 3:
@@ -86353,15 +86389,15 @@ var isDebug = false || false === true;
86353
86389
  _context11.p = 4;
86354
86390
  console.log('加载批次:', loadingState.currentBatch);
86355
86391
  _context11.n = 5;
86356
- return _this34.processWithMainThread(batch);
86392
+ return _this33.processWithMainThread(batch);
86357
86393
  case 5:
86358
86394
  // 更新进度
86359
86395
  loadingState.loadedCount += batch.instances.length;
86360
86396
  loadingState.currentBatch++;
86361
86397
 
86362
86398
  // 同步到响应式状态
86363
- _this34.batchLoadingState.loadedCount = loadingState.loadedCount;
86364
- _this34.batchLoadingState.currentBatch = loadingState.currentBatch;
86399
+ _this33.batchLoadingState.loadedCount = loadingState.loadedCount;
86400
+ _this33.batchLoadingState.currentBatch = loadingState.currentBatch;
86365
86401
 
86366
86402
  // 调用进度回调
86367
86403
  if (loadingState.onProgress) {
@@ -86375,7 +86411,7 @@ var isDebug = false || false === true;
86375
86411
 
86376
86412
  // 使用 requestAnimationFrame 在下一帧继续加载
86377
86413
  loadingState.animationFrameId = requestAnimationFrame(function () {
86378
- _this34.loadNextBatch();
86414
+ _this33.loadNextBatch();
86379
86415
  });
86380
86416
  _context11.n = 7;
86381
86417
  break;
@@ -86386,7 +86422,7 @@ var isDebug = false || false === true;
86386
86422
 
86387
86423
  // 继续下一批次
86388
86424
  loadingState.animationFrameId = requestAnimationFrame(function () {
86389
- _this34.loadNextBatch();
86425
+ _this33.loadNextBatch();
86390
86426
  });
86391
86427
  case 7:
86392
86428
  return _context11.a(2);
@@ -86398,13 +86434,13 @@ var isDebug = false || false === true;
86398
86434
  * 使用主线程处理批次数据
86399
86435
  */
86400
86436
  processWithMainThread: function processWithMainThread(batch) {
86401
- var _this35 = this;
86437
+ var _this34 = this;
86402
86438
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee12() {
86403
86439
  var loadingState;
86404
86440
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context12) {
86405
86441
  while (1) switch (_context12.n) {
86406
86442
  case 0:
86407
- loadingState = _this35.noObserver ? _this35.noObserver.batchLoadingState : _this35.batchLoadingState;
86443
+ loadingState = _this34.noObserver ? _this34.noObserver.batchLoadingState : _this34.batchLoadingState;
86408
86444
  loadingState.options.batchSize = loadingState.batchSize;
86409
86445
  loadingState.options.resetState = loadingState.currentBatch === 0;
86410
86446
  // 使用原始的handleInstancedMeshModel方法
@@ -86425,7 +86461,7 @@ var isDebug = false || false === true;
86425
86461
  * 完成批量加载
86426
86462
  */
86427
86463
  completeBatchLoading: function completeBatchLoading() {
86428
- var _this36 = this;
86464
+ var _this35 = this;
86429
86465
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
86430
86466
  if (!loadingState.isLoading) return;
86431
86467
 
@@ -86454,17 +86490,17 @@ var isDebug = false || false === true;
86454
86490
  modelGroup.traverse(function (child) {
86455
86491
  if (child.isMesh && !child.userData.batchInitDone) {
86456
86492
  markRendered(child);
86457
- var json = _this36.getMeshCenterAndVolume(child);
86458
- var meshBox3 = new _this36.THREE.Box3();
86493
+ var json = _this35.getMeshCenterAndVolume(child);
86494
+ var meshBox3 = new _this35.THREE.Box3();
86459
86495
  meshBox3.setFromObject(child);
86460
- var worldPs = new _this36.THREE.Vector3().addVectors(meshBox3.max, meshBox3.min).multiplyScalar(0.5);
86496
+ var worldPs = new _this35.THREE.Vector3().addVectors(meshBox3.max, meshBox3.min).multiplyScalar(0.5);
86461
86497
  if (isNaN(worldPs.x)) return;
86462
- child.worldDir = new _this36.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
86498
+ child.worldDir = new _this35.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
86463
86499
  child.userData.center = json.center;
86464
86500
  child.userData.worldPs = worldPs;
86465
- child.userData.oldPs = child.getWorldPosition(new _this36.THREE.Vector3());
86501
+ child.userData.oldPs = child.getWorldPosition(new _this35.THREE.Vector3());
86466
86502
  child.userData.box = json.box;
86467
- child.userData.position = new _this36.THREE.Vector3().copy(child.position);
86503
+ child.userData.position = new _this35.THREE.Vector3().copy(child.position);
86468
86504
  child.userData.translate = {
86469
86505
  x: 0,
86470
86506
  y: 0,
@@ -86498,9 +86534,10 @@ var isDebug = false || false === true;
86498
86534
  totalLoaded: loadingState.loadedCount,
86499
86535
  totalBatches: loadingState.totalBatches
86500
86536
  });
86501
-
86502
- // var axesHelper = new this.THREE.AxesHelper(10000);
86503
- // scene.add(axesHelper);
86537
+ if (isDebug) {
86538
+ var axesHelper = new this.THREE.AxesHelper(10000);
86539
+ com_graphicsvue_type_script_lang_js_scene.add(axesHelper);
86540
+ }
86504
86541
  // this.showSceneBoundingBox();
86505
86542
  }
86506
86543
 
@@ -86548,7 +86585,7 @@ var isDebug = false || false === true;
86548
86585
  * @param {Object} options - 配置项 { immediate: boolean }
86549
86586
  */
86550
86587
  setSystemInterruption: function setSystemInterruption(active) {
86551
- var _this37 = this;
86588
+ var _this36 = this;
86552
86589
  var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'user_interaction';
86553
86590
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
86554
86591
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
@@ -86629,11 +86666,11 @@ var isDebug = false || false === true;
86629
86666
 
86630
86667
  // 恢复本地批量加载 (如果未完成)
86631
86668
  if (loadingState.isLoading && loadingState.currentBatch < loadingState.totalBatches) {
86632
- _this37.loadNextBatch();
86669
+ _this36.loadNextBatch();
86633
86670
  }
86634
86671
 
86635
86672
  // 恢复 StreamLoader
86636
- var streamLoader = _this37.noObserver.streamLoader;
86673
+ var streamLoader = _this36.noObserver.streamLoader;
86637
86674
  if (streamLoader && typeof streamLoader.handleControlEnd === 'function') {
86638
86675
  // StreamLoader 内部通常有防抖或延迟,这里直接通知结束即可
86639
86676
  streamLoader.handleControlEnd();
@@ -86686,7 +86723,7 @@ var isDebug = false || false === true;
86686
86723
  * 滚轮交互结束的定时检测
86687
86724
  */
86688
86725
  scheduleWheelInteractionEnd: function scheduleWheelInteractionEnd(event) {
86689
- var _this38 = this;
86726
+ var _this37 = this;
86690
86727
  var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
86691
86728
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
86692
86729
  if (loadingState.interactionState.wheelTimeout) {
@@ -86694,8 +86731,8 @@ var isDebug = false || false === true;
86694
86731
  loadingState.interactionState.wheelTimeout = null;
86695
86732
  }
86696
86733
  loadingState.interactionState.wheelTimeout = setTimeout(function () {
86697
- _this38.$emit('wheelEnd', event);
86698
- _this38.endInteraction('wheel', event, {
86734
+ _this37.$emit('wheelEnd', event);
86735
+ _this37.endInteraction('wheel', event, {
86699
86736
  immediateResume: false
86700
86737
  });
86701
86738
  loadingState.interactionState.wheelTimeout = null;
@@ -86748,11 +86785,11 @@ var isDebug = false || false === true;
86748
86785
  });
86749
86786
  // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=script&lang=js
86750
86787
  /* 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");
86788
+ // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=03e2a393&prod&lang=scss&scoped=true
86789
+ var com_graphicsvue_type_style_index_0_id_03e2a393_prod_lang_scss_scoped_true = __webpack_require__("8dab");
86753
86790
 
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");
86791
+ // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=03e2a393&prod&lang=css
86792
+ var com_graphicsvue_type_style_index_1_id_03e2a393_prod_lang_css = __webpack_require__("f36e");
86756
86793
 
86757
86794
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
86758
86795
  /* globals __VUE_SSR_CONTEXT__ */
@@ -86864,17 +86901,17 @@ function normalizeComponent(
86864
86901
 
86865
86902
  var component = normalizeComponent(
86866
86903
  components_com_graphicsvue_type_script_lang_js,
86867
- com_graphicsvue_type_template_id_fdf6eb9e_scoped_true_render,
86904
+ com_graphicsvue_type_template_id_03e2a393_scoped_true_render,
86868
86905
  staticRenderFns,
86869
86906
  false,
86870
86907
  null,
86871
- "fdf6eb9e",
86908
+ "03e2a393",
86872
86909
  null
86873
86910
 
86874
86911
  )
86875
86912
 
86876
86913
  /* 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
86914
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"c784c1fe-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
86915
  var com_flcanvasvue_type_template_id_459d4d3b_scoped_true_render = function render() {
86879
86916
  var _vm = this,
86880
86917
  _c = _vm._self._c;
@@ -90651,7 +90688,7 @@ var com_flcanvas_component = normalizeComponent(
90651
90688
  )
90652
90689
 
90653
90690
  /* 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
90691
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"c784c1fe-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
90692
  var per_controlvue_type_template_id_f547d5c6_scoped_true_render = function render() {
90656
90693
  var _vm = this,
90657
90694
  _c = _vm._self._c;
@@ -90759,7 +90796,7 @@ var per_control_component = normalizeComponent(
90759
90796
  )
90760
90797
 
90761
90798
  /* 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
90799
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"c784c1fe-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
90800
  var pidvue_type_template_id_6e1600cc_scoped_true_render = function render() {
90764
90801
  var _vm = this,
90765
90802
  _c = _vm._self._c;
@@ -90806,7 +90843,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
90806
90843
  var html2canvas = __webpack_require__("c0e9");
90807
90844
  var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
90808
90845
 
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
90846
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"c784c1fe-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
90847
  var ann_toolvue_type_template_id_5f081c10_scoped_true_render = function render() {
90811
90848
  var _vm = this,
90812
90849
  _c = _vm._self._c;
@@ -91777,7 +91814,7 @@ var pid_component = normalizeComponent(
91777
91814
  )
91778
91815
 
91779
91816
  /* 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
91817
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"c784c1fe-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
91818
  var com_tilesvue_type_template_id_5504c19e_scoped_true_render = function render() {
91782
91819
  var _vm = this,
91783
91820
  _c = _vm._self._c;