kitchen-simulator 1.1.1-test.7 → 1.1.1-test.71
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/KitchenConfigurator.js +34 -54
- package/es/KitchenConfiguratorApp.js +63 -81
- package/es/actions/holes-actions.js +1 -1
- package/es/actions/items-actions.js +1 -1
- package/es/actions/lines-actions.js +1 -1
- package/es/actions/project-actions.js +1 -1
- package/es/actions/scene-actions.js +1 -1
- package/es/actions/vertices-actions.js +1 -1
- package/es/actions/viewer2d-actions.js +1 -1
- package/es/actions/viewer3d-actions.js +1 -1
- package/es/catalog/areas/area/planner-element.js +10 -7
- package/es/catalog/catalog.js +3 -12
- package/es/catalog/factories/area-factory.js +1 -4
- package/es/catalog/factories/wall-factory-3d.js +1 -1
- package/es/catalog/holes/export.js +13 -13
- package/es/catalog/lines/wall/planner-element.js +13 -10
- package/es/catalog/properties/property-checkbox.js +64 -22
- package/es/catalog/properties/property-enum.js +52 -15
- package/es/catalog/properties/property-lenght-measure.js +4 -5
- package/es/catalog/properties/property-length-measure.js +55 -12
- package/es/catalog/properties/property-length-measure_hole.js +4 -5
- package/es/catalog/utils/FuseUtils.js +3 -6
- package/es/catalog/utils/exporter.js +2 -5
- package/es/catalog/utils/item-loader.js +4 -11
- package/es/catalog/utils/mtl-loader.js +3 -2
- package/es/catalog/utils/obj-loader.js +3 -2
- package/es/class/FuseUtils.js +3 -6
- package/es/class/area.js +4 -8
- package/es/class/group.js +6 -15
- package/es/class/guide.js +2 -6
- package/es/class/hole.js +7 -12
- package/es/class/item.js +12 -23
- package/es/class/layer.js +4 -8
- package/es/class/line.js +3 -12
- package/es/class/project.js +7 -11
- package/es/class/vertex.js +3 -7
- package/es/components/content.js +1 -0
- package/es/components/disclaimer/disclaimer.js +66 -86
- package/es/components/style/button.js +7 -14
- package/es/components/style/cancel-button.js +2 -3
- package/es/components/style/content-container.js +1 -4
- package/es/components/style/content-title.js +3 -7
- package/es/components/style/delete-button.js +2 -3
- package/es/components/style/form-block.js +3 -7
- package/es/components/style/form-color-input.js +2 -3
- package/es/components/style/form-label.js +3 -7
- package/es/components/style/form-number-input.js +36 -18
- package/es/components/style/form-number-input_2.js +6 -12
- package/es/components/style/form-select.js +50 -11
- package/es/components/style/form-slider.js +24 -9
- package/es/components/style/form-submit-button.js +2 -3
- package/es/components/style/form-text-input.js +38 -26
- package/es/components/viewer2d/area.js +4 -4
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +0 -1
- package/es/components/viewer2d/grids/grid-streak.js +0 -1
- package/es/components/viewer2d/grids/grid-vertical-streak.js +0 -1
- package/es/components/viewer2d/grids/grids.js +1 -6
- package/es/components/viewer2d/item.js +4 -11
- package/es/components/viewer2d/line.js +2 -5
- package/es/components/viewer2d/ruler.js +2 -3
- package/es/components/viewer2d/rulerDist.js +1 -1
- package/es/components/viewer2d/rulerX.js +6 -12
- package/es/components/viewer2d/rulerY.js +6 -12
- package/es/components/viewer2d/scene.js +15 -27
- package/es/components/viewer2d/state.js +1 -6
- package/es/components/viewer2d/utils.js +33 -2
- package/es/components/viewer2d/viewer2d.js +13 -18
- package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +6 -13
- package/es/components/viewer3d/front3D.js +1 -6
- package/es/components/viewer3d/libs/mtl-loader.js +2 -2
- package/es/components/viewer3d/libs/obj-loader.js +2 -2
- package/es/components/viewer3d/libs/orbit-controls.js +6 -5
- package/es/components/viewer3d/libs/pointer-lock-controls.js +5 -4
- package/es/components/viewer3d/ruler-utils/itemRect.js +1 -1
- package/es/components/viewer3d/ruler-utils/layer3D.js +2 -2
- package/es/components/viewer3d/ruler-utils/ruler3D.js +1 -4
- package/es/components/viewer3d/ruler-utils/scene3D.js +2 -3
- package/es/components/viewer3d/scene-creator.js +5 -11
- package/es/components/viewer3d/viewer3d-first-person.js +5 -11
- package/es/components/viewer3d/viewer3d.js +19 -26
- package/es/index.js +13 -14
- package/es/models.js +10 -15
- package/es/plugins/console-debugger.js +1 -4
- package/es/plugins/keyboard.js +2 -2
- package/es/reducers/holes-reducer.js +1 -1
- package/es/reducers/items-reducer.js +2 -5
- package/es/reducers/lines-reducer.js +1 -1
- package/es/reducers/project-reducer.js +1 -1
- package/es/reducers/reducer.js +2 -2
- package/es/reducers/scene-reducer.js +1 -1
- package/es/reducers/user-reducer.js +1 -2
- package/es/reducers/vertices-reducer.js +1 -1
- package/es/reducers/viewer2d-reducer.js +2 -2
- package/es/reducers/viewer3d-reducer.js +2 -2
- package/es/translator/translator.js +2 -6
- package/es/utils/convert-units-lite.js +29 -0
- package/es/utils/geometry.js +7 -16
- package/es/utils/get-edges-of-subgraphs.js +2 -1
- package/es/utils/graph-cycles.js +2 -3
- package/es/utils/graph.js +4 -7
- package/es/utils/helper.js +3 -73
- package/es/utils/id-broker.js +4 -8
- package/es/utils/molding.js +36 -42
- package/es/utils/name-generator.js +2 -6
- package/es/utils/objects-utils.js +1 -1
- package/es/utils/process-black-list.js +1 -4
- package/es/utils/snap-scene.js +1 -6
- package/es/utils/snap.js +6 -12
- package/es/utils/threeCSG.es6.js +2 -6
- package/lib/@history.js +3 -2
- package/lib/AppContext.js +3 -2
- package/lib/KitchenConfigurator.js +70 -88
- package/lib/KitchenConfiguratorApp.js +98 -113
- package/lib/actions/export.js +1 -1
- package/lib/catalog/areas/area/planner-element.js +13 -8
- package/lib/catalog/catalog.js +9 -16
- package/lib/catalog/factories/area-factory-3d.js +1 -1
- package/lib/catalog/factories/area-factory.js +6 -7
- package/lib/catalog/factories/export.js +1 -1
- package/lib/catalog/factories/wall-factory-3d.js +4 -4
- package/lib/catalog/factories/wall-factory.js +4 -3
- package/lib/catalog/holes/door-closet/planner-element.js +4 -3
- package/lib/catalog/holes/door-double/planner-element.js +4 -3
- package/lib/catalog/holes/door-exterior/planner-element.js +4 -3
- package/lib/catalog/holes/door-interior/planner-element.js +4 -3
- package/lib/catalog/holes/door-panic/planner-element.js +4 -3
- package/lib/catalog/holes/door-panic-double/planner-element.js +4 -3
- package/lib/catalog/holes/door-sliding/planner-element.js +4 -3
- package/lib/catalog/holes/doorway-framed/planner-element.js +4 -3
- package/lib/catalog/holes/doorway-frameless/planner-element.js +4 -3
- package/lib/catalog/holes/export.js +14 -14
- package/lib/catalog/holes/window-clear/planner-element.js +4 -3
- package/lib/catalog/holes/window-cross/planner-element.js +4 -3
- package/lib/catalog/holes/window-double-hung/planner-element.js +4 -3
- package/lib/catalog/holes/window-vertical/planner-element.js +4 -3
- package/lib/catalog/lines/wall/planner-element.js +16 -11
- package/lib/catalog/molding/molding-dcm/planner-element.js +4 -3
- package/lib/catalog/molding/molding-fbm/planner-element.js +4 -3
- package/lib/catalog/molding/molding-lrm/planner-element.js +4 -3
- package/lib/catalog/properties/export.js +1 -1
- package/lib/catalog/properties/property-checkbox.js +68 -25
- package/lib/catalog/properties/property-color.js +3 -2
- package/lib/catalog/properties/property-enum.js +54 -16
- package/lib/catalog/properties/property-hidden.js +3 -2
- package/lib/catalog/properties/property-lenght-measure.js +10 -10
- package/lib/catalog/properties/property-length-measure.js +61 -17
- package/lib/catalog/properties/property-length-measure_hole.js +10 -10
- package/lib/catalog/properties/property-number.js +3 -2
- package/lib/catalog/properties/property-read-only.js +3 -2
- package/lib/catalog/properties/property-string.js +3 -2
- package/lib/catalog/properties/property-toggle.js +3 -2
- package/lib/catalog/properties/shared-property-style.js +2 -1
- package/lib/catalog/utils/FuseUtils.js +10 -11
- package/lib/catalog/utils/exporter.js +10 -12
- package/lib/catalog/utils/geom-utils.js +1 -1
- package/lib/catalog/utils/item-loader.js +29 -35
- package/lib/catalog/utils/mtl-loader.js +7 -3
- package/lib/catalog/utils/obj-loader.js +7 -3
- package/lib/class/FuseUtils.js +10 -11
- package/lib/class/area.js +9 -11
- package/lib/class/export.js +1 -1
- package/lib/class/group.js +13 -20
- package/lib/class/guide.js +9 -12
- package/lib/class/hole.js +7 -9
- package/lib/class/item.js +25 -35
- package/lib/class/layer.js +7 -9
- package/lib/class/line.js +14 -20
- package/lib/class/project.js +10 -11
- package/lib/class/vertex.js +9 -11
- package/lib/components/content.js +5 -3
- package/lib/components/disclaimer/disclaimer.js +69 -88
- package/lib/components/export.js +1 -1
- package/lib/components/style/button.js +17 -22
- package/lib/components/style/cancel-button.js +7 -7
- package/lib/components/style/content-container.js +5 -7
- package/lib/components/style/content-title.js +10 -12
- package/lib/components/style/delete-button.js +8 -8
- package/lib/components/style/export.js +1 -1
- package/lib/components/style/form-block.js +9 -12
- package/lib/components/style/form-color-input.js +7 -7
- package/lib/components/style/form-label.js +9 -12
- package/lib/components/style/form-number-input.js +43 -23
- package/lib/components/style/form-number-input_2.js +15 -19
- package/lib/components/style/form-select.js +53 -15
- package/lib/components/style/form-slider.js +28 -12
- package/lib/components/style/form-submit-button.js +8 -8
- package/lib/components/style/form-text-input.js +46 -32
- package/lib/components/viewer2d/area.js +8 -7
- package/lib/components/viewer2d/export.js +1 -1
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +3 -3
- package/lib/components/viewer2d/grids/grid-streak.js +3 -3
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +3 -3
- package/lib/components/viewer2d/grids/grids.js +6 -10
- package/lib/components/viewer2d/group.js +4 -3
- package/lib/components/viewer2d/item.js +14 -19
- package/lib/components/viewer2d/layer.js +3 -2
- package/lib/components/viewer2d/line.js +4 -7
- package/lib/components/viewer2d/ruler.js +9 -9
- package/lib/components/viewer2d/rulerDist.js +7 -6
- package/lib/components/viewer2d/rulerX.js +15 -19
- package/lib/components/viewer2d/rulerY.js +15 -19
- package/lib/components/viewer2d/scene.js +24 -34
- package/lib/components/viewer2d/snap.js +4 -3
- package/lib/components/viewer2d/state.js +7 -11
- package/lib/components/viewer2d/utils.js +35 -2
- package/lib/components/viewer2d/vertex.js +4 -3
- package/lib/components/viewer2d/viewer2d.js +40 -41
- package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +14 -20
- package/lib/components/viewer3d/dcm.js +2 -1
- package/lib/components/viewer3d/fbm.js +2 -1
- package/lib/components/viewer3d/front3D.js +6 -10
- package/lib/components/viewer3d/grid-creator.js +4 -3
- package/lib/components/viewer3d/grids/grid-horizontal-streak.js +3 -2
- package/lib/components/viewer3d/grids/grid-streak.js +3 -2
- package/lib/components/viewer3d/grids/grid-vertical-streak.js +3 -2
- package/lib/components/viewer3d/libs/mtl-loader.js +7 -2
- package/lib/components/viewer3d/libs/obj-loader.js +7 -2
- package/lib/components/viewer3d/libs/orbit-controls.js +10 -5
- package/lib/components/viewer3d/libs/pointer-lock-controls.js +9 -4
- package/lib/components/viewer3d/lrm.js +2 -1
- package/lib/components/viewer3d/pointer-lock-navigation.js +1 -1
- package/lib/components/viewer3d/ruler-utils/itemRect.js +10 -9
- package/lib/components/viewer3d/ruler-utils/layer3D.js +35 -34
- package/lib/components/viewer3d/ruler-utils/ruler3D.js +5 -7
- package/lib/components/viewer3d/ruler-utils/scene3D.js +4 -5
- package/lib/components/viewer3d/ruler-utils/state3D.js +3 -2
- package/lib/components/viewer3d/scene-creator.js +40 -45
- package/lib/components/viewer3d/three-memory-cleaner.js +1 -1
- package/lib/components/viewer3d/viewer3d-first-person.js +13 -17
- package/lib/components/viewer3d/viewer3d.js +34 -38
- package/lib/index.js +16 -88
- package/lib/models.js +58 -63
- package/lib/plugins/autosave.js +2 -1
- package/lib/plugins/console-debugger.js +5 -7
- package/lib/plugins/export.js +1 -1
- package/lib/plugins/keyboard.js +2 -1
- package/lib/reducers/areas-reducer.js +2 -1
- package/lib/reducers/export.js +1 -1
- package/lib/reducers/groups-reducer.js +2 -1
- package/lib/reducers/holes-reducer.js +2 -1
- package/lib/reducers/items-reducer.js +2 -1
- package/lib/reducers/lines-reducer.js +2 -1
- package/lib/reducers/project-reducer.js +2 -1
- package/lib/reducers/scene-reducer.js +2 -1
- package/lib/reducers/user-reducer.js +2 -2
- package/lib/reducers/vertices-reducer.js +2 -1
- package/lib/reducers/viewer2d-reducer.js +5 -5
- package/lib/reducers/viewer3d-reducer.js +5 -5
- package/lib/styles/export.js +1 -1
- package/lib/translator/en.js +2 -1
- package/lib/translator/it.js +2 -1
- package/lib/translator/ru.js +2 -1
- package/lib/translator/translator.js +7 -10
- package/lib/utils/convert-units-lite.js +35 -0
- package/lib/utils/export.js +2 -2
- package/lib/utils/geometry.js +20 -28
- package/lib/utils/get-edges-of-subgraphs.js +7 -1
- package/lib/utils/graph-cycles.js +9 -9
- package/lib/utils/graph-inner-cycles.js +1 -1
- package/lib/utils/graph.js +15 -12
- package/lib/utils/helper.js +14 -83
- package/lib/utils/history.js +1 -1
- package/lib/utils/id-broker.js +7 -10
- package/lib/utils/molding.js +66 -71
- package/lib/utils/name-generator.js +7 -9
- package/lib/utils/objects-utils.js +5 -3
- package/lib/utils/process-black-list.js +3 -5
- package/lib/utils/react-if.js +3 -2
- package/lib/utils/snap-scene.js +3 -7
- package/lib/utils/snap.js +22 -26
- package/lib/utils/threeCSG.es6.js +16 -15
- package/package.json +26 -54
- package/es/analytics/ga4.js +0 -191
- package/es/analytics/posthog.js +0 -60
- package/lib/analytics/ga4.js +0 -197
- package/lib/analytics/posthog.js +0 -68
|
@@ -1,30 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
10
|
-
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
11
|
-
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
14
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
17
9
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
18
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
19
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
20
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
22
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
23
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
24
11
|
import React, { Component } from 'react';
|
|
25
12
|
import PropTypes from 'prop-types';
|
|
26
|
-
import {
|
|
27
|
-
import { searchForSkuValue } from "./utils";
|
|
13
|
+
import { Grids, Layer } from "./export";
|
|
28
14
|
var Scene = /*#__PURE__*/function (_Component) {
|
|
29
15
|
function Scene() {
|
|
30
16
|
_classCallCheck(this, Scene);
|
|
@@ -34,15 +20,16 @@ var Scene = /*#__PURE__*/function (_Component) {
|
|
|
34
20
|
return _createClass(Scene, [{
|
|
35
21
|
key: "componentWillReceiveProps",
|
|
36
22
|
value: function () {
|
|
37
|
-
var _componentWillReceiveProps = _asyncToGenerator(/*#__PURE__*/
|
|
23
|
+
var _componentWillReceiveProps = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(nextProps) {
|
|
38
24
|
var scene, catalog, height, layers, selectedLayer, msg, isNotFoundInElements, itemType;
|
|
39
|
-
return
|
|
40
|
-
while (1) switch (_context.
|
|
25
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
26
|
+
while (1) switch (_context.prev = _context.next) {
|
|
41
27
|
case 0:
|
|
42
28
|
// console.log("componentDidMount", this.props.scene.hashCode(), nextProps.scene.hashCode());
|
|
43
29
|
if (this.props.scene.hashCode() !== nextProps.scene.hashCode()) {
|
|
44
30
|
scene = nextProps.scene, catalog = nextProps.catalog;
|
|
45
31
|
height = scene.height, layers = scene.layers;
|
|
32
|
+
console.log(layers.toJS());
|
|
46
33
|
selectedLayer = layers.get(scene.selectedLayer);
|
|
47
34
|
msg = '';
|
|
48
35
|
isNotFoundInElements = false;
|
|
@@ -68,7 +55,8 @@ var Scene = /*#__PURE__*/function (_Component) {
|
|
|
68
55
|
// }
|
|
69
56
|
}
|
|
70
57
|
case 1:
|
|
71
|
-
|
|
58
|
+
case "end":
|
|
59
|
+
return _context.stop();
|
|
72
60
|
}
|
|
73
61
|
}, _callee, this);
|
|
74
62
|
}));
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
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; } }
|
|
4
|
-
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; }
|
|
5
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
2
|
import React from 'react';
|
|
8
3
|
import PropTypes from 'prop-types';
|
|
9
4
|
import Scene from "./scene";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
3
|
+
import { toPlainObject } from "../../utils/helper";
|
|
3
4
|
import { INSTALLATION_SUFFIX_TYPE, INSTALLATION_TYPE_NAME, INSTALLATION_TYPE_SKU_SUFFIX, TOE_KICK_MOLDING } from "../../constants";
|
|
4
5
|
export var searchForSkuValue = function searchForSkuValue(catalog, selectedLayer, elementType) {
|
|
5
6
|
return new Promise(function (resolve) {
|
|
@@ -159,4 +160,34 @@ export var getToeKickSKU = function getToeKickSKU() {
|
|
|
159
160
|
});
|
|
160
161
|
if (!skuData) return false;
|
|
161
162
|
return skuData;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// ESM version of "area-polygon" with default + named export.
|
|
166
|
+
// Same behavior: takes an array of [x,y] tuples or {x,y} objects.
|
|
167
|
+
// If `signed` is truthy, returns signed area; otherwise absolute area.
|
|
168
|
+
// Does not mutate the input array.
|
|
169
|
+
|
|
170
|
+
function normalize(point) {
|
|
171
|
+
if (Array.isArray(point)) {
|
|
172
|
+
return {
|
|
173
|
+
x: point[0],
|
|
174
|
+
y: point[1]
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
return point;
|
|
178
|
+
}
|
|
179
|
+
export var areaPolygon = function areaPolygon(points) {
|
|
180
|
+
var signed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
181
|
+
if (!Array.isArray(points) || points.length < 3) return 0;
|
|
182
|
+
|
|
183
|
+
// normalize and ensure closed ring (without mutating input)
|
|
184
|
+
var pts = points.map(normalize);
|
|
185
|
+
var closed = pts.length > 0 && (pts[0].x !== pts[pts.length - 1].x || pts[0].y !== pts[pts.length - 1].y) ? [].concat(_toConsumableArray(pts), [pts[0]]) : pts;
|
|
186
|
+
var det = 0;
|
|
187
|
+
var l = closed.length - 1; // last index before the duplicated first point
|
|
188
|
+
for (var i = 0; i < l; i++) {
|
|
189
|
+
det += closed[i].x * closed[i + 1].y - closed[i].y * closed[i + 1].x;
|
|
190
|
+
}
|
|
191
|
+
var area = det / 2;
|
|
192
|
+
return signed ? area : Math.abs(area);
|
|
162
193
|
};
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
5
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
4
|
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; }
|
|
7
5
|
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; }
|
|
8
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
12
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
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; } }
|
|
14
|
-
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; }
|
|
15
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
16
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
17
6
|
import React, { useEffect, useRef, useState } from 'react';
|
|
18
7
|
import PropTypes from 'prop-types';
|
|
19
8
|
import { ReactSVGPanZoom, TOOL_AUTO, TOOL_NONE, TOOL_PAN, TOOL_ZOOM_IN, TOOL_ZOOM_OUT, zoom } from 'react-svg-pan-zoom';
|
|
@@ -24,10 +13,10 @@ import { RulerX, RulerY } from "./export";
|
|
|
24
13
|
import { DECIMAL_PLACES_2, LINE_THICKNESS, MIN_ANGLE_DISALLOW_DRAW_WALL, MODE_ELEVATION_VIEW, MODE_IDLE, UNIT_ANGLE } from "../../constants";
|
|
25
14
|
import { GeometryUtils } from "../../utils/export";
|
|
26
15
|
import FormNumberInput from "../style/form-number-input";
|
|
27
|
-
import convert from
|
|
16
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
28
17
|
import { Map } from 'immutable';
|
|
29
18
|
import { formatNumber } from "../../utils/math";
|
|
30
|
-
import { isEmpty } from "../../utils/helper";
|
|
19
|
+
import { isEmpty } from "../../utils/helper"; // variables
|
|
31
20
|
|
|
32
21
|
// variables
|
|
33
22
|
var pinFlag = false;
|
|
@@ -1276,6 +1265,8 @@ export default function Viewer2D(_ref, _ref2) {
|
|
|
1276
1265
|
var sceneZoom = state.zoom || 1;
|
|
1277
1266
|
var rulerXElements = Math.ceil(sceneWidth / rulerUnitPixelSize) + 1;
|
|
1278
1267
|
var rulerYElements = Math.ceil(sceneHeight / rulerUnitPixelSize) + 1;
|
|
1268
|
+
console.log('---render viewer2d');
|
|
1269
|
+
console.log(viewer2D.isEmpty());
|
|
1279
1270
|
return /*#__PURE__*/React.createElement("div", null, rulerEdit, /*#__PURE__*/React.createElement("div", {
|
|
1280
1271
|
style: {
|
|
1281
1272
|
margin: 0,
|
|
@@ -1346,8 +1337,12 @@ export default function Viewer2D(_ref, _ref2) {
|
|
|
1346
1337
|
onMouseDown: onMouseDown,
|
|
1347
1338
|
onMouseMove: onMouseMove,
|
|
1348
1339
|
onMouseUp: onMouseUp,
|
|
1349
|
-
|
|
1350
|
-
|
|
1340
|
+
miniatureProps: {
|
|
1341
|
+
position: 'none'
|
|
1342
|
+
},
|
|
1343
|
+
toolbarProps: {
|
|
1344
|
+
position: 'right'
|
|
1345
|
+
},
|
|
1351
1346
|
detectPinchGesture: false,
|
|
1352
1347
|
disableDoubleClickZoomWithToolAuto: true,
|
|
1353
1348
|
ref: Viewer
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
2
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
3
|
+
import _get from "@babel/runtime/helpers/esm/get";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
6
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
1
7
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
2
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
3
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
4
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
5
9
|
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
6
|
-
function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }
|
|
7
|
-
function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }
|
|
8
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
9
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
10
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
11
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
14
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
10
|
/*!
|
|
18
11
|
* camera-controls
|
|
19
12
|
* https://github.com/yomotsu/camera-controls
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
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; } }
|
|
4
|
-
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; }
|
|
5
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
2
|
import React, { useState, useEffect } from 'react';
|
|
8
3
|
import Viewer3D from "./viewer3d";
|
|
9
4
|
import State3D from "./ruler-utils/state3D";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author angelxuanchang
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
var THREE = window.THREE
|
|
7
|
+
var THREE = window.THREE;
|
|
8
8
|
var MTLLoader;
|
|
9
9
|
MTLLoader = function MTLLoader(manager) {
|
|
10
10
|
this.manager = manager !== undefined ? manager : THREE.DefaultLoadingManager;
|
|
@@ -354,4 +354,4 @@ MTLLoader.MaterialCreator.prototype = {
|
|
|
354
354
|
return texture;
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
|
-
|
|
357
|
+
export default MTLLoader;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @author mrdoob / http://mrdoob.com/
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
var THREE = window.THREE
|
|
5
|
+
var THREE = window.THREE;
|
|
6
6
|
var OBJLoader;
|
|
7
7
|
OBJLoader = function OBJLoader(manager) {
|
|
8
8
|
this.manager = manager !== undefined ? manager : THREE.DefaultLoadingManager;
|
|
@@ -459,4 +459,4 @@ OBJLoader.prototype = {
|
|
|
459
459
|
return container;
|
|
460
460
|
}
|
|
461
461
|
};
|
|
462
|
-
|
|
462
|
+
export default OBJLoader;
|
|
@@ -13,9 +13,8 @@
|
|
|
13
13
|
// Zoom - middle mouse, or mousewheel / touch: two finger spread or squish
|
|
14
14
|
// Pan - right mouse, or arrow keys / touch: three finter swipe
|
|
15
15
|
|
|
16
|
-
var THREE = window.THREE
|
|
17
|
-
|
|
18
|
-
module.exports = OrbitControls = function OrbitControls(object, domElement) {
|
|
16
|
+
var THREE = window.THREE;
|
|
17
|
+
function OrbitControls(object, domElement) {
|
|
19
18
|
this.object = object;
|
|
20
19
|
this.domElement = domElement !== undefined ? domElement : document;
|
|
21
20
|
|
|
@@ -623,7 +622,7 @@ module.exports = OrbitControls = function OrbitControls(object, domElement) {
|
|
|
623
622
|
// force an update at start
|
|
624
623
|
|
|
625
624
|
this.update();
|
|
626
|
-
}
|
|
625
|
+
}
|
|
627
626
|
OrbitControls.prototype = Object.create(THREE.EventDispatcher.prototype);
|
|
628
627
|
OrbitControls.prototype.constructor = OrbitControls;
|
|
629
628
|
Object.defineProperties(OrbitControls.prototype, {
|
|
@@ -695,4 +694,6 @@ Object.defineProperties(OrbitControls.prototype, {
|
|
|
695
694
|
this.dampingFactor = value;
|
|
696
695
|
}
|
|
697
696
|
}
|
|
698
|
-
});
|
|
697
|
+
});
|
|
698
|
+
export default OrbitControls;
|
|
699
|
+
export { OrbitControls };
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
* @author mrdoob / http://mrdoob.com/
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
var THREE = window.THREE
|
|
6
|
-
|
|
7
|
-
module.exports = PointerLockControls = function PointerLockControls(camera) {
|
|
5
|
+
var THREE = window.THREE;
|
|
6
|
+
function PointerLockControls(camera) {
|
|
8
7
|
var scope = this;
|
|
9
8
|
camera.rotation.set(0, 0, 0);
|
|
10
9
|
var pitchObject = new THREE.Object3D();
|
|
@@ -42,4 +41,6 @@ module.exports = PointerLockControls = function PointerLockControls(camera) {
|
|
|
42
41
|
return v;
|
|
43
42
|
};
|
|
44
43
|
}();
|
|
45
|
-
}
|
|
44
|
+
}
|
|
45
|
+
export default PointerLockControls;
|
|
46
|
+
export { PointerLockControls };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MODE_BACK_ELEVATION_VIEW, MODE_FRONT_ELEVATION_VIEW, MODE_LEFT_ELEVATION_VIEW, MODE_RIGHT_ELEVATION_VIEW } from "../../../constants";
|
|
3
|
-
import convert from
|
|
3
|
+
import { convert } from "../../../utils/convert-units-lite";
|
|
4
4
|
export default function ItemRect(_ref) {
|
|
5
5
|
var scene = _ref.scene,
|
|
6
6
|
layer = _ref.layer,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Ruler3D from "./ruler3D";
|
|
3
|
-
import convert from
|
|
3
|
+
import { convert } from "../../../utils/convert-units-lite";
|
|
4
4
|
import { GeometryUtils } from "../../../utils/export";
|
|
5
5
|
import { returnReplaceableDeepSearchType } from "../../../components/viewer2d/utils";
|
|
6
|
-
import { DELTA, DISTANCE_EPSILON
|
|
6
|
+
import { DECIMAL_PLACES_2, DELTA, DISTANCE_EPSILON } from "../../../constants";
|
|
7
7
|
import { formatNumber, isNonZeroText } from "../../../utils/math";
|
|
8
8
|
export default function Layer3D(_ref) {
|
|
9
9
|
var layer = _ref.layer,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
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
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
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
4
|
import React from 'react';
|
|
8
5
|
import { TEXT_COLOR_NEUTRAL_0, TEXT_COLOR_NEUTRAL_6 } from "../../../constants";
|
|
9
6
|
export default function Ruler3D(_ref) {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { GeometryUtils } from "../../../utils/export";
|
|
3
|
-
import { isElevationView } from "../../..//utils/helper";
|
|
4
2
|
import { verticesDistance } from "../../../utils/geometry";
|
|
5
|
-
import convert from
|
|
3
|
+
import { convert } from "../../../utils/convert-units-lite";
|
|
6
4
|
import Layer3D from "./layer3D";
|
|
7
5
|
export function compareVertices(v0, v1) {
|
|
8
6
|
return v0.x === v1.x ? v0.y - v1.y : v0.x - v1.x;
|
|
@@ -15,6 +13,7 @@ export default function Scene3D(_ref) {
|
|
|
15
13
|
mode = _ref.mode,
|
|
16
14
|
downloadFlag = _ref.downloadFlag;
|
|
17
15
|
var layers = scene.layers;
|
|
16
|
+
console.log(layers.toJS());
|
|
18
17
|
var selectedLayer = layers.get(scene.selectedLayer);
|
|
19
18
|
var ceilHeight = selectedLayer.ceilHeight;
|
|
20
19
|
var selectedLine = selectedLayer.lines.get(selectedLayer.selected.lines.toJS()[0]);
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
3
|
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; } } }; }
|
|
3
|
-
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; }
|
|
4
|
-
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; }
|
|
5
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
9
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
4
|
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; } }
|
|
11
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
12
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
13
5
|
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; }
|
|
6
|
+
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; }
|
|
7
|
+
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; }
|
|
14
8
|
import * as Three from 'three';
|
|
15
9
|
import { Color, Group } from 'three';
|
|
16
10
|
import createGrid from "./grid-creator";
|
|
17
11
|
import { disposeObject } from "./three-memory-cleaner";
|
|
18
12
|
import { ANIMATE_STEP_MAX, ANIMATE_STEP_MIN, ARRAY_3D_MODES, ARROW_TEXT_BACKCOLOR, ARROW_TEXT_FONTFACE, ARROW_TEXT_FORECOLOR, BASE_CABINET_LAYOUTPOS, BOTTOM_MOLDING_LOCATION, DECIMAL_PLACES_2, DIFFERENT_VALUES_PATH_LENGTH, DISTANCE_EPSILON, EPSILON, MIDDLE_MOLDING_LOCATION, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM_3D, MODE_IDLE, MODE_IDLE_3D, MODE_ROTATING_ITEM_3D, OBJTYPE_MESH, SHADE_DARK_PURPLE_COLOR, TOP_MOLDING_LOCATION, UNIT_CENTIMETER, WALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
19
13
|
import { GeometryUtils, IDBroker, MoldingUtils } from "../../utils/export";
|
|
20
|
-
import convert from
|
|
14
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
21
15
|
import { verticesDistance } from "../../utils/geometry";
|
|
22
16
|
import * as GeomUtils from "../../catalog/utils/geom-utils";
|
|
23
17
|
import { loadTexture } from "../../catalog/utils/item-loader";
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
9
8
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
11
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
12
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
14
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
15
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
16
10
|
import React from 'react';
|
|
17
11
|
import PropTypes from 'prop-types';
|
|
18
12
|
import ReactDOM from 'react-dom';
|
|
@@ -1,44 +1,36 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import _readOnlyError from "@babel/runtime/helpers/esm/readOnlyError";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
6
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
7
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
8
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
9
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
10
|
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; }
|
|
6
11
|
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; }
|
|
7
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
8
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
9
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
10
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
11
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
12
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
14
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
15
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
16
13
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
18
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
19
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
20
14
|
import React from 'react';
|
|
21
15
|
import PropTypes from 'prop-types';
|
|
22
16
|
import ReactDOM from 'react-dom';
|
|
23
17
|
import * as Three from 'three';
|
|
24
|
-
import {
|
|
25
|
-
import { disposeScene } from "./three-memory-cleaner";
|
|
26
|
-
import { disposeObject } from "./three-memory-cleaner";
|
|
18
|
+
import { checkCabinetOverlap, createBacksplash, deleteSpecifiedMeshObjects, fVLine, getDistances, parseData, updateScene, visibleTransformBox } from "./scene-creator";
|
|
19
|
+
import { disposeObject, disposeScene } from "./three-memory-cleaner";
|
|
27
20
|
import diff from 'immutablediff';
|
|
28
21
|
import * as SharedStyle from "../../shared-style";
|
|
29
|
-
import {
|
|
30
|
-
import { isUndefined } from 'util';
|
|
22
|
+
import { BASE_CABINET_LAYOUTPOS, MODE_3D_VIEW, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_HOLE_3D, MODE_DRAWING_ITEM_3D, MODE_ELEVATION_VIEW, MODE_IDLE_3D, MODE_ROTATING_ITEM_3D, SECONDARY_PURPLE_COLOR, TALL_CABINET_LAYOUTPOS, UNIT_CENTIMETER, WALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
31
23
|
import { verticesDistance } from "../../utils/geometry";
|
|
32
|
-
import convert from
|
|
24
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
33
25
|
import { GeometryUtils } from "../../utils/export";
|
|
34
26
|
import { handleCamRect, isElevationView, isEmpty } from "../../utils/helper";
|
|
35
27
|
import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader';
|
|
36
28
|
import CameraControls from 'camera-controls';
|
|
29
|
+
import { returnReplaceableDeepSearchType } from "../viewer2d/utils";
|
|
30
|
+
import { getAllMeshes, vectorIntersectWithMesh } from "../../utils/objects-utils";
|
|
37
31
|
CameraControls.install({
|
|
38
32
|
THREE: Three
|
|
39
33
|
});
|
|
40
|
-
import { returnReplaceableDeepSearchType } from "../viewer2d/utils";
|
|
41
|
-
import { getAllMeshes, vectorIntersectWithMesh } from "../../utils/objects-utils";
|
|
42
34
|
var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
43
35
|
function Scene3DViewer(props) {
|
|
44
36
|
var _this;
|
|
@@ -657,6 +649,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
657
649
|
item: _item2,
|
|
658
650
|
cat: ocat
|
|
659
651
|
};
|
|
652
|
+
console.log('currentItem =>', currentItem);
|
|
660
653
|
if (GeometryUtils.needSnap(currentItem, otherItem) && otherItem.cat.type != 'cabinet') {
|
|
661
654
|
var tRot = _item2.rotation;
|
|
662
655
|
var tPos = new Three.Vector2(_item2.x, _item2.y);
|
|
@@ -1293,7 +1286,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
1293
1286
|
offsetX: event.offsetX - 50,
|
|
1294
1287
|
offsetY: event.offsetY
|
|
1295
1288
|
}, alti);
|
|
1296
|
-
if (
|
|
1289
|
+
if (!selectedItem) return;
|
|
1297
1290
|
var selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
|
|
1298
1291
|
lastAngle = 0;
|
|
1299
1292
|
angleObj.position.set(planData.plan.position.x + Point.x, selItem.category === 'lighting' ? -planData.plan.position.y - selItem.properties.get('height').get('length') : selItem.properties.get('altitude').get('length') + planData.plan.position.y, planData.plan.position.z - Point.y);
|
|
@@ -1464,7 +1457,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
1464
1457
|
setTimeout(function () {
|
|
1465
1458
|
getDistances(layer);
|
|
1466
1459
|
var selectedItem = planData.sceneGraph.layers[selectedObject.layerID].items[selectedObject.itemID];
|
|
1467
|
-
if (
|
|
1460
|
+
if (!selectedItem) return;
|
|
1468
1461
|
var selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
|
|
1469
1462
|
var itemPos = selectedItem.position.clone();
|
|
1470
1463
|
if (intersects[_i10].object.parent && intersects[_i10].object.parent.parent.userData.itemId === selectedItem.userData.itemId) {
|
|
@@ -1546,7 +1539,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
1546
1539
|
if (bRotate) {
|
|
1547
1540
|
var _intersects$_i;
|
|
1548
1541
|
var selectedItem = planData.sceneGraph.layers[selectedObject.layerID].items[selectedObject.itemID];
|
|
1549
|
-
if (
|
|
1542
|
+
if (!selectedItem) return;
|
|
1550
1543
|
var selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
|
|
1551
1544
|
var itemPos = selectedItem.position.clone();
|
|
1552
1545
|
if (((_intersects$_i = intersects[_i10]) === null || _intersects$_i === void 0 || (_intersects$_i = _intersects$_i.object) === null || _intersects$_i === void 0 || (_intersects$_i = _intersects$_i.parent) === null || _intersects$_i === void 0 || (_intersects$_i = _intersects$_i.parent) === null || _intersects$_i === void 0 || (_intersects$_i = _intersects$_i.userData) === null || _intersects$_i === void 0 ? void 0 : _intersects$_i.itemId) === selectedItem.userData.itemId) {
|
|
@@ -1564,7 +1557,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
1564
1557
|
if (bMove) {
|
|
1565
1558
|
bMove = false;
|
|
1566
1559
|
var _selectedItem = planData.sceneGraph.layers[selectedObject.layerID].items[selectedObject.itemID];
|
|
1567
|
-
if (
|
|
1560
|
+
if (!_selectedItem) return;
|
|
1568
1561
|
var _selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
|
|
1569
1562
|
var _itemPos = _selectedItem.position.clone();
|
|
1570
1563
|
if (intersects[_i10].object.parent.parent.userData.itemId === _selectedItem.userData.itemId) {
|
|
@@ -2044,7 +2037,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
2044
2037
|
setTimeout(function () {
|
|
2045
2038
|
try {
|
|
2046
2039
|
currentObject = planData.sceneGraph.layers[selectedObject.layerID].items[selectedObject.itemID];
|
|
2047
|
-
if (
|
|
2040
|
+
if (!currentObject) return;
|
|
2048
2041
|
var selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
|
|
2049
2042
|
var itemPos = currentObject.position.clone();
|
|
2050
2043
|
toolObj.position.set(planData.plan.position.x + itemPos.x, selItem.category === 'lighting' ? -planData.plan.position.y - selItem.properties.get('height').get('length') : planData.plan.position.y + currentObject.children[0].position.y, planData.plan.position.z + itemPos.z);
|
package/es/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import * as Models from "./models";
|
|
4
|
-
import reducer from "./reducers/reducer";
|
|
1
|
+
import ReactDOM from 'react-dom';
|
|
2
|
+
import React from 'react';
|
|
5
3
|
import KitchenConfiguratorApp from "./KitchenConfiguratorApp";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
export function renderKitchenSimulator(container) {
|
|
5
|
+
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6
|
+
var root = ReactDOM.render(/*#__PURE__*/React.createElement(KitchenConfiguratorApp, props), container);
|
|
7
|
+
return {
|
|
8
|
+
root: root,
|
|
9
|
+
unmount: function unmount() {
|
|
10
|
+
ReactDOM.unmountComponentAtNode(container);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export default renderKitchenSimulator;
|