pex-gl

Create WebGL context in Plask or in a web browser (via browserify.

Usage

NPM

To create new WebGL context via Plask window (in Plask) or HTMLCanvas (in a browser):

var createGl = require('pex-gl')
var gl = createGL()

or

// full window canvas
var gl = createGl() 

// creates gl context from existing canvas and keeps it's size
var gl = createGL({ canvas: canvas })

// creates new canvas with given width and height
var gl = createGl({ width: Number, height: Number })

API

createGL(width, height)

Creates gl context from canvas/window with given width and height in pixels.

License

MIT, see LICENSE.md for details.