fl-web-component 1.0.8 → 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.
@@ -1211,13 +1211,6 @@ Factory_1.Factory.addGetterSetter(Arrow, 'pointerAtBeginning', false);
1211
1211
  Factory_1.Factory.addGetterSetter(Arrow, 'pointerAtEnding', true);
1212
1212
 
1213
1213
 
1214
- /***/ }),
1215
-
1216
- /***/ "1c33":
1217
- /***/ (function(module, exports, __webpack_require__) {
1218
-
1219
- // extracted by mini-css-extract-plugin
1220
-
1221
1214
  /***/ }),
1222
1215
 
1223
1216
  /***/ "1c49":
@@ -4646,6 +4639,17 @@ function _setPrototypeOf(t, e) {
4646
4639
  }
4647
4640
  module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
4648
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
+
4649
4653
  /***/ }),
4650
4654
 
4651
4655
  /***/ "5414":
@@ -11183,14 +11187,10 @@ module.exports = toPropertyKey, module.exports.__esModule = true, module.exports
11183
11187
 
11184
11188
  /***/ }),
11185
11189
 
11186
- /***/ "a470":
11187
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
11188
-
11189
- "use strict";
11190
- /* 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_5b13dc9d_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1c33");
11191
- /* 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_5b13dc9d_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_5b13dc9d_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
11192
- /* unused harmony reexport * */
11190
+ /***/ "acad":
11191
+ /***/ (function(module, exports, __webpack_require__) {
11193
11192
 
11193
+ // extracted by mini-css-extract-plugin
11194
11194
 
11195
11195
  /***/ }),
11196
11196
 
@@ -11208,6 +11208,17 @@ function _construct(t, e, r) {
11208
11208
  }
11209
11209
  module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
11210
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
+
11211
11222
  /***/ }),
11212
11223
 
11213
11224
  /***/ "b33b":
@@ -13811,6 +13822,13 @@ if (Global_1.Konva.isBrowser) {
13811
13822
  }
13812
13823
 
13813
13824
 
13825
+ /***/ }),
13826
+
13827
+ /***/ "e24a":
13828
+ /***/ (function(module, exports, __webpack_require__) {
13829
+
13830
+ // extracted by mini-css-extract-plugin
13831
+
13814
13832
  /***/ }),
13815
13833
 
13816
13834
  /***/ "e3af":
@@ -16118,19 +16136,19 @@ if (typeof window !== 'undefined') {
16118
16136
  // Indicate to webpack that this file can be concatenated
16119
16137
  /* harmony default export */ var setPublicPath = (null);
16120
16138
 
16121
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"537c0758-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=5b13dc9d&scoped=true
16122
- var com_graphicsvue_type_template_id_5b13dc9d_scoped_true_render = function render() {
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() {
16123
16141
  var _vm = this,
16124
16142
  _c = _vm._self._c;
16125
16143
  return _c('div', {
16126
16144
  attrs: {
16127
- "id": "instructions"
16145
+ "id": "fl-model"
16128
16146
  }
16129
16147
  });
16130
16148
  };
16131
16149
  var staticRenderFns = [];
16132
16150
 
16133
- // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=5b13dc9d&scoped=true
16151
+ // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=template&id=6e37e043&scoped=true
16134
16152
 
16135
16153
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
16136
16154
  var slicedToArray = __webpack_require__("278c");
@@ -38152,6 +38170,755 @@ function onPointerlockError() {
38152
38170
  console.error('THREE.PointerLockControls: Unable to use Pointer Lock API');
38153
38171
  }
38154
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
+
38155
38922
  // CONCATENATED MODULE: ./src/utils/threejs/measure-distance.js
38156
38923
 
38157
38924
 
@@ -41228,70 +41995,69 @@ var drawObjMapInstance = {};
41228
41995
  * @param {Object} instance - 实例对象,包含绘制对象ID和实例ID等数据
41229
41996
  * @param {Array} drawObjs - 绘制对象数组,包含几何数据
41230
41997
  */
41231
- function handleInstancedMeshModel(instances, drawObjs, type, scene, customColor) {
41998
+ function handleInstancedMeshModel(instances, drawObjs, type, scene, customColor, meshNameConfig) {
41232
41999
  // 第一阶段:构建实例映射表
41233
42000
  var modelGroup = new three_core_Group();
41234
42001
  for (var i = 0; i < instances.length; i++) {
41235
42002
  formatInstancedMap(instances[i], drawObjs);
41236
42003
  }
41237
- console.log('drawObjMapInstance', drawObjMapInstance);
41238
42004
  // 第二阶段:遍历所有实例进行处理
41239
42005
  var _loop = function _loop(_i) {
41240
42006
  var targetGroup, instancedMeshIndex, drawObjectName;
41241
- // for (let drawObjectId in drawObjMapInstance) {
41242
- // const drawObj = drawObjMapInstance[drawObjectId];
41243
- // drawObj.MapInstance.forEach((instance, index) => {
41244
- // if (instance.instanceId == instances[i].instanceId) {
41245
- // instancedMeshIndex = index;
41246
- // drawObjectName = drawObjectId;
41247
- // }
41248
- // });
41249
- // }
41250
-
41251
42007
  var drawObjInstance = drawObjMapInstance[instances[_i].drawObject];
41252
- drawObjInstance.MapInstance.forEach(function (instance, index) {
41253
- if (instance.instanceId == instances[_i].instanceId) {
41254
- instancedMeshIndex = index;
41255
- drawObjectName = instances[_i].drawObject;
42008
+ if (drawObjInstance.MapMesh.length > 0) {
42009
+ drawObjInstance.MapInstance.forEach(function (instance, index) {
42010
+ if (instance.instanceId == instances[_i].instanceId) {
42011
+ instancedMeshIndex = index;
42012
+ drawObjectName = instances[_i].drawObject;
42013
+ }
42014
+ });
42015
+ if (drawObjectName) {
42016
+ targetGroup = scene.getObjectByName(drawObjectName);
41256
42017
  }
41257
- });
41258
- if (drawObjectName) {
41259
- targetGroup = scene.getObjectByName(drawObjectName);
41260
- }
41261
- if (!targetGroup) {
41262
- var _drawObj$MapMesh;
41263
- var drawObj = drawObjMapInstance[instances[_i].drawObject];
41264
- var group = new three_core_Group();
41265
- group.name = instances[_i].drawObject;
41266
- group.userData.isInstancedMeshGroup = true;
41267
- var instanceCount = drawObj.MapInstance.length;
41268
- (_drawObj$MapMesh = drawObj.MapMesh) === null || _drawObj$MapMesh === void 0 ? void 0 : _drawObj$MapMesh.forEach(function (mesh) {
41269
- var model = instance_parser_drawModel(mesh, group.name, instanceCount, customColor);
41270
- if (!model) {
41271
- return;
41272
- }
41273
- drawObj.MapInstance.forEach(function (instance, index) {
41274
- if (instance.instanceId == instances[_i].instanceId) {
41275
- var _instance$matrix;
41276
- model.userData.instanceIndex = index;
41277
- model.name = instances[_i].instanceId;
41278
- var matrixVal = (_instance$matrix = instance.matrix) === null || _instance$matrix === void 0 ? void 0 : _instance$matrix.val;
41279
- if (matrixVal) {
41280
- var m4 = new three_core_Matrix4();
41281
- // m4.setPosition(new THREE.Vector3(9999999, 9999999, 9999999)); // TODO 临时隐藏方案
41282
- m4.elements = instance.matrix.val;
41283
- model.setMatrixAt(index, m4);
41284
- }
41285
- // 需要先设置全部实例颜色,否则后续设置颜色无效
41286
- var color = mesh.prop.color;
41287
- var meshColor = customColor ? new three_core_Color(customColor) : new three_core_Color("rgb(".concat(color[0], ", ").concat(color[1], ", ").concat(color[2], ")"));
41288
- model.setColorAt(index, meshColor);
42018
+ if (!targetGroup) {
42019
+ var _drawObj$MapMesh;
42020
+ var drawObj = drawObjMapInstance[instances[_i].drawObject];
42021
+ var group = new three_core_Group();
42022
+ group.name = instances[_i].drawObject;
42023
+ group.userData.isInstancedMeshGroup = true;
42024
+ var instanceCount = drawObj.MapInstance.length;
42025
+ (_drawObj$MapMesh = drawObj.MapMesh) === null || _drawObj$MapMesh === void 0 ? void 0 : _drawObj$MapMesh.forEach(function (mesh) {
42026
+ var model = instance_parser_drawModel(mesh, group.name, instanceCount, customColor);
42027
+ if (!model) {
42028
+ return;
42029
+ }
42030
+ var meshName = '';
42031
+ for (var key in meshNameConfig) {
42032
+ model.userData[key] = meshNameConfig[key];
42033
+ meshName += ':' + meshNameConfig[key];
41289
42034
  }
42035
+ drawObj.MapInstance.forEach(function (item, index) {
42036
+ if (item.instanceId == instances[_i].instanceId) {
42037
+ var _item$matrix;
42038
+ model.userData.instanceIndex = index;
42039
+ model.userData.instanceId = instances[_i].instanceId;
42040
+ model.name = meshName !== '' ? instances[_i].instanceId + meshName : instances[_i].instanceId;
42041
+ var matrixVal = (_item$matrix = item.matrix) === null || _item$matrix === void 0 ? void 0 : _item$matrix.val;
42042
+ if (matrixVal) {
42043
+ var m4 = new three_core_Matrix4();
42044
+ // m4.setPosition(new THREE.Vector3(9999999, 9999999, 9999999)); // TODO 临时隐藏方案
42045
+ m4.elements = item.matrix.val;
42046
+ model.setMatrixAt(index, m4);
42047
+ var copyMatrix = new three_core_Matrix4().copy(m4);
42048
+ model.userData.copyMatrix = copyMatrix;
42049
+ }
42050
+ // 需要先设置全部实例颜色,否则后续设置颜色无效
42051
+ var color = mesh.prop.color;
42052
+ var meshColor = customColor ? new three_core_Color(customColor) : new three_core_Color("rgb(".concat(color[0], ", ").concat(color[1], ", ").concat(color[2], ")"));
42053
+ model.setColorAt(index, meshColor);
42054
+ }
42055
+ });
42056
+ // model.instanceColor.needsUpdate = true;
42057
+ group.add(model);
41290
42058
  });
41291
- // model.instanceColor.needsUpdate = true;
41292
- group.add(model);
41293
- });
41294
- modelGroup.add(group);
42059
+ modelGroup.add(group);
42060
+ }
41295
42061
  }
41296
42062
  };
41297
42063
  for (var _i = 0; _i < instances.length; _i++) {
@@ -41602,7 +42368,7 @@ var com_graphicsvue_type_script_lang_js_ref = /*#__PURE__*/regenerator_default.a
41602
42368
  }
41603
42369
  }, _callee);
41604
42370
  })(null),
41605
- com_graphicsvue_type_script_lang_js_ref2 = slicedToArray_default()(com_graphicsvue_type_script_lang_js_ref, 17),
42371
+ com_graphicsvue_type_script_lang_js_ref2 = slicedToArray_default()(com_graphicsvue_type_script_lang_js_ref, 19),
41606
42372
  com_graphicsvue_type_script_lang_js_renderer = com_graphicsvue_type_script_lang_js_ref2[0],
41607
42373
  com_graphicsvue_type_script_lang_js_scene = com_graphicsvue_type_script_lang_js_ref2[1],
41608
42374
  com_graphicsvue_type_script_lang_js_camera = com_graphicsvue_type_script_lang_js_ref2[2],
@@ -41619,7 +42385,9 @@ var com_graphicsvue_type_script_lang_js_ref = /*#__PURE__*/regenerator_default.a
41619
42385
  clock = com_graphicsvue_type_script_lang_js_ref2[13],
41620
42386
  pointControls = com_graphicsvue_type_script_lang_js_ref2[14],
41621
42387
  threeMeasure = com_graphicsvue_type_script_lang_js_ref2[15],
41622
- 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];
41623
42391
  var _ref3 = /*#__PURE__*/regenerator_default.a.mark(function _callee2(v) {
41624
42392
  return regenerator_default.a.wrap(function _callee2$(_context2) {
41625
42393
  while (1) switch (_context2.prev = _context2.next) {
@@ -41636,12 +42404,12 @@ var _ref3 = /*#__PURE__*/regenerator_default.a.mark(function _callee2(v) {
41636
42404
  }
41637
42405
  }, _callee2);
41638
42406
  })(0),
41639
- _ref4 = slicedToArray_default()(_ref3, 5),
41640
- lastTime = _ref4[0],
41641
- firstTime = _ref4[1],
41642
- fpsClock = _ref4[2],
41643
- timeStamp = _ref4[3],
41644
- progress = _ref4[4];
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];
41645
42413
  var _ref5 = /*#__PURE__*/regenerator_default.a.mark(function _callee3(v) {
41646
42414
  return regenerator_default.a.wrap(function _callee3$(_context3) {
41647
42415
  while (1) switch (_context3.prev = _context3.next) {
@@ -41685,13 +42453,22 @@ var _ref7 = /*#__PURE__*/regenerator_default.a.mark(function _callee4(v) {
41685
42453
  })(true),
41686
42454
  _ref8 = slicedToArray_default()(_ref7, 1),
41687
42455
  spaceUp = _ref8[0];
41688
- var clippingPlanes = [];
42456
+ var clippingMesh = [];
41689
42457
  var removeSpeed = 200,
41690
42458
  upSpeed = 200; //控制器移动速度 , //控制跳起时的速度
41691
- var com_graphicsvue_type_script_lang_js_modelGroup;
41692
-
42459
+ var roamConfig = {
42460
+ loop: false,
42461
+ speed: 0,
42462
+ // 最大值为3
42463
+ name: ''
42464
+ };
42465
+ var guiParams = {
42466
+ 'x轴': 0,
42467
+ 'y轴': 0,
42468
+ 'z轴': 0
42469
+ };
41693
42470
  // 绘制对象映射实例表
41694
- var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42471
+
41695
42472
 
41696
42473
 
41697
42474
 
@@ -41713,12 +42490,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
41713
42490
  }
41714
42491
  },
41715
42492
  data: function data() {
41716
- return {
41717
- roamConfig: {
41718
- loop: false,
41719
- speed: 0 // 最大值为3
41720
- }
41721
- };
42493
+ return {};
41722
42494
  },
41723
42495
  created: function created() {
41724
42496
  CameraControls.install({
@@ -41729,7 +42501,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
41729
42501
  com_graphicsvue_type_script_lang_js_mouse = new this.THREE.Vector2();
41730
42502
  },
41731
42503
  mounted: function mounted() {
41732
- instructions = document.getElementById('instructions');
42504
+ instructions = document.getElementById('fl-model');
41733
42505
  this.initRender();
41734
42506
  this.initScene();
41735
42507
  this.initCamera();
@@ -41801,9 +42573,12 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
41801
42573
  /*
41802
42574
  参数:data 模型数据
41803
42575
  color: '' 初始化模型的颜色 在业务方 有这个需求
42576
+ meshNameConfig: {}
41804
42577
  */
41805
42578
  drawModel: function drawModel(data) {
42579
+ var _this = this;
41806
42580
  var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
42581
+ var meshNameConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
41807
42582
  if (Object.keys(data).length === 0) {
41808
42583
  return;
41809
42584
  }
@@ -41811,14 +42586,58 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
41811
42586
  instances = _parseData.instances,
41812
42587
  drawObjs = _parseData.drawObjs;
41813
42588
  if (instances.length > 0) {
41814
- com_graphicsvue_type_script_lang_js_modelGroup = handleInstancedMeshModel(instances, drawObjs, '', com_graphicsvue_type_script_lang_js_scene, color);
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);
41815
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
+ });
41816
42623
  // this.compileShader();
41817
42624
  // cameraControls.fitToSphere(scene, true); // TODO 待处理,先用 setModelCenter 进行定位
41818
42625
  this.setModelCenter(com_graphicsvue_type_script_lang_js_modelGroup);
41819
42626
  // cameraControls.saveState();
41820
42627
  }
41821
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
+ },
41822
42641
  compileShader: function compileShader() {
41823
42642
  com_graphicsvue_type_script_lang_js_scene.traverse(function (child) {
41824
42643
  if (child.isMesh) {
@@ -41942,16 +42761,16 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
41942
42761
  * }
41943
42762
  */
41944
42763
  updateProperty: function updateProperty(list) {
41945
- var _this = this;
42764
+ var _this2 = this;
41946
42765
  var _loop = function _loop() {
41947
42766
  var ele = list[index];
41948
- var targetObj = _this.getObjectByName(ele.name);
42767
+ var targetObj = _this2.getObjectByName(ele.name);
41949
42768
  var _loop2 = function _loop2(key) {
41950
42769
  switch (key) {
41951
42770
  case 'color':
41952
42771
  targetObj.forEach(function (children) {
41953
42772
  if (children.isMesh) {
41954
- children.setColorAt(children.userData.instanceIndex, new _this.THREE.Color(ele.attr[key]));
42773
+ children.setColorAt(children.userData.instanceIndex, new _this2.THREE.Color(ele.attr[key]));
41955
42774
  children.instanceColor.needsUpdate = true;
41956
42775
  }
41957
42776
  });
@@ -41959,14 +42778,25 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
41959
42778
  case 'visible':
41960
42779
  targetObj.forEach(function (children) {
41961
42780
  var index = children.userData.instanceIndex;
41962
- children.geometry.attributes.visible.array[index] = ele.attr[key] ? 1.0 : 0.0;
41963
- children.geometry.attributes.visible.needsUpdate = true;
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;
41964
42789
  });
41965
42790
  break;
41966
42791
  case 'opacity':
41967
42792
  obj.material.opacity = ele.attr[key];
41968
42793
  obj.material.transparent = true;
41969
42794
  break;
42795
+ case 'position':
42796
+ targetObj.forEach(function (children) {
42797
+ children.position.set(ele.attr[key].x, ele.attr[key].y, ele.attr[key].z);
42798
+ });
42799
+ break;
41970
42800
  }
41971
42801
  };
41972
42802
  for (var key in ele.attr) {
@@ -41978,7 +42808,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
41978
42808
  _loop();
41979
42809
  }
41980
42810
  },
41981
- // 修改整体模型实体的属性
42811
+ // 修改整个场景中模型实体的属性
41982
42812
  /*
41983
42813
  {
41984
42814
  attr: '', 需要修改属性名(color、visible(true / false)、opacity(0-1),
@@ -41986,13 +42816,14 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
41986
42816
  }
41987
42817
  */
41988
42818
  updateWholeProperty: function updateWholeProperty(params) {
41989
- var _this2 = this;
42819
+ var _this3 = this;
41990
42820
  if (com_graphicsvue_type_script_lang_js_scene) {
41991
42821
  com_graphicsvue_type_script_lang_js_scene.traverse(function (obj) {
41992
- if (obj instanceof _this2.THREE.Mesh) {
42822
+ if (obj instanceof _this3.THREE.Mesh) {
41993
42823
  switch (params.attr) {
41994
42824
  case 'color':
41995
- obj.material.color = new _this2.THREE.Color(params.value);
42825
+ obj.setColorAt(obj.userData.instanceIndex, new _this3.THREE.Color(params.value));
42826
+ obj.instanceColor.needsUpdate = true;
41996
42827
  break;
41997
42828
  case 'visible':
41998
42829
  obj.material.visible = params.value;
@@ -42009,6 +42840,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42009
42840
  },
42010
42841
  // 清除上一次的属性修改操作 为了方便业务平台参数跟updateProperty方法的参数一样
42011
42842
  resetProperty: function resetProperty(list) {
42843
+ var _this4 = this;
42012
42844
  for (var index = 0; index < list.length; index++) {
42013
42845
  var ele = list[index];
42014
42846
  var _obj = this.getObjectByName(ele.name);
@@ -42023,20 +42855,64 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42023
42855
  }
42024
42856
  });
42025
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;
42026
42866
  }
42027
42867
  }
42028
42868
  }
42029
42869
  }
42030
42870
  },
42031
42871
  // 定位到模型
42032
- locateModel: function locateModel(id) {
42033
- var obj = com_graphicsvue_type_script_lang_js_scene.getObjectByName(id);
42872
+ locateModel: function locateModel(name) {
42873
+ var obj = com_graphicsvue_type_script_lang_js_scene.getObjectByName(name);
42034
42874
  if (obj) {
42035
42875
  // cameraControls.fitToSphere(obj.parent, true); // TODO 待处理,先用 setModelCenter 进行定位
42036
42876
  this.setModelCenter(obj.parent);
42037
42877
  // cameraControls.fitToBox( obj, true);
42038
42878
  }
42039
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
+ },
42040
42916
  // 相机定位
42041
42917
  /*
42042
42918
  定位参数:x: 相机的x位置, y: 相机的y位置, z: 相机的z位置
@@ -42105,6 +42981,40 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42105
42981
  }
42106
42982
  });
42107
42983
  },
42984
+ // 删除场景中所有的实体
42985
+ removeAll: function removeAll() {
42986
+ var _this6 = this;
42987
+ if (com_graphicsvue_type_script_lang_js_scene) {
42988
+ com_graphicsvue_type_script_lang_js_scene.traverse(function (item) {
42989
+ item.material && item.material.dispose();
42990
+ item.geometry && item.geometry.dispose();
42991
+ if (item instanceof _this6.THREE.Mesh) {
42992
+ item.clear();
42993
+ }
42994
+ com_graphicsvue_type_script_lang_js_scene.remove(item);
42995
+ });
42996
+ com_graphicsvue_type_script_lang_js_scene.clear();
42997
+ }
42998
+ },
42999
+ // 销毁场景 释放内存
43000
+ destroyScene: function destroyScene() {
43001
+ cancelAnimationFrame(animateId);
43002
+ if (com_graphicsvue_type_script_lang_js_scene) {
43003
+ com_graphicsvue_type_script_lang_js_scene.traverse(function (child) {
43004
+ child.material && child.material.dispose();
43005
+ child.geometry && child.geometry.dispose();
43006
+ child = null;
43007
+ });
43008
+ com_graphicsvue_type_script_lang_js_scene.clear();
43009
+ com_graphicsvue_type_script_lang_js_scene = null;
43010
+ }
43011
+ com_graphicsvue_type_script_lang_js_renderer.forceContextLoss();
43012
+ com_graphicsvue_type_script_lang_js_renderer.dispose();
43013
+ com_graphicsvue_type_script_lang_js_camera = null;
43014
+ cameraControls = null;
43015
+ com_graphicsvue_type_script_lang_js_renderer.domElement = null;
43016
+ com_graphicsvue_type_script_lang_js_renderer = null;
43017
+ },
42108
43018
  // 绘制曲线
42109
43019
  /*
42110
43020
  参数声明:Object
@@ -42115,11 +43025,11 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42115
43025
  }
42116
43026
  */
42117
43027
  drawCurve: function drawCurve(params) {
42118
- var _this3 = this;
43028
+ var _this7 = this;
42119
43029
  this.removeObjectByName(params.name);
42120
43030
  var route = [];
42121
43031
  params.path.forEach(function (element) {
42122
- route.push(new _this3.THREE.Vector3(element.x, element.y, element.z));
43032
+ route.push(new _this7.THREE.Vector3(element.x, element.y, element.z));
42123
43033
  });
42124
43034
  if (route.length > 1) {
42125
43035
  com_graphicsvue_type_script_lang_js_curve = new this.THREE.CatmullRomCurve3(route);
@@ -42135,12 +43045,19 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42135
43045
  }
42136
43046
  },
42137
43047
  // 绘制贴图曲线
43048
+ /*
43049
+ 参数声明:Object
43050
+ {
43051
+ path: [{x:0, y: 0, z: 0}], 坐标点信息
43052
+ name: '', // 线条的名字, 用来清除时使用的
43053
+ }
43054
+ */
42138
43055
  drawTextureCurve: function drawTextureCurve(params) {
42139
- var _this4 = this;
43056
+ var _this8 = this;
42140
43057
  this.removeObjectByName(params.name);
42141
43058
  var route = [];
42142
43059
  params.path.forEach(function (element) {
42143
- route.push(new _this4.THREE.Vector3(element.x, element.y, element.z));
43060
+ route.push(new _this8.THREE.Vector3(element.x, element.y, element.z));
42144
43061
  });
42145
43062
  // 画曲线
42146
43063
  if (route.length > 1) {
@@ -42163,8 +43080,10 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42163
43080
  var line = new this.THREE.Line(geometry, material);
42164
43081
  line.name = params.name;
42165
43082
  com_graphicsvue_type_script_lang_js_scene.add(line);
43083
+ clock = new this.THREE.Clock();
42166
43084
  }
42167
43085
  },
43086
+ //
42168
43087
  // 开启漫游
42169
43088
  /*
42170
43089
  参数为Object
@@ -42175,31 +43094,38 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42175
43094
  */
42176
43095
  startRoam: function startRoam(params) {
42177
43096
  progress = 0;
42178
- this.roamConfig = Object.assign({}, {
43097
+ roamConfig = {
42179
43098
  loop: params.loop,
42180
- speed: params.speed,
42181
- roamName: params.name
42182
- });
43099
+ speed: params.speed
43100
+ };
42183
43101
  this.drawTextureCurve({
42184
43102
  name: params.name,
42185
43103
  path: params.path
42186
43104
  });
42187
- clock = new this.THREE.Clock();
43105
+ roaming = true;
43106
+ // clock = new this.THREE.Clock();
42188
43107
  },
42189
- // 暂停漫游
42190
- pauseRoaming: function pauseRoaming() {
42191
- this.$set(this.roamConfig, 'speed', 0);
43108
+ // 更新漫游的配置
43109
+ /*
43110
+ 参数为Object
43111
+ */
43112
+ updateRoamConfig: function updateRoamConfig(params) {
43113
+ for (var key in params) {
43114
+ roamConfig[key] = params[key];
43115
+ }
42192
43116
  },
42193
43117
  // 结束/退出漫游
42194
43118
  endRoam: function endRoam() {
42195
43119
  roaming = false;
42196
43120
  progress = 0;
42197
- this.removeObjectByName(this.roamConfig.roamName);
42198
- this.roamConfig = Object.assign({}, {
43121
+ this.removeObjectByName(roamConfig.name);
43122
+ roamConfig = {
42199
43123
  loop: false,
42200
43124
  speed: 0,
42201
- roamName: ''
42202
- });
43125
+ name: ''
43126
+ };
43127
+ roaming = false;
43128
+ lineTexture = null;
42203
43129
  },
42204
43130
  // 相机跟随轨道
42205
43131
  cameraTrack: function cameraTrack() {
@@ -42216,16 +43142,16 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42216
43142
  com_graphicsvue_type_script_lang_js_camera.lookAt(pointBox.x, pointBox.y + 5, pointBox.z);
42217
43143
  cameraControls.setPosition(point.x, point.y + 5, point.z, false);
42218
43144
  cameraControls.setTarget(pointBox.x, pointBox.y + 5, pointBox.z, false);
42219
- progress += this.roamConfig.speed / 300;
43145
+ progress += roamConfig.speed / 300;
42220
43146
  } else {
42221
43147
  // 循环漫游
42222
- if (this.roamConfig.loop) {
43148
+ if (roamConfig.loop) {
42223
43149
  progress = 0;
42224
43150
  }
42225
43151
  }
42226
43152
  } else {
42227
43153
  lineTexture = null;
42228
- this.roamConfig.progress = 0;
43154
+ progress = 0;
42229
43155
  }
42230
43156
  },
42231
43157
  // 全局整体炸开
@@ -42233,16 +43159,16 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42233
43159
  * 参数val: 爆炸的值
42234
43160
  */
42235
43161
  globalBomb: function globalBomb(val) {
42236
- var _this5 = this;
43162
+ var _this9 = this;
42237
43163
  if (com_graphicsvue_type_script_lang_js_scene.children.length === 0) return;
42238
43164
  for (var i = 0; i < com_graphicsvue_type_script_lang_js_scene.children.length; i++) {
42239
43165
  com_graphicsvue_type_script_lang_js_scene.children[i].traverse(function (item) {
42240
43166
  if (!item.isMesh || !item.worldDir) return;
42241
43167
  // 爆炸公式
42242
- _this5.computedBomb(item, val);
43168
+ _this9.computedBomb(item, val);
42243
43169
  });
42244
43170
  }
42245
- this.timeRender();
43171
+ // this.timeRender();
42246
43172
  },
42247
43173
  // 单个实体模型炸开
42248
43174
  /*
@@ -42266,11 +43192,24 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42266
43192
  剖切值变换时, 使用
42267
43193
  */
42268
43194
  setGlobalClipping: function setGlobalClipping() {
43195
+ var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
42269
43196
  var box3 = new this.THREE.Box3().setFromObject(com_graphicsvue_type_script_lang_js_scene.children[0]);
42270
43197
  var max = box3.max;
42271
43198
  var min = box3.min;
42272
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)];
42273
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
+ }
42274
43213
  return {
42275
43214
  min: min,
42276
43215
  max: max
@@ -42294,18 +43233,45 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42294
43233
  },
42295
43234
  // 取消全局剖切
42296
43235
  cancelGlobalClipping: function cancelGlobalClipping() {
43236
+ guiParams = {
43237
+ 'x轴': 0,
43238
+ 'y轴': 0,
43239
+ 'z轴': 0
43240
+ };
42297
43241
  com_graphicsvue_type_script_lang_js_renderer.clippingPlanes = Object.freeze([]);
43242
+ gui && gui.destroy();
42298
43243
  },
42299
- // 单个实体的剖切/ 局部剖切 obj 实体对象
43244
+ // 单个实体的剖切/ 局部剖切 obj 实体对象 flag 代表是否使用图形组件自带的剖切面板 默认为true
42300
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);
42301
43249
  com_graphicsvue_type_script_lang_js_renderer.localClippingEnabled = true;
42302
43250
  // mesh的boundingBox 可以获取到该对象位置的最大最小值 但是在这里我们需要把y、z轴互换
42303
- var boundingBox = new this.THREE.Box3().copy(obj.geometry.boundingBox);
43251
+ var boundingBox = new this.THREE.Box3().copy(obj.boundingBox);
42304
43252
  boundingBox.applyMatrix4(obj.matrixWorld);
42305
- 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))];
42306
43254
  obj.material.clippingPlanes = clippingPlanes;
42307
43255
  obj.material.needsUpdate = true;
42308
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
+ };
42309
43275
  },
42310
43276
  // 更新局部剖切的值
42311
43277
  /*
@@ -42318,14 +43284,43 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42318
43284
  y: 1,
42319
43285
  z: 2
42320
43286
  };
43287
+ var obj = clippingMesh[clippingMesh.length - 1];
42321
43288
  for (var key in params) {
42322
- clippingPlanes[axis[key]].constant = params[key];
43289
+ obj.material.clippingPlanes[axis[key]].constant = params[key];
43290
+ obj.material.needsUpdate = true;
42323
43291
  }
42324
43292
  // this.timeRender()
42325
43293
  },
42326
43294
  // 取消局部/单个实体的剖切
42327
43295
  cancelLocalClipping: function cancelLocalClipping() {
42328
- clippingPlanes = Object.freeze([]);
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
+ });
42329
43324
  },
42330
43325
  // 开启第一视角
42331
43326
  startFirstPer: function startFirstPer() {
@@ -42338,7 +43333,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42338
43333
  },
42339
43334
  // 页面是否锁定
42340
43335
  initPointerLock: function initPointerLock() {
42341
- var _this6 = this;
43336
+ var _this0 = this;
42342
43337
  this.home();
42343
43338
  setTimeout(function () {
42344
43339
  pointControls = new PointerLockControls_PointerLockControls(com_graphicsvue_type_script_lang_js_camera, com_graphicsvue_type_script_lang_js_renderer.domElement);
@@ -42346,10 +43341,10 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42346
43341
  // 锁定
42347
43342
  pointControls.addEventListener('lock', function () {
42348
43343
  cameraControls.enabled = false;
42349
- window.addEventListener('keydown', _this6.onKeyDown, false);
42350
- window.addEventListener('keyup', _this6.onKeyUp, false);
42351
- com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mouseup', _this6.mouseClick, false);
42352
- com_graphicsvue_type_script_lang_js_renderer.domElement.removeEventListener('mousedown', _this6.mouseDown, false);
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);
42353
43348
  });
42354
43349
  // 解锁
42355
43350
  pointControls.addEventListener('unlock', function () {
@@ -42359,10 +43354,10 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42359
43354
  cameraControls.reset(true);
42360
43355
  cameraControls.update(0);
42361
43356
  setTimeout(function () {
42362
- window.removeEventListener('keydown', _this6.onKeyDown);
42363
- window.removeEventListener('keyup', _this6.onKeyUp);
42364
- com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mouseup', _this6.mouseClick, false);
42365
- com_graphicsvue_type_script_lang_js_renderer.domElement.addEventListener('mousedown', _this6.mouseDown, false);
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);
42366
43361
  // this.timeRender()
42367
43362
  }, 0);
42368
43363
  });
@@ -42477,9 +43472,9 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42477
43472
  },
42478
43473
  // 返回主视角/恢复相机初始状态
42479
43474
  home: function home() {
42480
- // if (roaming) {
42481
- // this.disposeRoaming()
42482
- // }
43475
+ if (roaming) {
43476
+ this.endRoam();
43477
+ }
42483
43478
  cameraControls.reset(true);
42484
43479
  cameraControls.update(0);
42485
43480
  // this.timeRender()
@@ -42585,7 +43580,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42585
43580
  },
42586
43581
  // 还原操作 将修改过的实体进行恢复
42587
43582
  restore: function restore() {
42588
- var _this7 = this;
43583
+ var _this1 = this;
42589
43584
  com_graphicsvue_type_script_lang_js_scene.traverse(function (item) {
42590
43585
  if (item.isMesh) {
42591
43586
  item.material.opacity = 1.0;
@@ -42608,7 +43603,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42608
43603
  item.userData.translateMatrixInvert = null;
42609
43604
  }
42610
43605
  if (item.userData.combineMatrixInvert) {
42611
- _this7.rotateMesh(item, {
43606
+ _this1.rotateMesh(item, {
42612
43607
  x: 0,
42613
43608
  y: 0,
42614
43609
  z: 0
@@ -42621,7 +43616,7 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42621
43616
  animate: function animate() {
42622
43617
  var delta = fpsClock.getDelta();
42623
43618
  timeStamp += delta;
42624
- requestAnimationFrame(this.animate);
43619
+ animateId = requestAnimationFrame(this.animate);
42625
43620
  cameraControls.enabled && cameraControls.update(timeStamp);
42626
43621
  this.cameraTrack();
42627
43622
  this.firstPerspective();
@@ -42632,8 +43627,8 @@ var com_graphicsvue_type_script_lang_js_drawObjMapInstance = {};
42632
43627
  });
42633
43628
  // CONCATENATED MODULE: ./packages/components/com-graphics/index.vue?vue&type=script&lang=js
42634
43629
  /* harmony default export */ var components_com_graphicsvue_type_script_lang_js = (com_graphicsvue_type_script_lang_js);
42635
- // EXTERNAL MODULE: ./packages/components/com-graphics/index.vue?vue&type=style&index=0&id=5b13dc9d&prod&lang=scss&scoped=true
42636
- var com_graphicsvue_type_style_index_0_id_5b13dc9d_prod_lang_scss_scoped_true = __webpack_require__("a470");
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");
42637
43632
 
42638
43633
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
42639
43634
  /* globals __VUE_SSR_CONTEXT__ */
@@ -42744,17 +43739,17 @@ function normalizeComponent(
42744
43739
 
42745
43740
  var component = normalizeComponent(
42746
43741
  components_com_graphicsvue_type_script_lang_js,
42747
- com_graphicsvue_type_template_id_5b13dc9d_scoped_true_render,
43742
+ com_graphicsvue_type_template_id_6e37e043_scoped_true_render,
42748
43743
  staticRenderFns,
42749
43744
  false,
42750
43745
  null,
42751
- "5b13dc9d",
43746
+ "6e37e043",
42752
43747
  null
42753
43748
 
42754
43749
  )
42755
43750
 
42756
43751
  /* harmony default export */ var com_graphics = (component.exports);
42757
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"537c0758-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
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
42758
43753
  var com_flcanvasvue_type_template_id_83d38700_scoped_true_render = function render() {
42759
43754
  var _vm = this,
42760
43755
  _c = _vm._self._c;
@@ -44999,10 +45994,6 @@ function DxfParser_getAcadColor(index) {
44999
45994
  // EXTERNAL MODULE: ./node_modules/jspdf/dist/jspdf.es.min.js
45000
45995
  var jspdf_es_min = __webpack_require__("8baf");
45001
45996
 
45002
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js
45003
- var helpers_typeof = __webpack_require__("7037");
45004
- var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
45005
-
45006
45997
  // CONCATENATED MODULE: ./packages/components/com-flcanvas/components/round10.js
45007
45998
  // This is based on the example code found from:
45008
45999
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor
@@ -45854,11 +46845,120 @@ var com_flcanvas_component = normalizeComponent(
45854
46845
  )
45855
46846
 
45856
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);
45857
46956
  // CONCATENATED MODULE: ./src/main.js
45858
46957
 
45859
46958
 
45860
46959
 
45861
- var components = [com_graphics, com_flcanvas];
46960
+
46961
+ var components = [com_graphics, com_flcanvas, per_control];
45862
46962
  var main_install = function install(Vue) {
45863
46963
  Vue.prototype.THREE = three_module_namespaceObject;
45864
46964
  components.forEach(function (component) {
@@ -45873,7 +46973,8 @@ if (typeof window !== 'undefined' && window.Vue) {
45873
46973
  /* harmony default export */ var main = ({
45874
46974
  install: main_install,
45875
46975
  FlModel: com_graphics,
45876
- Fl2dcanvas: com_flcanvas
46976
+ Fl2dcanvas: com_flcanvas,
46977
+ FLPerControl: per_control
45877
46978
  });
45878
46979
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
45879
46980