kitchen-simulator 1.1.1-test.47 → 1.1.1-test.49
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/lib/KitchenConfiguratorApp.js +3 -0
- package/package.json +15 -16
- package/es/@history.js +0 -2
- package/es/AppContext.js +0 -3
- package/es/KitchenConfigurator.js +0 -645
- package/es/KitchenConfiguratorApp.js +0 -478
- package/es/actions/area-actions.js +0 -14
- package/es/actions/export.js +0 -23
- package/es/actions/groups-actions.js +0 -89
- package/es/actions/holes-actions.js +0 -119
- package/es/actions/items-actions.js +0 -313
- package/es/actions/lines-actions.js +0 -81
- package/es/actions/project-actions.js +0 -281
- package/es/actions/scene-actions.js +0 -33
- package/es/actions/vertices-actions.js +0 -27
- package/es/actions/viewer2d-actions.js +0 -58
- package/es/actions/viewer3d-actions.js +0 -23
- package/es/catalog/areas/area/planner-element.js +0 -40
- package/es/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
- package/es/catalog/areas/area/textures/grass.jpg +0 -0
- package/es/catalog/areas/area/textures/parquet.jpg +0 -0
- package/es/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
- package/es/catalog/areas/area/textures/tile1.jpg +0 -0
- package/es/catalog/catalog.js +0 -277
- package/es/catalog/envMap/nx.hdr +0 -0
- package/es/catalog/envMap/ny.hdr +0 -0
- package/es/catalog/envMap/nz.hdr +0 -0
- package/es/catalog/envMap/px.hdr +0 -0
- package/es/catalog/envMap/py.hdr +0 -0
- package/es/catalog/envMap/pz.hdr +0 -0
- package/es/catalog/factories/area-factory-3d.js +0 -181
- package/es/catalog/factories/area-factory.js +0 -81
- package/es/catalog/factories/export.js +0 -7
- package/es/catalog/factories/wall-factory-3d.js +0 -202
- package/es/catalog/factories/wall-factory.js +0 -268
- package/es/catalog/holes/door-closet/planner-element.js +0 -222
- package/es/catalog/holes/door-double/door_double.png +0 -0
- package/es/catalog/holes/door-double/planner-element.js +0 -315
- package/es/catalog/holes/door-exterior/planner-element.js +0 -215
- package/es/catalog/holes/door-interior/planner-element.js +0 -227
- package/es/catalog/holes/door-panic/panicDoor.png +0 -0
- package/es/catalog/holes/door-panic/planner-element.js +0 -503
- package/es/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
- package/es/catalog/holes/door-panic-double/planner-element.js +0 -463
- package/es/catalog/holes/door-sliding/planner-element.js +0 -225
- package/es/catalog/holes/doorway-framed/planner-element.js +0 -145
- package/es/catalog/holes/doorway-frameless/planner-element.js +0 -104
- package/es/catalog/holes/export.js +0 -13
- package/es/catalog/holes/gate/gate.jpg +0 -0
- package/es/catalog/holes/window-clear/planner-element.js +0 -166
- package/es/catalog/holes/window-clear/texture.png +0 -0
- package/es/catalog/holes/window-cross/planner-element.js +0 -165
- package/es/catalog/holes/window-cross/texture.png +0 -0
- package/es/catalog/holes/window-double-hung/planner-element.js +0 -303
- package/es/catalog/holes/window-double-hung/texture.png +0 -0
- package/es/catalog/holes/window-vertical/planner-element.js +0 -276
- package/es/catalog/holes/window-vertical/texture.png +0 -0
- package/es/catalog/lines/wall/planner-element.js +0 -70
- package/es/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
- package/es/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
- package/es/catalog/lines/wall/textures/bricks.jpg +0 -0
- package/es/catalog/lines/wall/textures/bricks2.jpg +0 -0
- package/es/catalog/lines/wall/textures/bricks3.jpg +0 -0
- package/es/catalog/lines/wall/textures/morden-normal.jpg +0 -0
- package/es/catalog/lines/wall/textures/morden.jpg +0 -0
- package/es/catalog/lines/wall/textures/painted-normal.jpg +0 -0
- package/es/catalog/lines/wall/textures/painted.jpg +0 -0
- package/es/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
- package/es/catalog/lines/wall/textures/plaster.jpg +0 -0
- package/es/catalog/lines/wall/wall.png +0 -0
- package/es/catalog/molding/molding-dcm/planner-element.js +0 -28
- package/es/catalog/molding/molding-dcm/texture.png +0 -0
- package/es/catalog/molding/molding-fbm/planner-element.js +0 -28
- package/es/catalog/molding/molding-fbm/texture.png +0 -0
- package/es/catalog/molding/molding-lrm/planner-element.js +0 -28
- package/es/catalog/molding/molding-lrm/texture.png +0 -0
- package/es/catalog/properties/export.js +0 -21
- package/es/catalog/properties/property-checkbox.js +0 -116
- package/es/catalog/properties/property-color.js +0 -39
- package/es/catalog/properties/property-enum.js +0 -97
- package/es/catalog/properties/property-hidden.js +0 -19
- package/es/catalog/properties/property-lenght-measure.js +0 -101
- package/es/catalog/properties/property-length-measure.js +0 -134
- package/es/catalog/properties/property-length-measure_hole.js +0 -101
- package/es/catalog/properties/property-number.js +0 -48
- package/es/catalog/properties/property-read-only.js +0 -26
- package/es/catalog/properties/property-string.js +0 -48
- package/es/catalog/properties/property-toggle.js +0 -39
- package/es/catalog/properties/shared-property-style.js +0 -14
- package/es/catalog/utils/FuseUtils.js +0 -82
- package/es/catalog/utils/exporter.js +0 -148
- package/es/catalog/utils/geom-utils.js +0 -189
- package/es/catalog/utils/item-loader.js +0 -1521
- package/es/catalog/utils/load-obj.js +0 -91
- package/es/catalog/utils/mtl-loader.js +0 -358
- package/es/catalog/utils/obj-loader.js +0 -477
- package/es/class/FuseUtils.js +0 -82
- package/es/class/area.js +0 -145
- package/es/class/export.js +0 -24
- package/es/class/group.js +0 -440
- package/es/class/guide.js +0 -62
- package/es/class/hole.js +0 -929
- package/es/class/item.js +0 -1883
- package/es/class/layer.js +0 -667
- package/es/class/line.js +0 -1180
- package/es/class/project.js +0 -793
- package/es/class/vertex.js +0 -202
- package/es/components/content.js +0 -107
- package/es/components/disclaimer/disclaimer.js +0 -97
- package/es/components/export.js +0 -9
- package/es/components/style/button.js +0 -113
- package/es/components/style/cancel-button.js +0 -22
- package/es/components/style/content-container.js +0 -33
- package/es/components/style/content-title.js +0 -29
- package/es/components/style/delete-button.js +0 -25
- package/es/components/style/export.js +0 -31
- package/es/components/style/form-block.js +0 -24
- package/es/components/style/form-color-input.js +0 -27
- package/es/components/style/form-label.js +0 -26
- package/es/components/style/form-number-input.js +0 -213
- package/es/components/style/form-number-input_2.js +0 -206
- package/es/components/style/form-select.js +0 -68
- package/es/components/style/form-slider.js +0 -61
- package/es/components/style/form-submit-button.js +0 -26
- package/es/components/style/form-text-input.js +0 -95
- package/es/components/viewer2d/area.js +0 -81
- package/es/components/viewer2d/export.js +0 -31
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +0 -37
- package/es/components/viewer2d/grids/grid-streak.js +0 -37
- package/es/components/viewer2d/grids/grid-vertical-streak.js +0 -37
- package/es/components/viewer2d/grids/grids.js +0 -35
- package/es/components/viewer2d/group.js +0 -53
- package/es/components/viewer2d/item.js +0 -513
- package/es/components/viewer2d/layer.js +0 -164
- package/es/components/viewer2d/line.js +0 -882
- package/es/components/viewer2d/ruler.js +0 -100
- package/es/components/viewer2d/rulerDist.js +0 -146
- package/es/components/viewer2d/rulerX.js +0 -151
- package/es/components/viewer2d/rulerY.js +0 -153
- package/es/components/viewer2d/scene.js +0 -140
- package/es/components/viewer2d/snap.js +0 -74
- package/es/components/viewer2d/state.js +0 -78
- package/es/components/viewer2d/utils.js +0 -198
- package/es/components/viewer2d/vertex.js +0 -65
- package/es/components/viewer2d/viewer2d.js +0 -1398
- package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +0 -2592
- package/es/components/viewer3d/dcm.js +0 -401
- package/es/components/viewer3d/fbm.js +0 -414
- package/es/components/viewer3d/front3D.js +0 -66
- package/es/components/viewer3d/grid-creator.js +0 -25
- package/es/components/viewer3d/grids/grid-horizontal-streak.js +0 -36
- package/es/components/viewer3d/grids/grid-streak.js +0 -27
- package/es/components/viewer3d/grids/grid-vertical-streak.js +0 -36
- package/es/components/viewer3d/libs/first-person-controls.js +0 -67
- package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +0 -1281
- package/es/components/viewer3d/libs/mtl-loader.js +0 -357
- package/es/components/viewer3d/libs/obj-loader.js +0 -462
- package/es/components/viewer3d/libs/orbit-controls.js +0 -699
- package/es/components/viewer3d/libs/pointer-lock-controls.js +0 -46
- package/es/components/viewer3d/lrm.js +0 -305
- package/es/components/viewer3d/model.js +0 -708
- package/es/components/viewer3d/pointer-lock-navigation.js +0 -115
- package/es/components/viewer3d/ruler-utils/itemRect.js +0 -61
- package/es/components/viewer3d/ruler-utils/layer3D.js +0 -495
- package/es/components/viewer3d/ruler-utils/ruler3D.js +0 -227
- package/es/components/viewer3d/ruler-utils/scene3D.js +0 -60
- package/es/components/viewer3d/ruler-utils/state3D.js +0 -18
- package/es/components/viewer3d/scene-creator.js +0 -3608
- package/es/components/viewer3d/three-memory-cleaner.js +0 -51
- package/es/components/viewer3d/viewer3d-first-person.js +0 -315
- package/es/components/viewer3d/viewer3d.js +0 -2527
- package/es/constants.js +0 -636
- package/es/index.js +0 -16
- package/es/models.js +0 -510
- package/es/plugins/SVGLoader.js +0 -1412
- package/es/plugins/autosave.js +0 -33
- package/es/plugins/console-debugger.js +0 -37
- package/es/plugins/export.js +0 -9
- package/es/plugins/keyboard.js +0 -101
- package/es/reducers/areas-reducer.js +0 -12
- package/es/reducers/export.js +0 -25
- package/es/reducers/groups-reducer.js +0 -38
- package/es/reducers/holes-reducer.js +0 -62
- package/es/reducers/items-reducer.js +0 -140
- package/es/reducers/lines-reducer.js +0 -45
- package/es/reducers/project-reducer.js +0 -129
- package/es/reducers/reducer.js +0 -19
- package/es/reducers/scene-reducer.js +0 -28
- package/es/reducers/user-reducer.js +0 -40
- package/es/reducers/vertices-reducer.js +0 -19
- package/es/reducers/viewer2d-reducer.js +0 -75
- package/es/reducers/viewer3d-reducer.js +0 -56
- package/es/shared-style.js +0 -66
- package/es/styles/export.js +0 -5
- package/es/styles/tabs.css +0 -40
- package/es/translator/en.js +0 -104
- package/es/translator/it.js +0 -79
- package/es/translator/ru.js +0 -79
- package/es/translator/translator.js +0 -84
- package/es/utils/browser.js +0 -33
- package/es/utils/email-validator.js +0 -4
- package/es/utils/export.js +0 -25
- package/es/utils/geometry.js +0 -2420
- package/es/utils/get-edges-of-subgraphs.js +0 -27
- package/es/utils/graph-cycles.js +0 -237
- package/es/utils/graph-inner-cycles.js +0 -46
- package/es/utils/graph.js +0 -150
- package/es/utils/helper.js +0 -268
- package/es/utils/history.js +0 -29
- package/es/utils/id-broker.js +0 -19
- package/es/utils/logger.js +0 -8
- package/es/utils/math.js +0 -50
- package/es/utils/molding.js +0 -871
- package/es/utils/name-generator.js +0 -18
- package/es/utils/objects-utils.js +0 -50
- package/es/utils/phone-validator.js +0 -4
- package/es/utils/process-black-list.js +0 -18
- package/es/utils/react-if.js +0 -18
- package/es/utils/snap-scene.js +0 -99
- package/es/utils/snap.js +0 -237
- package/es/utils/summarizeCart.js +0 -24
- package/es/utils/threeCSG.es6.js +0 -498
- package/es/version.js +0 -2
- package/lib/catalog/properties/property-string.js +0 -55
- package/lib/catalog/properties/property-toggle.js +0 -46
- package/lib/catalog/properties/shared-property-style.js +0 -20
- package/lib/catalog/utils/FuseUtils.js +0 -88
- package/lib/catalog/utils/exporter.js +0 -155
- package/lib/catalog/utils/geom-utils.js +0 -205
- package/lib/catalog/utils/item-loader.js +0 -1533
- package/lib/catalog/utils/load-obj.js +0 -99
- package/lib/catalog/utils/mtl-loader.js +0 -363
- package/lib/catalog/utils/obj-loader.js +0 -482
- package/lib/class/FuseUtils.js +0 -88
- package/lib/class/area.js +0 -150
- package/lib/class/export.js +0 -96
- package/lib/class/group.js +0 -445
- package/lib/class/guide.js +0 -67
- package/lib/class/hole.js +0 -934
- package/lib/class/item.js +0 -1889
- package/lib/class/layer.js +0 -672
- package/lib/class/line.js +0 -1186
- package/lib/class/project.js +0 -799
- package/lib/class/vertex.js +0 -207
- package/lib/components/content.js +0 -116
- package/lib/components/disclaimer/disclaimer.js +0 -105
- package/lib/components/export.js +0 -33
- package/lib/components/style/button.js +0 -120
- package/lib/components/style/cancel-button.js +0 -29
- package/lib/components/style/content-container.js +0 -40
- package/lib/components/style/content-title.js +0 -37
- package/lib/components/style/delete-button.js +0 -34
- package/lib/components/style/export.js +0 -121
- package/lib/components/style/form-block.js +0 -31
- package/lib/components/style/form-color-input.js +0 -34
- package/lib/components/style/form-label.js +0 -33
- package/lib/components/style/form-number-input.js +0 -220
- package/lib/components/style/form-number-input_2.js +0 -213
- package/lib/components/style/form-select.js +0 -75
- package/lib/components/style/form-slider.js +0 -68
- package/lib/components/style/form-submit-button.js +0 -35
- package/lib/components/style/form-text-input.js +0 -101
- package/lib/components/viewer2d/area.js +0 -88
- package/lib/components/viewer2d/export.js +0 -121
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +0 -44
- package/lib/components/viewer2d/grids/grid-streak.js +0 -44
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +0 -44
- package/lib/components/viewer2d/grids/grids.js +0 -44
- package/lib/components/viewer2d/group.js +0 -62
- package/lib/components/viewer2d/item.js +0 -521
- package/lib/components/viewer2d/layer.js +0 -171
- package/lib/components/viewer2d/line.js +0 -892
- package/lib/components/viewer2d/ruler.js +0 -107
- package/lib/components/viewer2d/rulerDist.js +0 -153
- package/lib/components/viewer2d/rulerX.js +0 -158
- package/lib/components/viewer2d/rulerY.js +0 -160
- package/lib/components/viewer2d/scene.js +0 -147
- package/lib/components/viewer2d/snap.js +0 -83
- package/lib/components/viewer2d/state.js +0 -87
- package/lib/components/viewer2d/utils.js +0 -210
- package/lib/components/viewer2d/vertex.js +0 -74
- package/lib/components/viewer2d/viewer2d.js +0 -1405
- package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +0 -2597
- package/lib/components/viewer3d/dcm.js +0 -407
- package/lib/components/viewer3d/fbm.js +0 -420
- package/lib/components/viewer3d/front3D.js +0 -75
- package/lib/components/viewer3d/grid-creator.js +0 -34
- package/lib/components/viewer3d/grids/grid-horizontal-streak.js +0 -44
- package/lib/components/viewer3d/grids/grid-streak.js +0 -35
- package/lib/components/viewer3d/grids/grid-vertical-streak.js +0 -44
- package/lib/components/viewer3d/libs/first-person-controls.js +0 -74
- package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js +0 -1287
- package/lib/components/viewer3d/libs/mtl-loader.js +0 -363
- package/lib/components/viewer3d/libs/obj-loader.js +0 -468
- package/lib/components/viewer3d/libs/orbit-controls.js +0 -705
- package/lib/components/viewer3d/libs/pointer-lock-controls.js +0 -52
- package/lib/components/viewer3d/lrm.js +0 -311
- package/lib/components/viewer3d/model.js +0 -714
- package/lib/components/viewer3d/pointer-lock-navigation.js +0 -122
- package/lib/components/viewer3d/ruler-utils/itemRect.js +0 -68
- package/lib/components/viewer3d/ruler-utils/layer3D.js +0 -502
- package/lib/components/viewer3d/ruler-utils/ruler3D.js +0 -234
- package/lib/components/viewer3d/ruler-utils/scene3D.js +0 -68
- package/lib/components/viewer3d/ruler-utils/state3D.js +0 -25
- package/lib/components/viewer3d/scene-creator.js +0 -3642
- package/lib/components/viewer3d/three-memory-cleaner.js +0 -60
- package/lib/components/viewer3d/viewer3d-first-person.js +0 -320
- package/lib/components/viewer3d/viewer3d.js +0 -2532
- package/lib/constants.js +0 -645
- package/lib/index.js +0 -96
- package/lib/models.js +0 -517
- package/lib/plugins/SVGLoader.js +0 -1417
- package/lib/plugins/autosave.js +0 -39
- package/lib/plugins/console-debugger.js +0 -44
- package/lib/plugins/export.js +0 -33
- package/lib/plugins/keyboard.js +0 -107
- package/lib/reducers/areas-reducer.js +0 -18
- package/lib/reducers/export.js +0 -97
- package/lib/reducers/groups-reducer.js +0 -44
- package/lib/reducers/holes-reducer.js +0 -68
- package/lib/reducers/items-reducer.js +0 -146
- package/lib/reducers/lines-reducer.js +0 -51
- package/lib/reducers/project-reducer.js +0 -135
- package/lib/reducers/reducer.js +0 -26
- package/lib/reducers/scene-reducer.js +0 -34
- package/lib/reducers/user-reducer.js +0 -46
- package/lib/reducers/vertices-reducer.js +0 -25
- package/lib/reducers/viewer2d-reducer.js +0 -82
- package/lib/reducers/viewer3d-reducer.js +0 -63
- package/lib/shared-style.js +0 -72
- package/lib/styles/export.js +0 -13
- package/lib/translator/en.js +0 -110
- package/lib/translator/it.js +0 -85
- package/lib/translator/ru.js +0 -85
- package/lib/translator/translator.js +0 -90
- package/lib/utils/browser.js +0 -40
- package/lib/utils/email-validator.js +0 -10
- package/lib/utils/export.js +0 -56
- package/lib/utils/geometry.js +0 -2516
- package/lib/utils/get-edges-of-subgraphs.js +0 -34
- package/lib/utils/graph-cycles.js +0 -240
- package/lib/utils/graph-inner-cycles.js +0 -54
- package/lib/utils/graph.js +0 -157
- package/lib/utils/helper.js +0 -291
- package/lib/utils/history.js +0 -36
- package/lib/utils/id-broker.js +0 -26
- package/lib/utils/logger.js +0 -14
- package/lib/utils/math.js +0 -57
- package/lib/utils/molding.js +0 -895
- package/lib/utils/name-generator.js +0 -23
- package/lib/utils/objects-utils.js +0 -60
- package/lib/utils/phone-validator.js +0 -10
- package/lib/utils/process-black-list.js +0 -24
- package/lib/utils/react-if.js +0 -24
- package/lib/utils/snap-scene.js +0 -105
- package/lib/utils/snap.js +0 -249
- package/lib/utils/summarizeCart.js +0 -30
- package/lib/utils/threeCSG.es6.js +0 -503
- package/lib/version.js +0 -8
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
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; } } }; }
|
|
8
|
-
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; } }
|
|
9
|
-
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; }
|
|
10
|
-
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); }
|
|
11
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
-
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); } }
|
|
13
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
-
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); }
|
|
16
|
-
var FuseUtils = /*#__PURE__*/function () {
|
|
17
|
-
function FuseUtils() {
|
|
18
|
-
_classCallCheck(this, FuseUtils);
|
|
19
|
-
}
|
|
20
|
-
return _createClass(FuseUtils, null, [{
|
|
21
|
-
key: "filterArrayByString",
|
|
22
|
-
value: function filterArrayByString(mainArr, searchText) {
|
|
23
|
-
var _this = this;
|
|
24
|
-
if (searchText === '') {
|
|
25
|
-
return mainArr;
|
|
26
|
-
}
|
|
27
|
-
searchText = searchText.toLowerCase();
|
|
28
|
-
return mainArr.filter(function (itemObj) {
|
|
29
|
-
return _this.searchInObj(itemObj, searchText);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}, {
|
|
33
|
-
key: "searchInObj",
|
|
34
|
-
value: function searchInObj(itemObj, searchText) {
|
|
35
|
-
for (var prop in itemObj) {
|
|
36
|
-
if (!itemObj.hasOwnProperty(prop)) {
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
var value = itemObj[prop];
|
|
40
|
-
if (typeof value === 'string') {
|
|
41
|
-
if (this.searchInString(value, searchText)) {
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
} else if (Array.isArray(value)) {
|
|
45
|
-
if (this.searchInArray(value, searchText)) {
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (_typeof(value) === 'object') {
|
|
50
|
-
if (this.searchInObj(value, searchText)) {
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}, {
|
|
57
|
-
key: "searchInArray",
|
|
58
|
-
value: function searchInArray(arr, searchText) {
|
|
59
|
-
var _iterator = _createForOfIteratorHelper(arr),
|
|
60
|
-
_step;
|
|
61
|
-
try {
|
|
62
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
63
|
-
var value = _step.value;
|
|
64
|
-
if (typeof value === 'string') {
|
|
65
|
-
if (this.searchInString(value, searchText)) {
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (_typeof(value) === 'object') {
|
|
70
|
-
if (this.searchInObj(value, searchText)) {
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
} catch (err) {
|
|
76
|
-
_iterator.e(err);
|
|
77
|
-
} finally {
|
|
78
|
-
_iterator.f();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}, {
|
|
82
|
-
key: "searchInString",
|
|
83
|
-
value: function searchInString(value, searchText) {
|
|
84
|
-
return value.toLowerCase().includes(searchText);
|
|
85
|
-
}
|
|
86
|
-
}]);
|
|
87
|
-
}();
|
|
88
|
-
var _default = exports["default"] = FuseUtils;
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = _default;
|
|
7
|
-
var _convertUnits = _interopRequireDefault(require("convert-units"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
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); }
|
|
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; }
|
|
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; }
|
|
12
|
-
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; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
-
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); }
|
|
15
|
-
function _default(_ref) {
|
|
16
|
-
var itemID = _ref.itemID,
|
|
17
|
-
type = _ref.type,
|
|
18
|
-
long_name = _ref.long_name,
|
|
19
|
-
name = _ref.name,
|
|
20
|
-
sizeinfo = _ref.sizeinfo,
|
|
21
|
-
description = _ref.description,
|
|
22
|
-
prototype = _ref.prototype,
|
|
23
|
-
base = _ref.base,
|
|
24
|
-
shape_svg = _ref.shape_svg,
|
|
25
|
-
render2DItem = _ref.render2DItem,
|
|
26
|
-
render3DItem = _ref.render3DItem,
|
|
27
|
-
structure_json = _ref.structure_json,
|
|
28
|
-
layoutpos = _ref.layoutpos,
|
|
29
|
-
is_corner = _ref.is_corner,
|
|
30
|
-
alti = _ref.alti,
|
|
31
|
-
obj_property = _ref.obj_property,
|
|
32
|
-
outlineSVGData = _ref.outlineSVGData;
|
|
33
|
-
var _length = alti || 0;
|
|
34
|
-
// const length = convert(_length).from("in").to("cm");
|
|
35
|
-
var length = _length;
|
|
36
|
-
var additional_props = [];
|
|
37
|
-
if (type === 'cabinet' && long_name.toLowerCase().includes('filler')) {
|
|
38
|
-
additional_props = {
|
|
39
|
-
width: {
|
|
40
|
-
label: 'Width',
|
|
41
|
-
type: 'length-measure',
|
|
42
|
-
defaultValue: {
|
|
43
|
-
_length: sizeinfo.width,
|
|
44
|
-
_unit: 'in',
|
|
45
|
-
length: (0, _convertUnits["default"])(sizeinfo.width).from('in').to('cm')
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
if (type === 'appliance' || type === 'furnishing' || type === 'cabinet' && long_name.toLowerCase().includes('panel')) {
|
|
51
|
-
additional_props = {
|
|
52
|
-
width: {
|
|
53
|
-
label: 'Width',
|
|
54
|
-
type: 'length-measure',
|
|
55
|
-
defaultValue: {
|
|
56
|
-
_length: sizeinfo.width,
|
|
57
|
-
_unit: 'in',
|
|
58
|
-
length: (0, _convertUnits["default"])(sizeinfo.width).from('in').to('cm')
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
depth: {
|
|
62
|
-
label: 'Depth',
|
|
63
|
-
type: 'length-measure',
|
|
64
|
-
defaultValue: {
|
|
65
|
-
_length: sizeinfo.depth,
|
|
66
|
-
_unit: 'in',
|
|
67
|
-
length: (0, _convertUnits["default"])(sizeinfo.depth).from('in').to('cm')
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
height: {
|
|
71
|
-
label: 'Height',
|
|
72
|
-
type: 'length-measure',
|
|
73
|
-
defaultValue: {
|
|
74
|
-
_length: sizeinfo.height,
|
|
75
|
-
_unit: 'in',
|
|
76
|
-
length: (0, _convertUnits["default"])(sizeinfo.height).from('in').to('cm')
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
var mode = null;
|
|
82
|
-
var retVal = {
|
|
83
|
-
itemID: itemID,
|
|
84
|
-
name: name,
|
|
85
|
-
prototype: prototype,
|
|
86
|
-
long_name: long_name,
|
|
87
|
-
type: type,
|
|
88
|
-
info: {
|
|
89
|
-
title: name,
|
|
90
|
-
outline: outlineSVGData,
|
|
91
|
-
tag: ['furnishing', 'electronics'],
|
|
92
|
-
description: description,
|
|
93
|
-
image: base,
|
|
94
|
-
door: obj_property.door_style,
|
|
95
|
-
doorcategory: obj_property.door_category,
|
|
96
|
-
has_single_door: obj_property.has_single_door,
|
|
97
|
-
sizeinfo: sizeinfo,
|
|
98
|
-
layoutpos: layoutpos,
|
|
99
|
-
is_corner: is_corner,
|
|
100
|
-
shape_svg: shape_svg
|
|
101
|
-
},
|
|
102
|
-
properties: _objectSpread(_objectSpread({
|
|
103
|
-
altitude: {
|
|
104
|
-
label: 'Distance from floor',
|
|
105
|
-
type: 'length-measure',
|
|
106
|
-
defaultValue: {
|
|
107
|
-
_length: _length,
|
|
108
|
-
_unit: 'in',
|
|
109
|
-
length: length
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
resize_and_scaling: {
|
|
113
|
-
label: 'Resize & Scaling',
|
|
114
|
-
id: 'resize_and_scaling',
|
|
115
|
-
description: 'Add preferred dimensions.',
|
|
116
|
-
type: 'checkbox',
|
|
117
|
-
defaultValue: false,
|
|
118
|
-
values: {
|
|
119
|
-
none: false,
|
|
120
|
-
yes: true
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}, additional_props), {}, {
|
|
124
|
-
flip_doorhandle: {
|
|
125
|
-
label: 'Flip Door Handle',
|
|
126
|
-
description: 'Viewable in 3D mode.',
|
|
127
|
-
type: 'checkbox',
|
|
128
|
-
defaultValue: false,
|
|
129
|
-
values: {
|
|
130
|
-
none: false,
|
|
131
|
-
yes: true
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
open_doors: {
|
|
135
|
-
label: 'Open doors',
|
|
136
|
-
description: 'Viewable in 3D mode.',
|
|
137
|
-
type: 'checkbox',
|
|
138
|
-
defaultValue: false,
|
|
139
|
-
values: {
|
|
140
|
-
none: false,
|
|
141
|
-
yes: true
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}),
|
|
145
|
-
img: base,
|
|
146
|
-
obj: obj_property,
|
|
147
|
-
render2D: function render2D(element, layer, scene) {
|
|
148
|
-
return render2DItem.call(this, element, layer, scene, sizeinfo, layoutpos, is_corner, shape_svg);
|
|
149
|
-
},
|
|
150
|
-
render3D: function render3D(element, layer, scene, mode) {
|
|
151
|
-
return render3DItem(element, layer, scene, sizeinfo, structure_json, is_corner, mode);
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
return retVal;
|
|
155
|
-
}
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
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); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.addShape = addShape;
|
|
8
|
-
exports.baseBox3FromObject = baseBox3FromObject;
|
|
9
|
-
exports.baseBoxHelper = baseBoxHelper;
|
|
10
|
-
exports.controlGeom = controlGeom;
|
|
11
|
-
exports.createRotShape = createRotShape;
|
|
12
|
-
exports.emptyBoxHolder = emptyBoxHolder;
|
|
13
|
-
exports.makeMBoxfromObject = makeMBoxfromObject;
|
|
14
|
-
exports.rotGeoms = rotGeoms;
|
|
15
|
-
exports.upwardsGeom = upwardsGeom;
|
|
16
|
-
var Three = _interopRequireWildcard(require("three"));
|
|
17
|
-
var _constants = require("../../constants");
|
|
18
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
|
-
function controlGeom() {
|
|
20
|
-
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]);
|
|
21
|
-
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]);
|
|
22
|
-
var geometry = new Three.BufferGeometry();
|
|
23
|
-
geometry.setAttribute('position', new Three.BufferAttribute(vertices, 3));
|
|
24
|
-
geometry.setIndex(new Three.BufferAttribute(indices, 1));
|
|
25
|
-
return geometry;
|
|
26
|
-
}
|
|
27
|
-
function upwardsGeom() {
|
|
28
|
-
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]);
|
|
29
|
-
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]);
|
|
30
|
-
var geometry = new Three.BufferGeometry();
|
|
31
|
-
geometry.setAttribute('position', new Three.BufferAttribute(vertices, 3));
|
|
32
|
-
geometry.setIndex(new Three.BufferAttribute(indices, 1));
|
|
33
|
-
return geometry;
|
|
34
|
-
}
|
|
35
|
-
function createRotShape(radius) {
|
|
36
|
-
var rotShape = new Three.Shape();
|
|
37
|
-
rotShape.moveTo(Math.cos(-60 / 180 * Math.PI) * (radius - 0.05), Math.sin(-60 / 180 * Math.PI) * (radius - 0.05));
|
|
38
|
-
for (var i = -55; i <= 60; i += 5) {
|
|
39
|
-
rotShape.lineTo(Math.cos(i / 180 * Math.PI) * (radius - 0.05), Math.sin(i / 180 * Math.PI) * (radius - 0.05));
|
|
40
|
-
}
|
|
41
|
-
for (var _i = 60; _i >= -60; _i -= 5) {
|
|
42
|
-
if (_i === 5) {
|
|
43
|
-
rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05), Math.sin(_i / 180 * Math.PI) * (radius + 0.05));
|
|
44
|
-
rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05) + 0.15, Math.sin(_i / 180 * Math.PI) * (radius + 0.05));
|
|
45
|
-
rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05) + 0.15, Math.sin(_i / 180 * Math.PI) * (radius + 0.05) + 0.1);
|
|
46
|
-
continue;
|
|
47
|
-
} else if (_i === 0) {
|
|
48
|
-
rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05) + 0.25, Math.sin(_i / 180 * Math.PI) * (radius + 0.05));
|
|
49
|
-
continue;
|
|
50
|
-
} else if (_i === -5) {
|
|
51
|
-
rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05) + 0.15, Math.sin(_i / 180 * Math.PI) * (radius + 0.05) - 0.1);
|
|
52
|
-
rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05) + 0.15, Math.sin(_i / 180 * Math.PI) * (radius + 0.05));
|
|
53
|
-
rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05), Math.sin(_i / 180 * Math.PI) * (radius + 0.05));
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
rotShape.lineTo(Math.cos(_i / 180 * Math.PI) * (radius + 0.05), Math.sin(_i / 180 * Math.PI) * (radius + 0.05));
|
|
57
|
-
}
|
|
58
|
-
rotShape.lineTo(Math.cos(-60 / 180 * Math.PI) * (radius + 0.1), Math.sin(-60 / 180 * Math.PI) * (radius + 0.1));
|
|
59
|
-
rotShape.lineTo(Math.cos(-70 / 180 * Math.PI) * (radius + 0.0), Math.sin(-70 / 180 * Math.PI) * (radius + 0.0));
|
|
60
|
-
rotShape.lineTo(Math.cos(-60 / 180 * Math.PI) * (radius - 0.1), Math.sin(-60 / 180 * Math.PI) * (radius - 0.1));
|
|
61
|
-
rotShape.lineTo(Math.cos(-60 / 180 * Math.PI) * (radius - 0.05), Math.sin(-60 / 180 * Math.PI) * (radius - 0.05));
|
|
62
|
-
return rotShape;
|
|
63
|
-
}
|
|
64
|
-
function rotGeoms(radius) {
|
|
65
|
-
if (!Number.isFinite(radius)) radius = 1;
|
|
66
|
-
var rotShape = createRotShape(radius);
|
|
67
|
-
var rotFill = new Three.ShapeGeometry(rotShape);
|
|
68
|
-
var rotStroke = new Three.BufferGeometry().setFromPoints(rotShape.getPoints());
|
|
69
|
-
rotFill.rotateX(Math.PI / 2);
|
|
70
|
-
rotStroke.rotateX(Math.PI / 2);
|
|
71
|
-
return {
|
|
72
|
-
rotFill: rotFill,
|
|
73
|
-
rotStroke: rotStroke
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function addShape(shape, extrudeSettings, color, x, y, z, rx, ry, rz, s) {
|
|
77
|
-
// flat shape
|
|
78
|
-
var geometry = geometry = new Three.ExtrudeGeometry(shape, extrudeSettings);
|
|
79
|
-
var mesh = new Three.Mesh(geometry, new Three.MeshPhongMaterial({
|
|
80
|
-
color: color,
|
|
81
|
-
side: Three.DoubleSide
|
|
82
|
-
}));
|
|
83
|
-
mesh.position.set(x, y, z);
|
|
84
|
-
mesh.rotation.set(rx, ry, rz);
|
|
85
|
-
mesh.scale.set(s, s, s);
|
|
86
|
-
return mesh;
|
|
87
|
-
}
|
|
88
|
-
function makeMBoxfromObject(props_Object) {
|
|
89
|
-
var _props_Object$childre;
|
|
90
|
-
var mBoxColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0x99c3fb;
|
|
91
|
-
if (!props_Object) {
|
|
92
|
-
console.warn('makeMBoxfromObject: props_Object is null or undefined');
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// safe resolve of object (skip wrapper Group)
|
|
97
|
-
var object = props_Object;
|
|
98
|
-
if (props_Object.children && ((_props_Object$childre = props_Object.children[0]) === null || _props_Object$childre === void 0 ? void 0 : _props_Object$childre.type) === 'Group') {
|
|
99
|
-
object = props_Object.children[0];
|
|
100
|
-
}
|
|
101
|
-
if (!object) {
|
|
102
|
-
console.warn('makeMBoxfromObject: object is null after resolving children');
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
var _object = object,
|
|
106
|
-
scale = _object.scale,
|
|
107
|
-
position = _object.position,
|
|
108
|
-
userData = _object.userData;
|
|
109
|
-
if (!scale) {
|
|
110
|
-
console.warn('makeMBoxfromObject: object.scale is missing');
|
|
111
|
-
return null;
|
|
112
|
-
}
|
|
113
|
-
if (!position) {
|
|
114
|
-
console.warn('makeMBoxfromObject: object.position is missing');
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
if (!userData) {
|
|
118
|
-
console.warn('makeMBoxfromObject: object.userData is missing');
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
if (!userData.max || !userData.min) {
|
|
122
|
-
console.warn('makeMBoxfromObject: userData.max or userData.min is missing');
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
var scaleVec = new Three.Vector3(scale.x, scale.y, scale.z);
|
|
126
|
-
var posVec = new Three.Vector3(position.x, position.y, position.z);
|
|
127
|
-
var uVec = new Three.Vector3(-posVec.x / scaleVec.x, -posVec.y / scaleVec.y, -posVec.z / scaleVec.z);
|
|
128
|
-
var max = userData.max,
|
|
129
|
-
min = userData.min;
|
|
130
|
-
var moveBox = new Three.BoxGeometry(max.x - min.x, max.y - min.y, max.z - min.z);
|
|
131
|
-
var mBox = new Three.Mesh(moveBox, new Three.MeshBasicMaterial({
|
|
132
|
-
color: mBoxColor,
|
|
133
|
-
side: Three.DoubleSide,
|
|
134
|
-
transparent: true,
|
|
135
|
-
opacity: 0.4
|
|
136
|
-
}));
|
|
137
|
-
mBox.name = 'TransformBox';
|
|
138
|
-
mBox.translateOnAxis(new Three.Vector3(uVec.x, uVec.y + (max.y - min.y) / 2, uVec.z), 1);
|
|
139
|
-
mBox.scale.set(1.1, 1.1, 1.1);
|
|
140
|
-
mBox.translateY(posVec.y);
|
|
141
|
-
mBox.renderOrder = 1;
|
|
142
|
-
mBox.visible = mBoxColor !== 0x99c3fb;
|
|
143
|
-
return mBox;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// export function rotMesh(radius) {
|
|
147
|
-
// let rotShape = rotShape(radius);
|
|
148
|
-
|
|
149
|
-
// let rotGeom = new Three.ShapeBufferGeometry(rotShape);
|
|
150
|
-
|
|
151
|
-
// const points = rotShape.getPoints();
|
|
152
|
-
// const spacedPoints = shape.getSpacedPoints( 50 );
|
|
153
|
-
|
|
154
|
-
// const geometryPoints = new THREE.BufferGeometry().setFromPoints( points );
|
|
155
|
-
// const geometrySpacedPoints = new THREE.BufferGeometry().setFromPoints( spacedPoints );
|
|
156
|
-
|
|
157
|
-
// // solid line
|
|
158
|
-
|
|
159
|
-
// let line = new THREE.Line( geometryPoints, new THREE.LineBasicMaterial( { color: color } ) );
|
|
160
|
-
// line.position.set( x, y, z - 25 );
|
|
161
|
-
// line.rotation.set( rx, ry, rz );
|
|
162
|
-
// line.scale.set( s, s, s );
|
|
163
|
-
// group.add( line );
|
|
164
|
-
|
|
165
|
-
// }
|
|
166
|
-
|
|
167
|
-
function baseBoxHelper(object, color) {
|
|
168
|
-
var tempobj = [];
|
|
169
|
-
for (var j = object.children.length - 1; j >= 0; j--) {
|
|
170
|
-
if (object.children[j].type !== _constants.OBJTYPE_MESH) {
|
|
171
|
-
tempobj.push(object.children[j]);
|
|
172
|
-
object.remove(object.children[j]);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
var boxHelper = new Three.BoxHelper(object, color);
|
|
176
|
-
tempobj.forEach(function (v) {
|
|
177
|
-
object.add(v);
|
|
178
|
-
});
|
|
179
|
-
return boxHelper;
|
|
180
|
-
}
|
|
181
|
-
function baseBox3FromObject(object) {
|
|
182
|
-
var tempobj = [];
|
|
183
|
-
for (var j = object.children.length - 1; j >= 0; j--) {
|
|
184
|
-
if (object.children[j].type !== _constants.OBJTYPE_MESH || object.children[j].name.includes('_countertop')) {
|
|
185
|
-
tempobj.push(object.children[j]);
|
|
186
|
-
object.remove(object.children[j]);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
var box3 = new Three.Box3().setFromObject(object);
|
|
190
|
-
tempobj.forEach(function (v) {
|
|
191
|
-
object.add(v);
|
|
192
|
-
});
|
|
193
|
-
return box3;
|
|
194
|
-
}
|
|
195
|
-
function emptyBoxHolder(newWidth, newHeight, newDepth) {
|
|
196
|
-
var scale = 2.54 / 100;
|
|
197
|
-
var geometry = new Three.BoxGeometry(newWidth * scale, newHeight * scale, newDepth * scale);
|
|
198
|
-
var material = new Three.MeshBasicMaterial({
|
|
199
|
-
color: 0x00ff00,
|
|
200
|
-
opacity: 0.2,
|
|
201
|
-
transparent: true
|
|
202
|
-
});
|
|
203
|
-
var cube = new Three.Mesh(geometry, material);
|
|
204
|
-
return cube;
|
|
205
|
-
}
|