fl-web-component 2.1.1-beta.3 → 2.1.1-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.
|
@@ -874,6 +874,13 @@ module.exports = function (it) {
|
|
|
874
874
|
|
|
875
875
|
/***/ }),
|
|
876
876
|
|
|
877
|
+
/***/ "0a00":
|
|
878
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
879
|
+
|
|
880
|
+
// extracted by mini-css-extract-plugin
|
|
881
|
+
|
|
882
|
+
/***/ }),
|
|
883
|
+
|
|
877
884
|
/***/ "0ae2":
|
|
878
885
|
/***/ (function(module, exports, __webpack_require__) {
|
|
879
886
|
|
|
@@ -2407,6 +2414,17 @@ var Posterize = function Posterize(imageData) {
|
|
|
2407
2414
|
exports.Posterize = Posterize;
|
|
2408
2415
|
Factory_1.Factory.addGetterSetter(Node_1.Node, 'levels', 0.5, (0, Validators_1.getNumberValidator)(), Factory_1.Factory.afterSetFilter);
|
|
2409
2416
|
|
|
2417
|
+
/***/ }),
|
|
2418
|
+
|
|
2419
|
+
/***/ "2098":
|
|
2420
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2421
|
+
|
|
2422
|
+
"use strict";
|
|
2423
|
+
/* 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_7f8842df_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3231");
|
|
2424
|
+
/* 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_7f8842df_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_7f8842df_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
2425
|
+
/* unused harmony reexport * */
|
|
2426
|
+
|
|
2427
|
+
|
|
2410
2428
|
/***/ }),
|
|
2411
2429
|
|
|
2412
2430
|
/***/ "21d3":
|
|
@@ -12932,6 +12950,13 @@ function lib_esm_decodeApng(data, options) {
|
|
|
12932
12950
|
|
|
12933
12951
|
|
|
12934
12952
|
|
|
12953
|
+
/***/ }),
|
|
12954
|
+
|
|
12955
|
+
/***/ "3231":
|
|
12956
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
12957
|
+
|
|
12958
|
+
// extracted by mini-css-extract-plugin
|
|
12959
|
+
|
|
12935
12960
|
/***/ }),
|
|
12936
12961
|
|
|
12937
12962
|
/***/ "3397":
|
|
@@ -41710,6 +41735,17 @@ function unzipSync(data, opts) {
|
|
|
41710
41735
|
return files;
|
|
41711
41736
|
}
|
|
41712
41737
|
|
|
41738
|
+
/***/ }),
|
|
41739
|
+
|
|
41740
|
+
/***/ "73cd":
|
|
41741
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
41742
|
+
|
|
41743
|
+
"use strict";
|
|
41744
|
+
/* 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_7f8842df_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0a00");
|
|
41745
|
+
/* 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_7f8842df_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_7f8842df_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
41746
|
+
/* unused harmony reexport * */
|
|
41747
|
+
|
|
41748
|
+
|
|
41713
41749
|
/***/ }),
|
|
41714
41750
|
|
|
41715
41751
|
/***/ "769d":
|
|
@@ -41921,13 +41957,6 @@ function releaseCapture(pointerId, target) {
|
|
|
41921
41957
|
|
|
41922
41958
|
/***/ }),
|
|
41923
41959
|
|
|
41924
|
-
/***/ "7d82":
|
|
41925
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
41926
|
-
|
|
41927
|
-
// extracted by mini-css-extract-plugin
|
|
41928
|
-
|
|
41929
|
-
/***/ }),
|
|
41930
|
-
|
|
41931
41960
|
/***/ "7e1b":
|
|
41932
41961
|
/***/ (function(module) {
|
|
41933
41962
|
|
|
@@ -42295,13 +42324,6 @@ module.exports = /******/function (modules) {
|
|
|
42295
42324
|
|
|
42296
42325
|
/***/ }),
|
|
42297
42326
|
|
|
42298
|
-
/***/ "80a1":
|
|
42299
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
42300
|
-
|
|
42301
|
-
// extracted by mini-css-extract-plugin
|
|
42302
|
-
|
|
42303
|
-
/***/ }),
|
|
42304
|
-
|
|
42305
42327
|
/***/ "8119":
|
|
42306
42328
|
/***/ (function(module, exports, __webpack_require__) {
|
|
42307
42329
|
|
|
@@ -56496,7 +56518,7 @@ module.exports = document && document.documentElement;
|
|
|
56496
56518
|
/***/ "9224":
|
|
56497
56519
|
/***/ (function(module) {
|
|
56498
56520
|
|
|
56499
|
-
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.1.1-beta.
|
|
56521
|
+
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.1.1-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:prod\",\"watch\":\"vue-cli-service build --watch --mode development --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"watch:prod\":\"vue-cli-service build --watch --mode production --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build\":\"npm run lint && vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build:test\":\"vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"publish:base\":\"npm run build && npm publish --registry https://registry.npmjs.org/\",\"publish:beta:base\":\"npm run build && npm publish --tag beta --registry https://registry.npmjs.org/\",\"==\":\"=============================================================\",\"tip3\":\"发版注意: 【测试版执行publish:beta】【修改bug执行publish:fix】【新增功能执行publish:feat】【新特性执行publish:perf】\",\"publish:beta\":\"npm version prerelease --preid=beta && npm run publish:beta:base\",\"publish:fix\":\"npm version patch && npm run publish:base\",\"publish:feat\":\"npm version minor && npm run publish:base\",\"publish:perf\":\"npm version major && npm run publish:base\"},\"files\":[\"dist\",\"packages\",\"src\"],\"main\":\"dist/fl-web-component.common.js\",\"dependencies\":{\"camera-controls\":\"2.9.0\",\"core-js\":\"^3.42.0\",\"dxf-parser\":\"^1.1.2\",\"element-ui\":\"2.15.14\",\"fflate\":\"^0.8.2\",\"html2canvas\":\"^1.4.1\",\"jspdf\":\"^3.0.1\",\"konva\":\"^9.3.12\",\"lodash\":\"^4.17.21\",\"meshline\":\"^3.3.1\",\"regenerator-runtime\":\"^0.14.1\",\"svg-pan-zoom\":\"^3.6.2\",\"three\":\"^0.176.0\",\"three.path\":\"^1.0.1\",\"vue\":\"^2.6.11\"},\"devDependencies\":{\"@babel/core\":\"^7.12.16\",\"@babel/plugin-proposal-nullish-coalescing-operator\":\"^7.18.6\",\"@babel/plugin-proposal-optional-chaining\":\"^7.21.0\",\"@babel/preset-env\":\"^7.0.0\",\"@babel/runtime-corejs3\":\"^7.27.1\",\"@vue/cli-plugin-babel\":\"~4.4.0\",\"@vue/cli-plugin-eslint\":\"~4.4.0\",\"@vue/cli-service\":\"~4.4.0\",\"babel-eslint\":\"^10.1.0\",\"babel-loader\":\"^8.0.0\",\"copy-webpack-plugin\":\"^4.0.1\",\"eslint\":\"^6.7.2\",\"eslint-config-prettier\":\"^6.15.0\",\"eslint-plugin-prettier\":\"^3.4.1\",\"eslint-plugin-vue\":\"^6.2.2\",\"patch-package\":\"^6.4.7\",\"prettier\":\"^2.8.8\",\"sass\":\"1.32.13\",\"sass-loader\":\"10.1.1\",\"vue-template-compiler\":\"^2.6.11\",\"worker-loader\":\"^3.0.8\"},\"browserslist\":[\"> 1%\",\"last 2 versions\"]}");
|
|
56500
56522
|
|
|
56501
56523
|
/***/ }),
|
|
56502
56524
|
|
|
@@ -59300,17 +59322,6 @@ var isDefined = exports.isDefined = function isDefined(val) {
|
|
|
59300
59322
|
return val !== undefined && val !== null;
|
|
59301
59323
|
};
|
|
59302
59324
|
|
|
59303
|
-
/***/ }),
|
|
59304
|
-
|
|
59305
|
-
/***/ "a817":
|
|
59306
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
59307
|
-
|
|
59308
|
-
"use strict";
|
|
59309
|
-
/* 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_e9e4a7c2_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("80a1");
|
|
59310
|
-
/* 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_e9e4a7c2_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_e9e4a7c2_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
59311
|
-
/* unused harmony reexport * */
|
|
59312
|
-
|
|
59313
|
-
|
|
59314
59325
|
/***/ }),
|
|
59315
59326
|
|
|
59316
59327
|
/***/ "ae26":
|
|
@@ -59415,17 +59426,6 @@ var store = global[SHARED] || (global[SHARED] = {});
|
|
|
59415
59426
|
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
|
|
59416
59427
|
});
|
|
59417
59428
|
|
|
59418
|
-
/***/ }),
|
|
59419
|
-
|
|
59420
|
-
/***/ "b3cf":
|
|
59421
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
59422
|
-
|
|
59423
|
-
"use strict";
|
|
59424
|
-
/* 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_e9e4a7c2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7d82");
|
|
59425
|
-
/* 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_e9e4a7c2_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_e9e4a7c2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
59426
|
-
/* unused harmony reexport * */
|
|
59427
|
-
|
|
59428
|
-
|
|
59429
59429
|
/***/ }),
|
|
59430
59430
|
|
|
59431
59431
|
/***/ "b5e0":
|
|
@@ -78634,8 +78634,8 @@ if (typeof window !== 'undefined') {
|
|
|
78634
78634
|
// Indicate to webpack that this file can be concatenated
|
|
78635
78635
|
/* harmony default export */ var setPublicPath = (null);
|
|
78636
78636
|
|
|
78637
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
78638
|
-
var
|
|
78637
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"43d339b6-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=7f8842df&scoped=true
|
|
78638
|
+
var com_graphicsvue_type_template_id_7f8842df_scoped_true_render = function render() {
|
|
78639
78639
|
var _vm = this,
|
|
78640
78640
|
_c = _vm._self._c;
|
|
78641
78641
|
return _c('div', {
|
|
@@ -78647,7 +78647,7 @@ var com_graphicsvue_type_template_id_e9e4a7c2_scoped_true_render = function rend
|
|
|
78647
78647
|
};
|
|
78648
78648
|
var staticRenderFns = [];
|
|
78649
78649
|
|
|
78650
|
-
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=
|
|
78650
|
+
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=7f8842df&scoped=true
|
|
78651
78651
|
|
|
78652
78652
|
// CONCATENATED MODULE: ./node_modules/camera-controls/dist/camera-controls.module.js
|
|
78653
78653
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
@@ -112489,9 +112489,14 @@ function draw2Dmodel(geom, instanceName, instanceCount, nColor, nOpacity) {
|
|
|
112489
112489
|
color = _geom$prop2.color,
|
|
112490
112490
|
linewidth = _geom$prop2.linewidth;
|
|
112491
112491
|
var formatLinewidth = (linewidth < 1 ? linewidth * 50 : linewidth) || 5;
|
|
112492
|
+
var meshLineResolution = options.meshLineResolution || {};
|
|
112493
|
+
var resolutionWidth = meshLineResolution.width || window.innerWidth || 1;
|
|
112494
|
+
var resolutionHeight = meshLineResolution.height || window.innerHeight || 1;
|
|
112492
112495
|
var material = new dist_MeshLineMaterial({
|
|
112493
112496
|
color: new Color("rgb(".concat(color[0], ", ").concat(color[1], ", ").concat(color[2], ")")),
|
|
112494
|
-
lineWidth: formatLinewidth
|
|
112497
|
+
lineWidth: formatLinewidth,
|
|
112498
|
+
resolution: new Vector2(resolutionWidth, resolutionHeight),
|
|
112499
|
+
sizeAttenuation: 0
|
|
112495
112500
|
});
|
|
112496
112501
|
var lineGeometry = new dist_MeshLineGeometry();
|
|
112497
112502
|
lineGeometry.setPoints(geometry);
|
|
@@ -121536,6 +121541,7 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
121536
121541
|
isPaused: false
|
|
121537
121542
|
},
|
|
121538
121543
|
isolateMode: false,
|
|
121544
|
+
sceneBoundingBoxDebugEnabled: false,
|
|
121539
121545
|
// collisionObbDebugEnabled: isDebug,
|
|
121540
121546
|
collisionObbDebugEnabled: false
|
|
121541
121547
|
};
|
|
@@ -121545,6 +121551,13 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
121545
121551
|
if (val) {
|
|
121546
121552
|
this.detachTransformControls();
|
|
121547
121553
|
}
|
|
121554
|
+
},
|
|
121555
|
+
sceneBoundingBoxDebugEnabled: function sceneBoundingBoxDebugEnabled(val) {
|
|
121556
|
+
if (val) {
|
|
121557
|
+
this.refreshSceneBoundingBoxHelper(true);
|
|
121558
|
+
} else {
|
|
121559
|
+
this.hideSceneBoundingBox();
|
|
121560
|
+
}
|
|
121548
121561
|
}
|
|
121549
121562
|
},
|
|
121550
121563
|
beforeCreate: function beforeCreate() {
|
|
@@ -121647,6 +121660,7 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
121647
121660
|
// 标记相机变更观察者是否启用
|
|
121648
121661
|
sceneBoxes: new Map(),
|
|
121649
121662
|
documentModelIds: new Map(),
|
|
121663
|
+
documentSceneBoundsIds: new Map(),
|
|
121650
121664
|
outlineInstanceProxyMap: new Map(),
|
|
121651
121665
|
occlusionWorker: null,
|
|
121652
121666
|
occlusionWorkerRequestMap: new Map(),
|
|
@@ -122751,61 +122765,100 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
122751
122765
|
updateGlobalSceneBoundingBox: function updateGlobalSceneBoundingBox() {
|
|
122752
122766
|
var state = this.noObserver || {};
|
|
122753
122767
|
var occScene = state.occlusionState && state.occlusionState._occScene;
|
|
122768
|
+
var mergedBox = new this.THREE.Box3();
|
|
122769
|
+
var hasValidBox = false;
|
|
122770
|
+
var mergeBox = function mergeBox(box) {
|
|
122771
|
+
if (!box || !box.isBox3 || box.isEmpty()) return;
|
|
122772
|
+
if (!hasValidBox) {
|
|
122773
|
+
mergedBox.copy(box);
|
|
122774
|
+
hasValidBox = true;
|
|
122775
|
+
return;
|
|
122776
|
+
}
|
|
122777
|
+
mergedBox.union(box);
|
|
122778
|
+
};
|
|
122754
122779
|
|
|
122755
|
-
//
|
|
122780
|
+
// 离屏遮挡场景只包含参与遮挡的模型,需要继续合并场景范围索引中的二维图形范围。
|
|
122756
122781
|
if (occScene && occScene.children && occScene.children.length > 0) {
|
|
122757
122782
|
var occBox = new this.THREE.Box3().setFromObject(occScene);
|
|
122758
|
-
|
|
122759
|
-
this.sceneBoundingBox = occBox;
|
|
122760
|
-
return this.sceneBoundingBox;
|
|
122761
|
-
}
|
|
122783
|
+
mergeBox(occBox);
|
|
122762
122784
|
}
|
|
122763
122785
|
|
|
122764
|
-
//
|
|
122765
|
-
if (this.
|
|
122766
|
-
|
|
122767
|
-
|
|
122768
|
-
minZ = Infinity;
|
|
122769
|
-
var maxX = -Infinity,
|
|
122770
|
-
maxY = -Infinity,
|
|
122771
|
-
maxZ = -Infinity;
|
|
122772
|
-
this._boxIndex.forEach(function (box) {
|
|
122773
|
-
if (!box || !box.isBox3 || box.isEmpty()) return;
|
|
122774
|
-
var mn = box.min;
|
|
122775
|
-
var mx = box.max;
|
|
122776
|
-
if (mn.x < minX) minX = mn.x;
|
|
122777
|
-
if (mn.y < minY) minY = mn.y;
|
|
122778
|
-
if (mn.z < minZ) minZ = mn.z;
|
|
122779
|
-
if (mx.x > maxX) maxX = mx.x;
|
|
122780
|
-
if (mx.y > maxY) maxY = mx.y;
|
|
122781
|
-
if (mx.z > maxZ) maxZ = mx.z;
|
|
122786
|
+
// sceneBoundsIndex 包含二维和三维图形,是全场景 dolly 距离的主要范围来源。
|
|
122787
|
+
if (this._sceneBoundsIndex && this._sceneBoundsIndex.size > 0) {
|
|
122788
|
+
this._sceneBoundsIndex.forEach(function (box) {
|
|
122789
|
+
mergeBox(box);
|
|
122782
122790
|
});
|
|
122783
|
-
if (Number.isFinite(minX) && Number.isFinite(minY) && Number.isFinite(minZ) && Number.isFinite(maxX) && Number.isFinite(maxY) && Number.isFinite(maxZ)) {
|
|
122784
|
-
this.sceneBoundingBox = new this.THREE.Box3(new this.THREE.Vector3(minX, minY, minZ), new this.THREE.Vector3(maxX, maxY, maxZ));
|
|
122785
|
-
return this.sceneBoundingBox;
|
|
122786
|
-
}
|
|
122787
122791
|
}
|
|
122788
122792
|
var boxes = Array.from(state.sceneBoxes && state.sceneBoxes.values() || []);
|
|
122789
122793
|
if (boxes.length > 0) {
|
|
122790
|
-
var
|
|
122791
|
-
|
|
122792
|
-
firstBox.union(boxes[i]);
|
|
122794
|
+
for (var i = 0; i < boxes.length; i++) {
|
|
122795
|
+
mergeBox(boxes[i]);
|
|
122793
122796
|
}
|
|
122794
|
-
|
|
122797
|
+
}
|
|
122798
|
+
if (hasValidBox) {
|
|
122799
|
+
this.sceneBoundingBox = mergedBox;
|
|
122800
|
+
this.refreshSceneBoundingBoxHelper(this.sceneBoundingBoxDebugEnabled);
|
|
122795
122801
|
return this.sceneBoundingBox;
|
|
122796
122802
|
}
|
|
122797
122803
|
this.sceneBoundingBox = new this.THREE.Box3();
|
|
122804
|
+
this.refreshSceneBoundingBoxHelper(this.sceneBoundingBoxDebugEnabled);
|
|
122798
122805
|
return this.sceneBoundingBox;
|
|
122799
122806
|
},
|
|
122807
|
+
upsertIndexedBox: function upsertIndexedBox(indexMap, modelId, box) {
|
|
122808
|
+
if (!indexMap || !modelId || !box || !box.isBox3) return null;
|
|
122809
|
+
var key = String(modelId);
|
|
122810
|
+
var existingBox = indexMap.get(key);
|
|
122811
|
+
if (!existingBox) {
|
|
122812
|
+
indexMap.set(key, box);
|
|
122813
|
+
return box;
|
|
122814
|
+
}
|
|
122815
|
+
existingBox.union(box);
|
|
122816
|
+
return existingBox;
|
|
122817
|
+
},
|
|
122818
|
+
mergeModelBoxUserData: function mergeModelBoxUserData(targetBox, sourceUserData) {
|
|
122819
|
+
if (!targetBox || !sourceUserData) return;
|
|
122820
|
+
if (!targetBox.userData) {
|
|
122821
|
+
targetBox.userData = sourceUserData;
|
|
122822
|
+
return;
|
|
122823
|
+
}
|
|
122824
|
+
var targetUserData = targetBox.userData;
|
|
122825
|
+
targetUserData.visible = targetUserData.visible !== false || sourceUserData.visible !== false;
|
|
122826
|
+
targetUserData.sourceVisible = targetUserData.sourceVisible !== false || sourceUserData.sourceVisible !== false;
|
|
122827
|
+
targetUserData.transparent = !!targetUserData.transparent && !!sourceUserData.transparent;
|
|
122828
|
+
targetUserData.mergedBoxCount = (targetUserData.mergedBoxCount || 1) + 1;
|
|
122829
|
+
// 同一模型包含多个图元时,单个图元的遮挡代理不再可靠,改由视锥体合并盒兜底加载。
|
|
122830
|
+
targetUserData.occlusionEnabled = false;
|
|
122831
|
+
var targetObbs = Array.isArray(targetUserData.collisionObbs) ? targetUserData.collisionObbs : [];
|
|
122832
|
+
var sourceObbs = Array.isArray(sourceUserData.collisionObbs) ? sourceUserData.collisionObbs : [];
|
|
122833
|
+
if (sourceObbs.length > 0) {
|
|
122834
|
+
targetUserData.collisionObbs = targetObbs.concat(sourceObbs);
|
|
122835
|
+
}
|
|
122836
|
+
},
|
|
122837
|
+
upsertModelBox: function upsertModelBox(modelId, box) {
|
|
122838
|
+
if (!this._boxIndex || !modelId || !box || !box.isBox3) return;
|
|
122839
|
+
var key = String(modelId);
|
|
122840
|
+
var existingBox = this._boxIndex.get(key);
|
|
122841
|
+
if (!existingBox) {
|
|
122842
|
+
this._boxIndex.set(key, box);
|
|
122843
|
+
return;
|
|
122844
|
+
}
|
|
122845
|
+
existingBox.union(box);
|
|
122846
|
+
this.mergeModelBoxUserData(existingBox, box.userData);
|
|
122847
|
+
},
|
|
122800
122848
|
setBoxIndex: function setBoxIndex(boxJson, documentId) {
|
|
122801
122849
|
var _this0 = this;
|
|
122802
122850
|
var isAdd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
122803
122851
|
if (!this._boxIndex) this._boxIndex = new Map();
|
|
122852
|
+
if (!this._sceneBoundsIndex) this._sceneBoundsIndex = new Map();
|
|
122804
122853
|
if (!documentId) {
|
|
122805
122854
|
this._boxIndex.clear();
|
|
122855
|
+
this._sceneBoundsIndex.clear();
|
|
122806
122856
|
if (this.noObserver && this.noObserver.documentModelIds) {
|
|
122807
122857
|
this.noObserver.documentModelIds.clear();
|
|
122808
122858
|
}
|
|
122859
|
+
if (this.noObserver && this.noObserver.documentSceneBoundsIds) {
|
|
122860
|
+
this.noObserver.documentSceneBoundsIds.clear();
|
|
122861
|
+
}
|
|
122809
122862
|
this.hasExecutedCentering = false;
|
|
122810
122863
|
this.buildOctreeFromBoxIndex();
|
|
122811
122864
|
return;
|
|
@@ -122813,19 +122866,25 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
122813
122866
|
if (isAdd && boxJson) {
|
|
122814
122867
|
var arr = boxJson ? boxJson : [];
|
|
122815
122868
|
var modelIds = new Set();
|
|
122869
|
+
var sceneBoundIds = new Set();
|
|
122816
122870
|
var validGeomTypes = new Set(Object.values(GEOM_TYPES));
|
|
122817
122871
|
for (var i = 0; i < arr.length; i++) {
|
|
122818
122872
|
var it = arr[i];
|
|
122819
122873
|
if (!validGeomTypes.has(it.geomType)) {
|
|
122820
122874
|
continue;
|
|
122821
122875
|
}
|
|
122822
|
-
|
|
122876
|
+
var minSource = it.min;
|
|
122877
|
+
var maxSource = it.max;
|
|
122878
|
+
var hasValidMinMax = minSource && maxSource && minSource.length >= 3 && maxSource.length >= 3 && Number.isFinite(minSource[0]) && Number.isFinite(minSource[1]) && Number.isFinite(minSource[2]) && Number.isFinite(maxSource[0]) && Number.isFinite(maxSource[1]) && Number.isFinite(maxSource[2]);
|
|
122879
|
+
if (!hasValidMinMax) {
|
|
122823
122880
|
continue;
|
|
122824
122881
|
}
|
|
122882
|
+
var obbData = it.obb || [];
|
|
122883
|
+
var modelId = String(it.id);
|
|
122825
122884
|
|
|
122826
122885
|
// 使用新的 min/max 数据结构
|
|
122827
|
-
var min = new this.THREE.Vector3(
|
|
122828
|
-
var max = new this.THREE.Vector3(
|
|
122886
|
+
var min = new this.THREE.Vector3(minSource[0], minSource[1], minSource[2]);
|
|
122887
|
+
var max = new this.THREE.Vector3(maxSource[0], maxSource[1], maxSource[2]);
|
|
122829
122888
|
var sourceBox = new this.THREE.Box3(min.clone(), max.clone());
|
|
122830
122889
|
// 八叉树仍使用 AABB 粗筛,最终碰撞使用 sourceBox 派生的 OBB 精筛
|
|
122831
122890
|
var boxThree = sourceBox.clone();
|
|
@@ -122855,11 +122914,18 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
122855
122914
|
collisionMatrix = this.bizToThreeMatrix.clone();
|
|
122856
122915
|
boxThree.applyMatrix4(collisionMatrix);
|
|
122857
122916
|
}
|
|
122917
|
+
this.upsertIndexedBox(this._sceneBoundsIndex, modelId, boxThree.clone());
|
|
122918
|
+
sceneBoundIds.add(modelId);
|
|
122919
|
+
|
|
122920
|
+
// 没有 OBB 数据的二维图形只参与全场景范围,不纳入碰撞和遮挡索引。
|
|
122921
|
+
if (obbData.length === 0) {
|
|
122922
|
+
continue;
|
|
122923
|
+
}
|
|
122858
122924
|
var userData = {
|
|
122859
122925
|
flag: it.flag || 1,
|
|
122860
122926
|
// 默认为 1
|
|
122861
122927
|
geomType: it.geomType,
|
|
122862
|
-
obbData:
|
|
122928
|
+
obbData: obbData,
|
|
122863
122929
|
// 存储原始 OBB 数据
|
|
122864
122930
|
transparent: it.transp > 0,
|
|
122865
122931
|
sourceVisible: it.visible === false ? false : true,
|
|
@@ -122874,8 +122940,7 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
122874
122940
|
// userData.matrix = new this.THREE.Matrix4().identity();
|
|
122875
122941
|
}
|
|
122876
122942
|
// 如果是 flag=3,解析并存储中心点、半轴长、旋转矩阵
|
|
122877
|
-
else if (it.flag === 3 &&
|
|
122878
|
-
var obbData = it.obb;
|
|
122943
|
+
else if (it.flag === 3 && obbData.length === 15) {
|
|
122879
122944
|
var center = new this.THREE.Vector3(obbData[0], obbData[1], obbData[2]);
|
|
122880
122945
|
var halfSize = new this.THREE.Vector3(obbData[3], obbData[4], obbData[5]);
|
|
122881
122946
|
var rotation = new this.THREE.Matrix3().fromArray(obbData.slice(6, 15));
|
|
@@ -122899,13 +122964,13 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
122899
122964
|
userData.collisionObbs = [collisionObb];
|
|
122900
122965
|
}
|
|
122901
122966
|
// 如果是 flag=2,解析并存储多个子包围盒 (min, max)
|
|
122902
|
-
else if (it.flag === 2 &&
|
|
122967
|
+
else if (it.flag === 2 && obbData.length > 0) {
|
|
122903
122968
|
var subBoxes = [];
|
|
122904
122969
|
var collisionObbs = [];
|
|
122905
|
-
for (var k = 0; k <
|
|
122906
|
-
if (k + 5 <
|
|
122907
|
-
var _min = new this.THREE.Vector3(
|
|
122908
|
-
var _max = new this.THREE.Vector3(
|
|
122970
|
+
for (var k = 0; k < obbData.length; k += 6) {
|
|
122971
|
+
if (k + 5 < obbData.length) {
|
|
122972
|
+
var _min = new this.THREE.Vector3(obbData[k], obbData[k + 1], obbData[k + 2]);
|
|
122973
|
+
var _max = new this.THREE.Vector3(obbData[k + 3], obbData[k + 4], obbData[k + 5]);
|
|
122909
122974
|
subBoxes.push({
|
|
122910
122975
|
min: _min,
|
|
122911
122976
|
max: _max
|
|
@@ -122931,11 +122996,11 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
122931
122996
|
userData.collisionObbs = [_collisionObb2];
|
|
122932
122997
|
}
|
|
122933
122998
|
boxThree.userData = userData;
|
|
122934
|
-
|
|
122935
|
-
this._boxIndex.set(modelId, boxThree);
|
|
122999
|
+
this.upsertModelBox(modelId, boxThree);
|
|
122936
123000
|
modelIds.add(modelId);
|
|
122937
123001
|
}
|
|
122938
123002
|
this.noObserver.documentModelIds.set(documentId, modelIds);
|
|
123003
|
+
this.noObserver.documentSceneBoundsIds.set(documentId, sceneBoundIds);
|
|
122939
123004
|
} else {
|
|
122940
123005
|
var _modelIds = this.noObserver.documentModelIds.get(documentId);
|
|
122941
123006
|
if (_modelIds) {
|
|
@@ -122949,6 +123014,13 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
122949
123014
|
this.hasExecutedCentering = false;
|
|
122950
123015
|
}
|
|
122951
123016
|
}
|
|
123017
|
+
var _sceneBoundIds = this.noObserver.documentSceneBoundsIds && this.noObserver.documentSceneBoundsIds.get(documentId);
|
|
123018
|
+
if (_sceneBoundIds) {
|
|
123019
|
+
_sceneBoundIds.forEach(function (id) {
|
|
123020
|
+
_this0._sceneBoundsIndex.delete(id);
|
|
123021
|
+
});
|
|
123022
|
+
this.noObserver.documentSceneBoundsIds.delete(documentId);
|
|
123023
|
+
}
|
|
122952
123024
|
}
|
|
122953
123025
|
this.buildOctreeFromBoxIndex();
|
|
122954
123026
|
this.refreshCollisionObbDebug();
|
|
@@ -122960,7 +123032,9 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
122960
123032
|
tryInitialCenterAfterBoundsReady: function tryInitialCenterAfterBoundsReady() {
|
|
122961
123033
|
if (this.hasExecutedCentering || this.userInteracting) return;
|
|
122962
123034
|
if (!this.sceneBoundingBox || !this.sceneBoundingBox.isBox3 || this.sceneBoundingBox.isEmpty()) return;
|
|
122963
|
-
|
|
123035
|
+
var hasBoxIndex = this._boxIndex && this._boxIndex.size > 0;
|
|
123036
|
+
var hasSceneBoundsIndex = this._sceneBoundsIndex && this._sceneBoundsIndex.size > 0;
|
|
123037
|
+
if (!hasBoxIndex && !hasSceneBoundsIndex) return;
|
|
122964
123038
|
this.smartModelCenter(this.sceneBoundingBox, 0);
|
|
122965
123039
|
},
|
|
122966
123040
|
buildOctreeFromBoxIndex: function buildOctreeFromBoxIndex() {
|
|
@@ -125422,12 +125496,33 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
125422
125496
|
},
|
|
125423
125497
|
// 动态设置视角滚轮的距离
|
|
125424
125498
|
setCameraConfig: function setCameraConfig() {
|
|
125499
|
+
if (!this.sceneBoundingBox || !this.sceneBoundingBox.isBox3 || this.sceneBoundingBox.isEmpty()) {
|
|
125500
|
+
return;
|
|
125501
|
+
}
|
|
125425
125502
|
// let box3 = new this.THREE.Box3().setFromObject(this.sceneBoundingBox);
|
|
125426
125503
|
var size = new this.THREE.Vector3();
|
|
125427
125504
|
this.sceneBoundingBox.getSize(size);
|
|
125428
125505
|
var maxBorder = Math.max(size.x, size.y, size.z);
|
|
125506
|
+
if (isDebug) {
|
|
125507
|
+
var center = this.sceneBoundingBox.getCenter(new this.THREE.Vector3());
|
|
125508
|
+
console.log('sceneBoundingBox 调试信息', {
|
|
125509
|
+
size: {
|
|
125510
|
+
x: size.x,
|
|
125511
|
+
y: size.y,
|
|
125512
|
+
z: size.z
|
|
125513
|
+
},
|
|
125514
|
+
center: {
|
|
125515
|
+
x: center.x,
|
|
125516
|
+
y: center.y,
|
|
125517
|
+
z: center.z
|
|
125518
|
+
},
|
|
125519
|
+
maxBorder: maxBorder
|
|
125520
|
+
});
|
|
125521
|
+
this.refreshSceneBoundingBoxHelper(this.sceneBoundingBoxDebugEnabled);
|
|
125522
|
+
}
|
|
125429
125523
|
// this.cameraControls.this.camera.far = maxBorder * 10; // 设置相机的远裁剪面
|
|
125430
125524
|
this.cameraControls.minDistance = maxBorder * 0.2; // 动态设置视角滚轮的距离
|
|
125525
|
+
// this.cameraControls.minDistance = 1000; // 动态设置视角滚轮的距离
|
|
125431
125526
|
this.camera.updateProjectionMatrix();
|
|
125432
125527
|
},
|
|
125433
125528
|
// 获取mesh的中心点
|
|
@@ -125745,8 +125840,19 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
125745
125840
|
if (this.threeMeasure) {
|
|
125746
125841
|
this.threeMeasure.updateParams(width, height);
|
|
125747
125842
|
}
|
|
125843
|
+
this.updateMeshLineResolution(width, height);
|
|
125748
125844
|
}
|
|
125749
125845
|
},
|
|
125846
|
+
updateMeshLineResolution: function updateMeshLineResolution(width, height) {
|
|
125847
|
+
if (!this.modelGroup || !width || !height) return;
|
|
125848
|
+
this.modelGroup.traverse(function (child) {
|
|
125849
|
+
var material = child && child.material;
|
|
125850
|
+
if (material && material.type === 'MeshLineMaterial' && material.resolution) {
|
|
125851
|
+
material.resolution.set(width, height);
|
|
125852
|
+
material.needsUpdate = true;
|
|
125853
|
+
}
|
|
125854
|
+
});
|
|
125855
|
+
},
|
|
125750
125856
|
setModelCenter: function setModelCenter(target) {
|
|
125751
125857
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
125752
125858
|
// return
|
|
@@ -127856,6 +127962,14 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
127856
127962
|
var onProgress = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
127857
127963
|
var onComplete = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
|
|
127858
127964
|
var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
|
|
127965
|
+
var rect = this.renderer ? this.renderer.domElement.getBoundingClientRect() : {
|
|
127966
|
+
width: window.innerWidth,
|
|
127967
|
+
height: window.innerHeight
|
|
127968
|
+
};
|
|
127969
|
+
options.meshLineResolution = {
|
|
127970
|
+
width: rect.width || window.innerWidth || 1,
|
|
127971
|
+
height: rect.height || window.innerHeight || 1
|
|
127972
|
+
};
|
|
127859
127973
|
// 如果已经在加载中,先停止之前的加载
|
|
127860
127974
|
if (loadingState.isLoading) {
|
|
127861
127975
|
this.stopBatchLoading('restart');
|
|
@@ -128487,9 +128601,71 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
128487
128601
|
/**
|
|
128488
128602
|
* 隐藏场景包围盒
|
|
128489
128603
|
*/
|
|
128604
|
+
refreshSceneBoundingBoxHelper: function refreshSceneBoundingBoxHelper() {
|
|
128605
|
+
var forceVisible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.boundingBoxVisible;
|
|
128606
|
+
if (this.sceneBoundingBoxHelper && this.scene) {
|
|
128607
|
+
this.scene.remove(this.sceneBoundingBoxHelper);
|
|
128608
|
+
this.sceneBoundingBoxHelper.geometry && this.sceneBoundingBoxHelper.geometry.dispose();
|
|
128609
|
+
if (Array.isArray(this.sceneBoundingBoxHelper.material)) {
|
|
128610
|
+
this.sceneBoundingBoxHelper.material.forEach(function (material) {
|
|
128611
|
+
material && material.dispose && material.dispose();
|
|
128612
|
+
});
|
|
128613
|
+
} else if (this.sceneBoundingBoxHelper.material && this.sceneBoundingBoxHelper.material.dispose) {
|
|
128614
|
+
this.sceneBoundingBoxHelper.material.dispose();
|
|
128615
|
+
}
|
|
128616
|
+
this.sceneBoundingBoxHelper = null;
|
|
128617
|
+
}
|
|
128618
|
+
if (!forceVisible || !this.scene || !this.sceneBoundingBox || !this.sceneBoundingBox.isBox3 || this.sceneBoundingBox.isEmpty()) {
|
|
128619
|
+
this.boundingBoxVisible = false;
|
|
128620
|
+
return false;
|
|
128621
|
+
}
|
|
128622
|
+
var helper = new this.THREE.Box3Helper(this.sceneBoundingBox, 0x00ff88);
|
|
128623
|
+
helper.name = 'sceneBoundingBoxHelper';
|
|
128624
|
+
helper.renderOrder = 999;
|
|
128625
|
+
if (helper.material) {
|
|
128626
|
+
helper.material.depthTest = false;
|
|
128627
|
+
helper.material.transparent = true;
|
|
128628
|
+
helper.material.opacity = 0.9;
|
|
128629
|
+
}
|
|
128630
|
+
this.scene.add(helper);
|
|
128631
|
+
this.sceneBoundingBoxHelper = helper;
|
|
128632
|
+
this.boundingBoxVisible = true;
|
|
128633
|
+
return true;
|
|
128634
|
+
},
|
|
128635
|
+
showSceneBoundingBox: function showSceneBoundingBox() {
|
|
128636
|
+
this.sceneBoundingBoxDebugEnabled = true;
|
|
128637
|
+
var shown = this.refreshSceneBoundingBoxHelper(true);
|
|
128638
|
+
if (!shown) {
|
|
128639
|
+
console.warn('sceneBoundingBox 无有效范围,无法绘制调试线框');
|
|
128640
|
+
return;
|
|
128641
|
+
}
|
|
128642
|
+
var size = this.sceneBoundingBox.getSize(new this.THREE.Vector3());
|
|
128643
|
+
var center = this.sceneBoundingBox.getCenter(new this.THREE.Vector3());
|
|
128644
|
+
console.log('sceneBoundingBox 线框已绘制', {
|
|
128645
|
+
size: {
|
|
128646
|
+
x: size.x,
|
|
128647
|
+
y: size.y,
|
|
128648
|
+
z: size.z
|
|
128649
|
+
},
|
|
128650
|
+
center: {
|
|
128651
|
+
x: center.x,
|
|
128652
|
+
y: center.y,
|
|
128653
|
+
z: center.z
|
|
128654
|
+
}
|
|
128655
|
+
});
|
|
128656
|
+
},
|
|
128490
128657
|
hideSceneBoundingBox: function hideSceneBoundingBox() {
|
|
128658
|
+
this.sceneBoundingBoxDebugEnabled = false;
|
|
128491
128659
|
if (this.sceneBoundingBoxHelper && this.scene) {
|
|
128492
128660
|
this.scene.remove(this.sceneBoundingBoxHelper);
|
|
128661
|
+
this.sceneBoundingBoxHelper.geometry && this.sceneBoundingBoxHelper.geometry.dispose();
|
|
128662
|
+
if (Array.isArray(this.sceneBoundingBoxHelper.material)) {
|
|
128663
|
+
this.sceneBoundingBoxHelper.material.forEach(function (material) {
|
|
128664
|
+
material && material.dispose && material.dispose();
|
|
128665
|
+
});
|
|
128666
|
+
} else if (this.sceneBoundingBoxHelper.material && this.sceneBoundingBoxHelper.material.dispose) {
|
|
128667
|
+
this.sceneBoundingBoxHelper.material.dispose();
|
|
128668
|
+
}
|
|
128493
128669
|
this.sceneBoundingBoxHelper = null;
|
|
128494
128670
|
this.boundingBoxVisible = false;
|
|
128495
128671
|
console.log('场景包围盒已隐藏');
|
|
@@ -128499,7 +128675,7 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
128499
128675
|
* 切换场景包围盒显示状态
|
|
128500
128676
|
*/
|
|
128501
128677
|
toggleSceneBoundingBox: function toggleSceneBoundingBox() {
|
|
128502
|
-
if (this.
|
|
128678
|
+
if (this.sceneBoundingBoxDebugEnabled) {
|
|
128503
128679
|
this.hideSceneBoundingBox();
|
|
128504
128680
|
} else {
|
|
128505
128681
|
this.showSceneBoundingBox();
|
|
@@ -128509,11 +128685,11 @@ var COLLISION_DEBUG_GROUP_NAME = '__collision_obb_debug_group__';
|
|
|
128509
128685
|
});
|
|
128510
128686
|
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=script&lang=js
|
|
128511
128687
|
/* harmony default export */ var components_com_graphicsvue_type_script_lang_js = (com_graphicsvue_type_script_lang_js);
|
|
128512
|
-
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=
|
|
128513
|
-
var
|
|
128688
|
+
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=7f8842df&prod&lang=scss&scoped=true
|
|
128689
|
+
var com_graphicsvue_type_style_index_0_id_7f8842df_prod_lang_scss_scoped_true = __webpack_require__("2098");
|
|
128514
128690
|
|
|
128515
|
-
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=
|
|
128516
|
-
var
|
|
128691
|
+
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=7f8842df&prod&lang=css
|
|
128692
|
+
var com_graphicsvue_type_style_index_1_id_7f8842df_prod_lang_css = __webpack_require__("73cd");
|
|
128517
128693
|
|
|
128518
128694
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
128519
128695
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
@@ -128625,17 +128801,17 @@ function normalizeComponent(
|
|
|
128625
128801
|
|
|
128626
128802
|
var component = normalizeComponent(
|
|
128627
128803
|
components_com_graphicsvue_type_script_lang_js,
|
|
128628
|
-
|
|
128804
|
+
com_graphicsvue_type_template_id_7f8842df_scoped_true_render,
|
|
128629
128805
|
staticRenderFns,
|
|
128630
128806
|
false,
|
|
128631
128807
|
null,
|
|
128632
|
-
"
|
|
128808
|
+
"7f8842df",
|
|
128633
128809
|
null
|
|
128634
128810
|
|
|
128635
128811
|
)
|
|
128636
128812
|
|
|
128637
128813
|
/* harmony default export */ var com_graphics = (component.exports);
|
|
128638
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
128814
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"43d339b6-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=0f76e7f4&scoped=true
|
|
128639
128815
|
var com_flcanvasvue_type_template_id_0f76e7f4_scoped_true_render = function render() {
|
|
128640
128816
|
var _vm = this,
|
|
128641
128817
|
_c = _vm._self._c;
|
|
@@ -135699,7 +135875,7 @@ var com_flcanvas_component = normalizeComponent(
|
|
|
135699
135875
|
)
|
|
135700
135876
|
|
|
135701
135877
|
/* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
|
|
135702
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
135878
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"43d339b6-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
|
|
135703
135879
|
var per_controlvue_type_template_id_f547d5c6_scoped_true_render = function render() {
|
|
135704
135880
|
var _vm = this,
|
|
135705
135881
|
_c = _vm._self._c;
|
|
@@ -135807,7 +135983,7 @@ var per_control_component = normalizeComponent(
|
|
|
135807
135983
|
)
|
|
135808
135984
|
|
|
135809
135985
|
/* harmony default export */ var per_control = (per_control_component.exports);
|
|
135810
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
135986
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"43d339b6-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/pid.vue?vue&type=template&id=2572c0e2&scoped=true
|
|
135811
135987
|
var pidvue_type_template_id_2572c0e2_scoped_true_render = function render() {
|
|
135812
135988
|
var _vm = this,
|
|
135813
135989
|
_c = _vm._self._c;
|
|
@@ -135854,7 +136030,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
|
|
|
135854
136030
|
var html2canvas = __webpack_require__("c0e9");
|
|
135855
136031
|
var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
|
|
135856
136032
|
|
|
135857
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
136033
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"43d339b6-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/component/ann-tool.vue?vue&type=template&id=4b17bce0&scoped=true
|
|
135858
136034
|
var ann_toolvue_type_template_id_4b17bce0_scoped_true_render = function render() {
|
|
135859
136035
|
var _vm = this,
|
|
135860
136036
|
_c = _vm._self._c;
|