@colijnit/homedecorator 258.1.13 → 258.1.14

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.
@@ -31,6 +31,10 @@ export declare class CustomShapeCreatorComponent implements OnInit {
31
31
  selectedFace: Face;
32
32
  textureOptions: typeof TextureEditorOptions;
33
33
  skin: BoxSkin;
34
+ private _oldFloorPosition;
35
+ private _oldFloorElevation;
36
+ private _oldWallPosition;
37
+ private _oldWallElevation;
34
38
  constructor(_hudService: HudService, _sceneService: SceneService, _roomService: RoomService, _itemService: ItemService, _sceneEventService: SceneEventService, _messageBusService: MessageBusService);
35
39
  ngOnInit(): void;
36
40
  setName(name: string): void;
@@ -14921,6 +14921,7 @@
14921
14921
  }
14922
14922
  InWallFloorItem.prototype.createClass = function () {
14923
14923
  var clazz = new InWallFloorItem(this.metadata, new THREE.Mesh(new THREE.BoxGeometry(this.halfSize.x * 2, this.halfSize.y * 2, this.halfSize.z * 2)));
14924
+ clazz.buildFinished();
14924
14925
  return clazz;
14925
14926
  };
14926
14927
  return InWallFloorItem;
@@ -15029,6 +15030,7 @@
15029
15030
  var metadata = Object.assign({}, this.metadata);
15030
15031
  metadata.skin = Object.assign({}, this.skin);
15031
15032
  var copy = new CustomShapeFloorItem(metadata, new THREE.Mesh(this.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z), materialsCloned));
15033
+ copy.buildFinished();
15032
15034
  copy.scaleGeometry(this.scale.x, this.scale.y, this.scale.z);
15033
15035
  copy.calculateHalfSize();
15034
15036
  return copy;
@@ -15094,6 +15096,7 @@
15094
15096
  var metadata = Object.assign({}, this.metadata);
15095
15097
  metadata.skin = Object.assign({}, this.skin);
15096
15098
  var copy = new CustomCylinderFloorItem(metadata, new THREE.Mesh(this.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z), materialsCloned));
15099
+ copy.buildFinished();
15097
15100
  copy.scaleGeometry(this.scale.x, this.scale.y, this.scale.z);
15098
15101
  copy.calculateHalfSize();
15099
15102
  return copy;
@@ -20386,6 +20389,9 @@
20386
20389
  case 1:
20387
20390
  _a.sent();
20388
20391
  this.walls.forEach(function (wall) { return wall.updateWallItems(); });
20392
+ if (this.walls && this.walls.length > 0 && this._viewModeService.is3dViewActive()) {
20393
+ this._updateEdgeVisibility(this._cameraService.camera.position);
20394
+ }
20389
20395
  return [2 /*return*/];
20390
20396
  }
20391
20397
  });
@@ -21943,6 +21949,7 @@
21943
21949
  var metadata = Object.assign({}, this.metadata);
21944
21950
  metadata.skin = Object.assign({}, this.skin);
21945
21951
  var copy = new CustomShapeWallItem(metadata, new THREE.Mesh(this.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z), materialsCloned));
21952
+ copy.buildFinished();
21946
21953
  copy.scaleGeometry(this.scale.x, this.scale.y, this.scale.z);
21947
21954
  copy.calculateHalfSize();
21948
21955
  return copy;
@@ -22002,6 +22009,7 @@
22002
22009
  var metadata = Object.assign({}, this.metadata);
22003
22010
  metadata.skin = Object.assign({}, this.skin);
22004
22011
  var copy = new CustomCylinderWallItem(metadata, new THREE.Mesh(this.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z), materialsCloned));
22012
+ copy.buildFinished();
22005
22013
  copy.scaleGeometry(this.scale.x, this.scale.y, this.scale.z);
22006
22014
  copy.calculateHalfSize();
22007
22015
  return copy;
@@ -42862,17 +42870,21 @@
42862
42870
  this.isFloorType = !this.isFloorType;
42863
42871
  var origScale = new THREE.Vector3(1, 1, 1).divide(this.shape.metadata.scale || new THREE.Vector3(1, 1, 1));
42864
42872
  if (this.isFloorType) {
42873
+ this._oldWallPosition = this.shape.position.clone();
42874
+ this._oldWallElevation = this.shape.elevation;
42865
42875
  var metadata = Object.assign(Object.assign({}, this.shape.metadata), { itemType: ItemType.CustomShape });
42866
- metadata.position = undefined;
42876
+ metadata.position = this._oldFloorPosition ? this._oldFloorPosition.clone() : undefined;
42877
+ metadata.elevation = this._oldFloorElevation ? this._oldFloorElevation : 0;
42867
42878
  metadata.centerPivot = true;
42868
42879
  var geometry = this.shape.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z);
42869
42880
  var shapeFloor = new CustomShapeFloorItem(metadata, new THREE.Mesh(geometry, this.shape.customMesh.material));
42881
+ shapeFloor.buildFinished();
42870
42882
  shapeFloor.scaleGeometry(this.shape.scale.x, this.shape.scale.y, this.shape.scale.z);
42871
42883
  shapeFloor.calculateHalfSize();
42872
42884
  shapeFloor.skin = this.shape.skin;
42873
42885
  var roomCenter = this._roomService.getRoomCenter();
42874
42886
  if (roomCenter) {
42875
- shapeFloor.position.copy(roomCenter);
42887
+ shapeFloor.position.copy(this._oldFloorPosition ? this._oldFloorPosition.clone() : roomCenter);
42876
42888
  }
42877
42889
  shapeFloor.position.y = shapeFloor.getFloorY();
42878
42890
  this._itemService.addItem(shapeFloor);
@@ -42882,11 +42894,14 @@
42882
42894
  this._hudService.updateSelectedItemHud();
42883
42895
  }
42884
42896
  else {
42897
+ this._oldFloorPosition = this.shape.position.clone();
42898
+ this._oldFloorElevation = this.shape.elevation;
42885
42899
  var metadata = Object.assign(Object.assign({}, this.shape.metadata), { itemType: ItemType.CustomShapeWall });
42886
- metadata.position = undefined;
42900
+ metadata.position = this._oldWallPosition ? this._oldWallPosition.clone() : undefined;
42887
42901
  metadata.centerPivot = false;
42888
42902
  var geometry = this.shape.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z);
42889
42903
  var shapeWall = new CustomShapeWallItem(metadata, new THREE.Mesh(geometry, this.shape.customMesh.material));
42904
+ shapeWall.buildFinished();
42890
42905
  shapeWall.scaleGeometry(this.shape.scale.x, this.shape.scale.y, this.shape.scale.z);
42891
42906
  shapeWall.calculateHalfSize();
42892
42907
  shapeWall.skin = this.shape.skin;
@@ -43159,6 +43174,7 @@
43159
43174
  var geometry = this.shape.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z);
43160
43175
  geometry.rotateX(-Math.PI / 2);
43161
43176
  var shapeFloor = new CustomCylinderFloorItem(metadata, new THREE.Mesh(geometry, this.shape.customMesh.material));
43177
+ shapeFloor.buildFinished();
43162
43178
  shapeFloor.scaleGeometry(this.shape.scale.x, this.shape.scale.y, this.shape.scale.z);
43163
43179
  shapeFloor.calculateHalfSize();
43164
43180
  shapeFloor.skin = this.shape.skin;
@@ -43180,6 +43196,7 @@
43180
43196
  var position = this.shape.position.clone();
43181
43197
  var geometry = this.shape.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z);
43182
43198
  var shapeWall = new CustomCylinderWallItem(metadata, new THREE.Mesh(geometry, this.shape.customMesh.material));
43199
+ shapeWall.buildFinished();
43183
43200
  shapeWall.scaleGeometry(this.shape.scale.x, this.shape.scale.y, this.shape.scale.z);
43184
43201
  shapeWall.customMesh.geometry.rotateX(Math.PI / 2);
43185
43202
  shapeWall.calculateHalfSize();
@@ -45277,6 +45294,7 @@
45277
45294
  itemSelected: this.itemSelected.bind(this),
45278
45295
  itemUnselected: this.itemUnselected.bind(this)
45279
45296
  });
45297
+ item.buildFinished();
45280
45298
  this._itemService.addItem(item);
45281
45299
  return [2 /*return*/, item];
45282
45300
  }
@@ -45389,6 +45407,7 @@
45389
45407
  };
45390
45408
  metadata.scale = model.scale;
45391
45409
  item = new FloorItem(metadata, model.object, null, handlers);
45410
+ item.buildFinished();
45392
45411
  if (object.itemGroup) {
45393
45412
  this._groupService.reattachToItemGroup(item, object.itemGroup, position);
45394
45413
  }
@@ -45434,6 +45453,7 @@
45434
45453
  return [7 /*endfinally*/];
45435
45454
  case 12:
45436
45455
  item = new CustomShapeFloorItem(metadata, new THREE.Mesh(geometry, materials), object.texture);
45456
+ item.buildFinished();
45437
45457
  if (object.itemGroup) {
45438
45458
  this._groupService.reattachToItemGroup(item, object.itemGroup, position);
45439
45459
  }
@@ -45473,6 +45493,7 @@
45473
45493
  return [7 /*endfinally*/];
45474
45494
  case 21:
45475
45495
  item = new CustomShapeWallItem(metadata, new THREE.Mesh(geometry, materials), object.texture);
45496
+ item.buildFinished();
45476
45497
  closestWallEdge = this._roomService.getClosestWallEdge(position.x, position.z);
45477
45498
  item.placeOnEdge(closestWallEdge);
45478
45499
  if (object.itemGroup) {
@@ -45514,6 +45535,7 @@
45514
45535
  return [7 /*endfinally*/];
45515
45536
  case 30:
45516
45537
  item = new CustomCylinderFloorItem(metadata, new THREE.Mesh(geometry, materials), object.texture);
45538
+ item.buildFinished();
45517
45539
  if (object.itemGroup) {
45518
45540
  this._groupService.reattachToItemGroup(item, object.itemGroup, position);
45519
45541
  }
@@ -45554,6 +45576,7 @@
45554
45576
  return [7 /*endfinally*/];
45555
45577
  case 39:
45556
45578
  item = new CustomCylinderWallItem(metadata, new THREE.Mesh(geometry, materials), object.texture);
45579
+ item.buildFinished();
45557
45580
  closestWallEdge = this._roomService.getClosestWallEdge(position.x, position.z);
45558
45581
  item.placeOnEdge(closestWallEdge);
45559
45582
  if (object.itemGroup) {