diff --git a/frontend/src/pages/Facility3DViewerPage.tsx b/frontend/src/pages/Facility3DViewerPage.tsx index bd4ed34..1f42ab6 100644 --- a/frontend/src/pages/Facility3DViewerPage.tsx +++ b/frontend/src/pages/Facility3DViewerPage.tsx @@ -1,6 +1,6 @@ import { useEffect, useState, Suspense, useMemo, Component, ReactNode, useRef } from 'react'; import { Canvas, useFrame } from '@react-three/fiber'; -import { Text, Instances, Instance, Html, CameraControls } from '@react-three/drei'; +import { Text, Instances, Instance, Html, CameraControls, Environment, ContactShadows } from '@react-three/drei'; import * as THREE from 'three'; import { layoutApi, Floor3DData } from '../lib/layoutApi'; import { Loader2, ArrowLeft, Maximize, MousePointer2, Layers, Thermometer, Droplets, Activity, Leaf } from 'lucide-react'; @@ -149,11 +149,11 @@ function PlantInstances({ positions, onPlantClick, visMode }: { )} - {/* Empty Slots */} + {/* Empty Slots - Refined */} {emptySlots.length > 0 && visMode === 'STANDARD' && ( - + {emptySlots.map((pos, i) => ( @@ -306,9 +307,11 @@ function FacilityScene({ data, onSelectPlant, targetView, setControls, visMode } section.posY + (section.height / 2) ]} rotation={[-Math.PI / 2, 0, 0]} + castShadow + receiveShadow > - + ))} @@ -361,14 +364,29 @@ function FacilityScene({ data, onSelectPlant, targetView, setControls, visMode } return ( <> - - - + + + {roomMeshes} + + - - - ); }