A utility module with basic WebGL 2 capability testing.
WebGL is an addon, and must be imported explicitly, see Installation#Addons.
import WebGL from 'three/addons/capabilities/WebGL.js';
Returns a div element representing a formatted error message that can be appended in web sites if WebGL 2 isn't supported.
Returns: A div element representing a formatted error message that WebGL 2 isn't supported.
Returns true if the given color space is available. This method can only be used if WebGL 2 is supported.
colorSpace
The color space to test.
Returns: Whether the given color space is available or not.
Returns true if WebGL 2 is available.
Returns: Whether WebGL 2 is available or not.