useDetectGPU
This hook uses DetectGPU by @TimvanScherpenzeel to determine what tier should be assigned to the user's GPU.
š This hook CAN be used outside the react-three-fiber Canvas
.
const GPUTier = useDetectGPU()
// show a fallback for mobile or lowest tier GPUs
return (
{(GPUTier.tier === "0" || GPUTier.isMobile) ? <Fallback /> : <Canvas>...</Canvas>