import { useState } from 'react'; import * as THREE from 'three'; import { Text } from '@react-three/drei'; const DOOR_WIDTH = 2.4; const DOOR_HEIGHT = 2.5; const WALL_THICKNESS = 0.18; /** Open archway connecting to the next movement wing. */ export default function HallPassage({ position, active, label, onActivate, wallColor = '#f0ebe3', trimColor = '#ddd5c8', }: { position: [number, number, number]; active: boolean; label: string; onActivate: () => void; wallColor?: string; trimColor?: string; }) { const [hovered, setHovered] = useState(false); const highlight = active || hovered; const openingW = DOOR_WIDTH; const openingH = DOOR_HEIGHT; const jamb = 0.12; const faceZ = 0.04; const handleActivate = (e: THREE.Event & { stopPropagation: () => void }) => { e.stopPropagation(); onActivate(); }; return ( {/* Depth beyond passage */} {/* Side jambs */} {([-1, 1] as const).map((sign) => ( ))} {/* Arch header */} setHovered(true)} onPointerOut={() => setHovered(false)}> setHovered(true)} onPointerOut={() => setHovered(false)} > {label.toUpperCase()} setHovered(true)} onPointerOut={() => setHovered(false)} > ); } export { DOOR_WIDTH, DOOR_HEIGHT, WALL_THICKNESS };