fl-web-component 2.0.16 → 2.0.17
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.
- package/README.md +4 -0
- package/dist/fl-web-component.common.js +659 -214
- package/dist/fl-web-component.common.js.map +1 -1
- package/dist/fl-web-component.css +1 -1
- package/package.json +1 -1
- package/packages/components/com-graphics/index.vue +63 -12
- package/src/utils/threejs/measure-angle.js +172 -41
- package/src/utils/threejs/measure-area.js +144 -46
- package/src/utils/threejs/measure-distance.js +135 -18
- package/src/utils/threejs/measure-height.js +59 -15
|
@@ -870,6 +870,13 @@ module.exports = !$assign || __webpack_require__("4b8b")(function () {
|
|
|
870
870
|
|
|
871
871
|
/***/ }),
|
|
872
872
|
|
|
873
|
+
/***/ "07e4":
|
|
874
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
875
|
+
|
|
876
|
+
// extracted by mini-css-extract-plugin
|
|
877
|
+
|
|
878
|
+
/***/ }),
|
|
879
|
+
|
|
873
880
|
/***/ "0983":
|
|
874
881
|
/***/ (function(module, exports, __webpack_require__) {
|
|
875
882
|
|
|
@@ -1443,6 +1450,17 @@ module.exports = function (bitmap, value) {
|
|
|
1443
1450
|
};
|
|
1444
1451
|
};
|
|
1445
1452
|
|
|
1453
|
+
/***/ }),
|
|
1454
|
+
|
|
1455
|
+
/***/ "11c1":
|
|
1456
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1457
|
+
|
|
1458
|
+
"use strict";
|
|
1459
|
+
/* 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_48280acc_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("618f");
|
|
1460
|
+
/* 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_48280acc_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_48280acc_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
1461
|
+
/* unused harmony reexport * */
|
|
1462
|
+
|
|
1463
|
+
|
|
1446
1464
|
/***/ }),
|
|
1447
1465
|
|
|
1448
1466
|
/***/ "122f":
|
|
@@ -1935,17 +1953,6 @@ module.exports = function (it) {
|
|
|
1935
1953
|
return it;
|
|
1936
1954
|
};
|
|
1937
1955
|
|
|
1938
|
-
/***/ }),
|
|
1939
|
-
|
|
1940
|
-
/***/ "1694":
|
|
1941
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1942
|
-
|
|
1943
|
-
"use strict";
|
|
1944
|
-
/* 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_3e15de76_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2719");
|
|
1945
|
-
/* 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_3e15de76_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_3e15de76_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
1946
|
-
/* unused harmony reexport * */
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
1956
|
/***/ }),
|
|
1950
1957
|
|
|
1951
1958
|
/***/ "17ed":
|
|
@@ -3080,13 +3087,6 @@ module.exports = function (Constructor, NAME, next) {
|
|
|
3080
3087
|
|
|
3081
3088
|
/***/ }),
|
|
3082
3089
|
|
|
3083
|
-
/***/ "2719":
|
|
3084
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
3085
|
-
|
|
3086
|
-
// extracted by mini-css-extract-plugin
|
|
3087
|
-
|
|
3088
|
-
/***/ }),
|
|
3089
|
-
|
|
3090
3090
|
/***/ "273d":
|
|
3091
3091
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3092
3092
|
|
|
@@ -13257,6 +13257,17 @@ exports.Konva = Util_1.Util._assign(Global_1.Konva, {
|
|
|
13257
13257
|
});
|
|
13258
13258
|
exports.default = exports.Konva;
|
|
13259
13259
|
|
|
13260
|
+
/***/ }),
|
|
13261
|
+
|
|
13262
|
+
/***/ "3800":
|
|
13263
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
13264
|
+
|
|
13265
|
+
"use strict";
|
|
13266
|
+
/* 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_48280acc_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("07e4");
|
|
13267
|
+
/* 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_48280acc_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_48280acc_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
13268
|
+
/* unused harmony reexport * */
|
|
13269
|
+
|
|
13270
|
+
|
|
13260
13271
|
/***/ }),
|
|
13261
13272
|
|
|
13262
13273
|
/***/ "383f":
|
|
@@ -35679,13 +35690,6 @@ Factory_1.Factory.addGetterSetter(Rect, 'cornerRadius', 0, (0, Validators_1.getN
|
|
|
35679
35690
|
|
|
35680
35691
|
/***/ }),
|
|
35681
35692
|
|
|
35682
|
-
/***/ "6093":
|
|
35683
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
35684
|
-
|
|
35685
|
-
// extracted by mini-css-extract-plugin
|
|
35686
|
-
|
|
35687
|
-
/***/ }),
|
|
35688
|
-
|
|
35689
35693
|
/***/ "6167":
|
|
35690
35694
|
/***/ (function(module, exports, __webpack_require__) {
|
|
35691
35695
|
|
|
@@ -36928,6 +36932,13 @@ var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "sym
|
|
|
36928
36932
|
|
|
36929
36933
|
/***/ }),
|
|
36930
36934
|
|
|
36935
|
+
/***/ "618f":
|
|
36936
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
36937
|
+
|
|
36938
|
+
// extracted by mini-css-extract-plugin
|
|
36939
|
+
|
|
36940
|
+
/***/ }),
|
|
36941
|
+
|
|
36931
36942
|
/***/ "62e4":
|
|
36932
36943
|
/***/ (function(module, exports) {
|
|
36933
36944
|
|
|
@@ -56514,7 +56525,7 @@ module.exports = document && document.documentElement;
|
|
|
56514
56525
|
/***/ "9224":
|
|
56515
56526
|
/***/ (function(module) {
|
|
56516
56527
|
|
|
56517
|
-
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.
|
|
56528
|
+
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.17\",\"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\":{\"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\"]}");
|
|
56518
56529
|
|
|
56519
56530
|
/***/ }),
|
|
56520
56531
|
|
|
@@ -56968,17 +56979,6 @@ module.exports = function (it, key) {
|
|
|
56968
56979
|
return hasOwnProperty.call(it, key);
|
|
56969
56980
|
};
|
|
56970
56981
|
|
|
56971
|
-
/***/ }),
|
|
56972
|
-
|
|
56973
|
-
/***/ "9c27":
|
|
56974
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
56975
|
-
|
|
56976
|
-
"use strict";
|
|
56977
|
-
/* 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_3e15de76_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6093");
|
|
56978
|
-
/* 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_3e15de76_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_3e15de76_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
56979
|
-
/* unused harmony reexport * */
|
|
56980
|
-
|
|
56981
|
-
|
|
56982
56982
|
/***/ }),
|
|
56983
56983
|
|
|
56984
56984
|
/***/ "9cb8":
|
|
@@ -78641,8 +78641,8 @@ if (typeof window !== 'undefined') {
|
|
|
78641
78641
|
// Indicate to webpack that this file can be concatenated
|
|
78642
78642
|
/* harmony default export */ var setPublicPath = (null);
|
|
78643
78643
|
|
|
78644
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
78645
|
-
var
|
|
78644
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"bed71126-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=48280acc&scoped=true
|
|
78645
|
+
var com_graphicsvue_type_template_id_48280acc_scoped_true_render = function render() {
|
|
78646
78646
|
var _vm = this,
|
|
78647
78647
|
_c = _vm._self._c;
|
|
78648
78648
|
return _c('div', {
|
|
@@ -78654,7 +78654,7 @@ var com_graphicsvue_type_template_id_3e15de76_scoped_true_render = function rend
|
|
|
78654
78654
|
};
|
|
78655
78655
|
var staticRenderFns = [];
|
|
78656
78656
|
|
|
78657
|
-
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=
|
|
78657
|
+
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=48280acc&scoped=true
|
|
78658
78658
|
|
|
78659
78659
|
// CONCATENATED MODULE: ./node_modules/camera-controls/dist/camera-controls.module.js
|
|
78660
78660
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
@@ -107038,9 +107038,11 @@ var element_ui_common = __webpack_require__("5c96");
|
|
|
107038
107038
|
|
|
107039
107039
|
var measure_distance_this = null;
|
|
107040
107040
|
var measure_distance_MeasureDistance = function MeasureDistance(renderer, scene, camera, width, height) {
|
|
107041
|
+
var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
|
107041
107042
|
this.renderer = renderer;
|
|
107042
107043
|
this.scene = scene;
|
|
107043
107044
|
this.camera = camera;
|
|
107045
|
+
this.pickRoots = options.pickRoots || null;
|
|
107044
107046
|
this.pointArray = []; // 保存当前操作所添加的点
|
|
107045
107047
|
this.raycaster = new Raycaster();
|
|
107046
107048
|
this.points = []; // 保存页面中所添加的点
|
|
@@ -107051,6 +107053,7 @@ var measure_distance_MeasureDistance = function MeasureDistance(renderer, scene,
|
|
|
107051
107053
|
this.tempLabel = undefined;
|
|
107052
107054
|
this.tipsLabel = undefined;
|
|
107053
107055
|
this.isCompleted = false;
|
|
107056
|
+
this.hasTempPoint = false;
|
|
107054
107057
|
this.timer = null;
|
|
107055
107058
|
this.width = width;
|
|
107056
107059
|
this.height = height;
|
|
@@ -107075,7 +107078,74 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107075
107078
|
this.width = width;
|
|
107076
107079
|
this.height = height;
|
|
107077
107080
|
},
|
|
107081
|
+
getPickRoots: function getPickRoots() {
|
|
107082
|
+
var roots = typeof measure_distance_this.pickRoots === 'function' ? measure_distance_this.pickRoots() : measure_distance_this.pickRoots;
|
|
107083
|
+
if (Array.isArray(roots) && roots.length > 0) {
|
|
107084
|
+
return roots.filter(Boolean);
|
|
107085
|
+
}
|
|
107086
|
+
if (roots) {
|
|
107087
|
+
return [roots];
|
|
107088
|
+
}
|
|
107089
|
+
return measure_distance_this.scene && measure_distance_this.scene.children ? measure_distance_this.scene.children : [];
|
|
107090
|
+
},
|
|
107091
|
+
isExcludedIntersection: function isExcludedIntersection(object) {
|
|
107092
|
+
var current = object;
|
|
107093
|
+
while (current) {
|
|
107094
|
+
var userData = current.userData || {};
|
|
107095
|
+
if (current.visible === false) return true;
|
|
107096
|
+
if (current.name === measure_distance_this.measureName || userData.isMeasureObject === true) return true;
|
|
107097
|
+
if (userData.transformControlHelper === true || userData.outlineProxy === true) return true;
|
|
107098
|
+
if (current.isCamera || current.isLight) return true;
|
|
107099
|
+
if (typeof current.type === 'string' && (/Helper$/i.test(current.type) || current.type === 'CSS2DObject' || current.type === 'TransformControlsRoot')) {
|
|
107100
|
+
return true;
|
|
107101
|
+
}
|
|
107102
|
+
current = current.parent;
|
|
107103
|
+
}
|
|
107104
|
+
return false;
|
|
107105
|
+
},
|
|
107106
|
+
markMeasureObject: function markMeasureObject(object) {
|
|
107107
|
+
object.name = this.measureName;
|
|
107108
|
+
if (!object.userData) {
|
|
107109
|
+
object.userData = {};
|
|
107110
|
+
}
|
|
107111
|
+
object.userData.isMeasureObject = true;
|
|
107112
|
+
return object;
|
|
107113
|
+
},
|
|
107114
|
+
disposeObject: function disposeObject(object) {
|
|
107115
|
+
if (!object) return;
|
|
107116
|
+
if (object.geometry) {
|
|
107117
|
+
object.geometry.dispose();
|
|
107118
|
+
}
|
|
107119
|
+
if (object.material) {
|
|
107120
|
+
object.material.dispose();
|
|
107121
|
+
}
|
|
107122
|
+
this.scene.remove(object);
|
|
107123
|
+
},
|
|
107124
|
+
removeArrayItem: function removeArrayItem(array, item) {
|
|
107125
|
+
if (!item) return;
|
|
107126
|
+
var index = array.indexOf(item);
|
|
107127
|
+
if (index !== -1) {
|
|
107128
|
+
array.splice(index, 1);
|
|
107129
|
+
}
|
|
107130
|
+
},
|
|
107131
|
+
clearTempMeasure: function clearTempMeasure() {
|
|
107132
|
+
// 清理未确认的预览点,避免空点位残留在回退平面上。
|
|
107133
|
+
if (this.hasTempPoint && this.pointArray.length > 0) {
|
|
107134
|
+
this.pointArray.pop();
|
|
107135
|
+
}
|
|
107136
|
+
this.removeArrayItem(this.points, this.tempPoints);
|
|
107137
|
+
this.removeArrayItem(this.polyline, this.tempLine);
|
|
107138
|
+
this.removeArrayItem(this.labels, this.tempLabel);
|
|
107139
|
+
this.disposeObject(this.tempPoints);
|
|
107140
|
+
this.disposeObject(this.tempLine);
|
|
107141
|
+
this.disposeObject(this.tempLabel);
|
|
107142
|
+
this.tempPoints = undefined;
|
|
107143
|
+
this.tempLine = undefined;
|
|
107144
|
+
this.tempLabel = undefined;
|
|
107145
|
+
this.hasTempPoint = false;
|
|
107146
|
+
},
|
|
107078
107147
|
getPosition: function getPosition(e) {
|
|
107148
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
107079
107149
|
var mouse = new Vector2();
|
|
107080
107150
|
var elRect = this.renderer.domElement.getBoundingClientRect();
|
|
107081
107151
|
var canvasX = e.clientX - elRect.left;
|
|
@@ -107083,13 +107153,18 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107083
107153
|
mouse.x = canvasX / elRect.width * 2.0 - 1.0;
|
|
107084
107154
|
mouse.y = -(canvasY / elRect.height) * 2.0 + 1.0;
|
|
107085
107155
|
measure_distance_this.raycaster.setFromCamera(mouse, this.camera);
|
|
107086
|
-
var intersects = measure_distance_this.raycaster.intersectObjects(measure_distance_this.
|
|
107156
|
+
var intersects = measure_distance_this.raycaster.intersectObjects(measure_distance_this.getPickRoots(), true).filter(function (item) {
|
|
107157
|
+
return item && item.object && !measure_distance_this.isExcludedIntersection(item.object);
|
|
107158
|
+
});
|
|
107087
107159
|
if (intersects.length > 0) {
|
|
107088
107160
|
return {
|
|
107089
107161
|
point: intersects[0].point,
|
|
107090
107162
|
isModel: true
|
|
107091
107163
|
};
|
|
107092
107164
|
}
|
|
107165
|
+
if (options.allowPlaneFallback === false) {
|
|
107166
|
+
return null;
|
|
107167
|
+
}
|
|
107093
107168
|
|
|
107094
107169
|
// 如果没有交点,构建一个基于最后一个确认点且面向相机的平面
|
|
107095
107170
|
if (measure_distance_this.pointArray && measure_distance_this.pointArray.length > 0) {
|
|
@@ -107131,7 +107206,7 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107131
107206
|
});
|
|
107132
107207
|
var lineGeometry = new BufferGeometry().setFromPoints([p1, p2]);
|
|
107133
107208
|
var line = new three_core_Line(lineGeometry, lineMaterial);
|
|
107134
|
-
|
|
107209
|
+
this.markMeasureObject(line);
|
|
107135
107210
|
line.renderOrder = 999;
|
|
107136
107211
|
line.frustumCulled = false;
|
|
107137
107212
|
return line;
|
|
@@ -107141,7 +107216,7 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107141
107216
|
div.className = name;
|
|
107142
107217
|
div.textContent = text;
|
|
107143
107218
|
var divLabel = new CSS2DRenderer_CSS2DObject(div);
|
|
107144
|
-
|
|
107219
|
+
this.markMeasureObject(divLabel);
|
|
107145
107220
|
divLabel.position.set(position.x, position.y, position.z);
|
|
107146
107221
|
return divLabel;
|
|
107147
107222
|
},
|
|
@@ -107150,7 +107225,12 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107150
107225
|
var positionResult = measure_distance_this.getPosition(e);
|
|
107151
107226
|
if (positionResult) {
|
|
107152
107227
|
var point = positionResult.point;
|
|
107153
|
-
|
|
107228
|
+
if (measure_distance_this.hasTempPoint) {
|
|
107229
|
+
measure_distance_this.pointArray.splice(measure_distance_this.pointArray.length - 1, 1, point);
|
|
107230
|
+
} else {
|
|
107231
|
+
measure_distance_this.pointArray.push(point);
|
|
107232
|
+
measure_distance_this.hasTempPoint = true;
|
|
107233
|
+
}
|
|
107154
107234
|
var length = measure_distance_this.pointArray.length;
|
|
107155
107235
|
if (measure_distance_this.tempPoints) {
|
|
107156
107236
|
measure_distance_this.tempPoints.position.set(point.x, point.y, point.z);
|
|
@@ -107187,7 +107267,7 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107187
107267
|
div.className = 'tips-label';
|
|
107188
107268
|
div.textContent = label;
|
|
107189
107269
|
var tipsLabel = new CSS2DRenderer_CSS2DObject(div);
|
|
107190
|
-
|
|
107270
|
+
this.markMeasureObject(tipsLabel);
|
|
107191
107271
|
tipsLabel.position.set(position.x + 0.1, position.y, position.z + 0.05);
|
|
107192
107272
|
return tipsLabel;
|
|
107193
107273
|
},
|
|
@@ -107195,7 +107275,6 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107195
107275
|
this.firstTime = new Date().getTime();
|
|
107196
107276
|
},
|
|
107197
107277
|
click: function click(e) {
|
|
107198
|
-
console.log(measure_distance_this.points);
|
|
107199
107278
|
var lastTime = new Date().getTime();
|
|
107200
107279
|
if (lastTime - this.firstTime < 300) {
|
|
107201
107280
|
if (measure_distance_this.isCompleted) {
|
|
@@ -107204,15 +107283,22 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107204
107283
|
clearTimeout(measure_distance_this.timer);
|
|
107205
107284
|
measure_distance_this.timer = setTimeout(function () {
|
|
107206
107285
|
measure_distance_this.isCompleted = false;
|
|
107207
|
-
var positionResult = measure_distance_this.getPosition(e
|
|
107286
|
+
var positionResult = measure_distance_this.getPosition(e, {
|
|
107287
|
+
allowPlaneFallback: false
|
|
107288
|
+
});
|
|
107289
|
+
if (!positionResult || !positionResult.isModel) {
|
|
107290
|
+
measure_distance_this.clearTempMeasure();
|
|
107291
|
+
element_ui_common["Message"].warning('请点击模型进行测量');
|
|
107292
|
+
return;
|
|
107293
|
+
}
|
|
107208
107294
|
if (positionResult) {
|
|
107209
|
-
var point = positionResult.point
|
|
107210
|
-
|
|
107211
|
-
|
|
107212
|
-
|
|
107213
|
-
|
|
107214
|
-
return;
|
|
107295
|
+
var point = positionResult.point;
|
|
107296
|
+
if (measure_distance_this.hasTempPoint && measure_distance_this.pointArray.length > 0) {
|
|
107297
|
+
measure_distance_this.pointArray.splice(measure_distance_this.pointArray.length - 1, 1, point);
|
|
107298
|
+
} else {
|
|
107299
|
+
measure_distance_this.pointArray.push(point);
|
|
107215
107300
|
}
|
|
107301
|
+
measure_distance_this.hasTempPoint = false;
|
|
107216
107302
|
if (measure_distance_this.tipsLabel) {
|
|
107217
107303
|
measure_distance_this.tipsLabel.position.set(point.x + 0.1, point.y, point.z + 0.05);
|
|
107218
107304
|
} else {
|
|
@@ -107227,9 +107313,31 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107227
107313
|
measure_distance_this.points.push(geom);
|
|
107228
107314
|
measure_distance_this.scene.add(geom);
|
|
107229
107315
|
}
|
|
107316
|
+
var length = measure_distance_this.pointArray.length;
|
|
107317
|
+
if (length > 1) {
|
|
107318
|
+
var p1 = measure_distance_this.pointArray[length - 2];
|
|
107319
|
+
var p2 = measure_distance_this.pointArray[length - 1];
|
|
107320
|
+
var dist = p1.distanceTo(p2);
|
|
107321
|
+
var label = "".concat(measure_distance_this.numberToString(dist));
|
|
107322
|
+
var position = new Vector3((p1.x + p2.x) / 2, (p1.y + p2.y) / 2, (p1.z + p2.z) / 2);
|
|
107323
|
+
if (measure_distance_this.tempLine) {
|
|
107324
|
+
measure_distance_this.tempLine.geometry.setFromPoints([p1, p2]);
|
|
107325
|
+
} else {
|
|
107326
|
+
measure_distance_this.tempLine = measure_distance_this.createLine(p1, p2);
|
|
107327
|
+
measure_distance_this.polyline.push(measure_distance_this.tempLine);
|
|
107328
|
+
measure_distance_this.scene.add(measure_distance_this.tempLine);
|
|
107329
|
+
}
|
|
107330
|
+
if (measure_distance_this.tempLabel) {
|
|
107331
|
+
measure_distance_this.tempLabel.element.textContent = label;
|
|
107332
|
+
measure_distance_this.tempLabel.position.set(position.x, position.y, position.z);
|
|
107333
|
+
} else {
|
|
107334
|
+
measure_distance_this.tempLabel = measure_distance_this.createLabel('measure-label', label, position);
|
|
107335
|
+
measure_distance_this.labels.push(measure_distance_this.tempLabel);
|
|
107336
|
+
measure_distance_this.scene.add(measure_distance_this.tempLabel);
|
|
107337
|
+
}
|
|
107338
|
+
}
|
|
107230
107339
|
measure_distance_this.tempLine = undefined;
|
|
107231
107340
|
measure_distance_this.tempLabel = undefined;
|
|
107232
|
-
measure_distance_this.pointArray.push(point);
|
|
107233
107341
|
}
|
|
107234
107342
|
});
|
|
107235
107343
|
}
|
|
@@ -107243,11 +107351,13 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107243
107351
|
clearTimeout(measure_distance_this.timer);
|
|
107244
107352
|
var positionResult = measure_distance_this.getPosition(e);
|
|
107245
107353
|
if (positionResult) {
|
|
107354
|
+
measure_distance_this.clearTempMeasure();
|
|
107246
107355
|
measure_distance_this.isCompleted = true;
|
|
107247
107356
|
measure_distance_this.tempPoints = undefined;
|
|
107248
107357
|
measure_distance_this.tempLine = undefined;
|
|
107249
107358
|
measure_distance_this.tempLabel = undefined;
|
|
107250
107359
|
measure_distance_this.pointArray.splice(0);
|
|
107360
|
+
measure_distance_this.hasTempPoint = false;
|
|
107251
107361
|
measure_distance_this.renderer.domElement.removeEventListener('mousemove', measure_distance_this.mousemove);
|
|
107252
107362
|
}
|
|
107253
107363
|
},
|
|
@@ -107267,6 +107377,7 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107267
107377
|
this.tempPoints = undefined;
|
|
107268
107378
|
this.tempLabel = undefined;
|
|
107269
107379
|
this.tempLine = undefined;
|
|
107380
|
+
this.hasTempPoint = false;
|
|
107270
107381
|
this.scene.remove(this.tipsLabel);
|
|
107271
107382
|
this.tipsLabel = undefined;
|
|
107272
107383
|
this.firstTime = 0;
|
|
@@ -107284,6 +107395,7 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107284
107395
|
this.tempPoints = undefined;
|
|
107285
107396
|
this.tempLabel = undefined;
|
|
107286
107397
|
this.tempLine = undefined;
|
|
107398
|
+
this.hasTempPoint = false;
|
|
107287
107399
|
this.scene.remove(this.tipsLabel);
|
|
107288
107400
|
this.tipsLabel = undefined;
|
|
107289
107401
|
this.firstTime = 0;
|
|
@@ -107322,9 +107434,11 @@ measure_distance_MeasureDistance.prototype = {
|
|
|
107322
107434
|
|
|
107323
107435
|
var measure_area_this = null;
|
|
107324
107436
|
var measure_area_MeasureArea = function MeasureArea(renderer, scene, camera, width, height) {
|
|
107437
|
+
var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
|
107325
107438
|
this.renderer = renderer;
|
|
107326
107439
|
this.scene = scene;
|
|
107327
107440
|
this.camera = camera;
|
|
107441
|
+
this.pickRoots = options.pickRoots || null;
|
|
107328
107442
|
this.pointArray = []; // 保存当前操作所添加的点
|
|
107329
107443
|
this.raycaster = new Raycaster();
|
|
107330
107444
|
this.points = []; // 保存页面中所添加的点
|
|
@@ -107335,6 +107449,7 @@ var measure_area_MeasureArea = function MeasureArea(renderer, scene, camera, wid
|
|
|
107335
107449
|
this.tempLabel = undefined;
|
|
107336
107450
|
this.tipsLabel = undefined;
|
|
107337
107451
|
this.isCompleted = false;
|
|
107452
|
+
this.hasTempPoint = false;
|
|
107338
107453
|
this.timer = null;
|
|
107339
107454
|
this.polygonMesh = undefined;
|
|
107340
107455
|
this.polygons = [];
|
|
@@ -107361,7 +107476,95 @@ measure_area_MeasureArea.prototype = {
|
|
|
107361
107476
|
this.width = width;
|
|
107362
107477
|
this.height = height;
|
|
107363
107478
|
},
|
|
107479
|
+
getPickRoots: function getPickRoots() {
|
|
107480
|
+
var roots = typeof measure_area_this.pickRoots === 'function' ? measure_area_this.pickRoots() : measure_area_this.pickRoots;
|
|
107481
|
+
if (Array.isArray(roots) && roots.length > 0) {
|
|
107482
|
+
return roots.filter(Boolean);
|
|
107483
|
+
}
|
|
107484
|
+
if (roots) {
|
|
107485
|
+
return [roots];
|
|
107486
|
+
}
|
|
107487
|
+
return measure_area_this.scene && measure_area_this.scene.children ? measure_area_this.scene.children : [];
|
|
107488
|
+
},
|
|
107489
|
+
isExcludedIntersection: function isExcludedIntersection(object) {
|
|
107490
|
+
var current = object;
|
|
107491
|
+
while (current) {
|
|
107492
|
+
var userData = current.userData || {};
|
|
107493
|
+
if (current.visible === false) return true;
|
|
107494
|
+
if (current.name === measure_area_this.measureName || userData.isMeasureObject === true) return true;
|
|
107495
|
+
if (userData.transformControlHelper === true || userData.outlineProxy === true) return true;
|
|
107496
|
+
if (current.isCamera || current.isLight) return true;
|
|
107497
|
+
if (typeof current.type === 'string' && (/Helper$/i.test(current.type) || current.type === 'CSS2DObject' || current.type === 'TransformControlsRoot')) {
|
|
107498
|
+
return true;
|
|
107499
|
+
}
|
|
107500
|
+
current = current.parent;
|
|
107501
|
+
}
|
|
107502
|
+
return false;
|
|
107503
|
+
},
|
|
107504
|
+
markMeasureObject: function markMeasureObject(object) {
|
|
107505
|
+
object.name = this.measureName;
|
|
107506
|
+
if (!object.userData) {
|
|
107507
|
+
object.userData = {};
|
|
107508
|
+
}
|
|
107509
|
+
object.userData.isMeasureObject = true;
|
|
107510
|
+
return object;
|
|
107511
|
+
},
|
|
107512
|
+
disposeObject: function disposeObject(object) {
|
|
107513
|
+
if (!object) return;
|
|
107514
|
+
if (object.geometry) {
|
|
107515
|
+
object.geometry.dispose();
|
|
107516
|
+
}
|
|
107517
|
+
if (object.material) {
|
|
107518
|
+
object.material.dispose();
|
|
107519
|
+
}
|
|
107520
|
+
this.scene.remove(object);
|
|
107521
|
+
},
|
|
107522
|
+
removeArrayItem: function removeArrayItem(array, item) {
|
|
107523
|
+
if (!item) return;
|
|
107524
|
+
var index = array.indexOf(item);
|
|
107525
|
+
if (index !== -1) {
|
|
107526
|
+
array.splice(index, 1);
|
|
107527
|
+
}
|
|
107528
|
+
},
|
|
107529
|
+
clearTempMeasure: function clearTempMeasure() {
|
|
107530
|
+
if (this.hasTempPoint && this.pointArray.length > 0) {
|
|
107531
|
+
this.pointArray.pop();
|
|
107532
|
+
}
|
|
107533
|
+
this.removeArrayItem(this.points, this.tempPoints);
|
|
107534
|
+
this.removeArrayItem(this.polyline, this.tempLine);
|
|
107535
|
+
this.disposeObject(this.tempPoints);
|
|
107536
|
+
this.disposeObject(this.tempLine);
|
|
107537
|
+
this.tempPoints = undefined;
|
|
107538
|
+
this.tempLine = undefined;
|
|
107539
|
+
this.hasTempPoint = false;
|
|
107540
|
+
this.updateAreaMeasure();
|
|
107541
|
+
},
|
|
107542
|
+
updateAreaMeasure: function updateAreaMeasure() {
|
|
107543
|
+
if (this.pointArray.length <= 2) {
|
|
107544
|
+
this.removeArrayItem(this.polygons, this.polygonMesh);
|
|
107545
|
+
this.removeArrayItem(this.labels, this.tempLabel);
|
|
107546
|
+
this.disposeObject(this.polygonMesh);
|
|
107547
|
+
this.disposeObject(this.tempLabel);
|
|
107548
|
+
this.polygonMesh = undefined;
|
|
107549
|
+
this.tempLabel = undefined;
|
|
107550
|
+
return;
|
|
107551
|
+
}
|
|
107552
|
+
var area = this.calculateArea(this.pointArray);
|
|
107553
|
+
this.createPolygon(this.pointArray);
|
|
107554
|
+
if (!this.polygonMesh) return;
|
|
107555
|
+
this.polygonMesh.geometry.computeBoundingSphere();
|
|
107556
|
+
var center = this.polygonMesh.geometry.boundingSphere.center;
|
|
107557
|
+
if (this.tempLabel) {
|
|
107558
|
+
this.tempLabel.element.textContent = this.numberToString(area);
|
|
107559
|
+
this.tempLabel.position.set(center.x, center.y, center.z);
|
|
107560
|
+
} else {
|
|
107561
|
+
this.tempLabel = this.createLabel('measure-label', this.numberToString(area), center);
|
|
107562
|
+
this.labels.push(this.tempLabel);
|
|
107563
|
+
this.scene.add(this.tempLabel);
|
|
107564
|
+
}
|
|
107565
|
+
},
|
|
107364
107566
|
getPosition: function getPosition(e) {
|
|
107567
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
107365
107568
|
var mouse = new Vector2();
|
|
107366
107569
|
var elRect = this.renderer.domElement.getBoundingClientRect();
|
|
107367
107570
|
var canvasX = e.clientX - elRect.left;
|
|
@@ -107369,13 +107572,18 @@ measure_area_MeasureArea.prototype = {
|
|
|
107369
107572
|
mouse.x = canvasX / elRect.width * 2.0 - 1.0;
|
|
107370
107573
|
mouse.y = -(canvasY / elRect.height) * 2.0 + 1.0;
|
|
107371
107574
|
measure_area_this.raycaster.setFromCamera(mouse, measure_area_this.camera);
|
|
107372
|
-
var intersects = measure_area_this.raycaster.intersectObjects(measure_area_this.
|
|
107575
|
+
var intersects = measure_area_this.raycaster.intersectObjects(measure_area_this.getPickRoots(), true).filter(function (item) {
|
|
107576
|
+
return item && item.object && !measure_area_this.isExcludedIntersection(item.object);
|
|
107577
|
+
});
|
|
107373
107578
|
if (intersects.length > 0) {
|
|
107374
107579
|
return {
|
|
107375
107580
|
point: intersects[0].point,
|
|
107376
107581
|
isModel: true
|
|
107377
107582
|
};
|
|
107378
107583
|
}
|
|
107584
|
+
if (options.allowPlaneFallback === false) {
|
|
107585
|
+
return null;
|
|
107586
|
+
}
|
|
107379
107587
|
|
|
107380
107588
|
// 如果没有交点,构建一个基于最后一个确认点且面向相机的平面
|
|
107381
107589
|
if (measure_area_this.pointArray && measure_area_this.pointArray.length > 0) {
|
|
@@ -107417,7 +107625,7 @@ measure_area_MeasureArea.prototype = {
|
|
|
107417
107625
|
});
|
|
107418
107626
|
var lineGeometry = new BufferGeometry().setFromPoints([p1, p2]);
|
|
107419
107627
|
var line = new three_core_Line(lineGeometry, lineMaterial);
|
|
107420
|
-
|
|
107628
|
+
this.markMeasureObject(line);
|
|
107421
107629
|
line.renderOrder = 999;
|
|
107422
107630
|
line.frustumCulled = false;
|
|
107423
107631
|
return line;
|
|
@@ -107427,7 +107635,7 @@ measure_area_MeasureArea.prototype = {
|
|
|
107427
107635
|
div.className = name;
|
|
107428
107636
|
div.textContent = text;
|
|
107429
107637
|
var divLabel = new CSS2DRenderer_CSS2DObject(div);
|
|
107430
|
-
|
|
107638
|
+
this.markMeasureObject(divLabel);
|
|
107431
107639
|
divLabel.position.set(position.x, position.y, position.z);
|
|
107432
107640
|
return divLabel;
|
|
107433
107641
|
},
|
|
@@ -107436,7 +107644,12 @@ measure_area_MeasureArea.prototype = {
|
|
|
107436
107644
|
var positionResult = measure_area_this.getPosition(e);
|
|
107437
107645
|
if (positionResult) {
|
|
107438
107646
|
var point = positionResult.point;
|
|
107439
|
-
|
|
107647
|
+
if (measure_area_this.hasTempPoint) {
|
|
107648
|
+
measure_area_this.pointArray.splice(measure_area_this.pointArray.length - 1, 1, point);
|
|
107649
|
+
} else {
|
|
107650
|
+
measure_area_this.pointArray.push(point);
|
|
107651
|
+
measure_area_this.hasTempPoint = true;
|
|
107652
|
+
}
|
|
107440
107653
|
var length = measure_area_this.pointArray.length;
|
|
107441
107654
|
if (measure_area_this.tempPoints) {
|
|
107442
107655
|
measure_area_this.tempPoints.position.set(point.x, point.y, point.z);
|
|
@@ -107455,21 +107668,7 @@ measure_area_MeasureArea.prototype = {
|
|
|
107455
107668
|
measure_area_this.polyline.push(measure_area_this.tempLine);
|
|
107456
107669
|
measure_area_this.scene.add(measure_area_this.tempLine);
|
|
107457
107670
|
}
|
|
107458
|
-
|
|
107459
|
-
var area = measure_area_this.calculateArea(measure_area_this.pointArray);
|
|
107460
|
-
measure_area_this.createPolygon(measure_area_this.pointArray);
|
|
107461
|
-
if (measure_area_this.tempLabel) {
|
|
107462
|
-
measure_area_this.polygonMesh.geometry.computeBoundingSphere();
|
|
107463
|
-
measure_area_this.tempLabel.element.textContent = measure_area_this.numberToString(area); // + '㎡'
|
|
107464
|
-
measure_area_this.tempLabel.position.set(measure_area_this.polygonMesh.geometry.boundingSphere.center.x, measure_area_this.polygonMesh.geometry.boundingSphere.center.y, measure_area_this.polygonMesh.geometry.boundingSphere.center.z);
|
|
107465
|
-
} else {
|
|
107466
|
-
measure_area_this.polygonMesh.geometry.computeBoundingSphere();
|
|
107467
|
-
console.log(measure_area_this.polygonMesh.geometry);
|
|
107468
|
-
measure_area_this.tempLabel = measure_area_this.createLabel('measure-label', area, measure_area_this.polygonMesh.geometry.boundingSphere.center);
|
|
107469
|
-
measure_area_this.labels.push(measure_area_this.tempLabel);
|
|
107470
|
-
measure_area_this.scene.add(measure_area_this.tempLabel);
|
|
107471
|
-
}
|
|
107472
|
-
}
|
|
107671
|
+
measure_area_this.updateAreaMeasure();
|
|
107473
107672
|
if (measure_area_this.tipsLabel) {
|
|
107474
107673
|
measure_area_this.tipsLabel.position.set(point.x + 0.1, point.y, point.z + 0.05);
|
|
107475
107674
|
}
|
|
@@ -107480,7 +107679,7 @@ measure_area_MeasureArea.prototype = {
|
|
|
107480
107679
|
div.className = 'tips-label';
|
|
107481
107680
|
div.textContent = label;
|
|
107482
107681
|
var tipsLabel = new CSS2DRenderer_CSS2DObject(div);
|
|
107483
|
-
|
|
107682
|
+
this.markMeasureObject(tipsLabel);
|
|
107484
107683
|
tipsLabel.position.set(position.x + 0.1, position.y, position.z + 0.05);
|
|
107485
107684
|
return tipsLabel;
|
|
107486
107685
|
},
|
|
@@ -107496,14 +107695,22 @@ measure_area_MeasureArea.prototype = {
|
|
|
107496
107695
|
clearTimeout(measure_area_this.timer);
|
|
107497
107696
|
measure_area_this.timer = setTimeout(function () {
|
|
107498
107697
|
measure_area_this.isCompleted = false;
|
|
107499
|
-
var positionResult = measure_area_this.getPosition(e
|
|
107698
|
+
var positionResult = measure_area_this.getPosition(e, {
|
|
107699
|
+
allowPlaneFallback: false
|
|
107700
|
+
});
|
|
107701
|
+
if (!positionResult || !positionResult.isModel) {
|
|
107702
|
+
measure_area_this.clearTempMeasure();
|
|
107703
|
+
element_ui_common["Message"].warning('请点击模型进行测量');
|
|
107704
|
+
return;
|
|
107705
|
+
}
|
|
107500
107706
|
if (positionResult) {
|
|
107501
|
-
var point = positionResult.point
|
|
107502
|
-
|
|
107503
|
-
|
|
107504
|
-
|
|
107505
|
-
|
|
107707
|
+
var point = positionResult.point;
|
|
107708
|
+
if (measure_area_this.hasTempPoint && measure_area_this.pointArray.length > 0) {
|
|
107709
|
+
measure_area_this.pointArray.splice(measure_area_this.pointArray.length - 1, 1, point);
|
|
107710
|
+
} else {
|
|
107711
|
+
measure_area_this.pointArray.push(point);
|
|
107506
107712
|
}
|
|
107713
|
+
measure_area_this.hasTempPoint = false;
|
|
107507
107714
|
if (measure_area_this.tipsLabel) {
|
|
107508
107715
|
measure_area_this.tipsLabel.position.set(point.x + 0.01, point.y, point.z + 0.05);
|
|
107509
107716
|
} else {
|
|
@@ -107518,8 +107725,20 @@ measure_area_MeasureArea.prototype = {
|
|
|
107518
107725
|
measure_area_this.points.push(geom);
|
|
107519
107726
|
measure_area_this.scene.add(geom);
|
|
107520
107727
|
}
|
|
107728
|
+
var length = measure_area_this.pointArray.length;
|
|
107729
|
+
if (length > 1) {
|
|
107730
|
+
var p1 = measure_area_this.pointArray[length - 2];
|
|
107731
|
+
var p2 = measure_area_this.pointArray[length - 1];
|
|
107732
|
+
if (measure_area_this.tempLine) {
|
|
107733
|
+
measure_area_this.tempLine.geometry.setFromPoints([p1, p2]);
|
|
107734
|
+
} else {
|
|
107735
|
+
measure_area_this.tempLine = measure_area_this.createLine(p1, p2);
|
|
107736
|
+
measure_area_this.polyline.push(measure_area_this.tempLine);
|
|
107737
|
+
measure_area_this.scene.add(measure_area_this.tempLine);
|
|
107738
|
+
}
|
|
107739
|
+
}
|
|
107521
107740
|
measure_area_this.tempLine = undefined;
|
|
107522
|
-
measure_area_this.
|
|
107741
|
+
measure_area_this.updateAreaMeasure();
|
|
107523
107742
|
}
|
|
107524
107743
|
}, 0);
|
|
107525
107744
|
}
|
|
@@ -107533,16 +107752,13 @@ measure_area_MeasureArea.prototype = {
|
|
|
107533
107752
|
clearTimeout(measure_area_this.timer);
|
|
107534
107753
|
var positionResult = measure_area_this.getPosition(e);
|
|
107535
107754
|
if (positionResult) {
|
|
107536
|
-
|
|
107755
|
+
measure_area_this.clearTempMeasure();
|
|
107537
107756
|
measure_area_this.isCompleted = true;
|
|
107538
|
-
if (measure_area_this.tempPoints) {
|
|
107539
|
-
measure_area_this.tempPoints.position.set(point.x, point.y, point.z);
|
|
107540
|
-
measure_area_this.tempPoints = undefined;
|
|
107541
|
-
}
|
|
107542
107757
|
measure_area_this.tempLine = undefined;
|
|
107543
107758
|
measure_area_this.tempLabel = undefined;
|
|
107544
107759
|
measure_area_this.polygonMesh = undefined;
|
|
107545
107760
|
measure_area_this.pointArray.splice(0);
|
|
107761
|
+
measure_area_this.hasTempPoint = false;
|
|
107546
107762
|
measure_area_this.renderer.domElement.removeEventListener('mousemove', measure_area_this.mousemove);
|
|
107547
107763
|
}
|
|
107548
107764
|
},
|
|
@@ -107563,6 +107779,7 @@ measure_area_MeasureArea.prototype = {
|
|
|
107563
107779
|
this.tempPoints = undefined;
|
|
107564
107780
|
this.tempLabel = undefined;
|
|
107565
107781
|
this.tempLine = undefined;
|
|
107782
|
+
this.hasTempPoint = false;
|
|
107566
107783
|
this.scene.remove(this.tipsLabel);
|
|
107567
107784
|
this.tipsLabel = undefined;
|
|
107568
107785
|
}
|
|
@@ -107580,6 +107797,7 @@ measure_area_MeasureArea.prototype = {
|
|
|
107580
107797
|
this.tempPoints = undefined;
|
|
107581
107798
|
this.tempLabel = undefined;
|
|
107582
107799
|
this.tempLine = undefined;
|
|
107800
|
+
this.hasTempPoint = false;
|
|
107583
107801
|
this.scene.remove(this.tipsLabel);
|
|
107584
107802
|
this.tipsLabel = undefined;
|
|
107585
107803
|
},
|
|
@@ -107638,8 +107856,7 @@ measure_area_MeasureArea.prototype = {
|
|
|
107638
107856
|
});
|
|
107639
107857
|
var mesh = new Mesh(geom, material);
|
|
107640
107858
|
mesh.frustumCulled = false;
|
|
107641
|
-
|
|
107642
|
-
mesh.name = measure_area_this.measureName;
|
|
107859
|
+
measure_area_this.markMeasureObject(mesh);
|
|
107643
107860
|
measure_area_this.polygonMesh = mesh;
|
|
107644
107861
|
measure_area_this.scene.add(mesh);
|
|
107645
107862
|
measure_area_this.polygons.push(mesh);
|
|
@@ -107659,9 +107876,11 @@ measure_area_MeasureArea.prototype = {
|
|
|
107659
107876
|
|
|
107660
107877
|
var measure_angle_this = null;
|
|
107661
107878
|
var measure_angle_MeasureAngle = function MeasureAngle(renderer, scene, camera, width, height) {
|
|
107879
|
+
var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
|
107662
107880
|
this.renderer = renderer;
|
|
107663
107881
|
this.scene = scene;
|
|
107664
107882
|
this.camera = camera;
|
|
107883
|
+
this.pickRoots = options.pickRoots || null;
|
|
107665
107884
|
this.pointArray = []; // 保存当前操作所添加的点
|
|
107666
107885
|
this.raycaster = new Raycaster();
|
|
107667
107886
|
this.points = []; // 保存页面中所添加的点
|
|
@@ -107673,6 +107892,7 @@ var measure_angle_MeasureAngle = function MeasureAngle(renderer, scene, camera,
|
|
|
107673
107892
|
this.tempLabel = undefined;
|
|
107674
107893
|
this.tipsLabel = undefined;
|
|
107675
107894
|
this.isCompleted = false;
|
|
107895
|
+
this.hasTempPoint = false;
|
|
107676
107896
|
this.curveLine = undefined;
|
|
107677
107897
|
this.timer = null;
|
|
107678
107898
|
this.width = width;
|
|
@@ -107700,7 +107920,103 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107700
107920
|
this.width = width;
|
|
107701
107921
|
this.height = height;
|
|
107702
107922
|
},
|
|
107923
|
+
getPickRoots: function getPickRoots() {
|
|
107924
|
+
var roots = typeof measure_angle_this.pickRoots === 'function' ? measure_angle_this.pickRoots() : measure_angle_this.pickRoots;
|
|
107925
|
+
if (Array.isArray(roots) && roots.length > 0) {
|
|
107926
|
+
return roots.filter(Boolean);
|
|
107927
|
+
}
|
|
107928
|
+
if (roots) {
|
|
107929
|
+
return [roots];
|
|
107930
|
+
}
|
|
107931
|
+
return measure_angle_this.scene && measure_angle_this.scene.children ? measure_angle_this.scene.children : [];
|
|
107932
|
+
},
|
|
107933
|
+
isExcludedIntersection: function isExcludedIntersection(object) {
|
|
107934
|
+
var current = object;
|
|
107935
|
+
while (current) {
|
|
107936
|
+
var userData = current.userData || {};
|
|
107937
|
+
if (current.visible === false) return true;
|
|
107938
|
+
if (current.name === measure_angle_this.measureName || userData.isMeasureObject === true) return true;
|
|
107939
|
+
if (userData.transformControlHelper === true || userData.outlineProxy === true) return true;
|
|
107940
|
+
if (current.isCamera || current.isLight) return true;
|
|
107941
|
+
if (typeof current.type === 'string' && (/Helper$/i.test(current.type) || current.type === 'CSS2DObject' || current.type === 'TransformControlsRoot')) {
|
|
107942
|
+
return true;
|
|
107943
|
+
}
|
|
107944
|
+
current = current.parent;
|
|
107945
|
+
}
|
|
107946
|
+
return false;
|
|
107947
|
+
},
|
|
107948
|
+
markMeasureObject: function markMeasureObject(object) {
|
|
107949
|
+
object.name = this.measureName;
|
|
107950
|
+
if (!object.userData) {
|
|
107951
|
+
object.userData = {};
|
|
107952
|
+
}
|
|
107953
|
+
object.userData.isMeasureObject = true;
|
|
107954
|
+
return object;
|
|
107955
|
+
},
|
|
107956
|
+
disposeObject: function disposeObject(object) {
|
|
107957
|
+
if (!object) return;
|
|
107958
|
+
if (object.geometry) {
|
|
107959
|
+
object.geometry.dispose();
|
|
107960
|
+
}
|
|
107961
|
+
if (object.material) {
|
|
107962
|
+
object.material.dispose();
|
|
107963
|
+
}
|
|
107964
|
+
this.scene.remove(object);
|
|
107965
|
+
},
|
|
107966
|
+
removeArrayItem: function removeArrayItem(array, item) {
|
|
107967
|
+
if (!item) return;
|
|
107968
|
+
var index = array.indexOf(item);
|
|
107969
|
+
if (index !== -1) {
|
|
107970
|
+
array.splice(index, 1);
|
|
107971
|
+
}
|
|
107972
|
+
},
|
|
107973
|
+
clearTempMeasure: function clearTempMeasure() {
|
|
107974
|
+
if (this.hasTempPoint && this.pointArray.length > 0) {
|
|
107975
|
+
this.pointArray.pop();
|
|
107976
|
+
}
|
|
107977
|
+
this.removeArrayItem(this.points, this.tempPoints);
|
|
107978
|
+
this.removeArrayItem(this.polyline, this.tempLine);
|
|
107979
|
+
this.disposeObject(this.tempPoints);
|
|
107980
|
+
this.disposeObject(this.tempLine);
|
|
107981
|
+
this.tempPoints = undefined;
|
|
107982
|
+
this.tempLine = undefined;
|
|
107983
|
+
this.hasTempPoint = false;
|
|
107984
|
+
this.updateAngleMeasure();
|
|
107985
|
+
},
|
|
107986
|
+
updateAngleMeasure: function updateAngleMeasure() {
|
|
107987
|
+
if (this.pointArray.length !== 3) {
|
|
107988
|
+
this.removeArrayItem(this.labels, this.tempLabel);
|
|
107989
|
+
this.removeArrayItem(this.curves, this.curveLine);
|
|
107990
|
+
this.disposeObject(this.tempLabel);
|
|
107991
|
+
this.disposeObject(this.curveLine);
|
|
107992
|
+
this.tempLabel = undefined;
|
|
107993
|
+
this.curveLine = undefined;
|
|
107994
|
+
return;
|
|
107995
|
+
}
|
|
107996
|
+
var angle = this.calculateAngle().toFixed(2) + '°';
|
|
107997
|
+
var p0 = this.pointArray[0];
|
|
107998
|
+
var p1 = this.pointArray[1];
|
|
107999
|
+
var p2 = this.pointArray[2];
|
|
108000
|
+
var v1 = new Vector3((p0.x + p1.x) / 2, (p0.y + p1.y) / 2, (p0.z + p1.z) / 2);
|
|
108001
|
+
var v2 = new Vector3((p1.x + p2.x) / 2, (p1.y + p2.y) / 2, (p1.z + p2.z) / 2);
|
|
108002
|
+
var curve = new CatmullRomCurve3([v1, v2]);
|
|
108003
|
+
var points = curve.getPoints(50);
|
|
108004
|
+
if (this.tempLabel) {
|
|
108005
|
+
this.tempLabel.element.textContent = angle;
|
|
108006
|
+
this.tempLabel.position.set(p1.x, p1.y, p1.z);
|
|
108007
|
+
} else {
|
|
108008
|
+
this.tempLabel = this.createLabel('measure-label', angle, p1);
|
|
108009
|
+
this.labels.push(this.tempLabel);
|
|
108010
|
+
this.scene.add(this.tempLabel);
|
|
108011
|
+
}
|
|
108012
|
+
if (this.curveLine) {
|
|
108013
|
+
this.curveLine.geometry.setFromPoints(points);
|
|
108014
|
+
} else {
|
|
108015
|
+
this.createCurve(points);
|
|
108016
|
+
}
|
|
108017
|
+
},
|
|
107703
108018
|
getPosition: function getPosition(e) {
|
|
108019
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
107704
108020
|
var mouse = new Vector2();
|
|
107705
108021
|
var elRect = this.renderer.domElement.getBoundingClientRect();
|
|
107706
108022
|
var canvasX = e.clientX - elRect.left;
|
|
@@ -107708,13 +108024,18 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107708
108024
|
mouse.x = canvasX / elRect.width * 2.0 - 1.0;
|
|
107709
108025
|
mouse.y = -(canvasY / elRect.height) * 2.0 + 1.0;
|
|
107710
108026
|
measure_angle_this.raycaster.setFromCamera(mouse, this.camera);
|
|
107711
|
-
var intersects = measure_angle_this.raycaster.intersectObjects(measure_angle_this.
|
|
108027
|
+
var intersects = measure_angle_this.raycaster.intersectObjects(measure_angle_this.getPickRoots(), true).filter(function (item) {
|
|
108028
|
+
return item && item.object && !measure_angle_this.isExcludedIntersection(item.object);
|
|
108029
|
+
});
|
|
107712
108030
|
if (intersects.length > 0) {
|
|
107713
108031
|
return {
|
|
107714
108032
|
point: intersects[0].point,
|
|
107715
108033
|
isModel: true
|
|
107716
108034
|
};
|
|
107717
108035
|
}
|
|
108036
|
+
if (options.allowPlaneFallback === false) {
|
|
108037
|
+
return null;
|
|
108038
|
+
}
|
|
107718
108039
|
|
|
107719
108040
|
// 如果没有交点,构建一个基于最后一个确认点且面向相机的平面
|
|
107720
108041
|
if (measure_angle_this.pointArray && measure_angle_this.pointArray.length > 0) {
|
|
@@ -107754,7 +108075,7 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107754
108075
|
var geom = new SphereGeometry(config.size || 0.3, 28, 28);
|
|
107755
108076
|
var sphere = new Mesh(geom, mesh);
|
|
107756
108077
|
sphere.frustumCulled = false;
|
|
107757
|
-
|
|
108078
|
+
this.markMeasureObject(sphere);
|
|
107758
108079
|
sphere.position.set(pos.x, pos.y, pos.z);
|
|
107759
108080
|
return sphere;
|
|
107760
108081
|
},
|
|
@@ -107771,7 +108092,7 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107771
108092
|
});
|
|
107772
108093
|
var lineGeometry = new BufferGeometry().setFromPoints([p1, p2]);
|
|
107773
108094
|
var line = new three_core_Line(lineGeometry, lineMaterial);
|
|
107774
|
-
|
|
108095
|
+
this.markMeasureObject(line);
|
|
107775
108096
|
line.renderOrder = 999;
|
|
107776
108097
|
line.frustumCulled = false;
|
|
107777
108098
|
return line;
|
|
@@ -107781,16 +108102,28 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107781
108102
|
div.className = name;
|
|
107782
108103
|
div.textContent = text;
|
|
107783
108104
|
var divLabel = new CSS2DRenderer_CSS2DObject(div);
|
|
107784
|
-
|
|
108105
|
+
this.markMeasureObject(divLabel);
|
|
107785
108106
|
divLabel.position.set(position.x, position.y, position.z);
|
|
107786
108107
|
return divLabel;
|
|
107787
108108
|
},
|
|
107788
108109
|
mousemove: function mousemove(e) {
|
|
107789
|
-
if (measure_angle_this.isCompleted || measure_angle_this.pointArray.length === 0)
|
|
108110
|
+
if (measure_angle_this.isCompleted || measure_angle_this.pointArray.length === 0) {
|
|
108111
|
+
var _positionResult = measure_angle_this.getPosition(e);
|
|
108112
|
+
if (_positionResult && measure_angle_this.tipsLabel) {
|
|
108113
|
+
measure_angle_this.updateTipsLabelPosition(_positionResult.point);
|
|
108114
|
+
}
|
|
108115
|
+
return;
|
|
108116
|
+
}
|
|
108117
|
+
if (measure_angle_this.pointArray.length >= 3 && !measure_angle_this.hasTempPoint) return;
|
|
107790
108118
|
var positionResult = measure_angle_this.getPosition(e);
|
|
107791
108119
|
if (positionResult) {
|
|
107792
108120
|
var point = positionResult.point;
|
|
107793
|
-
|
|
108121
|
+
if (measure_angle_this.hasTempPoint) {
|
|
108122
|
+
measure_angle_this.pointArray.splice(measure_angle_this.pointArray.length - 1, 1, point);
|
|
108123
|
+
} else {
|
|
108124
|
+
measure_angle_this.pointArray.push(point);
|
|
108125
|
+
measure_angle_this.hasTempPoint = true;
|
|
108126
|
+
}
|
|
107794
108127
|
var length = measure_angle_this.pointArray.length;
|
|
107795
108128
|
var p1 = measure_angle_this.pointArray[length - 2];
|
|
107796
108129
|
var p2 = measure_angle_this.pointArray[length - 1];
|
|
@@ -107809,38 +108142,21 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107809
108142
|
measure_angle_this.polyline.push(measure_angle_this.tempLine);
|
|
107810
108143
|
measure_angle_this.scene.add(measure_angle_this.tempLine);
|
|
107811
108144
|
}
|
|
107812
|
-
|
|
107813
|
-
if (measure_angle_this.pointArray.length === 3) {
|
|
107814
|
-
var angle = measure_angle_this.calculateAngle().toFixed(2) + '°';
|
|
107815
|
-
var p0 = measure_angle_this.pointArray[0];
|
|
107816
|
-
var _p = measure_angle_this.pointArray[1];
|
|
107817
|
-
var _p2 = measure_angle_this.pointArray[2];
|
|
107818
|
-
var v1 = new Vector3((p0.x + _p.x) / 2, (p0.y + _p.y) / 2, (p0.z + _p.z) / 2);
|
|
107819
|
-
var v2 = new Vector3((_p.x + _p2.x) / 2, (_p.y + _p2.y) / 2, (_p.z + _p2.z) / 2);
|
|
107820
|
-
var curve = new CatmullRomCurve3([v1, v2]);
|
|
107821
|
-
var points = curve.getPoints(50);
|
|
107822
|
-
if (measure_angle_this.tempLabel) {
|
|
107823
|
-
measure_angle_this.tempLabel.element.textContent = angle;
|
|
107824
|
-
measure_angle_this.tempLabel.position.set(_p.x, _p.y, _p.z);
|
|
107825
|
-
measure_angle_this.curveLine.geometry.setFromPoints(points);
|
|
107826
|
-
} else {
|
|
107827
|
-
measure_angle_this.tempLabel = measure_angle_this.createLabel('measure-label', angle, _p);
|
|
107828
|
-
measure_angle_this.labels.push(measure_angle_this.tempLabel);
|
|
107829
|
-
measure_angle_this.scene.add(measure_angle_this.tempLabel);
|
|
107830
|
-
measure_angle_this.createCurve(points);
|
|
107831
|
-
}
|
|
107832
|
-
}
|
|
108145
|
+
measure_angle_this.updateAngleMeasure();
|
|
107833
108146
|
if (measure_angle_this.tipsLabel) {
|
|
107834
|
-
measure_angle_this.
|
|
108147
|
+
measure_angle_this.updateTipsLabelPosition(point);
|
|
107835
108148
|
}
|
|
107836
108149
|
}
|
|
107837
108150
|
},
|
|
108151
|
+
updateTipsLabelPosition: function updateTipsLabelPosition(position) {
|
|
108152
|
+
this.tipsLabel.position.set(position.x + 0.1, position.y, position.z + 0.05);
|
|
108153
|
+
},
|
|
107838
108154
|
createTipsLabel: function createTipsLabel(label, position) {
|
|
107839
108155
|
var div = document.createElement('div');
|
|
107840
108156
|
div.className = 'tips-label';
|
|
107841
108157
|
div.textContent = label;
|
|
107842
108158
|
var tipsLabel = new CSS2DRenderer_CSS2DObject(div);
|
|
107843
|
-
|
|
108159
|
+
this.markMeasureObject(tipsLabel);
|
|
107844
108160
|
tipsLabel.position.set(position.x + 0.1, position.y, position.z + 0.05);
|
|
107845
108161
|
return tipsLabel;
|
|
107846
108162
|
},
|
|
@@ -107856,16 +108172,24 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107856
108172
|
clearTimeout(measure_angle_this.timer);
|
|
107857
108173
|
measure_angle_this.timer = setTimeout(function () {
|
|
107858
108174
|
measure_angle_this.isCompleted = false;
|
|
107859
|
-
var positionResult = measure_angle_this.getPosition(e
|
|
108175
|
+
var positionResult = measure_angle_this.getPosition(e, {
|
|
108176
|
+
allowPlaneFallback: false
|
|
108177
|
+
});
|
|
108178
|
+
if (!positionResult || !positionResult.isModel) {
|
|
108179
|
+
measure_angle_this.clearTempMeasure();
|
|
108180
|
+
element_ui_common["Message"].warning('请点击模型进行测量');
|
|
108181
|
+
return;
|
|
108182
|
+
}
|
|
107860
108183
|
if (positionResult) {
|
|
107861
|
-
var point = positionResult.point
|
|
107862
|
-
|
|
107863
|
-
|
|
107864
|
-
|
|
107865
|
-
|
|
108184
|
+
var point = positionResult.point;
|
|
108185
|
+
if (measure_angle_this.hasTempPoint && measure_angle_this.pointArray.length > 0) {
|
|
108186
|
+
measure_angle_this.pointArray.splice(measure_angle_this.pointArray.length - 1, 1, point);
|
|
108187
|
+
} else {
|
|
108188
|
+
measure_angle_this.pointArray.push(point);
|
|
107866
108189
|
}
|
|
108190
|
+
measure_angle_this.hasTempPoint = false;
|
|
107867
108191
|
if (measure_angle_this.tipsLabel) {
|
|
107868
|
-
measure_angle_this.
|
|
108192
|
+
measure_angle_this.updateTipsLabelPosition(point);
|
|
107869
108193
|
} else {
|
|
107870
108194
|
measure_angle_this.tipsLabel = measure_angle_this.createTipsLabel('左击绘制右击结束', point);
|
|
107871
108195
|
measure_angle_this.scene.add(measure_angle_this.tipsLabel);
|
|
@@ -107878,9 +108202,27 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107878
108202
|
measure_angle_this.points.push(geom);
|
|
107879
108203
|
measure_angle_this.scene.add(geom);
|
|
107880
108204
|
}
|
|
108205
|
+
var length = measure_angle_this.pointArray.length;
|
|
108206
|
+
if (length > 1) {
|
|
108207
|
+
var p1 = measure_angle_this.pointArray[length - 2];
|
|
108208
|
+
var p2 = measure_angle_this.pointArray[length - 1];
|
|
108209
|
+
if (measure_angle_this.tempLine) {
|
|
108210
|
+
measure_angle_this.tempLine.geometry.setFromPoints([p1, p2]);
|
|
108211
|
+
} else {
|
|
108212
|
+
measure_angle_this.tempLine = measure_angle_this.createLine(p1, p2);
|
|
108213
|
+
measure_angle_this.polyline.push(measure_angle_this.tempLine);
|
|
108214
|
+
measure_angle_this.scene.add(measure_angle_this.tempLine);
|
|
108215
|
+
}
|
|
108216
|
+
}
|
|
108217
|
+
measure_angle_this.updateAngleMeasure();
|
|
108218
|
+
if (measure_angle_this.pointArray.length >= 3) {
|
|
108219
|
+
measure_angle_this.isCompleted = true;
|
|
108220
|
+
measure_angle_this.pointArray.splice(0);
|
|
108221
|
+
measure_angle_this.hasTempPoint = false;
|
|
108222
|
+
measure_angle_this.curveLine = undefined;
|
|
108223
|
+
}
|
|
107881
108224
|
measure_angle_this.tempLine = undefined;
|
|
107882
108225
|
measure_angle_this.tempLabel = undefined;
|
|
107883
|
-
measure_angle_this.pointArray.push(point);
|
|
107884
108226
|
}
|
|
107885
108227
|
});
|
|
107886
108228
|
}
|
|
@@ -107894,11 +108236,13 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107894
108236
|
clearTimeout(measure_angle_this.timer);
|
|
107895
108237
|
var positionResult = measure_angle_this.getPosition(e);
|
|
107896
108238
|
if (positionResult) {
|
|
108239
|
+
measure_angle_this.clearTempMeasure();
|
|
107897
108240
|
measure_angle_this.isCompleted = true;
|
|
107898
108241
|
measure_angle_this.tempPoints = undefined;
|
|
107899
108242
|
measure_angle_this.tempLine = undefined;
|
|
107900
108243
|
measure_angle_this.tempLabel = undefined;
|
|
107901
108244
|
measure_angle_this.pointArray.splice(0);
|
|
108245
|
+
measure_angle_this.hasTempPoint = false;
|
|
107902
108246
|
measure_angle_this.renderer.domElement.removeEventListener('mousemove', measure_angle_this.mousemove);
|
|
107903
108247
|
}
|
|
107904
108248
|
},
|
|
@@ -107920,6 +108264,7 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107920
108264
|
this.tempPoints = undefined;
|
|
107921
108265
|
this.tempLabel = undefined;
|
|
107922
108266
|
this.tempLine = undefined;
|
|
108267
|
+
this.hasTempPoint = false;
|
|
107923
108268
|
this.scene.remove(this.tipsLabel);
|
|
107924
108269
|
this.tipsLabel = undefined;
|
|
107925
108270
|
}
|
|
@@ -107938,6 +108283,7 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107938
108283
|
this.tempPoints = undefined;
|
|
107939
108284
|
this.tempLabel = undefined;
|
|
107940
108285
|
this.tempLine = undefined;
|
|
108286
|
+
this.hasTempPoint = false;
|
|
107941
108287
|
this.scene.remove(this.tipsLabel);
|
|
107942
108288
|
this.tipsLabel = undefined;
|
|
107943
108289
|
},
|
|
@@ -107968,6 +108314,7 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107968
108314
|
transparent: true
|
|
107969
108315
|
});
|
|
107970
108316
|
measure_angle_this.curveLine = new three_core_Line(geom, material);
|
|
108317
|
+
measure_angle_this.markMeasureObject(measure_angle_this.curveLine);
|
|
107971
108318
|
measure_angle_this.curveLine.renderOrder = 999;
|
|
107972
108319
|
measure_angle_this.curveLine.frustumCulled = false;
|
|
107973
108320
|
measure_angle_this.curves.push(measure_angle_this.curveLine);
|
|
@@ -107998,9 +108345,11 @@ measure_angle_MeasureAngle.prototype = {
|
|
|
107998
108345
|
|
|
107999
108346
|
var measure_height_this = null;
|
|
108000
108347
|
var measure_height_MeasureHeight = function MeasureHeight(renderer, scene, camera, width, height) {
|
|
108348
|
+
var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
|
108001
108349
|
this.renderer = renderer;
|
|
108002
108350
|
this.scene = scene;
|
|
108003
108351
|
this.camera = camera;
|
|
108352
|
+
this.pickRoots = options.pickRoots || null;
|
|
108004
108353
|
this.pointArray = [];
|
|
108005
108354
|
this.raycaster = new Raycaster();
|
|
108006
108355
|
this.points = [];
|
|
@@ -108033,7 +108382,41 @@ measure_height_MeasureHeight.prototype = {
|
|
|
108033
108382
|
this.width = width;
|
|
108034
108383
|
this.height = height;
|
|
108035
108384
|
},
|
|
108385
|
+
getPickRoots: function getPickRoots() {
|
|
108386
|
+
var roots = typeof measure_height_this.pickRoots === 'function' ? measure_height_this.pickRoots() : measure_height_this.pickRoots;
|
|
108387
|
+
if (Array.isArray(roots) && roots.length > 0) {
|
|
108388
|
+
return roots.filter(Boolean);
|
|
108389
|
+
}
|
|
108390
|
+
if (roots) {
|
|
108391
|
+
return [roots];
|
|
108392
|
+
}
|
|
108393
|
+
return measure_height_this.scene && measure_height_this.scene.children ? measure_height_this.scene.children : [];
|
|
108394
|
+
},
|
|
108395
|
+
isExcludedIntersection: function isExcludedIntersection(object) {
|
|
108396
|
+
var current = object;
|
|
108397
|
+
while (current) {
|
|
108398
|
+
var userData = current.userData || {};
|
|
108399
|
+
if (current.visible === false) return true;
|
|
108400
|
+
if (current.name === measure_height_this.measureName || userData.isMeasureObject === true) return true;
|
|
108401
|
+
if (userData.transformControlHelper === true || userData.outlineProxy === true) return true;
|
|
108402
|
+
if (current.isCamera || current.isLight) return true;
|
|
108403
|
+
if (typeof current.type === 'string' && (/Helper$/i.test(current.type) || current.type === 'CSS2DObject' || current.type === 'TransformControlsRoot')) {
|
|
108404
|
+
return true;
|
|
108405
|
+
}
|
|
108406
|
+
current = current.parent;
|
|
108407
|
+
}
|
|
108408
|
+
return false;
|
|
108409
|
+
},
|
|
108410
|
+
markMeasureObject: function markMeasureObject(object) {
|
|
108411
|
+
object.name = this.measureName;
|
|
108412
|
+
if (!object.userData) {
|
|
108413
|
+
object.userData = {};
|
|
108414
|
+
}
|
|
108415
|
+
object.userData.isMeasureObject = true;
|
|
108416
|
+
return object;
|
|
108417
|
+
},
|
|
108036
108418
|
getPosition: function getPosition(e) {
|
|
108419
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
108037
108420
|
var mouse = new Vector2();
|
|
108038
108421
|
var elRect = this.renderer.domElement.getBoundingClientRect();
|
|
108039
108422
|
var canvasX = e.clientX - elRect.left;
|
|
@@ -108041,13 +108424,18 @@ measure_height_MeasureHeight.prototype = {
|
|
|
108041
108424
|
mouse.x = canvasX / elRect.width * 2.0 - 1.0;
|
|
108042
108425
|
mouse.y = -(canvasY / elRect.height) * 2.0 + 1.0;
|
|
108043
108426
|
measure_height_this.raycaster.setFromCamera(mouse, this.camera);
|
|
108044
|
-
var intersects = measure_height_this.raycaster.intersectObjects(measure_height_this.
|
|
108427
|
+
var intersects = measure_height_this.raycaster.intersectObjects(measure_height_this.getPickRoots(), true).filter(function (item) {
|
|
108428
|
+
return item && item.object && !measure_height_this.isExcludedIntersection(item.object);
|
|
108429
|
+
});
|
|
108045
108430
|
if (intersects.length > 0) {
|
|
108046
108431
|
return {
|
|
108047
108432
|
point: intersects[0].point,
|
|
108048
108433
|
isModel: true
|
|
108049
108434
|
};
|
|
108050
108435
|
}
|
|
108436
|
+
if (options.allowPlaneFallback === false) {
|
|
108437
|
+
return null;
|
|
108438
|
+
}
|
|
108051
108439
|
if (measure_height_this.pointArray && measure_height_this.pointArray.length > 0) {
|
|
108052
108440
|
var lastPoint = measure_height_this.pointArray.length === 1 ? measure_height_this.pointArray[0] : measure_height_this.pointArray[measure_height_this.pointArray.length - 2];
|
|
108053
108441
|
var cameraDir = new Vector3();
|
|
@@ -108085,7 +108473,7 @@ measure_height_MeasureHeight.prototype = {
|
|
|
108085
108473
|
});
|
|
108086
108474
|
var lineGeometry = new BufferGeometry().setFromPoints([p1, p2]);
|
|
108087
108475
|
var line = new three_core_Line(lineGeometry, lineMaterial);
|
|
108088
|
-
|
|
108476
|
+
this.markMeasureObject(line);
|
|
108089
108477
|
line.renderOrder = 999;
|
|
108090
108478
|
line.frustumCulled = false;
|
|
108091
108479
|
return line;
|
|
@@ -108095,7 +108483,7 @@ measure_height_MeasureHeight.prototype = {
|
|
|
108095
108483
|
div.className = name;
|
|
108096
108484
|
div.textContent = text;
|
|
108097
108485
|
var divLabel = new CSS2DRenderer_CSS2DObject(div);
|
|
108098
|
-
|
|
108486
|
+
this.markMeasureObject(divLabel);
|
|
108099
108487
|
divLabel.position.set(position.x, position.y, position.z);
|
|
108100
108488
|
return divLabel;
|
|
108101
108489
|
},
|
|
@@ -108121,7 +108509,7 @@ measure_height_MeasureHeight.prototype = {
|
|
|
108121
108509
|
div.className = 'tips-label';
|
|
108122
108510
|
div.textContent = label;
|
|
108123
108511
|
var tipsLabel = new CSS2DRenderer_CSS2DObject(div);
|
|
108124
|
-
|
|
108512
|
+
this.markMeasureObject(tipsLabel);
|
|
108125
108513
|
tipsLabel.position.set(position.x + 0.1, position.y, position.z + 0.05);
|
|
108126
108514
|
return tipsLabel;
|
|
108127
108515
|
},
|
|
@@ -108134,14 +108522,15 @@ measure_height_MeasureHeight.prototype = {
|
|
|
108134
108522
|
clearTimeout(measure_height_this.timer);
|
|
108135
108523
|
measure_height_this.timer = setTimeout(function () {
|
|
108136
108524
|
measure_height_this.isCompleted = false;
|
|
108137
|
-
var positionResult = measure_height_this.getPosition(e
|
|
108525
|
+
var positionResult = measure_height_this.getPosition(e, {
|
|
108526
|
+
allowPlaneFallback: false
|
|
108527
|
+
});
|
|
108528
|
+
if (!positionResult || !positionResult.isModel) {
|
|
108529
|
+
element_ui_common["Message"].warning('请点击模型进行测量');
|
|
108530
|
+
return;
|
|
108531
|
+
}
|
|
108138
108532
|
if (positionResult) {
|
|
108139
|
-
var point = positionResult.point
|
|
108140
|
-
isModel = positionResult.isModel;
|
|
108141
|
-
if (!isModel) {
|
|
108142
|
-
element_ui_common["Message"].warning('请点击模型进行测量');
|
|
108143
|
-
return;
|
|
108144
|
-
}
|
|
108533
|
+
var point = positionResult.point;
|
|
108145
108534
|
// if (_this.tipsLabel) {
|
|
108146
108535
|
// _this.tipsLabel.position.set(point.x + 0.1, point.y, point.z + 0.05);
|
|
108147
108536
|
// } else {
|
|
@@ -125347,7 +125736,14 @@ var isDebug = false || false === true;
|
|
|
125347
125736
|
/*
|
|
125348
125737
|
参数: type: '', distance、area、angle、height, 暂时只提供距离、面积、角度、高度这四种方式
|
|
125349
125738
|
*/
|
|
125739
|
+
getMeasurePickRoots: function getMeasurePickRoots() {
|
|
125740
|
+
if (this.modelGroup && this.modelGroup.children && this.modelGroup.children.length > 0) {
|
|
125741
|
+
return [this.modelGroup];
|
|
125742
|
+
}
|
|
125743
|
+
return this.scene && this.scene.children ? this.scene.children : [];
|
|
125744
|
+
},
|
|
125350
125745
|
openMeasure: function openMeasure(type) {
|
|
125746
|
+
var _this47 = this;
|
|
125351
125747
|
var isClear = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
125352
125748
|
if (this.threeMeasure) {
|
|
125353
125749
|
this.threeMeasure.close(isClear);
|
|
@@ -125357,19 +125753,35 @@ var isDebug = false || false === true;
|
|
|
125357
125753
|
// renderEnabled = true
|
|
125358
125754
|
switch (type) {
|
|
125359
125755
|
case 'distance':
|
|
125360
|
-
this.threeMeasure = new measure_distance.MeasureDistance(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight
|
|
125756
|
+
this.threeMeasure = new measure_distance.MeasureDistance(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
|
|
125757
|
+
pickRoots: function pickRoots() {
|
|
125758
|
+
return _this47.getMeasurePickRoots();
|
|
125759
|
+
}
|
|
125760
|
+
});
|
|
125361
125761
|
this.threeMeasure.start();
|
|
125362
125762
|
break;
|
|
125363
125763
|
case 'area':
|
|
125364
|
-
this.threeMeasure = new measure_area.MeasureArea(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight
|
|
125764
|
+
this.threeMeasure = new measure_area.MeasureArea(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
|
|
125765
|
+
pickRoots: function pickRoots() {
|
|
125766
|
+
return _this47.getMeasurePickRoots();
|
|
125767
|
+
}
|
|
125768
|
+
});
|
|
125365
125769
|
this.threeMeasure.start();
|
|
125366
125770
|
break;
|
|
125367
125771
|
case 'angle':
|
|
125368
|
-
this.threeMeasure = new measure_angle.MeasureAngle(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight
|
|
125772
|
+
this.threeMeasure = new measure_angle.MeasureAngle(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
|
|
125773
|
+
pickRoots: function pickRoots() {
|
|
125774
|
+
return _this47.getMeasurePickRoots();
|
|
125775
|
+
}
|
|
125776
|
+
});
|
|
125369
125777
|
this.threeMeasure.start();
|
|
125370
125778
|
break;
|
|
125371
125779
|
case 'height':
|
|
125372
|
-
this.threeMeasure = new measure_height.MeasureHeight(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight
|
|
125780
|
+
this.threeMeasure = new measure_height.MeasureHeight(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
|
|
125781
|
+
pickRoots: function pickRoots() {
|
|
125782
|
+
return _this47.getMeasurePickRoots();
|
|
125783
|
+
}
|
|
125784
|
+
});
|
|
125373
125785
|
this.threeMeasure.start();
|
|
125374
125786
|
break;
|
|
125375
125787
|
}
|
|
@@ -125387,20 +125799,53 @@ var isDebug = false || false === true;
|
|
|
125387
125799
|
// 移除键盘事件监听器
|
|
125388
125800
|
document.removeEventListener('keydown', this.handleMeasureKeyDown, false);
|
|
125389
125801
|
},
|
|
125390
|
-
|
|
125391
|
-
|
|
125392
|
-
|
|
125393
|
-
|
|
125394
|
-
|
|
125395
|
-
|
|
125396
|
-
|
|
125397
|
-
|
|
125802
|
+
disposeMeasureObject: function disposeMeasureObject(object) {
|
|
125803
|
+
if (!object) return;
|
|
125804
|
+
if (object.geometry) {
|
|
125805
|
+
object.geometry.dispose();
|
|
125806
|
+
}
|
|
125807
|
+
if (Array.isArray(object.material)) {
|
|
125808
|
+
object.material.forEach(function (material) {
|
|
125809
|
+
material && material.dispose && material.dispose();
|
|
125810
|
+
});
|
|
125811
|
+
} else if (object.material && object.material.dispose) {
|
|
125812
|
+
object.material.dispose();
|
|
125813
|
+
}
|
|
125814
|
+
if (object.element && object.element.parentNode) {
|
|
125815
|
+
object.element.parentNode.removeChild(object.element);
|
|
125816
|
+
}
|
|
125817
|
+
},
|
|
125818
|
+
isMeasureObject: function isMeasureObject(object) {
|
|
125819
|
+
if (!object) return false;
|
|
125820
|
+
var userData = object.userData || {};
|
|
125821
|
+
return object.name === 'measureObj' || userData.isMeasureObject === true;
|
|
125822
|
+
},
|
|
125823
|
+
removeMeasureObjectsFromScene: function removeMeasureObjectsFromScene() {
|
|
125824
|
+
var _this48 = this;
|
|
125825
|
+
if (!this.scene) return;
|
|
125826
|
+
var measureObjects = [];
|
|
125827
|
+
this.scene.traverse(function (object) {
|
|
125828
|
+
if (_this48.isMeasureObject(object)) {
|
|
125829
|
+
measureObjects.push(object);
|
|
125398
125830
|
}
|
|
125399
|
-
if (_this47.scene) _this47.scene.remove(item);
|
|
125400
125831
|
});
|
|
125832
|
+
measureObjects.forEach(function (object) {
|
|
125833
|
+
if (object.parent) {
|
|
125834
|
+
object.parent.remove(object);
|
|
125835
|
+
} else {
|
|
125836
|
+
_this48.scene.remove(object);
|
|
125837
|
+
}
|
|
125838
|
+
_this48.disposeMeasureObject(object);
|
|
125839
|
+
});
|
|
125840
|
+
},
|
|
125841
|
+
// 增加一个清除所有测量结果的方法,清理历史测量实例遗留的对象
|
|
125842
|
+
clearMeasureByName: function clearMeasureByName() {
|
|
125401
125843
|
if (this.threeMeasure) {
|
|
125402
125844
|
this.threeMeasure.clear();
|
|
125403
125845
|
}
|
|
125846
|
+
this.removeMeasureObjectsFromScene();
|
|
125847
|
+
this.measureFlag = false;
|
|
125848
|
+
document.removeEventListener('keydown', this.handleMeasureKeyDown, false);
|
|
125404
125849
|
},
|
|
125405
125850
|
handleMeasureKeyDown: function handleMeasureKeyDown(event) {
|
|
125406
125851
|
// 检查是否按下了ESC键
|
|
@@ -125463,12 +125908,12 @@ var isDebug = false || false === true;
|
|
|
125463
125908
|
参数: object, 目标实体,
|
|
125464
125909
|
*/
|
|
125465
125910
|
isolate: function isolate(object) {
|
|
125466
|
-
var
|
|
125911
|
+
var _this49 = this;
|
|
125467
125912
|
if (!this.scene) return;
|
|
125468
125913
|
// 隔离 将目标实体以外的实体隐藏掉
|
|
125469
125914
|
this.scene.traverse(function (item) {
|
|
125470
125915
|
if (item.isMesh && item.name !== object.name) {
|
|
125471
|
-
var offsetMatrix = new
|
|
125916
|
+
var offsetMatrix = new _this49.THREE.Matrix4().copy(item.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
|
|
125472
125917
|
item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
|
|
125473
125918
|
item.instanceMatrix.needsUpdate = true;
|
|
125474
125919
|
}
|
|
@@ -125476,7 +125921,7 @@ var isDebug = false || false === true;
|
|
|
125476
125921
|
},
|
|
125477
125922
|
// 还原操作 将修改过的实体进行恢复
|
|
125478
125923
|
restore: function restore() {
|
|
125479
|
-
var
|
|
125924
|
+
var _this50 = this;
|
|
125480
125925
|
if (!this.scene) return;
|
|
125481
125926
|
this.scene.traverse(function (item) {
|
|
125482
125927
|
if (item.isMesh) {
|
|
@@ -125498,20 +125943,20 @@ var isDebug = false || false === true;
|
|
|
125498
125943
|
item.userData.translateMatrixInvert = null;
|
|
125499
125944
|
}
|
|
125500
125945
|
if (item.userData.combineMatrixInvert) {
|
|
125501
|
-
|
|
125946
|
+
_this50.rotateMesh(item, {
|
|
125502
125947
|
x: 0,
|
|
125503
125948
|
y: 0,
|
|
125504
125949
|
z: 0
|
|
125505
125950
|
});
|
|
125506
125951
|
item.userData.combineMatrixInvert = null;
|
|
125507
125952
|
}
|
|
125508
|
-
var copyMatrix =
|
|
125953
|
+
var copyMatrix = _this50.getInstanceCopyMatrix(item, instanceId);
|
|
125509
125954
|
if (!copyMatrix) return;
|
|
125510
|
-
var sourceHidden =
|
|
125511
|
-
var offsetMatrix = new
|
|
125955
|
+
var sourceHidden = _this50.isSourceHiddenInstance(item, instanceId);
|
|
125956
|
+
var offsetMatrix = new _this50.THREE.Matrix4().copy(copyMatrix);
|
|
125512
125957
|
if (sourceHidden) {
|
|
125513
125958
|
offsetMatrix.makeTranslation(9999999, 9999999, 9999999);
|
|
125514
|
-
|
|
125959
|
+
_this50.removeOutlineInstanceProxy(item, item.userData.instanceIndex);
|
|
125515
125960
|
}
|
|
125516
125961
|
item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
|
|
125517
125962
|
item.instanceMatrix.needsUpdate = true;
|
|
@@ -125520,7 +125965,7 @@ var isDebug = false || false === true;
|
|
|
125520
125965
|
},
|
|
125521
125966
|
// 添加自定义模型, 暂时只支持glb、gltf格式
|
|
125522
125967
|
addCustomModel: function addCustomModel(name, position, url) {
|
|
125523
|
-
var
|
|
125968
|
+
var _this51 = this;
|
|
125524
125969
|
var scale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
125525
125970
|
var immediately = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
125526
125971
|
var callback = arguments.length > 5 ? arguments[5] : undefined;
|
|
@@ -125531,41 +125976,41 @@ var isDebug = false || false === true;
|
|
|
125531
125976
|
locationModel.scale.set(scale, scale, scale);
|
|
125532
125977
|
locationModel.updateMatrixWorld();
|
|
125533
125978
|
if (immediately) {
|
|
125534
|
-
|
|
125979
|
+
_this51.cameraControls.fitToSphere(gltf.this.scene, true);
|
|
125535
125980
|
}
|
|
125536
125981
|
// 动画混合器
|
|
125537
125982
|
// 不参与裁剪
|
|
125538
125983
|
locationModel.userData.cull = false;
|
|
125539
125984
|
locationModel.name = name;
|
|
125540
|
-
if (
|
|
125541
|
-
locationModel.position.copy(new
|
|
125985
|
+
if (_this51.scene) _this51.scene.add(locationModel);
|
|
125986
|
+
locationModel.position.copy(new _this51.THREE.Vector3(position.x, position.y, position.z));
|
|
125542
125987
|
if (gltf.animations.length > 0) {
|
|
125543
|
-
var actionMixer = new
|
|
125988
|
+
var actionMixer = new _this51.THREE.AnimationMixer(gltf.this.scene);
|
|
125544
125989
|
var walkActive = actionMixer.clipAction(gltf.animations[0]);
|
|
125545
125990
|
walkActive.play();
|
|
125546
|
-
|
|
125547
|
-
|
|
125991
|
+
_this51.modelActive.push(walkActive);
|
|
125992
|
+
_this51.modelActions.push(actionMixer);
|
|
125548
125993
|
}
|
|
125549
125994
|
callback && callback();
|
|
125550
125995
|
});
|
|
125551
125996
|
},
|
|
125552
125997
|
// 删除添加的自定义模型
|
|
125553
125998
|
removeCustomModel: function removeCustomModel(name) {
|
|
125554
|
-
var
|
|
125999
|
+
var _this52 = this;
|
|
125555
126000
|
var obj = this.getObjectByName(name);
|
|
125556
126001
|
obj.forEach(function (item, index) {
|
|
125557
126002
|
if (item.animations > 0) {
|
|
125558
126003
|
item.removeFromParent();
|
|
125559
|
-
|
|
125560
|
-
|
|
126004
|
+
_this52.modelActions[index].uncacheRoot(item);
|
|
126005
|
+
_this52.modelActions[index].uncacheRoot(_this52.modelActive[index]);
|
|
125561
126006
|
}
|
|
125562
126007
|
item.traverse(function (child) {
|
|
125563
|
-
if (child instanceof
|
|
126008
|
+
if (child instanceof _this52.THREE.Mesh) {
|
|
125564
126009
|
child.geometry.dispose();
|
|
125565
126010
|
child.material.dispose();
|
|
125566
126011
|
}
|
|
125567
126012
|
});
|
|
125568
|
-
if (
|
|
126013
|
+
if (_this52.scene) _this52.scene.remove(item);
|
|
125569
126014
|
});
|
|
125570
126015
|
this.modelActions.splice(0);
|
|
125571
126016
|
this.modelActive.splice(0);
|
|
@@ -125627,7 +126072,7 @@ var isDebug = false || false === true;
|
|
|
125627
126072
|
return size;
|
|
125628
126073
|
},
|
|
125629
126074
|
animate: function animate() {
|
|
125630
|
-
var
|
|
126075
|
+
var _this53 = this;
|
|
125631
126076
|
if (isDebug) {
|
|
125632
126077
|
this.stats && this.stats.begin(); // 开始帧率统计
|
|
125633
126078
|
}
|
|
@@ -125641,7 +126086,7 @@ var isDebug = false || false === true;
|
|
|
125641
126086
|
if (this.timeStamp > singleFrameTime) {
|
|
125642
126087
|
if (this.modelActions.length > 0) {
|
|
125643
126088
|
this.modelActions.forEach(function (item) {
|
|
125644
|
-
item.update(
|
|
126089
|
+
item.update(_this53.timeStamp);
|
|
125645
126090
|
});
|
|
125646
126091
|
}
|
|
125647
126092
|
this.cameraControls.enabled && this.cameraControls.update(this.timeStamp);
|
|
@@ -125999,25 +126444,25 @@ var isDebug = false || false === true;
|
|
|
125999
126444
|
* 加载下一批数据
|
|
126000
126445
|
*/
|
|
126001
126446
|
loadNextBatch: function loadNextBatch() {
|
|
126002
|
-
var
|
|
126447
|
+
var _this54 = this;
|
|
126003
126448
|
return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee1() {
|
|
126004
126449
|
var loadingState, batch, _t3;
|
|
126005
126450
|
return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context1) {
|
|
126006
126451
|
while (1) switch (_context1.p = _context1.n) {
|
|
126007
126452
|
case 0:
|
|
126008
|
-
loadingState =
|
|
126009
|
-
if (
|
|
126453
|
+
loadingState = _this54.noObserver ? _this54.noObserver.batchLoadingState : _this54.batchLoadingState;
|
|
126454
|
+
if (_this54.isBatchLoadingSceneReady()) {
|
|
126010
126455
|
_context1.n = 1;
|
|
126011
126456
|
break;
|
|
126012
126457
|
}
|
|
126013
|
-
|
|
126458
|
+
_this54.stopBatchLoading('scene_unavailable');
|
|
126014
126459
|
return _context1.a(2);
|
|
126015
126460
|
case 1:
|
|
126016
126461
|
if (!(!loadingState.isLoading || loadingState.currentBatch >= loadingState.pendingData.length)) {
|
|
126017
126462
|
_context1.n = 2;
|
|
126018
126463
|
break;
|
|
126019
126464
|
}
|
|
126020
|
-
|
|
126465
|
+
_this54.completeBatchLoading();
|
|
126021
126466
|
return _context1.a(2);
|
|
126022
126467
|
case 2:
|
|
126023
126468
|
if (!loadingState.isPaused) {
|
|
@@ -126026,7 +126471,7 @@ var isDebug = false || false === true;
|
|
|
126026
126471
|
}
|
|
126027
126472
|
// 如果暂停,延迟一段时间后再次检查
|
|
126028
126473
|
loadingState.animationFrameId = requestAnimationFrame(function () {
|
|
126029
|
-
|
|
126474
|
+
_this54.loadNextBatch();
|
|
126030
126475
|
});
|
|
126031
126476
|
return _context1.a(2);
|
|
126032
126477
|
case 3:
|
|
@@ -126036,7 +126481,7 @@ var isDebug = false || false === true;
|
|
|
126036
126481
|
}
|
|
126037
126482
|
// 如果正在交互,延迟一段时间后再次检查
|
|
126038
126483
|
loadingState.animationFrameId = requestAnimationFrame(function () {
|
|
126039
|
-
|
|
126484
|
+
_this54.loadNextBatch();
|
|
126040
126485
|
});
|
|
126041
126486
|
return _context1.a(2);
|
|
126042
126487
|
case 4:
|
|
@@ -126045,13 +126490,13 @@ var isDebug = false || false === true;
|
|
|
126045
126490
|
_context1.n = 5;
|
|
126046
126491
|
break;
|
|
126047
126492
|
}
|
|
126048
|
-
|
|
126493
|
+
_this54.completeBatchLoading();
|
|
126049
126494
|
return _context1.a(2);
|
|
126050
126495
|
case 5:
|
|
126051
126496
|
_context1.p = 5;
|
|
126052
126497
|
console.log('加载批次:', loadingState.currentBatch);
|
|
126053
126498
|
_context1.n = 6;
|
|
126054
|
-
return
|
|
126499
|
+
return _this54.processWithMainThread(batch);
|
|
126055
126500
|
case 6:
|
|
126056
126501
|
if (loadingState.isLoading) {
|
|
126057
126502
|
_context1.n = 7;
|
|
@@ -126059,11 +126504,11 @@ var isDebug = false || false === true;
|
|
|
126059
126504
|
}
|
|
126060
126505
|
return _context1.a(2);
|
|
126061
126506
|
case 7:
|
|
126062
|
-
if (
|
|
126507
|
+
if (_this54.isBatchLoadingSceneReady()) {
|
|
126063
126508
|
_context1.n = 8;
|
|
126064
126509
|
break;
|
|
126065
126510
|
}
|
|
126066
|
-
|
|
126511
|
+
_this54.stopBatchLoading('scene_unavailable');
|
|
126067
126512
|
return _context1.a(2);
|
|
126068
126513
|
case 8:
|
|
126069
126514
|
// 更新进度
|
|
@@ -126071,8 +126516,8 @@ var isDebug = false || false === true;
|
|
|
126071
126516
|
loadingState.currentBatch++;
|
|
126072
126517
|
|
|
126073
126518
|
// 同步到响应式状态
|
|
126074
|
-
|
|
126075
|
-
|
|
126519
|
+
_this54.batchLoadingState.loadedCount = loadingState.loadedCount;
|
|
126520
|
+
_this54.batchLoadingState.currentBatch = loadingState.currentBatch;
|
|
126076
126521
|
|
|
126077
126522
|
// 调用进度回调
|
|
126078
126523
|
if (loadingState.onProgress) {
|
|
@@ -126086,7 +126531,7 @@ var isDebug = false || false === true;
|
|
|
126086
126531
|
|
|
126087
126532
|
// 使用 requestAnimationFrame 在下一帧继续加载
|
|
126088
126533
|
loadingState.animationFrameId = requestAnimationFrame(function () {
|
|
126089
|
-
|
|
126534
|
+
_this54.loadNextBatch();
|
|
126090
126535
|
});
|
|
126091
126536
|
_context1.n = 10;
|
|
126092
126537
|
break;
|
|
@@ -126097,7 +126542,7 @@ var isDebug = false || false === true;
|
|
|
126097
126542
|
|
|
126098
126543
|
// 继续下一批次
|
|
126099
126544
|
loadingState.animationFrameId = requestAnimationFrame(function () {
|
|
126100
|
-
|
|
126545
|
+
_this54.loadNextBatch();
|
|
126101
126546
|
});
|
|
126102
126547
|
case 10:
|
|
126103
126548
|
return _context1.a(2);
|
|
@@ -126109,20 +126554,20 @@ var isDebug = false || false === true;
|
|
|
126109
126554
|
* 使用主线程处理批次数据
|
|
126110
126555
|
*/
|
|
126111
126556
|
processWithMainThread: function processWithMainThread(batch) {
|
|
126112
|
-
var
|
|
126557
|
+
var _this55 = this;
|
|
126113
126558
|
return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee10() {
|
|
126114
126559
|
var loadingState;
|
|
126115
126560
|
return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context10) {
|
|
126116
126561
|
while (1) switch (_context10.n) {
|
|
126117
126562
|
case 0:
|
|
126118
|
-
loadingState =
|
|
126563
|
+
loadingState = _this55.noObserver ? _this55.noObserver.batchLoadingState : _this55.batchLoadingState;
|
|
126119
126564
|
loadingState.options.batchSize = loadingState.batchSize;
|
|
126120
126565
|
loadingState.options.resetState = loadingState.currentBatch === 0;
|
|
126121
126566
|
// 使用原始的handleInstancedMeshModel方法
|
|
126122
126567
|
|
|
126123
126568
|
isDebug && performance.mark('handleInstancedMeshModel-start');
|
|
126124
126569
|
_context10.n = 1;
|
|
126125
|
-
return handleInstancedMeshModel(
|
|
126570
|
+
return handleInstancedMeshModel(_this55.modelGroup, batch.instances, batch.drawObjs, '', _this55.scene, loadingState.color, loadingState.meshNameConfig, '', loadingState.options);
|
|
126126
126571
|
case 1:
|
|
126127
126572
|
isDebug && performance.mark('handleInstancedMeshModel-end');
|
|
126128
126573
|
isDebug && performance.measure('handleInstancedMeshModel', 'handleInstancedMeshModel-start', 'handleInstancedMeshModel-end');
|
|
@@ -126136,7 +126581,7 @@ var isDebug = false || false === true;
|
|
|
126136
126581
|
* 完成批量加载
|
|
126137
126582
|
*/
|
|
126138
126583
|
completeBatchLoading: function completeBatchLoading() {
|
|
126139
|
-
var
|
|
126584
|
+
var _this56 = this;
|
|
126140
126585
|
var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
|
|
126141
126586
|
if (!loadingState.isLoading) return;
|
|
126142
126587
|
if (!this.isBatchLoadingSceneReady()) {
|
|
@@ -126169,17 +126614,17 @@ var isDebug = false || false === true;
|
|
|
126169
126614
|
this.modelGroup.traverse(function (child) {
|
|
126170
126615
|
if (child.isMesh && !child.userData.batchInitDone) {
|
|
126171
126616
|
markRendered(child);
|
|
126172
|
-
var json =
|
|
126173
|
-
var meshBox3 = new
|
|
126617
|
+
var json = _this56.getMeshCenterAndVolume(child);
|
|
126618
|
+
var meshBox3 = new _this56.THREE.Box3();
|
|
126174
126619
|
meshBox3.setFromObject(child);
|
|
126175
|
-
var worldPs = new
|
|
126620
|
+
var worldPs = new _this56.THREE.Vector3().addVectors(meshBox3.max, meshBox3.min).multiplyScalar(0.5);
|
|
126176
126621
|
if (isNaN(worldPs.x)) return;
|
|
126177
|
-
child.worldDir = new
|
|
126622
|
+
child.worldDir = new _this56.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
|
|
126178
126623
|
child.userData.center = json.center;
|
|
126179
126624
|
child.userData.worldPs = worldPs;
|
|
126180
|
-
child.userData.oldPs = child.getWorldPosition(new
|
|
126625
|
+
child.userData.oldPs = child.getWorldPosition(new _this56.THREE.Vector3());
|
|
126181
126626
|
child.userData.box = json.box;
|
|
126182
|
-
child.userData.position = new
|
|
126627
|
+
child.userData.position = new _this56.THREE.Vector3().copy(child.position);
|
|
126183
126628
|
child.userData.translate = {
|
|
126184
126629
|
x: 0,
|
|
126185
126630
|
y: 0,
|
|
@@ -126271,7 +126716,7 @@ var isDebug = false || false === true;
|
|
|
126271
126716
|
* @param {Object} options - 配置项 { immediate: boolean }
|
|
126272
126717
|
*/
|
|
126273
126718
|
setSystemInterruption: function setSystemInterruption(active) {
|
|
126274
|
-
var
|
|
126719
|
+
var _this57 = this;
|
|
126275
126720
|
var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'user_interaction';
|
|
126276
126721
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
126277
126722
|
var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
|
|
@@ -126337,7 +126782,7 @@ var isDebug = false || false === true;
|
|
|
126337
126782
|
if (loadingState.interactionState.wheelTimeout) return;
|
|
126338
126783
|
|
|
126339
126784
|
// 2. 如果是 wheel 结束,但 this.userInteracting (this.camera) 还在进行,则不恢复
|
|
126340
|
-
if (reason === 'wheel' &&
|
|
126785
|
+
if (reason === 'wheel' && _this57.userInteracting) return;
|
|
126341
126786
|
|
|
126342
126787
|
// 3. 检查是否有强制跳过标记 (可能由其他逻辑触发)
|
|
126343
126788
|
// if (this.forceSkipRendering && reason !== 'user_interaction') return; // 视情况而定
|
|
@@ -126348,15 +126793,15 @@ var isDebug = false || false === true;
|
|
|
126348
126793
|
loadingState.pauseReason = '';
|
|
126349
126794
|
loadingState.interactionState.isInteracting = false;
|
|
126350
126795
|
loadingState.interactionState.interactionType = '';
|
|
126351
|
-
|
|
126796
|
+
_this57.forceSkipRendering = false;
|
|
126352
126797
|
|
|
126353
126798
|
// 恢复本地批量加载 (如果未完成)
|
|
126354
126799
|
if (loadingState.isLoading && loadingState.currentBatch < loadingState.totalBatches) {
|
|
126355
|
-
|
|
126800
|
+
_this57.loadNextBatch();
|
|
126356
126801
|
}
|
|
126357
126802
|
|
|
126358
126803
|
// 恢复 StreamLoader
|
|
126359
|
-
var streamLoader =
|
|
126804
|
+
var streamLoader = _this57.noObserver.streamLoader;
|
|
126360
126805
|
if (streamLoader && typeof streamLoader.handleControlEnd === 'function') {
|
|
126361
126806
|
// StreamLoader 内部通常有防抖或延迟,这里直接通知结束即可
|
|
126362
126807
|
streamLoader.handleControlEnd();
|
|
@@ -126409,7 +126854,7 @@ var isDebug = false || false === true;
|
|
|
126409
126854
|
* 滚轮交互结束的定时检测
|
|
126410
126855
|
*/
|
|
126411
126856
|
scheduleWheelInteractionEnd: function scheduleWheelInteractionEnd(event) {
|
|
126412
|
-
var
|
|
126857
|
+
var _this58 = this;
|
|
126413
126858
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
|
|
126414
126859
|
var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
|
|
126415
126860
|
if (loadingState.interactionState.wheelTimeout) {
|
|
@@ -126417,8 +126862,8 @@ var isDebug = false || false === true;
|
|
|
126417
126862
|
loadingState.interactionState.wheelTimeout = null;
|
|
126418
126863
|
}
|
|
126419
126864
|
loadingState.interactionState.wheelTimeout = setTimeout(function () {
|
|
126420
|
-
|
|
126421
|
-
|
|
126865
|
+
_this58.$emit('wheelEnd', event);
|
|
126866
|
+
_this58.endInteraction('wheel', event, {
|
|
126422
126867
|
immediateResume: false
|
|
126423
126868
|
});
|
|
126424
126869
|
loadingState.interactionState.wheelTimeout = null;
|
|
@@ -126471,11 +126916,11 @@ var isDebug = false || false === true;
|
|
|
126471
126916
|
});
|
|
126472
126917
|
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=script&lang=js
|
|
126473
126918
|
/* harmony default export */ var components_com_graphicsvue_type_script_lang_js = (com_graphicsvue_type_script_lang_js);
|
|
126474
|
-
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=
|
|
126475
|
-
var
|
|
126919
|
+
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=48280acc&prod&lang=scss&scoped=true
|
|
126920
|
+
var com_graphicsvue_type_style_index_0_id_48280acc_prod_lang_scss_scoped_true = __webpack_require__("11c1");
|
|
126476
126921
|
|
|
126477
|
-
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=
|
|
126478
|
-
var
|
|
126922
|
+
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=48280acc&prod&lang=css
|
|
126923
|
+
var com_graphicsvue_type_style_index_1_id_48280acc_prod_lang_css = __webpack_require__("3800");
|
|
126479
126924
|
|
|
126480
126925
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
126481
126926
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
@@ -126587,17 +127032,17 @@ function normalizeComponent(
|
|
|
126587
127032
|
|
|
126588
127033
|
var component = normalizeComponent(
|
|
126589
127034
|
components_com_graphicsvue_type_script_lang_js,
|
|
126590
|
-
|
|
127035
|
+
com_graphicsvue_type_template_id_48280acc_scoped_true_render,
|
|
126591
127036
|
staticRenderFns,
|
|
126592
127037
|
false,
|
|
126593
127038
|
null,
|
|
126594
|
-
"
|
|
127039
|
+
"48280acc",
|
|
126595
127040
|
null
|
|
126596
127041
|
|
|
126597
127042
|
)
|
|
126598
127043
|
|
|
126599
127044
|
/* harmony default export */ var com_graphics = (component.exports);
|
|
126600
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
127045
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"bed71126-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-flcanvas/index.vue?vue&type=template&id=b313ab6c&scoped=true
|
|
126601
127046
|
var com_flcanvasvue_type_template_id_b313ab6c_scoped_true_render = function render() {
|
|
126602
127047
|
var _vm = this,
|
|
126603
127048
|
_c = _vm._self._c;
|
|
@@ -130650,7 +131095,7 @@ var com_flcanvas_component = normalizeComponent(
|
|
|
130650
131095
|
)
|
|
130651
131096
|
|
|
130652
131097
|
/* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
|
|
130653
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
131098
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"bed71126-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
|
|
130654
131099
|
var per_controlvue_type_template_id_f547d5c6_scoped_true_render = function render() {
|
|
130655
131100
|
var _vm = this,
|
|
130656
131101
|
_c = _vm._self._c;
|
|
@@ -130758,7 +131203,7 @@ var per_control_component = normalizeComponent(
|
|
|
130758
131203
|
)
|
|
130759
131204
|
|
|
130760
131205
|
/* harmony default export */ var per_control = (per_control_component.exports);
|
|
130761
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
131206
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"bed71126-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
|
|
130762
131207
|
var pidvue_type_template_id_2572c0e2_scoped_true_render = function render() {
|
|
130763
131208
|
var _vm = this,
|
|
130764
131209
|
_c = _vm._self._c;
|
|
@@ -130805,7 +131250,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
|
|
|
130805
131250
|
var html2canvas = __webpack_require__("c0e9");
|
|
130806
131251
|
var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
|
|
130807
131252
|
|
|
130808
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
131253
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"bed71126-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
|
|
130809
131254
|
var ann_toolvue_type_template_id_4b17bce0_scoped_true_render = function render() {
|
|
130810
131255
|
var _vm = this,
|
|
130811
131256
|
_c = _vm._self._c;
|