Function: getContext
utils.getContext
▸ getContext(canvas
, glOptions?
, requestWebGl2?
): null
| WebGLRenderingContext
获取 webgl 实例
Name | Type | Default value |
---|
canvas | HTMLCanvasElement | undefined |
glOptions | Partial <GlOptions > | {} |
requestWebGl2 | boolean | false |
null
| WebGLRenderingContext
src/utils/gl.ts:85