fl-web-component 1.0.9 → 1.0.10
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.1.js +3626 -3626
- package/dist/fl-web-component.common.js +1139 -100
- package/dist/fl-web-component.css +1 -1
- package/dist/fl-web-component.umd.1.js +3626 -3626
- package/dist/fl-web-component.umd.js +1139 -100
- package/dist/fl-web-component.umd.min.1.js +2 -2
- package/dist/fl-web-component.umd.min.js +29 -22
- package/package.json +1 -1
- package/packages/components/com-graphics/index.vue +198 -33
- package/packages/components/com-graphics/per-control.vue +1 -1
- package/src/main.js +5 -2
- package/src/utils/instance-parser.js +7 -6
- /package/src/{assets → static/arrow}/arrow-right.png +0 -0
|
@@ -2714,13 +2714,6 @@ Factory_1.Factory.addGetterSetter(TextPath, 'textDecoration', '');
|
|
|
2714
2714
|
Factory_1.Factory.addGetterSetter(TextPath, 'kerningFunc', undefined);
|
|
2715
2715
|
|
|
2716
2716
|
|
|
2717
|
-
/***/ }),
|
|
2718
|
-
|
|
2719
|
-
/***/ "2d3b":
|
|
2720
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2721
|
-
|
|
2722
|
-
// extracted by mini-css-extract-plugin
|
|
2723
|
-
|
|
2724
2717
|
/***/ }),
|
|
2725
2718
|
|
|
2726
2719
|
/***/ "2fb2":
|
|
@@ -2863,13 +2856,6 @@ Factory_1.Factory.addGetterSetter(Ellipse, 'radiusX', 0, (0, Validators_1.getNum
|
|
|
2863
2856
|
Factory_1.Factory.addGetterSetter(Ellipse, 'radiusY', 0, (0, Validators_1.getNumberValidator)());
|
|
2864
2857
|
|
|
2865
2858
|
|
|
2866
|
-
/***/ }),
|
|
2867
|
-
|
|
2868
|
-
/***/ "3846":
|
|
2869
|
-
/***/ (function(module, exports) {
|
|
2870
|
-
|
|
2871
|
-
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAHWlUWHRTb2Z0d2FyZQAAAAAAQWRvYmUgSW1hZ2VSZWFkeQatApcAAAMjaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzE0OCA3OS4xNjQwMzYsIDIwMTkvMDgvMTMtMDE6MDY6NTcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCAyMS4wIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozQTZEQkVBMjIxRjcxMUVEOTlGOEMyREEyQzFENDlGNiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozQTZEQkVBMzIxRjcxMUVEOTlGOEMyREEyQzFENDlGNiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjNBNkRCRUEwMjFGNzExRUQ5OUY4QzJEQTJDMUQ0OUY2IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjNBNkRCRUExMjFGNzExRUQ5OUY4QzJEQTJDMUQ0OUY2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+4creZwAABhhJREFUSIldV0uIHFUUPfe9etVV/Zv0JH6SGTQuwiQTMSqO+EEQURF04U7EjYiCuBGjbhQFXYgrEcSFC1H3sxIRf5EERchSFM0kIRqZwQwzmu6Z7q6uz6vrou6dKiwo+tX73M+55953m1ZWE4PqYQABAAcgB1AAiGW+lLkAAAHIABhZzwBEAGYyDmUPiQwvY5YXEEGQhbJxoGwcDAC0RfFMBLVFMcn5RAwuAVgAqfyqUzrvVbl6UIrVubxGLG/JmpM5lv3txt52wwkjxipqgSjkxlkAYFWs1tsGVEaEzmRzD8CcCJ6KoaG8pXjTl7VcFLVkrAoD2Vco1EaU5iKwkEOQb4UtRBXHDoD5BvwsZ1gM3EEdNn31KQGYpscsELVFwVCEXdM45ERpLGOgiq+R+Uzm9gMYAZiI0V1UcVfCJuqxkqnbgCZCzQGFNEKDmSLEyli9LsWQCDV/VH4ge9D0OBSrShl3UMU0BMNTCccWXYFyAqBjPMZskDChJ5578boUo8rGN8QpAKBAlAeomW0ERvWArGdfGopNgdA7GADX2QIpCI48WrBgJrQkLKXAnIgjyuhc1noKdY6aWJoqFkCXGNbm7P9eds8MF81DR05nb7amnOct8kWIuT/udm/t2yh/OvRL8UnWoWuY9lKsJzJKVCzPxLmWhiMQWKeoUqEtllZQMywY0zzG9cP9ZvnifeHbS9+n70W75Wh00C6PD9ilq9fZpXDKkwMX/Zdpl+ZBmKBieht1mqliNYxoZTWJxYquKHRicQ8AUYkoSJk2bnXPX745eGKwVZ5fOpW+F054PFq0x8890DqZObSOncne33+p+GLWMwdAKAFsoM75XdT5PQbAtLKa9BowdwAMBJI+gAiEOVPAuoR5/Tb39J+3BI8NtsoLS6eyd6NR+c/wBnvH7w+Gr2SOouXT2bvzf/jvZj3qg7AtChWBQmI+A1DQymoSSvBjIZd63pV3DoTIFJh3E766fnvw1J8n3GPzm/7ckTP5B/Go3Bou2OO/PRy+7gMKjp3K3pjb8N9kXRqAsSmKJqJ4KIjOaGU10XztC9ULVAWgJwYdAnAQBEMeQTwqr2zc4h6/eKd7cu7f8vKRM9lHnW3+a3KArv310dY7aUjRsdPZa/vW/Xd5TP5/7L4qhqBZQDLUl4ERuJ2mGwMUFCjziPrJPrqWAES7PDQeCVvmZM4e8o6iVgEfZDxjgkF9weSoyqjeBYlWEv0NhY2ZWNkBkDNhx80YYPCF+8OXtxbtiYW14vRNZ/OPbcazzWPu4XP3uufihCfHv05faO3w5bRLA2JcEVbrdZqKU6GmE4R1bdT3cApgzISBm/G/AOYv3h+e3FqwJxbW/A+HK6XjzaPukXP3uufiGafHv85ei0b8V9qjmBhTkVOgLqHaUHDQgDhu5FwosMDmGPqQepfuCl/cXjC3Lq4V3994Nv+UGO7KcvDo+Xvcs3HCk+Vv0jejEV9Ie9QHY1e81FCypJc2BFZbHW179sokAE+M3BbsL62EL20vmtsX1oqvbjybf0iMzs5Bc/T8PeGzUcLj5W/TV+MRb6Y92gfGTkOWhmwonPGKgnYIRjZ1UXciUyY4HxAP1v2PQcHjhZ+Lz7yjfhkgcgmvL6wVnw8u+zPRkC/MujRPjH8kZCHqu3qK+tqditdGK5eVTX2BXAnXA6FtM2ZbYJy36HBpMQCQGA/jUh75ALYIqUW8Vw4L+U0AbKPuxzSXGVKrtWoFqMtaLO8EDOMddb2r2h5iXAVQsgFnMRkAjip49crLBdqJfDtBU6/fGRo9V4I6b7XBm6Bu/LSlyVGVQeVEIGeVrV7WVZFvzEN+98ilSV2gfhLU7FZ4lDRKPoeamLsNb/V20/67EB3a/uYKtbYlthEfRlU8jMAP2aNh0DT0qMiYou6Zx6irlfbXaOxnhVr/Kahgi4pkepP0URcCJZDCTOKtb4RE4dcwOfnWZrIA4NVjRt3iBqjj60R5R6yeoe4ak0Z4tLvUOq+oFI15LU57/yS0J9Kqor1Rs8TtoL4uFX4lj5bDiQjW9oZlXYkFVdpUrI/GQJVmYkyToYqKcmEvbv/7VkVlY7z3/Acev8pOdpGW/AAAAABJRU5ErkJggg=="
|
|
2872
|
-
|
|
2873
2859
|
/***/ }),
|
|
2874
2860
|
|
|
2875
2861
|
/***/ "3c96":
|
|
@@ -4653,6 +4639,17 @@ function _setPrototypeOf(t, e) {
|
|
|
4653
4639
|
}
|
|
4654
4640
|
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4655
4641
|
|
|
4642
|
+
/***/ }),
|
|
4643
|
+
|
|
4644
|
+
/***/ "52b4":
|
|
4645
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4646
|
+
|
|
4647
|
+
"use strict";
|
|
4648
|
+
/* 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_6e37e043_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("acad");
|
|
4649
|
+
/* 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_6e37e043_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_6e37e043_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
4650
|
+
/* unused harmony reexport * */
|
|
4651
|
+
|
|
4652
|
+
|
|
4656
4653
|
/***/ }),
|
|
4657
4654
|
|
|
4658
4655
|
/***/ "5414":
|
|
@@ -11190,14 +11187,10 @@ module.exports = toPropertyKey, module.exports.__esModule = true, module.exports
|
|
|
11190
11187
|
|
|
11191
11188
|
/***/ }),
|
|
11192
11189
|
|
|
11193
|
-
/***/ "
|
|
11194
|
-
/***/ (function(module,
|
|
11195
|
-
|
|
11196
|
-
"use strict";
|
|
11197
|
-
/* 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_dd89824e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2d3b");
|
|
11198
|
-
/* 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_dd89824e_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_dd89824e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
11199
|
-
/* unused harmony reexport * */
|
|
11190
|
+
/***/ "acad":
|
|
11191
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11200
11192
|
|
|
11193
|
+
// extracted by mini-css-extract-plugin
|
|
11201
11194
|
|
|
11202
11195
|
/***/ }),
|
|
11203
11196
|
|
|
@@ -11215,6 +11208,17 @@ function _construct(t, e, r) {
|
|
|
11215
11208
|
}
|
|
11216
11209
|
module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
11217
11210
|
|
|
11211
|
+
/***/ }),
|
|
11212
|
+
|
|
11213
|
+
/***/ "b2fd":
|
|
11214
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
11215
|
+
|
|
11216
|
+
"use strict";
|
|
11217
|
+
/* 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_per_control_vue_vue_type_style_index_0_id_f547d5c6_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("e24a");
|
|
11218
|
+
/* 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_per_control_vue_vue_type_style_index_0_id_f547d5c6_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_per_control_vue_vue_type_style_index_0_id_f547d5c6_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
11219
|
+
/* unused harmony reexport * */
|
|
11220
|
+
|
|
11221
|
+
|
|
11218
11222
|
/***/ }),
|
|
11219
11223
|
|
|
11220
11224
|
/***/ "b33b":
|
|
@@ -13818,6 +13822,13 @@ if (Global_1.Konva.isBrowser) {
|
|
|
13818
13822
|
}
|
|
13819
13823
|
|
|
13820
13824
|
|
|
13825
|
+
/***/ }),
|
|
13826
|
+
|
|
13827
|
+
/***/ "e24a":
|
|
13828
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
13829
|
+
|
|
13830
|
+
// extracted by mini-css-extract-plugin
|
|
13831
|
+
|
|
13821
13832
|
/***/ }),
|
|
13822
13833
|
|
|
13823
13834
|
/***/ "e3af":
|
|
@@ -16125,8 +16136,8 @@ if (typeof window !== 'undefined') {
|
|
|
16125
16136
|
// Indicate to webpack that this file can be concatenated
|
|
16126
16137
|
/* harmony default export */ var setPublicPath = (null);
|
|
16127
16138
|
|
|
16128
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
16129
|
-
var
|
|
16139
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4217f59c-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=6e37e043&scoped=true
|
|
16140
|
+
var com_graphicsvue_type_template_id_6e37e043_scoped_true_render = function render() {
|
|
16130
16141
|
var _vm = this,
|
|
16131
16142
|
_c = _vm._self._c;
|
|
16132
16143
|
return _c('div', {
|
|
@@ -16137,7 +16148,7 @@ var com_graphicsvue_type_template_id_dd89824e_scoped_true_render = function rend
|
|
|
16137
16148
|
};
|
|
16138
16149
|
var staticRenderFns = [];
|
|
16139
16150
|
|
|
16140
|
-
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=
|
|
16151
|
+
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=6e37e043&scoped=true
|
|
16141
16152
|
|
|
16142
16153
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
16143
16154
|
var slicedToArray = __webpack_require__("278c");
|
|
@@ -38159,6 +38170,755 @@ function onPointerlockError() {
|
|
|
38159
38170
|
console.error('THREE.PointerLockControls: Unable to use Pointer Lock API');
|
|
38160
38171
|
}
|
|
38161
38172
|
|
|
38173
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js
|
|
38174
|
+
var helpers_typeof = __webpack_require__("7037");
|
|
38175
|
+
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
|
|
38176
|
+
|
|
38177
|
+
// CONCATENATED MODULE: ./node_modules/three/examples/jsm/libs/lil-gui.module.min.js
|
|
38178
|
+
|
|
38179
|
+
|
|
38180
|
+
|
|
38181
|
+
|
|
38182
|
+
|
|
38183
|
+
|
|
38184
|
+
|
|
38185
|
+
function lil_gui_module_min_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, lil_gui_module_min_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }
|
|
38186
|
+
function lil_gui_module_min_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (lil_gui_module_min_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
38187
|
+
/**
|
|
38188
|
+
* lil-gui
|
|
38189
|
+
* https://lil-gui.georgealways.com
|
|
38190
|
+
* @version 0.17.0
|
|
38191
|
+
* @author George Michael Brower
|
|
38192
|
+
* @license MIT
|
|
38193
|
+
*/
|
|
38194
|
+
var lil_gui_module_min_t = /*#__PURE__*/function () {
|
|
38195
|
+
function t(i, e, s, n) {
|
|
38196
|
+
var l = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "div";
|
|
38197
|
+
classCallCheck_default()(this, t);
|
|
38198
|
+
this.parent = i, this.object = e, this.property = s, this._disabled = !1, this._hidden = !1, this.initialValue = this.getValue(), this.domElement = document.createElement("div"), this.domElement.classList.add("controller"), this.domElement.classList.add(n), this.$name = document.createElement("div"), this.$name.classList.add("name"), t.nextNameID = t.nextNameID || 0, this.$name.id = "lil-gui-name-" + ++t.nextNameID, this.$widget = document.createElement(l), this.$widget.classList.add("widget"), this.$disable = this.$widget, this.domElement.appendChild(this.$name), this.domElement.appendChild(this.$widget), this.parent.children.push(this), this.parent.controllers.push(this), this.parent.$children.appendChild(this.domElement), this._listenCallback = this._listenCallback.bind(this), this.name(s);
|
|
38199
|
+
}
|
|
38200
|
+
return createClass_default()(t, [{
|
|
38201
|
+
key: "name",
|
|
38202
|
+
value: function name(_t) {
|
|
38203
|
+
return this._name = _t, this.$name.innerHTML = _t, this;
|
|
38204
|
+
}
|
|
38205
|
+
}, {
|
|
38206
|
+
key: "onChange",
|
|
38207
|
+
value: function onChange(_t2) {
|
|
38208
|
+
return this._onChange = _t2, this;
|
|
38209
|
+
}
|
|
38210
|
+
}, {
|
|
38211
|
+
key: "_callOnChange",
|
|
38212
|
+
value: function _callOnChange() {
|
|
38213
|
+
this.parent._callOnChange(this), void 0 !== this._onChange && this._onChange.call(this, this.getValue()), this._changed = !0;
|
|
38214
|
+
}
|
|
38215
|
+
}, {
|
|
38216
|
+
key: "onFinishChange",
|
|
38217
|
+
value: function onFinishChange(_t3) {
|
|
38218
|
+
return this._onFinishChange = _t3, this;
|
|
38219
|
+
}
|
|
38220
|
+
}, {
|
|
38221
|
+
key: "_callOnFinishChange",
|
|
38222
|
+
value: function _callOnFinishChange() {
|
|
38223
|
+
this._changed && (this.parent._callOnFinishChange(this), void 0 !== this._onFinishChange && this._onFinishChange.call(this, this.getValue())), this._changed = !1;
|
|
38224
|
+
}
|
|
38225
|
+
}, {
|
|
38226
|
+
key: "reset",
|
|
38227
|
+
value: function reset() {
|
|
38228
|
+
return this.setValue(this.initialValue), this._callOnFinishChange(), this;
|
|
38229
|
+
}
|
|
38230
|
+
}, {
|
|
38231
|
+
key: "enable",
|
|
38232
|
+
value: function enable() {
|
|
38233
|
+
var _t4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
38234
|
+
return this.disable(!_t4);
|
|
38235
|
+
}
|
|
38236
|
+
}, {
|
|
38237
|
+
key: "disable",
|
|
38238
|
+
value: function disable() {
|
|
38239
|
+
var _t5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
38240
|
+
return _t5 === this._disabled || (this._disabled = _t5, this.domElement.classList.toggle("disabled", _t5), this.$disable.toggleAttribute("disabled", _t5)), this;
|
|
38241
|
+
}
|
|
38242
|
+
}, {
|
|
38243
|
+
key: "show",
|
|
38244
|
+
value: function show() {
|
|
38245
|
+
var _t6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
38246
|
+
return this._hidden = !_t6, this.domElement.style.display = this._hidden ? "none" : "", this;
|
|
38247
|
+
}
|
|
38248
|
+
}, {
|
|
38249
|
+
key: "hide",
|
|
38250
|
+
value: function hide() {
|
|
38251
|
+
return this.show(!1);
|
|
38252
|
+
}
|
|
38253
|
+
}, {
|
|
38254
|
+
key: "options",
|
|
38255
|
+
value: function options(_t7) {
|
|
38256
|
+
var i = this.parent.add(this.object, this.property, _t7);
|
|
38257
|
+
return i.name(this._name), this.destroy(), i;
|
|
38258
|
+
}
|
|
38259
|
+
}, {
|
|
38260
|
+
key: "min",
|
|
38261
|
+
value: function min(_t8) {
|
|
38262
|
+
return this;
|
|
38263
|
+
}
|
|
38264
|
+
}, {
|
|
38265
|
+
key: "max",
|
|
38266
|
+
value: function max(_t9) {
|
|
38267
|
+
return this;
|
|
38268
|
+
}
|
|
38269
|
+
}, {
|
|
38270
|
+
key: "step",
|
|
38271
|
+
value: function step(_t0) {
|
|
38272
|
+
return this;
|
|
38273
|
+
}
|
|
38274
|
+
}, {
|
|
38275
|
+
key: "decimals",
|
|
38276
|
+
value: function decimals(_t1) {
|
|
38277
|
+
return this;
|
|
38278
|
+
}
|
|
38279
|
+
}, {
|
|
38280
|
+
key: "listen",
|
|
38281
|
+
value: function listen() {
|
|
38282
|
+
var _t10 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
38283
|
+
return this._listening = _t10, void 0 !== this._listenCallbackID && (cancelAnimationFrame(this._listenCallbackID), this._listenCallbackID = void 0), this._listening && this._listenCallback(), this;
|
|
38284
|
+
}
|
|
38285
|
+
}, {
|
|
38286
|
+
key: "_listenCallback",
|
|
38287
|
+
value: function _listenCallback() {
|
|
38288
|
+
this._listenCallbackID = requestAnimationFrame(this._listenCallback);
|
|
38289
|
+
var _t11 = this.save();
|
|
38290
|
+
_t11 !== this._listenPrevValue && this.updateDisplay(), this._listenPrevValue = _t11;
|
|
38291
|
+
}
|
|
38292
|
+
}, {
|
|
38293
|
+
key: "getValue",
|
|
38294
|
+
value: function getValue() {
|
|
38295
|
+
return this.object[this.property];
|
|
38296
|
+
}
|
|
38297
|
+
}, {
|
|
38298
|
+
key: "setValue",
|
|
38299
|
+
value: function setValue(_t12) {
|
|
38300
|
+
return this.object[this.property] = _t12, this._callOnChange(), this.updateDisplay(), this;
|
|
38301
|
+
}
|
|
38302
|
+
}, {
|
|
38303
|
+
key: "updateDisplay",
|
|
38304
|
+
value: function updateDisplay() {
|
|
38305
|
+
return this;
|
|
38306
|
+
}
|
|
38307
|
+
}, {
|
|
38308
|
+
key: "load",
|
|
38309
|
+
value: function load(_t13) {
|
|
38310
|
+
return this.setValue(_t13), this._callOnFinishChange(), this;
|
|
38311
|
+
}
|
|
38312
|
+
}, {
|
|
38313
|
+
key: "save",
|
|
38314
|
+
value: function save() {
|
|
38315
|
+
return this.getValue();
|
|
38316
|
+
}
|
|
38317
|
+
}, {
|
|
38318
|
+
key: "destroy",
|
|
38319
|
+
value: function destroy() {
|
|
38320
|
+
this.listen(!1), this.parent.children.splice(this.parent.children.indexOf(this), 1), this.parent.controllers.splice(this.parent.controllers.indexOf(this), 1), this.parent.$children.removeChild(this.domElement);
|
|
38321
|
+
}
|
|
38322
|
+
}]);
|
|
38323
|
+
}();
|
|
38324
|
+
var lil_gui_module_min_i = /*#__PURE__*/function (_t14) {
|
|
38325
|
+
function i(t, _i, e) {
|
|
38326
|
+
var _this;
|
|
38327
|
+
classCallCheck_default()(this, i);
|
|
38328
|
+
_this = lil_gui_module_min_callSuper(this, i, [t, _i, e, "boolean", "label"]), _this.$input = document.createElement("input"), _this.$input.setAttribute("type", "checkbox"), _this.$input.setAttribute("aria-labelledby", _this.$name.id), _this.$widget.appendChild(_this.$input), _this.$input.addEventListener("change", function () {
|
|
38329
|
+
_this.setValue(_this.$input.checked), _this._callOnFinishChange();
|
|
38330
|
+
}), _this.$disable = _this.$input, _this.updateDisplay();
|
|
38331
|
+
return _this;
|
|
38332
|
+
}
|
|
38333
|
+
inherits_default()(i, _t14);
|
|
38334
|
+
return createClass_default()(i, [{
|
|
38335
|
+
key: "updateDisplay",
|
|
38336
|
+
value: function updateDisplay() {
|
|
38337
|
+
return this.$input.checked = this.getValue(), this;
|
|
38338
|
+
}
|
|
38339
|
+
}]);
|
|
38340
|
+
}(lil_gui_module_min_t);
|
|
38341
|
+
function lil_gui_module_min_e(t) {
|
|
38342
|
+
var i, e;
|
|
38343
|
+
return (i = t.match(/(#|0x)?([a-f0-9]{6})/i)) ? e = i[2] : (i = t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/)) ? e = parseInt(i[1]).toString(16).padStart(2, 0) + parseInt(i[2]).toString(16).padStart(2, 0) + parseInt(i[3]).toString(16).padStart(2, 0) : (i = t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i)) && (e = i[1] + i[1] + i[2] + i[2] + i[3] + i[3]), !!e && "#" + e;
|
|
38344
|
+
}
|
|
38345
|
+
var lil_gui_module_min_s = {
|
|
38346
|
+
isPrimitive: !0,
|
|
38347
|
+
match: function match(t) {
|
|
38348
|
+
return "string" == typeof t;
|
|
38349
|
+
},
|
|
38350
|
+
fromHexString: lil_gui_module_min_e,
|
|
38351
|
+
toHexString: lil_gui_module_min_e
|
|
38352
|
+
},
|
|
38353
|
+
lil_gui_module_min_n = {
|
|
38354
|
+
isPrimitive: !0,
|
|
38355
|
+
match: function match(t) {
|
|
38356
|
+
return "number" == typeof t;
|
|
38357
|
+
},
|
|
38358
|
+
fromHexString: function fromHexString(t) {
|
|
38359
|
+
return parseInt(t.substring(1), 16);
|
|
38360
|
+
},
|
|
38361
|
+
toHexString: function toHexString(t) {
|
|
38362
|
+
return "#" + t.toString(16).padStart(6, 0);
|
|
38363
|
+
}
|
|
38364
|
+
},
|
|
38365
|
+
lil_gui_module_min_l = {
|
|
38366
|
+
isPrimitive: !1,
|
|
38367
|
+
match: Array.isArray,
|
|
38368
|
+
fromHexString: function fromHexString(t, i) {
|
|
38369
|
+
var e = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
38370
|
+
var s = lil_gui_module_min_n.fromHexString(t);
|
|
38371
|
+
i[0] = (s >> 16 & 255) / 255 * e, i[1] = (s >> 8 & 255) / 255 * e, i[2] = (255 & s) / 255 * e;
|
|
38372
|
+
},
|
|
38373
|
+
toHexString: function toHexString(_ref) {
|
|
38374
|
+
var _ref2 = slicedToArray_default()(_ref, 3),
|
|
38375
|
+
t = _ref2[0],
|
|
38376
|
+
i = _ref2[1],
|
|
38377
|
+
e = _ref2[2];
|
|
38378
|
+
var s = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
38379
|
+
return lil_gui_module_min_n.toHexString(t * (s = 255 / s) << 16 ^ i * s << 8 ^ e * s << 0);
|
|
38380
|
+
}
|
|
38381
|
+
},
|
|
38382
|
+
lil_gui_module_min_r = {
|
|
38383
|
+
isPrimitive: !1,
|
|
38384
|
+
match: function match(t) {
|
|
38385
|
+
return Object(t) === t;
|
|
38386
|
+
},
|
|
38387
|
+
fromHexString: function fromHexString(t, i) {
|
|
38388
|
+
var e = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
38389
|
+
var s = lil_gui_module_min_n.fromHexString(t);
|
|
38390
|
+
i.r = (s >> 16 & 255) / 255 * e, i.g = (s >> 8 & 255) / 255 * e, i.b = (255 & s) / 255 * e;
|
|
38391
|
+
},
|
|
38392
|
+
toHexString: function toHexString(_ref3) {
|
|
38393
|
+
var t = _ref3.r,
|
|
38394
|
+
i = _ref3.g,
|
|
38395
|
+
e = _ref3.b;
|
|
38396
|
+
var s = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
38397
|
+
return lil_gui_module_min_n.toHexString(t * (s = 255 / s) << 16 ^ i * s << 8 ^ e * s << 0);
|
|
38398
|
+
}
|
|
38399
|
+
},
|
|
38400
|
+
lil_gui_module_min_o = [lil_gui_module_min_s, lil_gui_module_min_n, lil_gui_module_min_l, lil_gui_module_min_r];
|
|
38401
|
+
var lil_gui_module_min_a = /*#__PURE__*/function (_t15) {
|
|
38402
|
+
function a(t, i, s, n) {
|
|
38403
|
+
var _this2;
|
|
38404
|
+
classCallCheck_default()(this, a);
|
|
38405
|
+
var l;
|
|
38406
|
+
_this2 = lil_gui_module_min_callSuper(this, a, [t, i, s, "color"]), _this2.$input = document.createElement("input"), _this2.$input.setAttribute("type", "color"), _this2.$input.setAttribute("tabindex", -1), _this2.$input.setAttribute("aria-labelledby", _this2.$name.id), _this2.$text = document.createElement("input"), _this2.$text.setAttribute("type", "text"), _this2.$text.setAttribute("spellcheck", "false"), _this2.$text.setAttribute("aria-labelledby", _this2.$name.id), _this2.$display = document.createElement("div"), _this2.$display.classList.add("display"), _this2.$display.appendChild(_this2.$input), _this2.$widget.appendChild(_this2.$display), _this2.$widget.appendChild(_this2.$text), _this2._format = (l = _this2.initialValue, lil_gui_module_min_o.find(function (t) {
|
|
38407
|
+
return t.match(l);
|
|
38408
|
+
})), _this2._rgbScale = n, _this2._initialValueHexString = _this2.save(), _this2._textFocused = !1, _this2.$input.addEventListener("input", function () {
|
|
38409
|
+
_this2._setValueFromHexString(_this2.$input.value);
|
|
38410
|
+
}), _this2.$input.addEventListener("blur", function () {
|
|
38411
|
+
_this2._callOnFinishChange();
|
|
38412
|
+
}), _this2.$text.addEventListener("input", function () {
|
|
38413
|
+
var t = lil_gui_module_min_e(_this2.$text.value);
|
|
38414
|
+
t && _this2._setValueFromHexString(t);
|
|
38415
|
+
}), _this2.$text.addEventListener("focus", function () {
|
|
38416
|
+
_this2._textFocused = !0, _this2.$text.select();
|
|
38417
|
+
}), _this2.$text.addEventListener("blur", function () {
|
|
38418
|
+
_this2._textFocused = !1, _this2.updateDisplay(), _this2._callOnFinishChange();
|
|
38419
|
+
}), _this2.$disable = _this2.$text, _this2.updateDisplay();
|
|
38420
|
+
return _this2;
|
|
38421
|
+
}
|
|
38422
|
+
inherits_default()(a, _t15);
|
|
38423
|
+
return createClass_default()(a, [{
|
|
38424
|
+
key: "reset",
|
|
38425
|
+
value: function reset() {
|
|
38426
|
+
return this._setValueFromHexString(this._initialValueHexString), this;
|
|
38427
|
+
}
|
|
38428
|
+
}, {
|
|
38429
|
+
key: "_setValueFromHexString",
|
|
38430
|
+
value: function _setValueFromHexString(t) {
|
|
38431
|
+
if (this._format.isPrimitive) {
|
|
38432
|
+
var _i2 = this._format.fromHexString(t);
|
|
38433
|
+
this.setValue(_i2);
|
|
38434
|
+
} else this._format.fromHexString(t, this.getValue(), this._rgbScale), this._callOnChange(), this.updateDisplay();
|
|
38435
|
+
}
|
|
38436
|
+
}, {
|
|
38437
|
+
key: "save",
|
|
38438
|
+
value: function save() {
|
|
38439
|
+
return this._format.toHexString(this.getValue(), this._rgbScale);
|
|
38440
|
+
}
|
|
38441
|
+
}, {
|
|
38442
|
+
key: "load",
|
|
38443
|
+
value: function load(t) {
|
|
38444
|
+
return this._setValueFromHexString(t), this._callOnFinishChange(), this;
|
|
38445
|
+
}
|
|
38446
|
+
}, {
|
|
38447
|
+
key: "updateDisplay",
|
|
38448
|
+
value: function updateDisplay() {
|
|
38449
|
+
return this.$input.value = this._format.toHexString(this.getValue(), this._rgbScale), this._textFocused || (this.$text.value = this.$input.value.substring(1)), this.$display.style.backgroundColor = this.$input.value, this;
|
|
38450
|
+
}
|
|
38451
|
+
}]);
|
|
38452
|
+
}(lil_gui_module_min_t);
|
|
38453
|
+
var lil_gui_module_min_h = /*#__PURE__*/function (_t16) {
|
|
38454
|
+
function h(t, i, e) {
|
|
38455
|
+
var _this3;
|
|
38456
|
+
classCallCheck_default()(this, h);
|
|
38457
|
+
_this3 = lil_gui_module_min_callSuper(this, h, [t, i, e, "function"]), _this3.$button = document.createElement("button"), _this3.$button.appendChild(_this3.$name), _this3.$widget.appendChild(_this3.$button), _this3.$button.addEventListener("click", function (t) {
|
|
38458
|
+
t.preventDefault(), _this3.getValue().call(_this3.object);
|
|
38459
|
+
}), _this3.$button.addEventListener("touchstart", function () {}, {
|
|
38460
|
+
passive: !0
|
|
38461
|
+
}), _this3.$disable = _this3.$button;
|
|
38462
|
+
return _this3;
|
|
38463
|
+
}
|
|
38464
|
+
inherits_default()(h, _t16);
|
|
38465
|
+
return createClass_default()(h);
|
|
38466
|
+
}(lil_gui_module_min_t);
|
|
38467
|
+
var lil_gui_module_min_d = /*#__PURE__*/function (_t17) {
|
|
38468
|
+
function d(t, i, e, s, n, l) {
|
|
38469
|
+
var _this4;
|
|
38470
|
+
classCallCheck_default()(this, d);
|
|
38471
|
+
_this4 = lil_gui_module_min_callSuper(this, d, [t, i, e, "number"]), _this4._initInput(), _this4.min(s), _this4.max(n);
|
|
38472
|
+
var r = void 0 !== l;
|
|
38473
|
+
_this4.step(r ? l : _this4._getImplicitStep(), r), _this4.updateDisplay();
|
|
38474
|
+
return _this4;
|
|
38475
|
+
}
|
|
38476
|
+
inherits_default()(d, _t17);
|
|
38477
|
+
return createClass_default()(d, [{
|
|
38478
|
+
key: "decimals",
|
|
38479
|
+
value: function decimals(t) {
|
|
38480
|
+
return this._decimals = t, this.updateDisplay(), this;
|
|
38481
|
+
}
|
|
38482
|
+
}, {
|
|
38483
|
+
key: "min",
|
|
38484
|
+
value: function min(t) {
|
|
38485
|
+
return this._min = t, this._onUpdateMinMax(), this;
|
|
38486
|
+
}
|
|
38487
|
+
}, {
|
|
38488
|
+
key: "max",
|
|
38489
|
+
value: function max(t) {
|
|
38490
|
+
return this._max = t, this._onUpdateMinMax(), this;
|
|
38491
|
+
}
|
|
38492
|
+
}, {
|
|
38493
|
+
key: "step",
|
|
38494
|
+
value: function step(t) {
|
|
38495
|
+
var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
38496
|
+
return this._step = t, this._stepExplicit = i, this;
|
|
38497
|
+
}
|
|
38498
|
+
}, {
|
|
38499
|
+
key: "updateDisplay",
|
|
38500
|
+
value: function updateDisplay() {
|
|
38501
|
+
var t = this.getValue();
|
|
38502
|
+
if (this._hasSlider) {
|
|
38503
|
+
var _i3 = (t - this._min) / (this._max - this._min);
|
|
38504
|
+
_i3 = Math.max(0, Math.min(_i3, 1)), this.$fill.style.width = 100 * _i3 + "%";
|
|
38505
|
+
}
|
|
38506
|
+
return this._inputFocused || (this.$input.value = void 0 === this._decimals ? t : t.toFixed(this._decimals)), this;
|
|
38507
|
+
}
|
|
38508
|
+
}, {
|
|
38509
|
+
key: "_initInput",
|
|
38510
|
+
value: function _initInput() {
|
|
38511
|
+
var _this5 = this;
|
|
38512
|
+
this.$input = document.createElement("input"), this.$input.setAttribute("type", "number"), this.$input.setAttribute("step", "any"), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$widget.appendChild(this.$input), this.$disable = this.$input;
|
|
38513
|
+
var t = function t(_t18) {
|
|
38514
|
+
var i = parseFloat(_this5.$input.value);
|
|
38515
|
+
isNaN(i) || (_this5._snapClampSetValue(i + _t18), _this5.$input.value = _this5.getValue());
|
|
38516
|
+
};
|
|
38517
|
+
var i,
|
|
38518
|
+
e,
|
|
38519
|
+
s,
|
|
38520
|
+
n,
|
|
38521
|
+
l,
|
|
38522
|
+
r = !1;
|
|
38523
|
+
var o = function o(t) {
|
|
38524
|
+
if (r) {
|
|
38525
|
+
var _s = t.clientX - i,
|
|
38526
|
+
_n = t.clientY - e;
|
|
38527
|
+
Math.abs(_n) > 5 ? (t.preventDefault(), _this5.$input.blur(), r = !1, _this5._setDraggingStyle(!0, "vertical")) : Math.abs(_s) > 5 && _a();
|
|
38528
|
+
}
|
|
38529
|
+
if (!r) {
|
|
38530
|
+
var _i4 = t.clientY - s;
|
|
38531
|
+
l -= _i4 * _this5._step * _this5._arrowKeyMultiplier(t), n + l > _this5._max ? l = _this5._max - n : n + l < _this5._min && (l = _this5._min - n), _this5._snapClampSetValue(n + l);
|
|
38532
|
+
}
|
|
38533
|
+
s = t.clientY;
|
|
38534
|
+
},
|
|
38535
|
+
_a = function a() {
|
|
38536
|
+
_this5._setDraggingStyle(!1, "vertical"), _this5._callOnFinishChange(), window.removeEventListener("mousemove", o), window.removeEventListener("mouseup", _a);
|
|
38537
|
+
};
|
|
38538
|
+
this.$input.addEventListener("input", function () {
|
|
38539
|
+
var t = parseFloat(_this5.$input.value);
|
|
38540
|
+
isNaN(t) || (_this5._stepExplicit && (t = _this5._snap(t)), _this5.setValue(_this5._clamp(t)));
|
|
38541
|
+
}), this.$input.addEventListener("keydown", function (i) {
|
|
38542
|
+
"Enter" === i.code && _this5.$input.blur(), "ArrowUp" === i.code && (i.preventDefault(), t(_this5._step * _this5._arrowKeyMultiplier(i))), "ArrowDown" === i.code && (i.preventDefault(), t(_this5._step * _this5._arrowKeyMultiplier(i) * -1));
|
|
38543
|
+
}), this.$input.addEventListener("wheel", function (i) {
|
|
38544
|
+
_this5._inputFocused && (i.preventDefault(), t(_this5._step * _this5._normalizeMouseWheel(i)));
|
|
38545
|
+
}, {
|
|
38546
|
+
passive: !1
|
|
38547
|
+
}), this.$input.addEventListener("mousedown", function (t) {
|
|
38548
|
+
i = t.clientX, e = s = t.clientY, r = !0, n = _this5.getValue(), l = 0, window.addEventListener("mousemove", o), window.addEventListener("mouseup", _a);
|
|
38549
|
+
}), this.$input.addEventListener("focus", function () {
|
|
38550
|
+
_this5._inputFocused = !0;
|
|
38551
|
+
}), this.$input.addEventListener("blur", function () {
|
|
38552
|
+
_this5._inputFocused = !1, _this5.updateDisplay(), _this5._callOnFinishChange();
|
|
38553
|
+
});
|
|
38554
|
+
}
|
|
38555
|
+
}, {
|
|
38556
|
+
key: "_initSlider",
|
|
38557
|
+
value: function _initSlider() {
|
|
38558
|
+
var _this6 = this;
|
|
38559
|
+
this._hasSlider = !0, this.$slider = document.createElement("div"), this.$slider.classList.add("slider"), this.$fill = document.createElement("div"), this.$fill.classList.add("fill"), this.$slider.appendChild(this.$fill), this.$widget.insertBefore(this.$slider, this.$input), this.domElement.classList.add("hasSlider");
|
|
38560
|
+
var t = function t(_t19) {
|
|
38561
|
+
var i = _this6.$slider.getBoundingClientRect();
|
|
38562
|
+
var e = (s = _t19, n = i.left, l = i.right, r = _this6._min, o = _this6._max, (s - n) / (l - n) * (o - r) + r);
|
|
38563
|
+
var s, n, l, r, o;
|
|
38564
|
+
_this6._snapClampSetValue(e);
|
|
38565
|
+
},
|
|
38566
|
+
i = function i(_i5) {
|
|
38567
|
+
t(_i5.clientX);
|
|
38568
|
+
},
|
|
38569
|
+
_e = function e() {
|
|
38570
|
+
_this6._callOnFinishChange(), _this6._setDraggingStyle(!1), window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", _e);
|
|
38571
|
+
};
|
|
38572
|
+
var s,
|
|
38573
|
+
n,
|
|
38574
|
+
l = !1;
|
|
38575
|
+
var r = function r(i) {
|
|
38576
|
+
i.preventDefault(), _this6._setDraggingStyle(!0), t(i.touches[0].clientX), l = !1;
|
|
38577
|
+
},
|
|
38578
|
+
_o = function o(i) {
|
|
38579
|
+
if (l) {
|
|
38580
|
+
var _t20 = i.touches[0].clientX - s,
|
|
38581
|
+
_e2 = i.touches[0].clientY - n;
|
|
38582
|
+
Math.abs(_t20) > Math.abs(_e2) ? r(i) : (window.removeEventListener("touchmove", _o), window.removeEventListener("touchend", _a2));
|
|
38583
|
+
} else i.preventDefault(), t(i.touches[0].clientX);
|
|
38584
|
+
},
|
|
38585
|
+
_a2 = function a() {
|
|
38586
|
+
_this6._callOnFinishChange(), _this6._setDraggingStyle(!1), window.removeEventListener("touchmove", _o), window.removeEventListener("touchend", _a2);
|
|
38587
|
+
},
|
|
38588
|
+
h = this._callOnFinishChange.bind(this);
|
|
38589
|
+
var _d;
|
|
38590
|
+
this.$slider.addEventListener("mousedown", function (s) {
|
|
38591
|
+
_this6._setDraggingStyle(!0), t(s.clientX), window.addEventListener("mousemove", i), window.addEventListener("mouseup", _e);
|
|
38592
|
+
}), this.$slider.addEventListener("touchstart", function (t) {
|
|
38593
|
+
t.touches.length > 1 || (_this6._hasScrollBar ? (s = t.touches[0].clientX, n = t.touches[0].clientY, l = !0) : r(t), window.addEventListener("touchmove", _o, {
|
|
38594
|
+
passive: !1
|
|
38595
|
+
}), window.addEventListener("touchend", _a2));
|
|
38596
|
+
}, {
|
|
38597
|
+
passive: !1
|
|
38598
|
+
}), this.$slider.addEventListener("wheel", function (t) {
|
|
38599
|
+
if (Math.abs(t.deltaX) < Math.abs(t.deltaY) && _this6._hasScrollBar) return;
|
|
38600
|
+
t.preventDefault();
|
|
38601
|
+
var i = _this6._normalizeMouseWheel(t) * _this6._step;
|
|
38602
|
+
_this6._snapClampSetValue(_this6.getValue() + i), _this6.$input.value = _this6.getValue(), clearTimeout(_d), _d = setTimeout(h, 400);
|
|
38603
|
+
}, {
|
|
38604
|
+
passive: !1
|
|
38605
|
+
});
|
|
38606
|
+
}
|
|
38607
|
+
}, {
|
|
38608
|
+
key: "_setDraggingStyle",
|
|
38609
|
+
value: function _setDraggingStyle(t) {
|
|
38610
|
+
var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "horizontal";
|
|
38611
|
+
this.$slider && this.$slider.classList.toggle("active", t), document.body.classList.toggle("lil-gui-dragging", t), document.body.classList.toggle("lil-gui-" + i, t);
|
|
38612
|
+
}
|
|
38613
|
+
}, {
|
|
38614
|
+
key: "_getImplicitStep",
|
|
38615
|
+
value: function _getImplicitStep() {
|
|
38616
|
+
return this._hasMin && this._hasMax ? (this._max - this._min) / 1e3 : .1;
|
|
38617
|
+
}
|
|
38618
|
+
}, {
|
|
38619
|
+
key: "_onUpdateMinMax",
|
|
38620
|
+
value: function _onUpdateMinMax() {
|
|
38621
|
+
!this._hasSlider && this._hasMin && this._hasMax && (this._stepExplicit || this.step(this._getImplicitStep(), !1), this._initSlider(), this.updateDisplay());
|
|
38622
|
+
}
|
|
38623
|
+
}, {
|
|
38624
|
+
key: "_normalizeMouseWheel",
|
|
38625
|
+
value: function _normalizeMouseWheel(t) {
|
|
38626
|
+
var i = t.deltaX,
|
|
38627
|
+
e = t.deltaY;
|
|
38628
|
+
Math.floor(t.deltaY) !== t.deltaY && t.wheelDelta && (i = 0, e = -t.wheelDelta / 120, e *= this._stepExplicit ? 1 : 10);
|
|
38629
|
+
return i + -e;
|
|
38630
|
+
}
|
|
38631
|
+
}, {
|
|
38632
|
+
key: "_arrowKeyMultiplier",
|
|
38633
|
+
value: function _arrowKeyMultiplier(t) {
|
|
38634
|
+
var i = this._stepExplicit ? 1 : 10;
|
|
38635
|
+
return t.shiftKey ? i *= 10 : t.altKey && (i /= 10), i;
|
|
38636
|
+
}
|
|
38637
|
+
}, {
|
|
38638
|
+
key: "_snap",
|
|
38639
|
+
value: function _snap(t) {
|
|
38640
|
+
var i = Math.round(t / this._step) * this._step;
|
|
38641
|
+
return parseFloat(i.toPrecision(15));
|
|
38642
|
+
}
|
|
38643
|
+
}, {
|
|
38644
|
+
key: "_clamp",
|
|
38645
|
+
value: function _clamp(t) {
|
|
38646
|
+
return t < this._min && (t = this._min), t > this._max && (t = this._max), t;
|
|
38647
|
+
}
|
|
38648
|
+
}, {
|
|
38649
|
+
key: "_snapClampSetValue",
|
|
38650
|
+
value: function _snapClampSetValue(t) {
|
|
38651
|
+
this.setValue(this._clamp(this._snap(t)));
|
|
38652
|
+
}
|
|
38653
|
+
}, {
|
|
38654
|
+
key: "_hasScrollBar",
|
|
38655
|
+
get: function get() {
|
|
38656
|
+
var t = this.parent.root.$children;
|
|
38657
|
+
return t.scrollHeight > t.clientHeight;
|
|
38658
|
+
}
|
|
38659
|
+
}, {
|
|
38660
|
+
key: "_hasMin",
|
|
38661
|
+
get: function get() {
|
|
38662
|
+
return void 0 !== this._min;
|
|
38663
|
+
}
|
|
38664
|
+
}, {
|
|
38665
|
+
key: "_hasMax",
|
|
38666
|
+
get: function get() {
|
|
38667
|
+
return void 0 !== this._max;
|
|
38668
|
+
}
|
|
38669
|
+
}]);
|
|
38670
|
+
}(lil_gui_module_min_t);
|
|
38671
|
+
var lil_gui_module_min_c = /*#__PURE__*/function (_t21) {
|
|
38672
|
+
function c(t, i, e, s) {
|
|
38673
|
+
var _this7;
|
|
38674
|
+
classCallCheck_default()(this, c);
|
|
38675
|
+
_this7 = lil_gui_module_min_callSuper(this, c, [t, i, e, "option"]), _this7.$select = document.createElement("select"), _this7.$select.setAttribute("aria-labelledby", _this7.$name.id), _this7.$display = document.createElement("div"), _this7.$display.classList.add("display"), _this7._values = Array.isArray(s) ? s : Object.values(s), _this7._names = Array.isArray(s) ? s : Object.keys(s), _this7._names.forEach(function (t) {
|
|
38676
|
+
var i = document.createElement("option");
|
|
38677
|
+
i.innerHTML = t, _this7.$select.appendChild(i);
|
|
38678
|
+
}), _this7.$select.addEventListener("change", function () {
|
|
38679
|
+
_this7.setValue(_this7._values[_this7.$select.selectedIndex]), _this7._callOnFinishChange();
|
|
38680
|
+
}), _this7.$select.addEventListener("focus", function () {
|
|
38681
|
+
_this7.$display.classList.add("focus");
|
|
38682
|
+
}), _this7.$select.addEventListener("blur", function () {
|
|
38683
|
+
_this7.$display.classList.remove("focus");
|
|
38684
|
+
}), _this7.$widget.appendChild(_this7.$select), _this7.$widget.appendChild(_this7.$display), _this7.$disable = _this7.$select, _this7.updateDisplay();
|
|
38685
|
+
return _this7;
|
|
38686
|
+
}
|
|
38687
|
+
inherits_default()(c, _t21);
|
|
38688
|
+
return createClass_default()(c, [{
|
|
38689
|
+
key: "updateDisplay",
|
|
38690
|
+
value: function updateDisplay() {
|
|
38691
|
+
var t = this.getValue(),
|
|
38692
|
+
i = this._values.indexOf(t);
|
|
38693
|
+
return this.$select.selectedIndex = i, this.$display.innerHTML = -1 === i ? t : this._names[i], this;
|
|
38694
|
+
}
|
|
38695
|
+
}]);
|
|
38696
|
+
}(lil_gui_module_min_t);
|
|
38697
|
+
var lil_gui_module_min_u = /*#__PURE__*/function (_t22) {
|
|
38698
|
+
function u(t, i, e) {
|
|
38699
|
+
var _this8;
|
|
38700
|
+
classCallCheck_default()(this, u);
|
|
38701
|
+
_this8 = lil_gui_module_min_callSuper(this, u, [t, i, e, "string"]), _this8.$input = document.createElement("input"), _this8.$input.setAttribute("type", "text"), _this8.$input.setAttribute("aria-labelledby", _this8.$name.id), _this8.$input.addEventListener("input", function () {
|
|
38702
|
+
_this8.setValue(_this8.$input.value);
|
|
38703
|
+
}), _this8.$input.addEventListener("keydown", function (t) {
|
|
38704
|
+
"Enter" === t.code && _this8.$input.blur();
|
|
38705
|
+
}), _this8.$input.addEventListener("blur", function () {
|
|
38706
|
+
_this8._callOnFinishChange();
|
|
38707
|
+
}), _this8.$widget.appendChild(_this8.$input), _this8.$disable = _this8.$input, _this8.updateDisplay();
|
|
38708
|
+
return _this8;
|
|
38709
|
+
}
|
|
38710
|
+
inherits_default()(u, _t22);
|
|
38711
|
+
return createClass_default()(u, [{
|
|
38712
|
+
key: "updateDisplay",
|
|
38713
|
+
value: function updateDisplay() {
|
|
38714
|
+
return this.$input.value = this.getValue(), this;
|
|
38715
|
+
}
|
|
38716
|
+
}]);
|
|
38717
|
+
}(lil_gui_module_min_t);
|
|
38718
|
+
var lil_gui_module_min_p = !1;
|
|
38719
|
+
var lil_gui_module_min_g = /*#__PURE__*/function () {
|
|
38720
|
+
function g() {
|
|
38721
|
+
var _this9 = this;
|
|
38722
|
+
var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
38723
|
+
t = _ref4.parent,
|
|
38724
|
+
_ref4$autoPlace = _ref4.autoPlace,
|
|
38725
|
+
i = _ref4$autoPlace === void 0 ? void 0 === t : _ref4$autoPlace,
|
|
38726
|
+
e = _ref4.container,
|
|
38727
|
+
s = _ref4.width,
|
|
38728
|
+
_ref4$title = _ref4.title,
|
|
38729
|
+
n = _ref4$title === void 0 ? "Controls" : _ref4$title,
|
|
38730
|
+
_ref4$injectStyles = _ref4.injectStyles,
|
|
38731
|
+
l = _ref4$injectStyles === void 0 ? !0 : _ref4$injectStyles,
|
|
38732
|
+
_ref4$touchStyles = _ref4.touchStyles,
|
|
38733
|
+
r = _ref4$touchStyles === void 0 ? !0 : _ref4$touchStyles;
|
|
38734
|
+
classCallCheck_default()(this, g);
|
|
38735
|
+
if (this.parent = t, this.root = t ? t.root : this, this.children = [], this.controllers = [], this.folders = [], this._closed = !1, this._hidden = !1, this.domElement = document.createElement("div"), this.domElement.classList.add("lil-gui"), this.$title = document.createElement("div"), this.$title.classList.add("title"), this.$title.setAttribute("role", "button"), this.$title.setAttribute("aria-expanded", !0), this.$title.setAttribute("tabindex", 0), this.$title.addEventListener("click", function () {
|
|
38736
|
+
return _this9.openAnimated(_this9._closed);
|
|
38737
|
+
}), this.$title.addEventListener("keydown", function (t) {
|
|
38738
|
+
"Enter" !== t.code && "Space" !== t.code || (t.preventDefault(), _this9.$title.click());
|
|
38739
|
+
}), this.$title.addEventListener("touchstart", function () {}, {
|
|
38740
|
+
passive: !0
|
|
38741
|
+
}), this.$children = document.createElement("div"), this.$children.classList.add("children"), this.domElement.appendChild(this.$title), this.domElement.appendChild(this.$children), this.title(n), r && this.domElement.classList.add("allow-touch-styles"), this.parent) return this.parent.children.push(this), this.parent.folders.push(this), void this.parent.$children.appendChild(this.domElement);
|
|
38742
|
+
this.domElement.classList.add("root"), !lil_gui_module_min_p && l && (!function (t) {
|
|
38743
|
+
var i = document.createElement("style");
|
|
38744
|
+
i.innerHTML = t;
|
|
38745
|
+
var e = document.querySelector("head link[rel=stylesheet], head style");
|
|
38746
|
+
e ? document.head.insertBefore(i, e) : document.head.appendChild(i);
|
|
38747
|
+
}('.lil-gui{--background-color:#1f1f1f;--text-color:#ebebeb;--title-background-color:#111;--title-text-color:#ebebeb;--widget-color:#424242;--hover-color:#4f4f4f;--focus-color:#595959;--number-color:#2cc9ff;--string-color:#a2db3c;--font-size:11px;--input-font-size:11px;--font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;--font-family-mono:Menlo,Monaco,Consolas,"Droid Sans Mono",monospace;--padding:4px;--spacing:4px;--widget-height:20px;--name-width:45%;--slider-knob-width:2px;--slider-input-width:27%;--color-input-width:27%;--slider-input-min-width:45px;--color-input-min-width:45px;--folder-indent:7px;--widget-padding:0 0 0 3px;--widget-border-radius:2px;--checkbox-size:calc(var(--widget-height)*0.75);--scrollbar-width:5px;background-color:var(--background-color);color:var(--text-color);font-family:var(--font-family);font-size:var(--font-size);font-style:normal;font-weight:400;line-height:1;text-align:left;touch-action:manipulation;user-select:none;-webkit-user-select:none}.lil-gui,.lil-gui *{box-sizing:border-box;margin:0;padding:0}.lil-gui.root{display:flex;flex-direction:column;width:var(--width,245px)}.lil-gui.root>.title{background:var(--title-background-color);color:var(--title-text-color)}.lil-gui.root>.children{overflow-x:hidden;overflow-y:auto}.lil-gui.root>.children::-webkit-scrollbar{background:var(--background-color);height:var(--scrollbar-width);width:var(--scrollbar-width)}.lil-gui.root>.children::-webkit-scrollbar-thumb{background:var(--focus-color);border-radius:var(--scrollbar-width)}.lil-gui.force-touch-styles{--widget-height:28px;--padding:6px;--spacing:6px;--font-size:13px;--input-font-size:16px;--folder-indent:10px;--scrollbar-width:7px;--slider-input-min-width:50px;--color-input-min-width:65px}.lil-gui.autoPlace{max-height:100%;position:fixed;right:15px;top:0;z-index:1001}.lil-gui .controller{align-items:center;display:flex;margin:var(--spacing) 0;padding:0 var(--padding)}.lil-gui .controller.disabled{opacity:.5}.lil-gui .controller.disabled,.lil-gui .controller.disabled *{pointer-events:none!important}.lil-gui .controller>.name{flex-shrink:0;line-height:var(--widget-height);min-width:var(--name-width);padding-right:var(--spacing);white-space:pre}.lil-gui .controller .widget{align-items:center;display:flex;min-height:var(--widget-height);position:relative;width:100%}.lil-gui .controller.string input{color:var(--string-color)}.lil-gui .controller.boolean .widget{cursor:pointer}.lil-gui .controller.color .display{border-radius:var(--widget-border-radius);height:var(--widget-height);position:relative;width:100%}.lil-gui .controller.color input[type=color]{cursor:pointer;height:100%;opacity:0;width:100%}.lil-gui .controller.color input[type=text]{flex-shrink:0;font-family:var(--font-family-mono);margin-left:var(--spacing);min-width:var(--color-input-min-width);width:var(--color-input-width)}.lil-gui .controller.option select{max-width:100%;opacity:0;position:absolute;width:100%}.lil-gui .controller.option .display{background:var(--widget-color);border-radius:var(--widget-border-radius);height:var(--widget-height);line-height:var(--widget-height);max-width:100%;overflow:hidden;padding-left:.55em;padding-right:1.75em;pointer-events:none;position:relative;word-break:break-all}.lil-gui .controller.option .display.active{background:var(--focus-color)}.lil-gui .controller.option .display:after{bottom:0;content:"↕";font-family:lil-gui;padding-right:.375em;position:absolute;right:0;top:0}.lil-gui .controller.option .widget,.lil-gui .controller.option select{cursor:pointer}.lil-gui .controller.number input{color:var(--number-color)}.lil-gui .controller.number.hasSlider input{flex-shrink:0;margin-left:var(--spacing);min-width:var(--slider-input-min-width);width:var(--slider-input-width)}.lil-gui .controller.number .slider{background-color:var(--widget-color);border-radius:var(--widget-border-radius);cursor:ew-resize;height:var(--widget-height);overflow:hidden;padding-right:var(--slider-knob-width);touch-action:pan-y;width:100%}.lil-gui .controller.number .slider.active{background-color:var(--focus-color)}.lil-gui .controller.number .slider.active .fill{opacity:.95}.lil-gui .controller.number .fill{border-right:var(--slider-knob-width) solid var(--number-color);box-sizing:content-box;height:100%}.lil-gui-dragging .lil-gui{--hover-color:var(--widget-color)}.lil-gui-dragging *{cursor:ew-resize!important}.lil-gui-dragging.lil-gui-vertical *{cursor:ns-resize!important}.lil-gui .title{--title-height:calc(var(--widget-height) + var(--spacing)*1.25);-webkit-tap-highlight-color:transparent;text-decoration-skip:objects;cursor:pointer;font-weight:600;height:var(--title-height);line-height:calc(var(--title-height) - 4px);outline:none;padding:0 var(--padding)}.lil-gui .title:before{content:"▾";display:inline-block;font-family:lil-gui;padding-right:2px}.lil-gui .title:active{background:var(--title-background-color);opacity:.75}.lil-gui.root>.title:focus{text-decoration:none!important}.lil-gui.closed>.title:before{content:"▸"}.lil-gui.closed>.children{opacity:0;transform:translateY(-7px)}.lil-gui.closed:not(.transition)>.children{display:none}.lil-gui.transition>.children{overflow:hidden;pointer-events:none;transition-duration:.3s;transition-property:height,opacity,transform;transition-timing-function:cubic-bezier(.2,.6,.35,1)}.lil-gui .children:empty:before{content:"Empty";display:block;font-style:italic;height:var(--widget-height);line-height:var(--widget-height);margin:var(--spacing) 0;opacity:.5;padding:0 var(--padding)}.lil-gui.root>.children>.lil-gui>.title{border-width:0;border-bottom:1px solid var(--widget-color);border-left:0 solid var(--widget-color);border-right:0 solid var(--widget-color);border-top:1px solid var(--widget-color);transition:border-color .3s}.lil-gui.root>.children>.lil-gui.closed>.title{border-bottom-color:transparent}.lil-gui+.controller{border-top:1px solid var(--widget-color);margin-top:0;padding-top:var(--spacing)}.lil-gui .lil-gui .lil-gui>.title{border:none}.lil-gui .lil-gui .lil-gui>.children{border:none;border-left:2px solid var(--widget-color);margin-left:var(--folder-indent)}.lil-gui .lil-gui .controller{border:none}.lil-gui input{-webkit-tap-highlight-color:transparent;background:var(--widget-color);border:0;border-radius:var(--widget-border-radius);color:var(--text-color);font-family:var(--font-family);font-size:var(--input-font-size);height:var(--widget-height);outline:none;width:100%}.lil-gui input:disabled{opacity:1}.lil-gui input[type=number],.lil-gui input[type=text]{padding:var(--widget-padding)}.lil-gui input[type=number]:focus,.lil-gui input[type=text]:focus{background:var(--focus-color)}.lil-gui input::-webkit-inner-spin-button,.lil-gui input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.lil-gui input[type=number]{-moz-appearance:textfield}.lil-gui input[type=checkbox]{appearance:none;-webkit-appearance:none;border-radius:var(--widget-border-radius);cursor:pointer;height:var(--checkbox-size);text-align:center;width:var(--checkbox-size)}.lil-gui input[type=checkbox]:checked:before{content:"✓";font-family:lil-gui;font-size:var(--checkbox-size);line-height:var(--checkbox-size)}.lil-gui button{-webkit-tap-highlight-color:transparent;background:var(--widget-color);border:1px solid var(--widget-color);border-radius:var(--widget-border-radius);color:var(--text-color);cursor:pointer;font-family:var(--font-family);font-size:var(--font-size);height:var(--widget-height);line-height:calc(var(--widget-height) - 4px);outline:none;text-align:center;text-transform:none;width:100%}.lil-gui button:active{background:var(--focus-color)}@font-face{font-family:lil-gui;src:url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff")}@media (pointer:coarse){.lil-gui.allow-touch-styles{--widget-height:28px;--padding:6px;--spacing:6px;--font-size:13px;--input-font-size:16px;--folder-indent:10px;--scrollbar-width:7px;--slider-input-min-width:50px;--color-input-min-width:65px}}@media (hover:hover){.lil-gui .controller.color .display:hover:before{border:1px solid #fff9;border-radius:var(--widget-border-radius);bottom:0;content:" ";display:block;left:0;position:absolute;right:0;top:0}.lil-gui .controller.option .display.focus{background:var(--focus-color)}.lil-gui .controller.option .widget:hover .display{background:var(--hover-color)}.lil-gui .controller.number .slider:hover{background-color:var(--hover-color)}body:not(.lil-gui-dragging) .lil-gui .title:hover{background:var(--title-background-color);opacity:.85}.lil-gui .title:focus{text-decoration:underline var(--focus-color)}.lil-gui input:hover{background:var(--hover-color)}.lil-gui input:active{background:var(--focus-color)}.lil-gui input[type=checkbox]:focus{box-shadow:inset 0 0 0 1px var(--focus-color)}.lil-gui button:hover{background:var(--hover-color);border-color:var(--hover-color)}.lil-gui button:focus{border-color:var(--focus-color)}}'), lil_gui_module_min_p = !0), e ? e.appendChild(this.domElement) : i && (this.domElement.classList.add("autoPlace"), document.body.appendChild(this.domElement)), s && this.domElement.style.setProperty("--width", s + "px"), this.domElement.addEventListener("keydown", function (t) {
|
|
38748
|
+
return t.stopPropagation();
|
|
38749
|
+
}), this.domElement.addEventListener("keyup", function (t) {
|
|
38750
|
+
return t.stopPropagation();
|
|
38751
|
+
});
|
|
38752
|
+
}
|
|
38753
|
+
return createClass_default()(g, [{
|
|
38754
|
+
key: "add",
|
|
38755
|
+
value: function add(t, e, s, n, l) {
|
|
38756
|
+
if (Object(s) === s) return new lil_gui_module_min_c(this, t, e, s);
|
|
38757
|
+
var r = t[e];
|
|
38758
|
+
switch (typeof_default()(r)) {
|
|
38759
|
+
case "number":
|
|
38760
|
+
return new lil_gui_module_min_d(this, t, e, s, n, l);
|
|
38761
|
+
case "boolean":
|
|
38762
|
+
return new lil_gui_module_min_i(this, t, e);
|
|
38763
|
+
case "string":
|
|
38764
|
+
return new lil_gui_module_min_u(this, t, e);
|
|
38765
|
+
case "function":
|
|
38766
|
+
return new lil_gui_module_min_h(this, t, e);
|
|
38767
|
+
}
|
|
38768
|
+
console.error("gui.add failed\n\tproperty:", e, "\n\tobject:", t, "\n\tvalue:", r);
|
|
38769
|
+
}
|
|
38770
|
+
}, {
|
|
38771
|
+
key: "addColor",
|
|
38772
|
+
value: function addColor(t, i) {
|
|
38773
|
+
var e = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
38774
|
+
return new lil_gui_module_min_a(this, t, i, e);
|
|
38775
|
+
}
|
|
38776
|
+
}, {
|
|
38777
|
+
key: "addFolder",
|
|
38778
|
+
value: function addFolder(t) {
|
|
38779
|
+
return new g({
|
|
38780
|
+
parent: this,
|
|
38781
|
+
title: t
|
|
38782
|
+
});
|
|
38783
|
+
}
|
|
38784
|
+
}, {
|
|
38785
|
+
key: "load",
|
|
38786
|
+
value: function load(t) {
|
|
38787
|
+
var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
38788
|
+
return t.controllers && this.controllers.forEach(function (i) {
|
|
38789
|
+
i instanceof lil_gui_module_min_h || i._name in t.controllers && i.load(t.controllers[i._name]);
|
|
38790
|
+
}), i && t.folders && this.folders.forEach(function (i) {
|
|
38791
|
+
i._title in t.folders && i.load(t.folders[i._title]);
|
|
38792
|
+
}), this;
|
|
38793
|
+
}
|
|
38794
|
+
}, {
|
|
38795
|
+
key: "save",
|
|
38796
|
+
value: function save() {
|
|
38797
|
+
var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
38798
|
+
var i = {
|
|
38799
|
+
controllers: {},
|
|
38800
|
+
folders: {}
|
|
38801
|
+
};
|
|
38802
|
+
return this.controllers.forEach(function (t) {
|
|
38803
|
+
if (!(t instanceof lil_gui_module_min_h)) {
|
|
38804
|
+
if (t._name in i.controllers) throw new Error("Cannot save GUI with duplicate property \"".concat(t._name, "\""));
|
|
38805
|
+
i.controllers[t._name] = t.save();
|
|
38806
|
+
}
|
|
38807
|
+
}), t && this.folders.forEach(function (t) {
|
|
38808
|
+
if (t._title in i.folders) throw new Error("Cannot save GUI with duplicate folder \"".concat(t._title, "\""));
|
|
38809
|
+
i.folders[t._title] = t.save();
|
|
38810
|
+
}), i;
|
|
38811
|
+
}
|
|
38812
|
+
}, {
|
|
38813
|
+
key: "open",
|
|
38814
|
+
value: function open() {
|
|
38815
|
+
var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
38816
|
+
return this._closed = !t, this.$title.setAttribute("aria-expanded", !this._closed), this.domElement.classList.toggle("closed", this._closed), this;
|
|
38817
|
+
}
|
|
38818
|
+
}, {
|
|
38819
|
+
key: "close",
|
|
38820
|
+
value: function close() {
|
|
38821
|
+
return this.open(!1);
|
|
38822
|
+
}
|
|
38823
|
+
}, {
|
|
38824
|
+
key: "show",
|
|
38825
|
+
value: function show() {
|
|
38826
|
+
var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
38827
|
+
return this._hidden = !t, this.domElement.style.display = this._hidden ? "none" : "", this;
|
|
38828
|
+
}
|
|
38829
|
+
}, {
|
|
38830
|
+
key: "hide",
|
|
38831
|
+
value: function hide() {
|
|
38832
|
+
return this.show(!1);
|
|
38833
|
+
}
|
|
38834
|
+
}, {
|
|
38835
|
+
key: "openAnimated",
|
|
38836
|
+
value: function openAnimated() {
|
|
38837
|
+
var _this0 = this;
|
|
38838
|
+
var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
38839
|
+
return this._closed = !t, this.$title.setAttribute("aria-expanded", !this._closed), requestAnimationFrame(function () {
|
|
38840
|
+
var i = _this0.$children.clientHeight;
|
|
38841
|
+
_this0.$children.style.height = i + "px", _this0.domElement.classList.add("transition");
|
|
38842
|
+
var _e3 = function e(t) {
|
|
38843
|
+
t.target === _this0.$children && (_this0.$children.style.height = "", _this0.domElement.classList.remove("transition"), _this0.$children.removeEventListener("transitionend", _e3));
|
|
38844
|
+
};
|
|
38845
|
+
_this0.$children.addEventListener("transitionend", _e3);
|
|
38846
|
+
var s = t ? _this0.$children.scrollHeight : 0;
|
|
38847
|
+
_this0.domElement.classList.toggle("closed", !t), requestAnimationFrame(function () {
|
|
38848
|
+
_this0.$children.style.height = s + "px";
|
|
38849
|
+
});
|
|
38850
|
+
}), this;
|
|
38851
|
+
}
|
|
38852
|
+
}, {
|
|
38853
|
+
key: "title",
|
|
38854
|
+
value: function title(t) {
|
|
38855
|
+
return this._title = t, this.$title.innerHTML = t, this;
|
|
38856
|
+
}
|
|
38857
|
+
}, {
|
|
38858
|
+
key: "reset",
|
|
38859
|
+
value: function reset() {
|
|
38860
|
+
var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
38861
|
+
return (t ? this.controllersRecursive() : this.controllers).forEach(function (t) {
|
|
38862
|
+
return t.reset();
|
|
38863
|
+
}), this;
|
|
38864
|
+
}
|
|
38865
|
+
}, {
|
|
38866
|
+
key: "onChange",
|
|
38867
|
+
value: function onChange(t) {
|
|
38868
|
+
return this._onChange = t, this;
|
|
38869
|
+
}
|
|
38870
|
+
}, {
|
|
38871
|
+
key: "_callOnChange",
|
|
38872
|
+
value: function _callOnChange(t) {
|
|
38873
|
+
this.parent && this.parent._callOnChange(t), void 0 !== this._onChange && this._onChange.call(this, {
|
|
38874
|
+
object: t.object,
|
|
38875
|
+
property: t.property,
|
|
38876
|
+
value: t.getValue(),
|
|
38877
|
+
controller: t
|
|
38878
|
+
});
|
|
38879
|
+
}
|
|
38880
|
+
}, {
|
|
38881
|
+
key: "onFinishChange",
|
|
38882
|
+
value: function onFinishChange(t) {
|
|
38883
|
+
return this._onFinishChange = t, this;
|
|
38884
|
+
}
|
|
38885
|
+
}, {
|
|
38886
|
+
key: "_callOnFinishChange",
|
|
38887
|
+
value: function _callOnFinishChange(t) {
|
|
38888
|
+
this.parent && this.parent._callOnFinishChange(t), void 0 !== this._onFinishChange && this._onFinishChange.call(this, {
|
|
38889
|
+
object: t.object,
|
|
38890
|
+
property: t.property,
|
|
38891
|
+
value: t.getValue(),
|
|
38892
|
+
controller: t
|
|
38893
|
+
});
|
|
38894
|
+
}
|
|
38895
|
+
}, {
|
|
38896
|
+
key: "destroy",
|
|
38897
|
+
value: function destroy() {
|
|
38898
|
+
this.parent && (this.parent.children.splice(this.parent.children.indexOf(this), 1), this.parent.folders.splice(this.parent.folders.indexOf(this), 1)), this.domElement.parentElement && this.domElement.parentElement.removeChild(this.domElement), Array.from(this.children).forEach(function (t) {
|
|
38899
|
+
return t.destroy();
|
|
38900
|
+
});
|
|
38901
|
+
}
|
|
38902
|
+
}, {
|
|
38903
|
+
key: "controllersRecursive",
|
|
38904
|
+
value: function controllersRecursive() {
|
|
38905
|
+
var t = Array.from(this.controllers);
|
|
38906
|
+
return this.folders.forEach(function (i) {
|
|
38907
|
+
t = t.concat(i.controllersRecursive());
|
|
38908
|
+
}), t;
|
|
38909
|
+
}
|
|
38910
|
+
}, {
|
|
38911
|
+
key: "foldersRecursive",
|
|
38912
|
+
value: function foldersRecursive() {
|
|
38913
|
+
var t = Array.from(this.folders);
|
|
38914
|
+
return this.folders.forEach(function (i) {
|
|
38915
|
+
t = t.concat(i.foldersRecursive());
|
|
38916
|
+
}), t;
|
|
38917
|
+
}
|
|
38918
|
+
}]);
|
|
38919
|
+
}();
|
|
38920
|
+
/* harmony default export */ var lil_gui_module_min = (lil_gui_module_min_g);
|
|
38921
|
+
|
|
38162
38922
|
// CONCATENATED MODULE: ./src/utils/threejs/measure-distance.js
|
|
38163
38923
|
|
|
38164
38924
|
|
|
@@ -41272,17 +42032,20 @@ function handleInstancedMeshModel(instances, drawObjs, type, scene, customColor,
|
|
|
41272
42032
|
model.userData[key] = meshNameConfig[key];
|
|
41273
42033
|
meshName += ':' + meshNameConfig[key];
|
|
41274
42034
|
}
|
|
41275
|
-
drawObj.MapInstance.forEach(function (
|
|
41276
|
-
if (
|
|
41277
|
-
var
|
|
42035
|
+
drawObj.MapInstance.forEach(function (item, index) {
|
|
42036
|
+
if (item.instanceId == instances[_i].instanceId) {
|
|
42037
|
+
var _item$matrix;
|
|
41278
42038
|
model.userData.instanceIndex = index;
|
|
42039
|
+
model.userData.instanceId = instances[_i].instanceId;
|
|
41279
42040
|
model.name = meshName !== '' ? instances[_i].instanceId + meshName : instances[_i].instanceId;
|
|
41280
|
-
var matrixVal = (
|
|
42041
|
+
var matrixVal = (_item$matrix = item.matrix) === null || _item$matrix === void 0 ? void 0 : _item$matrix.val;
|
|
41281
42042
|
if (matrixVal) {
|
|
41282
42043
|
var m4 = new three_core_Matrix4();
|
|
41283
42044
|
// m4.setPosition(new THREE.Vector3(9999999, 9999999, 9999999)); // TODO 临时隐藏方案
|
|
41284
|
-
m4.elements =
|
|
42045
|
+
m4.elements = item.matrix.val;
|
|
41285
42046
|
model.setMatrixAt(index, m4);
|
|
42047
|
+
var copyMatrix = new three_core_Matrix4().copy(m4);
|
|
42048
|
+
model.userData.copyMatrix = copyMatrix;
|
|
41286
42049
|
}
|
|
41287
42050
|
// 需要先设置全部实例颜色,否则后续设置颜色无效
|
|
41288
42051
|
var color = mesh.prop.color;
|
|
@@ -41605,7 +42368,7 @@ var com_graphicsvue_type_script_lang_js_ref = /*#__PURE__*/regenerator_default.a
|
|
|
41605
42368
|
}
|
|
41606
42369
|
}, _callee);
|
|
41607
42370
|
})(null),
|
|
41608
|
-
com_graphicsvue_type_script_lang_js_ref2 = slicedToArray_default()(com_graphicsvue_type_script_lang_js_ref,
|
|
42371
|
+
com_graphicsvue_type_script_lang_js_ref2 = slicedToArray_default()(com_graphicsvue_type_script_lang_js_ref, 19),
|
|
41609
42372
|
com_graphicsvue_type_script_lang_js_renderer = com_graphicsvue_type_script_lang_js_ref2[0],
|
|
41610
42373
|
com_graphicsvue_type_script_lang_js_scene = com_graphicsvue_type_script_lang_js_ref2[1],
|
|
41611
42374
|
com_graphicsvue_type_script_lang_js_camera = com_graphicsvue_type_script_lang_js_ref2[2],
|
|
@@ -41622,7 +42385,9 @@ var com_graphicsvue_type_script_lang_js_ref = /*#__PURE__*/regenerator_default.a
|
|
|
41622
42385
|
clock = com_graphicsvue_type_script_lang_js_ref2[13],
|
|
41623
42386
|
pointControls = com_graphicsvue_type_script_lang_js_ref2[14],
|
|
41624
42387
|
threeMeasure = com_graphicsvue_type_script_lang_js_ref2[15],
|
|
41625
|
-
com_graphicsvue_type_script_lang_js_modelGroup = com_graphicsvue_type_script_lang_js_ref2[16]
|
|
42388
|
+
com_graphicsvue_type_script_lang_js_modelGroup = com_graphicsvue_type_script_lang_js_ref2[16],
|
|
42389
|
+
gui = com_graphicsvue_type_script_lang_js_ref2[17],
|
|
42390
|
+
animateId = com_graphicsvue_type_script_lang_js_ref2[18];
|
|
41626
42391
|
var _ref3 = /*#__PURE__*/regenerator_default.a.mark(function _callee2(v) {
|
|
41627
42392
|
return regenerator_default.a.wrap(function _callee2$(_context2) {
|
|
41628
42393
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -41639,12 +42404,12 @@ var _ref3 = /*#__PURE__*/regenerator_default.a.mark(function _callee2(v) {
|
|
|
41639
42404
|
}
|
|
41640
42405
|
}, _callee2);
|
|
41641
42406
|
})(0),
|
|
41642
|
-
|
|
41643
|
-
lastTime =
|
|
41644
|
-
firstTime =
|
|
41645
|
-
fpsClock =
|
|
41646
|
-
timeStamp =
|
|
41647
|
-
progress =
|
|
42407
|
+
com_graphicsvue_type_script_lang_js_ref4 = slicedToArray_default()(_ref3, 5),
|
|
42408
|
+
lastTime = com_graphicsvue_type_script_lang_js_ref4[0],
|
|
42409
|
+
firstTime = com_graphicsvue_type_script_lang_js_ref4[1],
|
|
42410
|
+
fpsClock = com_graphicsvue_type_script_lang_js_ref4[2],
|
|
42411
|
+
timeStamp = com_graphicsvue_type_script_lang_js_ref4[3],
|
|
42412
|
+
progress = com_graphicsvue_type_script_lang_js_ref4[4];
|
|
41648
42413
|
var _ref5 = /*#__PURE__*/regenerator_default.a.mark(function _callee3(v) {
|
|
41649
42414
|
return regenerator_default.a.wrap(function _callee3$(_context3) {
|
|
41650
42415
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -41688,18 +42453,22 @@ var _ref7 = /*#__PURE__*/regenerator_default.a.mark(function _callee4(v) {
|
|
|
41688
42453
|
})(true),
|
|
41689
42454
|
_ref8 = slicedToArray_default()(_ref7, 1),
|
|
41690
42455
|
spaceUp = _ref8[0];
|
|
41691
|
-
var
|
|
42456
|
+
var clippingMesh = [];
|
|
41692
42457
|
var removeSpeed = 200,
|
|
41693
42458
|
upSpeed = 200; //控制器移动速度 , //控制跳起时的速度
|
|
41694
|
-
var com_graphicsvue_type_script_lang_js_modelGroup;
|
|
41695
42459
|
var roamConfig = {
|
|
41696
42460
|
loop: false,
|
|
41697
42461
|
speed: 0,
|
|
41698
42462
|
// 最大值为3
|
|
41699
42463
|
name: ''
|
|
41700
42464
|
};
|
|
42465
|
+
var guiParams = {
|
|
42466
|
+
'x轴': 0,
|
|
42467
|
+
'y轴': 0,
|
|
42468
|
+
'z轴': 0
|
|
42469
|
+
};
|
|
41701
42470
|
// 绘制对象映射实例表
|
|
41702
|
-
|
|
42471
|
+
|
|
41703
42472
|
|
|
41704
42473
|
|
|
41705
42474
|
|
|
@@ -41721,9 +42490,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
41721
42490
|
}
|
|
41722
42491
|
},
|
|
41723
42492
|
data: function data() {
|
|
41724
|
-
return {
|
|
41725
|
-
arrowImg: __webpack_require__("3846")
|
|
41726
|
-
};
|
|
42493
|
+
return {};
|
|
41727
42494
|
},
|
|
41728
42495
|
created: function created() {
|
|
41729
42496
|
CameraControls.install({
|
|
@@ -41806,11 +42573,12 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
41806
42573
|
/*
|
|
41807
42574
|
参数:data 模型数据
|
|
41808
42575
|
color: '' 初始化模型的颜色 在业务方 有这个需求
|
|
41809
|
-
|
|
42576
|
+
meshNameConfig: {}
|
|
41810
42577
|
*/
|
|
41811
42578
|
drawModel: function drawModel(data) {
|
|
42579
|
+
var _this = this;
|
|
41812
42580
|
var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
41813
|
-
var meshNameConfig = arguments.length > 2 ? arguments[2] :
|
|
42581
|
+
var meshNameConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
41814
42582
|
if (Object.keys(data).length === 0) {
|
|
41815
42583
|
return;
|
|
41816
42584
|
}
|
|
@@ -41819,13 +42587,57 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
41819
42587
|
drawObjs = _parseData.drawObjs;
|
|
41820
42588
|
if (instances.length > 0) {
|
|
41821
42589
|
com_graphicsvue_type_script_lang_js_modelGroup = handleInstancedMeshModel(instances, drawObjs, '', com_graphicsvue_type_script_lang_js_scene, color, meshNameConfig);
|
|
42590
|
+
var modelBox3 = new this.THREE.Box3();
|
|
42591
|
+
modelBox3.expandByObject(com_graphicsvue_type_script_lang_js_modelGroup);
|
|
42592
|
+
var modelWorldPs = new this.THREE.Vector3().addVectors(modelBox3.max, modelBox3.min).multiplyScalar(0.5);
|
|
41822
42593
|
com_graphicsvue_type_script_lang_js_scene.add(com_graphicsvue_type_script_lang_js_modelGroup);
|
|
42594
|
+
com_graphicsvue_type_script_lang_js_modelGroup.traverse(function (child) {
|
|
42595
|
+
if (child.isMesh) {
|
|
42596
|
+
var json = _this.getMeshCenterAndVolume(child);
|
|
42597
|
+
var meshBox3 = new _this.THREE.Box3();
|
|
42598
|
+
meshBox3.setFromObject(child);
|
|
42599
|
+
// 获取每个mesh的中心点,爆炸方向为爆炸中心点指向mesh中心点
|
|
42600
|
+
var worldPs = new _this.THREE.Vector3().addVectors(meshBox3.max, meshBox3.min).multiplyScalar(0.5);
|
|
42601
|
+
if (isNaN(worldPs.x)) return;
|
|
42602
|
+
// 计算爆炸方向
|
|
42603
|
+
child.worldDir = new _this.THREE.Vector3().subVectors(worldPs, modelWorldPs).normalize();
|
|
42604
|
+
// 保存初始坐标
|
|
42605
|
+
child.userData.center = json.center;
|
|
42606
|
+
child.userData.worldPs = worldPs;
|
|
42607
|
+
child.userData.oldPs = child.getWorldPosition(new _this.THREE.Vector3());
|
|
42608
|
+
child.userData.box = json.box;
|
|
42609
|
+
child.userData.position = new _this.THREE.Vector3().copy(child.position);
|
|
42610
|
+
child.userData.translate = {
|
|
42611
|
+
x: 0,
|
|
42612
|
+
y: 0,
|
|
42613
|
+
z: 0
|
|
42614
|
+
};
|
|
42615
|
+
child.userData.rotate = {
|
|
42616
|
+
x: 0,
|
|
42617
|
+
y: 0,
|
|
42618
|
+
z: 0
|
|
42619
|
+
};
|
|
42620
|
+
child.userData.modelWorldPs = modelWorldPs;
|
|
42621
|
+
}
|
|
42622
|
+
});
|
|
41823
42623
|
// this.compileShader();
|
|
41824
42624
|
// cameraControls.fitToSphere(scene, true); // TODO 待处理,先用 setModelCenter 进行定位
|
|
41825
42625
|
this.setModelCenter(com_graphicsvue_type_script_lang_js_modelGroup);
|
|
41826
42626
|
// cameraControls.saveState();
|
|
41827
42627
|
}
|
|
41828
42628
|
},
|
|
42629
|
+
// 获取mesh的中心点
|
|
42630
|
+
getMeshCenterAndVolume: function getMeshCenterAndVolume(mesh) {
|
|
42631
|
+
var box = new this.THREE.Box3().setFromObject(mesh);
|
|
42632
|
+
var volume = box.getSize(new this.THREE.Vector3());
|
|
42633
|
+
var geometry = mesh.geometry;
|
|
42634
|
+
geometry.computeBoundingBox();
|
|
42635
|
+
var center = geometry.boundingBox.getCenter(new this.THREE.Vector3());
|
|
42636
|
+
return {
|
|
42637
|
+
'center': center,
|
|
42638
|
+
'box': volume
|
|
42639
|
+
};
|
|
42640
|
+
},
|
|
41829
42641
|
compileShader: function compileShader() {
|
|
41830
42642
|
com_graphicsvue_type_script_lang_js_scene.traverse(function (child) {
|
|
41831
42643
|
if (child.isMesh) {
|
|
@@ -41949,16 +42761,16 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
41949
42761
|
* }
|
|
41950
42762
|
*/
|
|
41951
42763
|
updateProperty: function updateProperty(list) {
|
|
41952
|
-
var
|
|
42764
|
+
var _this2 = this;
|
|
41953
42765
|
var _loop = function _loop() {
|
|
41954
42766
|
var ele = list[index];
|
|
41955
|
-
var targetObj =
|
|
42767
|
+
var targetObj = _this2.getObjectByName(ele.name);
|
|
41956
42768
|
var _loop2 = function _loop2(key) {
|
|
41957
42769
|
switch (key) {
|
|
41958
42770
|
case 'color':
|
|
41959
42771
|
targetObj.forEach(function (children) {
|
|
41960
42772
|
if (children.isMesh) {
|
|
41961
|
-
children.setColorAt(children.userData.instanceIndex, new
|
|
42773
|
+
children.setColorAt(children.userData.instanceIndex, new _this2.THREE.Color(ele.attr[key]));
|
|
41962
42774
|
children.instanceColor.needsUpdate = true;
|
|
41963
42775
|
}
|
|
41964
42776
|
});
|
|
@@ -41966,8 +42778,14 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
41966
42778
|
case 'visible':
|
|
41967
42779
|
targetObj.forEach(function (children) {
|
|
41968
42780
|
var index = children.userData.instanceIndex;
|
|
41969
|
-
|
|
41970
|
-
|
|
42781
|
+
if (ele.attr[key]) {
|
|
42782
|
+
var restoreMatrix = new _this2.THREE.Matrix4().copy(children.userData.copyMatrix);
|
|
42783
|
+
children.setMatrixAt(index, restoreMatrix);
|
|
42784
|
+
} else {
|
|
42785
|
+
var offsetMatrix = new _this2.THREE.Matrix4().copy(children.userData.copyMatrix).makeTranslation(9999999, 9999999, 9999999);
|
|
42786
|
+
children.setMatrixAt(index, offsetMatrix);
|
|
42787
|
+
}
|
|
42788
|
+
children.instanceMatrix.needsUpdate = true;
|
|
41971
42789
|
});
|
|
41972
42790
|
break;
|
|
41973
42791
|
case 'opacity':
|
|
@@ -41990,7 +42808,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
41990
42808
|
_loop();
|
|
41991
42809
|
}
|
|
41992
42810
|
},
|
|
41993
|
-
//
|
|
42811
|
+
// 修改整个场景中模型实体的属性
|
|
41994
42812
|
/*
|
|
41995
42813
|
{
|
|
41996
42814
|
attr: '', 需要修改属性名(color、visible(true / false)、opacity(0-1),
|
|
@@ -41998,13 +42816,14 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
41998
42816
|
}
|
|
41999
42817
|
*/
|
|
42000
42818
|
updateWholeProperty: function updateWholeProperty(params) {
|
|
42001
|
-
var
|
|
42819
|
+
var _this3 = this;
|
|
42002
42820
|
if (com_graphicsvue_type_script_lang_js_scene) {
|
|
42003
42821
|
com_graphicsvue_type_script_lang_js_scene.traverse(function (obj) {
|
|
42004
|
-
if (obj instanceof
|
|
42822
|
+
if (obj instanceof _this3.THREE.Mesh) {
|
|
42005
42823
|
switch (params.attr) {
|
|
42006
42824
|
case 'color':
|
|
42007
|
-
obj.
|
|
42825
|
+
obj.setColorAt(obj.userData.instanceIndex, new _this3.THREE.Color(params.value));
|
|
42826
|
+
obj.instanceColor.needsUpdate = true;
|
|
42008
42827
|
break;
|
|
42009
42828
|
case 'visible':
|
|
42010
42829
|
obj.material.visible = params.value;
|
|
@@ -42021,6 +42840,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42021
42840
|
},
|
|
42022
42841
|
// 清除上一次的属性修改操作 为了方便业务平台参数跟updateProperty方法的参数一样
|
|
42023
42842
|
resetProperty: function resetProperty(list) {
|
|
42843
|
+
var _this4 = this;
|
|
42024
42844
|
for (var index = 0; index < list.length; index++) {
|
|
42025
42845
|
var ele = list[index];
|
|
42026
42846
|
var _obj = this.getObjectByName(ele.name);
|
|
@@ -42035,20 +42855,64 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42035
42855
|
}
|
|
42036
42856
|
});
|
|
42037
42857
|
break;
|
|
42858
|
+
case 'visible':
|
|
42859
|
+
_obj.forEach(function (children) {
|
|
42860
|
+
var index = children.userData.instanceIndex;
|
|
42861
|
+
var restoreMatrix = new _this4.THREE.Matrix4().copy(children.userData.copyMatrix);
|
|
42862
|
+
children.setMatrixAt(index, restoreMatrix);
|
|
42863
|
+
children.instanceMatrix.needsUpdate = true;
|
|
42864
|
+
});
|
|
42865
|
+
break;
|
|
42038
42866
|
}
|
|
42039
42867
|
}
|
|
42040
42868
|
}
|
|
42041
42869
|
}
|
|
42042
42870
|
},
|
|
42043
42871
|
// 定位到模型
|
|
42044
|
-
locateModel: function locateModel(
|
|
42045
|
-
var obj = com_graphicsvue_type_script_lang_js_scene.getObjectByName(
|
|
42872
|
+
locateModel: function locateModel(name) {
|
|
42873
|
+
var obj = com_graphicsvue_type_script_lang_js_scene.getObjectByName(name);
|
|
42046
42874
|
if (obj) {
|
|
42047
42875
|
// cameraControls.fitToSphere(obj.parent, true); // TODO 待处理,先用 setModelCenter 进行定位
|
|
42048
42876
|
this.setModelCenter(obj.parent);
|
|
42049
42877
|
// cameraControls.fitToBox( obj, true);
|
|
42050
42878
|
}
|
|
42051
42879
|
},
|
|
42880
|
+
// 根据自定义参数修改模型
|
|
42881
|
+
/*
|
|
42882
|
+
自定义参数指的是在调用drawModel时配置的meshNameConfig里面的字段来修改某一类模型实体的属性
|
|
42883
|
+
{
|
|
42884
|
+
customName: '', 自定义字段名称
|
|
42885
|
+
customValue: '' 自定义字段的值
|
|
42886
|
+
attr: {
|
|
42887
|
+
color: '',
|
|
42888
|
+
opacity: 0 -1,
|
|
42889
|
+
visiable: true/false
|
|
42890
|
+
}
|
|
42891
|
+
}
|
|
42892
|
+
*/
|
|
42893
|
+
updatePropertyByCustom: function updatePropertyByCustom(params) {
|
|
42894
|
+
var _this5 = this;
|
|
42895
|
+
com_graphicsvue_type_script_lang_js_scene.traverse(function (child) {
|
|
42896
|
+
if (child.isMesh && child.userData[params.customName] === params.customValue) {
|
|
42897
|
+
for (var key in params.attr) {
|
|
42898
|
+
switch (key) {
|
|
42899
|
+
case 'color':
|
|
42900
|
+
child.setColorAt(obj.userData.instanceIndex, new _this5.THREE.Color(params.attr[key]));
|
|
42901
|
+
child.instanceColor.needsUpdate = true;
|
|
42902
|
+
break;
|
|
42903
|
+
case 'visible':
|
|
42904
|
+
child.material.visible = params.attr[key];
|
|
42905
|
+
break;
|
|
42906
|
+
case 'opacity':
|
|
42907
|
+
child.material.opacity = params.attr[key];
|
|
42908
|
+
child.material.transparent = true;
|
|
42909
|
+
break;
|
|
42910
|
+
}
|
|
42911
|
+
child.material.needsUpdate = true;
|
|
42912
|
+
}
|
|
42913
|
+
}
|
|
42914
|
+
});
|
|
42915
|
+
},
|
|
42052
42916
|
// 相机定位
|
|
42053
42917
|
/*
|
|
42054
42918
|
定位参数:x: 相机的x位置, y: 相机的y位置, z: 相机的z位置
|
|
@@ -42119,12 +42983,12 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42119
42983
|
},
|
|
42120
42984
|
// 删除场景中所有的实体
|
|
42121
42985
|
removeAll: function removeAll() {
|
|
42122
|
-
var
|
|
42986
|
+
var _this6 = this;
|
|
42123
42987
|
if (com_graphicsvue_type_script_lang_js_scene) {
|
|
42124
42988
|
com_graphicsvue_type_script_lang_js_scene.traverse(function (item) {
|
|
42125
42989
|
item.material && item.material.dispose();
|
|
42126
42990
|
item.geometry && item.geometry.dispose();
|
|
42127
|
-
if (item instanceof
|
|
42991
|
+
if (item instanceof _this6.THREE.Mesh) {
|
|
42128
42992
|
item.clear();
|
|
42129
42993
|
}
|
|
42130
42994
|
com_graphicsvue_type_script_lang_js_scene.remove(item);
|
|
@@ -42161,11 +43025,11 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42161
43025
|
}
|
|
42162
43026
|
*/
|
|
42163
43027
|
drawCurve: function drawCurve(params) {
|
|
42164
|
-
var
|
|
43028
|
+
var _this7 = this;
|
|
42165
43029
|
this.removeObjectByName(params.name);
|
|
42166
43030
|
var route = [];
|
|
42167
43031
|
params.path.forEach(function (element) {
|
|
42168
|
-
route.push(new
|
|
43032
|
+
route.push(new _this7.THREE.Vector3(element.x, element.y, element.z));
|
|
42169
43033
|
});
|
|
42170
43034
|
if (route.length > 1) {
|
|
42171
43035
|
com_graphicsvue_type_script_lang_js_curve = new this.THREE.CatmullRomCurve3(route);
|
|
@@ -42189,11 +43053,11 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42189
43053
|
}
|
|
42190
43054
|
*/
|
|
42191
43055
|
drawTextureCurve: function drawTextureCurve(params) {
|
|
42192
|
-
var
|
|
43056
|
+
var _this8 = this;
|
|
42193
43057
|
this.removeObjectByName(params.name);
|
|
42194
43058
|
var route = [];
|
|
42195
43059
|
params.path.forEach(function (element) {
|
|
42196
|
-
route.push(new
|
|
43060
|
+
route.push(new _this8.THREE.Vector3(element.x, element.y, element.z));
|
|
42197
43061
|
});
|
|
42198
43062
|
// 画曲线
|
|
42199
43063
|
if (route.length > 1) {
|
|
@@ -42201,7 +43065,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42201
43065
|
com_graphicsvue_type_script_lang_js_curve = new this.THREE.CatmullRomCurve3(route, false, 'catmullrom', 0);
|
|
42202
43066
|
var geometry = new this.THREE.TubeGeometry(com_graphicsvue_type_script_lang_js_curve, 5000, 0.5, 4);
|
|
42203
43067
|
//加载纹理
|
|
42204
|
-
lineTexture = new this.THREE.TextureLoader().load(
|
|
43068
|
+
lineTexture = new this.THREE.TextureLoader().load('/static/arrow/arrow-right.png');
|
|
42205
43069
|
lineTexture.wrapS = this.THREE.RepeatWrapping;
|
|
42206
43070
|
lineTexture.wrapT = this.THREE.RepeatWrapping;
|
|
42207
43071
|
lineTexture.repeat.set(20, 1); //水平重复20次
|
|
@@ -42239,7 +43103,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42239
43103
|
path: params.path
|
|
42240
43104
|
});
|
|
42241
43105
|
roaming = true;
|
|
42242
|
-
clock = new this.THREE.Clock();
|
|
43106
|
+
// clock = new this.THREE.Clock();
|
|
42243
43107
|
},
|
|
42244
43108
|
// 更新漫游的配置
|
|
42245
43109
|
/*
|
|
@@ -42247,14 +43111,14 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42247
43111
|
*/
|
|
42248
43112
|
updateRoamConfig: function updateRoamConfig(params) {
|
|
42249
43113
|
for (var key in params) {
|
|
42250
|
-
roamConfig[key] =
|
|
43114
|
+
roamConfig[key] = params[key];
|
|
42251
43115
|
}
|
|
42252
43116
|
},
|
|
42253
43117
|
// 结束/退出漫游
|
|
42254
43118
|
endRoam: function endRoam() {
|
|
42255
43119
|
roaming = false;
|
|
42256
43120
|
progress = 0;
|
|
42257
|
-
this.removeObjectByName(
|
|
43121
|
+
this.removeObjectByName(roamConfig.name);
|
|
42258
43122
|
roamConfig = {
|
|
42259
43123
|
loop: false,
|
|
42260
43124
|
speed: 0,
|
|
@@ -42295,16 +43159,16 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42295
43159
|
* 参数val: 爆炸的值
|
|
42296
43160
|
*/
|
|
42297
43161
|
globalBomb: function globalBomb(val) {
|
|
42298
|
-
var
|
|
43162
|
+
var _this9 = this;
|
|
42299
43163
|
if (com_graphicsvue_type_script_lang_js_scene.children.length === 0) return;
|
|
42300
43164
|
for (var i = 0; i < com_graphicsvue_type_script_lang_js_scene.children.length; i++) {
|
|
42301
43165
|
com_graphicsvue_type_script_lang_js_scene.children[i].traverse(function (item) {
|
|
42302
43166
|
if (!item.isMesh || !item.worldDir) return;
|
|
42303
43167
|
// 爆炸公式
|
|
42304
|
-
|
|
43168
|
+
_this9.computedBomb(item, val);
|
|
42305
43169
|
});
|
|
42306
43170
|
}
|
|
42307
|
-
this.timeRender();
|
|
43171
|
+
// this.timeRender();
|
|
42308
43172
|
},
|
|
42309
43173
|
// 单个实体模型炸开
|
|
42310
43174
|
/*
|
|
@@ -42328,11 +43192,24 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42328
43192
|
剖切值变换时, 使用
|
|
42329
43193
|
*/
|
|
42330
43194
|
setGlobalClipping: function setGlobalClipping() {
|
|
43195
|
+
var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
42331
43196
|
var box3 = new this.THREE.Box3().setFromObject(com_graphicsvue_type_script_lang_js_scene.children[0]);
|
|
42332
43197
|
var max = box3.max;
|
|
42333
43198
|
var min = box3.min;
|
|
42334
43199
|
var clippingPlanes = [new this.THREE.Plane(new this.THREE.Vector3(-1, 0, 0), max.x), new this.THREE.Plane(new this.THREE.Vector3(0, -1, 0), max.y), new this.THREE.Plane(new this.THREE.Vector3(0, 0, -1), max.z)];
|
|
42335
43200
|
com_graphicsvue_type_script_lang_js_renderer.clippingPlanes = clippingPlanes;
|
|
43201
|
+
if (flag) {
|
|
43202
|
+
guiParams = {
|
|
43203
|
+
'x轴': clippingPlanes[0].constant,
|
|
43204
|
+
'y轴': clippingPlanes[2].constant,
|
|
43205
|
+
'z轴': clippingPlanes[1].constant
|
|
43206
|
+
};
|
|
43207
|
+
this.addClippingGui('全局剖切', {
|
|
43208
|
+
x: min.x,
|
|
43209
|
+
y: min.z,
|
|
43210
|
+
z: min.y
|
|
43211
|
+
}, clippingPlanes);
|
|
43212
|
+
}
|
|
42336
43213
|
return {
|
|
42337
43214
|
min: min,
|
|
42338
43215
|
max: max
|
|
@@ -42356,18 +43233,45 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42356
43233
|
},
|
|
42357
43234
|
// 取消全局剖切
|
|
42358
43235
|
cancelGlobalClipping: function cancelGlobalClipping() {
|
|
43236
|
+
guiParams = {
|
|
43237
|
+
'x轴': 0,
|
|
43238
|
+
'y轴': 0,
|
|
43239
|
+
'z轴': 0
|
|
43240
|
+
};
|
|
42359
43241
|
com_graphicsvue_type_script_lang_js_renderer.clippingPlanes = Object.freeze([]);
|
|
43242
|
+
gui && gui.destroy();
|
|
42360
43243
|
},
|
|
42361
|
-
// 单个实体的剖切/ 局部剖切 obj 实体对象
|
|
43244
|
+
// 单个实体的剖切/ 局部剖切 obj 实体对象 flag 代表是否使用图形组件自带的剖切面板 默认为true
|
|
42362
43245
|
setLocalClipping: function setLocalClipping(obj) {
|
|
43246
|
+
var flag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
43247
|
+
clippingMesh.splice(0);
|
|
43248
|
+
clippingMesh.push(obj);
|
|
42363
43249
|
com_graphicsvue_type_script_lang_js_renderer.localClippingEnabled = true;
|
|
42364
43250
|
// mesh的boundingBox 可以获取到该对象位置的最大最小值 但是在这里我们需要把y、z轴互换
|
|
42365
|
-
var boundingBox = new this.THREE.Box3().copy(obj.
|
|
43251
|
+
var boundingBox = new this.THREE.Box3().copy(obj.boundingBox);
|
|
42366
43252
|
boundingBox.applyMatrix4(obj.matrixWorld);
|
|
42367
|
-
clippingPlanes = [new this.THREE.Plane(new this.THREE.Vector3(-1, 0, 0), Math.ceil(boundingBox.max.x)), new this.THREE.Plane(new this.THREE.Vector3(0, -1, 0), Math.ceil(boundingBox.max.y)), new this.THREE.Plane(new this.THREE.Vector3(0, 0, -1), Math.ceil(boundingBox.max.z))];
|
|
43253
|
+
var clippingPlanes = [new this.THREE.Plane(new this.THREE.Vector3(-1, 0, 0), Math.ceil(boundingBox.max.x)), new this.THREE.Plane(new this.THREE.Vector3(0, -1, 0), Math.ceil(boundingBox.max.y)), new this.THREE.Plane(new this.THREE.Vector3(0, 0, -1), Math.ceil(boundingBox.max.z))];
|
|
42368
43254
|
obj.material.clippingPlanes = clippingPlanes;
|
|
42369
43255
|
obj.material.needsUpdate = true;
|
|
42370
43256
|
// 将局部剖切的对象记录下来
|
|
43257
|
+
if (flag) {
|
|
43258
|
+
guiParams = {
|
|
43259
|
+
'x轴': clippingPlanes[0].constant,
|
|
43260
|
+
'y轴': clippingPlanes[2].constant,
|
|
43261
|
+
'z轴': clippingPlanes[1].constant
|
|
43262
|
+
};
|
|
43263
|
+
this.addClippingGui('局部剖切', {
|
|
43264
|
+
x: Math.floor(boundingBox.min.x),
|
|
43265
|
+
y: Math.floor(boundingBox.min.z),
|
|
43266
|
+
z: Math.floor(boundingBox.min.y)
|
|
43267
|
+
}, obj.material.clippingPlanes);
|
|
43268
|
+
// cube.material.clippingPlanes
|
|
43269
|
+
}
|
|
43270
|
+
;
|
|
43271
|
+
return {
|
|
43272
|
+
min: boundingBox.min,
|
|
43273
|
+
max: boundingBox.max
|
|
43274
|
+
};
|
|
42371
43275
|
},
|
|
42372
43276
|
// 更新局部剖切的值
|
|
42373
43277
|
/*
|
|
@@ -42380,14 +43284,43 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42380
43284
|
y: 1,
|
|
42381
43285
|
z: 2
|
|
42382
43286
|
};
|
|
43287
|
+
var obj = clippingMesh[clippingMesh.length - 1];
|
|
42383
43288
|
for (var key in params) {
|
|
42384
|
-
clippingPlanes[axis[key]].constant = params[key];
|
|
43289
|
+
obj.material.clippingPlanes[axis[key]].constant = params[key];
|
|
43290
|
+
obj.material.needsUpdate = true;
|
|
42385
43291
|
}
|
|
42386
43292
|
// this.timeRender()
|
|
42387
43293
|
},
|
|
42388
43294
|
// 取消局部/单个实体的剖切
|
|
42389
43295
|
cancelLocalClipping: function cancelLocalClipping() {
|
|
42390
|
-
|
|
43296
|
+
guiParams = {
|
|
43297
|
+
'x轴': 0,
|
|
43298
|
+
'y轴': 0,
|
|
43299
|
+
'z轴': 0
|
|
43300
|
+
};
|
|
43301
|
+
gui && gui.destroy();
|
|
43302
|
+
clippingMesh.forEach(function (item) {
|
|
43303
|
+
item.material.clippingPlanes = Object.freeze([]);
|
|
43304
|
+
item.material.needsUpdate = true;
|
|
43305
|
+
});
|
|
43306
|
+
clippingMesh.splice(0);
|
|
43307
|
+
},
|
|
43308
|
+
// 添加剖切轴工具
|
|
43309
|
+
addClippingGui: function addClippingGui(title, minValue, objClipp1, objClipp2) {
|
|
43310
|
+
gui = new lil_gui_module_min_g({
|
|
43311
|
+
title: title
|
|
43312
|
+
});
|
|
43313
|
+
gui.add(guiParams, 'x轴').min(minValue.x).max(Math.abs(guiParams['x轴'])).onChange(function (d) {
|
|
43314
|
+
objClipp1[0].constant = d;
|
|
43315
|
+
objClipp2 && (objClipp2[0].constant = d);
|
|
43316
|
+
});
|
|
43317
|
+
gui.add(guiParams, 'y轴').min(minValue.y).max(Math.abs(guiParams['y轴'])).onChange(function (d) {
|
|
43318
|
+
objClipp1[2].constant = d;
|
|
43319
|
+
objClipp2 && (objClipp2[2].constant = d);
|
|
43320
|
+
});
|
|
43321
|
+
gui.add(guiParams, 'z轴').min(minValue.z).max(Math.abs(guiParams['z轴'])).onChange(function (d) {
|
|
43322
|
+
objClipp1[1].constant = d;
|
|
43323
|
+
});
|
|
42391
43324
|
},
|
|
42392
43325
|
// 开启第一视角
|
|
42393
43326
|
startFirstPer: function startFirstPer() {
|
|
@@ -42400,7 +43333,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42400
43333
|
},
|
|
42401
43334
|
// 页面是否锁定
|
|
42402
43335
|
initPointerLock: function initPointerLock() {
|
|
42403
|
-
var
|
|
43336
|
+
var _this0 = this;
|
|
42404
43337
|
this.home();
|
|
42405
43338
|
setTimeout(function () {
|
|
42406
43339
|
pointControls = new PointerLockControls_PointerLockControls(com_graphicsvue_type_script_lang_js_camera, com_graphicsvue_type_script_lang_js_renderer.domElement);
|
|
@@ -42408,10 +43341,10 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42408
43341
|
// 锁定
|
|
42409
43342
|
pointControls.addEventListener('lock', function () {
|
|
42410
43343
|
cameraControls.enabled = false;
|
|
42411
|
-
window.addEventListener('keydown',
|
|
42412
|
-
window.addEventListener('keyup',
|
|
42413
|
-
com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mouseup',
|
|
42414
|
-
com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mousedown',
|
|
43344
|
+
window.addEventListener('keydown', _this0.onKeyDown, false);
|
|
43345
|
+
window.addEventListener('keyup', _this0.onKeyUp, false);
|
|
43346
|
+
com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mouseup', _this0.mouseClick, false);
|
|
43347
|
+
com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mousedown', _this0.mouseDown, false);
|
|
42415
43348
|
});
|
|
42416
43349
|
// 解锁
|
|
42417
43350
|
pointControls.addEventListener('unlock', function () {
|
|
@@ -42421,10 +43354,10 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42421
43354
|
cameraControls.reset(true);
|
|
42422
43355
|
cameraControls.update(0);
|
|
42423
43356
|
setTimeout(function () {
|
|
42424
|
-
window.removeEventListener('keydown',
|
|
42425
|
-
window.removeEventListener('keyup',
|
|
42426
|
-
com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mouseup',
|
|
42427
|
-
com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mousedown',
|
|
43357
|
+
window.removeEventListener('keydown', _this0.onKeyDown);
|
|
43358
|
+
window.removeEventListener('keyup', _this0.onKeyUp);
|
|
43359
|
+
com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mouseup', _this0.mouseClick, false);
|
|
43360
|
+
com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mousedown', _this0.mouseDown, false);
|
|
42428
43361
|
// this.timeRender()
|
|
42429
43362
|
}, 0);
|
|
42430
43363
|
});
|
|
@@ -42539,9 +43472,9 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42539
43472
|
},
|
|
42540
43473
|
// 返回主视角/恢复相机初始状态
|
|
42541
43474
|
home: function home() {
|
|
42542
|
-
|
|
42543
|
-
|
|
42544
|
-
|
|
43475
|
+
if (roaming) {
|
|
43476
|
+
this.endRoam();
|
|
43477
|
+
}
|
|
42545
43478
|
cameraControls.reset(true);
|
|
42546
43479
|
cameraControls.update(0);
|
|
42547
43480
|
// this.timeRender()
|
|
@@ -42647,7 +43580,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42647
43580
|
},
|
|
42648
43581
|
// 还原操作 将修改过的实体进行恢复
|
|
42649
43582
|
restore: function restore() {
|
|
42650
|
-
var
|
|
43583
|
+
var _this1 = this;
|
|
42651
43584
|
com_graphicsvue_type_script_lang_js_scene.traverse(function (item) {
|
|
42652
43585
|
if (item.isMesh) {
|
|
42653
43586
|
item.material.opacity = 1.0;
|
|
@@ -42670,7 +43603,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42670
43603
|
item.userData.translateMatrixInvert = null;
|
|
42671
43604
|
}
|
|
42672
43605
|
if (item.userData.combineMatrixInvert) {
|
|
42673
|
-
|
|
43606
|
+
_this1.rotateMesh(item, {
|
|
42674
43607
|
x: 0,
|
|
42675
43608
|
y: 0,
|
|
42676
43609
|
z: 0
|
|
@@ -42683,7 +43616,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42683
43616
|
animate: function animate() {
|
|
42684
43617
|
var delta = fpsClock.getDelta();
|
|
42685
43618
|
timeStamp += delta;
|
|
42686
|
-
requestAnimationFrame(this.animate);
|
|
43619
|
+
animateId = requestAnimationFrame(this.animate);
|
|
42687
43620
|
cameraControls.enabled && cameraControls.update(timeStamp);
|
|
42688
43621
|
this.cameraTrack();
|
|
42689
43622
|
this.firstPerspective();
|
|
@@ -42694,8 +43627,8 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
|
|
|
42694
43627
|
});
|
|
42695
43628
|
// CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=script&lang=js
|
|
42696
43629
|
/* harmony default export */ var components_com_graphicsvue_type_script_lang_js = (com_graphicsvue_type_script_lang_js);
|
|
42697
|
-
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=
|
|
42698
|
-
var
|
|
43630
|
+
// EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=6e37e043&prod&lang=scss&scoped=true
|
|
43631
|
+
var com_graphicsvue_type_style_index_0_id_6e37e043_prod_lang_scss_scoped_true = __webpack_require__("52b4");
|
|
42699
43632
|
|
|
42700
43633
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
42701
43634
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
@@ -42806,17 +43739,17 @@ function normalizeComponent(
|
|
|
42806
43739
|
|
|
42807
43740
|
var component = normalizeComponent(
|
|
42808
43741
|
components_com_graphicsvue_type_script_lang_js,
|
|
42809
|
-
|
|
43742
|
+
com_graphicsvue_type_template_id_6e37e043_scoped_true_render,
|
|
42810
43743
|
staticRenderFns,
|
|
42811
43744
|
false,
|
|
42812
43745
|
null,
|
|
42813
|
-
"
|
|
43746
|
+
"6e37e043",
|
|
42814
43747
|
null
|
|
42815
43748
|
|
|
42816
43749
|
)
|
|
42817
43750
|
|
|
42818
43751
|
/* harmony default export */ var com_graphics = (component.exports);
|
|
42819
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
43752
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4217f59c-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=83d38700&scoped=true
|
|
42820
43753
|
var com_flcanvasvue_type_template_id_83d38700_scoped_true_render = function render() {
|
|
42821
43754
|
var _vm = this,
|
|
42822
43755
|
_c = _vm._self._c;
|
|
@@ -45061,10 +45994,6 @@ function DxfParser_getAcadColor(index) {
|
|
|
45061
45994
|
// EXTERNAL MODULE: ./node_modules/jspdf/dist/jspdf.es.min.js
|
|
45062
45995
|
var jspdf_es_min = __webpack_require__("8baf");
|
|
45063
45996
|
|
|
45064
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js
|
|
45065
|
-
var helpers_typeof = __webpack_require__("7037");
|
|
45066
|
-
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
|
|
45067
|
-
|
|
45068
45997
|
// CONCATENATED MODULE: ./packages/components/com-flcanvas/components/round10.js
|
|
45069
45998
|
// This is based on the example code found from:
|
|
45070
45999
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor
|
|
@@ -45916,11 +46845,120 @@ var com_flcanvas_component = normalizeComponent(
|
|
|
45916
46845
|
)
|
|
45917
46846
|
|
|
45918
46847
|
/* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
|
|
46848
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4217f59c-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
|
|
46849
|
+
var per_controlvue_type_template_id_f547d5c6_scoped_true_render = function render() {
|
|
46850
|
+
var _vm = this,
|
|
46851
|
+
_c = _vm._self._c;
|
|
46852
|
+
return _c('div', [_vm._m(0), _c('div', {
|
|
46853
|
+
staticClass: "line"
|
|
46854
|
+
}), _vm._m(1), _c('div', {
|
|
46855
|
+
staticClass: "line"
|
|
46856
|
+
}), _vm._m(2), _c('div', {
|
|
46857
|
+
staticClass: "button"
|
|
46858
|
+
}, [_c('el-button', {
|
|
46859
|
+
on: {
|
|
46860
|
+
"click": function click($event) {
|
|
46861
|
+
return _vm.start(false);
|
|
46862
|
+
}
|
|
46863
|
+
}
|
|
46864
|
+
}, [_vm._v("好的,知道了")]), _c('el-button', {
|
|
46865
|
+
attrs: {
|
|
46866
|
+
"type": "primary"
|
|
46867
|
+
},
|
|
46868
|
+
on: {
|
|
46869
|
+
"click": function click($event) {
|
|
46870
|
+
return _vm.start(true);
|
|
46871
|
+
}
|
|
46872
|
+
}
|
|
46873
|
+
}, [_vm._v("不再提示")])], 1)]);
|
|
46874
|
+
};
|
|
46875
|
+
var per_controlvue_type_template_id_f547d5c6_scoped_true_staticRenderFns = [function () {
|
|
46876
|
+
var _vm = this,
|
|
46877
|
+
_c = _vm._self._c;
|
|
46878
|
+
return _c('div', {
|
|
46879
|
+
staticClass: "key"
|
|
46880
|
+
}, [_c('span', [_vm._v("漫游")]), _c('div', {
|
|
46881
|
+
staticClass: "center"
|
|
46882
|
+
}, [_c('div', {
|
|
46883
|
+
staticClass: "top"
|
|
46884
|
+
}, [_c('span', [_vm._v("W")])]), _c('div', {
|
|
46885
|
+
staticClass: "cen"
|
|
46886
|
+
}, [_c('span', [_vm._v("A")]), _c('span', [_vm._v("S")]), _c('span', [_vm._v("D")])]), _c('span', {
|
|
46887
|
+
staticClass: "text"
|
|
46888
|
+
}, [_vm._v("W向前移动、S向后移动、A向左移动、D向右移动")])])]);
|
|
46889
|
+
}, function () {
|
|
46890
|
+
var _vm = this,
|
|
46891
|
+
_c = _vm._self._c;
|
|
46892
|
+
return _c('div', {
|
|
46893
|
+
staticClass: "mouse"
|
|
46894
|
+
}, [_c('span', [_vm._v("环视")]), _c('div', {
|
|
46895
|
+
staticClass: "center"
|
|
46896
|
+
}, [_c('i', {
|
|
46897
|
+
staticClass: "iconfont icon-shubiao"
|
|
46898
|
+
}), _c('span', {
|
|
46899
|
+
staticClass: "text"
|
|
46900
|
+
}, [_vm._v("鼠标控制方向")])])]);
|
|
46901
|
+
}, function () {
|
|
46902
|
+
var _vm = this,
|
|
46903
|
+
_c = _vm._self._c;
|
|
46904
|
+
return _c('div', {
|
|
46905
|
+
staticClass: "quit"
|
|
46906
|
+
}, [_c('span', [_vm._v("退出")]), _c('div', {
|
|
46907
|
+
staticClass: "center"
|
|
46908
|
+
}, [_c('div', {
|
|
46909
|
+
staticClass: "cen"
|
|
46910
|
+
}, [_c('span', [_vm._v("Esc")])]), _c('span', {
|
|
46911
|
+
staticClass: "text"
|
|
46912
|
+
}, [_vm._v("使用Esc键退出漫游")])])]);
|
|
46913
|
+
}];
|
|
46914
|
+
|
|
46915
|
+
// CONCATENATED MODULE: ./packages/components/com-graphics/per-control.vue?vue&type=template&id=f547d5c6&scoped=true
|
|
46916
|
+
|
|
46917
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/per-control.vue?vue&type=script&lang=js
|
|
46918
|
+
/* harmony default export */ var per_controlvue_type_script_lang_js = ({
|
|
46919
|
+
name: 'FLPerControl',
|
|
46920
|
+
data: function data() {
|
|
46921
|
+
return {};
|
|
46922
|
+
},
|
|
46923
|
+
created: function created() {},
|
|
46924
|
+
methods: {
|
|
46925
|
+
start: function start(val) {
|
|
46926
|
+
this.$emit('start', val);
|
|
46927
|
+
}
|
|
46928
|
+
}
|
|
46929
|
+
});
|
|
46930
|
+
// CONCATENATED MODULE: ./packages/components/com-graphics/per-control.vue?vue&type=script&lang=js
|
|
46931
|
+
/* harmony default export */ var com_graphics_per_controlvue_type_script_lang_js = (per_controlvue_type_script_lang_js);
|
|
46932
|
+
// EXTERNAL MODULE: ./packages/components/com-graphics/per-control.vue?vue&type=style&index=0&id=f547d5c6&prod&lang=scss&scoped=true
|
|
46933
|
+
var per_controlvue_type_style_index_0_id_f547d5c6_prod_lang_scss_scoped_true = __webpack_require__("b2fd");
|
|
46934
|
+
|
|
46935
|
+
// CONCATENATED MODULE: ./packages/components/com-graphics/per-control.vue
|
|
46936
|
+
|
|
46937
|
+
|
|
46938
|
+
|
|
46939
|
+
|
|
46940
|
+
|
|
46941
|
+
|
|
46942
|
+
/* normalize component */
|
|
46943
|
+
|
|
46944
|
+
var per_control_component = normalizeComponent(
|
|
46945
|
+
com_graphics_per_controlvue_type_script_lang_js,
|
|
46946
|
+
per_controlvue_type_template_id_f547d5c6_scoped_true_render,
|
|
46947
|
+
per_controlvue_type_template_id_f547d5c6_scoped_true_staticRenderFns,
|
|
46948
|
+
false,
|
|
46949
|
+
null,
|
|
46950
|
+
"f547d5c6",
|
|
46951
|
+
null
|
|
46952
|
+
|
|
46953
|
+
)
|
|
46954
|
+
|
|
46955
|
+
/* harmony default export */ var per_control = (per_control_component.exports);
|
|
45919
46956
|
// CONCATENATED MODULE: ./src/main.js
|
|
45920
46957
|
|
|
45921
46958
|
|
|
45922
46959
|
|
|
45923
|
-
|
|
46960
|
+
|
|
46961
|
+
var components = [com_graphics, com_flcanvas, per_control];
|
|
45924
46962
|
var main_install = function install(Vue) {
|
|
45925
46963
|
Vue.prototype.THREE = three_module_namespaceObject;
|
|
45926
46964
|
components.forEach(function (component) {
|
|
@@ -45935,7 +46973,8 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
45935
46973
|
/* harmony default export */ var main = ({
|
|
45936
46974
|
install: main_install,
|
|
45937
46975
|
FlModel: com_graphics,
|
|
45938
|
-
Fl2dcanvas: com_flcanvas
|
|
46976
|
+
Fl2dcanvas: com_flcanvas,
|
|
46977
|
+
FLPerControl: per_control
|
|
45939
46978
|
});
|
|
45940
46979
|
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
45941
46980
|
|