kitchen-simulator 1.1.1-test.72 → 1.1.1-test.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/@history.js +2 -5
- package/es/AppContext.js +3 -6
- package/es/KitchenConfigurator.js +86 -86
- package/es/KitchenConfiguratorApp.js +134 -128
- package/es/actions/area-actions.js +5 -8
- package/es/actions/export.js +12 -24
- package/es/actions/groups-actions.js +27 -41
- package/es/actions/holes-actions.js +34 -51
- package/es/actions/items-actions.js +94 -141
- package/es/actions/lines-actions.js +21 -32
- package/es/actions/project-actions.js +94 -141
- package/es/actions/scene-actions.js +11 -17
- package/es/actions/vertices-actions.js +7 -11
- package/es/actions/viewer2d-actions.js +21 -32
- package/es/actions/viewer3d-actions.js +9 -14
- package/es/catalog/areas/area/planner-element.js +2 -5
- package/es/catalog/catalog.js +15 -17
- package/es/catalog/factories/area-factory-3d.js +22 -26
- package/es/catalog/factories/area-factory.js +13 -15
- package/es/catalog/factories/export.js +6 -10
- package/es/catalog/factories/wall-factory-3d.js +31 -36
- package/es/catalog/factories/wall-factory.js +21 -26
- package/es/catalog/holes/door-closet/planner-element.js +15 -19
- package/es/catalog/holes/door-double/planner-element.js +15 -19
- package/es/catalog/holes/door-exterior/planner-element.js +16 -20
- package/es/catalog/holes/door-interior/planner-element.js +16 -20
- package/es/catalog/holes/door-panic/planner-element.js +7 -11
- package/es/catalog/holes/door-panic-double/planner-element.js +15 -19
- package/es/catalog/holes/door-sliding/planner-element.js +17 -21
- package/es/catalog/holes/doorway-framed/planner-element.js +11 -15
- package/es/catalog/holes/doorway-frameless/planner-element.js +7 -11
- package/es/catalog/holes/export.js +13 -29
- package/es/catalog/holes/window-clear/planner-element.js +10 -14
- package/es/catalog/holes/window-cross/planner-element.js +10 -14
- package/es/catalog/holes/window-double-hung/planner-element.js +10 -14
- package/es/catalog/holes/window-vertical/planner-element.js +10 -14
- package/es/catalog/lines/wall/planner-element.js +2 -5
- package/es/catalog/molding/molding-dcm/planner-element.js +5 -9
- package/es/catalog/molding/molding-fbm/planner-element.js +5 -9
- package/es/catalog/molding/molding-lrm/planner-element.js +5 -9
- package/es/catalog/properties/export.js +20 -31
- package/es/catalog/properties/property-checkbox.js +28 -29
- package/es/catalog/properties/property-color.js +16 -19
- package/es/catalog/properties/property-enum.js +24 -27
- package/es/catalog/properties/property-hidden.js +9 -12
- package/es/catalog/properties/property-lenght-measure.js +38 -41
- package/es/catalog/properties/property-length-measure.js +36 -39
- package/es/catalog/properties/property-length-measure_hole.js +38 -41
- package/es/catalog/properties/property-number.js +17 -20
- package/es/catalog/properties/property-read-only.js +16 -19
- package/es/catalog/properties/property-string.js +16 -19
- package/es/catalog/properties/property-toggle.js +16 -19
- package/es/catalog/properties/shared-property-style.js +1 -3
- package/es/catalog/utils/FuseUtils.js +12 -13
- package/es/catalog/utils/exporter.js +10 -11
- package/es/catalog/utils/geom-utils.js +13 -24
- package/es/catalog/utils/item-loader.js +86 -92
- package/es/catalog/utils/load-obj.js +20 -24
- package/es/catalog/utils/mtl-loader.js +3 -4
- package/es/catalog/utils/obj-loader.js +3 -4
- package/es/class/FuseUtils.js +12 -13
- package/es/class/area.js +24 -24
- package/es/class/export.js +23 -36
- package/es/class/group.js +53 -55
- package/es/class/guide.js +15 -17
- package/es/class/hole.js +83 -85
- package/es/class/item.js +155 -155
- package/es/class/layer.js +59 -61
- package/es/class/line.js +135 -138
- package/es/class/project.js +93 -94
- package/es/class/vertex.js +29 -31
- package/es/components/content.js +19 -23
- package/es/components/disclaimer/disclaimer.js +10 -13
- package/es/components/export.js +8 -13
- package/es/components/style/button.js +25 -25
- package/es/components/style/cancel-button.js +7 -10
- package/es/components/style/content-container.js +11 -12
- package/es/components/style/content-title.js +13 -15
- package/es/components/style/delete-button.js +8 -12
- package/es/components/style/export.js +30 -46
- package/es/components/style/form-block.js +10 -11
- package/es/components/style/form-color-input.js +7 -10
- package/es/components/style/form-label.js +10 -11
- package/es/components/style/form-number-input.js +45 -43
- package/es/components/style/form-number-input_2.js +41 -39
- package/es/components/style/form-select.js +19 -20
- package/es/components/style/form-slider.js +10 -13
- package/es/components/style/form-submit-button.js +8 -12
- package/es/components/style/form-text-input.js +30 -28
- package/es/components/viewer2d/area.js +17 -20
- package/es/components/viewer2d/export.js +30 -46
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +10 -13
- package/es/components/viewer2d/grids/grid-streak.js +10 -13
- package/es/components/viewer2d/grids/grid-vertical-streak.js +10 -13
- package/es/components/viewer2d/grids/grids.js +10 -14
- package/es/components/viewer2d/group.js +15 -19
- package/es/components/viewer2d/item.js +61 -65
- package/es/components/viewer2d/layer.js +23 -26
- package/es/components/viewer2d/line.js +101 -106
- package/es/components/viewer2d/ruler.js +22 -25
- package/es/components/viewer2d/rulerDist.js +21 -24
- package/es/components/viewer2d/rulerX.js +46 -44
- package/es/components/viewer2d/rulerY.js +44 -42
- package/es/components/viewer2d/scene.js +34 -34
- package/es/components/viewer2d/snap.js +13 -17
- package/es/components/viewer2d/state.js +18 -22
- package/es/components/viewer2d/utils.js +24 -33
- package/es/components/viewer2d/vertex.js +8 -12
- package/es/components/viewer2d/viewer2d.js +156 -159
- package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +21 -19
- package/es/components/viewer3d/dcm.js +1 -3
- package/es/components/viewer3d/fbm.js +1 -3
- package/es/components/viewer3d/front3D.js +12 -16
- package/es/components/viewer3d/grid-creator.js +8 -12
- package/es/components/viewer3d/grids/grid-horizontal-streak.js +6 -9
- package/es/components/viewer3d/grids/grid-streak.js +5 -8
- package/es/components/viewer3d/grids/grid-vertical-streak.js +6 -9
- package/es/components/viewer3d/libs/first-person-controls.js +2 -5
- package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +1 -3
- package/es/components/viewer3d/libs/mtl-loader.js +1 -3
- package/es/components/viewer3d/libs/obj-loader.js +1 -3
- package/es/components/viewer3d/libs/orbit-controls.js +2 -4
- package/es/components/viewer3d/libs/pointer-lock-controls.js +2 -4
- package/es/components/viewer3d/lrm.js +1 -3
- package/es/components/viewer3d/model.js +1 -3
- package/es/components/viewer3d/pointer-lock-navigation.js +3 -6
- package/es/components/viewer3d/ruler-utils/itemRect.js +18 -21
- package/es/components/viewer3d/ruler-utils/layer3D.js +59 -62
- package/es/components/viewer3d/ruler-utils/ruler3D.js +42 -43
- package/es/components/viewer3d/ruler-utils/scene3D.js +9 -13
- package/es/components/viewer3d/ruler-utils/state3D.js +4 -7
- package/es/components/viewer3d/scene-creator.js +197 -223
- package/es/components/viewer3d/three-memory-cleaner.js +3 -7
- package/es/components/viewer3d/viewer3d-first-person.js +42 -42
- package/es/components/viewer3d/viewer3d.js +200 -198
- package/es/constants.js +349 -354
- package/es/index.js +7 -11
- package/es/models.js +193 -191
- package/es/plugins/SVGLoader.js +48 -49
- package/es/plugins/autosave.js +3 -5
- package/es/plugins/console-debugger.js +6 -7
- package/es/plugins/export.js +8 -13
- package/es/plugins/keyboard.js +29 -31
- package/es/reducers/areas-reducer.js +7 -9
- package/es/reducers/export.js +24 -37
- package/es/reducers/groups-reducer.js +31 -33
- package/es/reducers/holes-reducer.js +43 -45
- package/es/reducers/items-reducer.js +106 -108
- package/es/reducers/lines-reducer.js +28 -30
- package/es/reducers/project-reducer.js +105 -107
- package/es/reducers/reducer.js +16 -19
- package/es/reducers/scene-reducer.js +15 -17
- package/es/reducers/user-reducer.js +5 -7
- package/es/reducers/vertices-reducer.js +11 -13
- package/es/reducers/viewer2d-reducer.js +18 -20
- package/es/reducers/viewer3d-reducer.js +16 -18
- package/es/shared-style.js +10 -12
- package/es/styles/export.js +3 -6
- package/es/translator/en.js +1 -3
- package/es/translator/it.js +1 -3
- package/es/translator/ru.js +1 -3
- package/es/translator/translator.js +13 -15
- package/es/utils/browser.js +2 -5
- package/es/utils/convert-units-lite.js +1 -3
- package/es/utils/email-validator.js +1 -3
- package/es/utils/export.js +15 -29
- package/es/utils/geometry.js +190 -280
- package/es/utils/get-edges-of-subgraphs.js +2 -5
- package/es/utils/graph-cycles.js +8 -7
- package/es/utils/graph-inner-cycles.js +10 -14
- package/es/utils/graph.js +9 -13
- package/es/utils/helper.js +41 -58
- package/es/utils/history.js +8 -11
- package/es/utils/id-broker.js +8 -11
- package/es/utils/logger.js +1 -3
- package/es/utils/math.js +5 -8
- package/es/utils/molding.js +130 -146
- package/es/utils/name-generator.js +7 -9
- package/es/utils/objects-utils.js +7 -14
- package/es/utils/phone-validator.js +1 -3
- package/es/utils/process-black-list.js +5 -6
- package/es/utils/react-if.js +7 -9
- package/es/utils/snap-scene.js +27 -30
- package/es/utils/snap.js +53 -57
- package/es/utils/summarizeCart.js +1 -3
- package/es/utils/threeCSG.es6.js +13 -17
- package/es/version.js +1 -3
- package/package.json +1 -1
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _export = require("../../components/style/export");
|
|
7
|
-
var _sharedPropertyStyle = _interopRequireDefault(require("./shared-property-style"));
|
|
8
|
-
function PropertyReadOnly(_ref) {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { FormLabel } from "../../components/style/export";
|
|
4
|
+
import PropertyStyle from "./shared-property-style";
|
|
5
|
+
export default function PropertyReadOnly(_ref) {
|
|
9
6
|
var value = _ref.value,
|
|
10
7
|
onUpdate = _ref.onUpdate,
|
|
11
8
|
configs = _ref.configs,
|
|
12
9
|
sourceElement = _ref.sourceElement,
|
|
13
10
|
internalState = _ref.internalState,
|
|
14
11
|
state = _ref.state;
|
|
15
|
-
return /*#__PURE__*/
|
|
12
|
+
return /*#__PURE__*/React.createElement("table", {
|
|
16
13
|
className: "PropertyReadOnly",
|
|
17
|
-
style:
|
|
18
|
-
}, /*#__PURE__*/
|
|
19
|
-
style:
|
|
20
|
-
}, /*#__PURE__*/
|
|
14
|
+
style: PropertyStyle.tableStyle
|
|
15
|
+
}, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
16
|
+
style: PropertyStyle.firstTdStyle
|
|
17
|
+
}, /*#__PURE__*/React.createElement(FormLabel, null, configs.label)), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("div", null, value)))));
|
|
21
18
|
}
|
|
22
19
|
PropertyReadOnly.propTypes = {
|
|
23
|
-
value:
|
|
24
|
-
onUpdate:
|
|
25
|
-
configs:
|
|
26
|
-
sourceElement:
|
|
27
|
-
internalState:
|
|
28
|
-
state:
|
|
20
|
+
value: PropTypes.any.isRequired,
|
|
21
|
+
onUpdate: PropTypes.func.isRequired,
|
|
22
|
+
configs: PropTypes.object.isRequired,
|
|
23
|
+
sourceElement: PropTypes.object,
|
|
24
|
+
internalState: PropTypes.object,
|
|
25
|
+
state: PropTypes.object.isRequired
|
|
29
26
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
|
-
var _export = require("../../components/style/export");
|
|
7
|
-
var _sharedPropertyStyle = _interopRequireDefault(require("./shared-property-style"));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { FormLabel, FormTextInput } from "../../components/style/export";
|
|
4
|
+
import PropertyStyle from "./shared-property-style";
|
|
8
5
|
var tableStyle = {
|
|
9
6
|
width: '100%',
|
|
10
7
|
borderSpacing: '2px 0',
|
|
@@ -14,7 +11,7 @@ var firstTdStyle = {
|
|
|
14
11
|
width: '6em',
|
|
15
12
|
textTransform: 'capitalize'
|
|
16
13
|
};
|
|
17
|
-
function PropertyString(_ref) {
|
|
14
|
+
export default function PropertyString(_ref) {
|
|
18
15
|
var value = _ref.value,
|
|
19
16
|
onUpdate = _ref.onUpdate,
|
|
20
17
|
configs = _ref.configs,
|
|
@@ -29,12 +26,12 @@ function PropertyString(_ref) {
|
|
|
29
26
|
}
|
|
30
27
|
return onUpdate(val);
|
|
31
28
|
};
|
|
32
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/React.createElement("table", {
|
|
33
30
|
className: "PropertyString",
|
|
34
|
-
style:
|
|
35
|
-
}, /*#__PURE__*/
|
|
36
|
-
style:
|
|
37
|
-
}, /*#__PURE__*/
|
|
31
|
+
style: PropertyStyle.tableStyle
|
|
32
|
+
}, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
33
|
+
style: PropertyStyle.firstTdStyle
|
|
34
|
+
}, /*#__PURE__*/React.createElement(FormLabel, null, configs.label)), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(FormTextInput, {
|
|
38
35
|
value: value,
|
|
39
36
|
onChange: function onChange(event) {
|
|
40
37
|
return update(event.target.value);
|
|
@@ -42,10 +39,10 @@ function PropertyString(_ref) {
|
|
|
42
39
|
})))));
|
|
43
40
|
}
|
|
44
41
|
PropertyString.propTypes = {
|
|
45
|
-
value:
|
|
46
|
-
onUpdate:
|
|
47
|
-
configs:
|
|
48
|
-
sourceElement:
|
|
49
|
-
internalState:
|
|
50
|
-
state:
|
|
42
|
+
value: PropTypes.any.isRequired,
|
|
43
|
+
onUpdate: PropTypes.func.isRequired,
|
|
44
|
+
configs: PropTypes.object.isRequired,
|
|
45
|
+
sourceElement: PropTypes.object,
|
|
46
|
+
internalState: PropTypes.object,
|
|
47
|
+
state: PropTypes.object.isRequired
|
|
51
48
|
};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _export = require("../../components/style/export");
|
|
7
|
-
var _sharedPropertyStyle = _interopRequireDefault(require("./shared-property-style"));
|
|
8
|
-
function PropertyToggle(_ref) {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { FormLabel, Button } from "../../components/style/export";
|
|
4
|
+
import PropertyStyle from "./shared-property-style";
|
|
5
|
+
export default function PropertyToggle(_ref) {
|
|
9
6
|
var value = _ref.value,
|
|
10
7
|
onUpdate = _ref.onUpdate,
|
|
11
8
|
configs = _ref.configs,
|
|
@@ -20,12 +17,12 @@ function PropertyToggle(_ref) {
|
|
|
20
17
|
}
|
|
21
18
|
return onUpdate(val);
|
|
22
19
|
};
|
|
23
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/React.createElement("table", {
|
|
24
21
|
className: "PropertyToggle",
|
|
25
|
-
style:
|
|
26
|
-
}, /*#__PURE__*/
|
|
27
|
-
style:
|
|
28
|
-
}, /*#__PURE__*/
|
|
22
|
+
style: PropertyStyle.tableStyle
|
|
23
|
+
}, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
24
|
+
style: PropertyStyle.firstTdStyle
|
|
25
|
+
}, /*#__PURE__*/React.createElement(FormLabel, null, configs.label)), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Button, {
|
|
29
26
|
onClick: function onClick(e) {
|
|
30
27
|
return update(!value);
|
|
31
28
|
},
|
|
@@ -33,10 +30,10 @@ function PropertyToggle(_ref) {
|
|
|
33
30
|
}, configs.actionName)))));
|
|
34
31
|
}
|
|
35
32
|
PropertyToggle.propTypes = {
|
|
36
|
-
value:
|
|
37
|
-
onUpdate:
|
|
38
|
-
configs:
|
|
39
|
-
sourceElement:
|
|
40
|
-
internalState:
|
|
41
|
-
state:
|
|
33
|
+
value: PropTypes.any.isRequired,
|
|
34
|
+
onUpdate: PropTypes.func.isRequired,
|
|
35
|
+
configs: PropTypes.object.isRequired,
|
|
36
|
+
sourceElement: PropTypes.object,
|
|
37
|
+
internalState: PropTypes.object,
|
|
38
|
+
state: PropTypes.object.isRequired
|
|
42
39
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
exports.__esModule = true;
|
|
2
|
-
exports["default"] = void 0;
|
|
3
1
|
var tableStyle = {
|
|
4
2
|
width: '100%',
|
|
5
3
|
borderSpacing: '2px 0',
|
|
@@ -13,4 +11,4 @@ var PropertyStyle = {
|
|
|
13
11
|
tableStyle: tableStyle,
|
|
14
12
|
firstTdStyle: firstTdStyle
|
|
15
13
|
};
|
|
16
|
-
|
|
14
|
+
export default PropertyStyle;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
5
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
8
7
|
var FuseUtils = /*#__PURE__*/function () {
|
|
9
8
|
function FuseUtils() {
|
|
10
|
-
(
|
|
9
|
+
_classCallCheck(this, FuseUtils);
|
|
11
10
|
}
|
|
12
|
-
return (
|
|
11
|
+
return _createClass(FuseUtils, null, [{
|
|
13
12
|
key: "filterArrayByString",
|
|
14
13
|
value: function filterArrayByString(mainArr, searchText) {
|
|
15
14
|
var _this = this;
|
|
@@ -38,7 +37,7 @@ var FuseUtils = /*#__PURE__*/function () {
|
|
|
38
37
|
return true;
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
|
-
if ((
|
|
40
|
+
if (_typeof(value) === 'object') {
|
|
42
41
|
if (this.searchInObj(value, searchText)) {
|
|
43
42
|
return true;
|
|
44
43
|
}
|
|
@@ -48,7 +47,7 @@ var FuseUtils = /*#__PURE__*/function () {
|
|
|
48
47
|
}, {
|
|
49
48
|
key: "searchInArray",
|
|
50
49
|
value: function searchInArray(arr, searchText) {
|
|
51
|
-
var _iterator = (
|
|
50
|
+
var _iterator = _createForOfIteratorHelper(arr),
|
|
52
51
|
_step;
|
|
53
52
|
try {
|
|
54
53
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -58,7 +57,7 @@ var FuseUtils = /*#__PURE__*/function () {
|
|
|
58
57
|
return true;
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
|
-
if ((
|
|
60
|
+
if (_typeof(value) === 'object') {
|
|
62
61
|
if (this.searchInObj(value, searchText)) {
|
|
63
62
|
return true;
|
|
64
63
|
}
|
|
@@ -77,4 +76,4 @@ var FuseUtils = /*#__PURE__*/function () {
|
|
|
77
76
|
}
|
|
78
77
|
}]);
|
|
79
78
|
}();
|
|
80
|
-
|
|
79
|
+
export default FuseUtils;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function _default(_ref) {
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
5
|
+
export default function (_ref) {
|
|
7
6
|
var itemID = _ref.itemID,
|
|
8
7
|
type = _ref.type,
|
|
9
8
|
long_name = _ref.long_name,
|
|
@@ -33,7 +32,7 @@ function _default(_ref) {
|
|
|
33
32
|
defaultValue: {
|
|
34
33
|
_length: sizeinfo.width,
|
|
35
34
|
_unit: 'in',
|
|
36
|
-
length:
|
|
35
|
+
length: convert(sizeinfo.width).from('in').to('cm')
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
};
|
|
@@ -46,7 +45,7 @@ function _default(_ref) {
|
|
|
46
45
|
defaultValue: {
|
|
47
46
|
_length: sizeinfo.width,
|
|
48
47
|
_unit: 'in',
|
|
49
|
-
length:
|
|
48
|
+
length: convert(sizeinfo.width).from('in').to('cm')
|
|
50
49
|
}
|
|
51
50
|
},
|
|
52
51
|
depth: {
|
|
@@ -55,7 +54,7 @@ function _default(_ref) {
|
|
|
55
54
|
defaultValue: {
|
|
56
55
|
_length: sizeinfo.depth,
|
|
57
56
|
_unit: 'in',
|
|
58
|
-
length:
|
|
57
|
+
length: convert(sizeinfo.depth).from('in').to('cm')
|
|
59
58
|
}
|
|
60
59
|
},
|
|
61
60
|
height: {
|
|
@@ -64,7 +63,7 @@ function _default(_ref) {
|
|
|
64
63
|
defaultValue: {
|
|
65
64
|
_length: sizeinfo.height,
|
|
66
65
|
_unit: 'in',
|
|
67
|
-
length:
|
|
66
|
+
length: convert(sizeinfo.height).from('in').to('cm')
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
};
|
|
@@ -90,7 +89,7 @@ function _default(_ref) {
|
|
|
90
89
|
is_corner: is_corner,
|
|
91
90
|
shape_svg: shape_svg
|
|
92
91
|
},
|
|
93
|
-
properties: (
|
|
92
|
+
properties: _objectSpread(_objectSpread({
|
|
94
93
|
altitude: {
|
|
95
94
|
label: 'Distance from floor',
|
|
96
95
|
type: 'length-measure',
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.baseBox3FromObject = baseBox3FromObject;
|
|
5
|
-
exports.baseBoxHelper = baseBoxHelper;
|
|
6
|
-
exports.controlGeom = controlGeom;
|
|
7
|
-
exports.createRotShape = createRotShape;
|
|
8
|
-
exports.emptyBoxHolder = emptyBoxHolder;
|
|
9
|
-
exports.makeMBoxfromObject = makeMBoxfromObject;
|
|
10
|
-
exports.rotGeoms = rotGeoms;
|
|
11
|
-
exports.upwardsGeom = upwardsGeom;
|
|
12
|
-
var Three = _interopRequireWildcard(require("three"));
|
|
13
|
-
var _constants = require("../../constants");
|
|
14
|
-
function controlGeom() {
|
|
1
|
+
import * as Three from 'three';
|
|
2
|
+
import { OBJTYPE_MESH } from "../../constants";
|
|
3
|
+
export function controlGeom() {
|
|
15
4
|
var vertices = new Float32Array([0, 0.02, 0.55, -0.08, 0, 0.5, -0.05, 0, 0.5, -0.05, 0, -0.5, -0.08, 0, -0.5, 0, 0.02, -0.55, 0.08, 0, -0.5, 0.05, 0, -0.5, 0.05, 0, 0.5, 0.08, 0, 0.5, 0, 0.02, 0.55, -0.08, 0.04, 0.5, -0.05, 0.04, 0.5, -0.05, 0.04, -0.5, -0.08, 0.04, -0.5, 0, 0.02, -0.55, 0.08, 0.04, -0.5, 0.05, 0.04, -0.5, 0.05, 0.04, 0.5, 0.08, 0.04, 0.5, 0, 0.02, 0.55]);
|
|
16
5
|
var indices = new Uint16Array([0, 1, 9, 4, 5, 6, 2, 3, 8, 3, 7, 8, 10, 11, 19, 14, 15, 16, 12, 13, 18, 13, 17, 18, 10, 1, 11, 10, 9, 19, 1, 2, 11, 2, 12, 11, 8, 9, 18, 9, 18, 19, 12, 2, 3, 12, 3, 13, 17, 7, 8, 17, 8, 18, 5, 4, 14, 15, 6, 16]);
|
|
17
6
|
var geometry = new Three.BufferGeometry();
|
|
@@ -19,7 +8,7 @@ function controlGeom() {
|
|
|
19
8
|
geometry.setIndex(new Three.BufferAttribute(indices, 1));
|
|
20
9
|
return geometry;
|
|
21
10
|
}
|
|
22
|
-
function upwardsGeom() {
|
|
11
|
+
export function upwardsGeom() {
|
|
23
12
|
var vertices = new Float32Array([0.05, 0, 0.05, 0.05, 0.3, 0.05, 0.07, 0.3, 0.05, 0, 0.4, 0.05, -0.07, 0.3, 0.05, -0.05, 0.3, 0.05, -0.05, 0, 0.05, 0.05, 0, 0.05, 0.05, 0, -0.05, 0.05, 0.3, -0.05, 0.07, 0.3, -0.05, 0, 0.4, -0.05, -0.07, 0.3, -0.05, -0.05, 0.3, -0.05, -0.05, 0, -0.05, 0.05, 0, -0.05]);
|
|
24
13
|
var indices = new Uint16Array([0, 1, 5, 0, 5, 6, 2, 3, 4, 0, 1, 8, 1, 8, 9, 1, 2, 9, 2, 9, 10, 2, 3, 10, 3, 10, 11, 3, 4, 11, 4, 11, 12, 4, 5, 12, 4, 12, 13, 5, 6, 13, 6, 13, 14, 6, 7, 14, 7, 14, 15, 8, 9, 13, 8, 13, 14, 10, 11, 12]);
|
|
25
14
|
var geometry = new Three.BufferGeometry();
|
|
@@ -27,7 +16,7 @@ function upwardsGeom() {
|
|
|
27
16
|
geometry.setIndex(new Three.BufferAttribute(indices, 1));
|
|
28
17
|
return geometry;
|
|
29
18
|
}
|
|
30
|
-
function createRotShape(radius) {
|
|
19
|
+
export function createRotShape(radius) {
|
|
31
20
|
var rotShape = new Three.Shape();
|
|
32
21
|
rotShape.moveTo(Math.cos(-60 / 180 * Math.PI) * (radius - 0.05), Math.sin(-60 / 180 * Math.PI) * (radius - 0.05));
|
|
33
22
|
for (var i = -55; i <= 60; i += 5) {
|
|
@@ -56,7 +45,7 @@ function createRotShape(radius) {
|
|
|
56
45
|
rotShape.lineTo(Math.cos(-60 / 180 * Math.PI) * (radius - 0.05), Math.sin(-60 / 180 * Math.PI) * (radius - 0.05));
|
|
57
46
|
return rotShape;
|
|
58
47
|
}
|
|
59
|
-
function rotGeoms(radius) {
|
|
48
|
+
export function rotGeoms(radius) {
|
|
60
49
|
if (!Number.isFinite(radius)) radius = 1;
|
|
61
50
|
var rotShape = createRotShape(radius);
|
|
62
51
|
var rotFill = new Three.ShapeGeometry(rotShape);
|
|
@@ -68,7 +57,7 @@ function rotGeoms(radius) {
|
|
|
68
57
|
rotStroke: rotStroke
|
|
69
58
|
};
|
|
70
59
|
}
|
|
71
|
-
function addShape(shape, extrudeSettings, color, x, y, z, rx, ry, rz, s) {
|
|
60
|
+
export function addShape(shape, extrudeSettings, color, x, y, z, rx, ry, rz, s) {
|
|
72
61
|
// flat shape
|
|
73
62
|
var geometry = geometry = new Three.ExtrudeGeometry(shape, extrudeSettings);
|
|
74
63
|
var mesh = new Three.Mesh(geometry, new Three.MeshPhongMaterial({
|
|
@@ -80,7 +69,7 @@ function addShape(shape, extrudeSettings, color, x, y, z, rx, ry, rz, s) {
|
|
|
80
69
|
mesh.scale.set(s, s, s);
|
|
81
70
|
return mesh;
|
|
82
71
|
}
|
|
83
|
-
function makeMBoxfromObject(props_Object) {
|
|
72
|
+
export function makeMBoxfromObject(props_Object) {
|
|
84
73
|
var _props_Object$childre;
|
|
85
74
|
var mBoxColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0x99c3fb;
|
|
86
75
|
if (!props_Object) {
|
|
@@ -159,10 +148,10 @@ function makeMBoxfromObject(props_Object) {
|
|
|
159
148
|
|
|
160
149
|
// }
|
|
161
150
|
|
|
162
|
-
function baseBoxHelper(object, color) {
|
|
151
|
+
export function baseBoxHelper(object, color) {
|
|
163
152
|
var tempobj = [];
|
|
164
153
|
for (var j = object.children.length - 1; j >= 0; j--) {
|
|
165
|
-
if (object.children[j].type !==
|
|
154
|
+
if (object.children[j].type !== OBJTYPE_MESH) {
|
|
166
155
|
tempobj.push(object.children[j]);
|
|
167
156
|
object.remove(object.children[j]);
|
|
168
157
|
}
|
|
@@ -173,10 +162,10 @@ function baseBoxHelper(object, color) {
|
|
|
173
162
|
});
|
|
174
163
|
return boxHelper;
|
|
175
164
|
}
|
|
176
|
-
function baseBox3FromObject(object) {
|
|
165
|
+
export function baseBox3FromObject(object) {
|
|
177
166
|
var tempobj = [];
|
|
178
167
|
for (var j = object.children.length - 1; j >= 0; j--) {
|
|
179
|
-
if (object.children[j].type !==
|
|
168
|
+
if (object.children[j].type !== OBJTYPE_MESH || object.children[j].name.includes('_countertop')) {
|
|
180
169
|
tempobj.push(object.children[j]);
|
|
181
170
|
object.remove(object.children[j]);
|
|
182
171
|
}
|
|
@@ -187,7 +176,7 @@ function baseBox3FromObject(object) {
|
|
|
187
176
|
});
|
|
188
177
|
return box3;
|
|
189
178
|
}
|
|
190
|
-
function emptyBoxHolder(newWidth, newHeight, newDepth) {
|
|
179
|
+
export function emptyBoxHolder(newWidth, newHeight, newDepth) {
|
|
191
180
|
var scale = 2.54 / 100;
|
|
192
181
|
var geometry = new Three.BoxGeometry(newWidth * scale, newHeight * scale, newDepth * scale);
|
|
193
182
|
var material = new Three.MeshBasicMaterial({
|