kitchen-simulator 11.35.0 → 11.36.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.
|
@@ -2972,6 +2972,7 @@ var applyTexture = function applyTexture(material, texture, length, height) {
|
|
|
2972
2972
|
* @param {Scene} scene
|
|
2973
2973
|
*/
|
|
2974
2974
|
export function createBacksplash(item, layer, planData, scene) {
|
|
2975
|
+
var _getSnappedWallLines;
|
|
2975
2976
|
var sceneGraph = planData.sceneGraph;
|
|
2976
2977
|
var selectedLayer = planData.sceneData.selectedLayer;
|
|
2977
2978
|
/**
|
|
@@ -2996,7 +2997,9 @@ export function createBacksplash(item, layer, planData, scene) {
|
|
|
2996
2997
|
}
|
|
2997
2998
|
|
|
2998
2999
|
// Get current wall line that item is snapped
|
|
2999
|
-
var wLines = getSnappedWallLines(item.itemInfo, layer, planData.catalog)
|
|
3000
|
+
var wLines = (_getSnappedWallLines = getSnappedWallLines(item.itemInfo, layer, planData.catalog)) === null || _getSnappedWallLines === void 0 ? void 0 : _getSnappedWallLines.filter(function (sLine) {
|
|
3001
|
+
return sLine.snapSide === 'front';
|
|
3002
|
+
});
|
|
3000
3003
|
var curLine = wLines.length > 0 ? wLines[0] : null;
|
|
3001
3004
|
|
|
3002
3005
|
// Get wall items which snapped to the curLine
|
|
@@ -3075,6 +3078,7 @@ export function createBacksplash(item, layer, planData, scene) {
|
|
|
3075
3078
|
altitude: altitude
|
|
3076
3079
|
});
|
|
3077
3080
|
});
|
|
3081
|
+
var DEFAULT_BACKSPLASH_HEIGHT = 52 * 2.54;
|
|
3078
3082
|
if (altItems.length > 0) {
|
|
3079
3083
|
depth = altItems[0].altitude;
|
|
3080
3084
|
altItems.map(function (altItem) {
|
|
@@ -3083,11 +3087,9 @@ export function createBacksplash(item, layer, planData, scene) {
|
|
|
3083
3087
|
depth = altItem.altitude;
|
|
3084
3088
|
flag = true;
|
|
3085
3089
|
}
|
|
3086
|
-
}
|
|
3090
|
+
} else if (!flag || depth > DEFAULT_BACKSPLASH_HEIGHT) depth = DEFAULT_BACKSPLASH_HEIGHT;
|
|
3087
3091
|
});
|
|
3088
3092
|
}
|
|
3089
|
-
var DEFAULT_BACKSPLASH_HEIGHT = 52 * 2.54;
|
|
3090
|
-
if (!flag || depth > DEFAULT_BACKSPLASH_HEIGHT) depth = DEFAULT_BACKSPLASH_HEIGHT;
|
|
3091
3093
|
|
|
3092
3094
|
// Get backsplash info
|
|
3093
3095
|
|
|
@@ -3006,6 +3006,7 @@ var applyTexture = function applyTexture(material, texture, length, height) {
|
|
|
3006
3006
|
* @param {Scene} scene
|
|
3007
3007
|
*/
|
|
3008
3008
|
function createBacksplash(item, layer, planData, scene) {
|
|
3009
|
+
var _getSnappedWallLines;
|
|
3009
3010
|
var sceneGraph = planData.sceneGraph;
|
|
3010
3011
|
var selectedLayer = planData.sceneData.selectedLayer;
|
|
3011
3012
|
/**
|
|
@@ -3030,7 +3031,9 @@ function createBacksplash(item, layer, planData, scene) {
|
|
|
3030
3031
|
}
|
|
3031
3032
|
|
|
3032
3033
|
// Get current wall line that item is snapped
|
|
3033
|
-
var wLines = (0, _geometry2.getSnappedWallLines)(item.itemInfo, layer, planData.catalog)
|
|
3034
|
+
var wLines = (_getSnappedWallLines = (0, _geometry2.getSnappedWallLines)(item.itemInfo, layer, planData.catalog)) === null || _getSnappedWallLines === void 0 ? void 0 : _getSnappedWallLines.filter(function (sLine) {
|
|
3035
|
+
return sLine.snapSide === 'front';
|
|
3036
|
+
});
|
|
3034
3037
|
var curLine = wLines.length > 0 ? wLines[0] : null;
|
|
3035
3038
|
|
|
3036
3039
|
// Get wall items which snapped to the curLine
|
|
@@ -3109,6 +3112,7 @@ function createBacksplash(item, layer, planData, scene) {
|
|
|
3109
3112
|
altitude: altitude
|
|
3110
3113
|
});
|
|
3111
3114
|
});
|
|
3115
|
+
var DEFAULT_BACKSPLASH_HEIGHT = 52 * 2.54;
|
|
3112
3116
|
if (altItems.length > 0) {
|
|
3113
3117
|
depth = altItems[0].altitude;
|
|
3114
3118
|
altItems.map(function (altItem) {
|
|
@@ -3117,11 +3121,9 @@ function createBacksplash(item, layer, planData, scene) {
|
|
|
3117
3121
|
depth = altItem.altitude;
|
|
3118
3122
|
flag = true;
|
|
3119
3123
|
}
|
|
3120
|
-
}
|
|
3124
|
+
} else if (!flag || depth > DEFAULT_BACKSPLASH_HEIGHT) depth = DEFAULT_BACKSPLASH_HEIGHT;
|
|
3121
3125
|
});
|
|
3122
3126
|
}
|
|
3123
|
-
var DEFAULT_BACKSPLASH_HEIGHT = 52 * 2.54;
|
|
3124
|
-
if (!flag || depth > DEFAULT_BACKSPLASH_HEIGHT) depth = DEFAULT_BACKSPLASH_HEIGHT;
|
|
3125
3127
|
|
|
3126
3128
|
// Get backsplash info
|
|
3127
3129
|
|