import { FC } from "react"; import { Object3D, Mesh } from "three"; import { Canvas } from "@react-three/fiber"; import { useGLTF } from "@react-three/drei"; import PlayArea from "../components/PlayArea"; import { Game } from "../types/gameTypes"; type GameCanvasProps = { session: string; gameData: Game | null; }; const GameCanvas: FC = ({ gameData }) => { const tableModel = useGLTF("/models/table.glb"); const heightProportion = 1.4; const aspectRatio = window.innerWidth / (window.innerHeight / heightProportion); if (!gameData) return null; return (
{ if (node instanceof Mesh) { // node.castShadow = true; node.receiveShadow = true; } }} />
); }; export default GameCanvas;