nogl

1.1.0 • Public • Published

WebGL context minimal shim for node. Useful to make stackgl components not fail in node.

npm install nogl

var Shader = require('gl-shader');
var gl = require('nogl')();
var glslify = require('glslify-sync');
var createProcessor = require('nogl-shader-output');
 
var shader = Shader(gl, glslify('./vertex.glsl'), glslify('./fragment.glsl'));
 
var draw = createProcessor(shader);
 
draw({
    size: [10, 20]
});

API is compatible with webgl-context. If you need real webgl, use headless-js. For practical use-case look nogl-shader-output. Heavily inspired by emscripten headlessCanvas.

/nogl/

    Package Sidebar

    Install

    npm i nogl

    Weekly Downloads

    10

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • dfcreative