Skip to content

Soft8Soft/detect-gpu-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Detect GPU

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.

Demo

Live demo

Installation

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.

Usage

import { getGPUTier } from 'detect-gpu';

(async () => {
    const gpuTier = await getGPUTier();
  
    // output is one of:
    // { tier: 'GOOD', reason: '...' }
    // { tier: 'BAD', reason: '...' }
})();

API

getGPUTier(undecided='GOOD')

Licence

The project is released under the MIT license.

About

Detect and rate GPU based on its GFXBench scores

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published