Detect the graphics specs of a device using web APIs
# Yarn
yarn add webgl-specs
# NPM
npm install webgl-specs
This is useful when you want to render lower quality graphics for low powered devices
If you have a module loader (webpack or rollup)
import WebglSpecs from 'webgl-specs';
const report = WebglSpecs();
report.unMaskedRenderer // "Intel Iris OpenGL Engine"
report.unMaskedVendor // "Intel Inc."
report.glVersion // "WebGL 1.0 (OpenGL ES 2.0 Chromium)"
If you're not:
<html>
<body>
<script type="module">
import WebglSpecs from 'https://unpkg.com/webgl-specs@latest/index.js';
const report = WebglSpecs();
report.unMaskedRenderer // "Intel Iris OpenGL Engine"
report.unMaskedVendor // "Intel Inc."
report.glVersion // "WebGL 1.0 (OpenGL ES 2.0 Chromium)"
</script>
</body>
</html>
yarn start