fl-web-component 2.0.19-beta.0 → 2.0.19-beta.1
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.
|
@@ -1489,6 +1489,17 @@ exports.default = function (ref) {
|
|
|
1489
1489
|
};
|
|
1490
1490
|
;
|
|
1491
1491
|
|
|
1492
|
+
/***/ }),
|
|
1493
|
+
|
|
1494
|
+
/***/ "12fb":
|
|
1495
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1496
|
+
|
|
1497
|
+
"use strict";
|
|
1498
|
+
/* 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_46d6866f_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dd1a");
|
|
1499
|
+
/* 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_46d6866f_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_46d6866f_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
1500
|
+
/* unused harmony reexport * */
|
|
1501
|
+
|
|
1502
|
+
|
|
1492
1503
|
/***/ }),
|
|
1493
1504
|
|
|
1494
1505
|
/***/ "14e9":
|
|
@@ -56170,13 +56181,6 @@ Factory_1.Factory.addGetterSetter(Path, 'data');
|
|
|
56170
56181
|
|
|
56171
56182
|
/***/ }),
|
|
56172
56183
|
|
|
56173
|
-
/***/ "8c5c":
|
|
56174
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
56175
|
-
|
|
56176
|
-
// extracted by mini-css-extract-plugin
|
|
56177
|
-
|
|
56178
|
-
/***/ }),
|
|
56179
|
-
|
|
56180
56184
|
/***/ "8e84":
|
|
56181
56185
|
/***/ (function(module, exports, __webpack_require__) {
|
|
56182
56186
|
|
|
@@ -56496,7 +56500,7 @@ module.exports = document && document.documentElement;
|
|
|
56496
56500
|
/***/ "9224":
|
|
56497
56501
|
/***/ (function(module) {
|
|
56498
56502
|
|
|
56499
|
-
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.19-beta.
|
|
56503
|
+
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.19-beta.1\",\"scripts\":{\"postinstall\":\"patch-package\",\"tip1\":\"仅调试本组件不涉及业务组件,请执行dev\",\"dev\":\"vue-cli-service serve\",\"lint\":\"eslint \\\"{src,packages}/**/*.{vue,js}\\\" --fix\",\"prettier\":\"prettier --write \\\"packages/**/*.{js,css,less,scss,vue,html}\\\"\",\"=\":\"=============================================================\",\"tip2\":\"同时调试本组件与业务组件,请执行watch,生产模式监听请执行watch:prod\",\"watch\":\"vue-cli-service build --watch --mode development --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"watch:prod\":\"vue-cli-service build --watch --mode production --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build\":\"npm run lint && vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build:test\":\"vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"publish:base\":\"npm run build && npm publish --registry https://registry.npmjs.org/\",\"publish:beta:base\":\"npm run build && npm publish --tag beta --registry https://registry.npmjs.org/\",\"==\":\"=============================================================\",\"tip3\":\"发版注意: 【测试版执行publish:beta】【修改bug执行publish:fix】【新增功能执行publish:feat】【新特性执行publish:perf】\",\"publish:beta\":\"npm version prerelease --preid=beta && npm run publish:beta:base\",\"publish:fix\":\"npm version patch && npm run publish:base\",\"publish:feat\":\"npm version minor && npm run publish:base\",\"publish:perf\":\"npm version major && npm run publish:base\"},\"files\":[\"dist\",\"packages\",\"src\"],\"main\":\"dist/fl-web-component.common.js\",\"dependencies\":{\"camera-controls\":\"2.9.0\",\"core-js\":\"^3.42.0\",\"dxf-parser\":\"^1.1.2\",\"element-ui\":\"2.15.14\",\"fflate\":\"^0.8.2\",\"html2canvas\":\"^1.4.1\",\"jspdf\":\"^3.0.1\",\"konva\":\"^9.3.12\",\"lodash\":\"^4.17.21\",\"meshline\":\"^3.3.1\",\"regenerator-runtime\":\"^0.14.1\",\"svg-pan-zoom\":\"^3.6.2\",\"three\":\"^0.176.0\",\"three.path\":\"^1.0.1\",\"vue\":\"^2.6.11\"},\"devDependencies\":{\"@babel/core\":\"^7.12.16\",\"@babel/plugin-proposal-nullish-coalescing-operator\":\"^7.18.6\",\"@babel/plugin-proposal-optional-chaining\":\"^7.21.0\",\"@babel/preset-env\":\"^7.0.0\",\"@babel/runtime-corejs3\":\"^7.27.1\",\"@vue/cli-plugin-babel\":\"~4.4.0\",\"@vue/cli-plugin-eslint\":\"~4.4.0\",\"@vue/cli-service\":\"~4.4.0\",\"babel-eslint\":\"^10.1.0\",\"babel-loader\":\"^8.0.0\",\"copy-webpack-plugin\":\"^4.0.1\",\"eslint\":\"^6.7.2\",\"eslint-config-prettier\":\"^6.15.0\",\"eslint-plugin-prettier\":\"^3.4.1\",\"eslint-plugin-vue\":\"^6.2.2\",\"patch-package\":\"^6.4.7\",\"prettier\":\"^2.8.8\",\"sass\":\"1.32.13\",\"sass-loader\":\"10.1.1\",\"vue-template-compiler\":\"^2.6.11\",\"worker-loader\":\"^3.0.8\"},\"browserslist\":[\"> 1%\",\"last 2 versions\"]}");
|
|
56500
56504
|
|
|
56501
56505
|
/***/ }),
|
|
56502
56506
|
|
|
@@ -59302,13 +59306,6 @@ var isDefined = exports.isDefined = function isDefined(val) {
|
|
|
59302
59306
|
|
|
59303
59307
|
/***/ }),
|
|
59304
59308
|
|
|
59305
|
-
/***/ "a81d":
|
|
59306
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
59307
|
-
|
|
59308
|
-
// extracted by mini-css-extract-plugin
|
|
59309
|
-
|
|
59310
|
-
/***/ }),
|
|
59311
|
-
|
|
59312
59309
|
/***/ "ae26":
|
|
59313
59310
|
/***/ (function(module, exports, __webpack_require__) {
|
|
59314
59311
|
|
|
@@ -59544,17 +59541,6 @@ module.exports = function () {
|
|
|
59544
59541
|
};
|
|
59545
59542
|
}();
|
|
59546
59543
|
|
|
59547
|
-
/***/ }),
|
|
59548
|
-
|
|
59549
|
-
/***/ "b606":
|
|
59550
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
59551
|
-
|
|
59552
|
-
"use strict";
|
|
59553
|
-
/* 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_a4813dca_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a81d");
|
|
59554
|
-
/* 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_a4813dca_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_a4813dca_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
59555
|
-
/* unused harmony reexport * */
|
|
59556
|
-
|
|
59557
|
-
|
|
59558
59544
|
/***/ }),
|
|
59559
59545
|
|
|
59560
59546
|
/***/ "b9c7":
|
|
@@ -69140,6 +69126,17 @@ module.exports = function (it) {
|
|
|
69140
69126
|
return it;
|
|
69141
69127
|
};
|
|
69142
69128
|
|
|
69129
|
+
/***/ }),
|
|
69130
|
+
|
|
69131
|
+
/***/ "cbdd":
|
|
69132
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
69133
|
+
|
|
69134
|
+
"use strict";
|
|
69135
|
+
/* 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_46d6866f_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d5c3");
|
|
69136
|
+
/* 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_46d6866f_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_46d6866f_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
69137
|
+
/* unused harmony reexport * */
|
|
69138
|
+
|
|
69139
|
+
|
|
69143
69140
|
/***/ }),
|
|
69144
69141
|
|
|
69145
69142
|
/***/ "cc15":
|
|
@@ -70531,6 +70528,13 @@ module.exports = normalizeWheel;
|
|
|
70531
70528
|
|
|
70532
70529
|
/***/ }),
|
|
70533
70530
|
|
|
70531
|
+
/***/ "d5c3":
|
|
70532
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
70533
|
+
|
|
70534
|
+
// extracted by mini-css-extract-plugin
|
|
70535
|
+
|
|
70536
|
+
/***/ }),
|
|
70537
|
+
|
|
70534
70538
|
/***/ "d777":
|
|
70535
70539
|
/***/ (function(module, exports, __webpack_require__) {
|
|
70536
70540
|
|
|
@@ -72067,6 +72071,13 @@ module.exports = /******/function (modules) {
|
|
|
72067
72071
|
|
|
72068
72072
|
/***/ }),
|
|
72069
72073
|
|
|
72074
|
+
/***/ "dd1a":
|
|
72075
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
72076
|
+
|
|
72077
|
+
// extracted by mini-css-extract-plugin
|
|
72078
|
+
|
|
72079
|
+
/***/ }),
|
|
72080
|
+
|
|
72070
72081
|
/***/ "df93":
|
|
72071
72082
|
/***/ (function(module, exports, __webpack_require__) {
|
|
72072
72083
|
|
|
@@ -72500,17 +72511,6 @@ Factory_1.Factory.addGetterSetter(Star, 'numPoints', 5, (0, Validators_1.getNumb
|
|
|
72500
72511
|
Factory_1.Factory.addGetterSetter(Star, 'innerRadius', 0, (0, Validators_1.getNumberValidator)());
|
|
72501
72512
|
Factory_1.Factory.addGetterSetter(Star, 'outerRadius', 0, (0, Validators_1.getNumberValidator)());
|
|
72502
72513
|
|
|
72503
|
-
/***/ }),
|
|
72504
|
-
|
|
72505
|
-
/***/ "e426":
|
|
72506
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
72507
|
-
|
|
72508
|
-
"use strict";
|
|
72509
|
-
/* 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_a4813dca_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8c5c");
|
|
72510
|
-
/* 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_a4813dca_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_a4813dca_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
72511
|
-
/* unused harmony reexport * */
|
|
72512
|
-
|
|
72513
|
-
|
|
72514
72514
|
/***/ }),
|
|
72515
72515
|
|
|
72516
72516
|
/***/ "e444":
|
|
@@ -78634,8 +78634,8 @@ if (typeof window !== 'undefined') {
|
|
|
78634
78634
|
// Indicate to webpack that this file can be concatenated
|
|
78635
78635
|
/* harmony default export */ var setPublicPath = (null);
|
|
78636
78636
|
|
|
78637
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
78638
|
-
var
|
|
78637
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"44f05828-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=46d6866f&scoped=true
|
|
78638
|
+
var com_graphicsvue_type_template_id_46d6866f_scoped_true_render = function render() {
|
|
78639
78639
|
var _vm = this,
|
|
78640
78640
|
_c = _vm._self._c;
|
|
78641
78641
|
return _c('div', {
|
|
@@ -78647,7 +78647,7 @@ var com_graphicsvue_type_template_id_a4813dca_scoped_true_render = function rend
|
|
|
78647
78647
|
};
|
|
78648
78648
|
var staticRenderFns = [];
|
|
78649
78649
|
|
|
78650
|
-
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=
|
|
78650
|
+
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=46d6866f&scoped=true
|
|
78651
78651
|
|
|
78652
78652
|
// CONCATENATED MODULE: ./node_modules/camera-controls/dist/camera-controls.module.js
|
|
78653
78653
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
@@ -120930,7 +120930,7 @@ var LOG_INTERVAL = 30;
|
|
|
120930
120930
|
|
|
120931
120931
|
var isDebug = false || false === true;
|
|
120932
120932
|
// const isDebug = false;
|
|
120933
|
-
|
|
120933
|
+
var COLLISION_PENETRATION_EPSILON = 0.1;
|
|
120934
120934
|
/* harmony default export */ var com_graphicsvue_type_script_lang_js = ({
|
|
120935
120935
|
name: 'FlModel',
|
|
120936
120936
|
props: {
|
|
@@ -122479,6 +122479,81 @@ var isDebug = false || false === true;
|
|
|
122479
122479
|
box: box
|
|
122480
122480
|
});
|
|
122481
122481
|
},
|
|
122482
|
+
_isCollisionBoxAvailable: function _isCollisionBoxAvailable(box) {
|
|
122483
|
+
if (!box || !box.isBox3 || box.isEmpty()) return false;
|
|
122484
|
+
if (box.userData && box.userData.visible === false) return false;
|
|
122485
|
+
return true;
|
|
122486
|
+
},
|
|
122487
|
+
_formatCollisionPairId: function _formatCollisionPairId(id) {
|
|
122488
|
+
var value = String(id);
|
|
122489
|
+
var numberValue = Number(value);
|
|
122490
|
+
return Number.isFinite(numberValue) ? numberValue : id;
|
|
122491
|
+
},
|
|
122492
|
+
_getBoxMinPenetration: function _getBoxMinPenetration(boxA, boxB) {
|
|
122493
|
+
var x = Math.min(boxA.max.x - boxB.min.x, boxB.max.x - boxA.min.x);
|
|
122494
|
+
var y = Math.min(boxA.max.y - boxB.min.y, boxB.max.y - boxA.min.y);
|
|
122495
|
+
var z = Math.min(boxA.max.z - boxB.min.z, boxB.max.z - boxA.min.z);
|
|
122496
|
+
return Math.min(x, y, z);
|
|
122497
|
+
},
|
|
122498
|
+
_isCollisionBoxMatched: function _isCollisionBoxMatched(boxA, boxB) {
|
|
122499
|
+
if (!this._isCollisionBoxAvailable(boxA) || !this._isCollisionBoxAvailable(boxB)) return false;
|
|
122500
|
+
if (!boxA.intersectsBox(boxB)) return false;
|
|
122501
|
+
return this._getBoxMinPenetration(boxA, boxB) > COLLISION_PENETRATION_EPSILON;
|
|
122502
|
+
},
|
|
122503
|
+
_queryOctreeByBox: function _queryOctreeByBox(box) {
|
|
122504
|
+
var results = [];
|
|
122505
|
+
var root = this._octree;
|
|
122506
|
+
if (!root || !this._isCollisionBoxAvailable(box)) return results;
|
|
122507
|
+
var stack = [root];
|
|
122508
|
+
while (stack.length) {
|
|
122509
|
+
var node = stack.pop();
|
|
122510
|
+
if (!node || !node.box || !this._isCollisionBoxMatched(node.box, box)) continue;
|
|
122511
|
+
if (node.children) {
|
|
122512
|
+
for (var i = 0; i < 8; i++) {
|
|
122513
|
+
stack.push(node.children[i]);
|
|
122514
|
+
}
|
|
122515
|
+
}
|
|
122516
|
+
if (node.items && node.items.length) {
|
|
122517
|
+
for (var _i = 0; _i < node.items.length; _i++) {
|
|
122518
|
+
var item = node.items[_i];
|
|
122519
|
+
if (item && this._isCollisionBoxMatched(item.box, box)) {
|
|
122520
|
+
results.push(item);
|
|
122521
|
+
}
|
|
122522
|
+
}
|
|
122523
|
+
}
|
|
122524
|
+
}
|
|
122525
|
+
return results;
|
|
122526
|
+
},
|
|
122527
|
+
getOctreeCollisionPairs: function getOctreeCollisionPairs() {
|
|
122528
|
+
var _this10 = this;
|
|
122529
|
+
var pairs = [];
|
|
122530
|
+
if (!this._boxIndex || this._boxIndex.size === 0) return {
|
|
122531
|
+
pairs: pairs
|
|
122532
|
+
};
|
|
122533
|
+
if (!this._octree) {
|
|
122534
|
+
this.buildOctreeFromBoxIndex();
|
|
122535
|
+
}
|
|
122536
|
+
if (!this._octree) return {
|
|
122537
|
+
pairs: pairs
|
|
122538
|
+
};
|
|
122539
|
+
this._boxIndex.forEach(function (boxA, idA) {
|
|
122540
|
+
if (!_this10._isCollisionBoxAvailable(boxA)) return;
|
|
122541
|
+
var hits = _this10._queryOctreeByBox(boxA);
|
|
122542
|
+
for (var i = 0; i < hits.length; i++) {
|
|
122543
|
+
var item = hits[i];
|
|
122544
|
+
if (!item || String(item.id) === String(idA)) continue;
|
|
122545
|
+
var boxB = item.box;
|
|
122546
|
+
if (!_this10._isCollisionBoxMatched(boxA, boxB)) continue;
|
|
122547
|
+
pairs.push({
|
|
122548
|
+
idA: _this10._formatCollisionPairId(idA),
|
|
122549
|
+
idB: _this10._formatCollisionPairId(item.id)
|
|
122550
|
+
});
|
|
122551
|
+
}
|
|
122552
|
+
});
|
|
122553
|
+
return {
|
|
122554
|
+
pairs: pairs
|
|
122555
|
+
};
|
|
122556
|
+
},
|
|
122482
122557
|
_getCurrentFrustum: function _getCurrentFrustum() {
|
|
122483
122558
|
// 确保相机矩阵是最新的
|
|
122484
122559
|
if (this.camera) {
|
|
@@ -122577,8 +122652,8 @@ var isDebug = false || false === true;
|
|
|
122577
122652
|
|
|
122578
122653
|
// 计算到最远顶点的距离
|
|
122579
122654
|
var maxDistance = 0;
|
|
122580
|
-
for (var
|
|
122581
|
-
var v = _vertices[
|
|
122655
|
+
for (var _i2 = 0, _vertices = vertices; _i2 < _vertices.length; _i2++) {
|
|
122656
|
+
var v = _vertices[_i2];
|
|
122582
122657
|
var dist = camPos.distanceTo(v);
|
|
122583
122658
|
if (dist > maxDistance) maxDistance = dist;
|
|
122584
122659
|
}
|
|
@@ -122608,7 +122683,7 @@ var isDebug = false || false === true;
|
|
|
122608
122683
|
* @returns {Object|null} { planeBox: THREE.Box3|null, frustumBox: THREE.Box3, frustumY: {min, max} } 或 null(当没有平面交点且未请求 frustumY)
|
|
122609
122684
|
*/
|
|
122610
122685
|
getScreenPlaneBounds: function getScreenPlaneBounds(camera, width, height, plane) {
|
|
122611
|
-
var
|
|
122686
|
+
var _this11 = this;
|
|
122612
122687
|
var opts = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
122613
122688
|
var _opts$includeFrustumY = opts.includeFrustumY,
|
|
122614
122689
|
includeFrustumY = _opts$includeFrustumY === void 0 ? false : _opts$includeFrustumY;
|
|
@@ -122625,8 +122700,8 @@ var isDebug = false || false === true;
|
|
|
122625
122700
|
|
|
122626
122701
|
// 计算视椎体 8 个角点(near/far 的四角)
|
|
122627
122702
|
var frustumPoints = [];
|
|
122628
|
-
for (var
|
|
122629
|
-
var _screenCorners$_i = com_graphicsvue_type_script_lang_js_slicedToArray(_screenCorners[
|
|
122703
|
+
for (var _i3 = 0, _screenCorners = screenCorners; _i3 < _screenCorners.length; _i3++) {
|
|
122704
|
+
var _screenCorners$_i = com_graphicsvue_type_script_lang_js_slicedToArray(_screenCorners[_i3], 2),
|
|
122630
122705
|
x = _screenCorners$_i[0],
|
|
122631
122706
|
y = _screenCorners$_i[1];
|
|
122632
122707
|
var ndcBase = new this.THREE.Vector3(x / width * 2 - 1, -(y / height) * 2 + 1, undefined);
|
|
@@ -122653,7 +122728,7 @@ var isDebug = false || false === true;
|
|
|
122653
122728
|
var volumeCorners = nearCorners.concat(farCorners);
|
|
122654
122729
|
var projectedPoints = volumeCorners.map(function (p) {
|
|
122655
122730
|
var yProj = -(a * p.x + c * p.z + d) / b;
|
|
122656
|
-
return new
|
|
122731
|
+
return new _this11.THREE.Vector3(p.x, yProj, p.z);
|
|
122657
122732
|
});
|
|
122658
122733
|
planeBox = new this.THREE.Box3().setFromPoints(projectedPoints);
|
|
122659
122734
|
}
|
|
@@ -122883,14 +122958,14 @@ var isDebug = false || false === true;
|
|
|
122883
122958
|
* 执行视椎体裁切,清理视椎体外的InstancedMesh实例
|
|
122884
122959
|
*/
|
|
122885
122960
|
performFrustumCulling: function performFrustumCulling() {
|
|
122886
|
-
var
|
|
122961
|
+
var _this12 = this;
|
|
122887
122962
|
return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee3() {
|
|
122888
|
-
var modelState, now, globalFrustum, globalVpMatrix, toUnload, bypassList, visibleIds, candidates, visibleIdSet, frustum, exclude, hits, i, occlusionState, occlusionEnabled, state, w, h, aspectRatio, sw, sh, rt, t0, opaqueCandidates, transparentCandidates,
|
|
122963
|
+
var modelState, now, globalFrustum, globalVpMatrix, toUnload, bypassList, visibleIds, candidates, visibleIdSet, frustum, exclude, hits, i, occlusionState, occlusionEnabled, state, w, h, aspectRatio, sw, sh, rt, t0, opaqueCandidates, transparentCandidates, _i4, totalInstances, transparentTotal, activeIdIndexArr, transparentIdIndexArr, occObjs, asyncBuildEnabled, _occBuild, asyncState, token, opaqueSnapshot, transparentMesh, transparentCapacity, nextCap, geometry, material, tempMatrix, tempScale, tempObj, tempColor, tIdx, _i9, c, idx, r, g, b, _c$box$userData$obb, matrix, halfSize, tMaxIdx, prevToneMapping, prevTarget, prevClearColorHex, prevClearAlpha, _c3, cvs, cssW, cssH, dst, src, row, srcRow, dstRow, idIndexArr, maxIdx, totalPixels, targetSamples, baseStride, extraStride, stride, minSampleCount, scanResult, indices, _i0, id, transparentMaxIdx, tIdIndexArr, tScanResult, tIndices, _i1, _id, _i10, _i11, toLoadSet, parentsToCheck, _i14, _toUnload, _toUnload$_i, modelId, child, _t2;
|
|
122889
122964
|
return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context3) {
|
|
122890
122965
|
while (1) switch (_context3.p = _context3.n) {
|
|
122891
122966
|
case 0:
|
|
122892
|
-
modelState =
|
|
122893
|
-
if (!(!
|
|
122967
|
+
modelState = _this12.noObserver ? _this12.noObserver.modelStateManager : _this12.modelStateManager;
|
|
122968
|
+
if (!(!_this12.modelStateManager.frustumCheckEnabled || !_this12.scene)) {
|
|
122894
122969
|
_context3.n = 1;
|
|
122895
122970
|
break;
|
|
122896
122971
|
}
|
|
@@ -122906,10 +122981,10 @@ var isDebug = false || false === true;
|
|
|
122906
122981
|
modelState.lastCullingTime = now;
|
|
122907
122982
|
|
|
122908
122983
|
// 预先创建视椎体,供后续遍历复用
|
|
122909
|
-
if (!
|
|
122910
|
-
if (!
|
|
122911
|
-
globalFrustum =
|
|
122912
|
-
globalVpMatrix =
|
|
122984
|
+
if (!_this12._frustum) _this12._frustum = new _this12.THREE.Frustum();
|
|
122985
|
+
if (!_this12._vpMatrix) _this12._vpMatrix = new _this12.THREE.Matrix4();
|
|
122986
|
+
globalFrustum = _this12._frustum;
|
|
122987
|
+
globalVpMatrix = _this12._vpMatrix.multiplyMatrices(_this12.camera.projectionMatrix, _this12.camera.matrixWorldInverse);
|
|
122913
122988
|
globalFrustum.setFromProjectionMatrix(globalVpMatrix);
|
|
122914
122989
|
|
|
122915
122990
|
// 使用局部变量收集 ID,最后一次性赋值
|
|
@@ -122923,13 +122998,13 @@ var isDebug = false || false === true;
|
|
|
122923
122998
|
});
|
|
122924
122999
|
}
|
|
122925
123000
|
visibleIdSet = new Set(visibleIds);
|
|
122926
|
-
if (!
|
|
123001
|
+
if (!_this12._octree) {
|
|
122927
123002
|
_context3.n = 8;
|
|
122928
123003
|
break;
|
|
122929
123004
|
}
|
|
122930
|
-
frustum =
|
|
123005
|
+
frustum = _this12._getCurrentFrustum();
|
|
122931
123006
|
exclude = bypassList || new Set();
|
|
122932
|
-
hits =
|
|
123007
|
+
hits = _this12.queryOctreeByFrustum(frustum, exclude);
|
|
122933
123008
|
i = 0;
|
|
122934
123009
|
case 3:
|
|
122935
123010
|
if (!(i < hits.length)) {
|
|
@@ -122942,11 +123017,11 @@ var isDebug = false || false === true;
|
|
|
122942
123017
|
}
|
|
122943
123018
|
return _context3.a(3, 6);
|
|
122944
123019
|
case 4:
|
|
122945
|
-
if (
|
|
123020
|
+
if (_this12.shouldApplyOcclusionByBox(hits[i].box)) {
|
|
122946
123021
|
_context3.n = 5;
|
|
122947
123022
|
break;
|
|
122948
123023
|
}
|
|
122949
|
-
visibleIdSet.add(
|
|
123024
|
+
visibleIdSet.add(_this12.formatModelId(hits[i].modelId));
|
|
122950
123025
|
return _context3.a(3, 6);
|
|
122951
123026
|
case 5:
|
|
122952
123027
|
candidates.push(hits[i]);
|
|
@@ -122958,13 +123033,13 @@ var isDebug = false || false === true;
|
|
|
122958
123033
|
_context3.n = 9;
|
|
122959
123034
|
break;
|
|
122960
123035
|
case 8:
|
|
122961
|
-
if (
|
|
122962
|
-
|
|
123036
|
+
if (_this12._boxIndex && _this12._boxIndex.size > 0) {
|
|
123037
|
+
_this12._boxIndex.forEach(function (box, modelId) {
|
|
122963
123038
|
if (bypassList && bypassList.size > 0 && bypassList.has(modelId)) return;
|
|
122964
123039
|
if (box.userData && box.userData.visible === false) return;
|
|
122965
|
-
if (
|
|
122966
|
-
if (!
|
|
122967
|
-
visibleIdSet.add(
|
|
123040
|
+
if (_this12.isBoxInFrustum(box)) {
|
|
123041
|
+
if (!_this12.shouldApplyOcclusionByBox(box)) {
|
|
123042
|
+
visibleIdSet.add(_this12.formatModelId(modelId));
|
|
122968
123043
|
return;
|
|
122969
123044
|
}
|
|
122970
123045
|
candidates.push({
|
|
@@ -122975,18 +123050,18 @@ var isDebug = false || false === true;
|
|
|
122975
123050
|
});
|
|
122976
123051
|
}
|
|
122977
123052
|
case 9:
|
|
122978
|
-
occlusionState =
|
|
122979
|
-
occlusionEnabled =
|
|
123053
|
+
occlusionState = _this12.noObserver ? _this12.noObserver.occlusionState : _this12.occlusionState; // 从响应式对象获取开关状态
|
|
123054
|
+
occlusionEnabled = _this12.occlusionState && _this12.occlusionState.enabled;
|
|
122980
123055
|
if (!occlusionEnabled) {
|
|
122981
123056
|
_context3.n = 16;
|
|
122982
123057
|
break;
|
|
122983
123058
|
}
|
|
122984
123059
|
state = occlusionState;
|
|
122985
|
-
w =
|
|
122986
|
-
h =
|
|
123060
|
+
w = _this12.renderer && _this12.renderer.domElement ? _this12.renderer.domElement.clientWidth || _this12.renderer.domElement.width || 0 : 0;
|
|
123061
|
+
h = _this12.renderer && _this12.renderer.domElement ? _this12.renderer.domElement.clientHeight || _this12.renderer.domElement.height || 0 : 0; // bufferWidth/Height 仍从响应式对象读取以支持动态修改
|
|
122987
123062
|
// 性能优化:使用降采样缓冲区进行遮挡剔除,大幅减少 readPixels 耗时 (从全屏降至约 256px 宽)
|
|
122988
123063
|
aspectRatio = h > 0 ? w / h : 1;
|
|
122989
|
-
sw =
|
|
123064
|
+
sw = _this12.occlusionState.bufferWidth || 256;
|
|
122990
123065
|
sh = Math.floor(sw / aspectRatio);
|
|
122991
123066
|
sw = Math.max(1, sw);
|
|
122992
123067
|
sh = Math.max(1, sh);
|
|
@@ -122995,16 +123070,16 @@ var isDebug = false || false === true;
|
|
|
122995
123070
|
_context3.p = 10;
|
|
122996
123071
|
if (!rt || state._rtW !== sw || state._rtH !== sh) {
|
|
122997
123072
|
if (rt && typeof rt.dispose === 'function') rt.dispose();
|
|
122998
|
-
rt = new
|
|
123073
|
+
rt = new _this12.THREE.WebGLRenderTarget(sw, sh, {
|
|
122999
123074
|
depthBuffer: true,
|
|
123000
123075
|
stencilBuffer: false,
|
|
123001
123076
|
samples: 0
|
|
123002
123077
|
});
|
|
123003
|
-
rt.texture.minFilter =
|
|
123004
|
-
rt.texture.magFilter =
|
|
123078
|
+
rt.texture.minFilter = _this12.THREE.NearestFilter;
|
|
123079
|
+
rt.texture.magFilter = _this12.THREE.NearestFilter;
|
|
123005
123080
|
rt.texture.generateMipmaps = false;
|
|
123006
|
-
rt.texture.type =
|
|
123007
|
-
rt.texture.format =
|
|
123081
|
+
rt.texture.type = _this12.THREE.UnsignedByteType;
|
|
123082
|
+
rt.texture.format = _this12.THREE.RGBAFormat;
|
|
123008
123083
|
rt.samples = 0;
|
|
123009
123084
|
state._colorRT = rt;
|
|
123010
123085
|
state._rtW = sw;
|
|
@@ -123013,7 +123088,7 @@ var isDebug = false || false === true;
|
|
|
123013
123088
|
} else if (!state._colorBuffer || state._colorBuffer.length !== sw * sh * 4) {
|
|
123014
123089
|
state._colorBuffer = new Uint8Array(sw * sh * 4);
|
|
123015
123090
|
}
|
|
123016
|
-
if (!state._occScene) state._occScene = new
|
|
123091
|
+
if (!state._occScene) state._occScene = new _this12.THREE.Scene();
|
|
123017
123092
|
// if (!state._occPerfStats) state._occPerfStats = Object.create(null);
|
|
123018
123093
|
// const _occRecordPerf = (name, ms, meta) => {
|
|
123019
123094
|
// const this.stats = state._occPerfStats;
|
|
@@ -123030,11 +123105,11 @@ var isDebug = false || false === true;
|
|
|
123030
123105
|
// 过滤掉透明物体
|
|
123031
123106
|
opaqueCandidates = [];
|
|
123032
123107
|
transparentCandidates = [];
|
|
123033
|
-
for (
|
|
123034
|
-
if (candidates[
|
|
123035
|
-
transparentCandidates.push(candidates[
|
|
123108
|
+
for (_i4 = 0; _i4 < candidates.length; _i4++) {
|
|
123109
|
+
if (candidates[_i4].box.userData && candidates[_i4].box.userData.transparent) {
|
|
123110
|
+
transparentCandidates.push(candidates[_i4]);
|
|
123036
123111
|
} else {
|
|
123037
|
-
opaqueCandidates.push(candidates[
|
|
123112
|
+
opaqueCandidates.push(candidates[_i4]);
|
|
123038
123113
|
}
|
|
123039
123114
|
}
|
|
123040
123115
|
totalInstances = opaqueCandidates.length;
|
|
@@ -123062,18 +123137,18 @@ var isDebug = false || false === true;
|
|
|
123062
123137
|
// child.parent = null;
|
|
123063
123138
|
// // child.dispatchEvent({ type: 'removed' }); // 保持轻量,暂不触发事件
|
|
123064
123139
|
// }
|
|
123065
|
-
asyncBuildEnabled =
|
|
123140
|
+
asyncBuildEnabled = _this12.occlusionState && _this12.occlusionState.asyncBuildEnabled && !!window.requestAnimationFrame;
|
|
123066
123141
|
_occBuild = function _occBuild(opaqueList) {
|
|
123067
123142
|
var tBuild0 = performance.now();
|
|
123068
123143
|
var flag1Items = [];
|
|
123069
123144
|
var flag3Items = [];
|
|
123070
123145
|
var globalIdx = 1;
|
|
123071
|
-
for (var
|
|
123072
|
-
var c = opaqueList[
|
|
123146
|
+
for (var _i5 = 0; _i5 < opaqueList.length; _i5++) {
|
|
123147
|
+
var c = opaqueList[_i5];
|
|
123073
123148
|
var obbData = c.box && c.box.userData ? c.box.userData.obbData : null;
|
|
123074
123149
|
if (!obbData || !obbData.length) continue;
|
|
123075
123150
|
var idx = globalIdx++;
|
|
123076
|
-
activeIdIndexArr[idx] =
|
|
123151
|
+
activeIdIndexArr[idx] = _this12.formatModelId(c.modelId);
|
|
123077
123152
|
var flag = c.box.userData && c.box.userData.flag || 1;
|
|
123078
123153
|
if (flag === 3 && c.box.userData && c.box.userData.obb) {
|
|
123079
123154
|
flag3Items.push({
|
|
@@ -123089,11 +123164,11 @@ var isDebug = false || false === true;
|
|
|
123089
123164
|
}
|
|
123090
123165
|
var maxIdx = globalIdx - 1;
|
|
123091
123166
|
activeIdIndexArr.length = maxIdx + 1;
|
|
123092
|
-
var _tempMatrix = occObjs._tempMatrix || (occObjs._tempMatrix = new
|
|
123093
|
-
var _tempColor = occObjs._tempColor || (occObjs._tempColor = new
|
|
123094
|
-
var _tempScale = occObjs._tempScale || (occObjs._tempScale = new
|
|
123095
|
-
var _tempVec3 = occObjs._tempVec3 || (occObjs._tempVec3 = new
|
|
123096
|
-
var _tempMatA = occObjs._tempMatA || (occObjs._tempMatA = new
|
|
123167
|
+
var _tempMatrix = occObjs._tempMatrix || (occObjs._tempMatrix = new _this12.THREE.Matrix4());
|
|
123168
|
+
var _tempColor = occObjs._tempColor || (occObjs._tempColor = new _this12.THREE.Color());
|
|
123169
|
+
var _tempScale = occObjs._tempScale || (occObjs._tempScale = new _this12.THREE.Vector3());
|
|
123170
|
+
var _tempVec3 = occObjs._tempVec3 || (occObjs._tempVec3 = new _this12.THREE.Vector3());
|
|
123171
|
+
var _tempMatA = occObjs._tempMatA || (occObjs._tempMatA = new _this12.THREE.Matrix4());
|
|
123097
123172
|
var boxes = occObjs.boxes;
|
|
123098
123173
|
var boxCount = flag3Items.length;
|
|
123099
123174
|
if (boxCount > 0) {
|
|
@@ -123106,16 +123181,16 @@ var isDebug = false || false === true;
|
|
|
123106
123181
|
if (boxes.mesh.material) boxes.mesh.material.dispose();
|
|
123107
123182
|
}
|
|
123108
123183
|
var nextCap = Math.max(needCapacity, capacity > 0 ? capacity * 2 : 256);
|
|
123109
|
-
var geometry = new
|
|
123110
|
-
var mat = new
|
|
123184
|
+
var geometry = new _this12.THREE.BoxGeometry(1, 1, 1);
|
|
123185
|
+
var mat = new _this12.THREE.MeshBasicMaterial({
|
|
123111
123186
|
color: 0xffffff,
|
|
123112
|
-
side:
|
|
123113
|
-
blending:
|
|
123187
|
+
side: _this12.THREE.DoubleSide,
|
|
123188
|
+
blending: _this12.THREE.NoBlending,
|
|
123114
123189
|
depthTest: true,
|
|
123115
123190
|
depthWrite: true,
|
|
123116
123191
|
toneMapped: false
|
|
123117
123192
|
});
|
|
123118
|
-
var mesh = new
|
|
123193
|
+
var mesh = new _this12.THREE.InstancedMesh(geometry, mat, nextCap);
|
|
123119
123194
|
mesh.frustumCulled = false;
|
|
123120
123195
|
mesh.matrixAutoUpdate = false;
|
|
123121
123196
|
state._occScene.add(mesh);
|
|
@@ -123127,8 +123202,8 @@ var isDebug = false || false === true;
|
|
|
123127
123202
|
state._occScene.add(boxes.mesh);
|
|
123128
123203
|
}
|
|
123129
123204
|
boxes.mesh.count = boxCount;
|
|
123130
|
-
for (var
|
|
123131
|
-
var item = flag3Items[
|
|
123205
|
+
for (var _i6 = 0; _i6 < boxCount; _i6++) {
|
|
123206
|
+
var item = flag3Items[_i6];
|
|
123132
123207
|
var _item$c$box$userData$ = item.c.box.userData.obb,
|
|
123133
123208
|
matrix = _item$c$box$userData$.matrix,
|
|
123134
123209
|
halfSize = _item$c$box$userData$.halfSize;
|
|
@@ -123140,11 +123215,11 @@ var isDebug = false || false === true;
|
|
|
123140
123215
|
_tempScale.copy(halfSize).multiplyScalar(2);
|
|
123141
123216
|
_tempMatrix.copy(matrix);
|
|
123142
123217
|
_tempMatrix.scale(_tempScale);
|
|
123143
|
-
if (typeof
|
|
123144
|
-
_tempMatrix.premultiply(
|
|
123218
|
+
if (typeof _this12.bizToThreeMatrix !== 'undefined' && _this12.bizToThreeMatrix) {
|
|
123219
|
+
_tempMatrix.premultiply(_this12.bizToThreeMatrix);
|
|
123145
123220
|
}
|
|
123146
|
-
boxes.mesh.setMatrixAt(
|
|
123147
|
-
boxes.mesh.setColorAt(
|
|
123221
|
+
boxes.mesh.setMatrixAt(_i6, _tempMatrix);
|
|
123222
|
+
boxes.mesh.setColorAt(_i6, _tempColor);
|
|
123148
123223
|
}
|
|
123149
123224
|
boxes.mesh.instanceMatrix.needsUpdate = true;
|
|
123150
123225
|
if (boxes.mesh.instanceColor) boxes.mesh.instanceColor.needsUpdate = true;
|
|
@@ -123158,8 +123233,8 @@ var isDebug = false || false === true;
|
|
|
123158
123233
|
if (flag1Count > 0) {
|
|
123159
123234
|
var totalVerts = 0;
|
|
123160
123235
|
var totalIdx = 0;
|
|
123161
|
-
for (var
|
|
123162
|
-
var _c = flag1Items[
|
|
123236
|
+
for (var _i7 = 0; _i7 < flag1Count; _i7++) {
|
|
123237
|
+
var _c = flag1Items[_i7].c;
|
|
123163
123238
|
var _obbData = _c.box.userData.obbData;
|
|
123164
123239
|
var v = _obbData.length / 3 | 0;
|
|
123165
123240
|
totalVerts += v;
|
|
@@ -123170,16 +123245,16 @@ var isDebug = false || false === true;
|
|
|
123170
123245
|
var needIdx = totalIdx;
|
|
123171
123246
|
var ensureBatch1 = function ensureBatch1() {
|
|
123172
123247
|
if (batch1 && batch1.mesh && batch1.geometry && batch1.material) return;
|
|
123173
|
-
var geometry = new
|
|
123174
|
-
var material = new
|
|
123248
|
+
var geometry = new _this12.THREE.BufferGeometry();
|
|
123249
|
+
var material = new _this12.THREE.MeshBasicMaterial({
|
|
123175
123250
|
vertexColors: true,
|
|
123176
|
-
side:
|
|
123177
|
-
blending:
|
|
123251
|
+
side: _this12.THREE.DoubleSide,
|
|
123252
|
+
blending: _this12.THREE.NoBlending,
|
|
123178
123253
|
depthTest: true,
|
|
123179
123254
|
depthWrite: true,
|
|
123180
123255
|
toneMapped: false
|
|
123181
123256
|
});
|
|
123182
|
-
var mesh = new
|
|
123257
|
+
var mesh = new _this12.THREE.Mesh(geometry, material);
|
|
123183
123258
|
mesh.frustumCulled = false;
|
|
123184
123259
|
batch1 = occObjs.batch1 = {
|
|
123185
123260
|
mesh: mesh,
|
|
@@ -123203,14 +123278,14 @@ var isDebug = false || false === true;
|
|
|
123203
123278
|
batch1.positions = _positions;
|
|
123204
123279
|
batch1.colors = _colors;
|
|
123205
123280
|
batch1.indices = _indices2;
|
|
123206
|
-
var _posAttr = new
|
|
123207
|
-
var _colAttr = new
|
|
123208
|
-
_posAttr.setUsage(
|
|
123209
|
-
_colAttr.setUsage(
|
|
123281
|
+
var _posAttr = new _this12.THREE.BufferAttribute(_positions, 3);
|
|
123282
|
+
var _colAttr = new _this12.THREE.BufferAttribute(_colors, 3);
|
|
123283
|
+
_posAttr.setUsage(_this12.THREE.DynamicDrawUsage);
|
|
123284
|
+
_colAttr.setUsage(_this12.THREE.DynamicDrawUsage);
|
|
123210
123285
|
batch1.geometry.setAttribute('position', _posAttr);
|
|
123211
123286
|
batch1.geometry.setAttribute('color', _colAttr);
|
|
123212
|
-
var _idxAttr = new
|
|
123213
|
-
_idxAttr.setUsage(
|
|
123287
|
+
var _idxAttr = new _this12.THREE.BufferAttribute(_indices2, 1);
|
|
123288
|
+
_idxAttr.setUsage(_this12.THREE.DynamicDrawUsage);
|
|
123214
123289
|
batch1.geometry.setIndex(_idxAttr);
|
|
123215
123290
|
}
|
|
123216
123291
|
var positions = batch1.positions;
|
|
@@ -123219,8 +123294,8 @@ var isDebug = false || false === true;
|
|
|
123219
123294
|
var posPtr = 0;
|
|
123220
123295
|
var idxPtr = 0;
|
|
123221
123296
|
var vertBase = 0;
|
|
123222
|
-
for (var
|
|
123223
|
-
var _flag1Items$_i = flag1Items[
|
|
123297
|
+
for (var _i8 = 0; _i8 < flag1Count; _i8++) {
|
|
123298
|
+
var _flag1Items$_i = flag1Items[_i8],
|
|
123224
123299
|
_c2 = _flag1Items$_i.c,
|
|
123225
123300
|
_idx2 = _flag1Items$_i.idx;
|
|
123226
123301
|
var _obbData2 = _c2.box.userData.obbData;
|
|
@@ -123230,15 +123305,15 @@ var isDebug = false || false === true;
|
|
|
123230
123305
|
var _g = (_idx2 >> 8 & 255) / 255;
|
|
123231
123306
|
var _b = (_idx2 >> 16 & 255) / 255;
|
|
123232
123307
|
var vertexCount = _obbData2.length / 3 | 0;
|
|
123233
|
-
var needTransform = matrixArr && matrixArr.length >= 16 || typeof
|
|
123308
|
+
var needTransform = matrixArr && matrixArr.length >= 16 || typeof _this12.bizToThreeMatrix !== 'undefined' && _this12.bizToThreeMatrix;
|
|
123234
123309
|
if (needTransform) {
|
|
123235
123310
|
if (matrixArr && matrixArr.length >= 16) {
|
|
123236
123311
|
_tempMatA.fromArray(matrixArr);
|
|
123237
123312
|
} else {
|
|
123238
123313
|
_tempMatA.identity();
|
|
123239
123314
|
}
|
|
123240
|
-
if (typeof
|
|
123241
|
-
_tempMatA.premultiply(
|
|
123315
|
+
if (typeof _this12.bizToThreeMatrix !== 'undefined' && _this12.bizToThreeMatrix) {
|
|
123316
|
+
_tempMatA.premultiply(_this12.bizToThreeMatrix);
|
|
123242
123317
|
}
|
|
123243
123318
|
}
|
|
123244
123319
|
if (!needTransform && ArrayBuffer.isView(_obbData2)) {
|
|
@@ -123338,7 +123413,7 @@ var isDebug = false || false === true;
|
|
|
123338
123413
|
state._occMaxIdx = 0;
|
|
123339
123414
|
activeIdIndexArr.length = 0;
|
|
123340
123415
|
}
|
|
123341
|
-
if (!state._occTransparentScene) state._occTransparentScene = new
|
|
123416
|
+
if (!state._occTransparentScene) state._occTransparentScene = new _this12.THREE.Scene();
|
|
123342
123417
|
transparentMesh = state._occTransparentMesh;
|
|
123343
123418
|
transparentCapacity = transparentMesh && transparentMesh.userData && typeof transparentMesh.userData.capacity === 'number' ? transparentMesh.userData.capacity : 0;
|
|
123344
123419
|
if (!transparentMesh || transparentCapacity < transparentTotal) {
|
|
@@ -123348,16 +123423,16 @@ var isDebug = false || false === true;
|
|
|
123348
123423
|
state._occTransparentScene.remove(transparentMesh);
|
|
123349
123424
|
}
|
|
123350
123425
|
nextCap = Math.max(transparentTotal, transparentCapacity > 0 ? transparentCapacity * 2 : 256);
|
|
123351
|
-
geometry = new
|
|
123352
|
-
material = new
|
|
123426
|
+
geometry = new _this12.THREE.BoxGeometry(1, 1, 1);
|
|
123427
|
+
material = new _this12.THREE.MeshBasicMaterial({
|
|
123353
123428
|
color: 0xffffff,
|
|
123354
|
-
side:
|
|
123355
|
-
blending:
|
|
123429
|
+
side: _this12.THREE.DoubleSide,
|
|
123430
|
+
blending: _this12.THREE.NoBlending,
|
|
123356
123431
|
depthTest: true,
|
|
123357
123432
|
depthWrite: false,
|
|
123358
123433
|
toneMapped: false
|
|
123359
123434
|
});
|
|
123360
|
-
transparentMesh = new
|
|
123435
|
+
transparentMesh = new _this12.THREE.InstancedMesh(geometry, material, nextCap);
|
|
123361
123436
|
transparentMesh.frustumCulled = false;
|
|
123362
123437
|
transparentMesh.matrixAutoUpdate = false;
|
|
123363
123438
|
transparentMesh.userData.capacity = nextCap;
|
|
@@ -123367,15 +123442,15 @@ var isDebug = false || false === true;
|
|
|
123367
123442
|
state._occTransparentScene.add(transparentMesh);
|
|
123368
123443
|
}
|
|
123369
123444
|
if (transparentTotal > 0) {
|
|
123370
|
-
tempMatrix = new
|
|
123371
|
-
tempScale = new
|
|
123372
|
-
tempObj = new
|
|
123373
|
-
tempColor = new
|
|
123445
|
+
tempMatrix = new _this12.THREE.Matrix4();
|
|
123446
|
+
tempScale = new _this12.THREE.Vector3();
|
|
123447
|
+
tempObj = new _this12.THREE.Object3D();
|
|
123448
|
+
tempColor = new _this12.THREE.Color();
|
|
123374
123449
|
tIdx = 1;
|
|
123375
|
-
for (
|
|
123376
|
-
c = transparentCandidates[
|
|
123450
|
+
for (_i9 = 0; _i9 < transparentTotal; _i9++) {
|
|
123451
|
+
c = transparentCandidates[_i9];
|
|
123377
123452
|
idx = tIdx++;
|
|
123378
|
-
transparentIdIndexArr[idx] =
|
|
123453
|
+
transparentIdIndexArr[idx] = _this12.formatModelId(c.modelId);
|
|
123379
123454
|
r = (idx & 255) / 255;
|
|
123380
123455
|
g = (idx >> 8 & 255) / 255;
|
|
123381
123456
|
b = (idx >> 16 & 255) / 255;
|
|
@@ -123385,8 +123460,8 @@ var isDebug = false || false === true;
|
|
|
123385
123460
|
tempMatrix.copy(matrix);
|
|
123386
123461
|
tempScale.copy(halfSize).multiplyScalar(2);
|
|
123387
123462
|
tempMatrix.scale(tempScale);
|
|
123388
|
-
if (typeof
|
|
123389
|
-
tempMatrix.premultiply(
|
|
123463
|
+
if (typeof _this12.bizToThreeMatrix !== 'undefined' && _this12.bizToThreeMatrix) {
|
|
123464
|
+
tempMatrix.premultiply(_this12.bizToThreeMatrix);
|
|
123390
123465
|
}
|
|
123391
123466
|
} else {
|
|
123392
123467
|
c.box.getSize(tempScale);
|
|
@@ -123396,8 +123471,8 @@ var isDebug = false || false === true;
|
|
|
123396
123471
|
tempObj.updateMatrix();
|
|
123397
123472
|
tempMatrix.copy(tempObj.matrix);
|
|
123398
123473
|
}
|
|
123399
|
-
transparentMesh.setMatrixAt(
|
|
123400
|
-
transparentMesh.setColorAt(
|
|
123474
|
+
transparentMesh.setMatrixAt(_i9, tempMatrix);
|
|
123475
|
+
transparentMesh.setColorAt(_i9, tempColor);
|
|
123401
123476
|
}
|
|
123402
123477
|
transparentMesh.count = transparentTotal;
|
|
123403
123478
|
transparentMesh.visible = true;
|
|
@@ -123414,28 +123489,28 @@ var isDebug = false || false === true;
|
|
|
123414
123489
|
}
|
|
123415
123490
|
|
|
123416
123491
|
// console.log('this.renderer', this.renderer)
|
|
123417
|
-
prevToneMapping =
|
|
123418
|
-
prevTarget =
|
|
123492
|
+
prevToneMapping = _this12.renderer.toneMapping;
|
|
123493
|
+
prevTarget = _this12.renderer.getRenderTarget ? _this12.renderer.getRenderTarget() : null;
|
|
123419
123494
|
prevClearColorHex = 0x000000;
|
|
123420
123495
|
prevClearAlpha = 0;
|
|
123421
123496
|
try {
|
|
123422
|
-
_c3 =
|
|
123497
|
+
_c3 = _this12.renderer.getClearColor ? _this12.renderer.getClearColor() : null;
|
|
123423
123498
|
if (_c3 && _c3.isColor) prevClearColorHex = _c3.getHex();
|
|
123424
|
-
prevClearAlpha = typeof
|
|
123499
|
+
prevClearAlpha = typeof _this12.renderer.getClearAlpha === 'function' ? _this12.renderer.getClearAlpha() : 0;
|
|
123425
123500
|
} catch (_) {}
|
|
123426
|
-
|
|
123427
|
-
|
|
123428
|
-
|
|
123429
|
-
|
|
123430
|
-
|
|
123431
|
-
|
|
123432
|
-
|
|
123501
|
+
_this12.renderer.toneMapping = _this12.THREE.NoToneMapping;
|
|
123502
|
+
_this12.renderer.setRenderTarget(rt);
|
|
123503
|
+
_this12.renderer.setClearColor(new _this12.THREE.Color(0, 0, 0), 0);
|
|
123504
|
+
_this12.renderer.clear(true, true, false);
|
|
123505
|
+
_this12.camera.updateMatrixWorld(true);
|
|
123506
|
+
_this12.renderer.render(state._occScene, _this12.camera);
|
|
123507
|
+
_this12.updateGlobalSceneBoundingBox();
|
|
123433
123508
|
// const t1 = performance.now();
|
|
123434
123509
|
// 从响应式对象读取 previewEnabled
|
|
123435
|
-
|
|
123510
|
+
_this12.$emit('updateBoundingBox');
|
|
123436
123511
|
|
|
123437
123512
|
// const tPreview0 = performance.now();
|
|
123438
|
-
if (
|
|
123513
|
+
if (_this12.occlusionState.previewEnabled) {
|
|
123439
123514
|
if (!state._previewCanvas) {
|
|
123440
123515
|
cvs = document.createElement('canvas');
|
|
123441
123516
|
cvs.style.position = 'fixed';
|
|
@@ -123453,11 +123528,11 @@ var isDebug = false || false === true;
|
|
|
123453
123528
|
}
|
|
123454
123529
|
state._previewCanvas.width = sw;
|
|
123455
123530
|
state._previewCanvas.height = sh;
|
|
123456
|
-
cssW = Math.min(
|
|
123457
|
-
cssH = Math.min(
|
|
123531
|
+
cssW = Math.min(_this12.renderer.domElement.width / 5);
|
|
123532
|
+
cssH = Math.min(_this12.renderer.domElement.height / 5);
|
|
123458
123533
|
state._previewCanvas.style.width = cssW + 'px';
|
|
123459
123534
|
state._previewCanvas.style.height = cssH + 'px';
|
|
123460
|
-
|
|
123535
|
+
_this12.renderer.readRenderTargetPixels(rt, 0, 0, sw, sh, state._previewBuffer);
|
|
123461
123536
|
if (!state._previewImageData || state._previewImageData.width !== sw || state._previewImageData.height !== sh) {
|
|
123462
123537
|
state._previewImageData = state._previewCtx.createImageData(sw, sh);
|
|
123463
123538
|
}
|
|
@@ -123480,25 +123555,25 @@ var isDebug = false || false === true;
|
|
|
123480
123555
|
}
|
|
123481
123556
|
// const tPreview1 = performance.now();
|
|
123482
123557
|
// _occRecordPerf('occ_preview_ms', tPreview1 - tPreview0, { sw, sh });
|
|
123483
|
-
|
|
123558
|
+
_this12.renderer.readRenderTargetPixels(rt, 0, 0, sw, sh, state._colorBuffer);
|
|
123484
123559
|
idIndexArr = activeIdIndexArr;
|
|
123485
123560
|
maxIdx = typeof state._occMaxIdx === 'number' ? state._occMaxIdx : 0;
|
|
123486
123561
|
totalPixels = sw * sh;
|
|
123487
123562
|
targetSamples = totalPixels;
|
|
123488
123563
|
baseStride = Math.max(1, Math.floor(Math.sqrt(totalPixels / Math.max(1, targetSamples))));
|
|
123489
|
-
extraStride =
|
|
123564
|
+
extraStride = _this12.occlusionState && _this12.occlusionState.sampleStride ? _this12.occlusionState.sampleStride : 1;
|
|
123490
123565
|
stride = Math.max(1, baseStride * Math.max(1, extraStride));
|
|
123491
|
-
minSampleCount =
|
|
123566
|
+
minSampleCount = _this12.occlusionState && _this12.occlusionState.minSampleCount ? _this12.occlusionState.minSampleCount : 1;
|
|
123492
123567
|
_context3.n = 11;
|
|
123493
|
-
return
|
|
123568
|
+
return _this12.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, maxIdx, minSampleCount);
|
|
123494
123569
|
case 11:
|
|
123495
123570
|
scanResult = _context3.v;
|
|
123496
123571
|
if (scanResult && scanResult.buffer) {
|
|
123497
123572
|
state._colorBuffer = new Uint8Array(scanResult.buffer);
|
|
123498
123573
|
}
|
|
123499
123574
|
indices = scanResult && scanResult.indices ? scanResult.indices : [];
|
|
123500
|
-
for (
|
|
123501
|
-
id = idIndexArr[indices[
|
|
123575
|
+
for (_i0 = 0; _i0 < indices.length; _i0++) {
|
|
123576
|
+
id = idIndexArr[indices[_i0]];
|
|
123502
123577
|
if (typeof id !== 'undefined') {
|
|
123503
123578
|
visibleIdSet.add(id);
|
|
123504
123579
|
}
|
|
@@ -123508,43 +123583,43 @@ var isDebug = false || false === true;
|
|
|
123508
123583
|
_context3.n = 13;
|
|
123509
123584
|
break;
|
|
123510
123585
|
}
|
|
123511
|
-
|
|
123512
|
-
|
|
123513
|
-
|
|
123514
|
-
|
|
123586
|
+
_this12.renderer.setClearColor(new _this12.THREE.Color(0, 0, 0), 0);
|
|
123587
|
+
_this12.renderer.clear(true, false, false);
|
|
123588
|
+
_this12.renderer.render(state._occTransparentScene, _this12.camera);
|
|
123589
|
+
_this12.renderer.readRenderTargetPixels(rt, 0, 0, sw, sh, state._colorBuffer);
|
|
123515
123590
|
tIdIndexArr = transparentIdIndexArr;
|
|
123516
123591
|
_context3.n = 12;
|
|
123517
|
-
return
|
|
123592
|
+
return _this12.scanOcclusionIndices(state._colorBuffer, sw, sh, stride, transparentMaxIdx, minSampleCount);
|
|
123518
123593
|
case 12:
|
|
123519
123594
|
tScanResult = _context3.v;
|
|
123520
123595
|
if (tScanResult && tScanResult.buffer) {
|
|
123521
123596
|
state._colorBuffer = new Uint8Array(tScanResult.buffer);
|
|
123522
123597
|
}
|
|
123523
123598
|
tIndices = tScanResult && tScanResult.indices ? tScanResult.indices : [];
|
|
123524
|
-
for (
|
|
123525
|
-
_id = tIdIndexArr[tIndices[
|
|
123599
|
+
for (_i1 = 0; _i1 < tIndices.length; _i1++) {
|
|
123600
|
+
_id = tIdIndexArr[tIndices[_i1]];
|
|
123526
123601
|
if (typeof _id !== 'undefined') {
|
|
123527
123602
|
visibleIdSet.add(_id);
|
|
123528
123603
|
}
|
|
123529
123604
|
}
|
|
123530
123605
|
case 13:
|
|
123531
|
-
|
|
123532
|
-
|
|
123533
|
-
|
|
123606
|
+
_this12.renderer.setRenderTarget(prevTarget);
|
|
123607
|
+
_this12.renderer.setClearColor(prevClearColorHex, prevClearAlpha);
|
|
123608
|
+
_this12.renderer.toneMapping = prevToneMapping;
|
|
123534
123609
|
_context3.n = 15;
|
|
123535
123610
|
break;
|
|
123536
123611
|
case 14:
|
|
123537
123612
|
_context3.p = 14;
|
|
123538
123613
|
_t2 = _context3.v;
|
|
123539
|
-
for (
|
|
123540
|
-
visibleIdSet.add(candidates[
|
|
123614
|
+
for (_i10 = 0; _i10 < candidates.length; _i10++) {
|
|
123615
|
+
visibleIdSet.add(candidates[_i10].modelId);
|
|
123541
123616
|
}
|
|
123542
123617
|
case 15:
|
|
123543
123618
|
_context3.n = 17;
|
|
123544
123619
|
break;
|
|
123545
123620
|
case 16:
|
|
123546
|
-
for (
|
|
123547
|
-
visibleIdSet.add(candidates[
|
|
123621
|
+
for (_i11 = 0; _i11 < candidates.length; _i11++) {
|
|
123622
|
+
visibleIdSet.add(candidates[_i11].modelId);
|
|
123548
123623
|
}
|
|
123549
123624
|
case 17:
|
|
123550
123625
|
visibleIds.length = 0;
|
|
@@ -123553,7 +123628,7 @@ var isDebug = false || false === true;
|
|
|
123553
123628
|
});
|
|
123554
123629
|
toLoadSet = new Set(visibleIdSet);
|
|
123555
123630
|
parentsToCheck = new Set();
|
|
123556
|
-
|
|
123631
|
+
_this12.scene.traverse(function (child) {
|
|
123557
123632
|
if (!child.isInstancedMesh) return;
|
|
123558
123633
|
// 如果复用数量等于大于2个,则跳过裁剪和剔除处理(始终保留)
|
|
123559
123634
|
if (child.count >= 2) {
|
|
@@ -123563,11 +123638,11 @@ var isDebug = false || false === true;
|
|
|
123563
123638
|
var modelIds = Array.from(instancesMap.keys());
|
|
123564
123639
|
|
|
123565
123640
|
// 第一遍遍历:检查是否有任何一个实例处于活跃状态(在视锥体内且可见)
|
|
123566
|
-
for (var
|
|
123567
|
-
var _modelId = _modelIds2[
|
|
123641
|
+
for (var _i12 = 0, _modelIds2 = modelIds; _i12 < _modelIds2.length; _i12++) {
|
|
123642
|
+
var _modelId = _modelIds2[_i12];
|
|
123568
123643
|
// 检查已取消勾选模型进行卸载
|
|
123569
123644
|
var documentId = _modelId.split(':')[1];
|
|
123570
|
-
if (!
|
|
123645
|
+
if (!_this12.noObserver.documentModelIds.get(documentId)) {
|
|
123571
123646
|
toUnload.push({
|
|
123572
123647
|
modelId: _modelId,
|
|
123573
123648
|
child: child
|
|
@@ -123577,12 +123652,12 @@ var isDebug = false || false === true;
|
|
|
123577
123652
|
if (bypassList && bypassList.size > 0 && bypassList.has(_modelId)) return;
|
|
123578
123653
|
var instanceInfo = instancesMap.get(_modelId);
|
|
123579
123654
|
var instanceIndex = instanceInfo && typeof instanceInfo.instanceIndex === 'number' ? instanceInfo.instanceIndex : null;
|
|
123580
|
-
var _box =
|
|
123581
|
-
if (!
|
|
123655
|
+
var _box = _this12._boxIndex && _this12._boxIndex.has(String(_modelId)) ? _this12._boxIndex.get(String(_modelId)) : _this12._boxIndex && _this12._boxIndex.has(_modelId) ? _this12._boxIndex.get(_modelId) : null;
|
|
123656
|
+
if (!_this12.shouldApplyOcclusionByBox(_box)) {
|
|
123582
123657
|
allInactive = false;
|
|
123583
123658
|
continue;
|
|
123584
123659
|
}
|
|
123585
|
-
var _inFrustum =
|
|
123660
|
+
var _inFrustum = _this12.isModelInFrustum(child, instanceIndex, globalFrustum);
|
|
123586
123661
|
var _modelInVisible = toLoadSet.has(_modelId);
|
|
123587
123662
|
// console.log('modelId', modelId, 'inFrustum', inFrustum, 'modelInVisible', modelInVisible)
|
|
123588
123663
|
|
|
@@ -123593,10 +123668,10 @@ var isDebug = false || false === true;
|
|
|
123593
123668
|
}
|
|
123594
123669
|
|
|
123595
123670
|
// 第二遍遍历:同步状态并决定是否卸载
|
|
123596
|
-
for (var
|
|
123597
|
-
var _modelId2 = _modelIds3[
|
|
123598
|
-
var _box2 =
|
|
123599
|
-
if (!
|
|
123671
|
+
for (var _i13 = 0, _modelIds3 = modelIds; _i13 < _modelIds3.length; _i13++) {
|
|
123672
|
+
var _modelId2 = _modelIds3[_i13];
|
|
123673
|
+
var _box2 = _this12._boxIndex && _this12._boxIndex.has(String(_modelId2)) ? _this12._boxIndex.get(String(_modelId2)) : _this12._boxIndex && _this12._boxIndex.has(_modelId2) ? _this12._boxIndex.get(_modelId2) : null;
|
|
123674
|
+
if (!_this12.shouldApplyOcclusionByBox(_box2)) {
|
|
123600
123675
|
if (toLoadSet.has(_modelId2)) {
|
|
123601
123676
|
toLoadSet.delete(_modelId2);
|
|
123602
123677
|
}
|
|
@@ -123608,7 +123683,7 @@ var isDebug = false || false === true;
|
|
|
123608
123683
|
}
|
|
123609
123684
|
|
|
123610
123685
|
// 仅当所有实例都不活跃时,才执行卸载
|
|
123611
|
-
if (!
|
|
123686
|
+
if (!_this12.firstPerSign && !_this12.roaming && allInactive) {
|
|
123612
123687
|
toUnload.push({
|
|
123613
123688
|
modelId: _modelId2,
|
|
123614
123689
|
child: child
|
|
@@ -123623,38 +123698,38 @@ var isDebug = false || false === true;
|
|
|
123623
123698
|
}
|
|
123624
123699
|
var modelId = child.parent && child.parent.userData && child.parent.userData.instanceId ? child.parent.userData.instanceId : child.uuid;
|
|
123625
123700
|
if (bypassList && bypassList.size > 0 && bypassList.has(modelId)) return;
|
|
123626
|
-
var box =
|
|
123627
|
-
if (!
|
|
123701
|
+
var box = _this12._boxIndex && _this12._boxIndex.has(String(modelId)) ? _this12._boxIndex.get(String(modelId)) : _this12._boxIndex && _this12._boxIndex.has(modelId) ? _this12._boxIndex.get(modelId) : null;
|
|
123702
|
+
if (!_this12.shouldApplyOcclusionByBox(box)) {
|
|
123628
123703
|
if (toLoadSet.has(modelId)) {
|
|
123629
123704
|
toLoadSet.delete(modelId);
|
|
123630
123705
|
}
|
|
123631
123706
|
return;
|
|
123632
123707
|
}
|
|
123633
|
-
var inFrustum =
|
|
123708
|
+
var inFrustum = _this12.isModelInFrustum(child, null, globalFrustum);
|
|
123634
123709
|
var modelInVisible = toLoadSet.has(modelId);
|
|
123635
123710
|
if (modelInVisible) {
|
|
123636
123711
|
toLoadSet.delete(modelId);
|
|
123637
123712
|
}
|
|
123638
|
-
if (!
|
|
123713
|
+
if (!_this12.firstPerSign && !_this12.roaming && (!inFrustum || !modelInVisible)) {
|
|
123639
123714
|
toUnload.push({
|
|
123640
123715
|
modelId: modelId,
|
|
123641
123716
|
child: child
|
|
123642
123717
|
});
|
|
123643
123718
|
}
|
|
123644
123719
|
});
|
|
123645
|
-
for (
|
|
123646
|
-
_toUnload$_i = _toUnload[
|
|
123720
|
+
for (_i14 = 0, _toUnload = toUnload; _i14 < _toUnload.length; _i14++) {
|
|
123721
|
+
_toUnload$_i = _toUnload[_i14], modelId = _toUnload$_i.modelId, child = _toUnload$_i.child;
|
|
123647
123722
|
if (child && child.parent) parentsToCheck.add(child.parent);
|
|
123648
|
-
|
|
123723
|
+
_this12.unloadInstancedModel(modelId, child);
|
|
123649
123724
|
}
|
|
123650
|
-
if (
|
|
123725
|
+
if (_this12.scene) {
|
|
123651
123726
|
parentsToCheck.forEach(function (group) {
|
|
123652
123727
|
if (group && group.children && group.children.length === 0) {
|
|
123653
123728
|
group.removeFromParent();
|
|
123654
123729
|
}
|
|
123655
123730
|
});
|
|
123656
123731
|
}
|
|
123657
|
-
|
|
123732
|
+
_this12.modelStateManager.isloadedModelsIds = Object.freeze(Array.from(toLoadSet));
|
|
123658
123733
|
case 18:
|
|
123659
123734
|
return _context3.a(2);
|
|
123660
123735
|
}
|
|
@@ -123762,7 +123837,7 @@ var isDebug = false || false === true;
|
|
|
123762
123837
|
* @param {string} [config.projectId] - 项目ID
|
|
123763
123838
|
*/
|
|
123764
123839
|
initStreamLoader: function initStreamLoader(modelApi) {
|
|
123765
|
-
var
|
|
123840
|
+
var _this13 = this;
|
|
123766
123841
|
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
123767
123842
|
var _ref2 = config || {},
|
|
123768
123843
|
projectId = _ref2.projectId,
|
|
@@ -123778,7 +123853,7 @@ var isDebug = false || false === true;
|
|
|
123778
123853
|
return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context4) {
|
|
123779
123854
|
while (1) switch (_context4.n) {
|
|
123780
123855
|
case 0:
|
|
123781
|
-
if (!(
|
|
123856
|
+
if (!(_this13.userInteracting || _this13.noObserver.batchLoadingState.interactionState.isInteracting)) {
|
|
123782
123857
|
_context4.n = 1;
|
|
123783
123858
|
break;
|
|
123784
123859
|
}
|
|
@@ -123828,9 +123903,9 @@ var isDebug = false || false === true;
|
|
|
123828
123903
|
this.noObserver.occlusionWorkerRequestMap = new Map();
|
|
123829
123904
|
streamLoader.worker.addEventListener('message', function (e) {
|
|
123830
123905
|
var payload = e.data || {};
|
|
123831
|
-
var pending =
|
|
123906
|
+
var pending = _this13.noObserver.occlusionWorkerRequestMap.get(payload.id);
|
|
123832
123907
|
if (!pending) return;
|
|
123833
|
-
|
|
123908
|
+
_this13.noObserver.occlusionWorkerRequestMap.delete(payload.id);
|
|
123834
123909
|
pending.resolve(payload);
|
|
123835
123910
|
});
|
|
123836
123911
|
}
|
|
@@ -123841,13 +123916,13 @@ var isDebug = false || false === true;
|
|
|
123841
123916
|
* @param {Object} materialData - 材质数据
|
|
123842
123917
|
*/
|
|
123843
123918
|
setStreamModel: function setStreamModel(item, materialData) {
|
|
123844
|
-
var
|
|
123919
|
+
var _this14 = this;
|
|
123845
123920
|
if (this.noObserver.streamLoader) {
|
|
123846
123921
|
this.noObserver.streamLoader.setCurrentModel(item, materialData);
|
|
123847
123922
|
// 设置完模型后,尝试触发一次范围加载以渲染初始视图
|
|
123848
123923
|
// 使用 setTimeout 确保在下一帧执行,避免当前栈还在初始化中
|
|
123849
123924
|
setTimeout(function () {
|
|
123850
|
-
|
|
123925
|
+
_this14.getRangeStream();
|
|
123851
123926
|
}, 0);
|
|
123852
123927
|
} else {}
|
|
123853
123928
|
},
|
|
@@ -123855,17 +123930,17 @@ var isDebug = false || false === true;
|
|
|
123855
123930
|
* 批量加载区域(供外部调用)
|
|
123856
123931
|
*/
|
|
123857
123932
|
batchLoadRegions: function batchLoadRegions(item, divideData, materialData) {
|
|
123858
|
-
var
|
|
123933
|
+
var _this15 = this;
|
|
123859
123934
|
return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee6() {
|
|
123860
123935
|
return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context6) {
|
|
123861
123936
|
while (1) switch (_context6.n) {
|
|
123862
123937
|
case 0:
|
|
123863
|
-
if (!
|
|
123938
|
+
if (!_this15.noObserver.streamLoader) {
|
|
123864
123939
|
_context6.n = 1;
|
|
123865
123940
|
break;
|
|
123866
123941
|
}
|
|
123867
123942
|
_context6.n = 1;
|
|
123868
|
-
return
|
|
123943
|
+
return _this15.noObserver.streamLoader.batchLoadRegions(item, divideData, materialData);
|
|
123869
123944
|
case 1:
|
|
123870
123945
|
return _context6.a(2);
|
|
123871
123946
|
}
|
|
@@ -123876,7 +123951,7 @@ var isDebug = false || false === true;
|
|
|
123876
123951
|
* 获取批量加载详情(供外部调用)
|
|
123877
123952
|
*/
|
|
123878
123953
|
loadModelByIds: function loadModelByIds(options) {
|
|
123879
|
-
var
|
|
123954
|
+
var _this16 = this;
|
|
123880
123955
|
return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee7() {
|
|
123881
123956
|
var _ref3, ids;
|
|
123882
123957
|
return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context7) {
|
|
@@ -123884,13 +123959,13 @@ var isDebug = false || false === true;
|
|
|
123884
123959
|
case 0:
|
|
123885
123960
|
// 绕过剔除模型
|
|
123886
123961
|
_ref3 = options.params || {}, ids = _ref3.ids;
|
|
123887
|
-
|
|
123888
|
-
if (!
|
|
123962
|
+
_this16.addBypassCullingModelIds(ids);
|
|
123963
|
+
if (!_this16.noObserver.streamLoader) {
|
|
123889
123964
|
_context7.n = 2;
|
|
123890
123965
|
break;
|
|
123891
123966
|
}
|
|
123892
123967
|
_context7.n = 1;
|
|
123893
|
-
return
|
|
123968
|
+
return _this16.noObserver.streamLoader.loadModelByIds(options);
|
|
123894
123969
|
case 1:
|
|
123895
123970
|
return _context7.a(2, _context7.v);
|
|
123896
123971
|
case 2:
|
|
@@ -123904,7 +123979,7 @@ var isDebug = false || false === true;
|
|
|
123904
123979
|
*/
|
|
123905
123980
|
processModelItem: function processModelItem(item) {
|
|
123906
123981
|
var _arguments = arguments,
|
|
123907
|
-
|
|
123982
|
+
_this17 = this;
|
|
123908
123983
|
return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee8() {
|
|
123909
123984
|
var _options$onComplete;
|
|
123910
123985
|
var options, res;
|
|
@@ -123913,22 +123988,22 @@ var isDebug = false || false === true;
|
|
|
123913
123988
|
case 0:
|
|
123914
123989
|
options = _arguments.length > 1 && _arguments[1] !== undefined ? _arguments[1] : {};
|
|
123915
123990
|
_context8.n = 1;
|
|
123916
|
-
return
|
|
123991
|
+
return _this17.noObserver.streamLoader.processModelItem(item, options);
|
|
123917
123992
|
case 1:
|
|
123918
123993
|
res = _context8.v;
|
|
123919
123994
|
// item.id is the documentId
|
|
123920
123995
|
if (item && item.id) {
|
|
123921
123996
|
if (res && res.sceneBox) {
|
|
123922
|
-
|
|
123997
|
+
_this17.setSceneBox(res.sceneBox, item.id, true);
|
|
123923
123998
|
}
|
|
123924
123999
|
if (res && res.boxIndex) {
|
|
123925
|
-
|
|
124000
|
+
_this17.setBoxIndex(res.boxIndex, item.id, true);
|
|
123926
124001
|
}
|
|
123927
|
-
|
|
124002
|
+
_this17.tryInitialCenterAfterBoundsReady();
|
|
123928
124003
|
// this.setBoxIndex(boxJson.data, item.id, true);
|
|
123929
124004
|
}
|
|
123930
124005
|
(_options$onComplete = options.onComplete) === null || _options$onComplete === void 0 || _options$onComplete.call(options);
|
|
123931
|
-
|
|
124006
|
+
_this17.notifyCameraChange(); // 触发场景更新
|
|
123932
124007
|
case 2:
|
|
123933
124008
|
return _context8.a(2);
|
|
123934
124009
|
}
|
|
@@ -123982,7 +124057,7 @@ var isDebug = false || false === true;
|
|
|
123982
124057
|
* 内部渲染流式数据方法
|
|
123983
124058
|
*/
|
|
123984
124059
|
renderModelData: function renderModelData(meshes, primitives, list, range, onComplete, immediateUpdate) {
|
|
123985
|
-
var
|
|
124060
|
+
var _this18 = this;
|
|
123986
124061
|
var renderOptions = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
|
|
123987
124062
|
// 构造 drawModel 需要的数据格式
|
|
123988
124063
|
var modelRegistry = this.noObserver.streamLoader.modelRegistry;
|
|
@@ -124036,8 +124111,8 @@ var isDebug = false || false === true;
|
|
|
124036
124111
|
resolve(result || {});
|
|
124037
124112
|
};
|
|
124038
124113
|
options.onComplete = function (complete) {
|
|
124039
|
-
if (
|
|
124040
|
-
|
|
124114
|
+
if (_this18.sceneCommandService && typeof _this18.sceneCommandService.retryPendingOriginalModelSaveChanges === 'function') {
|
|
124115
|
+
_this18.sceneCommandService.retryPendingOriginalModelSaveChanges();
|
|
124041
124116
|
}
|
|
124042
124117
|
onComplete === null || onComplete === void 0 || onComplete(complete);
|
|
124043
124118
|
finish(complete);
|
|
@@ -124047,7 +124122,7 @@ var isDebug = false || false === true;
|
|
|
124047
124122
|
canceled: true
|
|
124048
124123
|
}, cancelInfo || {}));
|
|
124049
124124
|
};
|
|
124050
|
-
|
|
124125
|
+
_this18.drawModel(regionModelData, '', meshNameConfig, options);
|
|
124051
124126
|
});
|
|
124052
124127
|
},
|
|
124053
124128
|
waitNextRenderFrame: function waitNextRenderFrame() {
|
|
@@ -124063,7 +124138,7 @@ var isDebug = false || false === true;
|
|
|
124063
124138
|
},
|
|
124064
124139
|
handleRangeStreamComplete: function handleRangeStreamComplete() {
|
|
124065
124140
|
var _arguments2 = arguments,
|
|
124066
|
-
|
|
124141
|
+
_this19 = this;
|
|
124067
124142
|
return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee9() {
|
|
124068
124143
|
var payload;
|
|
124069
124144
|
return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context9) {
|
|
@@ -124071,9 +124146,9 @@ var isDebug = false || false === true;
|
|
|
124071
124146
|
case 0:
|
|
124072
124147
|
payload = _arguments2.length > 0 && _arguments2[0] !== undefined ? _arguments2[0] : {};
|
|
124073
124148
|
_context9.n = 1;
|
|
124074
|
-
return
|
|
124149
|
+
return _this19.waitNextRenderFrame();
|
|
124075
124150
|
case 1:
|
|
124076
|
-
|
|
124151
|
+
_this19.$emit('loadComplete', com_graphicsvue_type_script_lang_js_objectSpread({
|
|
124077
124152
|
source: 'inRangeDis2'
|
|
124078
124153
|
}, payload));
|
|
124079
124154
|
case 2:
|
|
@@ -124242,7 +124317,7 @@ var isDebug = false || false === true;
|
|
|
124242
124317
|
* 统一监听:用户交互(Wheel/Control)、程序化动画、API调用
|
|
124243
124318
|
*/
|
|
124244
124319
|
initCameraChangeObserver: function initCameraChangeObserver() {
|
|
124245
|
-
var
|
|
124320
|
+
var _this20 = this;
|
|
124246
124321
|
// 初始化 control 状态标志
|
|
124247
124322
|
this.noObserver.isControlActive = false;
|
|
124248
124323
|
var _this = this;
|
|
@@ -124252,28 +124327,28 @@ var isDebug = false || false === true;
|
|
|
124252
124327
|
return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context0) {
|
|
124253
124328
|
while (1) switch (_context0.n) {
|
|
124254
124329
|
case 0:
|
|
124255
|
-
if (
|
|
124330
|
+
if (_this20.noObserver.isObserverEnabled) {
|
|
124256
124331
|
_context0.n = 1;
|
|
124257
124332
|
break;
|
|
124258
124333
|
}
|
|
124259
124334
|
return _context0.a(2);
|
|
124260
124335
|
case 1:
|
|
124261
|
-
if (!(source === 'rest' &&
|
|
124336
|
+
if (!(source === 'rest' && _this20.noObserver.isControlActive)) {
|
|
124262
124337
|
_context0.n = 2;
|
|
124263
124338
|
break;
|
|
124264
124339
|
}
|
|
124265
124340
|
return _context0.a(2);
|
|
124266
124341
|
case 2:
|
|
124267
|
-
if (!
|
|
124342
|
+
if (!_this20.modelStateManager.frustumCheckEnabled) {
|
|
124268
124343
|
_context0.n = 3;
|
|
124269
124344
|
break;
|
|
124270
124345
|
}
|
|
124271
124346
|
_context0.n = 3;
|
|
124272
|
-
return
|
|
124347
|
+
return _this20.performFrustumCulling();
|
|
124273
124348
|
case 3:
|
|
124274
124349
|
// 执行流式加载请求
|
|
124275
|
-
if (
|
|
124276
|
-
|
|
124350
|
+
if (_this20.modelStateManager.isloadedModelsIds && _this20.modelStateManager.isloadedModelsIds.length > 0) {
|
|
124351
|
+
_this20.getRangeStream(false);
|
|
124277
124352
|
}
|
|
124278
124353
|
case 4:
|
|
124279
124354
|
return _context0.a(2);
|
|
@@ -124298,18 +124373,18 @@ var isDebug = false || false === true;
|
|
|
124298
124373
|
// 2. 公开API:允许外部或业务逻辑手动触发更新
|
|
124299
124374
|
this.notifyCameraChange = function () {
|
|
124300
124375
|
var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'api';
|
|
124301
|
-
|
|
124376
|
+
_this20._cameraChangeObserver(source);
|
|
124302
124377
|
};
|
|
124303
124378
|
|
|
124304
124379
|
// 3. 监听器 - Wheel (用户滚轮)
|
|
124305
124380
|
this._wheelHandler = function (res) {
|
|
124306
|
-
|
|
124381
|
+
_this20.$emit('wheelStart', res);
|
|
124307
124382
|
|
|
124308
124383
|
// 统一交互开始处理
|
|
124309
|
-
|
|
124384
|
+
_this20.beginInteraction('wheel');
|
|
124310
124385
|
|
|
124311
124386
|
// 设置滚轮交互的结束检测
|
|
124312
|
-
|
|
124387
|
+
_this20.scheduleWheelInteractionEnd(res, 100);
|
|
124313
124388
|
|
|
124314
124389
|
// 滚轮逻辑:infinityDolly 与 maxDollyDistance 控制
|
|
124315
124390
|
var event = res;
|
|
@@ -124325,10 +124400,10 @@ var isDebug = false || false === true;
|
|
|
124325
124400
|
|
|
124326
124401
|
// dolly最大距离限制
|
|
124327
124402
|
try {
|
|
124328
|
-
if (
|
|
124403
|
+
if (_this20.sceneBoundingBox && isFinite(maxDollyDistance)) {
|
|
124329
124404
|
if (isZoomOut) {
|
|
124330
|
-
|
|
124331
|
-
var currentDistance =
|
|
124405
|
+
_this20.camera.updateMatrixWorld(true);
|
|
124406
|
+
var currentDistance = _this20.camera.position.distanceTo(_this20.cameraControls._target);
|
|
124332
124407
|
if (currentDistance >= maxDollyDistance) {
|
|
124333
124408
|
event.preventDefault && event.preventDefault();
|
|
124334
124409
|
event.stopImmediatePropagation && event.stopImmediatePropagation();
|
|
@@ -124341,17 +124416,17 @@ var isDebug = false || false === true;
|
|
|
124341
124416
|
}
|
|
124342
124417
|
|
|
124343
124418
|
// 触发观察者
|
|
124344
|
-
|
|
124419
|
+
_this20._cameraChangeObserver('wheel');
|
|
124345
124420
|
};
|
|
124346
124421
|
this.renderer.domElement.addEventListener('wheel', this._wheelHandler);
|
|
124347
124422
|
|
|
124348
124423
|
// 4. 监听器 - Controls (用户拖拽/操作)
|
|
124349
124424
|
this._onControlStart = function (res) {
|
|
124350
|
-
|
|
124425
|
+
_this20.noObserver.isControlActive = true;
|
|
124351
124426
|
|
|
124352
124427
|
// 统一交互开始处理(相机)
|
|
124353
|
-
|
|
124354
|
-
|
|
124428
|
+
_this20.beginInteraction('this.camera');
|
|
124429
|
+
_this20.$emit('controlStart', res);
|
|
124355
124430
|
|
|
124356
124431
|
// 记录鼠标按下时的位置
|
|
124357
124432
|
var event = res.originalEvent || window.event;
|
|
@@ -124363,10 +124438,10 @@ var isDebug = false || false === true;
|
|
|
124363
124438
|
};
|
|
124364
124439
|
this._onControlEnd = function (res) {
|
|
124365
124440
|
_this.noObserver.isControlActive = false;
|
|
124366
|
-
|
|
124441
|
+
_this20.$emit('controlEnd', res);
|
|
124367
124442
|
|
|
124368
124443
|
// 统一交互结束处理(相机)
|
|
124369
|
-
|
|
124444
|
+
_this20.endInteraction('this.camera', res, {
|
|
124370
124445
|
immediateResume: false
|
|
124371
124446
|
});
|
|
124372
124447
|
|
|
@@ -124395,7 +124470,7 @@ var isDebug = false || false === true;
|
|
|
124395
124470
|
// }
|
|
124396
124471
|
|
|
124397
124472
|
// 触发观察者
|
|
124398
|
-
|
|
124473
|
+
_this20._cameraChangeObserver('control');
|
|
124399
124474
|
}
|
|
124400
124475
|
};
|
|
124401
124476
|
this.cameraControls.addEventListener('controlstart', this._onControlStart);
|
|
@@ -124405,7 +124480,7 @@ var isDebug = false || false === true;
|
|
|
124405
124480
|
// 监听 rest 事件,捕获 this.cameraControls.setLookAt(..., true) 等动画结束(以及阻尼停止)
|
|
124406
124481
|
// 注意:rest 事件在用户交互完全静止时也会触发,与 controlEnd 有部分重叠,但 Observer 有防抖,影响不大
|
|
124407
124482
|
this._onRest = function () {
|
|
124408
|
-
|
|
124483
|
+
_this20._cameraChangeObserver('rest');
|
|
124409
124484
|
};
|
|
124410
124485
|
this.cameraControls.addEventListener('rest', this._onRest);
|
|
124411
124486
|
},
|
|
@@ -124432,7 +124507,7 @@ var isDebug = false || false === true;
|
|
|
124432
124507
|
meshNameConfig: {}
|
|
124433
124508
|
*/
|
|
124434
124509
|
drawModel: function drawModel(data) {
|
|
124435
|
-
var
|
|
124510
|
+
var _this21 = this;
|
|
124436
124511
|
var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
124437
124512
|
var meshNameConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
124438
124513
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
@@ -124441,14 +124516,14 @@ var isDebug = false || false === true;
|
|
|
124441
124516
|
// 使用新的分帧加载方法,提供进度回调
|
|
124442
124517
|
return this.drawModelWithBatchLoading(data, color, meshNameConfig, options, function (progress) {
|
|
124443
124518
|
// 触发原有的进度事件
|
|
124444
|
-
|
|
124519
|
+
_this21.$emit('loadProgress', _this21.progress);
|
|
124445
124520
|
}, function (complete) {
|
|
124446
124521
|
var _options$onComplete2;
|
|
124447
124522
|
options === null || options === void 0 || (_options$onComplete2 = options.onComplete) === null || _options$onComplete2 === void 0 || _options$onComplete2.call(options, complete);
|
|
124448
124523
|
console.log('加载完成');
|
|
124449
124524
|
// 触发原有的完成事件
|
|
124450
124525
|
if (!(options !== null && options !== void 0 && options.suppressLoadComplete)) {
|
|
124451
|
-
|
|
124526
|
+
_this21.$emit('loadComplete');
|
|
124452
124527
|
}
|
|
124453
124528
|
});
|
|
124454
124529
|
},
|
|
@@ -124475,13 +124550,13 @@ var isDebug = false || false === true;
|
|
|
124475
124550
|
};
|
|
124476
124551
|
},
|
|
124477
124552
|
mouseDown: function mouseDown(event) {
|
|
124478
|
-
var
|
|
124553
|
+
var _this22 = this;
|
|
124479
124554
|
// 在鼠标按下时启用渲染中断以提升响应性
|
|
124480
124555
|
this.forceSkipRendering = true;
|
|
124481
124556
|
this.skipNextRenderFrame = true;
|
|
124482
124557
|
var intersects = this.getRaycasterObjects(event);
|
|
124483
124558
|
var shouldBlockCamera = intersects.some(function (item) {
|
|
124484
|
-
return
|
|
124559
|
+
return _this22.isActiveTransformControlIntersection(item);
|
|
124485
124560
|
});
|
|
124486
124561
|
if (shouldBlockCamera) {
|
|
124487
124562
|
this.setPointerCameraGuard(true);
|
|
@@ -124535,19 +124610,19 @@ var isDebug = false || false === true;
|
|
|
124535
124610
|
return this.isTransformControlIntersection(intersection);
|
|
124536
124611
|
},
|
|
124537
124612
|
getPrimaryIntersection: function getPrimaryIntersection() {
|
|
124538
|
-
var
|
|
124613
|
+
var _this23 = this;
|
|
124539
124614
|
var intersects = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
124540
124615
|
if (!Array.isArray(intersects) || intersects.length === 0) {
|
|
124541
124616
|
return null;
|
|
124542
124617
|
}
|
|
124543
124618
|
var validIntersects = intersects.filter(function (item) {
|
|
124544
|
-
return item && item.object && !
|
|
124619
|
+
return item && item.object && !_this23.isTransformControlIntersection(item);
|
|
124545
124620
|
});
|
|
124546
124621
|
if (validIntersects.length === 0) {
|
|
124547
124622
|
return null;
|
|
124548
124623
|
}
|
|
124549
124624
|
var selectableIntersect = validIntersects.find(function (item) {
|
|
124550
|
-
return
|
|
124625
|
+
return _this23.getSelectableSceneObject(item.object);
|
|
124551
124626
|
});
|
|
124552
124627
|
return selectableIntersect || validIntersects[0] || null;
|
|
124553
124628
|
},
|
|
@@ -124619,13 +124694,13 @@ var isDebug = false || false === true;
|
|
|
124619
124694
|
}
|
|
124620
124695
|
},
|
|
124621
124696
|
mouseClick: function mouseClick(event) {
|
|
124622
|
-
var
|
|
124697
|
+
var _this24 = this;
|
|
124623
124698
|
// 鼠标抬起时重置渲染中断标记
|
|
124624
124699
|
setTimeout(function () {
|
|
124625
|
-
|
|
124700
|
+
_this24.forceSkipRendering = false;
|
|
124626
124701
|
// interactionFrameCount = 0;
|
|
124627
124702
|
// 恢复批次加载操作
|
|
124628
|
-
|
|
124703
|
+
_this24.resumeBatchLoading();
|
|
124629
124704
|
}, 50); // 短暂延迟确保交互完成
|
|
124630
124705
|
|
|
124631
124706
|
// 在测量模式下,不进行事件暴露
|
|
@@ -124684,21 +124759,21 @@ var isDebug = false || false === true;
|
|
|
124684
124759
|
this.setPointerCameraGuard(false);
|
|
124685
124760
|
this.$emit('rightClick', params);
|
|
124686
124761
|
onContextHandle(event, 'fl-model', '隐藏', this.isolateMode ? '取消隔离' : '隔离', function () {
|
|
124687
|
-
|
|
124762
|
+
_this24.updateProperty([{
|
|
124688
124763
|
name: params.instanceId,
|
|
124689
124764
|
attr: {
|
|
124690
124765
|
visible: false
|
|
124691
124766
|
}
|
|
124692
124767
|
}]);
|
|
124693
124768
|
}, function () {
|
|
124694
|
-
|
|
124695
|
-
|
|
124769
|
+
_this24.setAllModelVisible(_this24.isolateMode);
|
|
124770
|
+
_this24.updateProperty([{
|
|
124696
124771
|
name: params.instanceId,
|
|
124697
124772
|
attr: {
|
|
124698
124773
|
visible: true
|
|
124699
124774
|
}
|
|
124700
124775
|
}]);
|
|
124701
|
-
|
|
124776
|
+
_this24.isolateMode = !_this24.isolateMode;
|
|
124702
124777
|
});
|
|
124703
124778
|
}
|
|
124704
124779
|
} else if (event.button === 2) {
|
|
@@ -124706,21 +124781,21 @@ var isDebug = false || false === true;
|
|
|
124706
124781
|
this.setPointerCameraGuard(false);
|
|
124707
124782
|
this.$emit('rightClick', params);
|
|
124708
124783
|
onContextHandle(event, 'fl-model', '隐藏', this.isolateMode ? '取消隔离' : '隔离', function () {
|
|
124709
|
-
|
|
124784
|
+
_this24.updateProperty([{
|
|
124710
124785
|
name: params.instanceId,
|
|
124711
124786
|
attr: {
|
|
124712
124787
|
visible: false
|
|
124713
124788
|
}
|
|
124714
124789
|
}]);
|
|
124715
124790
|
}, function () {
|
|
124716
|
-
|
|
124717
|
-
|
|
124791
|
+
_this24.setAllModelVisible(_this24.isolateMode);
|
|
124792
|
+
_this24.updateProperty([{
|
|
124718
124793
|
name: params.instanceId,
|
|
124719
124794
|
attr: {
|
|
124720
124795
|
visible: true
|
|
124721
124796
|
}
|
|
124722
124797
|
}]);
|
|
124723
|
-
|
|
124798
|
+
_this24.isolateMode = !_this24.isolateMode;
|
|
124724
124799
|
});
|
|
124725
124800
|
}
|
|
124726
124801
|
}
|
|
@@ -124800,7 +124875,7 @@ var isDebug = false || false === true;
|
|
|
124800
124875
|
},
|
|
124801
124876
|
// 带防抖和用户交互检测的智能居中方法
|
|
124802
124877
|
smartModelCenter: function smartModelCenter(mesh) {
|
|
124803
|
-
var
|
|
124878
|
+
var _this25 = this;
|
|
124804
124879
|
var debounceDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
|
|
124805
124880
|
// if (this.hasExecutedCentering) {
|
|
124806
124881
|
// return;
|
|
@@ -124820,13 +124895,13 @@ var isDebug = false || false === true;
|
|
|
124820
124895
|
// 设置新的防抖定时器
|
|
124821
124896
|
this.centeringDebounceTimer = setTimeout(function () {
|
|
124822
124897
|
// 如果已经执行过居中操作,则不再执行
|
|
124823
|
-
if (!
|
|
124824
|
-
|
|
124898
|
+
if (!_this25.userInteracting && !_this25.hasExecutedCentering && _this25.noObserver.documentModelIds.size > 0) {
|
|
124899
|
+
_this25.setModelCenter(mesh, {
|
|
124825
124900
|
enableTransition: false
|
|
124826
124901
|
});
|
|
124827
|
-
|
|
124902
|
+
_this25.hasExecutedCentering = true;
|
|
124828
124903
|
// 触发场景更新
|
|
124829
|
-
|
|
124904
|
+
_this25.notifyCameraChange();
|
|
124830
124905
|
}
|
|
124831
124906
|
}, debounceDelay);
|
|
124832
124907
|
},
|
|
@@ -124850,14 +124925,14 @@ var isDebug = false || false === true;
|
|
|
124850
124925
|
* }
|
|
124851
124926
|
*/
|
|
124852
124927
|
updateProperty: function updateProperty(list) {
|
|
124853
|
-
var
|
|
124928
|
+
var _this26 = this;
|
|
124854
124929
|
var hasOutline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
124855
124930
|
var isUpdate = false;
|
|
124856
124931
|
var _loop = function _loop() {
|
|
124857
124932
|
var ele = list[index];
|
|
124858
124933
|
var type = ele.type || 'mesh';
|
|
124859
124934
|
var instanceId = ele.name;
|
|
124860
|
-
var targetObj =
|
|
124935
|
+
var targetObj = _this26.getObjectByName(instanceId);
|
|
124861
124936
|
var _loop2 = function _loop2(key) {
|
|
124862
124937
|
switch (key) {
|
|
124863
124938
|
case 'color':
|
|
@@ -124867,19 +124942,19 @@ var isDebug = false || false === true;
|
|
|
124867
124942
|
var instanceInfo = (_children$userData = children.userData) === null || _children$userData === void 0 || (_children$userData = _children$userData.instancesMap) === null || _children$userData === void 0 ? void 0 : _children$userData.get(instanceId);
|
|
124868
124943
|
if (!instanceInfo) return;
|
|
124869
124944
|
var instanceIndex = instanceInfo.instanceIndex;
|
|
124870
|
-
children.setColorAt(instanceIndex, new
|
|
124945
|
+
children.setColorAt(instanceIndex, new _this26.THREE.Color(ele.attr[key]));
|
|
124871
124946
|
children.instanceColor.needsUpdate = true;
|
|
124872
|
-
if (!
|
|
124873
|
-
|
|
124947
|
+
if (!_this26.isCurrentVisible(instanceId, children)) {
|
|
124948
|
+
_this26.removeOutlineObject(children, instanceIndex);
|
|
124874
124949
|
return;
|
|
124875
124950
|
}
|
|
124876
124951
|
if (hasOutline) {
|
|
124877
|
-
if (
|
|
124952
|
+
if (_this26.outlinePass) {
|
|
124878
124953
|
if (children.isInstancedMesh) {
|
|
124879
|
-
var proxy =
|
|
124880
|
-
|
|
124881
|
-
} else if (!
|
|
124882
|
-
|
|
124954
|
+
var proxy = _this26.ensureOutlineInstanceProxy(children, instanceIndex);
|
|
124955
|
+
_this26.pushOutlineTarget(proxy);
|
|
124956
|
+
} else if (!_this26.isSourceHiddenInstance(children, instanceId)) {
|
|
124957
|
+
_this26.pushOutlineTarget(children);
|
|
124883
124958
|
}
|
|
124884
124959
|
}
|
|
124885
124960
|
}
|
|
@@ -124892,10 +124967,10 @@ var isDebug = false || false === true;
|
|
|
124892
124967
|
isUpdate = true;
|
|
124893
124968
|
}
|
|
124894
124969
|
var requestedVisible = Boolean(ele.attr[key]);
|
|
124895
|
-
var nextBoxVisible = requestedVisible &&
|
|
124896
|
-
var boxKey =
|
|
124897
|
-
if (
|
|
124898
|
-
var boxData =
|
|
124970
|
+
var nextBoxVisible = requestedVisible && _this26.isSourceVisible(instanceId);
|
|
124971
|
+
var boxKey = _this26._boxIndex && _this26._boxIndex.has(String(instanceId)) ? String(instanceId) : instanceId;
|
|
124972
|
+
if (_this26._boxIndex && _this26._boxIndex.has(boxKey)) {
|
|
124973
|
+
var boxData = _this26._boxIndex.get(boxKey);
|
|
124899
124974
|
if (boxData && boxData.userData) {
|
|
124900
124975
|
boxData.userData.visible = nextBoxVisible;
|
|
124901
124976
|
}
|
|
@@ -124905,21 +124980,21 @@ var isDebug = false || false === true;
|
|
|
124905
124980
|
if (!instanceInfo) return;
|
|
124906
124981
|
var instanceIndex = instanceInfo.instanceIndex,
|
|
124907
124982
|
copyMatrix = instanceInfo.copyMatrix;
|
|
124908
|
-
var nextVisible = requestedVisible &&
|
|
124983
|
+
var nextVisible = requestedVisible && _this26.isSourceVisible(instanceId, children);
|
|
124909
124984
|
instanceInfo.visible = nextVisible;
|
|
124910
124985
|
if (nextVisible) {
|
|
124911
|
-
var restoreMatrix = new
|
|
124986
|
+
var restoreMatrix = new _this26.THREE.Matrix4().copy(copyMatrix || children.userData.copyMatrix);
|
|
124912
124987
|
children.setMatrixAt(instanceIndex, restoreMatrix);
|
|
124913
124988
|
} else {
|
|
124914
|
-
var _copyMatrix =
|
|
124989
|
+
var _copyMatrix = _this26.getInstanceCopyMatrix(children, instanceId);
|
|
124915
124990
|
if (!_copyMatrix) return;
|
|
124916
|
-
var offsetMatrix = new
|
|
124991
|
+
var offsetMatrix = new _this26.THREE.Matrix4().copy(_copyMatrix || children.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
|
|
124917
124992
|
children.setMatrixAt(instanceIndex, offsetMatrix);
|
|
124918
|
-
|
|
124993
|
+
_this26.removeOutlineObject(children, instanceIndex);
|
|
124919
124994
|
}
|
|
124920
124995
|
children.instanceMatrix.needsUpdate = true;
|
|
124921
124996
|
});
|
|
124922
|
-
|
|
124997
|
+
_this26.notifyCameraChange(); // 触发场景更新
|
|
124923
124998
|
break;
|
|
124924
124999
|
}
|
|
124925
125000
|
case 'opacity':
|
|
@@ -124956,13 +125031,13 @@ var isDebug = false || false === true;
|
|
|
124956
125031
|
}
|
|
124957
125032
|
},
|
|
124958
125033
|
setAllModelVisible: function setAllModelVisible(visible) {
|
|
124959
|
-
var
|
|
125034
|
+
var _this27 = this;
|
|
124960
125035
|
var isVisible = Boolean(visible);
|
|
124961
125036
|
var matrixCache = new this.THREE.Matrix4();
|
|
124962
125037
|
if (this._boxIndex && this._boxIndex.size > 0) {
|
|
124963
125038
|
this._boxIndex.forEach(function (box, modelId) {
|
|
124964
125039
|
if (!box || !box.userData) return;
|
|
124965
|
-
box.userData.visible = isVisible &&
|
|
125040
|
+
box.userData.visible = isVisible && _this27.isSourceVisible(modelId);
|
|
124966
125041
|
});
|
|
124967
125042
|
}
|
|
124968
125043
|
if (this.scene) {
|
|
@@ -124975,7 +125050,7 @@ var isDebug = false || false === true;
|
|
|
124975
125050
|
var instanceIndex = instanceInfo && typeof instanceInfo.instanceIndex === 'number' ? instanceInfo.instanceIndex : null;
|
|
124976
125051
|
if (instanceIndex === null) return;
|
|
124977
125052
|
var copyMatrix = instanceInfo.copyMatrix || userData.copyMatrix;
|
|
124978
|
-
if (isVisible &&
|
|
125053
|
+
if (isVisible && _this27.isSourceVisible(instanceId, child)) {
|
|
124979
125054
|
instanceInfo.visible = true;
|
|
124980
125055
|
matrixCache.copy(copyMatrix);
|
|
124981
125056
|
child.setMatrixAt(instanceIndex, matrixCache);
|
|
@@ -124983,7 +125058,7 @@ var isDebug = false || false === true;
|
|
|
124983
125058
|
instanceInfo.visible = false;
|
|
124984
125059
|
matrixCache.copy(copyMatrix).makeTranslation(9999999, 9999999, 9999999);
|
|
124985
125060
|
child.setMatrixAt(instanceIndex, matrixCache);
|
|
124986
|
-
|
|
125061
|
+
_this27.removeOutlineObject(child, instanceIndex);
|
|
124987
125062
|
}
|
|
124988
125063
|
});
|
|
124989
125064
|
child.instanceMatrix.needsUpdate = true;
|
|
@@ -125007,7 +125082,7 @@ var isDebug = false || false === true;
|
|
|
125007
125082
|
}
|
|
125008
125083
|
},
|
|
125009
125084
|
showOutlinePass: function showOutlinePass(instanceId) {
|
|
125010
|
-
var
|
|
125085
|
+
var _this28 = this;
|
|
125011
125086
|
var targetObj = this.getObjectByName(instanceId);
|
|
125012
125087
|
targetObj.forEach(function (children) {
|
|
125013
125088
|
if (children.isMesh) {
|
|
@@ -125015,27 +125090,27 @@ var isDebug = false || false === true;
|
|
|
125015
125090
|
var instanceInfo = (_children$userData3 = children.userData) === null || _children$userData3 === void 0 || (_children$userData3 = _children$userData3.instancesMap) === null || _children$userData3 === void 0 ? void 0 : _children$userData3.get(instanceId);
|
|
125016
125091
|
if (!instanceInfo) return;
|
|
125017
125092
|
var instanceIndex = instanceInfo.instanceIndex;
|
|
125018
|
-
if (!
|
|
125019
|
-
|
|
125093
|
+
if (!_this28.isSourceVisible(instanceId, children)) {
|
|
125094
|
+
_this28.removeOutlineObject(children, instanceIndex);
|
|
125020
125095
|
return;
|
|
125021
125096
|
}
|
|
125022
|
-
if (!
|
|
125023
|
-
|
|
125097
|
+
if (!_this28.isCurrentVisible(instanceId, children)) {
|
|
125098
|
+
_this28.removeOutlineObject(children, instanceIndex);
|
|
125024
125099
|
return;
|
|
125025
125100
|
}
|
|
125026
|
-
if (
|
|
125101
|
+
if (_this28.outlinePass) {
|
|
125027
125102
|
if (children.isInstancedMesh) {
|
|
125028
|
-
var proxy =
|
|
125029
|
-
|
|
125103
|
+
var proxy = _this28.ensureOutlineInstanceProxy(children, instanceIndex);
|
|
125104
|
+
_this28.pushOutlineTarget(proxy);
|
|
125030
125105
|
} else {
|
|
125031
|
-
|
|
125106
|
+
_this28.pushOutlineTarget(children);
|
|
125032
125107
|
}
|
|
125033
125108
|
}
|
|
125034
125109
|
}
|
|
125035
125110
|
});
|
|
125036
125111
|
},
|
|
125037
125112
|
hideOutlinePass: function hideOutlinePass(instanceId) {
|
|
125038
|
-
var
|
|
125113
|
+
var _this29 = this;
|
|
125039
125114
|
var targetObj = this.getObjectByName(instanceId);
|
|
125040
125115
|
targetObj.forEach(function (children) {
|
|
125041
125116
|
if (children.isMesh) {
|
|
@@ -125043,7 +125118,7 @@ var isDebug = false || false === true;
|
|
|
125043
125118
|
var instanceInfo = (_children$userData4 = children.userData) === null || _children$userData4 === void 0 || (_children$userData4 = _children$userData4.instancesMap) === null || _children$userData4 === void 0 ? void 0 : _children$userData4.get(instanceId);
|
|
125044
125119
|
if (!instanceInfo) return;
|
|
125045
125120
|
var instanceIndex = instanceInfo.instanceIndex;
|
|
125046
|
-
|
|
125121
|
+
_this29.removeOutlineObject(children, instanceIndex);
|
|
125047
125122
|
}
|
|
125048
125123
|
});
|
|
125049
125124
|
},
|
|
@@ -125066,17 +125141,17 @@ var isDebug = false || false === true;
|
|
|
125066
125141
|
},
|
|
125067
125142
|
// 修改材质的自定义数据
|
|
125068
125143
|
updateMaterialUserData: function updateMaterialUserData(list) {
|
|
125069
|
-
var
|
|
125144
|
+
var _this30 = this;
|
|
125070
125145
|
var _loop3 = function _loop3() {
|
|
125071
125146
|
var ele = list[index];
|
|
125072
125147
|
var instanceId = ele.name;
|
|
125073
|
-
var targetObj =
|
|
125148
|
+
var targetObj = _this30.getObjectByName(instanceId);
|
|
125074
125149
|
var _loop4 = function _loop4(key) {
|
|
125075
125150
|
switch (key) {
|
|
125076
125151
|
case 'nColor':
|
|
125077
125152
|
targetObj.forEach(function (children) {
|
|
125078
125153
|
if (children.isMesh) {
|
|
125079
|
-
children.material.userData[key] = new
|
|
125154
|
+
children.material.userData[key] = new _this30.THREE.Color(ele.attr[key]);
|
|
125080
125155
|
}
|
|
125081
125156
|
});
|
|
125082
125157
|
break;
|
|
@@ -125092,12 +125167,12 @@ var isDebug = false || false === true;
|
|
|
125092
125167
|
},
|
|
125093
125168
|
// 重置
|
|
125094
125169
|
resetMaterialUserData: function resetMaterialUserData(list) {
|
|
125095
|
-
var
|
|
125170
|
+
var _this31 = this;
|
|
125096
125171
|
console.log('resetMaterialUserData');
|
|
125097
125172
|
var _loop5 = function _loop5() {
|
|
125098
125173
|
var ele = list[index];
|
|
125099
125174
|
var instanceId = ele.name;
|
|
125100
|
-
var targetObj =
|
|
125175
|
+
var targetObj = _this31.getObjectByName(instanceId);
|
|
125101
125176
|
var _loop6 = function _loop6(key) {
|
|
125102
125177
|
switch (key) {
|
|
125103
125178
|
case 'nColor':
|
|
@@ -125125,11 +125200,11 @@ var isDebug = false || false === true;
|
|
|
125125
125200
|
},
|
|
125126
125201
|
// 清除上一次的属性修改操作 为了方便业务平台参数跟updateProperty方法的参数一样
|
|
125127
125202
|
resetProperty: function resetProperty(list) {
|
|
125128
|
-
var
|
|
125203
|
+
var _this32 = this;
|
|
125129
125204
|
var _loop7 = function _loop7() {
|
|
125130
125205
|
var ele = list[index];
|
|
125131
125206
|
var instanceId = ele.name;
|
|
125132
|
-
var obj =
|
|
125207
|
+
var obj = _this32.getObjectByName(instanceId);
|
|
125133
125208
|
if (obj) {
|
|
125134
125209
|
for (var key in ele.attr) {
|
|
125135
125210
|
switch (key) {
|
|
@@ -125142,12 +125217,12 @@ var isDebug = false || false === true;
|
|
|
125142
125217
|
var instanceIndex = instanceInfo.instanceIndex;
|
|
125143
125218
|
children.setColorAt(instanceIndex, children.material.userData.nColor);
|
|
125144
125219
|
children.instanceColor.needsUpdate = true;
|
|
125145
|
-
if (
|
|
125220
|
+
if (_this32.outlinePass) {
|
|
125146
125221
|
if (children.isInstancedMesh) {
|
|
125147
|
-
|
|
125222
|
+
_this32.removeOutlineInstanceProxy(children, instanceIndex);
|
|
125148
125223
|
} else {
|
|
125149
|
-
var idx =
|
|
125150
|
-
if (idx !== -1)
|
|
125224
|
+
var idx = _this32.outlinePass.selectedObjects.indexOf(children);
|
|
125225
|
+
if (idx !== -1) _this32.outlinePass.selectedObjects.splice(idx, 1);
|
|
125151
125226
|
}
|
|
125152
125227
|
}
|
|
125153
125228
|
}
|
|
@@ -125160,15 +125235,15 @@ var isDebug = false || false === true;
|
|
|
125160
125235
|
if (!instanceInfo) return;
|
|
125161
125236
|
var instanceIndex = instanceInfo.instanceIndex,
|
|
125162
125237
|
copyMatrix = instanceInfo.copyMatrix;
|
|
125163
|
-
if (
|
|
125238
|
+
if (_this32.isSourceVisible(instanceId, children)) {
|
|
125164
125239
|
instanceInfo.visible = true;
|
|
125165
|
-
var restoreMatrix = new
|
|
125240
|
+
var restoreMatrix = new _this32.THREE.Matrix4().copy(copyMatrix);
|
|
125166
125241
|
children.setMatrixAt(instanceIndex, restoreMatrix);
|
|
125167
125242
|
} else {
|
|
125168
125243
|
instanceInfo.visible = false;
|
|
125169
|
-
var offsetMatrix = new
|
|
125244
|
+
var offsetMatrix = new _this32.THREE.Matrix4().copy(copyMatrix).makeTranslation(9999999, 9999999, 9999999);
|
|
125170
125245
|
children.setMatrixAt(instanceIndex, offsetMatrix);
|
|
125171
|
-
|
|
125246
|
+
_this32.removeOutlineObject(children, instanceIndex);
|
|
125172
125247
|
}
|
|
125173
125248
|
children.instanceMatrix.needsUpdate = true;
|
|
125174
125249
|
});
|
|
@@ -125220,19 +125295,19 @@ var isDebug = false || false === true;
|
|
|
125220
125295
|
// 定位到模型
|
|
125221
125296
|
// name 模型名称或运行态 uuid,可以是数组
|
|
125222
125297
|
locateModel: function locateModel(name) {
|
|
125223
|
-
var
|
|
125298
|
+
var _this33 = this;
|
|
125224
125299
|
if (!this.scene) return false;
|
|
125225
125300
|
if (Array.isArray(name)) {
|
|
125226
125301
|
var box3 = new this.THREE.Box3();
|
|
125227
125302
|
name.forEach(function (n) {
|
|
125228
|
-
var objectByUuid =
|
|
125303
|
+
var objectByUuid = _this33.getObjectByUuid(n);
|
|
125229
125304
|
if (objectByUuid) {
|
|
125230
|
-
|
|
125305
|
+
_this33.expandLocateBoxByObject(box3, objectByUuid);
|
|
125231
125306
|
return;
|
|
125232
125307
|
}
|
|
125233
|
-
var arr =
|
|
125308
|
+
var arr = _this33.getObjectByName(n);
|
|
125234
125309
|
arr.forEach(function (o) {
|
|
125235
|
-
|
|
125310
|
+
_this33.expandLocateBoxByObject(box3, o);
|
|
125236
125311
|
});
|
|
125237
125312
|
});
|
|
125238
125313
|
if (!box3.isEmpty()) {
|
|
@@ -125277,14 +125352,14 @@ var isDebug = false || false === true;
|
|
|
125277
125352
|
}
|
|
125278
125353
|
*/
|
|
125279
125354
|
updatePropertyByCustom: function updatePropertyByCustom(params) {
|
|
125280
|
-
var
|
|
125355
|
+
var _this34 = this;
|
|
125281
125356
|
if (!this.scene) return;
|
|
125282
125357
|
this.scene.traverse(function (child) {
|
|
125283
125358
|
if (child.isMesh && child.userData[params.customName] === params.customValue) {
|
|
125284
125359
|
for (var key in params.attr) {
|
|
125285
125360
|
switch (key) {
|
|
125286
125361
|
case 'color':
|
|
125287
|
-
child.setColorAt(obj.userData.instanceIndex, new
|
|
125362
|
+
child.setColorAt(obj.userData.instanceIndex, new _this34.THREE.Color(params.attr[key]));
|
|
125288
125363
|
child.instanceColor.needsUpdate = true;
|
|
125289
125364
|
break;
|
|
125290
125365
|
case 'visible':
|
|
@@ -125358,14 +125433,14 @@ var isDebug = false || false === true;
|
|
|
125358
125433
|
passType: 要过滤的类型,默认是group,不返回group类型的实体
|
|
125359
125434
|
*/
|
|
125360
125435
|
getObjectByName: function getObjectByName(name) {
|
|
125361
|
-
var
|
|
125436
|
+
var _this35 = this;
|
|
125362
125437
|
var passType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'group';
|
|
125363
125438
|
if (!this.scene) return [];
|
|
125364
125439
|
if (Array.isArray(name)) {
|
|
125365
125440
|
var result = [];
|
|
125366
125441
|
var exist = new Set();
|
|
125367
125442
|
name.forEach(function (item) {
|
|
125368
|
-
|
|
125443
|
+
_this35.getObjectByName(item, passType).forEach(function (obj) {
|
|
125369
125444
|
if (!obj || exist.has(obj.uuid)) return;
|
|
125370
125445
|
exist.add(obj.uuid);
|
|
125371
125446
|
result.push(obj);
|
|
@@ -125403,12 +125478,12 @@ var isDebug = false || false === true;
|
|
|
125403
125478
|
return modelState.colorConfig;
|
|
125404
125479
|
},
|
|
125405
125480
|
addBypassCullingModelIds: function addBypassCullingModelIds(modelIds) {
|
|
125406
|
-
var
|
|
125481
|
+
var _this36 = this;
|
|
125407
125482
|
var modelState = this.noObserver ? this.noObserver.modelStateManager : this.modelStateManager;
|
|
125408
125483
|
if (!modelIds) return;
|
|
125409
125484
|
if (Array.isArray(modelIds)) {
|
|
125410
125485
|
modelIds.forEach(function (id) {
|
|
125411
|
-
var modelId =
|
|
125486
|
+
var modelId = _this36.formatModelId(id);
|
|
125412
125487
|
modelState.bypassCullingModelIds.add(modelId);
|
|
125413
125488
|
});
|
|
125414
125489
|
} else {
|
|
@@ -125421,12 +125496,12 @@ var isDebug = false || false === true;
|
|
|
125421
125496
|
return com_graphicsvue_type_script_lang_js_toConsumableArray(modelState.bypassCullingModelIds);
|
|
125422
125497
|
},
|
|
125423
125498
|
removeBypassCullingModelIds: function removeBypassCullingModelIds(modelIds) {
|
|
125424
|
-
var
|
|
125499
|
+
var _this37 = this;
|
|
125425
125500
|
var modelState = this.noObserver ? this.noObserver.modelStateManager : this.modelStateManager;
|
|
125426
125501
|
if (!modelIds) return;
|
|
125427
125502
|
if (Array.isArray(modelIds)) {
|
|
125428
125503
|
modelIds.forEach(function (id) {
|
|
125429
|
-
var modelId =
|
|
125504
|
+
var modelId = _this37.formatModelId(id);
|
|
125430
125505
|
modelState.bypassCullingModelIds.delete(modelId);
|
|
125431
125506
|
});
|
|
125432
125507
|
} else {
|
|
@@ -125440,7 +125515,7 @@ var isDebug = false || false === true;
|
|
|
125440
125515
|
},
|
|
125441
125516
|
// 通过id删除对象
|
|
125442
125517
|
removeObjectById: function removeObjectById(id) {
|
|
125443
|
-
var
|
|
125518
|
+
var _this38 = this;
|
|
125444
125519
|
if (!this.scene) return;
|
|
125445
125520
|
var array = this.getObjectByName(id);
|
|
125446
125521
|
array.forEach(function (item) {
|
|
@@ -125450,13 +125525,13 @@ var isDebug = false || false === true;
|
|
|
125450
125525
|
if (item.isMesh) {
|
|
125451
125526
|
item.clear();
|
|
125452
125527
|
}
|
|
125453
|
-
|
|
125528
|
+
_this38.scene.remove(item);
|
|
125454
125529
|
}
|
|
125455
125530
|
});
|
|
125456
125531
|
},
|
|
125457
125532
|
// 通过名称删除对象
|
|
125458
125533
|
removeObjectByName: function removeObjectByName(name) {
|
|
125459
|
-
var
|
|
125534
|
+
var _this39 = this;
|
|
125460
125535
|
if (!this.scene) return;
|
|
125461
125536
|
var array = this.getObjectByName(name);
|
|
125462
125537
|
array.forEach(function (item) {
|
|
@@ -125465,17 +125540,17 @@ var isDebug = false || false === true;
|
|
|
125465
125540
|
if (item.isMesh) {
|
|
125466
125541
|
item.clear();
|
|
125467
125542
|
}
|
|
125468
|
-
if (
|
|
125543
|
+
if (_this39.scene) _this39.scene.remove(item);
|
|
125469
125544
|
});
|
|
125470
125545
|
},
|
|
125471
125546
|
// 删除场景中所有的实体
|
|
125472
125547
|
removeAll: function removeAll() {
|
|
125473
|
-
var
|
|
125548
|
+
var _this40 = this;
|
|
125474
125549
|
return new Promise(function (resolve) {
|
|
125475
|
-
if (
|
|
125476
|
-
|
|
125477
|
-
|
|
125478
|
-
|
|
125550
|
+
if (_this40.scene) {
|
|
125551
|
+
_this40.removeAllCustomElements();
|
|
125552
|
+
_this40.removeTraverse();
|
|
125553
|
+
_this40.removeModelByDocumentId();
|
|
125479
125554
|
resolve();
|
|
125480
125555
|
} else {
|
|
125481
125556
|
resolve();
|
|
@@ -125483,7 +125558,7 @@ var isDebug = false || false === true;
|
|
|
125483
125558
|
});
|
|
125484
125559
|
},
|
|
125485
125560
|
removeTraverse: function removeTraverse() {
|
|
125486
|
-
var
|
|
125561
|
+
var _this41 = this;
|
|
125487
125562
|
if (!this.modelGroup) return;
|
|
125488
125563
|
var length = this.modelGroup.children.length;
|
|
125489
125564
|
if (length > 0) {
|
|
@@ -125496,7 +125571,7 @@ var isDebug = false || false === true;
|
|
|
125496
125571
|
item.clear();
|
|
125497
125572
|
item.material = null;
|
|
125498
125573
|
item.geometry = null;
|
|
125499
|
-
|
|
125574
|
+
_this41.modelGroup && _this41.modelGroup.remove(item);
|
|
125500
125575
|
item = null;
|
|
125501
125576
|
}
|
|
125502
125577
|
});
|
|
@@ -125513,7 +125588,7 @@ var isDebug = false || false === true;
|
|
|
125513
125588
|
},
|
|
125514
125589
|
// 销毁场景 释放内存
|
|
125515
125590
|
destroyScene: function destroyScene() {
|
|
125516
|
-
var
|
|
125591
|
+
var _this42 = this;
|
|
125517
125592
|
cancelAnimationFrame(this.animateId);
|
|
125518
125593
|
this.disposeTransformControls();
|
|
125519
125594
|
if (this.sceneCommandEventDisposers.length > 0) {
|
|
@@ -125528,11 +125603,11 @@ var isDebug = false || false === true;
|
|
|
125528
125603
|
}
|
|
125529
125604
|
if (this.noObserver && this.noObserver.outlineInstanceProxyMap) {
|
|
125530
125605
|
this.noObserver.outlineInstanceProxyMap.forEach(function (proxy) {
|
|
125531
|
-
if (
|
|
125532
|
-
var idx =
|
|
125533
|
-
if (idx !== -1)
|
|
125606
|
+
if (_this42.outlinePass) {
|
|
125607
|
+
var idx = _this42.outlinePass.selectedObjects.indexOf(proxy);
|
|
125608
|
+
if (idx !== -1) _this42.outlinePass.selectedObjects.splice(idx, 1);
|
|
125534
125609
|
}
|
|
125535
|
-
if (
|
|
125610
|
+
if (_this42.scene) _this42.scene.remove(proxy);
|
|
125536
125611
|
if (proxy && proxy.material && proxy.material.dispose) proxy.material.dispose();
|
|
125537
125612
|
});
|
|
125538
125613
|
this.noObserver.outlineInstanceProxyMap.clear();
|
|
@@ -125646,11 +125721,11 @@ var isDebug = false || false === true;
|
|
|
125646
125721
|
}
|
|
125647
125722
|
*/
|
|
125648
125723
|
drawCurve: function drawCurve(params) {
|
|
125649
|
-
var
|
|
125724
|
+
var _this43 = this;
|
|
125650
125725
|
this.removeObjectByName(params.name);
|
|
125651
125726
|
var route = [];
|
|
125652
125727
|
params.path.forEach(function (element) {
|
|
125653
|
-
route.push(new
|
|
125728
|
+
route.push(new _this43.THREE.Vector3(element.x, element.y, element.z));
|
|
125654
125729
|
});
|
|
125655
125730
|
if (route.length > 1) {
|
|
125656
125731
|
this.curve = new this.THREE.CatmullRomCurve3(route);
|
|
@@ -125674,11 +125749,11 @@ var isDebug = false || false === true;
|
|
|
125674
125749
|
}
|
|
125675
125750
|
*/
|
|
125676
125751
|
drawTextureCurve: function drawTextureCurve(params) {
|
|
125677
|
-
var
|
|
125752
|
+
var _this44 = this;
|
|
125678
125753
|
this.removeObjectByName(params.name);
|
|
125679
125754
|
var route = [];
|
|
125680
125755
|
params.path.forEach(function (element) {
|
|
125681
|
-
route.push(new
|
|
125756
|
+
route.push(new _this44.THREE.Vector3(element.x, element.y, element.z));
|
|
125682
125757
|
});
|
|
125683
125758
|
// 画曲线
|
|
125684
125759
|
if (route.length > 1) {
|
|
@@ -125783,14 +125858,14 @@ var isDebug = false || false === true;
|
|
|
125783
125858
|
* 参数val: 爆炸的值
|
|
125784
125859
|
*/
|
|
125785
125860
|
globalBomb: function globalBomb(val) {
|
|
125786
|
-
var
|
|
125861
|
+
var _this45 = this;
|
|
125787
125862
|
if (this.scene.children.length === 0) return;
|
|
125788
125863
|
for (var i = 0; i < this.scene.children.length; i++) {
|
|
125789
125864
|
console.log('this.scene', this.scene);
|
|
125790
125865
|
this.scene.children[i].traverse(function (item) {
|
|
125791
125866
|
if (!item.isMesh || !item.worldDir) return;
|
|
125792
125867
|
// 爆炸公式
|
|
125793
|
-
|
|
125868
|
+
_this45.computedBomb(item, val);
|
|
125794
125869
|
});
|
|
125795
125870
|
}
|
|
125796
125871
|
// this.timeRender();
|
|
@@ -125832,13 +125907,13 @@ var isDebug = false || false === true;
|
|
|
125832
125907
|
return object.type === 'CSS2DObject' || object.type === 'TransformControlsRoot';
|
|
125833
125908
|
},
|
|
125834
125909
|
getGlobalClippingRoots: function getGlobalClippingRoots() {
|
|
125835
|
-
var
|
|
125910
|
+
var _this46 = this;
|
|
125836
125911
|
if (this.modelGroup && this.modelGroup.children && this.modelGroup.children.length) {
|
|
125837
125912
|
return [this.modelGroup];
|
|
125838
125913
|
}
|
|
125839
125914
|
if (!this.scene || !this.scene.children || this.scene.children.length === 0) return [];
|
|
125840
125915
|
return this.scene.children.filter(function (child) {
|
|
125841
|
-
return !
|
|
125916
|
+
return !_this46.isGlobalClippingExcludedNode(child);
|
|
125842
125917
|
});
|
|
125843
125918
|
},
|
|
125844
125919
|
getGlobalClippingBox: function getGlobalClippingBox() {
|
|
@@ -126087,71 +126162,71 @@ var isDebug = false || false === true;
|
|
|
126087
126162
|
},
|
|
126088
126163
|
// 页面是否锁定
|
|
126089
126164
|
initPointerLock: function initPointerLock() {
|
|
126090
|
-
var
|
|
126165
|
+
var _this47 = this;
|
|
126091
126166
|
this.home();
|
|
126092
126167
|
setTimeout(function () {
|
|
126093
126168
|
// 开启第一视角时,将相机与水平面保持水平
|
|
126094
|
-
|
|
126095
|
-
|
|
126096
|
-
|
|
126097
|
-
|
|
126098
|
-
if (!
|
|
126099
|
-
|
|
126100
|
-
if (typeof
|
|
126101
|
-
|
|
126169
|
+
_this47.camera.rotation.x = 0;
|
|
126170
|
+
_this47.camera.rotation.z = 0;
|
|
126171
|
+
_this47.pointControls = new PointerLockControls(_this47.camera, _this47.renderer.domElement);
|
|
126172
|
+
_this47.pointControls.lock();
|
|
126173
|
+
if (!_this47._onFirstPersonChange) {
|
|
126174
|
+
_this47._onFirstPersonChange = function () {
|
|
126175
|
+
if (typeof _this47._cameraChangeObserver === 'function') {
|
|
126176
|
+
_this47._cameraChangeObserver('firstPerson');
|
|
126102
126177
|
}
|
|
126103
126178
|
};
|
|
126104
126179
|
}
|
|
126105
126180
|
try {
|
|
126106
|
-
|
|
126181
|
+
_this47.pointControls.addEventListener('change', _this47._onFirstPersonChange);
|
|
126107
126182
|
} catch (e) {}
|
|
126108
126183
|
// 锁定
|
|
126109
|
-
|
|
126110
|
-
|
|
126111
|
-
if (
|
|
126112
|
-
|
|
126184
|
+
_this47.pointControls.addEventListener('lock', function () {
|
|
126185
|
+
_this47.detachTransformControls();
|
|
126186
|
+
if (_this47.cameraControls) {
|
|
126187
|
+
_this47.cameraControls.enabled = false;
|
|
126113
126188
|
}
|
|
126114
|
-
window.addEventListener('keydown',
|
|
126115
|
-
window.addEventListener('keyup',
|
|
126116
|
-
|
|
126117
|
-
if (typeof
|
|
126118
|
-
|
|
126189
|
+
window.addEventListener('keydown', _this47.onKeyDown, false);
|
|
126190
|
+
window.addEventListener('keyup', _this47.onKeyUp, false);
|
|
126191
|
+
_this47.unbindScenePointerEvents();
|
|
126192
|
+
if (typeof _this47._cameraChangeObserver === 'function') {
|
|
126193
|
+
_this47._cameraChangeObserver('firstPersonLock');
|
|
126119
126194
|
}
|
|
126120
126195
|
});
|
|
126121
126196
|
// 解锁
|
|
126122
|
-
|
|
126123
|
-
|
|
126124
|
-
if (
|
|
126125
|
-
|
|
126197
|
+
_this47.pointControls.addEventListener('unlock', function () {
|
|
126198
|
+
_this47.firstPerSign = false;
|
|
126199
|
+
if (_this47.cameraControls) {
|
|
126200
|
+
_this47.cameraControls.enabled = true;
|
|
126126
126201
|
}
|
|
126127
126202
|
// 返回初始视角
|
|
126128
|
-
if (
|
|
126129
|
-
|
|
126203
|
+
if (_this47.cameraControls && _this47.camera && _this47.sceneBoundingBox) {
|
|
126204
|
+
_this47.home();
|
|
126130
126205
|
}
|
|
126131
126206
|
try {
|
|
126132
|
-
if (
|
|
126133
|
-
|
|
126207
|
+
if (_this47._onFirstPersonChange && _this47.pointControls) {
|
|
126208
|
+
_this47.pointControls.removeEventListener('change', _this47._onFirstPersonChange);
|
|
126134
126209
|
}
|
|
126135
126210
|
} catch (e) {}
|
|
126136
|
-
if (
|
|
126137
|
-
|
|
126211
|
+
if (_this47.noObserver) {
|
|
126212
|
+
_this47.noObserver._firstPersonLastPos = null;
|
|
126138
126213
|
}
|
|
126139
126214
|
setTimeout(function () {
|
|
126140
|
-
window.removeEventListener('keydown',
|
|
126141
|
-
window.removeEventListener('keyup',
|
|
126142
|
-
if (
|
|
126143
|
-
|
|
126215
|
+
window.removeEventListener('keydown', _this47.onKeyDown);
|
|
126216
|
+
window.removeEventListener('keyup', _this47.onKeyUp);
|
|
126217
|
+
if (_this47.renderer && _this47.renderer.domElement) {
|
|
126218
|
+
_this47.bindScenePointerEvents();
|
|
126144
126219
|
}
|
|
126145
|
-
if (
|
|
126146
|
-
|
|
126220
|
+
if (_this47.scene) {
|
|
126221
|
+
_this47.ensureTransformSelectionValid();
|
|
126147
126222
|
}
|
|
126148
126223
|
// this.timeRender()
|
|
126149
126224
|
}, 0);
|
|
126150
|
-
if (typeof
|
|
126151
|
-
|
|
126225
|
+
if (typeof _this47._cameraChangeObserver === 'function') {
|
|
126226
|
+
_this47._cameraChangeObserver('firstPersonUnlock');
|
|
126152
126227
|
}
|
|
126153
126228
|
});
|
|
126154
|
-
if (
|
|
126229
|
+
if (_this47.scene) _this47.scene.add(_this47.pointControls.object);
|
|
126155
126230
|
}, 10);
|
|
126156
126231
|
},
|
|
126157
126232
|
// 第一视角运动
|
|
@@ -126306,7 +126381,7 @@ var isDebug = false || false === true;
|
|
|
126306
126381
|
return this.scene && this.scene.children ? this.scene.children : [];
|
|
126307
126382
|
},
|
|
126308
126383
|
openMeasure: function openMeasure(type) {
|
|
126309
|
-
var
|
|
126384
|
+
var _this48 = this;
|
|
126310
126385
|
var isClear = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
126311
126386
|
if (this.threeMeasure) {
|
|
126312
126387
|
this.threeMeasure.close(isClear);
|
|
@@ -126318,7 +126393,7 @@ var isDebug = false || false === true;
|
|
|
126318
126393
|
case 'distance':
|
|
126319
126394
|
this.threeMeasure = new measure_distance.MeasureDistance(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
|
|
126320
126395
|
pickRoots: function pickRoots() {
|
|
126321
|
-
return
|
|
126396
|
+
return _this48.getMeasurePickRoots();
|
|
126322
126397
|
}
|
|
126323
126398
|
});
|
|
126324
126399
|
this.threeMeasure.start();
|
|
@@ -126326,7 +126401,7 @@ var isDebug = false || false === true;
|
|
|
126326
126401
|
case 'area':
|
|
126327
126402
|
this.threeMeasure = new measure_area.MeasureArea(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
|
|
126328
126403
|
pickRoots: function pickRoots() {
|
|
126329
|
-
return
|
|
126404
|
+
return _this48.getMeasurePickRoots();
|
|
126330
126405
|
}
|
|
126331
126406
|
});
|
|
126332
126407
|
this.threeMeasure.start();
|
|
@@ -126334,7 +126409,7 @@ var isDebug = false || false === true;
|
|
|
126334
126409
|
case 'angle':
|
|
126335
126410
|
this.threeMeasure = new measure_angle.MeasureAngle(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
|
|
126336
126411
|
pickRoots: function pickRoots() {
|
|
126337
|
-
return
|
|
126412
|
+
return _this48.getMeasurePickRoots();
|
|
126338
126413
|
}
|
|
126339
126414
|
});
|
|
126340
126415
|
this.threeMeasure.start();
|
|
@@ -126342,7 +126417,7 @@ var isDebug = false || false === true;
|
|
|
126342
126417
|
case 'height':
|
|
126343
126418
|
this.threeMeasure = new measure_height.MeasureHeight(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
|
|
126344
126419
|
pickRoots: function pickRoots() {
|
|
126345
|
-
return
|
|
126420
|
+
return _this48.getMeasurePickRoots();
|
|
126346
126421
|
}
|
|
126347
126422
|
});
|
|
126348
126423
|
this.threeMeasure.start();
|
|
@@ -126388,11 +126463,11 @@ var isDebug = false || false === true;
|
|
|
126388
126463
|
return object.name === 'measureObj' || userData.isMeasureObject === true;
|
|
126389
126464
|
},
|
|
126390
126465
|
removeMeasureObjectsFromScene: function removeMeasureObjectsFromScene() {
|
|
126391
|
-
var
|
|
126466
|
+
var _this49 = this;
|
|
126392
126467
|
if (!this.scene) return;
|
|
126393
126468
|
var measureObjects = [];
|
|
126394
126469
|
this.scene.traverse(function (object) {
|
|
126395
|
-
if (
|
|
126470
|
+
if (_this49.isMeasureObject(object)) {
|
|
126396
126471
|
measureObjects.push(object);
|
|
126397
126472
|
}
|
|
126398
126473
|
});
|
|
@@ -126400,9 +126475,9 @@ var isDebug = false || false === true;
|
|
|
126400
126475
|
if (object.parent) {
|
|
126401
126476
|
object.parent.remove(object);
|
|
126402
126477
|
} else {
|
|
126403
|
-
|
|
126478
|
+
_this49.scene.remove(object);
|
|
126404
126479
|
}
|
|
126405
|
-
|
|
126480
|
+
_this49.disposeMeasureObject(object);
|
|
126406
126481
|
});
|
|
126407
126482
|
},
|
|
126408
126483
|
// 增加一个清除所有测量结果的方法,清理历史测量实例遗留的对象
|
|
@@ -126475,12 +126550,12 @@ var isDebug = false || false === true;
|
|
|
126475
126550
|
参数: object, 目标实体,
|
|
126476
126551
|
*/
|
|
126477
126552
|
isolate: function isolate(object) {
|
|
126478
|
-
var
|
|
126553
|
+
var _this50 = this;
|
|
126479
126554
|
if (!this.scene) return;
|
|
126480
126555
|
// 隔离 将目标实体以外的实体隐藏掉
|
|
126481
126556
|
this.scene.traverse(function (item) {
|
|
126482
126557
|
if (item.isMesh && item.name !== object.name) {
|
|
126483
|
-
var offsetMatrix = new
|
|
126558
|
+
var offsetMatrix = new _this50.THREE.Matrix4().copy(item.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
|
|
126484
126559
|
item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
|
|
126485
126560
|
item.instanceMatrix.needsUpdate = true;
|
|
126486
126561
|
}
|
|
@@ -126488,7 +126563,7 @@ var isDebug = false || false === true;
|
|
|
126488
126563
|
},
|
|
126489
126564
|
// 还原操作 将修改过的实体进行恢复
|
|
126490
126565
|
restore: function restore() {
|
|
126491
|
-
var
|
|
126566
|
+
var _this51 = this;
|
|
126492
126567
|
if (!this.scene) return;
|
|
126493
126568
|
this.scene.traverse(function (item) {
|
|
126494
126569
|
if (item.isMesh) {
|
|
@@ -126510,20 +126585,20 @@ var isDebug = false || false === true;
|
|
|
126510
126585
|
item.userData.translateMatrixInvert = null;
|
|
126511
126586
|
}
|
|
126512
126587
|
if (item.userData.combineMatrixInvert) {
|
|
126513
|
-
|
|
126588
|
+
_this51.rotateMesh(item, {
|
|
126514
126589
|
x: 0,
|
|
126515
126590
|
y: 0,
|
|
126516
126591
|
z: 0
|
|
126517
126592
|
});
|
|
126518
126593
|
item.userData.combineMatrixInvert = null;
|
|
126519
126594
|
}
|
|
126520
|
-
var copyMatrix =
|
|
126595
|
+
var copyMatrix = _this51.getInstanceCopyMatrix(item, instanceId);
|
|
126521
126596
|
if (!copyMatrix) return;
|
|
126522
|
-
var sourceHidden =
|
|
126523
|
-
var offsetMatrix = new
|
|
126597
|
+
var sourceHidden = _this51.isSourceHiddenInstance(item, instanceId);
|
|
126598
|
+
var offsetMatrix = new _this51.THREE.Matrix4().copy(copyMatrix);
|
|
126524
126599
|
if (sourceHidden) {
|
|
126525
126600
|
offsetMatrix.makeTranslation(9999999, 9999999, 9999999);
|
|
126526
|
-
|
|
126601
|
+
_this51.removeOutlineInstanceProxy(item, item.userData.instanceIndex);
|
|
126527
126602
|
}
|
|
126528
126603
|
item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
|
|
126529
126604
|
item.instanceMatrix.needsUpdate = true;
|
|
@@ -126532,7 +126607,7 @@ var isDebug = false || false === true;
|
|
|
126532
126607
|
},
|
|
126533
126608
|
// 添加自定义模型, 暂时只支持glb、gltf格式
|
|
126534
126609
|
addCustomModel: function addCustomModel(name, position, url) {
|
|
126535
|
-
var
|
|
126610
|
+
var _this52 = this;
|
|
126536
126611
|
var scale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
126537
126612
|
var immediately = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
126538
126613
|
var callback = arguments.length > 5 ? arguments[5] : undefined;
|
|
@@ -126543,41 +126618,41 @@ var isDebug = false || false === true;
|
|
|
126543
126618
|
locationModel.scale.set(scale, scale, scale);
|
|
126544
126619
|
locationModel.updateMatrixWorld();
|
|
126545
126620
|
if (immediately) {
|
|
126546
|
-
|
|
126621
|
+
_this52.cameraControls.fitToSphere(gltf.this.scene, true);
|
|
126547
126622
|
}
|
|
126548
126623
|
// 动画混合器
|
|
126549
126624
|
// 不参与裁剪
|
|
126550
126625
|
locationModel.userData.cull = false;
|
|
126551
126626
|
locationModel.name = name;
|
|
126552
|
-
if (
|
|
126553
|
-
locationModel.position.copy(new
|
|
126627
|
+
if (_this52.scene) _this52.scene.add(locationModel);
|
|
126628
|
+
locationModel.position.copy(new _this52.THREE.Vector3(position.x, position.y, position.z));
|
|
126554
126629
|
if (gltf.animations.length > 0) {
|
|
126555
|
-
var actionMixer = new
|
|
126630
|
+
var actionMixer = new _this52.THREE.AnimationMixer(gltf.this.scene);
|
|
126556
126631
|
var walkActive = actionMixer.clipAction(gltf.animations[0]);
|
|
126557
126632
|
walkActive.play();
|
|
126558
|
-
|
|
126559
|
-
|
|
126633
|
+
_this52.modelActive.push(walkActive);
|
|
126634
|
+
_this52.modelActions.push(actionMixer);
|
|
126560
126635
|
}
|
|
126561
126636
|
callback && callback();
|
|
126562
126637
|
});
|
|
126563
126638
|
},
|
|
126564
126639
|
// 删除添加的自定义模型
|
|
126565
126640
|
removeCustomModel: function removeCustomModel(name) {
|
|
126566
|
-
var
|
|
126641
|
+
var _this53 = this;
|
|
126567
126642
|
var obj = this.getObjectByName(name);
|
|
126568
126643
|
obj.forEach(function (item, index) {
|
|
126569
126644
|
if (item.animations > 0) {
|
|
126570
126645
|
item.removeFromParent();
|
|
126571
|
-
|
|
126572
|
-
|
|
126646
|
+
_this53.modelActions[index].uncacheRoot(item);
|
|
126647
|
+
_this53.modelActions[index].uncacheRoot(_this53.modelActive[index]);
|
|
126573
126648
|
}
|
|
126574
126649
|
item.traverse(function (child) {
|
|
126575
|
-
if (child instanceof
|
|
126650
|
+
if (child instanceof _this53.THREE.Mesh) {
|
|
126576
126651
|
child.geometry.dispose();
|
|
126577
126652
|
child.material.dispose();
|
|
126578
126653
|
}
|
|
126579
126654
|
});
|
|
126580
|
-
if (
|
|
126655
|
+
if (_this53.scene) _this53.scene.remove(item);
|
|
126581
126656
|
});
|
|
126582
126657
|
this.modelActions.splice(0);
|
|
126583
126658
|
this.modelActive.splice(0);
|
|
@@ -126639,7 +126714,7 @@ var isDebug = false || false === true;
|
|
|
126639
126714
|
return size;
|
|
126640
126715
|
},
|
|
126641
126716
|
animate: function animate() {
|
|
126642
|
-
var
|
|
126717
|
+
var _this54 = this;
|
|
126643
126718
|
if (isDebug) {
|
|
126644
126719
|
this.stats && this.stats.begin(); // 开始帧率统计
|
|
126645
126720
|
}
|
|
@@ -126653,7 +126728,7 @@ var isDebug = false || false === true;
|
|
|
126653
126728
|
if (this.timeStamp > singleFrameTime) {
|
|
126654
126729
|
if (this.modelActions.length > 0) {
|
|
126655
126730
|
this.modelActions.forEach(function (item) {
|
|
126656
|
-
item.update(
|
|
126731
|
+
item.update(_this54.timeStamp);
|
|
126657
126732
|
});
|
|
126658
126733
|
}
|
|
126659
126734
|
this.cameraControls.enabled && this.cameraControls.update(this.timeStamp);
|
|
@@ -127011,25 +127086,25 @@ var isDebug = false || false === true;
|
|
|
127011
127086
|
* 加载下一批数据
|
|
127012
127087
|
*/
|
|
127013
127088
|
loadNextBatch: function loadNextBatch() {
|
|
127014
|
-
var
|
|
127089
|
+
var _this55 = this;
|
|
127015
127090
|
return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee1() {
|
|
127016
127091
|
var loadingState, batch, _t3;
|
|
127017
127092
|
return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context1) {
|
|
127018
127093
|
while (1) switch (_context1.p = _context1.n) {
|
|
127019
127094
|
case 0:
|
|
127020
|
-
loadingState =
|
|
127021
|
-
if (
|
|
127095
|
+
loadingState = _this55.noObserver ? _this55.noObserver.batchLoadingState : _this55.batchLoadingState;
|
|
127096
|
+
if (_this55.isBatchLoadingSceneReady()) {
|
|
127022
127097
|
_context1.n = 1;
|
|
127023
127098
|
break;
|
|
127024
127099
|
}
|
|
127025
|
-
|
|
127100
|
+
_this55.stopBatchLoading('scene_unavailable');
|
|
127026
127101
|
return _context1.a(2);
|
|
127027
127102
|
case 1:
|
|
127028
127103
|
if (!(!loadingState.isLoading || loadingState.currentBatch >= loadingState.pendingData.length)) {
|
|
127029
127104
|
_context1.n = 2;
|
|
127030
127105
|
break;
|
|
127031
127106
|
}
|
|
127032
|
-
|
|
127107
|
+
_this55.completeBatchLoading();
|
|
127033
127108
|
return _context1.a(2);
|
|
127034
127109
|
case 2:
|
|
127035
127110
|
if (!loadingState.isPaused) {
|
|
@@ -127038,7 +127113,7 @@ var isDebug = false || false === true;
|
|
|
127038
127113
|
}
|
|
127039
127114
|
// 如果暂停,延迟一段时间后再次检查
|
|
127040
127115
|
loadingState.animationFrameId = requestAnimationFrame(function () {
|
|
127041
|
-
|
|
127116
|
+
_this55.loadNextBatch();
|
|
127042
127117
|
});
|
|
127043
127118
|
return _context1.a(2);
|
|
127044
127119
|
case 3:
|
|
@@ -127048,7 +127123,7 @@ var isDebug = false || false === true;
|
|
|
127048
127123
|
}
|
|
127049
127124
|
// 如果正在交互,延迟一段时间后再次检查
|
|
127050
127125
|
loadingState.animationFrameId = requestAnimationFrame(function () {
|
|
127051
|
-
|
|
127126
|
+
_this55.loadNextBatch();
|
|
127052
127127
|
});
|
|
127053
127128
|
return _context1.a(2);
|
|
127054
127129
|
case 4:
|
|
@@ -127057,13 +127132,13 @@ var isDebug = false || false === true;
|
|
|
127057
127132
|
_context1.n = 5;
|
|
127058
127133
|
break;
|
|
127059
127134
|
}
|
|
127060
|
-
|
|
127135
|
+
_this55.completeBatchLoading();
|
|
127061
127136
|
return _context1.a(2);
|
|
127062
127137
|
case 5:
|
|
127063
127138
|
_context1.p = 5;
|
|
127064
127139
|
console.log('加载批次:', loadingState.currentBatch);
|
|
127065
127140
|
_context1.n = 6;
|
|
127066
|
-
return
|
|
127141
|
+
return _this55.processWithMainThread(batch);
|
|
127067
127142
|
case 6:
|
|
127068
127143
|
if (loadingState.isLoading) {
|
|
127069
127144
|
_context1.n = 7;
|
|
@@ -127071,11 +127146,11 @@ var isDebug = false || false === true;
|
|
|
127071
127146
|
}
|
|
127072
127147
|
return _context1.a(2);
|
|
127073
127148
|
case 7:
|
|
127074
|
-
if (
|
|
127149
|
+
if (_this55.isBatchLoadingSceneReady()) {
|
|
127075
127150
|
_context1.n = 8;
|
|
127076
127151
|
break;
|
|
127077
127152
|
}
|
|
127078
|
-
|
|
127153
|
+
_this55.stopBatchLoading('scene_unavailable');
|
|
127079
127154
|
return _context1.a(2);
|
|
127080
127155
|
case 8:
|
|
127081
127156
|
// 更新进度
|
|
@@ -127083,8 +127158,8 @@ var isDebug = false || false === true;
|
|
|
127083
127158
|
loadingState.currentBatch++;
|
|
127084
127159
|
|
|
127085
127160
|
// 同步到响应式状态
|
|
127086
|
-
|
|
127087
|
-
|
|
127161
|
+
_this55.batchLoadingState.loadedCount = loadingState.loadedCount;
|
|
127162
|
+
_this55.batchLoadingState.currentBatch = loadingState.currentBatch;
|
|
127088
127163
|
|
|
127089
127164
|
// 调用进度回调
|
|
127090
127165
|
if (loadingState.onProgress) {
|
|
@@ -127098,7 +127173,7 @@ var isDebug = false || false === true;
|
|
|
127098
127173
|
|
|
127099
127174
|
// 使用 requestAnimationFrame 在下一帧继续加载
|
|
127100
127175
|
loadingState.animationFrameId = requestAnimationFrame(function () {
|
|
127101
|
-
|
|
127176
|
+
_this55.loadNextBatch();
|
|
127102
127177
|
});
|
|
127103
127178
|
_context1.n = 10;
|
|
127104
127179
|
break;
|
|
@@ -127109,7 +127184,7 @@ var isDebug = false || false === true;
|
|
|
127109
127184
|
|
|
127110
127185
|
// 继续下一批次
|
|
127111
127186
|
loadingState.animationFrameId = requestAnimationFrame(function () {
|
|
127112
|
-
|
|
127187
|
+
_this55.loadNextBatch();
|
|
127113
127188
|
});
|
|
127114
127189
|
case 10:
|
|
127115
127190
|
return _context1.a(2);
|
|
@@ -127121,20 +127196,20 @@ var isDebug = false || false === true;
|
|
|
127121
127196
|
* 使用主线程处理批次数据
|
|
127122
127197
|
*/
|
|
127123
127198
|
processWithMainThread: function processWithMainThread(batch) {
|
|
127124
|
-
var
|
|
127199
|
+
var _this56 = this;
|
|
127125
127200
|
return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee10() {
|
|
127126
127201
|
var loadingState;
|
|
127127
127202
|
return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context10) {
|
|
127128
127203
|
while (1) switch (_context10.n) {
|
|
127129
127204
|
case 0:
|
|
127130
|
-
loadingState =
|
|
127205
|
+
loadingState = _this56.noObserver ? _this56.noObserver.batchLoadingState : _this56.batchLoadingState;
|
|
127131
127206
|
loadingState.options.batchSize = loadingState.batchSize;
|
|
127132
127207
|
loadingState.options.resetState = loadingState.currentBatch === 0;
|
|
127133
127208
|
// 使用原始的handleInstancedMeshModel方法
|
|
127134
127209
|
|
|
127135
127210
|
isDebug && performance.mark('handleInstancedMeshModel-start');
|
|
127136
127211
|
_context10.n = 1;
|
|
127137
|
-
return handleInstancedMeshModel(
|
|
127212
|
+
return handleInstancedMeshModel(_this56.modelGroup, batch.instances, batch.drawObjs, '', _this56.scene, loadingState.color, loadingState.meshNameConfig, '', loadingState.options);
|
|
127138
127213
|
case 1:
|
|
127139
127214
|
isDebug && performance.mark('handleInstancedMeshModel-end');
|
|
127140
127215
|
isDebug && performance.measure('handleInstancedMeshModel', 'handleInstancedMeshModel-start', 'handleInstancedMeshModel-end');
|
|
@@ -127148,7 +127223,7 @@ var isDebug = false || false === true;
|
|
|
127148
127223
|
* 完成批量加载
|
|
127149
127224
|
*/
|
|
127150
127225
|
completeBatchLoading: function completeBatchLoading() {
|
|
127151
|
-
var
|
|
127226
|
+
var _this57 = this;
|
|
127152
127227
|
var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
|
|
127153
127228
|
if (!loadingState.isLoading) return;
|
|
127154
127229
|
if (!this.isBatchLoadingSceneReady()) {
|
|
@@ -127181,17 +127256,17 @@ var isDebug = false || false === true;
|
|
|
127181
127256
|
this.modelGroup.traverse(function (child) {
|
|
127182
127257
|
if (child.isMesh && !child.userData.batchInitDone) {
|
|
127183
127258
|
markRendered(child);
|
|
127184
|
-
var json =
|
|
127185
|
-
var meshBox3 = new
|
|
127259
|
+
var json = _this57.getMeshCenterAndVolume(child);
|
|
127260
|
+
var meshBox3 = new _this57.THREE.Box3();
|
|
127186
127261
|
meshBox3.setFromObject(child);
|
|
127187
|
-
var worldPs = new
|
|
127262
|
+
var worldPs = new _this57.THREE.Vector3().addVectors(meshBox3.max, meshBox3.min).multiplyScalar(0.5);
|
|
127188
127263
|
if (isNaN(worldPs.x)) return;
|
|
127189
|
-
child.worldDir = new
|
|
127264
|
+
child.worldDir = new _this57.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
|
|
127190
127265
|
child.userData.center = json.center;
|
|
127191
127266
|
child.userData.worldPs = worldPs;
|
|
127192
|
-
child.userData.oldPs = child.getWorldPosition(new
|
|
127267
|
+
child.userData.oldPs = child.getWorldPosition(new _this57.THREE.Vector3());
|
|
127193
127268
|
child.userData.box = json.box;
|
|
127194
|
-
child.userData.position = new
|
|
127269
|
+
child.userData.position = new _this57.THREE.Vector3().copy(child.position);
|
|
127195
127270
|
child.userData.translate = {
|
|
127196
127271
|
x: 0,
|
|
127197
127272
|
y: 0,
|
|
@@ -127283,7 +127358,7 @@ var isDebug = false || false === true;
|
|
|
127283
127358
|
* @param {Object} options - 配置项 { immediate: boolean }
|
|
127284
127359
|
*/
|
|
127285
127360
|
setSystemInterruption: function setSystemInterruption(active) {
|
|
127286
|
-
var
|
|
127361
|
+
var _this58 = this;
|
|
127287
127362
|
var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'user_interaction';
|
|
127288
127363
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
127289
127364
|
var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
|
|
@@ -127349,7 +127424,7 @@ var isDebug = false || false === true;
|
|
|
127349
127424
|
if (loadingState.interactionState.wheelTimeout) return;
|
|
127350
127425
|
|
|
127351
127426
|
// 2. 如果是 wheel 结束,但 this.userInteracting (this.camera) 还在进行,则不恢复
|
|
127352
|
-
if (reason === 'wheel' &&
|
|
127427
|
+
if (reason === 'wheel' && _this58.userInteracting) return;
|
|
127353
127428
|
|
|
127354
127429
|
// 3. 检查是否有强制跳过标记 (可能由其他逻辑触发)
|
|
127355
127430
|
// if (this.forceSkipRendering && reason !== 'user_interaction') return; // 视情况而定
|
|
@@ -127360,15 +127435,15 @@ var isDebug = false || false === true;
|
|
|
127360
127435
|
loadingState.pauseReason = '';
|
|
127361
127436
|
loadingState.interactionState.isInteracting = false;
|
|
127362
127437
|
loadingState.interactionState.interactionType = '';
|
|
127363
|
-
|
|
127438
|
+
_this58.forceSkipRendering = false;
|
|
127364
127439
|
|
|
127365
127440
|
// 恢复本地批量加载 (如果未完成)
|
|
127366
127441
|
if (loadingState.isLoading && loadingState.currentBatch < loadingState.totalBatches) {
|
|
127367
|
-
|
|
127442
|
+
_this58.loadNextBatch();
|
|
127368
127443
|
}
|
|
127369
127444
|
|
|
127370
127445
|
// 恢复 StreamLoader
|
|
127371
|
-
var streamLoader =
|
|
127446
|
+
var streamLoader = _this58.noObserver.streamLoader;
|
|
127372
127447
|
if (streamLoader && typeof streamLoader.handleControlEnd === 'function') {
|
|
127373
127448
|
// StreamLoader 内部通常有防抖或延迟,这里直接通知结束即可
|
|
127374
127449
|
streamLoader.handleControlEnd();
|
|
@@ -127421,7 +127496,7 @@ var isDebug = false || false === true;
|
|
|
127421
127496
|
* 滚轮交互结束的定时检测
|
|
127422
127497
|
*/
|
|
127423
127498
|
scheduleWheelInteractionEnd: function scheduleWheelInteractionEnd(event) {
|
|
127424
|
-
var
|
|
127499
|
+
var _this59 = this;
|
|
127425
127500
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
|
|
127426
127501
|
var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
|
|
127427
127502
|
if (loadingState.interactionState.wheelTimeout) {
|
|
@@ -127429,8 +127504,8 @@ var isDebug = false || false === true;
|
|
|
127429
127504
|
loadingState.interactionState.wheelTimeout = null;
|
|
127430
127505
|
}
|
|
127431
127506
|
loadingState.interactionState.wheelTimeout = setTimeout(function () {
|
|
127432
|
-
|
|
127433
|
-
|
|
127507
|
+
_this59.$emit('wheelEnd', event);
|
|
127508
|
+
_this59.endInteraction('wheel', event, {
|
|
127434
127509
|
immediateResume: false
|
|
127435
127510
|
});
|
|
127436
127511
|
loadingState.interactionState.wheelTimeout = null;
|
|
@@ -127483,11 +127558,11 @@ var isDebug = false || false === true;
|
|
|
127483
127558
|
});
|
|
127484
127559
|
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=script&lang=js
|
|
127485
127560
|
/* harmony default export */ var components_com_graphicsvue_type_script_lang_js = (com_graphicsvue_type_script_lang_js);
|
|
127486
|
-
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=
|
|
127487
|
-
var
|
|
127561
|
+
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=46d6866f&prod&lang=scss&scoped=true
|
|
127562
|
+
var com_graphicsvue_type_style_index_0_id_46d6866f_prod_lang_scss_scoped_true = __webpack_require__("cbdd");
|
|
127488
127563
|
|
|
127489
|
-
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=
|
|
127490
|
-
var
|
|
127564
|
+
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=46d6866f&prod&lang=css
|
|
127565
|
+
var com_graphicsvue_type_style_index_1_id_46d6866f_prod_lang_css = __webpack_require__("12fb");
|
|
127491
127566
|
|
|
127492
127567
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
127493
127568
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
@@ -127599,17 +127674,17 @@ function normalizeComponent(
|
|
|
127599
127674
|
|
|
127600
127675
|
var component = normalizeComponent(
|
|
127601
127676
|
components_com_graphicsvue_type_script_lang_js,
|
|
127602
|
-
|
|
127677
|
+
com_graphicsvue_type_template_id_46d6866f_scoped_true_render,
|
|
127603
127678
|
staticRenderFns,
|
|
127604
127679
|
false,
|
|
127605
127680
|
null,
|
|
127606
|
-
"
|
|
127681
|
+
"46d6866f",
|
|
127607
127682
|
null
|
|
127608
127683
|
|
|
127609
127684
|
)
|
|
127610
127685
|
|
|
127611
127686
|
/* harmony default export */ var com_graphics = (component.exports);
|
|
127612
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
127687
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"44f05828-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
|
|
127613
127688
|
var com_flcanvasvue_type_template_id_b313ab6c_scoped_true_render = function render() {
|
|
127614
127689
|
var _vm = this,
|
|
127615
127690
|
_c = _vm._self._c;
|
|
@@ -131662,7 +131737,7 @@ var com_flcanvas_component = normalizeComponent(
|
|
|
131662
131737
|
)
|
|
131663
131738
|
|
|
131664
131739
|
/* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
|
|
131665
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
131740
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"44f05828-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
|
|
131666
131741
|
var per_controlvue_type_template_id_f547d5c6_scoped_true_render = function render() {
|
|
131667
131742
|
var _vm = this,
|
|
131668
131743
|
_c = _vm._self._c;
|
|
@@ -131770,7 +131845,7 @@ var per_control_component = normalizeComponent(
|
|
|
131770
131845
|
)
|
|
131771
131846
|
|
|
131772
131847
|
/* harmony default export */ var per_control = (per_control_component.exports);
|
|
131773
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
131848
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"44f05828-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
|
|
131774
131849
|
var pidvue_type_template_id_2572c0e2_scoped_true_render = function render() {
|
|
131775
131850
|
var _vm = this,
|
|
131776
131851
|
_c = _vm._self._c;
|
|
@@ -131817,7 +131892,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
|
|
|
131817
131892
|
var html2canvas = __webpack_require__("c0e9");
|
|
131818
131893
|
var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
|
|
131819
131894
|
|
|
131820
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
131895
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"44f05828-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
|
|
131821
131896
|
var ann_toolvue_type_template_id_4b17bce0_scoped_true_render = function render() {
|
|
131822
131897
|
var _vm = this,
|
|
131823
131898
|
_c = _vm._self._c;
|