diff --git a/frontend/src/pages/Facility3DViewerPage.tsx b/frontend/src/pages/Facility3DViewerPage.tsx
index 1f42ab6..f09050e 100644
--- a/frontend/src/pages/Facility3DViewerPage.tsx
+++ b/frontend/src/pages/Facility3DViewerPage.tsx
@@ -114,8 +114,9 @@ function PlantInstances({ positions, onPlantClick, visMode }: {
}
}}
>
-
-
+ {/* Bushy Top */}
+
+
{plants.map((pos, i) => {
let color = COLORS.VEG;
@@ -138,11 +139,13 @@ function PlantInstances({ positions, onPlantClick, visMode }: {
break;
}
+ // Lift plant slightly to sit ON shelf, not IN it
return (
);
})}
@@ -189,6 +192,19 @@ function FacilityScene({ data, onSelectPlant, targetView, setControls, visMode }
}
}, [targetView]);
+ // RESTORED: Keyboard Event Listeners for WASD
+ useEffect(() => {
+ const handleDown = (e: KeyboardEvent) => setKeysPressed(k => ({ ...k, [e.code]: true }));
+ const handleUp = (e: KeyboardEvent) => setKeysPressed(k => ({ ...k, [e.code]: false }));
+
+ window.addEventListener('keydown', handleDown);
+ window.addEventListener('keyup', handleUp);
+ return () => {
+ window.removeEventListener('keydown', handleDown);
+ window.removeEventListener('keyup', handleUp);
+ };
+ }, []);
+
useFrame((_, delta) => {
if (!controlsRef.current) return;
const speed = 20 * delta;
@@ -310,8 +326,9 @@ function FacilityScene({ data, onSelectPlant, targetView, setControls, visMode }
castShadow
receiveShadow
>
+ {/* Shelf - Lighter for visibility */}
-
+
))}
@@ -365,7 +382,7 @@ function FacilityScene({ data, onSelectPlant, targetView, setControls, visMode }
return (
<>
-
+ {/* Increased brightness */}