fl-web-component 2.1.17 → 2.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fl-web-component.common.js +200 -170
- package/dist/fl-web-component.common.js.map +1 -1
- package/dist/fl-web-component.css +1 -1
- package/package.json +1 -1
- package/packages/components/com-graphics/index.vue +64 -13
- package/packages/components/com-graphics/mock.json +1417 -44
- package/packages/utils/StreamLoader.js +62 -62
|
@@ -202,6 +202,13 @@ module.exports =
|
|
|
202
202
|
/************************************************************************/
|
|
203
203
|
/******/ ({
|
|
204
204
|
|
|
205
|
+
/***/ "0119":
|
|
206
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
207
|
+
|
|
208
|
+
// extracted by mini-css-extract-plugin
|
|
209
|
+
|
|
210
|
+
/***/ }),
|
|
211
|
+
|
|
205
212
|
/***/ "03d6":
|
|
206
213
|
/***/ (function(module, exports, __webpack_require__) {
|
|
207
214
|
|
|
@@ -27232,6 +27239,17 @@ function requestTimeout(timeout) {
|
|
|
27232
27239
|
};
|
|
27233
27240
|
}
|
|
27234
27241
|
|
|
27242
|
+
/***/ }),
|
|
27243
|
+
|
|
27244
|
+
/***/ "4ce9":
|
|
27245
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
27246
|
+
|
|
27247
|
+
"use strict";
|
|
27248
|
+
/* 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_c1470bc0_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("edff");
|
|
27249
|
+
/* 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_c1470bc0_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_c1470bc0_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
27250
|
+
/* unused harmony reexport * */
|
|
27251
|
+
|
|
27252
|
+
|
|
27235
27253
|
/***/ }),
|
|
27236
27254
|
|
|
27237
27255
|
/***/ "4d20":
|
|
@@ -39821,17 +39839,6 @@ module.exports = function (delay, noTrailing, callback, debounceMode) {
|
|
|
39821
39839
|
return wrapper;
|
|
39822
39840
|
};
|
|
39823
39841
|
|
|
39824
|
-
/***/ }),
|
|
39825
|
-
|
|
39826
|
-
/***/ "5a20":
|
|
39827
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
39828
|
-
|
|
39829
|
-
"use strict";
|
|
39830
|
-
/* 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_23daca8a_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("76f8");
|
|
39831
|
-
/* 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_23daca8a_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_23daca8a_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
39832
|
-
/* unused harmony reexport * */
|
|
39833
|
-
|
|
39834
|
-
|
|
39835
39842
|
/***/ }),
|
|
39836
39843
|
|
|
39837
39844
|
/***/ "5a43":
|
|
@@ -45160,17 +45167,6 @@ Rect.prototype.className = 'Rect';
|
|
|
45160
45167
|
(0, Global_1._registerNode)(Rect);
|
|
45161
45168
|
Factory_1.Factory.addGetterSetter(Rect, 'cornerRadius', 0, (0, Validators_1.getNumberOrArrayOfNumbersValidator)(4));
|
|
45162
45169
|
|
|
45163
|
-
/***/ }),
|
|
45164
|
-
|
|
45165
|
-
/***/ "5fa7":
|
|
45166
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
45167
|
-
|
|
45168
|
-
"use strict";
|
|
45169
|
-
/* 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_23daca8a_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a31d");
|
|
45170
|
-
/* 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_23daca8a_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_23daca8a_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
45171
|
-
/* unused harmony reexport * */
|
|
45172
|
-
|
|
45173
|
-
|
|
45174
45170
|
/***/ }),
|
|
45175
45171
|
|
|
45176
45172
|
/***/ "6167":
|
|
@@ -51257,13 +51253,6 @@ exports.Sepia = Sepia;
|
|
|
51257
51253
|
|
|
51258
51254
|
/***/ }),
|
|
51259
51255
|
|
|
51260
|
-
/***/ "76f8":
|
|
51261
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
51262
|
-
|
|
51263
|
-
// extracted by mini-css-extract-plugin
|
|
51264
|
-
|
|
51265
|
-
/***/ }),
|
|
51266
|
-
|
|
51267
51256
|
/***/ "77e9":
|
|
51268
51257
|
/***/ (function(module, exports, __webpack_require__) {
|
|
51269
51258
|
|
|
@@ -51273,6 +51262,17 @@ module.exports = function (it) {
|
|
|
51273
51262
|
return it;
|
|
51274
51263
|
};
|
|
51275
51264
|
|
|
51265
|
+
/***/ }),
|
|
51266
|
+
|
|
51267
|
+
/***/ "78a9":
|
|
51268
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
51269
|
+
|
|
51270
|
+
"use strict";
|
|
51271
|
+
/* 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_c1470bc0_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0119");
|
|
51272
|
+
/* 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_c1470bc0_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_c1470bc0_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
51273
|
+
/* unused harmony reexport * */
|
|
51274
|
+
|
|
51275
|
+
|
|
51276
51276
|
/***/ }),
|
|
51277
51277
|
|
|
51278
51278
|
/***/ "7a0e":
|
|
@@ -66008,7 +66008,7 @@ module.exports = document && document.documentElement;
|
|
|
66008
66008
|
/***/ "9224":
|
|
66009
66009
|
/***/ (function(module) {
|
|
66010
66010
|
|
|
66011
|
-
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.1.
|
|
66011
|
+
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.1.19\",\"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\"]}");
|
|
66012
66012
|
|
|
66013
66013
|
/***/ }),
|
|
66014
66014
|
|
|
@@ -68561,13 +68561,6 @@ Schema.messages = messages_messages;
|
|
|
68561
68561
|
|
|
68562
68562
|
/***/ }),
|
|
68563
68563
|
|
|
68564
|
-
/***/ "a31d":
|
|
68565
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
68566
|
-
|
|
68567
|
-
// extracted by mini-css-extract-plugin
|
|
68568
|
-
|
|
68569
|
-
/***/ }),
|
|
68570
|
-
|
|
68571
68564
|
/***/ "a34e":
|
|
68572
68565
|
/***/ (function(module, exports, __webpack_require__) {
|
|
68573
68566
|
|
|
@@ -85194,6 +85187,13 @@ Animation.animRunning = false;
|
|
|
85194
85187
|
|
|
85195
85188
|
/***/ }),
|
|
85196
85189
|
|
|
85190
|
+
/***/ "edff":
|
|
85191
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
85192
|
+
|
|
85193
|
+
// extracted by mini-css-extract-plugin
|
|
85194
|
+
|
|
85195
|
+
/***/ }),
|
|
85196
|
+
|
|
85197
85197
|
/***/ "ee2d":
|
|
85198
85198
|
/***/ (function(module, exports, __webpack_require__) {
|
|
85199
85199
|
|
|
@@ -88142,8 +88142,8 @@ if (typeof window !== 'undefined') {
|
|
|
88142
88142
|
// Indicate to webpack that this file can be concatenated
|
|
88143
88143
|
/* harmony default export */ var setPublicPath = (null);
|
|
88144
88144
|
|
|
88145
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
88146
|
-
var
|
|
88145
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"64712493-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=c1470bc0&scoped=true
|
|
88146
|
+
var com_graphicsvue_type_template_id_c1470bc0_scoped_true_render = function render() {
|
|
88147
88147
|
var _vm = this,
|
|
88148
88148
|
_c = _vm._self._c;
|
|
88149
88149
|
return _c('div', {
|
|
@@ -88155,7 +88155,7 @@ var com_graphicsvue_type_template_id_23daca8a_scoped_true_render = function rend
|
|
|
88155
88155
|
};
|
|
88156
88156
|
var staticRenderFns = [];
|
|
88157
88157
|
|
|
88158
|
-
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=
|
|
88158
|
+
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=c1470bc0&scoped=true
|
|
88159
88159
|
|
|
88160
88160
|
// CONCATENATED MODULE: ./node_modules/camera-controls/dist/camera-controls.module.js
|
|
88161
88161
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
@@ -131175,7 +131175,9 @@ var clippingMesh = [],
|
|
|
131175
131175
|
// 场景包围盒辅助线
|
|
131176
131176
|
boundingBoxVisible = false; // 包围盒是否可见
|
|
131177
131177
|
|
|
131178
|
-
var
|
|
131178
|
+
var FIRST_PERSON_GROUND_HEIGHT = 1680;
|
|
131179
|
+
var FIRST_PERSON_POINTER_SPEED = 0.3;
|
|
131180
|
+
var removeSpeed = 1000,
|
|
131179
131181
|
upSpeed = 200; //控制器移动速度 , //控制跳起时的速度
|
|
131180
131182
|
var roamConfig = {
|
|
131181
131183
|
loop: false,
|
|
@@ -131334,7 +131336,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
131334
131336
|
_this2[item] = [];
|
|
131335
131337
|
});
|
|
131336
131338
|
['removeSpeed', 'upSpeed'].forEach(function (item) {
|
|
131337
|
-
_this2[item] = 200;
|
|
131339
|
+
_this2[item] = item === 'removeSpeed' ? 1000 : 200;
|
|
131338
131340
|
});
|
|
131339
131341
|
this.gui = null;
|
|
131340
131342
|
this.roamConfig = {
|
|
@@ -138116,7 +138118,14 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138116
138118
|
};
|
|
138117
138119
|
this.clippingPlanesConstants = null;
|
|
138118
138120
|
this.renderer.clippingPlanes = Object.freeze([]);
|
|
138119
|
-
|
|
138121
|
+
if (this.gui) {
|
|
138122
|
+
this.gui.destroy();
|
|
138123
|
+
this.gui = null;
|
|
138124
|
+
}
|
|
138125
|
+
},
|
|
138126
|
+
closeGlobalClipping: function closeGlobalClipping() {
|
|
138127
|
+
this.cancelGlobalClipping();
|
|
138128
|
+
this.$emit('globalClippingClosed');
|
|
138120
138129
|
},
|
|
138121
138130
|
// 单个实体的剖切/ 局部剖切 obj 实体对象 flag 代表是否使用图形组件自带的剖切面板 默认为true
|
|
138122
138131
|
setLocalClipping: function setLocalClipping(obj) {
|
|
@@ -138210,6 +138219,11 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138210
138219
|
},
|
|
138211
138220
|
// 添加剖切轴工具
|
|
138212
138221
|
addClippingGui: function addClippingGui(title, boudingValue, objClipp1, objClipp2) {
|
|
138222
|
+
var _this64 = this;
|
|
138223
|
+
if (this.gui) {
|
|
138224
|
+
this.gui.destroy();
|
|
138225
|
+
this.gui = null;
|
|
138226
|
+
}
|
|
138213
138227
|
var xRange = this.getExpandedClippingRange(boudingValue.min.x, boudingValue.max.x);
|
|
138214
138228
|
var yRange = this.getExpandedClippingRange(boudingValue.min.y, boudingValue.max.y);
|
|
138215
138229
|
var zRange = this.getExpandedClippingRange(boudingValue.min.z, boudingValue.max.z);
|
|
@@ -138231,6 +138245,19 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138231
138245
|
this.gui = new lil_gui_module_min_g({
|
|
138232
138246
|
title: title
|
|
138233
138247
|
});
|
|
138248
|
+
if (title === '全局剖切') {
|
|
138249
|
+
var closeButton = document.createElement('button');
|
|
138250
|
+
closeButton.type = 'button';
|
|
138251
|
+
closeButton.className = 'global-clipping-close';
|
|
138252
|
+
closeButton.textContent = '关闭';
|
|
138253
|
+
closeButton.title = '关闭全局剖切';
|
|
138254
|
+
closeButton.addEventListener('click', function (event) {
|
|
138255
|
+
event.preventDefault();
|
|
138256
|
+
event.stopPropagation();
|
|
138257
|
+
_this64.closeGlobalClipping();
|
|
138258
|
+
});
|
|
138259
|
+
this.gui.domElement.querySelector('.title').appendChild(closeButton);
|
|
138260
|
+
}
|
|
138234
138261
|
this.gui.add(this.guiParams, 'x轴').step(0.001).min(xRange.min).max(xRange.max).onChange(function (d) {
|
|
138235
138262
|
objClipp1[0].constant = d;
|
|
138236
138263
|
objClipp2 && (objClipp2[0].constant = d);
|
|
@@ -138259,7 +138286,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138259
138286
|
getFirstPersonMoveSpeed: function getFirstPersonMoveSpeed(customMoveSpeed) {
|
|
138260
138287
|
var defaultMoveSpeed = 800;
|
|
138261
138288
|
var optionMoveSpeed = Number.isFinite(customMoveSpeed) && customMoveSpeed > 0 ? customMoveSpeed : defaultMoveSpeed;
|
|
138262
|
-
var minMoveSpeed = Math.max(
|
|
138289
|
+
var minMoveSpeed = Math.max(1000, optionMoveSpeed * 0.1);
|
|
138263
138290
|
var maxMoveSpeed = Math.max(16000, optionMoveSpeed * 2);
|
|
138264
138291
|
var nextMoveSpeed = optionMoveSpeed;
|
|
138265
138292
|
if (this.sceneBoundingBox && this.sceneBoundingBox.isBox3 && !this.sceneBoundingBox.isEmpty()) {
|
|
@@ -138304,7 +138331,8 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138304
138331
|
moveSpeed = _ref7$moveSpeed === void 0 ? 200 : _ref7$moveSpeed,
|
|
138305
138332
|
_ref7$jumpSpeed = _ref7.jumpSpeed,
|
|
138306
138333
|
jumpSpeed = _ref7$jumpSpeed === void 0 ? 200 : _ref7$jumpSpeed;
|
|
138307
|
-
this.removeSpeed =
|
|
138334
|
+
this.removeSpeed = 3500;
|
|
138335
|
+
// this.removeSpeed = this.getFirstPersonMoveSpeed(moveSpeed);
|
|
138308
138336
|
var jumpConfig = this.getFirstPersonJumpConfig(jumpSpeed);
|
|
138309
138337
|
this.upSpeed = jumpConfig.jumpSpeed;
|
|
138310
138338
|
this.firstPersonGravity = jumpConfig.gravity;
|
|
@@ -138317,71 +138345,72 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138317
138345
|
},
|
|
138318
138346
|
// 页面是否锁定
|
|
138319
138347
|
initPointerLock: function initPointerLock() {
|
|
138320
|
-
var
|
|
138348
|
+
var _this65 = this;
|
|
138321
138349
|
// this.home();
|
|
138322
138350
|
setTimeout(function () {
|
|
138323
138351
|
// 开启第一视角时,将相机与水平面保持水平
|
|
138324
|
-
|
|
138325
|
-
|
|
138326
|
-
|
|
138327
|
-
|
|
138328
|
-
|
|
138329
|
-
|
|
138330
|
-
|
|
138331
|
-
|
|
138352
|
+
_this65.camera.rotation.x = 0;
|
|
138353
|
+
_this65.camera.rotation.z = 0;
|
|
138354
|
+
_this65.pointControls = new PointerLockControls(_this65.camera, _this65.renderer.domElement);
|
|
138355
|
+
_this65.pointControls.pointerSpeed = FIRST_PERSON_POINTER_SPEED;
|
|
138356
|
+
_this65.pointControls.lock();
|
|
138357
|
+
if (!_this65._onFirstPersonChange) {
|
|
138358
|
+
_this65._onFirstPersonChange = function () {
|
|
138359
|
+
if (typeof _this65._cameraChangeObserver === 'function') {
|
|
138360
|
+
_this65._cameraChangeObserver('firstPerson');
|
|
138332
138361
|
}
|
|
138333
138362
|
};
|
|
138334
138363
|
}
|
|
138335
138364
|
try {
|
|
138336
|
-
|
|
138365
|
+
_this65.pointControls.addEventListener('change', _this65._onFirstPersonChange);
|
|
138337
138366
|
} catch (e) {}
|
|
138338
138367
|
// 锁定
|
|
138339
|
-
|
|
138340
|
-
|
|
138341
|
-
if (
|
|
138342
|
-
|
|
138368
|
+
_this65.pointControls.addEventListener('lock', function () {
|
|
138369
|
+
_this65.detachTransformControls();
|
|
138370
|
+
if (_this65.cameraControls) {
|
|
138371
|
+
_this65.cameraControls.enabled = false;
|
|
138343
138372
|
}
|
|
138344
|
-
window.addEventListener('keydown',
|
|
138345
|
-
window.addEventListener('keyup',
|
|
138346
|
-
|
|
138347
|
-
if (typeof
|
|
138348
|
-
|
|
138373
|
+
window.addEventListener('keydown', _this65.onKeyDown, false);
|
|
138374
|
+
window.addEventListener('keyup', _this65.onKeyUp, false);
|
|
138375
|
+
_this65.unbindScenePointerEvents();
|
|
138376
|
+
if (typeof _this65._cameraChangeObserver === 'function') {
|
|
138377
|
+
_this65._cameraChangeObserver('firstPersonLock');
|
|
138349
138378
|
}
|
|
138350
138379
|
});
|
|
138351
138380
|
// 解锁
|
|
138352
|
-
|
|
138353
|
-
|
|
138354
|
-
if (
|
|
138355
|
-
|
|
138381
|
+
_this65.pointControls.addEventListener('unlock', function () {
|
|
138382
|
+
_this65.firstPerSign = false;
|
|
138383
|
+
if (_this65.cameraControls) {
|
|
138384
|
+
_this65.cameraControls.enabled = true;
|
|
138356
138385
|
}
|
|
138357
138386
|
// 返回初始视角
|
|
138358
|
-
if (
|
|
138359
|
-
|
|
138387
|
+
if (_this65.cameraControls && _this65.camera && _this65.sceneBoundingBox) {
|
|
138388
|
+
_this65.home();
|
|
138360
138389
|
}
|
|
138361
138390
|
try {
|
|
138362
|
-
if (
|
|
138363
|
-
|
|
138391
|
+
if (_this65._onFirstPersonChange && _this65.pointControls) {
|
|
138392
|
+
_this65.pointControls.removeEventListener('change', _this65._onFirstPersonChange);
|
|
138364
138393
|
}
|
|
138365
138394
|
} catch (e) {}
|
|
138366
|
-
if (
|
|
138367
|
-
|
|
138395
|
+
if (_this65.noObserver) {
|
|
138396
|
+
_this65.noObserver._firstPersonLastPos = null;
|
|
138368
138397
|
}
|
|
138369
138398
|
setTimeout(function () {
|
|
138370
|
-
window.removeEventListener('keydown',
|
|
138371
|
-
window.removeEventListener('keyup',
|
|
138372
|
-
if (
|
|
138373
|
-
|
|
138399
|
+
window.removeEventListener('keydown', _this65.onKeyDown);
|
|
138400
|
+
window.removeEventListener('keyup', _this65.onKeyUp);
|
|
138401
|
+
if (_this65.renderer && _this65.renderer.domElement) {
|
|
138402
|
+
_this65.bindScenePointerEvents();
|
|
138374
138403
|
}
|
|
138375
|
-
if (
|
|
138376
|
-
|
|
138404
|
+
if (_this65.scene) {
|
|
138405
|
+
_this65.ensureTransformSelectionValid();
|
|
138377
138406
|
}
|
|
138378
138407
|
// this.timeRender()
|
|
138379
138408
|
}, 0);
|
|
138380
|
-
if (typeof
|
|
138381
|
-
|
|
138409
|
+
if (typeof _this65._cameraChangeObserver === 'function') {
|
|
138410
|
+
_this65._cameraChangeObserver('firstPersonUnlock');
|
|
138382
138411
|
}
|
|
138383
138412
|
});
|
|
138384
|
-
if (
|
|
138413
|
+
if (_this65.scene) _this65.scene.add(_this65.pointControls.object);
|
|
138385
138414
|
}, 10);
|
|
138386
138415
|
},
|
|
138387
138416
|
// 第一视角运动
|
|
@@ -138391,18 +138420,19 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138391
138420
|
var control = this.pointControls.object;
|
|
138392
138421
|
// 获取刷新时间
|
|
138393
138422
|
var delta = this.clock.getDelta();
|
|
138394
|
-
var
|
|
138395
|
-
//
|
|
138396
|
-
this.velocity.x -= this.velocity.x *
|
|
138397
|
-
this.velocity.z -= this.velocity.z *
|
|
138423
|
+
var damping = 10.0;
|
|
138424
|
+
// 速度采用阻尼加速,保证 removeSpeed 表示最终移动速度,而不是加速度。
|
|
138425
|
+
this.velocity.x -= this.velocity.x * damping * delta;
|
|
138426
|
+
this.velocity.z -= this.velocity.z * damping * delta;
|
|
138398
138427
|
this.velocity.y -= (this.firstPersonGravity || 9.8 * 100.0) * delta; // 默认下降的速度
|
|
138399
138428
|
// 获取当前按键的方向并获取朝哪个方向移动
|
|
138400
138429
|
this.direction.z = Number(this.moveForward) - Number(this.moveBackward);
|
|
138401
138430
|
this.direction.x = Number(this.moveRight) - Number(this.moveLeft);
|
|
138402
138431
|
// 将法向量的值归一化
|
|
138403
138432
|
this.direction.normalize();
|
|
138404
|
-
|
|
138405
|
-
if (this.
|
|
138433
|
+
var acceleration = this.removeSpeed * damping;
|
|
138434
|
+
if (this.moveForward || this.moveBackward) this.velocity.z -= this.direction.z * acceleration * delta;
|
|
138435
|
+
if (this.moveLeft || this.moveRight) this.velocity.x -= this.direction.x * acceleration * delta;
|
|
138406
138436
|
// }
|
|
138407
138437
|
// 复制相机的位置
|
|
138408
138438
|
this.downRaycaster.ray.origin.copy(control.position);
|
|
@@ -138420,9 +138450,9 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138420
138450
|
this.pointControls.moveForward(-this.velocity.z * delta);
|
|
138421
138451
|
control.position.y += this.velocity.y * delta;
|
|
138422
138452
|
// 保证控制器的y轴在平面上
|
|
138423
|
-
if (control.position.y <
|
|
138453
|
+
if (control.position.y < FIRST_PERSON_GROUND_HEIGHT) {
|
|
138424
138454
|
this.velocity.y = -0 / 10;
|
|
138425
|
-
control.position.y =
|
|
138455
|
+
control.position.y = FIRST_PERSON_GROUND_HEIGHT;
|
|
138426
138456
|
this.canJump = true;
|
|
138427
138457
|
}
|
|
138428
138458
|
if (this.noObserver) {
|
|
@@ -138536,7 +138566,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138536
138566
|
return this.scene && this.scene.children ? this.scene.children : [];
|
|
138537
138567
|
},
|
|
138538
138568
|
openMeasure: function openMeasure(type) {
|
|
138539
|
-
var
|
|
138569
|
+
var _this66 = this;
|
|
138540
138570
|
var isClear = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
138541
138571
|
if (this.threeMeasure) {
|
|
138542
138572
|
this.threeMeasure.close(isClear);
|
|
@@ -138548,7 +138578,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138548
138578
|
case 'distance':
|
|
138549
138579
|
this.threeMeasure = new measure_distance.MeasureDistance(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
|
|
138550
138580
|
pickRoots: function pickRoots() {
|
|
138551
|
-
return
|
|
138581
|
+
return _this66.getMeasurePickRoots();
|
|
138552
138582
|
}
|
|
138553
138583
|
});
|
|
138554
138584
|
this.threeMeasure.start();
|
|
@@ -138556,7 +138586,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138556
138586
|
case 'area':
|
|
138557
138587
|
this.threeMeasure = new measure_area.MeasureArea(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
|
|
138558
138588
|
pickRoots: function pickRoots() {
|
|
138559
|
-
return
|
|
138589
|
+
return _this66.getMeasurePickRoots();
|
|
138560
138590
|
}
|
|
138561
138591
|
});
|
|
138562
138592
|
this.threeMeasure.start();
|
|
@@ -138564,7 +138594,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138564
138594
|
case 'angle':
|
|
138565
138595
|
this.threeMeasure = new measure_angle.MeasureAngle(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
|
|
138566
138596
|
pickRoots: function pickRoots() {
|
|
138567
|
-
return
|
|
138597
|
+
return _this66.getMeasurePickRoots();
|
|
138568
138598
|
}
|
|
138569
138599
|
});
|
|
138570
138600
|
this.threeMeasure.start();
|
|
@@ -138572,7 +138602,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138572
138602
|
case 'height':
|
|
138573
138603
|
this.threeMeasure = new measure_height.MeasureHeight(this.renderer, this.scene, this.camera, this.instructions.offsetWidth, this.instructions.offsetHeight, {
|
|
138574
138604
|
pickRoots: function pickRoots() {
|
|
138575
|
-
return
|
|
138605
|
+
return _this66.getMeasurePickRoots();
|
|
138576
138606
|
}
|
|
138577
138607
|
});
|
|
138578
138608
|
this.threeMeasure.start();
|
|
@@ -138618,11 +138648,11 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138618
138648
|
return object.name === 'measureObj' || userData.isMeasureObject === true;
|
|
138619
138649
|
},
|
|
138620
138650
|
removeMeasureObjectsFromScene: function removeMeasureObjectsFromScene() {
|
|
138621
|
-
var
|
|
138651
|
+
var _this67 = this;
|
|
138622
138652
|
if (!this.scene) return;
|
|
138623
138653
|
var measureObjects = [];
|
|
138624
138654
|
this.scene.traverse(function (object) {
|
|
138625
|
-
if (
|
|
138655
|
+
if (_this67.isMeasureObject(object)) {
|
|
138626
138656
|
measureObjects.push(object);
|
|
138627
138657
|
}
|
|
138628
138658
|
});
|
|
@@ -138630,9 +138660,9 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138630
138660
|
if (object.parent) {
|
|
138631
138661
|
object.parent.remove(object);
|
|
138632
138662
|
} else {
|
|
138633
|
-
|
|
138663
|
+
_this67.scene.remove(object);
|
|
138634
138664
|
}
|
|
138635
|
-
|
|
138665
|
+
_this67.disposeMeasureObject(object);
|
|
138636
138666
|
});
|
|
138637
138667
|
},
|
|
138638
138668
|
// 增加一个清除所有测量结果的方法,清理历史测量实例遗留的对象
|
|
@@ -138705,12 +138735,12 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138705
138735
|
参数: object, 目标实体,
|
|
138706
138736
|
*/
|
|
138707
138737
|
isolate: function isolate(object) {
|
|
138708
|
-
var
|
|
138738
|
+
var _this68 = this;
|
|
138709
138739
|
if (!this.scene) return;
|
|
138710
138740
|
// 隔离 将目标实体以外的实体隐藏掉
|
|
138711
138741
|
this.scene.traverse(function (item) {
|
|
138712
138742
|
if (item.isMesh && item.name !== object.name) {
|
|
138713
|
-
var offsetMatrix = new
|
|
138743
|
+
var offsetMatrix = new _this68.THREE.Matrix4().copy(item.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
|
|
138714
138744
|
item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
|
|
138715
138745
|
item.instanceMatrix.needsUpdate = true;
|
|
138716
138746
|
}
|
|
@@ -138718,7 +138748,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138718
138748
|
},
|
|
138719
138749
|
// 还原操作 将修改过的实体进行恢复
|
|
138720
138750
|
restore: function restore() {
|
|
138721
|
-
var
|
|
138751
|
+
var _this69 = this;
|
|
138722
138752
|
if (!this.scene) return;
|
|
138723
138753
|
this.scene.traverse(function (item) {
|
|
138724
138754
|
if (item.isMesh) {
|
|
@@ -138740,20 +138770,20 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138740
138770
|
item.userData.translateMatrixInvert = null;
|
|
138741
138771
|
}
|
|
138742
138772
|
if (item.userData.combineMatrixInvert) {
|
|
138743
|
-
|
|
138773
|
+
_this69.rotateMesh(item, {
|
|
138744
138774
|
x: 0,
|
|
138745
138775
|
y: 0,
|
|
138746
138776
|
z: 0
|
|
138747
138777
|
});
|
|
138748
138778
|
item.userData.combineMatrixInvert = null;
|
|
138749
138779
|
}
|
|
138750
|
-
var copyMatrix =
|
|
138780
|
+
var copyMatrix = _this69.getInstanceCopyMatrix(item, instanceId);
|
|
138751
138781
|
if (!copyMatrix) return;
|
|
138752
|
-
var sourceHidden =
|
|
138753
|
-
var offsetMatrix = new
|
|
138782
|
+
var sourceHidden = _this69.isSourceHiddenInstance(item, instanceId);
|
|
138783
|
+
var offsetMatrix = new _this69.THREE.Matrix4().copy(copyMatrix);
|
|
138754
138784
|
if (sourceHidden) {
|
|
138755
138785
|
offsetMatrix.makeTranslation(9999999, 9999999, 9999999);
|
|
138756
|
-
|
|
138786
|
+
_this69.removeOutlineInstanceProxy(item, item.userData.instanceIndex);
|
|
138757
138787
|
}
|
|
138758
138788
|
item.setMatrixAt(item.userData.instanceIndex, offsetMatrix);
|
|
138759
138789
|
item.instanceMatrix.needsUpdate = true;
|
|
@@ -138762,7 +138792,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138762
138792
|
},
|
|
138763
138793
|
// 添加自定义模型, 暂时只支持glb、gltf格式
|
|
138764
138794
|
addCustomModel: function addCustomModel(name, position, url) {
|
|
138765
|
-
var
|
|
138795
|
+
var _this70 = this;
|
|
138766
138796
|
var scale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
138767
138797
|
var immediately = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
138768
138798
|
var callback = arguments.length > 5 ? arguments[5] : undefined;
|
|
@@ -138773,41 +138803,41 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138773
138803
|
locationModel.scale.set(scale, scale, scale);
|
|
138774
138804
|
locationModel.updateMatrixWorld();
|
|
138775
138805
|
if (immediately) {
|
|
138776
|
-
|
|
138806
|
+
_this70.cameraControls.fitToSphere(gltf.this.scene, true);
|
|
138777
138807
|
}
|
|
138778
138808
|
// 动画混合器
|
|
138779
138809
|
// 不参与裁剪
|
|
138780
138810
|
locationModel.userData.cull = false;
|
|
138781
138811
|
locationModel.name = name;
|
|
138782
|
-
if (
|
|
138783
|
-
locationModel.position.copy(new
|
|
138812
|
+
if (_this70.scene) _this70.scene.add(locationModel);
|
|
138813
|
+
locationModel.position.copy(new _this70.THREE.Vector3(position.x, position.y, position.z));
|
|
138784
138814
|
if (gltf.animations.length > 0) {
|
|
138785
|
-
var actionMixer = new
|
|
138815
|
+
var actionMixer = new _this70.THREE.AnimationMixer(gltf.this.scene);
|
|
138786
138816
|
var walkActive = actionMixer.clipAction(gltf.animations[0]);
|
|
138787
138817
|
walkActive.play();
|
|
138788
|
-
|
|
138789
|
-
|
|
138818
|
+
_this70.modelActive.push(walkActive);
|
|
138819
|
+
_this70.modelActions.push(actionMixer);
|
|
138790
138820
|
}
|
|
138791
138821
|
callback && callback();
|
|
138792
138822
|
});
|
|
138793
138823
|
},
|
|
138794
138824
|
// 删除添加的自定义模型
|
|
138795
138825
|
removeCustomModel: function removeCustomModel(name) {
|
|
138796
|
-
var
|
|
138826
|
+
var _this71 = this;
|
|
138797
138827
|
var obj = this.getObjectByName(name);
|
|
138798
138828
|
obj.forEach(function (item, index) {
|
|
138799
138829
|
if (item.animations > 0) {
|
|
138800
138830
|
item.removeFromParent();
|
|
138801
|
-
|
|
138802
|
-
|
|
138831
|
+
_this71.modelActions[index].uncacheRoot(item);
|
|
138832
|
+
_this71.modelActions[index].uncacheRoot(_this71.modelActive[index]);
|
|
138803
138833
|
}
|
|
138804
138834
|
item.traverse(function (child) {
|
|
138805
|
-
if (child instanceof
|
|
138835
|
+
if (child instanceof _this71.THREE.Mesh) {
|
|
138806
138836
|
child.geometry.dispose();
|
|
138807
138837
|
child.material.dispose();
|
|
138808
138838
|
}
|
|
138809
138839
|
});
|
|
138810
|
-
if (
|
|
138840
|
+
if (_this71.scene) _this71.scene.remove(item);
|
|
138811
138841
|
});
|
|
138812
138842
|
this.modelActions.splice(0);
|
|
138813
138843
|
this.modelActive.splice(0);
|
|
@@ -138869,7 +138899,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138869
138899
|
return size;
|
|
138870
138900
|
},
|
|
138871
138901
|
animate: function animate() {
|
|
138872
|
-
var
|
|
138902
|
+
var _this72 = this;
|
|
138873
138903
|
if (isDebug) {
|
|
138874
138904
|
this.stats && this.stats.begin(); // 开始帧率统计
|
|
138875
138905
|
}
|
|
@@ -138883,7 +138913,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
138883
138913
|
if (this.timeStamp > singleFrameTime) {
|
|
138884
138914
|
if (this.modelActions.length > 0) {
|
|
138885
138915
|
this.modelActions.forEach(function (item) {
|
|
138886
|
-
item.update(
|
|
138916
|
+
item.update(_this72.timeStamp);
|
|
138887
138917
|
});
|
|
138888
138918
|
}
|
|
138889
138919
|
this.cameraControls.enabled && this.cameraControls.update(this.timeStamp);
|
|
@@ -139259,25 +139289,25 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139259
139289
|
* 加载下一批数据
|
|
139260
139290
|
*/
|
|
139261
139291
|
loadNextBatch: function loadNextBatch() {
|
|
139262
|
-
var
|
|
139292
|
+
var _this73 = this;
|
|
139263
139293
|
return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee1() {
|
|
139264
139294
|
var loadingState, batch, _t3;
|
|
139265
139295
|
return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context1) {
|
|
139266
139296
|
while (1) switch (_context1.p = _context1.n) {
|
|
139267
139297
|
case 0:
|
|
139268
|
-
loadingState =
|
|
139269
|
-
if (
|
|
139298
|
+
loadingState = _this73.noObserver ? _this73.noObserver.batchLoadingState : _this73.batchLoadingState;
|
|
139299
|
+
if (_this73.isBatchLoadingSceneReady()) {
|
|
139270
139300
|
_context1.n = 1;
|
|
139271
139301
|
break;
|
|
139272
139302
|
}
|
|
139273
|
-
|
|
139303
|
+
_this73.stopBatchLoading('scene_unavailable');
|
|
139274
139304
|
return _context1.a(2);
|
|
139275
139305
|
case 1:
|
|
139276
139306
|
if (!(!loadingState.isLoading || loadingState.currentBatch >= loadingState.pendingData.length)) {
|
|
139277
139307
|
_context1.n = 2;
|
|
139278
139308
|
break;
|
|
139279
139309
|
}
|
|
139280
|
-
|
|
139310
|
+
_this73.completeBatchLoading();
|
|
139281
139311
|
return _context1.a(2);
|
|
139282
139312
|
case 2:
|
|
139283
139313
|
if (!loadingState.isPaused) {
|
|
@@ -139286,7 +139316,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139286
139316
|
}
|
|
139287
139317
|
// 如果暂停,延迟一段时间后再次检查
|
|
139288
139318
|
loadingState.animationFrameId = requestAnimationFrame(function () {
|
|
139289
|
-
|
|
139319
|
+
_this73.loadNextBatch();
|
|
139290
139320
|
});
|
|
139291
139321
|
return _context1.a(2);
|
|
139292
139322
|
case 3:
|
|
@@ -139296,7 +139326,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139296
139326
|
}
|
|
139297
139327
|
// 如果正在交互,延迟一段时间后再次检查
|
|
139298
139328
|
loadingState.animationFrameId = requestAnimationFrame(function () {
|
|
139299
|
-
|
|
139329
|
+
_this73.loadNextBatch();
|
|
139300
139330
|
});
|
|
139301
139331
|
return _context1.a(2);
|
|
139302
139332
|
case 4:
|
|
@@ -139305,13 +139335,13 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139305
139335
|
_context1.n = 5;
|
|
139306
139336
|
break;
|
|
139307
139337
|
}
|
|
139308
|
-
|
|
139338
|
+
_this73.completeBatchLoading();
|
|
139309
139339
|
return _context1.a(2);
|
|
139310
139340
|
case 5:
|
|
139311
139341
|
_context1.p = 5;
|
|
139312
139342
|
console.log('加载批次:', loadingState.currentBatch);
|
|
139313
139343
|
_context1.n = 6;
|
|
139314
|
-
return
|
|
139344
|
+
return _this73.processWithMainThread(batch);
|
|
139315
139345
|
case 6:
|
|
139316
139346
|
if (loadingState.isLoading) {
|
|
139317
139347
|
_context1.n = 7;
|
|
@@ -139319,11 +139349,11 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139319
139349
|
}
|
|
139320
139350
|
return _context1.a(2);
|
|
139321
139351
|
case 7:
|
|
139322
|
-
if (
|
|
139352
|
+
if (_this73.isBatchLoadingSceneReady()) {
|
|
139323
139353
|
_context1.n = 8;
|
|
139324
139354
|
break;
|
|
139325
139355
|
}
|
|
139326
|
-
|
|
139356
|
+
_this73.stopBatchLoading('scene_unavailable');
|
|
139327
139357
|
return _context1.a(2);
|
|
139328
139358
|
case 8:
|
|
139329
139359
|
// 更新进度
|
|
@@ -139332,8 +139362,8 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139332
139362
|
loadingState.currentBatch++;
|
|
139333
139363
|
|
|
139334
139364
|
// 同步到响应式状态
|
|
139335
|
-
|
|
139336
|
-
|
|
139365
|
+
_this73.batchLoadingState.loadedCount = loadingState.loadedCount;
|
|
139366
|
+
_this73.batchLoadingState.currentBatch = loadingState.currentBatch;
|
|
139337
139367
|
|
|
139338
139368
|
// 调用进度回调
|
|
139339
139369
|
if (loadingState.onProgress) {
|
|
@@ -139347,7 +139377,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139347
139377
|
|
|
139348
139378
|
// 使用 requestAnimationFrame 在下一帧继续加载
|
|
139349
139379
|
loadingState.animationFrameId = requestAnimationFrame(function () {
|
|
139350
|
-
|
|
139380
|
+
_this73.loadNextBatch();
|
|
139351
139381
|
});
|
|
139352
139382
|
_context1.n = 10;
|
|
139353
139383
|
break;
|
|
@@ -139358,7 +139388,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139358
139388
|
|
|
139359
139389
|
// 继续下一批次
|
|
139360
139390
|
loadingState.animationFrameId = requestAnimationFrame(function () {
|
|
139361
|
-
|
|
139391
|
+
_this73.loadNextBatch();
|
|
139362
139392
|
});
|
|
139363
139393
|
case 10:
|
|
139364
139394
|
return _context1.a(2);
|
|
@@ -139370,20 +139400,20 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139370
139400
|
* 使用主线程处理批次数据
|
|
139371
139401
|
*/
|
|
139372
139402
|
processWithMainThread: function processWithMainThread(batch) {
|
|
139373
|
-
var
|
|
139403
|
+
var _this74 = this;
|
|
139374
139404
|
return com_graphicsvue_type_script_lang_js_asyncToGenerator(/*#__PURE__*/com_graphicsvue_type_script_lang_js_regenerator().m(function _callee10() {
|
|
139375
139405
|
var loadingState;
|
|
139376
139406
|
return com_graphicsvue_type_script_lang_js_regenerator().w(function (_context10) {
|
|
139377
139407
|
while (1) switch (_context10.n) {
|
|
139378
139408
|
case 0:
|
|
139379
|
-
loadingState =
|
|
139409
|
+
loadingState = _this74.noObserver ? _this74.noObserver.batchLoadingState : _this74.batchLoadingState;
|
|
139380
139410
|
loadingState.options.batchSize = loadingState.batchSize;
|
|
139381
139411
|
loadingState.options.resetState = loadingState.currentBatch === 0;
|
|
139382
139412
|
// 使用原始的handleInstancedMeshModel方法
|
|
139383
139413
|
|
|
139384
139414
|
isDebug && performance.mark('handleInstancedMeshModel-start');
|
|
139385
139415
|
_context10.n = 1;
|
|
139386
|
-
return handleInstancedMeshModel(
|
|
139416
|
+
return handleInstancedMeshModel(_this74.modelGroup, batch.instances, batch.drawObjs, '', _this74.scene, loadingState.color, loadingState.meshNameConfig, '', loadingState.options);
|
|
139387
139417
|
case 1:
|
|
139388
139418
|
isDebug && performance.mark('handleInstancedMeshModel-end');
|
|
139389
139419
|
isDebug && performance.measure('handleInstancedMeshModel', 'handleInstancedMeshModel-start', 'handleInstancedMeshModel-end');
|
|
@@ -139411,7 +139441,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139411
139441
|
* 完成批量加载
|
|
139412
139442
|
*/
|
|
139413
139443
|
completeBatchLoading: function completeBatchLoading() {
|
|
139414
|
-
var
|
|
139444
|
+
var _this75 = this;
|
|
139415
139445
|
var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
|
|
139416
139446
|
if (!loadingState.isLoading) return;
|
|
139417
139447
|
if (!this.isBatchLoadingSceneReady()) {
|
|
@@ -139444,17 +139474,17 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139444
139474
|
this.modelGroup.traverse(function (child) {
|
|
139445
139475
|
if (child.isMesh && !child.userData.batchInitDone) {
|
|
139446
139476
|
markRendered(child);
|
|
139447
|
-
var json =
|
|
139448
|
-
var meshBox3 = new
|
|
139477
|
+
var json = _this75.getMeshCenterAndVolume(child);
|
|
139478
|
+
var meshBox3 = new _this75.THREE.Box3();
|
|
139449
139479
|
meshBox3.setFromObject(child);
|
|
139450
|
-
var worldPs = new
|
|
139480
|
+
var worldPs = new _this75.THREE.Vector3().addVectors(meshBox3.max, meshBox3.min).multiplyScalar(0.5);
|
|
139451
139481
|
if (isNaN(worldPs.x)) return;
|
|
139452
|
-
child.worldDir = new
|
|
139482
|
+
child.worldDir = new _this75.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
|
|
139453
139483
|
child.userData.center = json.center;
|
|
139454
139484
|
child.userData.worldPs = worldPs;
|
|
139455
|
-
child.userData.oldPs = child.getWorldPosition(new
|
|
139485
|
+
child.userData.oldPs = child.getWorldPosition(new _this75.THREE.Vector3());
|
|
139456
139486
|
child.userData.box = json.box;
|
|
139457
|
-
child.userData.position = new
|
|
139487
|
+
child.userData.position = new _this75.THREE.Vector3().copy(child.position);
|
|
139458
139488
|
child.userData.translate = {
|
|
139459
139489
|
x: 0,
|
|
139460
139490
|
y: 0,
|
|
@@ -139551,7 +139581,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139551
139581
|
* @param {Object} options - 配置项 { immediate: boolean }
|
|
139552
139582
|
*/
|
|
139553
139583
|
setSystemInterruption: function setSystemInterruption(active) {
|
|
139554
|
-
var
|
|
139584
|
+
var _this76 = this;
|
|
139555
139585
|
var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'user_interaction';
|
|
139556
139586
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
139557
139587
|
var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
|
|
@@ -139617,7 +139647,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139617
139647
|
if (loadingState.interactionState.wheelTimeout) return;
|
|
139618
139648
|
|
|
139619
139649
|
// 2. 如果是 wheel 结束,但 this.userInteracting (this.camera) 还在进行,则不恢复
|
|
139620
|
-
if (reason === 'wheel' &&
|
|
139650
|
+
if (reason === 'wheel' && _this76.userInteracting) return;
|
|
139621
139651
|
|
|
139622
139652
|
// 3. 检查是否有强制跳过标记 (可能由其他逻辑触发)
|
|
139623
139653
|
// if (this.forceSkipRendering && reason !== 'user_interaction') return; // 视情况而定
|
|
@@ -139628,15 +139658,15 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139628
139658
|
loadingState.pauseReason = '';
|
|
139629
139659
|
loadingState.interactionState.isInteracting = false;
|
|
139630
139660
|
loadingState.interactionState.interactionType = '';
|
|
139631
|
-
|
|
139661
|
+
_this76.forceSkipRendering = false;
|
|
139632
139662
|
|
|
139633
139663
|
// 恢复本地批量加载 (如果未完成)
|
|
139634
139664
|
if (loadingState.isLoading && loadingState.currentBatch < loadingState.totalBatches) {
|
|
139635
|
-
|
|
139665
|
+
_this76.loadNextBatch();
|
|
139636
139666
|
}
|
|
139637
139667
|
|
|
139638
139668
|
// 恢复 StreamLoader
|
|
139639
|
-
var streamLoader =
|
|
139669
|
+
var streamLoader = _this76.noObserver.streamLoader;
|
|
139640
139670
|
if (streamLoader && typeof streamLoader.handleControlEnd === 'function') {
|
|
139641
139671
|
// StreamLoader 内部通常有防抖或延迟,这里直接通知结束即可
|
|
139642
139672
|
streamLoader.handleControlEnd();
|
|
@@ -139689,7 +139719,7 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139689
139719
|
* 滚轮交互结束的定时检测
|
|
139690
139720
|
*/
|
|
139691
139721
|
scheduleWheelInteractionEnd: function scheduleWheelInteractionEnd(event) {
|
|
139692
|
-
var
|
|
139722
|
+
var _this77 = this;
|
|
139693
139723
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
|
|
139694
139724
|
var loadingState = this.noObserver ? this.noObserver.batchLoadingState : this.batchLoadingState;
|
|
139695
139725
|
if (loadingState.interactionState.wheelTimeout) {
|
|
@@ -139697,16 +139727,16 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139697
139727
|
loadingState.interactionState.wheelTimeout = null;
|
|
139698
139728
|
}
|
|
139699
139729
|
loadingState.interactionState.wheelTimeout = setTimeout(function () {
|
|
139700
|
-
|
|
139730
|
+
_this77.$emit('wheelEnd', event);
|
|
139701
139731
|
loadingState.interactionState.wheelTimeout = null;
|
|
139702
|
-
|
|
139703
|
-
if (
|
|
139704
|
-
|
|
139705
|
-
if (typeof
|
|
139706
|
-
|
|
139732
|
+
_this77.clearSettlePrefetchTimer();
|
|
139733
|
+
if (_this77.isCameraControlMoveObserverEnabled()) {
|
|
139734
|
+
_this77.resetCameraControlMoveSnapshot(false);
|
|
139735
|
+
if (typeof _this77._cameraChangeObserver === 'function') {
|
|
139736
|
+
_this77._cameraChangeObserver('wheel');
|
|
139707
139737
|
}
|
|
139708
139738
|
} else {
|
|
139709
|
-
|
|
139739
|
+
_this77.endInteraction('wheel', event, {
|
|
139710
139740
|
immediateResume: false
|
|
139711
139741
|
});
|
|
139712
139742
|
}
|
|
@@ -139821,11 +139851,11 @@ var OCCLUSION_DEBUG_FLAG_COLORS = {
|
|
|
139821
139851
|
});
|
|
139822
139852
|
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=script&lang=js
|
|
139823
139853
|
/* harmony default export */ var components_com_graphicsvue_type_script_lang_js = (com_graphicsvue_type_script_lang_js);
|
|
139824
|
-
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=
|
|
139825
|
-
var
|
|
139854
|
+
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=c1470bc0&prod&lang=scss&scoped=true
|
|
139855
|
+
var com_graphicsvue_type_style_index_0_id_c1470bc0_prod_lang_scss_scoped_true = __webpack_require__("78a9");
|
|
139826
139856
|
|
|
139827
|
-
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=
|
|
139828
|
-
var
|
|
139857
|
+
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=1&id=c1470bc0&prod&lang=css
|
|
139858
|
+
var com_graphicsvue_type_style_index_1_id_c1470bc0_prod_lang_css = __webpack_require__("4ce9");
|
|
139829
139859
|
|
|
139830
139860
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
139831
139861
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
@@ -139937,17 +139967,17 @@ function normalizeComponent(
|
|
|
139937
139967
|
|
|
139938
139968
|
var component = normalizeComponent(
|
|
139939
139969
|
components_com_graphicsvue_type_script_lang_js,
|
|
139940
|
-
|
|
139970
|
+
com_graphicsvue_type_template_id_c1470bc0_scoped_true_render,
|
|
139941
139971
|
staticRenderFns,
|
|
139942
139972
|
false,
|
|
139943
139973
|
null,
|
|
139944
|
-
"
|
|
139974
|
+
"c1470bc0",
|
|
139945
139975
|
null
|
|
139946
139976
|
|
|
139947
139977
|
)
|
|
139948
139978
|
|
|
139949
139979
|
/* harmony default export */ var com_graphics = (component.exports);
|
|
139950
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
139980
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"64712493-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=e9d7a15c&scoped=true
|
|
139951
139981
|
var com_flcanvasvue_type_template_id_e9d7a15c_scoped_true_render = function render() {
|
|
139952
139982
|
var _vm = this,
|
|
139953
139983
|
_c = _vm._self._c;
|
|
@@ -144376,7 +144406,7 @@ var com_flcanvas_component = normalizeComponent(
|
|
|
144376
144406
|
)
|
|
144377
144407
|
|
|
144378
144408
|
/* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
|
|
144379
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
144409
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"64712493-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=3fceaac3&scoped=true
|
|
144380
144410
|
var per_controlvue_type_template_id_3fceaac3_scoped_true_render = function render() {
|
|
144381
144411
|
var _vm = this,
|
|
144382
144412
|
_c = _vm._self._c;
|
|
@@ -144490,7 +144520,7 @@ var per_control_component = normalizeComponent(
|
|
|
144490
144520
|
)
|
|
144491
144521
|
|
|
144492
144522
|
/* harmony default export */ var per_control = (per_control_component.exports);
|
|
144493
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
144523
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"64712493-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
|
|
144494
144524
|
var pidvue_type_template_id_2572c0e2_scoped_true_render = function render() {
|
|
144495
144525
|
var _vm = this,
|
|
144496
144526
|
_c = _vm._self._c;
|
|
@@ -144537,7 +144567,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
|
|
|
144537
144567
|
var html2canvas = __webpack_require__("c0e9");
|
|
144538
144568
|
var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
|
|
144539
144569
|
|
|
144540
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
144570
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"64712493-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
|
|
144541
144571
|
var ann_toolvue_type_template_id_4b17bce0_scoped_true_render = function render() {
|
|
144542
144572
|
var _vm = this,
|
|
144543
144573
|
_c = _vm._self._c;
|