fix: Replace Bounds with Center and Manual Zoom (Gameboy fixed view)
This commit is contained in:
parent
e82dac5ca2
commit
4d04d2f8c7
1 changed files with 17 additions and 20 deletions
|
|
@ -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,32 +74,29 @@ 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]}>
|
||||
<RoomObject
|
||||
room={room3DData}
|
||||
visMode={visMode}
|
||||
onPlantClick={onPlantClick || (() => { })}
|
||||
highlightedTags={[]}
|
||||
dimMode={false}
|
||||
hierarchy={{
|
||||
facility: 'Main',
|
||||
building: 'A',
|
||||
floor: '1',
|
||||
}}
|
||||
/>
|
||||
</group>
|
||||
</Bounds>
|
||||
<Center top>
|
||||
<RoomObject
|
||||
room={room3DData}
|
||||
visMode={visMode}
|
||||
onPlantClick={onPlantClick || (() => { })}
|
||||
highlightedTags={[]}
|
||||
dimMode={false}
|
||||
hierarchy={{
|
||||
facility: 'Main',
|
||||
building: 'A',
|
||||
floor: '1',
|
||||
}}
|
||||
/>
|
||||
</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>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue