Refactor: Integrate activeLayer and builder store into SelectFloorPlan and LoadBlueprint components; enhance getWallPointsFromBlueprint function with additional parameters for wall creation; update wall handling in WallCreator and PolygonGenerator components.
This commit is contained in:
@@ -71,6 +71,7 @@ function WallCreator() {
|
||||
|
||||
if (wallIntersect && !pointIntersects) {
|
||||
const wall = getWallByPoints(wallIntersect.object.userData.points);
|
||||
console.log('wall: ', wall);
|
||||
if (wall) {
|
||||
const ThroughPoint = wallIntersect.object.userData.path.getPoints(Constants.lineConfig.lineIntersectionPoints);
|
||||
let intersectionPoint = getClosestIntersection(ThroughPoint, wallIntersect.point);
|
||||
@@ -294,7 +295,9 @@ function WallCreator() {
|
||||
position: [position.x, position.y, position.z],
|
||||
layer: activeLayer
|
||||
};
|
||||
console.log('newPoint: ', newPoint);
|
||||
|
||||
console.log('snappedPoint: ', snappedPoint);
|
||||
if (snappedPosition && snappedPoint) {
|
||||
newPoint.pointUuid = snappedPoint.pointUuid;
|
||||
newPoint.position = snappedPosition;
|
||||
@@ -316,6 +319,7 @@ function WallCreator() {
|
||||
}
|
||||
}
|
||||
|
||||
console.log('tempPoints: ', tempPoints);
|
||||
if (tempPoints.length === 0) {
|
||||
setTempPoints([newPoint]);
|
||||
setIsCreating(true);
|
||||
@@ -330,6 +334,7 @@ function WallCreator() {
|
||||
decals: []
|
||||
};
|
||||
addWall(wall);
|
||||
console.log('wall: ', wall);
|
||||
|
||||
// API
|
||||
|
||||
|
||||
Reference in New Issue
Block a user