"use client"; import { useLoader } from "@react-three/fiber"; import { TextureLoader } from "three"; type RotationPanelProps = { direction: "clockwise" | "counter-clockwise"; face: "front" | "back" | "left" | "right" | "top" | "bottom"; }; export const RotationPanel = ({ direction, face }: RotationPanelProps) => { const clockwise = direction === "clockwise"; const texture = useLoader(TextureLoader, `/textures/${direction}.png`); const position: Record = { front: clockwise ? [0.5, 0, 1.01] : [-0.5, 0, 1.01], back: clockwise ? [-0.5, 0, -1.01] : [0.5, 0, -1.01], right: clockwise ? [1.01, 0, -0.5] : [1.01, 0, 0.5], }; const rotation: Record = { front: [0, 0, 0], back: [0, Math.PI, 0], right: [0, Math.PI / 2, 0], }; return ( ); };