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
|
<Canvas
|
||||||
shadows
|
shadows
|
||||||
orthographic
|
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"
|
className="w-full h-full"
|
||||||
>
|
>
|
||||||
<ambientLight intensity={0.7} />
|
<ambientLight intensity={0.7} />
|
||||||
|
|
@ -74,32 +74,29 @@ export function Room3DViewer({ room, visMode = 'STANDARD', onPlantClick }: Room3
|
||||||
{/* Grid Floor for context */}
|
{/* Grid Floor for context */}
|
||||||
<Grid
|
<Grid
|
||||||
infiniteGrid
|
infiniteGrid
|
||||||
fadeDistance={200}
|
fadeDistance={250}
|
||||||
sectionColor="#10b981"
|
sectionColor="#10b981"
|
||||||
cellColor="#059669"
|
cellColor="#059669"
|
||||||
sectionThickness={1}
|
sectionThickness={1}
|
||||||
cellThickness={0.5}
|
cellThickness={0.5}
|
||||||
opacity={0.15}
|
|
||||||
position={[0, -0.1, 0]}
|
position={[0, -0.1, 0]}
|
||||||
args={[10.5, 10.5]}
|
args={[10.5, 10.5]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Bounds fit clip observe margin={1.2}>
|
<Center top>
|
||||||
<group position={[0, 0, 0]}>
|
<RoomObject
|
||||||
<RoomObject
|
room={room3DData}
|
||||||
room={room3DData}
|
visMode={visMode}
|
||||||
visMode={visMode}
|
onPlantClick={onPlantClick || (() => { })}
|
||||||
onPlantClick={onPlantClick || (() => { })}
|
highlightedTags={[]}
|
||||||
highlightedTags={[]}
|
dimMode={false}
|
||||||
dimMode={false}
|
hierarchy={{
|
||||||
hierarchy={{
|
facility: 'Main',
|
||||||
facility: 'Main',
|
building: 'A',
|
||||||
building: 'A',
|
floor: '1',
|
||||||
floor: '1',
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
</Center>
|
||||||
</group>
|
|
||||||
</Bounds>
|
|
||||||
|
|
||||||
<Environment preset="city" />
|
<Environment preset="city" />
|
||||||
<OrbitControls
|
<OrbitControls
|
||||||
|
|
@ -111,7 +108,7 @@ export function Room3DViewer({ room, visMode = 'STANDARD', onPlantClick }: Room3
|
||||||
</Canvas>
|
</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">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue