Rate GPUs based on their 3D rendering performance allowing the developer to provide sensible default settings for graphically intensive applications. Think of it like a user-agent detection for the GPU but more powerful.
This project was initially based on detect-gpu code rewritten in JavaScript, but now it uses completely different approach to GPU detection.
Just copy and link detect-gpu.js in your project HTML if you're using ES6 modules, or detect-gpu-compat.js if you're using namespaced modules.
import { getGPUTier } from 'detect-gpu';
(async () => {
const gpuTier = await getGPUTier();
// output is one of:
// { tier: 'GOOD', reason: '...' }
// { tier: 'BAD', reason: '...' }
})();getGPUTier(undecided='GOOD')The project is released under the MIT license.