Add files
This commit is contained in:
commit
77bde04db3
1 changed files with 10327 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
export const getWebGl2Context = (canvas: HTMLCanvasElement): WebGL2RenderingContext => {
|
||||
const gl = canvas.getContext('webgl2');
|
||||
|
||||
if (!gl) {
|
||||
throw new Error('WebGl2 is not supported');
|
||||
}
|
||||
|
||||
return gl;
|
||||
};
|
||||
Loading…
Reference in a new issue