fl-web-component 2.0.0-beta.3 → 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.
@@ -11902,6 +11902,13 @@ Factory_1.Factory.addGetterSetter(Ellipse, 'radiusY', 0, (0, Validators_1.getNum
11902
11902
 
11903
11903
  /***/ }),
11904
11904
 
11905
+ /***/ "3f2b":
11906
+ /***/ (function(module, exports, __webpack_require__) {
11907
+
11908
+ // extracted by mini-css-extract-plugin
11909
+
11910
+ /***/ }),
11911
+
11905
11912
  /***/ "405a":
11906
11913
  /***/ (function(module, exports, __webpack_require__) {
11907
11914
 
@@ -30893,6 +30900,17 @@ Factory_1.Factory.addGetterSetter(Path, 'data');
30893
30900
  /* unused harmony reexport * */
30894
30901
 
30895
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
+
30896
30914
  /***/ }),
30897
30915
 
30898
30916
  /***/ "8e84":
@@ -30950,7 +30968,7 @@ Factory_1.Factory.addGetterSetter(Node_1.Node, 'blue', 0, Validators_1.RGBCompon
30950
30968
  /***/ "9224":
30951
30969
  /***/ (function(module) {
30952
30970
 
30953
- module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.0-beta.3\",\"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\"]}");
30954
30972
 
30955
30973
  /***/ }),
30956
30974
 
@@ -31231,14 +31249,10 @@ Factory_1.Factory.backCompat(Wedge, {
31231
31249
 
31232
31250
  /***/ }),
31233
31251
 
31234
- /***/ "99bc":
31235
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
31236
-
31237
- "use strict";
31238
- /* 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_623ffb3e_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c603");
31239
- /* 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_623ffb3e_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_623ffb3e_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
31240
- /* unused harmony reexport * */
31252
+ /***/ "972d":
31253
+ /***/ (function(module, exports, __webpack_require__) {
31241
31254
 
31255
+ // extracted by mini-css-extract-plugin
31242
31256
 
31243
31257
  /***/ }),
31244
31258
 
@@ -40679,13 +40693,6 @@ module.exports = _nonIterableRest, module.exports.__esModule = true, module.expo
40679
40693
 
40680
40694
  /***/ }),
40681
40695
 
40682
- /***/ "c464":
40683
- /***/ (function(module, exports, __webpack_require__) {
40684
-
40685
- // extracted by mini-css-extract-plugin
40686
-
40687
- /***/ }),
40688
-
40689
40696
  /***/ "c527":
40690
40697
  /***/ (function(module, exports, __webpack_require__) {
40691
40698
 
@@ -41363,13 +41370,6 @@ exports.HitContext = HitContext;
41363
41370
 
41364
41371
  /***/ }),
41365
41372
 
41366
- /***/ "c603":
41367
- /***/ (function(module, exports, __webpack_require__) {
41368
-
41369
- // extracted by mini-css-extract-plugin
41370
-
41371
- /***/ }),
41372
-
41373
41373
  /***/ "c742":
41374
41374
  /***/ (function(module, exports, __webpack_require__) {
41375
41375
 
@@ -43331,17 +43331,6 @@ Factory_1.Factory.addGetterSetter(Node_1.Node, 'embossWhiteLevel', 0.5, (0, Vali
43331
43331
  Factory_1.Factory.addGetterSetter(Node_1.Node, 'embossDirection', 'top-left', undefined, Factory_1.Factory.afterSetFilter);
43332
43332
  Factory_1.Factory.addGetterSetter(Node_1.Node, 'embossBlend', false, undefined, Factory_1.Factory.afterSetFilter);
43333
43333
 
43334
- /***/ }),
43335
-
43336
- /***/ "e736":
43337
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
43338
-
43339
- "use strict";
43340
- /* 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_623ffb3e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c464");
43341
- /* 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_623ffb3e_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_623ffb3e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
43342
- /* unused harmony reexport * */
43343
-
43344
-
43345
43334
  /***/ }),
43346
43335
 
43347
43336
  /***/ "ea61":
@@ -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":"73e47ca8-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=623ffb3e&scoped=true
45831
- var com_graphicsvue_type_template_id_623ffb3e_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_623ffb3e_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=623ffb3e&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,18 +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
83401
+ _this6.$emit('updateBoundingBox');
83392
83402
 
83393
83403
  // const tPreview0 = performance.now();
83394
- if (_this7.occlusionState.previewEnabled) {
83404
+ if (_this6.occlusionState.previewEnabled) {
83395
83405
  if (!state._previewCanvas) {
83396
83406
  cvs = document.createElement('canvas');
83397
83407
  cvs.style.position = 'fixed';
@@ -83442,12 +83452,12 @@ var isDebug = false || false === true;
83442
83452
  totalPixels = sw * sh;
83443
83453
  targetSamples = totalPixels;
83444
83454
  baseStride = Math.max(1, Math.floor(Math.sqrt(totalPixels / Math.max(1, targetSamples))));
83445
- extraStride = _this7.occlusionState && _this7.occlusionState.sampleStride ? _this7.occlusionState.sampleStride : 1;
83455
+ extraStride = _this6.occlusionState && _this6.occlusionState.sampleStride ? _this6.occlusionState.sampleStride : 1;
83446
83456
  stride = Math.max(1, baseStride * Math.max(1, extraStride));
83447
- minSampleCount = _this7.occlusionState && _this7.occlusionState.minSampleCount ? _this7.occlusionState.minSampleCount : 1;
83448
- _context6.n = 4;
83449
- return _this7.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, maxIdx, minSampleCount);
83450
- 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:
83451
83461
  scanResult = _context6.v;
83452
83462
  if (scanResult && scanResult.buffer) {
83453
83463
  state._colorBuffer = new Uint8Array(scanResult.buffer);
@@ -83461,17 +83471,17 @@ var isDebug = false || false === true;
83461
83471
  }
83462
83472
  transparentMaxIdx = typeof state._occTransparentMaxIdx === 'number' ? state._occTransparentMaxIdx : 0;
83463
83473
  if (!(transparentMaxIdx > 0 && transparentMesh && transparentMesh.visible)) {
83464
- _context6.n = 6;
83474
+ _context6.n = 12;
83465
83475
  break;
83466
83476
  }
83467
- 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);
83468
83478
  com_graphicsvue_type_script_lang_js_renderer.clear(true, false, false);
83469
83479
  com_graphicsvue_type_script_lang_js_renderer.render(state._occTransparentScene, com_graphicsvue_type_script_lang_js_camera);
83470
83480
  com_graphicsvue_type_script_lang_js_renderer.readRenderTargetPixels(rt, 0, 0, sw, sh, state._colorBuffer);
83471
83481
  tIdIndexArr = transparentIdIndexArr;
83472
- _context6.n = 5;
83473
- return _this7.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, transparentMaxIdx, minSampleCount);
83474
- case 5:
83482
+ _context6.n = 11;
83483
+ return _this6.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, transparentMaxIdx, minSampleCount);
83484
+ case 11:
83475
83485
  tScanResult = _context6.v;
83476
83486
  if (tScanResult && tScanResult.buffer) {
83477
83487
  state._colorBuffer = new Uint8Array(tScanResult.buffer);
@@ -83483,26 +83493,26 @@ var isDebug = false || false === true;
83483
83493
  visibleIdSet.add(_id);
83484
83494
  }
83485
83495
  }
83486
- case 6:
83496
+ case 12:
83487
83497
  com_graphicsvue_type_script_lang_js_renderer.setRenderTarget(prevTarget);
83488
83498
  com_graphicsvue_type_script_lang_js_renderer.setClearColor(prevClearColorHex, prevClearAlpha);
83489
83499
  com_graphicsvue_type_script_lang_js_renderer.toneMapping = prevToneMapping;
83490
- _context6.n = 8;
83500
+ _context6.n = 14;
83491
83501
  break;
83492
- case 7:
83493
- _context6.p = 7;
83502
+ case 13:
83503
+ _context6.p = 13;
83494
83504
  _t = _context6.v;
83495
83505
  for (_i1 = 0; _i1 < candidates.length; _i1++) {
83496
83506
  visibleIdSet.add(candidates[_i1].modelId);
83497
83507
  }
83498
- case 8:
83499
- _context6.n = 10;
83508
+ case 14:
83509
+ _context6.n = 16;
83500
83510
  break;
83501
- case 9:
83511
+ case 15:
83502
83512
  for (_i10 = 0; _i10 < candidates.length; _i10++) {
83503
83513
  visibleIdSet.add(candidates[_i10].modelId);
83504
83514
  }
83505
- case 10:
83515
+ case 16:
83506
83516
  visibleIds.length = 0;
83507
83517
  visibleIdSet.forEach(function (id) {
83508
83518
  return visibleIds.push(id);
@@ -83523,7 +83533,7 @@ var isDebug = false || false === true;
83523
83533
  var _modelId = _modelIds2[_i11];
83524
83534
  // 检查已取消勾选模型进行卸载
83525
83535
  var documentId = _modelId.split(':')[1];
83526
- if (!_this7.noObserver.documentModelIds.get(documentId)) {
83536
+ if (!_this6.noObserver.documentModelIds.get(documentId)) {
83527
83537
  toUnload.push({
83528
83538
  modelId: _modelId,
83529
83539
  child: child
@@ -83533,7 +83543,7 @@ var isDebug = false || false === true;
83533
83543
  if (bypassList && bypassList.size > 0 && bypassList.has(_modelId)) return;
83534
83544
  var instanceInfo = instancesMap.get(_modelId);
83535
83545
  var instanceIndex = instanceInfo && typeof instanceInfo.instanceIndex === 'number' ? instanceInfo.instanceIndex : null;
83536
- var _inFrustum = _this7.isModelInFrustum(child, instanceIndex, globalFrustum);
83546
+ var _inFrustum = _this6.isModelInFrustum(child, instanceIndex, globalFrustum);
83537
83547
  var _modelInVisible = toLoadSet.has(_modelId);
83538
83548
  // console.log('modelId', modelId, 'inFrustum', inFrustum, 'modelInVisible', modelInVisible)
83539
83549
 
@@ -83567,7 +83577,7 @@ var isDebug = false || false === true;
83567
83577
  }
83568
83578
  var modelId = child.parent && child.parent.userData && child.parent.userData.instanceId ? child.parent.userData.instanceId : child.uuid;
83569
83579
  if (bypassList && bypassList.size > 0 && bypassList.has(modelId)) return;
83570
- var inFrustum = _this7.isModelInFrustum(child, null, globalFrustum);
83580
+ var inFrustum = _this6.isModelInFrustum(child, null, globalFrustum);
83571
83581
  var modelInVisible = toLoadSet.has(modelId);
83572
83582
  if (modelInVisible) {
83573
83583
  toLoadSet.delete(modelId);
@@ -83582,7 +83592,7 @@ var isDebug = false || false === true;
83582
83592
  for (_i13 = 0, _toUnload = toUnload; _i13 < _toUnload.length; _i13++) {
83583
83593
  _toUnload$_i = _toUnload[_i13], modelId = _toUnload$_i.modelId, child = _toUnload$_i.child;
83584
83594
  if (child && child.parent) parentsToCheck.add(child.parent);
83585
- _this7.unloadInstancedModel(modelId, child);
83595
+ _this6.unloadInstancedModel(modelId, child);
83586
83596
  }
83587
83597
  if (com_graphicsvue_type_script_lang_js_scene) {
83588
83598
  parentsToCheck.forEach(function (group) {
@@ -83591,11 +83601,11 @@ var isDebug = false || false === true;
83591
83601
  }
83592
83602
  });
83593
83603
  }
83594
- _this7.modelStateManager.isloadedModelsIds = Object.freeze(Array.from(toLoadSet));
83595
- case 11:
83604
+ _this6.modelStateManager.isloadedModelsIds = Object.freeze(Array.from(toLoadSet));
83605
+ case 17:
83596
83606
  return _context6.a(2);
83597
83607
  }
83598
- }, _callee6, null, [[3, 7]]);
83608
+ }, _callee6, null, [[9, 13]]);
83599
83609
  }))();
83600
83610
  },
83601
83611
  isBoxInFrustum: function isBoxInFrustum(box) {
@@ -83681,18 +83691,24 @@ var isDebug = false || false === true;
83681
83691
  // 移除重新加载逻辑实现
83682
83692
  return;
83683
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
+ },
83684
83702
  /**
83685
83703
  * 初始化流式加载器
83686
83704
  * @param {Object} modelApi - 模型API接口
83687
83705
  * @param {Object} config - 其他配置
83688
83706
  */
83689
83707
  initStreamLoader: function initStreamLoader(modelApi) {
83690
- var _this8 = this;
83708
+ var _this7 = this;
83691
83709
  var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
83692
83710
  var _ref0 = config || {},
83693
83711
  projectId = _ref0.projectId,
83694
- pbsId = _ref0.pbsId,
83695
- version = _ref0.version,
83696
83712
  restConfig = _objectWithoutProperties(_ref0, _excluded);
83697
83713
  var streamLoader = new StreamLoader_StreamLoader(com_graphicsvue_type_script_lang_js_objectSpread({
83698
83714
  modelApi: modelApi,
@@ -83704,7 +83720,7 @@ var isDebug = false || false === true;
83704
83720
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context7) {
83705
83721
  while (1) switch (_context7.n) {
83706
83722
  case 0:
83707
- if (!(userInteracting || _this8.noObserver.batchLoadingState.interactionState.isInteracting)) {
83723
+ if (!(userInteracting || _this7.noObserver.batchLoadingState.interactionState.isInteracting)) {
83708
83724
  _context7.n = 1;
83709
83725
  break;
83710
83726
  }
@@ -83748,6 +83764,18 @@ var isDebug = false || false === true;
83748
83764
  }()
83749
83765
  }, restConfig));
83750
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
+ }
83751
83779
  },
83752
83780
  /**
83753
83781
  * 设置当前流式加载的模型数据
@@ -83755,13 +83783,13 @@ var isDebug = false || false === true;
83755
83783
  * @param {Object} materialData - 材质数据
83756
83784
  */
83757
83785
  setStreamModel: function setStreamModel(item, materialData) {
83758
- var _this9 = this;
83786
+ var _this8 = this;
83759
83787
  if (this.noObserver.streamLoader) {
83760
83788
  this.noObserver.streamLoader.setCurrentModel(item, materialData);
83761
83789
  // 设置完模型后,尝试触发一次范围加载以渲染初始视图
83762
83790
  // 使用 setTimeout 确保在下一帧执行,避免当前栈还在初始化中
83763
83791
  setTimeout(function () {
83764
- _this9.getRangeStream();
83792
+ _this8.getRangeStream();
83765
83793
  }, 0);
83766
83794
  } else {}
83767
83795
  },
@@ -83769,17 +83797,17 @@ var isDebug = false || false === true;
83769
83797
  * 批量加载区域(供外部调用)
83770
83798
  */
83771
83799
  batchLoadRegions: function batchLoadRegions(item, divideData, materialData) {
83772
- var _this0 = this;
83800
+ var _this9 = this;
83773
83801
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee9() {
83774
83802
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context9) {
83775
83803
  while (1) switch (_context9.n) {
83776
83804
  case 0:
83777
- if (!_this0.noObserver.streamLoader) {
83805
+ if (!_this9.noObserver.streamLoader) {
83778
83806
  _context9.n = 1;
83779
83807
  break;
83780
83808
  }
83781
83809
  _context9.n = 1;
83782
- return _this0.noObserver.streamLoader.batchLoadRegions(item, divideData, materialData);
83810
+ return _this9.noObserver.streamLoader.batchLoadRegions(item, divideData, materialData);
83783
83811
  case 1:
83784
83812
  return _context9.a(2);
83785
83813
  }
@@ -83790,7 +83818,7 @@ var isDebug = false || false === true;
83790
83818
  * 获取批量加载详情(供外部调用)
83791
83819
  */
83792
83820
  loadModelByIds: function loadModelByIds(options) {
83793
- var _this1 = this;
83821
+ var _this0 = this;
83794
83822
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee0() {
83795
83823
  var _ref1, ids;
83796
83824
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context0) {
@@ -83798,13 +83826,13 @@ var isDebug = false || false === true;
83798
83826
  case 0:
83799
83827
  // 绕过剔除模型
83800
83828
  _ref1 = options.params || {}, ids = _ref1.ids;
83801
- _this1.addBypassCullingModelIds(ids);
83802
- if (!_this1.noObserver.streamLoader) {
83829
+ _this0.addBypassCullingModelIds(ids);
83830
+ if (!_this0.noObserver.streamLoader) {
83803
83831
  _context0.n = 2;
83804
83832
  break;
83805
83833
  }
83806
83834
  _context0.n = 1;
83807
- return _this1.noObserver.streamLoader.loadModelByIds(options);
83835
+ return _this0.noObserver.streamLoader.loadModelByIds(options);
83808
83836
  case 1:
83809
83837
  return _context0.a(2, _context0.v);
83810
83838
  case 2:
@@ -83817,39 +83845,41 @@ var isDebug = false || false === true;
83817
83845
  * 处理单个模型项加载(供外部调用)
83818
83846
  */
83819
83847
  processModelItem: function processModelItem(item, todoFunc) {
83820
- var _this10 = this;
83848
+ var _this1 = this;
83821
83849
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee1() {
83822
83850
  var res;
83823
83851
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context1) {
83824
83852
  while (1) switch (_context1.n) {
83825
83853
  case 0:
83826
- if (!_this10.noObserver.streamLoader) {
83827
- _context1.n = 2;
83828
- break;
83829
- }
83830
83854
  _context1.n = 1;
83831
- return _this10.noObserver.streamLoader.processModelItem(item, todoFunc);
83855
+ return _this1.noObserver.streamLoader.processModelItem(item, todoFunc);
83832
83856
  case 1:
83833
83857
  res = _context1.v;
83834
83858
  // item.id is the documentId
83835
83859
  if (item && item.id) {
83836
83860
  if (res && res.sceneBox) {
83837
- _this10.setSceneBox(res.sceneBox, item.id, true);
83861
+ _this1.setSceneBox(res.sceneBox, item.id, true);
83838
83862
  }
83839
83863
  if (res && res.boxIndex) {
83840
- _this10.setBoxIndex(res.boxIndex, item.id, true);
83864
+ _this1.setBoxIndex(res.boxIndex, item.id, true);
83841
83865
  }
83842
83866
  // this.setBoxIndex(boxJson.data, item.id, true);
83843
83867
  }
83844
- return _context1.a(2, res);
83868
+ _this1.notifyCameraChange(); // 触发场景更新
83845
83869
  case 2:
83846
- return _context1.a(2, null);
83847
- case 3:
83848
83870
  return _context1.a(2);
83849
83871
  }
83850
83872
  }, _callee1);
83851
83873
  }))();
83852
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
+ },
83853
83883
  removeModelByDocumentId: function removeModelByDocumentId(documentId) {
83854
83884
  this.setSceneBox(null, documentId, false);
83855
83885
  this.setBoxIndex(null, documentId, false);
@@ -84049,7 +84079,7 @@ var isDebug = false || false === true;
84049
84079
  * 统一监听:用户交互(Wheel/Control)、程序化动画、API调用
84050
84080
  */
84051
84081
  initCameraChangeObserver: function initCameraChangeObserver() {
84052
- var _this11 = this;
84082
+ var _this10 = this;
84053
84083
  // 初始化 control 状态标志
84054
84084
  this.noObserver.isControlActive = false;
84055
84085
 
@@ -84059,28 +84089,28 @@ var isDebug = false || false === true;
84059
84089
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context10) {
84060
84090
  while (1) switch (_context10.n) {
84061
84091
  case 0:
84062
- if (_this11.noObserver.isObserverEnabled) {
84092
+ if (_this10.noObserver.isObserverEnabled) {
84063
84093
  _context10.n = 1;
84064
84094
  break;
84065
84095
  }
84066
84096
  return _context10.a(2);
84067
84097
  case 1:
84068
- if (!(source === 'rest' && _this11.noObserver.isControlActive)) {
84098
+ if (!(source === 'rest' && _this10.noObserver.isControlActive)) {
84069
84099
  _context10.n = 2;
84070
84100
  break;
84071
84101
  }
84072
84102
  return _context10.a(2);
84073
84103
  case 2:
84074
- if (!_this11.modelStateManager.frustumCheckEnabled) {
84104
+ if (!_this10.modelStateManager.frustumCheckEnabled) {
84075
84105
  _context10.n = 3;
84076
84106
  break;
84077
84107
  }
84078
84108
  _context10.n = 3;
84079
- return _this11.performFrustumCulling();
84109
+ return _this10.performFrustumCulling();
84080
84110
  case 3:
84081
84111
  // 执行流式加载请求
84082
- if (_this11.modelStateManager.isloadedModelsIds && _this11.modelStateManager.isloadedModelsIds.length > 0) {
84083
- _this11.getRangeStream(false);
84112
+ if (_this10.modelStateManager.isloadedModelsIds && _this10.modelStateManager.isloadedModelsIds.length > 0) {
84113
+ _this10.getRangeStream(false);
84084
84114
  }
84085
84115
  case 4:
84086
84116
  return _context10.a(2);
@@ -84105,18 +84135,18 @@ var isDebug = false || false === true;
84105
84135
  // 2. 公开API:允许外部或业务逻辑手动触发更新
84106
84136
  this.notifyCameraChange = function () {
84107
84137
  var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'api';
84108
- _this11._cameraChangeObserver(source);
84138
+ _this10._cameraChangeObserver(source);
84109
84139
  };
84110
84140
 
84111
84141
  // 3. 监听器 - Wheel (用户滚轮)
84112
84142
  this._wheelHandler = function (res) {
84113
- _this11.$emit('wheelStart', res);
84143
+ _this10.$emit('wheelStart', res);
84114
84144
 
84115
84145
  // 统一交互开始处理
84116
- _this11.beginInteraction('wheel');
84146
+ _this10.beginInteraction('wheel');
84117
84147
 
84118
84148
  // 设置滚轮交互的结束检测
84119
- _this11.scheduleWheelInteractionEnd(res, 100);
84149
+ _this10.scheduleWheelInteractionEnd(res, 100);
84120
84150
 
84121
84151
  // 滚轮逻辑:infinityDolly 与 maxDollyDistance 控制
84122
84152
  var event = res;
@@ -84148,17 +84178,17 @@ var isDebug = false || false === true;
84148
84178
  }
84149
84179
 
84150
84180
  // 触发观察者
84151
- _this11._cameraChangeObserver('wheel');
84181
+ _this10._cameraChangeObserver('wheel');
84152
84182
  };
84153
84183
  com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('wheel', this._wheelHandler);
84154
84184
 
84155
84185
  // 4. 监听器 - Controls (用户拖拽/操作)
84156
84186
  this._onControlStart = function (res) {
84157
- _this11.noObserver.isControlActive = true;
84187
+ _this10.noObserver.isControlActive = true;
84158
84188
 
84159
84189
  // 统一交互开始处理(相机)
84160
- _this11.beginInteraction('camera');
84161
- _this11.$emit('controlStart', res);
84190
+ _this10.beginInteraction('camera');
84191
+ _this10.$emit('controlStart', res);
84162
84192
 
84163
84193
  // 记录鼠标按下时的位置
84164
84194
  var event = res.originalEvent || window.event;
@@ -84169,11 +84199,11 @@ var isDebug = false || false === true;
84169
84199
  }
84170
84200
  };
84171
84201
  this._onControlEnd = function (res) {
84172
- _this11.noObserver.isControlActive = false;
84173
- _this11.$emit('controlEnd', res);
84202
+ _this10.noObserver.isControlActive = false;
84203
+ _this10.$emit('controlEnd', res);
84174
84204
 
84175
84205
  // 统一交互结束处理(相机)
84176
- _this11.endInteraction('camera', res, {
84206
+ _this10.endInteraction('camera', res, {
84177
84207
  immediateResume: false
84178
84208
  });
84179
84209
 
@@ -84202,7 +84232,7 @@ var isDebug = false || false === true;
84202
84232
  // }
84203
84233
 
84204
84234
  // 触发观察者
84205
- _this11._cameraChangeObserver('control');
84235
+ _this10._cameraChangeObserver('control');
84206
84236
  }
84207
84237
  };
84208
84238
  cameraControls.addEventListener('controlstart', this._onControlStart);
@@ -84212,7 +84242,7 @@ var isDebug = false || false === true;
84212
84242
  // 监听 rest 事件,捕获 cameraControls.setLookAt(..., true) 等动画结束(以及阻尼停止)
84213
84243
  // 注意:rest 事件在用户交互完全静止时也会触发,与 controlEnd 有部分重叠,但 Observer 有防抖,影响不大
84214
84244
  this._onRest = function () {
84215
- _this11._cameraChangeObserver('rest');
84245
+ _this10._cameraChangeObserver('rest');
84216
84246
  };
84217
84247
  cameraControls.addEventListener('rest', this._onRest);
84218
84248
  },
@@ -84233,12 +84263,12 @@ var isDebug = false || false === true;
84233
84263
  },
84234
84264
  // 根据模型数据绘制模型实体 业务平台可调用此方法加载模型
84235
84265
  /*
84236
- 参数:data 模型数据
84237
- color: '' 初始化模型的颜色 在业务方 有这个需求
84238
- meshNameConfig: {}
84239
- */
84266
+ 参数:data 模型数据
84267
+ color: '' 初始化模型的颜色 在业务方 有这个需求
84268
+ meshNameConfig: {}
84269
+ */
84240
84270
  drawModel: function drawModel(data) {
84241
- var _this12 = this;
84271
+ var _this11 = this;
84242
84272
  var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
84243
84273
  var meshNameConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
84244
84274
  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
@@ -84246,13 +84276,13 @@ var isDebug = false || false === true;
84246
84276
  // 使用新的分帧加载方法,提供进度回调
84247
84277
  return this.drawModelWithBatchLoading(data, color, meshNameConfig, options, function (progress) {
84248
84278
  // 触发原有的进度事件
84249
- _this12.$emit('loadProgress', progress);
84279
+ _this11.$emit('loadProgress', progress);
84250
84280
  }, function (complete) {
84251
84281
  var _options$onComplete;
84252
84282
  options === null || options === void 0 || (_options$onComplete = options.onComplete) === null || _options$onComplete === void 0 || _options$onComplete.call(options, complete);
84253
84283
  console.log('加载完成');
84254
84284
  // 触发原有的完成事件
84255
- _this12.$emit('loadComplete');
84285
+ _this11.$emit('loadComplete');
84256
84286
  });
84257
84287
  },
84258
84288
  // 动态设置视角滚轮的距离
@@ -84330,13 +84360,13 @@ var isDebug = false || false === true;
84330
84360
  }
84331
84361
  },
84332
84362
  mouseClick: function mouseClick(event) {
84333
- var _this13 = this;
84363
+ var _this12 = this;
84334
84364
  // 鼠标抬起时重置渲染中断标记
84335
84365
  setTimeout(function () {
84336
84366
  forceSkipRendering = false;
84337
84367
  // interactionFrameCount = 0;
84338
84368
  // 恢复批次加载操作
84339
- _this13.resumeBatchLoading();
84369
+ _this12.resumeBatchLoading();
84340
84370
  }, 50); // 短暂延迟确保交互完成
84341
84371
 
84342
84372
  // 在测量模式下,不进行事件暴露
@@ -84471,7 +84501,7 @@ var isDebug = false || false === true;
84471
84501
  },
84472
84502
  // 带防抖和用户交互检测的智能居中方法
84473
84503
  smartModelCenter: function smartModelCenter(mesh) {
84474
- var _this14 = this;
84504
+ var _this13 = this;
84475
84505
  var debounceDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
84476
84506
  // if (hasExecutedCentering) {
84477
84507
  // return;
@@ -84491,13 +84521,13 @@ var isDebug = false || false === true;
84491
84521
  // 设置新的防抖定时器
84492
84522
  centeringDebounceTimer = setTimeout(function () {
84493
84523
  // 如果已经执行过居中操作,则不再执行
84494
- if (!userInteracting && !hasExecutedCentering && _this14.noObserver.documentModelIds.size > 0) {
84495
- _this14.setModelCenter(mesh, {
84524
+ if (!userInteracting && !hasExecutedCentering && _this13.noObserver.documentModelIds.size > 0) {
84525
+ _this13.setModelCenter(mesh, {
84496
84526
  enableTransition: false
84497
84527
  });
84498
84528
  hasExecutedCentering = true;
84499
84529
  // 触发场景更新
84500
- _this14.notifyCameraChange();
84530
+ _this13.notifyCameraChange();
84501
84531
  }
84502
84532
  }, debounceDelay);
84503
84533
  },
@@ -84520,12 +84550,12 @@ var isDebug = false || false === true;
84520
84550
  * }
84521
84551
  */
84522
84552
  updateProperty: function updateProperty(list) {
84523
- var _this15 = this;
84553
+ var _this14 = this;
84524
84554
  var _loop = function _loop() {
84525
84555
  var ele = list[index];
84526
84556
  var type = ele.type || 'mesh';
84527
84557
  var instanceId = ele.name;
84528
- var targetObj = _this15.getObjectByName(instanceId);
84558
+ var targetObj = _this14.getObjectByName(instanceId);
84529
84559
  var _loop2 = function _loop2(key) {
84530
84560
  switch (key) {
84531
84561
  case 'color':
@@ -84533,11 +84563,11 @@ var isDebug = false || false === true;
84533
84563
  if (children.isMesh) {
84534
84564
  var _children$userData$in = children.userData.instancesMap.get(instanceId),
84535
84565
  instanceIndex = _children$userData$in.instanceIndex;
84536
- children.setColorAt(instanceIndex, new _this15.THREE.Color(ele.attr[key]));
84566
+ children.setColorAt(instanceIndex, new _this14.THREE.Color(ele.attr[key]));
84537
84567
  children.instanceColor.needsUpdate = true;
84538
84568
  if (outlinePass) {
84539
84569
  if (children.isInstancedMesh) {
84540
- var proxy = _this15.ensureOutlineInstanceProxy(children, instanceIndex);
84570
+ var proxy = _this14.ensureOutlineInstanceProxy(children, instanceIndex);
84541
84571
  if (proxy && !outlinePass.selectedObjects.includes(proxy)) {
84542
84572
  outlinePass.selectedObjects.push(proxy);
84543
84573
  }
@@ -84549,11 +84579,17 @@ var isDebug = false || false === true;
84549
84579
  });
84550
84580
  break;
84551
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
+ }
84552
84588
  targetObj.forEach(function (children) {
84553
84589
  var _children$userData$in2 = children.userData.instancesMap.get(instanceId),
84554
84590
  instanceIndex = _children$userData$in2.instanceIndex;
84555
84591
  if (ele.attr[key]) {
84556
- var restoreMatrix = new _this15.THREE.Matrix4().copy(children.userData.copyMatrix);
84592
+ var restoreMatrix = new _this14.THREE.Matrix4().copy(children.userData.copyMatrix);
84557
84593
  children.setMatrixAt(instanceIndex, restoreMatrix);
84558
84594
  // if (outlinePass) {
84559
84595
  // if (children.isInstancedMesh) {
@@ -84566,11 +84602,11 @@ var isDebug = false || false === true;
84566
84602
  // }
84567
84603
  // }
84568
84604
  } else {
84569
- 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);
84570
84606
  children.setMatrixAt(instanceIndex, offsetMatrix);
84571
84607
  if (outlinePass) {
84572
84608
  if (children.isInstancedMesh) {
84573
- _this15.removeOutlineInstanceProxy(children, instanceIndex);
84609
+ _this14.removeOutlineInstanceProxy(children, instanceIndex);
84574
84610
  } else {
84575
84611
  var idx = outlinePass.selectedObjects.indexOf(children);
84576
84612
  if (idx !== -1) outlinePass.selectedObjects.splice(idx, 1);
@@ -84579,6 +84615,7 @@ var isDebug = false || false === true;
84579
84615
  }
84580
84616
  children.instanceMatrix.needsUpdate = true;
84581
84617
  });
84618
+ _this14.notifyCameraChange(); // 触发场景更新
84582
84619
  break;
84583
84620
  case 'opacity':
84584
84621
  targetObj.forEach(function (children) {
@@ -84608,7 +84645,7 @@ var isDebug = false || false === true;
84608
84645
  }
84609
84646
  },
84610
84647
  showOutlinePass: function showOutlinePass(instanceId) {
84611
- var _this16 = this;
84648
+ var _this15 = this;
84612
84649
  var targetObj = this.getObjectByName(instanceId);
84613
84650
  targetObj.forEach(function (children) {
84614
84651
  if (children.isMesh) {
@@ -84616,7 +84653,7 @@ var isDebug = false || false === true;
84616
84653
  instanceIndex = _children$userData$in4.instanceIndex;
84617
84654
  if (outlinePass) {
84618
84655
  if (children.isInstancedMesh) {
84619
- var proxy = _this16.ensureOutlineInstanceProxy(children, instanceIndex);
84656
+ var proxy = _this15.ensureOutlineInstanceProxy(children, instanceIndex);
84620
84657
  if (proxy && !outlinePass.selectedObjects.includes(proxy)) {
84621
84658
  outlinePass.selectedObjects.push(proxy);
84622
84659
  }
@@ -84628,7 +84665,7 @@ var isDebug = false || false === true;
84628
84665
  });
84629
84666
  },
84630
84667
  hideOutlinePass: function hideOutlinePass(instanceId) {
84631
- var _this17 = this;
84668
+ var _this16 = this;
84632
84669
  var targetObj = this.getObjectByName(instanceId);
84633
84670
  targetObj.forEach(function (children) {
84634
84671
  if (children.isMesh) {
@@ -84636,7 +84673,7 @@ var isDebug = false || false === true;
84636
84673
  instanceIndex = _children$userData$in5.instanceIndex;
84637
84674
  if (outlinePass) {
84638
84675
  if (children.isInstancedMesh) {
84639
- _this17.removeOutlineInstanceProxy(children, instanceIndex);
84676
+ _this16.removeOutlineInstanceProxy(children, instanceIndex);
84640
84677
  } else {
84641
84678
  var idx = outlinePass.selectedObjects.indexOf(children);
84642
84679
  if (idx !== -1) outlinePass.selectedObjects.splice(idx, 1);
@@ -84664,17 +84701,17 @@ var isDebug = false || false === true;
84664
84701
  },
84665
84702
  // 修改材质的自定义数据
84666
84703
  updateMaterialUserData: function updateMaterialUserData(list) {
84667
- var _this18 = this;
84704
+ var _this17 = this;
84668
84705
  var _loop3 = function _loop3() {
84669
84706
  var ele = list[index];
84670
84707
  var instanceId = ele.name;
84671
- var targetObj = _this18.getObjectByName(instanceId);
84708
+ var targetObj = _this17.getObjectByName(instanceId);
84672
84709
  var _loop4 = function _loop4(key) {
84673
84710
  switch (key) {
84674
84711
  case 'nColor':
84675
84712
  targetObj.forEach(function (children) {
84676
84713
  if (children.isMesh) {
84677
- children.material.userData[key] = new _this18.THREE.Color(ele.attr[key]);
84714
+ children.material.userData[key] = new _this17.THREE.Color(ele.attr[key]);
84678
84715
  }
84679
84716
  });
84680
84717
  break;
@@ -84690,12 +84727,12 @@ var isDebug = false || false === true;
84690
84727
  },
84691
84728
  // 重置
84692
84729
  resetMaterialUserData: function resetMaterialUserData(list) {
84693
- var _this19 = this;
84730
+ var _this18 = this;
84694
84731
  console.log('resetMaterialUserData');
84695
84732
  var _loop5 = function _loop5() {
84696
84733
  var ele = list[index];
84697
84734
  var instanceId = ele.name;
84698
- var targetObj = _this19.getObjectByName(instanceId);
84735
+ var targetObj = _this18.getObjectByName(instanceId);
84699
84736
  var _loop6 = function _loop6(key) {
84700
84737
  switch (key) {
84701
84738
  case 'nColor':
@@ -84721,11 +84758,11 @@ var isDebug = false || false === true;
84721
84758
  },
84722
84759
  // 清除上一次的属性修改操作 为了方便业务平台参数跟updateProperty方法的参数一样
84723
84760
  resetProperty: function resetProperty(list) {
84724
- var _this20 = this;
84761
+ var _this19 = this;
84725
84762
  var _loop7 = function _loop7() {
84726
84763
  var ele = list[index];
84727
84764
  var instanceId = ele.name;
84728
- var obj = _this20.getObjectByName(instanceId);
84765
+ var obj = _this19.getObjectByName(instanceId);
84729
84766
  if (obj) {
84730
84767
  for (var key in ele.attr) {
84731
84768
  switch (key) {
@@ -84738,7 +84775,7 @@ var isDebug = false || false === true;
84738
84775
  children.instanceColor.needsUpdate = true;
84739
84776
  if (outlinePass) {
84740
84777
  if (children.isInstancedMesh) {
84741
- _this20.removeOutlineInstanceProxy(children, instanceIndex);
84778
+ _this19.removeOutlineInstanceProxy(children, instanceIndex);
84742
84779
  } else {
84743
84780
  var idx = outlinePass.selectedObjects.indexOf(children);
84744
84781
  if (idx !== -1) outlinePass.selectedObjects.splice(idx, 1);
@@ -84752,7 +84789,7 @@ var isDebug = false || false === true;
84752
84789
  var _children$userData$in8 = children.userData.instancesMap.get(instanceId),
84753
84790
  instanceIndex = _children$userData$in8.instanceIndex,
84754
84791
  copyMatrix = _children$userData$in8.copyMatrix;
84755
- var restoreMatrix = new _this20.THREE.Matrix4().copy(copyMatrix);
84792
+ var restoreMatrix = new _this19.THREE.Matrix4().copy(copyMatrix);
84756
84793
  children.setMatrixAt(instanceIndex, restoreMatrix);
84757
84794
  children.instanceMatrix.needsUpdate = true;
84758
84795
  });
@@ -84778,12 +84815,12 @@ var isDebug = false || false === true;
84778
84815
  // 定位到模型
84779
84816
  // name 模型名称 可以是数组
84780
84817
  locateModel: function locateModel(name) {
84781
- var _this21 = this;
84818
+ var _this20 = this;
84782
84819
  if (!com_graphicsvue_type_script_lang_js_scene) return;
84783
84820
  if (Array.isArray(name)) {
84784
84821
  var box3 = new this.THREE.Box3();
84785
84822
  name.forEach(function (n) {
84786
- var arr = _this21.getObjectByName(n);
84823
+ var arr = _this20.getObjectByName(n);
84787
84824
  arr.forEach(function (o) {
84788
84825
  box3.expandByObject(o);
84789
84826
  });
@@ -84811,26 +84848,26 @@ var isDebug = false || false === true;
84811
84848
  },
84812
84849
  // 根据自定义参数修改模型
84813
84850
  /*
84814
- 自定义参数指的是在调用drawModel时配置的meshNameConfig里面的字段来修改某一类模型实体的属性
84815
- {
84816
- customName: '', 自定义字段名称
84817
- customValue: '' 自定义字段的值
84818
- attr: {
84819
- color: '',
84820
- opacity: 0 -1,
84821
- visiable: true/false
84851
+ 自定义参数指的是在调用drawModel时配置的meshNameConfig里面的字段来修改某一类模型实体的属性
84852
+ {
84853
+ customName: '', 自定义字段名称
84854
+ customValue: '' 自定义字段的值
84855
+ attr: {
84856
+ color: '',
84857
+ opacity: 0 -1,
84858
+ visiable: true/false
84859
+ }
84822
84860
  }
84823
- }
84824
- */
84861
+ */
84825
84862
  updatePropertyByCustom: function updatePropertyByCustom(params) {
84826
- var _this22 = this;
84863
+ var _this21 = this;
84827
84864
  if (!com_graphicsvue_type_script_lang_js_scene) return;
84828
84865
  com_graphicsvue_type_script_lang_js_scene.traverse(function (child) {
84829
84866
  if (child.isMesh && child.userData[params.customName] === params.customValue) {
84830
84867
  for (var key in params.attr) {
84831
84868
  switch (key) {
84832
84869
  case 'color':
84833
- 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]));
84834
84871
  child.instanceColor.needsUpdate = true;
84835
84872
  break;
84836
84873
  case 'visible':
@@ -84848,10 +84885,10 @@ var isDebug = false || false === true;
84848
84885
  },
84849
84886
  // 相机定位
84850
84887
  /*
84851
- 定位参数:x: 相机的x位置, y: 相机的y位置, z: 相机的z位置
84852
- heading, pitch, roll
84853
- 视点定位可直接使用此方法
84854
- */
84888
+ 定位参数:x: 相机的x位置, y: 相机的y位置, z: 相机的z位置
84889
+ heading, pitch, roll
84890
+ 视点定位可直接使用此方法
84891
+ */
84855
84892
  cameraLocation: function cameraLocation(params) {
84856
84893
  var _params$enableTransit = params.enableTransition,
84857
84894
  enableTransition = _params$enableTransit === void 0 ? true : _params$enableTransit;
@@ -84860,12 +84897,12 @@ var isDebug = false || false === true;
84860
84897
  },
84861
84898
  // 使用中心点和实体的长宽高进行定位
84862
84899
  /*
84863
- center: {x: 0, y: 0, z: 0},
84864
- box: {x: 0, y: 0, z: 0}
84865
- options: {
84866
- viewAll: true/false
84867
- }
84868
- */
84900
+ center: {x: 0, y: 0, z: 0},
84901
+ box: {x: 0, y: 0, z: 0}
84902
+ options: {
84903
+ viewAll: true/false
84904
+ }
84905
+ */
84869
84906
  locateByCenterBox: function locateByCenterBox(center, size, options) {
84870
84907
  var viewAll = options && options.viewAll || false;
84871
84908
  var maxDim = Math.max(size.x, size.y, size.z);
@@ -84883,13 +84920,13 @@ var isDebug = false || false === true;
84883
84920
  },
84884
84921
  // 添加广告牌
84885
84922
  /*
84886
- 参数:
84887
- {
84888
- billboard: DOM节点
84889
- name: 2d广告牌的名字,用来做清除用的
84890
- x、y、z为广告牌的位置
84891
- }
84892
- */
84923
+ 参数:
84924
+ {
84925
+ billboard: DOM节点
84926
+ name: 2d广告牌的名字,用来做清除用的
84927
+ x、y、z为广告牌的位置
84928
+ }
84929
+ */
84893
84930
  billboard: function billboard(data) {
84894
84931
  if (!com_graphicsvue_type_script_lang_js_scene) return null;
84895
84932
  var divLabel = new CSS2DRenderer_CSS2DObject(data.billboard);
@@ -84900,9 +84937,9 @@ var isDebug = false || false === true;
84900
84937
  },
84901
84938
  // 通过名字获取实体对象, 返回数组
84902
84939
  /*
84903
- name: 实体的名字
84904
- passType: 要过滤的类型,默认是group,不返回group类型的实体
84905
- */
84940
+ name: 实体的名字
84941
+ passType: 要过滤的类型,默认是group,不返回group类型的实体
84942
+ */
84906
84943
  getObjectByName: function getObjectByName(name) {
84907
84944
  var passType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'group';
84908
84945
  if (!com_graphicsvue_type_script_lang_js_scene) return [];
@@ -84926,12 +84963,12 @@ var isDebug = false || false === true;
84926
84963
  return modelState.colorConfig;
84927
84964
  },
84928
84965
  addBypassCullingModelIds: function addBypassCullingModelIds(modelIds) {
84929
- var _this23 = this;
84966
+ var _this22 = this;
84930
84967
  var modelState = this.noObserver ? this.noObserver.modelStateManager : this.modelStateManager;
84931
84968
  if (!modelIds) return;
84932
84969
  if (Array.isArray(modelIds)) {
84933
84970
  modelIds.forEach(function (id) {
84934
- var modelId = _this23.formatModelId(id);
84971
+ var modelId = _this22.formatModelId(id);
84935
84972
  modelState.bypassCullingModelIds.add(modelId);
84936
84973
  });
84937
84974
  } else {
@@ -84944,12 +84981,12 @@ var isDebug = false || false === true;
84944
84981
  return com_graphicsvue_type_script_lang_js_toConsumableArray(modelState.bypassCullingModelIds);
84945
84982
  },
84946
84983
  removeBypassCullingModelIds: function removeBypassCullingModelIds(modelIds) {
84947
- var _this24 = this;
84984
+ var _this23 = this;
84948
84985
  var modelState = this.noObserver ? this.noObserver.modelStateManager : this.modelStateManager;
84949
84986
  if (!modelIds) return;
84950
84987
  if (Array.isArray(modelIds)) {
84951
84988
  modelIds.forEach(function (id) {
84952
- var modelId = _this24.formatModelId(id);
84989
+ var modelId = _this23.formatModelId(id);
84953
84990
  modelState.bypassCullingModelIds.delete(modelId);
84954
84991
  });
84955
84992
  } else {
@@ -84991,11 +85028,11 @@ var isDebug = false || false === true;
84991
85028
  },
84992
85029
  // 删除场景中所有的实体
84993
85030
  removeAll: function removeAll() {
84994
- var _this25 = this;
85031
+ var _this24 = this;
84995
85032
  return new Promise(function (resolve) {
84996
85033
  if (com_graphicsvue_type_script_lang_js_scene) {
84997
- _this25.removeTraverse();
84998
- _this25.removeModelByDocumentId();
85034
+ _this24.removeTraverse();
85035
+ _this24.removeModelByDocumentId();
84999
85036
  resolve();
85000
85037
  } else {
85001
85038
  resolve();
@@ -85148,19 +85185,19 @@ var isDebug = false || false === true;
85148
85185
  },
85149
85186
  // 绘制曲线
85150
85187
  /*
85151
- 参数声明:Object
85152
- {
85153
- path: [{x:0, y: 0, z: 0}], 坐标点信息
85154
- color: '', // 线条的颜色
85155
- name: '', // 线条的名字, 用来清除时使用的
85156
- }
85157
- */
85188
+ 参数声明:Object
85189
+ {
85190
+ path: [{x:0, y: 0, z: 0}], 坐标点信息
85191
+ color: '', // 线条的颜色
85192
+ name: '', // 线条的名字, 用来清除时使用的
85193
+ }
85194
+ */
85158
85195
  drawCurve: function drawCurve(params) {
85159
- var _this26 = this;
85196
+ var _this25 = this;
85160
85197
  this.removeObjectByName(params.name);
85161
85198
  var route = [];
85162
85199
  params.path.forEach(function (element) {
85163
- 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));
85164
85201
  });
85165
85202
  if (route.length > 1) {
85166
85203
  com_graphicsvue_type_script_lang_js_curve = new this.THREE.CatmullRomCurve3(route);
@@ -85177,18 +85214,18 @@ var isDebug = false || false === true;
85177
85214
  },
85178
85215
  // 绘制贴图曲线
85179
85216
  /*
85180
- 参数声明:Object
85181
- {
85182
- path: [{x:0, y: 0, z: 0}], 坐标点信息
85183
- name: '', // 线条的名字, 用来清除时使用的
85184
- }
85185
- */
85217
+ 参数声明:Object
85218
+ {
85219
+ path: [{x:0, y: 0, z: 0}], 坐标点信息
85220
+ name: '', // 线条的名字, 用来清除时使用的
85221
+ }
85222
+ */
85186
85223
  drawTextureCurve: function drawTextureCurve(params) {
85187
- var _this27 = this;
85224
+ var _this26 = this;
85188
85225
  this.removeObjectByName(params.name);
85189
85226
  var route = [];
85190
85227
  params.path.forEach(function (element) {
85191
- 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));
85192
85229
  });
85193
85230
  // 画曲线
85194
85231
  if (route.length > 1) {
@@ -85217,12 +85254,12 @@ var isDebug = false || false === true;
85217
85254
  //
85218
85255
  // 开启漫游
85219
85256
  /*
85220
- 参数为Object
85221
- loop: true / false是否进行循环模型 默认是false
85222
- speed: number 漫游的速度,
85223
- path: [{x: 0, y: 0, z: 0}] 漫游的坐标位置点,
85224
- name: '', 路径的名称,用来清除用的
85225
- */
85257
+ 参数为Object
85258
+ loop: true / false是否进行循环模型 默认是false
85259
+ speed: number 漫游的速度,
85260
+ path: [{x: 0, y: 0, z: 0}] 漫游的坐标位置点,
85261
+ name: '', 路径的名称,用来清除用的
85262
+ */
85226
85263
  startRoam: function startRoam(params) {
85227
85264
  progress = 0;
85228
85265
  roamConfig = {
@@ -85237,8 +85274,8 @@ var isDebug = false || false === true;
85237
85274
  },
85238
85275
  // 更新漫游的配置
85239
85276
  /*
85240
- 参数为Object
85241
- */
85277
+ 参数为Object
85278
+ */
85242
85279
  updateRoamConfig: function updateRoamConfig(params) {
85243
85280
  for (var key in params) {
85244
85281
  roamConfig[key] = params[key];
@@ -85293,24 +85330,24 @@ var isDebug = false || false === true;
85293
85330
  * 参数val: 爆炸的值
85294
85331
  */
85295
85332
  globalBomb: function globalBomb(val) {
85296
- var _this28 = this;
85333
+ var _this27 = this;
85297
85334
  if (com_graphicsvue_type_script_lang_js_scene.children.length === 0) return;
85298
85335
  for (var i = 0; i < com_graphicsvue_type_script_lang_js_scene.children.length; i++) {
85299
85336
  console.log('scene', com_graphicsvue_type_script_lang_js_scene);
85300
85337
  com_graphicsvue_type_script_lang_js_scene.children[i].traverse(function (item) {
85301
85338
  if (!item.isMesh || !item.worldDir) return;
85302
85339
  // 爆炸公式
85303
- _this28.computedBomb(item, val);
85340
+ _this27.computedBomb(item, val);
85304
85341
  });
85305
85342
  }
85306
85343
  // this.timeRender();
85307
85344
  },
85308
85345
  // 单个实体模型炸开
85309
85346
  /*
85310
- 参数:
85311
- name: '',当前选中的实体对象的id
85312
- value: 0 - 100 整数
85313
- */
85347
+ 参数:
85348
+ name: '',当前选中的实体对象的id
85349
+ value: 0 - 100 整数
85350
+ */
85314
85351
  localBomb: function localBomb(name, value) {
85315
85352
  var target = this.getObjectByName(name)[0];
85316
85353
  if (target) {
@@ -85333,9 +85370,9 @@ var isDebug = false || false === true;
85333
85370
  },
85334
85371
  // 设置全局整体剖切
85335
85372
  /*
85336
- 先开启模型全局剖切模式, 会返回剖切值的最大最小值
85337
- 剖切值变换时, 使用
85338
- */
85373
+ 先开启模型全局剖切模式, 会返回剖切值的最大最小值
85374
+ 剖切值变换时, 使用
85375
+ */
85339
85376
  setGlobalClipping: function setGlobalClipping() {
85340
85377
  var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
85341
85378
  var box3 = new this.THREE.Box3().setFromObject(com_graphicsvue_type_script_lang_js_scene.children[0]);
@@ -85373,9 +85410,9 @@ var isDebug = false || false === true;
85373
85410
  },
85374
85411
  // 更新全局剖切的值
85375
85412
  /*
85376
- 参数:Object
85377
- {x: 1, y: 0, z: 0} 可以传一个也可以传多个
85378
- */
85413
+ 参数:Object
85414
+ {x: 1, y: 0, z: 0} 可以传一个也可以传多个
85415
+ */
85379
85416
  updateGlobalCliValue: function updateGlobalCliValue(params) {
85380
85417
  var axis = {
85381
85418
  x: 0,
@@ -85437,9 +85474,9 @@ var isDebug = false || false === true;
85437
85474
  },
85438
85475
  // 更新局部剖切的值
85439
85476
  /*
85440
- 参数:Object
85441
- {x: 1, y: 0, z: 0} 可以传一个也可以传多个
85442
- */
85477
+ 参数:Object
85478
+ {x: 1, y: 0, z: 0} 可以传一个也可以传多个
85479
+ */
85443
85480
  updateLocalCliValue: function updateLocalCliValue(params) {
85444
85481
  var axis = {
85445
85482
  x: 0,
@@ -85518,7 +85555,7 @@ var isDebug = false || false === true;
85518
85555
  },
85519
85556
  // 页面是否锁定
85520
85557
  initPointerLock: function initPointerLock() {
85521
- var _this29 = this;
85558
+ var _this28 = this;
85522
85559
  this.home();
85523
85560
  setTimeout(function () {
85524
85561
  // 开启第一视角时,将相机与水平面保持水平
@@ -85526,25 +85563,25 @@ var isDebug = false || false === true;
85526
85563
  com_graphicsvue_type_script_lang_js_camera.rotation.z = 0;
85527
85564
  pointControls = new PointerLockControls(com_graphicsvue_type_script_lang_js_camera, com_graphicsvue_type_script_lang_js_renderer.domElement);
85528
85565
  pointControls.lock();
85529
- if (!_this29._onFirstPersonChange) {
85530
- _this29._onFirstPersonChange = function () {
85531
- if (typeof _this29._cameraChangeObserver === 'function') {
85532
- _this29._cameraChangeObserver('firstPerson');
85566
+ if (!_this28._onFirstPersonChange) {
85567
+ _this28._onFirstPersonChange = function () {
85568
+ if (typeof _this28._cameraChangeObserver === 'function') {
85569
+ _this28._cameraChangeObserver('firstPerson');
85533
85570
  }
85534
85571
  };
85535
85572
  }
85536
85573
  try {
85537
- pointControls.addEventListener('change', _this29._onFirstPersonChange);
85574
+ pointControls.addEventListener('change', _this28._onFirstPersonChange);
85538
85575
  } catch (e) {}
85539
85576
  // 锁定
85540
85577
  pointControls.addEventListener('lock', function () {
85541
85578
  cameraControls.enabled = false;
85542
- window.addEventListener('keydown', _this29.onKeyDown, false);
85543
- window.addEventListener('keyup', _this29.onKeyUp, false);
85544
- com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mouseup', _this29.mouseClick, false);
85545
- com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mousedown', _this29.mouseDown, false);
85546
- if (typeof _this29._cameraChangeObserver === 'function') {
85547
- _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');
85548
85585
  }
85549
85586
  });
85550
85587
  // 解锁
@@ -85552,24 +85589,24 @@ var isDebug = false || false === true;
85552
85589
  firstPerSign = false;
85553
85590
  cameraControls.enabled = true;
85554
85591
  // 返回初始视角
85555
- _this29.home();
85592
+ _this28.home();
85556
85593
  try {
85557
- if (_this29._onFirstPersonChange && pointControls) {
85558
- pointControls.removeEventListener('change', _this29._onFirstPersonChange);
85594
+ if (_this28._onFirstPersonChange && pointControls) {
85595
+ pointControls.removeEventListener('change', _this28._onFirstPersonChange);
85559
85596
  }
85560
85597
  } catch (e) {}
85561
- if (_this29.noObserver) {
85562
- _this29.noObserver._firstPersonLastPos = null;
85598
+ if (_this28.noObserver) {
85599
+ _this28.noObserver._firstPersonLastPos = null;
85563
85600
  }
85564
85601
  setTimeout(function () {
85565
- window.removeEventListener('keydown', _this29.onKeyDown);
85566
- window.removeEventListener('keyup', _this29.onKeyUp);
85567
- com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mouseup', _this29.mouseClick, false);
85568
- 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);
85569
85606
  // this.timeRender()
85570
85607
  }, 0);
85571
- if (typeof _this29._cameraChangeObserver === 'function') {
85572
- _this29._cameraChangeObserver('firstPersonUnlock');
85608
+ if (typeof _this28._cameraChangeObserver === 'function') {
85609
+ _this28._cameraChangeObserver('firstPersonUnlock');
85573
85610
  }
85574
85611
  });
85575
85612
  if (com_graphicsvue_type_script_lang_js_scene) com_graphicsvue_type_script_lang_js_scene.add(pointControls.object);
@@ -85701,7 +85738,7 @@ var isDebug = false || false === true;
85701
85738
  }
85702
85739
  var center = sceneBoundingBox.getCenter(new this.THREE.Vector3());
85703
85740
  var size = sceneBoundingBox.getSize(new this.THREE.Vector3());
85704
- var maxDim = Math.max(size.x, size.y, size.z) * 0.4;
85741
+ var maxDim = Math.max(size.x, size.y, size.z);
85705
85742
  this.cameraLocation({
85706
85743
  x: center.x,
85707
85744
  y: center.y + maxDim,
@@ -85717,8 +85754,8 @@ var isDebug = false || false === true;
85717
85754
  },
85718
85755
  // 测量
85719
85756
  /*
85720
- 参数: type: '', distance、area、angle, 暂时只提供距离、面积、角度这三种方式
85721
- */
85757
+ 参数: type: '', distance、area、angle, 暂时只提供距离、面积、角度这三种方式
85758
+ */
85722
85759
  openMeasure: function openMeasure(type) {
85723
85760
  if (threeMeasure) {
85724
85761
  threeMeasure.close();
@@ -85769,8 +85806,8 @@ var isDebug = false || false === true;
85769
85806
  },
85770
85807
  // 开启平移
85771
85808
  /*
85772
- 参数: object, 当前选中的对象, distance: {x: 0, y: 0, z: 0}, 平移的距离
85773
- */
85809
+ 参数: object, 当前选中的对象, distance: {x: 0, y: 0, z: 0}, 平移的距离
85810
+ */
85774
85811
  translateMesh: function translateMesh(object, distance) {
85775
85812
  var translateMatrix = new this.THREE.Matrix4().makeTranslation(distance.x, distance.y, distance.z);
85776
85813
  var translateMatrixInvert = new this.THREE.Matrix4().copy(translateMatrix).invert();
@@ -85784,8 +85821,8 @@ var isDebug = false || false === true;
85784
85821
  },
85785
85822
  // 单个模型对象旋转
85786
85823
  /*
85787
- 参数: object, 目标实体, degrees: {x: 0, y: 0, z: 0}, 旋转的数值(0-360)
85788
- */
85824
+ 参数: object, 目标实体, degrees: {x: 0, y: 0, z: 0}, 旋转的数值(0-360)
85825
+ */
85789
85826
  rotateMesh: function rotateMesh(object, degrees) {
85790
85827
  // 在矩阵的计算里 完成撤销操作是向量去乘以一个矩阵的逆矩阵
85791
85828
  // 变化后的向量 = 原始向量 * 变化矩阵
@@ -85812,15 +85849,15 @@ var isDebug = false || false === true;
85812
85849
  },
85813
85850
  // 隔离
85814
85851
  /*
85815
- 参数: object, 目标实体,
85816
- */
85852
+ 参数: object, 目标实体,
85853
+ */
85817
85854
  isolate: function isolate(object) {
85818
- var _this30 = this;
85855
+ var _this29 = this;
85819
85856
  if (!com_graphicsvue_type_script_lang_js_scene) return;
85820
85857
  // 隔离 将目标实体以外的实体隐藏掉
85821
85858
  com_graphicsvue_type_script_lang_js_scene.traverse(function (item) {
85822
85859
  if (item.isMesh && item.name !== object.name) {
85823
- 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);
85824
85861
  item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
85825
85862
  item.instanceMatrix.needsUpdate = true;
85826
85863
  }
@@ -85828,7 +85865,7 @@ var isDebug = false || false === true;
85828
85865
  },
85829
85866
  // 还原操作 将修改过的实体进行恢复
85830
85867
  restore: function restore() {
85831
- var _this31 = this;
85868
+ var _this30 = this;
85832
85869
  if (!com_graphicsvue_type_script_lang_js_scene) return;
85833
85870
  com_graphicsvue_type_script_lang_js_scene.traverse(function (item) {
85834
85871
  if (item.isMesh) {
@@ -85849,14 +85886,14 @@ var isDebug = false || false === true;
85849
85886
  item.userData.translateMatrixInvert = null;
85850
85887
  }
85851
85888
  if (item.userData.combineMatrixInvert) {
85852
- _this31.rotateMesh(item, {
85889
+ _this30.rotateMesh(item, {
85853
85890
  x: 0,
85854
85891
  y: 0,
85855
85892
  z: 0
85856
85893
  });
85857
85894
  item.userData.combineMatrixInvert = null;
85858
85895
  }
85859
- var offsetMatrix = new _this31.THREE.Matrix4().copy(item.userData.copyMatrix);
85896
+ var offsetMatrix = new _this30.THREE.Matrix4().copy(item.userData.copyMatrix);
85860
85897
  item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
85861
85898
  item.instanceMatrix.needsUpdate = true;
85862
85899
  }
@@ -85864,7 +85901,7 @@ var isDebug = false || false === true;
85864
85901
  },
85865
85902
  // 添加自定义模型, 暂时只支持glb、gltf格式
85866
85903
  addCustomModel: function addCustomModel(name, position, url) {
85867
- var _this32 = this;
85904
+ var _this31 = this;
85868
85905
  var scale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
85869
85906
  var immediately = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
85870
85907
  var callback = arguments.length > 5 ? arguments[5] : undefined;
@@ -85882,9 +85919,9 @@ var isDebug = false || false === true;
85882
85919
  locationModel.userData.cull = false;
85883
85920
  locationModel.name = name;
85884
85921
  if (com_graphicsvue_type_script_lang_js_scene) com_graphicsvue_type_script_lang_js_scene.add(locationModel);
85885
- 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));
85886
85923
  if (gltf.animations.length > 0) {
85887
- var actionMixer = new _this32.THREE.AnimationMixer(gltf.scene);
85924
+ var actionMixer = new _this31.THREE.AnimationMixer(gltf.scene);
85888
85925
  var walkActive = actionMixer.clipAction(gltf.animations[0]);
85889
85926
  walkActive.play();
85890
85927
  modelActive.push(walkActive);
@@ -85895,7 +85932,7 @@ var isDebug = false || false === true;
85895
85932
  },
85896
85933
  // 删除添加的自定义模型
85897
85934
  removeCustomModel: function removeCustomModel(name) {
85898
- var _this33 = this;
85935
+ var _this32 = this;
85899
85936
  var obj = this.getObjectByName(name);
85900
85937
  obj.forEach(function (item, index) {
85901
85938
  if (item.animations > 0) {
@@ -85904,7 +85941,7 @@ var isDebug = false || false === true;
85904
85941
  modelActions[index].uncacheRoot(modelActive[index]);
85905
85942
  }
85906
85943
  item.traverse(function (child) {
85907
- if (child instanceof _this33.THREE.Mesh) {
85944
+ if (child instanceof _this32.THREE.Mesh) {
85908
85945
  child.geometry.dispose();
85909
85946
  child.material.dispose();
85910
85947
  }
@@ -86314,18 +86351,18 @@ var isDebug = false || false === true;
86314
86351
  * 加载下一批数据
86315
86352
  */
86316
86353
  loadNextBatch: function loadNextBatch() {
86317
- var _this34 = this;
86354
+ var _this33 = this;
86318
86355
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee11() {
86319
86356
  var loadingState, batch, _t2;
86320
86357
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context11) {
86321
86358
  while (1) switch (_context11.p = _context11.n) {
86322
86359
  case 0:
86323
- loadingState = _this34.noObserver ? _this34.noObserver.batchLoadingState : _this34.batchLoadingState;
86360
+ loadingState = _this33.noObserver ? _this33.noObserver.batchLoadingState : _this33.batchLoadingState;
86324
86361
  if (!(!loadingState.isLoading || loadingState.currentBatch >= loadingState.pendingData.length)) {
86325
86362
  _context11.n = 1;
86326
86363
  break;
86327
86364
  }
86328
- _this34.completeBatchLoading();
86365
+ _this33.completeBatchLoading();
86329
86366
  return _context11.a(2);
86330
86367
  case 1:
86331
86368
  if (!loadingState.isPaused) {
@@ -86334,7 +86371,7 @@ var isDebug = false || false === true;
86334
86371
  }
86335
86372
  // 如果暂停,延迟一段时间后再次检查
86336
86373
  loadingState.animationFrameId = requestAnimationFrame(function () {
86337
- _this34.loadNextBatch();
86374
+ _this33.loadNextBatch();
86338
86375
  });
86339
86376
  return _context11.a(2);
86340
86377
  case 2:
@@ -86344,7 +86381,7 @@ var isDebug = false || false === true;
86344
86381
  }
86345
86382
  // 如果正在交互,延迟一段时间后再次检查
86346
86383
  loadingState.animationFrameId = requestAnimationFrame(function () {
86347
- _this34.loadNextBatch();
86384
+ _this33.loadNextBatch();
86348
86385
  });
86349
86386
  return _context11.a(2);
86350
86387
  case 3:
@@ -86352,15 +86389,15 @@ var isDebug = false || false === true;
86352
86389
  _context11.p = 4;
86353
86390
  console.log('加载批次:', loadingState.currentBatch);
86354
86391
  _context11.n = 5;
86355
- return _this34.processWithMainThread(batch);
86392
+ return _this33.processWithMainThread(batch);
86356
86393
  case 5:
86357
86394
  // 更新进度
86358
86395
  loadingState.loadedCount += batch.instances.length;
86359
86396
  loadingState.currentBatch++;
86360
86397
 
86361
86398
  // 同步到响应式状态
86362
- _this34.batchLoadingState.loadedCount = loadingState.loadedCount;
86363
- _this34.batchLoadingState.currentBatch = loadingState.currentBatch;
86399
+ _this33.batchLoadingState.loadedCount = loadingState.loadedCount;
86400
+ _this33.batchLoadingState.currentBatch = loadingState.currentBatch;
86364
86401
 
86365
86402
  // 调用进度回调
86366
86403
  if (loadingState.onProgress) {
@@ -86374,7 +86411,7 @@ var isDebug = false || false === true;
86374
86411
 
86375
86412
  // 使用 requestAnimationFrame 在下一帧继续加载
86376
86413
  loadingState.animationFrameId = requestAnimationFrame(function () {
86377
- _this34.loadNextBatch();
86414
+ _this33.loadNextBatch();
86378
86415
  });
86379
86416
  _context11.n = 7;
86380
86417
  break;
@@ -86385,7 +86422,7 @@ var isDebug = false || false === true;
86385
86422
 
86386
86423
  // 继续下一批次
86387
86424
  loadingState.animationFrameId = requestAnimationFrame(function () {
86388
- _this34.loadNextBatch();
86425
+ _this33.loadNextBatch();
86389
86426
  });
86390
86427
  case 7:
86391
86428
  return _context11.a(2);
@@ -86397,13 +86434,13 @@ var isDebug = false || false === true;
86397
86434
  * 使用主线程处理批次数据
86398
86435
  */
86399
86436
  processWithMainThread: function processWithMainThread(batch) {
86400
- var _this35 = this;
86437
+ var _this34 = this;
86401
86438
  return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee12() {
86402
86439
  var loadingState;
86403
86440
  return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context12) {
86404
86441
  while (1) switch (_context12.n) {
86405
86442
  case 0:
86406
- loadingState = _this35.noObserver ? _this35.noObserver.batchLoadingState : _this35.batchLoadingState;
86443
+ loadingState = _this34.noObserver ? _this34.noObserver.batchLoadingState : _this34.batchLoadingState;
86407
86444
  loadingState.options.batchSize = loadingState.batchSize;
86408
86445
  loadingState.options.resetState = loadingState.currentBatch === 0;
86409
86446
  // 使用原始的handleInstancedMeshModel方法
@@ -86424,7 +86461,7 @@ var isDebug = false || false === true;
86424
86461
  * 完成批量加载
86425
86462
  */
86426
86463
  completeBatchLoading: function completeBatchLoading() {
86427
- var _this36 = this;
86464
+ var _this35 = this;
86428
86465
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
86429
86466
  if (!loadingState.isLoading) return;
86430
86467
 
@@ -86453,17 +86490,17 @@ var isDebug = false || false === true;
86453
86490
  modelGroup.traverse(function (child) {
86454
86491
  if (child.isMesh && !child.userData.batchInitDone) {
86455
86492
  markRendered(child);
86456
- var json = _this36.getMeshCenterAndVolume(child);
86457
- var meshBox3 = new _this36.THREE.Box3();
86493
+ var json = _this35.getMeshCenterAndVolume(child);
86494
+ var meshBox3 = new _this35.THREE.Box3();
86458
86495
  meshBox3.setFromObject(child);
86459
- 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);
86460
86497
  if (isNaN(worldPs.x)) return;
86461
- child.worldDir = new _this36.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
86498
+ child.worldDir = new _this35.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
86462
86499
  child.userData.center = json.center;
86463
86500
  child.userData.worldPs = worldPs;
86464
- child.userData.oldPs = child.getWorldPosition(new _this36.THREE.Vector3());
86501
+ child.userData.oldPs = child.getWorldPosition(new _this35.THREE.Vector3());
86465
86502
  child.userData.box = json.box;
86466
- child.userData.position = new _this36.THREE.Vector3().copy(child.position);
86503
+ child.userData.position = new _this35.THREE.Vector3().copy(child.position);
86467
86504
  child.userData.translate = {
86468
86505
  x: 0,
86469
86506
  y: 0,
@@ -86497,9 +86534,10 @@ var isDebug = false || false === true;
86497
86534
  totalLoaded: loadingState.loadedCount,
86498
86535
  totalBatches: loadingState.totalBatches
86499
86536
  });
86500
-
86501
- // var axesHelper = new this.THREE.AxesHelper(10000);
86502
- // 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
+ }
86503
86541
  // this.showSceneBoundingBox();
86504
86542
  }
86505
86543
 
@@ -86547,7 +86585,7 @@ var isDebug = false || false === true;
86547
86585
  * @param {Object} options - 配置项 { immediate: boolean }
86548
86586
  */
86549
86587
  setSystemInterruption: function setSystemInterruption(active) {
86550
- var _this37 = this;
86588
+ var _this36 = this;
86551
86589
  var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'user_interaction';
86552
86590
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
86553
86591
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
@@ -86628,11 +86666,11 @@ var isDebug = false || false === true;
86628
86666
 
86629
86667
  // 恢复本地批量加载 (如果未完成)
86630
86668
  if (loadingState.isLoading && loadingState.currentBatch < loadingState.totalBatches) {
86631
- _this37.loadNextBatch();
86669
+ _this36.loadNextBatch();
86632
86670
  }
86633
86671
 
86634
86672
  // 恢复 StreamLoader
86635
- var streamLoader = _this37.noObserver.streamLoader;
86673
+ var streamLoader = _this36.noObserver.streamLoader;
86636
86674
  if (streamLoader && typeof streamLoader.handleControlEnd === 'function') {
86637
86675
  // StreamLoader 内部通常有防抖或延迟,这里直接通知结束即可
86638
86676
  streamLoader.handleControlEnd();
@@ -86685,7 +86723,7 @@ var isDebug = false || false === true;
86685
86723
  * 滚轮交互结束的定时检测
86686
86724
  */
86687
86725
  scheduleWheelInteractionEnd: function scheduleWheelInteractionEnd(event) {
86688
- var _this38 = this;
86726
+ var _this37 = this;
86689
86727
  var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
86690
86728
  var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
86691
86729
  if (loadingState.interactionState.wheelTimeout) {
@@ -86693,8 +86731,8 @@ var isDebug = false || false === true;
86693
86731
  loadingState.interactionState.wheelTimeout = null;
86694
86732
  }
86695
86733
  loadingState.interactionState.wheelTimeout = setTimeout(function () {
86696
- _this38.$emit('wheelEnd', event);
86697
- _this38.endInteraction('wheel', event, {
86734
+ _this37.$emit('wheelEnd', event);
86735
+ _this37.endInteraction('wheel', event, {
86698
86736
  immediateResume: false
86699
86737
  });
86700
86738
  loadingState.interactionState.wheelTimeout = null;
@@ -86747,11 +86785,11 @@ var isDebug = false || false === true;
86747
86785
  });
86748
86786
  // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=script&lang=js
86749
86787
  /* harmony default export */ var components_com_graphicsvue_type_script_lang_js = (com_graphicsvue_type_script_lang_js);
86750
- // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=623ffb3e&prod&lang=scss&scoped=true
86751
- var com_graphicsvue_type_style_index_0_id_623ffb3e_prod_lang_scss_scoped_true = __webpack_require__("e736");
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");
86752
86790
 
86753
- // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=623ffb3e&prod&lang=css
86754
- var com_graphicsvue_type_style_index_1_id_623ffb3e_prod_lang_css = __webpack_require__("99bc");
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");
86755
86793
 
86756
86794
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
86757
86795
  /* globals __VUE_SSR_CONTEXT__ */
@@ -86863,17 +86901,17 @@ function normalizeComponent(
86863
86901
 
86864
86902
  var component = normalizeComponent(
86865
86903
  components_com_graphicsvue_type_script_lang_js,
86866
- com_graphicsvue_type_template_id_623ffb3e_scoped_true_render,
86904
+ com_graphicsvue_type_template_id_03e2a393_scoped_true_render,
86867
86905
  staticRenderFns,
86868
86906
  false,
86869
86907
  null,
86870
- "623ffb3e",
86908
+ "03e2a393",
86871
86909
  null
86872
86910
 
86873
86911
  )
86874
86912
 
86875
86913
  /* harmony default export */ var com_graphics = (component.exports);
86876
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"73e47ca8-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
86877
86915
  var com_flcanvasvue_type_template_id_459d4d3b_scoped_true_render = function render() {
86878
86916
  var _vm = this,
86879
86917
  _c = _vm._self._c;
@@ -90650,7 +90688,7 @@ var com_flcanvas_component = normalizeComponent(
90650
90688
  )
90651
90689
 
90652
90690
  /* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
90653
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"73e47ca8-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
90654
90692
  var per_controlvue_type_template_id_f547d5c6_scoped_true_render = function render() {
90655
90693
  var _vm = this,
90656
90694
  _c = _vm._self._c;
@@ -90758,7 +90796,7 @@ var per_control_component = normalizeComponent(
90758
90796
  )
90759
90797
 
90760
90798
  /* harmony default export */ var per_control = (per_control_component.exports);
90761
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"73e47ca8-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
90762
90800
  var pidvue_type_template_id_6e1600cc_scoped_true_render = function render() {
90763
90801
  var _vm = this,
90764
90802
  _c = _vm._self._c;
@@ -90805,7 +90843,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
90805
90843
  var html2canvas = __webpack_require__("c0e9");
90806
90844
  var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
90807
90845
 
90808
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"73e47ca8-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
90809
90847
  var ann_toolvue_type_template_id_5f081c10_scoped_true_render = function render() {
90810
90848
  var _vm = this,
90811
90849
  _c = _vm._self._c;
@@ -91776,7 +91814,7 @@ var pid_component = normalizeComponent(
91776
91814
  )
91777
91815
 
91778
91816
  /* harmony default export */ var pid = (pid_component.exports);
91779
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"73e47ca8-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
91780
91818
  var com_tilesvue_type_template_id_5504c19e_scoped_true_render = function render() {
91781
91819
  var _vm = this,
91782
91820
  _c = _vm._self._c;