fix: Refactor 3D Scale to 1.0 and Visuals to 1:1
This commit is contained in:
parent
0d82bb0db4
commit
3cc1830b6c
3 changed files with 9 additions and 9 deletions
|
|
@ -75,22 +75,22 @@ export function Room3DViewer({ room, visMode = 'STANDARD', onPlantClick }: Room3
|
||||||
<Canvas
|
<Canvas
|
||||||
shadows
|
shadows
|
||||||
orthographic
|
orthographic
|
||||||
camera={{ position: [100, 100, 100], zoom: 60, near: -500, far: 2000 }}
|
camera={{ position: [100, 100, 100], zoom: 10, near: -500, far: 2000 }}
|
||||||
className="w-full h-full"
|
className="w-full h-full"
|
||||||
>
|
>
|
||||||
<ambientLight intensity={0.7} />
|
<ambientLight intensity={0.7} />
|
||||||
<directionalLight position={[10, 50, 20]} intensity={1.5} castShadow />
|
<directionalLight position={[10, 50, 20]} intensity={1.5} castShadow />
|
||||||
|
|
||||||
{/* Grid Floor for context - Scaled to match RoomObject (0.1 scale) */}
|
{/* Grid Floor for context - Scaled 1:1 */}
|
||||||
<Grid
|
<Grid
|
||||||
infiniteGrid
|
infiniteGrid
|
||||||
fadeDistance={50}
|
fadeDistance={100}
|
||||||
sectionColor="#10b981"
|
sectionColor="#10b981"
|
||||||
cellColor="#059669"
|
cellColor="#059669"
|
||||||
sectionThickness={1}
|
sectionThickness={1}
|
||||||
cellThickness={0.5}
|
cellThickness={0.5}
|
||||||
position={[0, -0.01, 0]}
|
position={[0, -0.01, 0]}
|
||||||
args={[20, 20]}
|
args={[60, 60]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Center top>
|
<Center top>
|
||||||
|
|
@ -114,13 +114,13 @@ export function Room3DViewer({ room, visMode = 'STANDARD', onPlantClick }: Room3
|
||||||
enableRotate={false}
|
enableRotate={false}
|
||||||
enableZoom={true}
|
enableZoom={true}
|
||||||
enablePan={true}
|
enablePan={true}
|
||||||
minZoom={10}
|
minZoom={5}
|
||||||
maxZoom={200}
|
maxZoom={50}
|
||||||
/>
|
/>
|
||||||
</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 // 60x
|
VIEW: ISOMETRIC // FIXED // 1:1 SCALE
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import { RoomSummaryOverlay } from './SummaryOverlay';
|
||||||
import { cn } from '../../lib/utils';
|
import { cn } from '../../lib/utils';
|
||||||
|
|
||||||
// Convert pixel coordinates to world units
|
// Convert pixel coordinates to world units
|
||||||
const SCALE = 0.1;
|
const SCALE = 1.0;
|
||||||
|
|
||||||
// Mock environment data
|
// Mock environment data
|
||||||
const getMockRoomEnv = (roomName: string) => {
|
const getMockRoomEnv = (roomName: string) => {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { Section3D, Position3D } from '../../lib/layoutApi';
|
import type { Section3D, Position3D } from '../../lib/layoutApi';
|
||||||
|
|
||||||
// Convert pixel coordinates to world units
|
// Convert pixel coordinates to world units
|
||||||
export const SCALE = 0.1;
|
export const SCALE = 1.0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate the world coordinates (x, y, z) for a plant position within a section.
|
* Calculate the world coordinates (x, y, z) for a plant position within a section.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue