"use client";
import { Canvas } from "@react-three/fiber";
import { OrbitControls, PerspectiveCamera, Environment, ContactShadows } from "@react-three/drei";
import { Door3DEnhanced } from "./door-3d-enhanced";
import { useConfiguratorStore } from "@/lib/store";
import * as THREE from "three";
function LivingRoom({ doorWidth, doorHeight }: { doorWidth: number; doorHeight: number }) {
const wallThickness = 0.15;
const roomWidth = 8;
const roomDepth = 6;
const roomHeight = 3;
// Calculate dynamic doorway dimensions
const doorwayWidth = doorWidth + wallThickness * 2 + 0.1; // Extra margin
const doorwayHeight = doorHeight + wallThickness + 0.1;
return (
{/* Floor - Modern light wood */}
{/* Back Wall with Dynamic Doorway */}
{/* Left Pillar - Dynamic height */}
{/* Right Pillar - Dynamic height */}
{/* Doorway Frame - Left */}
{/* Doorway Frame - Right */}
{/* Doorway Frame - Top (Lintel) */}
{/* Main Wall - Left Section */}
{/* Main Wall - Right Section */}
{/* Main Wall - Top Section (above doorway) */}
{/* Left Wall */}
{/* Right Wall */}
{/* Ceiling */}
{/* Decorative Elements - Baseboard Left */}
{/* Decorative Elements - Baseboard Right */}
);
}
function DoorWithRoom() {
const { doorLeafWidth, height } = useConfiguratorStore();
// Convert mm to meters for 3D scene
const doorWidth = doorLeafWidth / 1000;
const doorHeight = height / 1000;
return (
<>
>
);
}
function Lighting() {
return (
<>
{/* Ambient for overall illumination */}
{/* Main directional light (sunlight from window) */}
{/* Fill light from opposite side */}
{/* Subtle top light */}
>
);
}
export function Scene3D() {
return (
);
}