JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 62
  • Score
    100M100P100Q61701F
  • License MIT

WebGL shim for node

Package Exports

  • nogl

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nogl) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.