fix: Refactor 3D Scale to 1.0 and Visuals to 1:1
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 21:05:31 -08:00
parent 0d82bb0db4
commit 3cc1830b6c
3 changed files with 9 additions and 9 deletions

View file

@ -75,22 +75,22 @@ export function Room3DViewer({ room, visMode = 'STANDARD', onPlantClick }: Room3
<Canvas
shadows
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"
>
<ambientLight intensity={0.7} />
<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
infiniteGrid
fadeDistance={50}
fadeDistance={100}
sectionColor="#10b981"
cellColor="#059669"
sectionThickness={1}
cellThickness={0.5}
position={[0, -0.01, 0]}
args={[20, 20]}
args={[60, 60]}
/>
<Center top>
@ -114,13 +114,13 @@ export function Room3DViewer({ room, visMode = 'STANDARD', onPlantClick }: Room3
enableRotate={false}
enableZoom={true}
enablePan={true}
minZoom={10}
maxZoom={200}
minZoom={5}
maxZoom={50}
/>
</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 // 60x
VIEW: ISOMETRIC // FIXED // 1:1 SCALE
</div>
</div>
);

View file

@ -8,7 +8,7 @@ import { RoomSummaryOverlay } from './SummaryOverlay';
import { cn } from '../../lib/utils';
// Convert pixel coordinates to world units
const SCALE = 0.1;
const SCALE = 1.0;
// Mock environment data
const getMockRoomEnv = (roomName: string) => {

View file

@ -1,7 +1,7 @@
import type { Section3D, Position3D } from '../../lib/layoutApi';
// 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.