From 1117e0cb5f282ac5b2c365840d7c722d2beb3be3 Mon Sep 17 00:00:00 2001 From: wass08 Date: Thu, 26 Feb 2026 08:03:05 +0900 Subject: [PATCH] prevent 0m long wall creation #103 --- apps/editor/components/tools/wall/wall-tool.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/editor/components/tools/wall/wall-tool.tsx b/apps/editor/components/tools/wall/wall-tool.tsx index abe04962..8dc325fa 100644 --- a/apps/editor/components/tools/wall/wall-tool.tsx +++ b/apps/editor/components/tools/wall/wall-tool.tsx @@ -143,6 +143,9 @@ export const WallTool: React.FC = () => { buildingState.current = 1 wallPreviewRef.current.visible = true } else if (buildingState.current === 1) { + const dx = endingPoint.current.x - startingPoint.current.x + const dz = endingPoint.current.z - startingPoint.current.z + if (dx * dx + dz * dz < 0.01 * 0.01) return commitWallDrawing( [startingPoint.current.x, startingPoint.current.z], [endingPoint.current.x, endingPoint.current.z],