From 15ab32a75aac915eee32a019712d37eabdc1bd71 Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Sat, 27 Dec 2025 17:21:31 -0800 Subject: [PATCH] fix: Finalize 3D view with HTML labels --- .../src/components/facility3d/RoomObject.tsx | 40 +++++++++---------- 1 file changed, 19 insertions(+), 21 deletions(-) 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 */}