kitchen-simulator 4.4.4 → 5.0.0-new-api
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/LiteRenderer.js +15 -53
- package/es/catalog/factories/area-factory-3d.js +0 -4
- package/es/catalog/holes/door-double/door_double.png +0 -0
- package/es/catalog/holes/door-panic/panicDoor.png +0 -0
- package/es/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
- package/es/catalog/holes/gate/gate.jpg +0 -0
- package/es/catalog/holes/window-clear/texture.png +0 -0
- package/es/catalog/holes/window-cross/texture.png +0 -0
- package/es/catalog/holes/window-double-hung/texture.png +0 -0
- package/es/catalog/holes/window-vertical/texture.png +0 -0
- package/es/catalog/utils/item-loader.js +0 -4
- package/es/class/item.js +17 -6
- package/es/constants.js +12 -7
- package/es/devLiteRenderer.js +91 -109
- package/es/mappings/external-events/mapExternalEventPayload.js +28 -0
- package/es/mappings/external-events/mappers/addItemMapper.js +86 -0
- package/es/mappings/external-events/mappers/ccdfMapper.js +86 -0
- package/es/mappings/external-events/mappers/ccdfToCDSMapper.js +31 -0
- package/es/mappings/external-events/mappers/changeDoorStyleMapper.js +65 -0
- package/es/mappings/external-events/mappers/loadProjectMapper.js +62 -0
- package/es/mappings/holesToCatalog.js +139 -0
- package/es/models.js +12 -1
- package/es/utils/isolate-event-handler.js +55 -45
- package/es/utils/molding.js +17 -1
- package/es/utils/skinPanelEngine.js +16 -11
- package/lib/LiteRenderer.js +17 -55
- package/lib/catalog/factories/area-factory-3d.js +0 -4
- package/lib/catalog/holes/door-double/door_double.png +0 -0
- package/lib/catalog/holes/door-panic/panicDoor.png +0 -0
- package/lib/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
- package/lib/catalog/holes/gate/gate.jpg +0 -0
- package/lib/catalog/holes/window-clear/texture.png +0 -0
- package/lib/catalog/holes/window-cross/texture.png +0 -0
- package/lib/catalog/holes/window-double-hung/texture.png +0 -0
- package/lib/catalog/holes/window-vertical/texture.png +0 -0
- package/lib/catalog/utils/item-loader.js +0 -4
- package/lib/class/item.js +17 -6
- package/lib/constants.js +17 -12
- package/lib/devLiteRenderer.js +93 -111
- package/lib/mappings/external-events/mapExternalEventPayload.js +33 -0
- package/lib/mappings/external-events/mappers/addItemMapper.js +92 -0
- package/lib/mappings/external-events/mappers/ccdfMapper.js +93 -0
- package/lib/mappings/external-events/mappers/ccdfToCDSMapper.js +37 -0
- package/lib/mappings/external-events/mappers/changeDoorStyleMapper.js +72 -0
- package/lib/mappings/external-events/mappers/loadProjectMapper.js +70 -0
- package/lib/mappings/holesToCatalog.js +148 -0
- package/lib/models.js +12 -1
- package/lib/utils/isolate-event-handler.js +55 -45
- package/lib/utils/molding.js +17 -1
- package/lib/utils/skinPanelEngine.js +15 -10
- package/package.json +1 -1
package/lib/utils/molding.js
CHANGED
|
@@ -591,7 +591,23 @@ function getLinesFromItems2(moldingGroup, layer, catalog) {
|
|
|
591
591
|
})) return 1; // continue
|
|
592
592
|
var mergedResult = getMergedLine(MGlines[_i3], filteredMGlines, 0);
|
|
593
593
|
if (mergedResult) {
|
|
594
|
-
|
|
594
|
+
// keep origin line direction
|
|
595
|
+
var rstLine = mergedResult.mergedLine;
|
|
596
|
+
// if (
|
|
597
|
+
// (Math.abs(MGlines[i][0].x - rstLine[1].x) < EPSILON &&
|
|
598
|
+
// Math.abs(MGlines[i][0].y - rstLine[1].y) < EPSILON) ||
|
|
599
|
+
// (Math.abs(MGlines[i][1].x - rstLine[0].x) < EPSILON &&
|
|
600
|
+
// Math.abs(MGlines[i][1].y - rstLine[0].y) < EPSILON)
|
|
601
|
+
// ) {
|
|
602
|
+
// // swap two end points
|
|
603
|
+
// const tx = rstLine[0].x;
|
|
604
|
+
// const ty = rstLine[0].y;
|
|
605
|
+
// rstLine[0].x = rstLine[1].x;
|
|
606
|
+
// rstLine[0].y = rstLine[1].y;
|
|
607
|
+
// rstLine[1].x = tx;
|
|
608
|
+
// rstLine[1].y = ty;
|
|
609
|
+
// }
|
|
610
|
+
newMGlines.push(rstLine);
|
|
595
611
|
filteredMGlines = mergedResult.filteredMGlines;
|
|
596
612
|
}
|
|
597
613
|
},
|
|
@@ -74,6 +74,7 @@ function getSideFaces(item, layer) {
|
|
|
74
74
|
var skinPanelSKU = 'unknown';
|
|
75
75
|
switch (item.layoutpos) {
|
|
76
76
|
case _constants.BASE_CABINET_LAYOUTPOS:
|
|
77
|
+
case _constants.VANITY_CABINET_LAYOUTPOS:
|
|
77
78
|
skinPanelSKU = i === 2 ? 'unknown' : _skinPanel.SKIN_SKU_BSV_24;
|
|
78
79
|
break;
|
|
79
80
|
case _constants.WALL_CABINET_LAYOUTPOS:
|
|
@@ -104,7 +105,7 @@ function getSideFaces(item, layer) {
|
|
|
104
105
|
}
|
|
105
106
|
function collectLayerItems(layer) {
|
|
106
107
|
var _layer$items;
|
|
107
|
-
var skinLayouts = new Set([_constants.BASE_CABINET_LAYOUTPOS, _constants.WALL_CABINET_LAYOUTPOS, _constants.TALL_CABINET_LAYOUTPOS]);
|
|
108
|
+
var skinLayouts = new Set([_constants.BASE_CABINET_LAYOUTPOS, _constants.WALL_CABINET_LAYOUTPOS, _constants.TALL_CABINET_LAYOUTPOS, _constants.VANITY_CABINET_LAYOUTPOS]);
|
|
108
109
|
var skinPanelItems = [];
|
|
109
110
|
var otherItems = [];
|
|
110
111
|
layer === null || layer === void 0 || (_layer$items = layer.items) === null || _layer$items === void 0 || _layer$items.forEach(function (it) {
|
|
@@ -195,8 +196,7 @@ function filterFacesBlockedByFaces(sourceFaces, blockingFaces) {
|
|
|
195
196
|
var overlapList = [_constants.OVERLAP_INCLUDED, _constants.OVERLAP_SAME];
|
|
196
197
|
var removeIdxs = [];
|
|
197
198
|
var newFaces = []; // new countour edge segment that except the overlapped part
|
|
198
|
-
|
|
199
|
-
for (var i = 0; i < sourceFaces.length; i++) {
|
|
199
|
+
var _loop3 = function _loop3(i) {
|
|
200
200
|
var iFace = sourceFaces[i];
|
|
201
201
|
for (var j = 0; j < blockingFaces.length; j++) {
|
|
202
202
|
var _relationship$trimmed;
|
|
@@ -245,11 +245,16 @@ function filterFacesBlockedByFaces(sourceFaces, blockingFaces) {
|
|
|
245
245
|
break;
|
|
246
246
|
} else if (relationship.result === _constants.OVERLAP_SOME && ((_relationship$trimmed = relationship.trimmedSegs) === null || _relationship$trimmed === void 0 ? void 0 : _relationship$trimmed.length) > 0 && verticallyIncluded) {
|
|
247
247
|
removeIdxs.push(i);
|
|
248
|
-
var tFaceSegs = getTrimmedFaceSegs([iFace], blockingFaces,
|
|
248
|
+
var tFaceSegs = getTrimmedFaceSegs([iFace], sourceFaces === blockingFaces ? blockingFaces.filter(function (v, idx) {
|
|
249
|
+
return idx !== i;
|
|
250
|
+
}) : blockingFaces, 0);
|
|
249
251
|
if (tFaceSegs.length > 0) newFaces = [].concat((0, _toConsumableArray2["default"])(newFaces), (0, _toConsumableArray2["default"])(tFaceSegs));
|
|
250
252
|
break;
|
|
251
253
|
}
|
|
252
254
|
}
|
|
255
|
+
};
|
|
256
|
+
for (var i = 0; i < sourceFaces.length; i++) {
|
|
257
|
+
_loop3(i);
|
|
253
258
|
}
|
|
254
259
|
sourceFaces = sourceFaces.filter(function (face, idx) {
|
|
255
260
|
return !removeIdxs.includes(idx);
|
|
@@ -390,13 +395,13 @@ function resolveSkinPanelSKU(face) {
|
|
|
390
395
|
*/
|
|
391
396
|
function buildSkinPanelData(faces) {
|
|
392
397
|
var tempResult = [];
|
|
393
|
-
var
|
|
398
|
+
var _loop4 = function _loop4() {
|
|
394
399
|
var sf = faces[i];
|
|
395
400
|
var skus = resolveSkinPanelSKU(sf);
|
|
396
401
|
var _iterator = _createForOfIteratorHelper(skus),
|
|
397
402
|
_step;
|
|
398
403
|
try {
|
|
399
|
-
var
|
|
404
|
+
var _loop6 = function _loop6() {
|
|
400
405
|
var sku = _step.value;
|
|
401
406
|
var idx = tempResult.findIndex(function (v) {
|
|
402
407
|
var _sf$itemInfo;
|
|
@@ -420,7 +425,7 @@ function buildSkinPanelData(faces) {
|
|
|
420
425
|
}
|
|
421
426
|
};
|
|
422
427
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
423
|
-
|
|
428
|
+
_loop6();
|
|
424
429
|
}
|
|
425
430
|
} catch (err) {
|
|
426
431
|
_iterator.e(err);
|
|
@@ -429,13 +434,13 @@ function buildSkinPanelData(faces) {
|
|
|
429
434
|
}
|
|
430
435
|
};
|
|
431
436
|
for (var i = 0; i < faces.length; i++) {
|
|
432
|
-
|
|
437
|
+
_loop4();
|
|
433
438
|
}
|
|
434
439
|
|
|
435
440
|
// calculate back face panel quantity of island base cabinets
|
|
436
441
|
var removeIdxs = [];
|
|
437
442
|
var newDatas = [];
|
|
438
|
-
var
|
|
443
|
+
var _loop5 = function _loop5() {
|
|
439
444
|
var iData = tempResult[_i];
|
|
440
445
|
if (iData.isBackFace) {
|
|
441
446
|
removeIdxs.push(_i);
|
|
@@ -478,7 +483,7 @@ function buildSkinPanelData(faces) {
|
|
|
478
483
|
}
|
|
479
484
|
};
|
|
480
485
|
for (var _i = 0; _i < tempResult.length; _i++) {
|
|
481
|
-
|
|
486
|
+
_loop5();
|
|
482
487
|
}
|
|
483
488
|
tempResult = tempResult.filter(function (data, idx) {
|
|
484
489
|
return !removeIdxs.includes(idx);
|