From f71068151dc9d0e3481cf97c4a3bf4495fc49830 Mon Sep 17 00:00:00 2001 From: Jerald-Golden-B Date: Mon, 29 Dec 2025 17:15:58 +0530 Subject: [PATCH] feat: Add 3D wall rendering component with textures and decals, and a trigger connector for managing simulation events. --- app/src/modules/builder/wall/Instances/instance/wall.tsx | 4 ++-- .../events/triggerConnections/triggerConnector.tsx | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/app/src/modules/builder/wall/Instances/instance/wall.tsx b/app/src/modules/builder/wall/Instances/instance/wall.tsx index 55b6f38..36b6ede 100644 --- a/app/src/modules/builder/wall/Instances/instance/wall.tsx +++ b/app/src/modules/builder/wall/Instances/instance/wall.tsx @@ -94,9 +94,9 @@ function Wall({ wall }: { readonly wall: Wall }) { if (!wallVisibility && wallType.type === "room") { meshRef.current.getWorldDirection(v); - camera.getWorldDirection(u); + u.subVectors(camera.position, meshRef.current.position); if (!u || !v) return; - nextVisible = 2 * v.dot(u) <= 0.1; + nextVisible = v.dot(u) >= 0; } if (prevVisibleRef.current !== nextVisible) { diff --git a/app/src/modules/simulation/events/triggerConnections/triggerConnector.tsx b/app/src/modules/simulation/events/triggerConnections/triggerConnector.tsx index c4cb6e9..0bd6fdc 100644 --- a/app/src/modules/simulation/events/triggerConnections/triggerConnector.tsx +++ b/app/src/modules/simulation/events/triggerConnections/triggerConnector.tsx @@ -483,14 +483,7 @@ function TriggerConnector() { } }; - const previewLine = currentLine - ? { - start: currentLine.start, - mid: currentLine.mid, - end: currentLine.end, - color: helperLineColor, - } - : null; + const previewLine = currentLine ? { start: currentLine.start, mid: currentLine.mid, end: currentLine.end, color: helperLineColor } : null; return (