StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
StackGenVis/frontend/node_modules/webgl-context
Angelos Chatzimparmpas e069030893 fix the frontend 3 years ago
..
.npmignore fix the frontend 3 years ago
LICENSE.md fix the frontend 3 years ago
README.md fix the frontend 3 years ago
index.js fix the frontend 3 years ago
package.json fix the frontend 3 years ago

README.md

webgl-context

stable

Grabs a WebGLRenderingContext, returning null if it doesn't exist. Similar to 2d-context.

//get a webgl context, will be null if not found
var gl = require('webgl-context')()

if (gl) {
    document.body.appendChild(gl.canvas)
    //do something...
}

Or, with options:

//or with optional settings...
var gl = require('webgl-context')({
    canvas: canvas, //the canvas DOM element to use
    width: 400, //resizes the canvas..
    height: 200, 
    antialias: true //can specify custom attributes here
})

Usage

NPM

ctx = require('webgl-context')([opt])

Gets a new canvas context with optional parameters:

  • canvas a canvas element to use, otherwise creates a new element
  • width a width to set, otherwise no change
  • height a height to set, otherwise no change
  • other attributes are passed to the getContext call, like alpha and antialias

You can then get a reference of the canvas element with ctx.canvas.

See Also

License

MIT, see LICENSE.md for details.