Origin from https://webglfundamentals.org/
npm install webgl-utils.js
yarn add webgl-utils.js
// Quick example
import * as webglUtils from 'webgl-utils.js';
// ...
// setup GLSL program
var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]);
OR
// Quick example
import { createProgramFromScripts } from 'webgl-utils.js';
// ...
// setup GLSL program
var program = createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]);
✔ createAugmentedTypedArray
✔ createAttribsFromArrays
✔ createBuffersFromArrays
✔ createBufferInfoFromArrays
✔ createAttributeSetters
✔ createProgram
✔ createProgramFromScripts
✔ createProgramFromSources
✔ createProgramInfo
✔ createUniformSetters
✔ createVAOAndSetAttributes
✔ createVAOFromBufferInfo
✔ drawBufferInfo
✔ drawObjectList
✔ glEnumToString
✔ getExtensionWithKnownPrefixes
✔ loadShader
✔ resizeCanvasToDisplaySize
✔ setAttributes
✔ setBuffersAndAttributes
✔ setUniforms