From 9ac0261a17567770b06b3435a070b40cca2d798f Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Wed, 17 Dec 2025 23:07:00 -0800 Subject: [PATCH] feat: improve 3d viewer legibility with rack visualization and larger labels --- frontend/src/pages/Facility3DViewerPage.tsx | 81 +++++++++++++++++++-- 1 file changed, 73 insertions(+), 8 deletions(-) diff --git a/frontend/src/pages/Facility3DViewerPage.tsx b/frontend/src/pages/Facility3DViewerPage.tsx index dc18526..bd4ed34 100644 --- a/frontend/src/pages/Facility3DViewerPage.tsx +++ b/frontend/src/pages/Facility3DViewerPage.tsx @@ -232,15 +232,15 @@ function FacilityScene({ data, onSelectPlant, targetView, setControls, visMode } {showLabel ? room.name : ''} - {/* Env Data Label Overlay */} + {/* Env Data Label Overlay - INCREASED SIZE significantly */} {(visMode === 'TEMP' || visMode === 'HUMIDITY') && ( @@ -272,19 +272,84 @@ function FacilityScene({ data, onSelectPlant, targetView, setControls, visMode } const spacing = 0.5; const x = section.posX + (pos.column * spacing); const z = section.posY + (pos.row * spacing); - const y = 0.5 + (pos.tier * 0.5); + const y = 0.5 + (pos.tier * 0.8); // Increased vertical spacing for tiers return { ...pos, x, y, z }; }); + // Calculate visual bounds for labels + const distinctRows = [...new Set(positions.map(p => p.row))].sort((a, b) => a - b); + const distinctCols = [...new Set(positions.map(p => p.column))].sort((a, b) => a - b); + const distinctTiers = [...new Set(positions.map(p => p.tier))].sort((a, b) => a - b); + + const spacing = 0.5; + return ( + {/* Section Label */} {visMode === 'STANDARD' ? section.code : ''} + + {/* VISUAL CUES: Shelves per Tier */} + {distinctTiers.map(tier => ( + + + + + ))} + + {/* ROW LABELS (Along Z-axis) */} + {visMode === 'STANDARD' && distinctRows.map(row => ( + + R{row} + + ))} + + {/* COLUMN LABELS (Along X-axis) */} + {visMode === 'STANDARD' && distinctCols.map(col => ( + + C{col} + + ))} + );