import React from "react"; import { Stage, useGLTF } from "@react-three/drei"; import { Canvas } from "@react-three/fiber"; import { OrbitControls } from "@react-three/drei"; export const ModelViewer3D = ({ fileUrl, height = "100%", onLoad, }: { fileUrl: string; height: string; onLoad?: () => void; }) => { const { scene } = useGLTF(fileUrl); // Вызываем onLoad когда модель загружена React.useEffect(() => { if (onLoad) { onLoad(); } }, [scene, onLoad]); return ( ); };