@colijnit/homedecorator 258.1.12 → 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.
- package/app/plugins/core3d/items/wall-objects.d.ts +1 -0
- package/app/plugins/room-planner/components/custome-shape-creator/custom-shape-creator.component.d.ts +4 -0
- package/bundles/colijnit-homedecorator.umd.js +40 -6
- package/bundles/colijnit-homedecorator.umd.js.map +1 -1
- package/esm2015/app/core/service/presets.service.js +1 -1
- package/esm2015/app/plugins/core3d/hud/bounding-measurement-box/door-or-window-box-measurement.js +4 -4
- package/esm2015/app/plugins/core3d/items/base-item.js +1 -1
- package/esm2015/app/plugins/core3d/items/custom-cylinder-floor-item.js +2 -1
- package/esm2015/app/plugins/core3d/items/custom-cylinder-wall-item.js +2 -1
- package/esm2015/app/plugins/core3d/items/custom-shape-floor-item.js +2 -1
- package/esm2015/app/plugins/core3d/items/custom-shape-wall-item.js +2 -1
- package/esm2015/app/plugins/core3d/items/in-wall-floor-item.js +2 -1
- package/esm2015/app/plugins/core3d/items/wall-objects.js +8 -1
- package/esm2015/app/plugins/core3d/service/item.service.js +3 -1
- package/esm2015/app/plugins/furniture-manager/furniture-manager/furniture-manager.component.js +7 -1
- package/esm2015/app/plugins/room-planner/components/custom-cylinder-creator/custom-cylinder-creator.component.js +3 -1
- package/esm2015/app/plugins/room-planner/components/custome-shape-creator/custom-shape-creator.component.js +11 -4
- package/esm2015/app/plugins/room-planner/components/floorplanner/service/room.service.js +4 -1
- package/esm2015/app/plugins/threedselector/threedselector/service/third-party-model.service.js +2 -1
- package/fesm2015/colijnit-homedecorator.js +39 -6
- package/fesm2015/colijnit-homedecorator.js.map +1 -1
- package/package.json +1 -1
|
@@ -410,6 +410,7 @@ export declare abstract class WallItem extends Item {
|
|
|
410
410
|
updateMaterialVisibility(side?: number): void;
|
|
411
411
|
createTextureMaterial(options?: any): Promise<THREE.MeshPhongMaterial>;
|
|
412
412
|
getTexture(): Texture;
|
|
413
|
+
setScaleXYZ(x: number, y: number, z: number, recalculateHalfSize?: boolean): void;
|
|
413
414
|
protected createMaterial(side?: number, isSame?: boolean): Promise<void>;
|
|
414
415
|
protected setYPositionBasedOnElevation(): void;
|
|
415
416
|
protected addMaterialMap(material: THREE.MeshPhongMaterial, texture: Texture, flip: boolean): Promise<void>;
|
|
@@ -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;
|
|
@@ -14032,6 +14032,11 @@
|
|
|
14032
14032
|
WallItem.prototype.getTexture = function () {
|
|
14033
14033
|
return this.texture;
|
|
14034
14034
|
};
|
|
14035
|
+
WallItem.prototype.setScaleXYZ = function (x, y, z, recalculateHalfSize) {
|
|
14036
|
+
if (recalculateHalfSize === void 0) { recalculateHalfSize = true; }
|
|
14037
|
+
_super_1.prototype.setScaleXYZ.call(this, x, y, z, recalculateHalfSize);
|
|
14038
|
+
this.reposition();
|
|
14039
|
+
};
|
|
14035
14040
|
WallItem.prototype.createMaterial = function (side, isSame) {
|
|
14036
14041
|
if (side === void 0) { side = THREE__namespace.DoubleSide; }
|
|
14037
14042
|
if (isSame === void 0) { isSame = true; }
|
|
@@ -14209,6 +14214,9 @@
|
|
|
14209
14214
|
/** takes the move vec3, and makes sure object stays bounded on plane */
|
|
14210
14215
|
WallItem.prototype._boundMove = function (vec3) {
|
|
14211
14216
|
var edge = this.currentWallEdge;
|
|
14217
|
+
if (!edge) {
|
|
14218
|
+
return;
|
|
14219
|
+
}
|
|
14212
14220
|
vec3.applyMatrix4(edge.interiorTransform);
|
|
14213
14221
|
edge.wall.itemsChanged = true;
|
|
14214
14222
|
if (vec3.x < this._sizeX / 2.0 + this._positionYTolerance) {
|
|
@@ -14913,6 +14921,7 @@
|
|
|
14913
14921
|
}
|
|
14914
14922
|
InWallFloorItem.prototype.createClass = function () {
|
|
14915
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();
|
|
14916
14925
|
return clazz;
|
|
14917
14926
|
};
|
|
14918
14927
|
return InWallFloorItem;
|
|
@@ -15021,6 +15030,7 @@
|
|
|
15021
15030
|
var metadata = Object.assign({}, this.metadata);
|
|
15022
15031
|
metadata.skin = Object.assign({}, this.skin);
|
|
15023
15032
|
var copy = new CustomShapeFloorItem(metadata, new THREE.Mesh(this.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z), materialsCloned));
|
|
15033
|
+
copy.buildFinished();
|
|
15024
15034
|
copy.scaleGeometry(this.scale.x, this.scale.y, this.scale.z);
|
|
15025
15035
|
copy.calculateHalfSize();
|
|
15026
15036
|
return copy;
|
|
@@ -15086,6 +15096,7 @@
|
|
|
15086
15096
|
var metadata = Object.assign({}, this.metadata);
|
|
15087
15097
|
metadata.skin = Object.assign({}, this.skin);
|
|
15088
15098
|
var copy = new CustomCylinderFloorItem(metadata, new THREE.Mesh(this.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z), materialsCloned));
|
|
15099
|
+
copy.buildFinished();
|
|
15089
15100
|
copy.scaleGeometry(this.scale.x, this.scale.y, this.scale.z);
|
|
15090
15101
|
copy.calculateHalfSize();
|
|
15091
15102
|
return copy;
|
|
@@ -15487,6 +15498,7 @@
|
|
|
15487
15498
|
item.opening = Object.assign({}, metadata.opening);
|
|
15488
15499
|
}
|
|
15489
15500
|
item.userData.itemType = metadata.itemType;
|
|
15501
|
+
item.buildFinished();
|
|
15490
15502
|
this.addItem(item);
|
|
15491
15503
|
return item;
|
|
15492
15504
|
};
|
|
@@ -15524,6 +15536,7 @@
|
|
|
15524
15536
|
return [4 /*yield*/, new itemConstructor(metadata, modelData.object)];
|
|
15525
15537
|
case 1:
|
|
15526
15538
|
item = _a.sent();
|
|
15539
|
+
item.buildFinished();
|
|
15527
15540
|
this.addItem(item);
|
|
15528
15541
|
return [2 /*return*/, item];
|
|
15529
15542
|
}
|
|
@@ -20376,6 +20389,9 @@
|
|
|
20376
20389
|
case 1:
|
|
20377
20390
|
_a.sent();
|
|
20378
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
|
+
}
|
|
20379
20395
|
return [2 /*return*/];
|
|
20380
20396
|
}
|
|
20381
20397
|
});
|
|
@@ -21933,6 +21949,7 @@
|
|
|
21933
21949
|
var metadata = Object.assign({}, this.metadata);
|
|
21934
21950
|
metadata.skin = Object.assign({}, this.skin);
|
|
21935
21951
|
var copy = new CustomShapeWallItem(metadata, new THREE.Mesh(this.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z), materialsCloned));
|
|
21952
|
+
copy.buildFinished();
|
|
21936
21953
|
copy.scaleGeometry(this.scale.x, this.scale.y, this.scale.z);
|
|
21937
21954
|
copy.calculateHalfSize();
|
|
21938
21955
|
return copy;
|
|
@@ -21992,6 +22009,7 @@
|
|
|
21992
22009
|
var metadata = Object.assign({}, this.metadata);
|
|
21993
22010
|
metadata.skin = Object.assign({}, this.skin);
|
|
21994
22011
|
var copy = new CustomCylinderWallItem(metadata, new THREE.Mesh(this.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z), materialsCloned));
|
|
22012
|
+
copy.buildFinished();
|
|
21995
22013
|
copy.scaleGeometry(this.scale.x, this.scale.y, this.scale.z);
|
|
21996
22014
|
copy.calculateHalfSize();
|
|
21997
22015
|
return copy;
|
|
@@ -23013,7 +23031,7 @@
|
|
|
23013
23031
|
var height = new BoxMeasurement();
|
|
23014
23032
|
var heightString = MeasurementUtils.makeText(this._height, this.dimUnit, this.distanceStep);
|
|
23015
23033
|
var text = this._dictionaryService.get('LABEL_HEIGHT');
|
|
23016
|
-
height.textMesh = makeTextMesh(heightString, this._font, text);
|
|
23034
|
+
height.textMesh = makeTextMesh(heightString, this._font, 0xFF00FF, 0.08, false, false, text);
|
|
23017
23035
|
height.positions = this.calculateHeightPositions();
|
|
23018
23036
|
return height;
|
|
23019
23037
|
};
|
|
@@ -23030,7 +23048,7 @@
|
|
|
23030
23048
|
var width = new BoxMeasurement();
|
|
23031
23049
|
var widthString = MeasurementUtils.makeText(this._width, this.dimUnit, this.distanceStep);
|
|
23032
23050
|
var text = this._dictionaryService.get('LABEL_WIDTH');
|
|
23033
|
-
width.textMesh = makeTextMesh(widthString, this._font, text);
|
|
23051
|
+
width.textMesh = makeTextMesh(widthString, this._font, 0xFF00FF, 0.08, false, false, text);
|
|
23034
23052
|
width.positions = this.calculateWidthPositions();
|
|
23035
23053
|
return width;
|
|
23036
23054
|
};
|
|
@@ -23047,7 +23065,7 @@
|
|
|
23047
23065
|
var openingDepth = new BoxMeasurement();
|
|
23048
23066
|
var openingDepthString = MeasurementUtils.makeText(this._openingDepth, this.dimUnit, this.distanceStep);
|
|
23049
23067
|
var text = this._dictionaryService.get('LABEL_DEPTH');
|
|
23050
|
-
openingDepth.textMesh = makeTextMesh(openingDepthString, this._font, text);
|
|
23068
|
+
openingDepth.textMesh = makeTextMesh(openingDepthString, this._font, 0xFF00FF, 0.08, false, false, text);
|
|
23051
23069
|
openingDepth.positions = this.calculateOpeningDepthPositions();
|
|
23052
23070
|
return openingDepth;
|
|
23053
23071
|
};
|
|
@@ -33106,6 +33124,7 @@
|
|
|
33106
33124
|
}
|
|
33107
33125
|
item.allowRotate = true;
|
|
33108
33126
|
item.highLightDisabled = !this._settingsService.settings.options.useStandaloneHighLight;
|
|
33127
|
+
item.buildFinished();
|
|
33109
33128
|
newCustomFloorObj.furniture = item;
|
|
33110
33129
|
return newCustomFloorObj;
|
|
33111
33130
|
};
|
|
@@ -42851,17 +42870,21 @@
|
|
|
42851
42870
|
this.isFloorType = !this.isFloorType;
|
|
42852
42871
|
var origScale = new THREE.Vector3(1, 1, 1).divide(this.shape.metadata.scale || new THREE.Vector3(1, 1, 1));
|
|
42853
42872
|
if (this.isFloorType) {
|
|
42873
|
+
this._oldWallPosition = this.shape.position.clone();
|
|
42874
|
+
this._oldWallElevation = this.shape.elevation;
|
|
42854
42875
|
var metadata = Object.assign(Object.assign({}, this.shape.metadata), { itemType: ItemType.CustomShape });
|
|
42855
|
-
metadata.position = undefined;
|
|
42876
|
+
metadata.position = this._oldFloorPosition ? this._oldFloorPosition.clone() : undefined;
|
|
42877
|
+
metadata.elevation = this._oldFloorElevation ? this._oldFloorElevation : 0;
|
|
42856
42878
|
metadata.centerPivot = true;
|
|
42857
42879
|
var geometry = this.shape.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z);
|
|
42858
42880
|
var shapeFloor = new CustomShapeFloorItem(metadata, new THREE.Mesh(geometry, this.shape.customMesh.material));
|
|
42881
|
+
shapeFloor.buildFinished();
|
|
42859
42882
|
shapeFloor.scaleGeometry(this.shape.scale.x, this.shape.scale.y, this.shape.scale.z);
|
|
42860
42883
|
shapeFloor.calculateHalfSize();
|
|
42861
42884
|
shapeFloor.skin = this.shape.skin;
|
|
42862
42885
|
var roomCenter = this._roomService.getRoomCenter();
|
|
42863
42886
|
if (roomCenter) {
|
|
42864
|
-
shapeFloor.position.copy(roomCenter);
|
|
42887
|
+
shapeFloor.position.copy(this._oldFloorPosition ? this._oldFloorPosition.clone() : roomCenter);
|
|
42865
42888
|
}
|
|
42866
42889
|
shapeFloor.position.y = shapeFloor.getFloorY();
|
|
42867
42890
|
this._itemService.addItem(shapeFloor);
|
|
@@ -42871,11 +42894,14 @@
|
|
|
42871
42894
|
this._hudService.updateSelectedItemHud();
|
|
42872
42895
|
}
|
|
42873
42896
|
else {
|
|
42897
|
+
this._oldFloorPosition = this.shape.position.clone();
|
|
42898
|
+
this._oldFloorElevation = this.shape.elevation;
|
|
42874
42899
|
var metadata = Object.assign(Object.assign({}, this.shape.metadata), { itemType: ItemType.CustomShapeWall });
|
|
42875
|
-
metadata.position = undefined;
|
|
42900
|
+
metadata.position = this._oldWallPosition ? this._oldWallPosition.clone() : undefined;
|
|
42876
42901
|
metadata.centerPivot = false;
|
|
42877
42902
|
var geometry = this.shape.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z);
|
|
42878
42903
|
var shapeWall = new CustomShapeWallItem(metadata, new THREE.Mesh(geometry, this.shape.customMesh.material));
|
|
42904
|
+
shapeWall.buildFinished();
|
|
42879
42905
|
shapeWall.scaleGeometry(this.shape.scale.x, this.shape.scale.y, this.shape.scale.z);
|
|
42880
42906
|
shapeWall.calculateHalfSize();
|
|
42881
42907
|
shapeWall.skin = this.shape.skin;
|
|
@@ -43148,6 +43174,7 @@
|
|
|
43148
43174
|
var geometry = this.shape.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z);
|
|
43149
43175
|
geometry.rotateX(-Math.PI / 2);
|
|
43150
43176
|
var shapeFloor = new CustomCylinderFloorItem(metadata, new THREE.Mesh(geometry, this.shape.customMesh.material));
|
|
43177
|
+
shapeFloor.buildFinished();
|
|
43151
43178
|
shapeFloor.scaleGeometry(this.shape.scale.x, this.shape.scale.y, this.shape.scale.z);
|
|
43152
43179
|
shapeFloor.calculateHalfSize();
|
|
43153
43180
|
shapeFloor.skin = this.shape.skin;
|
|
@@ -43169,6 +43196,7 @@
|
|
|
43169
43196
|
var position = this.shape.position.clone();
|
|
43170
43197
|
var geometry = this.shape.customMesh.geometry.clone().scale(origScale.x, origScale.y, origScale.z);
|
|
43171
43198
|
var shapeWall = new CustomCylinderWallItem(metadata, new THREE.Mesh(geometry, this.shape.customMesh.material));
|
|
43199
|
+
shapeWall.buildFinished();
|
|
43172
43200
|
shapeWall.scaleGeometry(this.shape.scale.x, this.shape.scale.y, this.shape.scale.z);
|
|
43173
43201
|
shapeWall.customMesh.geometry.rotateX(Math.PI / 2);
|
|
43174
43202
|
shapeWall.calculateHalfSize();
|
|
@@ -45266,6 +45294,7 @@
|
|
|
45266
45294
|
itemSelected: this.itemSelected.bind(this),
|
|
45267
45295
|
itemUnselected: this.itemUnselected.bind(this)
|
|
45268
45296
|
});
|
|
45297
|
+
item.buildFinished();
|
|
45269
45298
|
this._itemService.addItem(item);
|
|
45270
45299
|
return [2 /*return*/, item];
|
|
45271
45300
|
}
|
|
@@ -45378,6 +45407,7 @@
|
|
|
45378
45407
|
};
|
|
45379
45408
|
metadata.scale = model.scale;
|
|
45380
45409
|
item = new FloorItem(metadata, model.object, null, handlers);
|
|
45410
|
+
item.buildFinished();
|
|
45381
45411
|
if (object.itemGroup) {
|
|
45382
45412
|
this._groupService.reattachToItemGroup(item, object.itemGroup, position);
|
|
45383
45413
|
}
|
|
@@ -45423,6 +45453,7 @@
|
|
|
45423
45453
|
return [7 /*endfinally*/];
|
|
45424
45454
|
case 12:
|
|
45425
45455
|
item = new CustomShapeFloorItem(metadata, new THREE.Mesh(geometry, materials), object.texture);
|
|
45456
|
+
item.buildFinished();
|
|
45426
45457
|
if (object.itemGroup) {
|
|
45427
45458
|
this._groupService.reattachToItemGroup(item, object.itemGroup, position);
|
|
45428
45459
|
}
|
|
@@ -45462,6 +45493,7 @@
|
|
|
45462
45493
|
return [7 /*endfinally*/];
|
|
45463
45494
|
case 21:
|
|
45464
45495
|
item = new CustomShapeWallItem(metadata, new THREE.Mesh(geometry, materials), object.texture);
|
|
45496
|
+
item.buildFinished();
|
|
45465
45497
|
closestWallEdge = this._roomService.getClosestWallEdge(position.x, position.z);
|
|
45466
45498
|
item.placeOnEdge(closestWallEdge);
|
|
45467
45499
|
if (object.itemGroup) {
|
|
@@ -45503,6 +45535,7 @@
|
|
|
45503
45535
|
return [7 /*endfinally*/];
|
|
45504
45536
|
case 30:
|
|
45505
45537
|
item = new CustomCylinderFloorItem(metadata, new THREE.Mesh(geometry, materials), object.texture);
|
|
45538
|
+
item.buildFinished();
|
|
45506
45539
|
if (object.itemGroup) {
|
|
45507
45540
|
this._groupService.reattachToItemGroup(item, object.itemGroup, position);
|
|
45508
45541
|
}
|
|
@@ -45543,6 +45576,7 @@
|
|
|
45543
45576
|
return [7 /*endfinally*/];
|
|
45544
45577
|
case 39:
|
|
45545
45578
|
item = new CustomCylinderWallItem(metadata, new THREE.Mesh(geometry, materials), object.texture);
|
|
45579
|
+
item.buildFinished();
|
|
45546
45580
|
closestWallEdge = this._roomService.getClosestWallEdge(position.x, position.z);
|
|
45547
45581
|
item.placeOnEdge(closestWallEdge);
|
|
45548
45582
|
if (object.itemGroup) {
|