use-videocard
Installation
This package can be found in the NPM registry, install it using this command:
With npm:
npm install use-videocard
With yarn:
yarn add use-videocard
Example
API
useVideoCard (gl?: WebGLRenderingContext): GraphicsInformation
gl
: The WebGLRenderingContext which we want to extract the information from. NOTE: this field is OPTIONAL, the hook creates a canvas without appending it to the dom, but if you really want to specify theWebGLRenderingContext
then set this field
GraphicsInformation
- renderer: The masked renderer ID
- vendor: The masked vendor ID
- unmasked:
- vendor: The unmasked vendor name. es:
NVIDIA Corporation
- renderer: The unmasked renderer name (the graphics card model and the pci version). es:
Geforce GTX 1070/PCIe/SSE2
- vendor: The unmasked vendor name. es: