1.4 KiB
1.4 KiB
3D Facility Viewer Updates
I've updated the 3D Viewer to improve navigation and usability, and fixed the issue where plants were floating in the void.
🚀 Enhancements Added
- Quick Navigation Sidebar: A list of rooms is now displayed on the left. Clicking a room name smoothly flies the camera to that location.
- WASD Controls: You can now use
W,A,S,D(and arrow keys) to move the camera around the facility. - Smooth Camera Transitions: Replaced standard controls with
CameraControlsfor cinematic transitions between rooms. - Reset View: Added a button to reset the view to the facility center.
⚠️ Important: Fix "Floating Plants" Data
The issue where plants appeared far away from rooms was caused by missing coordinate data in the database. I have updated the seed script to generate realistic 3D layout data.
You must re-seed the database for the 3D view to look correct.
Run the following command on your deployment server (or locally if you have the DB running):
# If running via Docker Compose (Recommended)
docker compose exec backend npm run seed
Or if you are running the backend locally with a .env file containing DATABASE_URL:
cd backend
npm run seed
This will populate the database with:
- Spatially aware Rooms (Veg, Flower, Dry)
- Correctly positioned Racks and Benches
- Plants placed inside those racks