@ahmerhh/webgraphiclibrary-context

1.0.5 • Public • Published

Web Graphic Library Context

Get the Web Graphic Library context from a canvas.

Installation

$ npm install --save @ahmerhh/WebGraphicLibrary-context

Usage

import getGl from '@ahmerhh/WebGraphicLibrary-context';

const canvas = document.createElement('canvas');
const gl = getWebGLContext(canvas);

if(gl == null) {
  // WebGraphicLibrary is not supported
}

API

gl = getWebGLContext(canvas)

Returns the WebGraphicLibrary context from the canvas. If it fails, gl is null.

License

MIT, see LICENSE.md for more details.

Credits

Thanks to the amazing stackgl for the inspiration.

Readme

Keywords

Package Sidebar

Install

npm i @ahmerhh/webgraphiclibrary-context

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

5.12 kB

Total Files

6

Last publish

Collaborators

  • ahmerhh