diff --git a/frontend/src/components/facility3d/RoomObject.tsx b/frontend/src/components/facility3d/RoomObject.tsx index 0f6be41..bced0e4 100644 --- a/frontend/src/components/facility3d/RoomObject.tsx +++ b/frontend/src/components/facility3d/RoomObject.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { Text } from '@react-three/drei'; +import { Html } from '@react-three/drei'; import * as THREE from 'three'; import type { Room3D } from '../../lib/layoutApi'; import { PlantPosition, VisMode, COLORS } from './types'; @@ -94,31 +94,29 @@ export function RoomObject({ room, visMode, onPlantClick, highlightedTags, dimMo position={[actualRoom.posX + actualRoom.width / 2, 6, actualRoom.posY + actualRoom.height / 2]} /> - {/* Room label - positioned above the actual content area */} - - {room.name} - +
+ {room.name} +
+ {(visMode === 'TEMP' || visMode === 'HUMIDITY') && ( - - {visMode === 'TEMP' ? `${env.temp}°F` : `${env.humidity}%`} - +
+ {visMode === 'TEMP' ? `${env.temp}°F` : `${env.humidity}%`} +
+ )} {/* Room floor - use calculated bounds */}