WebGLRenderingContext.getSupportedExtensions()
WebGLRenderingContext.getSupportedExtensions()
方法返回一个所有的支持 WebGL 扩展的列表。
语法
getSupportedExtensions()
参数
无。
返回值
一个字符串数组,包含所有支持 WebGL 的扩展。
示例
const canvas = document.getElementById('canvas');
gl = canvas.getContext('webgl');
const extensions = gl.getSupportedExtensions();
// Array [ 'ANGLE_instanced_arrays', 'EXT_blend_minmax', … ]
参见用于获得一个特定的扩展对象的 WebGLRenderingContext.getExtension()
方法。
WebGL 扩展
所有 WebGL API 扩展都被注册在 WebGL Extension Registry 中。当前的扩展在这里列出。
规范
Specification |
---|
WebGL Specification # 5.14.14 |
浏览器兼容性
BCD tables only load in the browser