kitchen-simulator 11.31.0 → 11.33.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.
@@ -24,6 +24,7 @@ export default function (_ref) {
24
24
  obj_property = _ref.obj_property,
25
25
  outlineSVGData = _ref.outlineSVGData,
26
26
  cds = _ref.cds,
27
+ do_not_overwrite_textures = _ref.do_not_overwrite_textures,
27
28
  can_be_mirrored = _ref.can_be_mirrored,
28
29
  mirrored = _ref.mirrored,
29
30
  _ref$width_unit = _ref.width_unit,
@@ -152,6 +153,7 @@ export default function (_ref) {
152
153
  img: base,
153
154
  obj: obj_property,
154
155
  cds: cds,
156
+ do_not_overwrite_textures: do_not_overwrite_textures,
155
157
  can_be_mirrored: can_be_mirrored,
156
158
  mirrored: mirrored,
157
159
  structure_json: structure_json,
@@ -1158,7 +1158,9 @@ export function render3DApplianceItem(element, layer, scene, sizeinfo, structure
1158
1158
  roughness: 0.9,
1159
1159
  map: texture
1160
1160
  });
1161
- obj.material = mat;
1161
+ if (!element.do_not_overwrite_textures) {
1162
+ obj.material = mat;
1163
+ }
1162
1164
  }
1163
1165
  });
1164
1166
  if (element.selected) {
@@ -1337,11 +1339,14 @@ export function render3DApplianceItem(element, layer, scene, sizeinfo, structure
1337
1339
  metalness: applianceMaterial.metalness,
1338
1340
  roughness: applianceMaterial.roughness
1339
1341
  });
1340
- // mat2.envMap = textureCube;
1341
- object.material = mat2;
1342
+ if (!element.do_not_overwrite_textures) {
1343
+ object.material = mat2;
1344
+ }
1342
1345
  for (var j = 0; j < object.children.length; j++) {
1343
1346
  if (object.children[j].type === OBJTYPE_MESH) {
1344
- object.children[j].material = mat2;
1347
+ if (!element.do_not_overwrite_textures) {
1348
+ object.children[j].material = mat2;
1349
+ }
1345
1350
  object.children[j].receiveShadow = true;
1346
1351
  object.children[j].castShadow = true; // change
1347
1352
  }
package/es/class/item.js CHANGED
@@ -81,6 +81,7 @@ var Item = /*#__PURE__*/function () {
81
81
  category: state.catalog.getIn(['elements', type, 'type']),
82
82
  layoutpos: state.catalog.getIn(['elements', type, 'info', 'layoutpos']),
83
83
  cabinet_category: state.catalog.getIn(['elements', type, 'obj']).toJS().cabinet_category,
84
+ do_not_overwrite_textures: state.catalog.getIn(['elements', type, 'do_not_overwrite_textures']),
84
85
  can_be_mirrored: state.catalog.getIn(['elements', type, 'can_be_mirrored']),
85
86
  mirrored: state.catalog.getIn(['elements', type, 'mirrored']),
86
87
  type: type,
@@ -1505,10 +1506,10 @@ var Item = /*#__PURE__*/function () {
1505
1506
  var _itemGroup;
1506
1507
  itemGroup = MoldingUtils.getItemGroupFromMolding(layer, curItem, md);
1507
1508
  itemGroup = (_itemGroup = itemGroup) === null || _itemGroup === void 0 ? void 0 : _itemGroup.filter(function (it) {
1508
- return isWarningCabinet(it);
1509
+ return !isWarningCabinet(it);
1509
1510
  });
1510
1511
  itemGroup.forEach(function (it) {
1511
- state = state.setIn(['scene', 'layers', layerID, 'items', it.id, 'molding'], []);
1512
+ state = state.setIn(['scene', 'layers', layerID, 'items', it.id, 'molding'], tmpMolding);
1512
1513
  });
1513
1514
  });
1514
1515
  };
package/es/models.js CHANGED
@@ -208,6 +208,7 @@ export var Item = /*#__PURE__*/function (_Record7) {
208
208
  uri: ''
209
209
  },
210
210
  molding: [],
211
+ do_not_overwrite_textures: false,
211
212
  can_be_mirrored: false,
212
213
  mirrored: false,
213
214
  isInitialPos: false,
@@ -358,6 +359,7 @@ export var CatalogElement = /*#__PURE__*/function (_Record1) {
358
359
  type: '',
359
360
  cds: new Map(),
360
361
  ccdf_list: new List(),
362
+ do_not_overwrite_textures: false,
361
363
  can_be_mirrored: false,
362
364
  mirrored: false,
363
365
  structure_json: {},
@@ -31,6 +31,7 @@ function _default(_ref) {
31
31
  obj_property = _ref.obj_property,
32
32
  outlineSVGData = _ref.outlineSVGData,
33
33
  cds = _ref.cds,
34
+ do_not_overwrite_textures = _ref.do_not_overwrite_textures,
34
35
  can_be_mirrored = _ref.can_be_mirrored,
35
36
  mirrored = _ref.mirrored,
36
37
  _ref$width_unit = _ref.width_unit,
@@ -159,6 +160,7 @@ function _default(_ref) {
159
160
  img: base,
160
161
  obj: obj_property,
161
162
  cds: cds,
163
+ do_not_overwrite_textures: do_not_overwrite_textures,
162
164
  can_be_mirrored: can_be_mirrored,
163
165
  mirrored: mirrored,
164
166
  structure_json: structure_json,
@@ -1172,7 +1172,9 @@ function render3DApplianceItem(element, layer, scene, sizeinfo, structure_json)
1172
1172
  roughness: 0.9,
1173
1173
  map: texture
1174
1174
  });
1175
- obj.material = mat;
1175
+ if (!element.do_not_overwrite_textures) {
1176
+ obj.material = mat;
1177
+ }
1176
1178
  }
1177
1179
  });
1178
1180
  if (element.selected) {
@@ -1351,11 +1353,14 @@ function render3DApplianceItem(element, layer, scene, sizeinfo, structure_json)
1351
1353
  metalness: applianceMaterial.metalness,
1352
1354
  roughness: applianceMaterial.roughness
1353
1355
  });
1354
- // mat2.envMap = textureCube;
1355
- object.material = mat2;
1356
+ if (!element.do_not_overwrite_textures) {
1357
+ object.material = mat2;
1358
+ }
1356
1359
  for (var j = 0; j < object.children.length; j++) {
1357
1360
  if (object.children[j].type === _constants.OBJTYPE_MESH) {
1358
- object.children[j].material = mat2;
1361
+ if (!element.do_not_overwrite_textures) {
1362
+ object.children[j].material = mat2;
1363
+ }
1359
1364
  object.children[j].receiveShadow = true;
1360
1365
  object.children[j].castShadow = true; // change
1361
1366
  }
package/lib/class/item.js CHANGED
@@ -88,6 +88,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
88
88
  category: state.catalog.getIn(['elements', type, 'type']),
89
89
  layoutpos: state.catalog.getIn(['elements', type, 'info', 'layoutpos']),
90
90
  cabinet_category: state.catalog.getIn(['elements', type, 'obj']).toJS().cabinet_category,
91
+ do_not_overwrite_textures: state.catalog.getIn(['elements', type, 'do_not_overwrite_textures']),
91
92
  can_be_mirrored: state.catalog.getIn(['elements', type, 'can_be_mirrored']),
92
93
  mirrored: state.catalog.getIn(['elements', type, 'mirrored']),
93
94
  type: type,
@@ -1512,10 +1513,10 @@ var Item = exports["default"] = /*#__PURE__*/function () {
1512
1513
  var _itemGroup;
1513
1514
  itemGroup = _export2.MoldingUtils.getItemGroupFromMolding(layer, curItem, md);
1514
1515
  itemGroup = (_itemGroup = itemGroup) === null || _itemGroup === void 0 ? void 0 : _itemGroup.filter(function (it) {
1515
- return (0, _cabinetWarning.isWarningCabinet)(it);
1516
+ return !(0, _cabinetWarning.isWarningCabinet)(it);
1516
1517
  });
1517
1518
  itemGroup.forEach(function (it) {
1518
- state = state.setIn(['scene', 'layers', layerID, 'items', it.id, 'molding'], []);
1519
+ state = state.setIn(['scene', 'layers', layerID, 'items', it.id, 'molding'], tmpMolding);
1519
1520
  });
1520
1521
  });
1521
1522
  };
package/lib/models.js CHANGED
@@ -215,6 +215,7 @@ var Item = exports.Item = /*#__PURE__*/function (_Record7) {
215
215
  uri: ''
216
216
  },
217
217
  molding: [],
218
+ do_not_overwrite_textures: false,
218
219
  can_be_mirrored: false,
219
220
  mirrored: false,
220
221
  isInitialPos: false,
@@ -365,6 +366,7 @@ var CatalogElement = exports.CatalogElement = /*#__PURE__*/function (_Record1) {
365
366
  type: '',
366
367
  cds: new _immutable.Map(),
367
368
  ccdf_list: new _immutable.List(),
369
+ do_not_overwrite_textures: false,
368
370
  can_be_mirrored: false,
369
371
  mirrored: false,
370
372
  structure_json: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitchen-simulator",
3
- "version": "11.31.0",
3
+ "version": "11.33.0",
4
4
  "description": "It is a kitchen simulator (self-contained micro-frontend).",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",