import { ContactShadows } from "@react-three/drei"; import { Tankopedia } from "../stores/tankopedia"; import { TankopediaDisplay } from "../stores/tankopediaPersistent/constants"; /** * drei's ContactShadows, but only redrawn when the scene changes instead of * every frame. drei resets its frame count on every render, so re-rendering * with frames={1} draws it once more. */ export function TankopediaContactShadows() { const display = Tankopedia.use((state) => state.display); if (display === TankopediaDisplay.StaticArmor) return null; return ( ); }