kitchen-simulator 11.11.0 → 11.13.0
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/catalog/utils/item-loader.js +13 -10
- package/es/components/viewer3d/scene-creator.js +1 -0
- package/es/events/external/handleExternalEvent.util.js +4 -4
- package/lib/catalog/utils/item-loader.js +13 -10
- package/lib/components/viewer3d/scene-creator.js +1 -0
- package/lib/events/external/handleExternalEvent.util.js +4 -4
- package/package.json +1 -1
|
@@ -818,6 +818,7 @@ export function render3DItem(element, layer, scene, sizeinfo, structure_json, is
|
|
|
818
818
|
continue;
|
|
819
819
|
}
|
|
820
820
|
if (phs[k].indexOf('ph') == -1) {
|
|
821
|
+
var _url2;
|
|
821
822
|
var _url = structure[temp[k - 1]];
|
|
822
823
|
if (temp[k - 1] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS()) in structure) {
|
|
823
824
|
if (structure[temp[k - 1] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS())] != null) {
|
|
@@ -825,17 +826,19 @@ export function render3DItem(element, layer, scene, sizeinfo, structure_json, is
|
|
|
825
826
|
}
|
|
826
827
|
}
|
|
827
828
|
if (_typeof(_url) == Array) _url = _url[0];
|
|
828
|
-
var uData = _url.split('/');
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
829
|
+
var uData = (_url2 = _url) === null || _url2 === void 0 ? void 0 : _url2.split('/');
|
|
830
|
+
if (uData) {
|
|
831
|
+
uData = uData[uData.length - 1];
|
|
832
|
+
uData = uData.slice(0, -5);
|
|
833
|
+
var datas = uData.split('_');
|
|
834
|
+
uData = datas[1];
|
|
835
|
+
for (var _i = 2; _i < datas.length; _i++) {
|
|
836
|
+
uData += '_';
|
|
837
|
+
uData += datas[_i];
|
|
838
|
+
}
|
|
839
|
+
uData = mainName.replace('main', uData);
|
|
840
|
+
phs[k] = 'ph_' + uData + '_' + phs[k];
|
|
836
841
|
}
|
|
837
|
-
uData = mainName.replace('main', uData);
|
|
838
|
-
phs[k] = 'ph_' + uData + '_' + phs[k];
|
|
839
842
|
}
|
|
840
843
|
}
|
|
841
844
|
phsArray.push(phs);
|
|
@@ -2462,6 +2462,7 @@ function tryAdjacent(ct1, ct2) {
|
|
|
2462
2462
|
}
|
|
2463
2463
|
log('----tryAdjacent', ct1.id, ct2.id);
|
|
2464
2464
|
if (!ct2.catid.includes('Dishwasher') && !ct2.catid.includes('BF') && ct1.catid != ct2.catid) return false;
|
|
2465
|
+
if (ct1.items[0].layoutpos === 'Vanity' || ct2.items[0].layoutpos === 'Vanity') return false;
|
|
2465
2466
|
if (ct1.rotRad != ct2.rotRad) return false;
|
|
2466
2467
|
log('ct1', ct1.pos.x, ct1.pos.y, ct1.size.width);
|
|
2467
2468
|
log('ct2', ct2.pos.x, ct2.pos.y, ct2.size.width);
|
|
@@ -284,8 +284,8 @@ function _parseTempPlaceholdersFromCabinetPayload() {
|
|
|
284
284
|
var phname = tempPlaceholders[0].name;
|
|
285
285
|
var newph = undefined;
|
|
286
286
|
var blAdd = true;
|
|
287
|
-
if (cabinetPayload.is_corner) {
|
|
288
|
-
if (tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
|
|
287
|
+
if (cabinetPayload.is_corner && cabinetPayload.is_corner !== -1) {
|
|
288
|
+
if (tempData['base_door' + t.name.slice(-2)] && tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
|
|
289
289
|
newph = tempPlaceholders.find(function (el) {
|
|
290
290
|
return el.name.isLeftPlaceholder();
|
|
291
291
|
});
|
|
@@ -293,12 +293,12 @@ function _parseTempPlaceholdersFromCabinetPayload() {
|
|
|
293
293
|
blAdd = false;
|
|
294
294
|
}
|
|
295
295
|
} else {
|
|
296
|
-
if (tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
|
|
296
|
+
if (tempData['base_door' + t.name.slice(-2)] && tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
|
|
297
297
|
newph = tempPlaceholders.find(function (el) {
|
|
298
298
|
return el.name.isRightPlaceholder();
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
if (tempData['base_door' + t.name.slice(-2)][0].isRightPlaceholder()) {
|
|
301
|
+
if (tempData['base_door' + t.name.slice(-2)] && tempData['base_door' + t.name.slice(-2)][0].isRightPlaceholder()) {
|
|
302
302
|
newph = tempPlaceholders.find(function (el) {
|
|
303
303
|
return el.name.isLeftPlaceholder();
|
|
304
304
|
});
|
|
@@ -832,6 +832,7 @@ function render3DItem(element, layer, scene, sizeinfo, structure_json, is_corner
|
|
|
832
832
|
continue;
|
|
833
833
|
}
|
|
834
834
|
if (phs[k].indexOf('ph') == -1) {
|
|
835
|
+
var _url2;
|
|
835
836
|
var _url = structure[temp[k - 1]];
|
|
836
837
|
if (temp[k - 1] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS()) in structure) {
|
|
837
838
|
if (structure[temp[k - 1] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS())] != null) {
|
|
@@ -839,17 +840,19 @@ function render3DItem(element, layer, scene, sizeinfo, structure_json, is_corner
|
|
|
839
840
|
}
|
|
840
841
|
}
|
|
841
842
|
if ((0, _typeof2["default"])(_url) == Array) _url = _url[0];
|
|
842
|
-
var uData = _url.split('/');
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
843
|
+
var uData = (_url2 = _url) === null || _url2 === void 0 ? void 0 : _url2.split('/');
|
|
844
|
+
if (uData) {
|
|
845
|
+
uData = uData[uData.length - 1];
|
|
846
|
+
uData = uData.slice(0, -5);
|
|
847
|
+
var datas = uData.split('_');
|
|
848
|
+
uData = datas[1];
|
|
849
|
+
for (var _i = 2; _i < datas.length; _i++) {
|
|
850
|
+
uData += '_';
|
|
851
|
+
uData += datas[_i];
|
|
852
|
+
}
|
|
853
|
+
uData = mainName.replace('main', uData);
|
|
854
|
+
phs[k] = 'ph_' + uData + '_' + phs[k];
|
|
850
855
|
}
|
|
851
|
-
uData = mainName.replace('main', uData);
|
|
852
|
-
phs[k] = 'ph_' + uData + '_' + phs[k];
|
|
853
856
|
}
|
|
854
857
|
}
|
|
855
858
|
phsArray.push(phs);
|
|
@@ -2496,6 +2496,7 @@ function tryAdjacent(ct1, ct2) {
|
|
|
2496
2496
|
}
|
|
2497
2497
|
log('----tryAdjacent', ct1.id, ct2.id);
|
|
2498
2498
|
if (!ct2.catid.includes('Dishwasher') && !ct2.catid.includes('BF') && ct1.catid != ct2.catid) return false;
|
|
2499
|
+
if (ct1.items[0].layoutpos === 'Vanity' || ct2.items[0].layoutpos === 'Vanity') return false;
|
|
2499
2500
|
if (ct1.rotRad != ct2.rotRad) return false;
|
|
2500
2501
|
log('ct1', ct1.pos.x, ct1.pos.y, ct1.size.width);
|
|
2501
2502
|
log('ct2', ct2.pos.x, ct2.pos.y, ct2.size.width);
|
|
@@ -297,8 +297,8 @@ function _parseTempPlaceholdersFromCabinetPayload() {
|
|
|
297
297
|
var phname = tempPlaceholders[0].name;
|
|
298
298
|
var newph = undefined;
|
|
299
299
|
var blAdd = true;
|
|
300
|
-
if (cabinetPayload.is_corner) {
|
|
301
|
-
if (tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
|
|
300
|
+
if (cabinetPayload.is_corner && cabinetPayload.is_corner !== -1) {
|
|
301
|
+
if (tempData['base_door' + t.name.slice(-2)] && tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
|
|
302
302
|
newph = tempPlaceholders.find(function (el) {
|
|
303
303
|
return el.name.isLeftPlaceholder();
|
|
304
304
|
});
|
|
@@ -306,12 +306,12 @@ function _parseTempPlaceholdersFromCabinetPayload() {
|
|
|
306
306
|
blAdd = false;
|
|
307
307
|
}
|
|
308
308
|
} else {
|
|
309
|
-
if (tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
|
|
309
|
+
if (tempData['base_door' + t.name.slice(-2)] && tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
|
|
310
310
|
newph = tempPlaceholders.find(function (el) {
|
|
311
311
|
return el.name.isRightPlaceholder();
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
|
-
if (tempData['base_door' + t.name.slice(-2)][0].isRightPlaceholder()) {
|
|
314
|
+
if (tempData['base_door' + t.name.slice(-2)] && tempData['base_door' + t.name.slice(-2)][0].isRightPlaceholder()) {
|
|
315
315
|
newph = tempPlaceholders.find(function (el) {
|
|
316
316
|
return el.name.isLeftPlaceholder();
|
|
317
317
|
});
|