pex-gl

    2.7.0 • Public • Published

    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.

    Keywords

    Install

    npm i pex-gl

    DownloadsWeekly Downloads

    12

    Version

    2.7.0

    License

    MIT

    Unpacked Size

    18.6 kB

    Total Files

    11

    Last publish

    Collaborators

    • vorg