fix: Replace Bounds with Center and Manual Zoom (Gameboy fixed view)
Some checks are pending
Test / backend-test (push) Waiting to run
Test / frontend-test (push) Waiting to run

This commit is contained in:
fullsizemalt 2025-12-27 18:47:33 -08:00
parent e82dac5ca2
commit 4d04d2f8c7

View file

@ -65,7 +65,7 @@ export function Room3DViewer({ room, visMode = 'STANDARD', onPlantClick }: Room3
<Canvas
shadows
orthographic
camera={{ position: [100, 100, 100], zoom: 40, near: -500, far: 2000 }}
camera={{ position: [200, 200, 200], zoom: 10, near: -500, far: 2000 }}
className="w-full h-full"
>
<ambientLight intensity={0.7} />
@ -74,18 +74,16 @@ export function Room3DViewer({ room, visMode = 'STANDARD', onPlantClick }: Room3
{/* Grid Floor for context */}
<Grid
infiniteGrid
fadeDistance={200}
fadeDistance={250}
sectionColor="#10b981"
cellColor="#059669"
sectionThickness={1}
cellThickness={0.5}
opacity={0.15}
position={[0, -0.1, 0]}
args={[10.5, 10.5]}
/>
<Bounds fit clip observe margin={1.2}>
<group position={[0, 0, 0]}>
<Center top>
<RoomObject
room={room3DData}
visMode={visMode}
@ -98,8 +96,7 @@ export function Room3DViewer({ room, visMode = 'STANDARD', onPlantClick }: Room3
floor: '1',
}}
/>
</group>
</Bounds>
</Center>
<Environment preset="city" />
<OrbitControls
@ -111,7 +108,7 @@ export function Room3DViewer({ room, visMode = 'STANDARD', onPlantClick }: Room3
</Canvas>
<div className="absolute bottom-4 right-4 bg-slate-900/90 backdrop-blur-md px-3 py-1.5 rounded-md border border-emerald-500/20 text-xs font-mono text-emerald-400 pointer-events-none shadow-xl">
VIEW: ISOMETRIC // FIXED // AUTO-FIT
VIEW: ISOMETRIC // FIXED
</div>
</div>
);