0.0.2 • Published 8 years ago
webgl-metrics v0.0.2
webgl-metrics
WebGL Support Metrics
npm install webgl-metrics
Usage
import webglMetrics from 'webgl-metrics';
var result = webglMetrics();
if (result.status && !result.hasCaveat) {
// Render something challenging …
}
Flags
status
:true
when getContext was successfulunsupported
:true
when WebGL API was not foundhasCaveat
:true
when getContext is successful only withoutfailIfMajorPerformanceCaveat
hasCaveatError
: Error message when getContext failed withoutfailIfMajorPerformanceCaveat
noCaveatError
: Error message when getContext failed withfailIfMajorPerformanceCaveat
exception
: Error message when detection threw an exception